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/1840
Add common voice
I added a Work in Progress pull request (hope that is ok). I've made a card for the dataset and filled out the common_voice.py file with information about the datset (not completely). I didn't manage to get the tagging tool working locally on my machine but will look into that later. Left to do. - Tag the dataset - Add missing information and update common_voice.py https://github.com/huggingface/datasets/pull/1886
## Adding a Dataset - **Name:** *common voice* - **Description:** *Mozilla Common Voice Dataset* - **Paper:** Homepage: https://voice.mozilla.org/en/datasets - **Data:** https://voice.mozilla.org/en/datasets - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/common_voice If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
66
Add common voice ## Adding a Dataset - **Name:** *common voice* - **Description:** *Mozilla Common Voice Dataset* - **Paper:** Homepage: https://voice.mozilla.org/en/datasets - **Data:** https://voice.mozilla.org/en/datasets - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/common_voice If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). I added a Work in Progress pull request (hope that is ok). I've made a card for the dataset and filled out the common_voice.py file with information about the datset (not completely). I didn't manage to get the tagging tool working locally on my machine but will look into that later. Left to do. - Tag the dataset - Add missing information and update common_voice.py https://github.com/huggingface/datasets/pull/1886
[ -0.13444733619689941, -0.22285667061805725, 0.00019300542771816254, -0.1578855961561203, 0.19370652735233307, 0.004948638379573822, 0.26812583208084106, 0.30204588174819946, -0.24950066208839417, 0.17952248454093933, -0.395501971244812, 0.23003438115119934, -0.04257690906524658, -0.026485716924071312, 0.0067098625004291534, -0.10082922875881195, -0.10253482311964035, 0.15952539443969727, 0.10418848693370819, -0.24802036583423615, 0.19491498172283173, 0.06684641540050507, 0.11330677568912506, -0.0790029764175415, -0.3241567015647888, -0.16444531083106995, 0.02310466580092907, -0.14355674386024475, -0.0003260187804698944, -0.15492740273475647, -0.04535453021526337, 0.2715560495853424, -0.21029865741729736, 0.6402725577354431, -0.00010049116099253297, -0.04443685710430145, 0.03419139236211777, -0.24572131037712097, -0.08318959176540375, -0.19360454380512238, -0.11551953852176666, 0.10766535997390747, -0.29477179050445557, 0.11475303024053574, -0.2959163784980774, -0.25132879614830017, -0.018147150054574013, -0.2323179543018341, 0.3075140416622162, 0.3086760938167572, 0.27403104305267334, 0.0791773572564125, 0.003706071525812149, 0.10205000638961792, 0.19465528428554535, 0.15001708269119263, -0.22054986655712128, 0.17141923308372498, 0.32425200939178467, -0.1366102695465088, -0.04717051237821579, 0.4662683606147766, 0.09553907066583633, -0.20637710392475128, 0.07212280482053757, 0.03368575870990753, -0.14084815979003906, -0.4390895962715149, 0.07487869262695312, 0.49494391679763794, 0.5199844241142273, -0.4264090657234192, -0.3617743253707886, -0.31734079122543335, 0.10820242762565613, -0.25141793489456177, 0.10102982819080353, -0.11797530949115753, -0.2557394206523895, 0.2239128053188324, 0.10838691890239716, -0.12834694981575012, -0.048987433314323425, 0.08111715316772461, 0.1294688731431961, 0.4218021333217621, 0.03177385777235031, -0.2574905753135681, -0.08358538150787354, -0.13443569839000702, -0.4091212749481201, 0.2767670452594757, 0.24516049027442932, 0.2131909281015396, -0.2955947816371918, -0.16371756792068481, 0.21937373280525208, -0.5752834677696228, 0.29838424921035767, -0.14189296960830688, 0.20433731377124786, 0.17898356914520264, -0.33651354908943176, 0.11850157380104065, -0.07308083772659302, 0.13830146193504333, 0.1229957863688469, -0.18102625012397766, 0.2307826727628708, -0.07752308994531631, -0.05081861838698387, 0.025660738348960876, -0.03548429161310196, 0.11081211268901825, -0.07373367249965668, 0.009948357939720154, 0.15763501822948456, 0.0028998740017414093, -0.21170803904533386, 0.15031640231609344, -0.19717475771903992, -0.013434640131890774, 0.02162076160311699, 0.29456302523612976, -0.15806634724140167, 0.32483339309692383, -0.03216932713985443, 0.09629477560520172, 0.046116672456264496, -0.16754275560379028, -0.11636263877153397, -0.1051342636346817, -0.05985747277736664, 0.1783372014760971, 0.28993332386016846, -0.23062744736671448, 0.24745148420333862, 0.09061584621667862, 0.21510536968708038, 0.023989155888557434, -0.11302056908607483, 0.14889568090438843, 0.03521141782402992, 0.013094708323478699, -0.05303988233208656, 0.1488320231437683, -0.01619807630777359, -0.04610442742705345, -0.11226917058229446, -0.14885249733924866, 0.10258561372756958, -0.09914444386959076, -0.40223267674446106, 0.33751380443573, 0.10656343400478363, -0.08167880028486252, 0.3401314318180084, 0.3973250687122345, 0.1810903549194336, -0.26076480746269226, 0.08631591498851776, 0.20446281135082245, -0.40285614132881165, -0.1337231993675232, 0.29882586002349854, 0.04281283915042877, -0.2501439154148102, -0.12954552471637726, -0.003745298134163022, 0.0662231594324112, -0.04455668479204178, 0.22062912583351135, 0.058841343969106674, 0.06576965749263763, -0.08018798381090164, 0.42269986867904663, 0.2906525135040283, -0.2918365001678467, -0.36106202006340027, 0.1677829772233963, -0.23687057197093964, 0.14163359999656677, 0.19835621118545532, -0.10596385598182678, 0.20487822592258453, -0.004846235737204552, 0.5065510869026184, 0.2191433161497116, -0.22162014245986938, 0.05962052196264267, -0.28879931569099426, -0.15315939486026764, 0.08183445781469345, 0.091718390583992, -0.13946086168289185, -0.06966576725244522, -0.15320155024528503, -0.110891193151474, 0.2634879946708679, -0.20501849055290222, 0.1799525022506714, 0.1328164041042328, 0.497813880443573, 0.11841070652008057, 0.10319498926401138, -0.20386502146720886, -0.18842056393623352, 0.010056063532829285, 0.005453832447528839, 0.31425485014915466, -0.08591675758361816, -0.5233687162399292, -0.2934356927871704, -0.30561116337776184, -0.12412808835506439, 0.010429618880152702, 0.30782225728034973, 0.2625296711921692, 0.025666017085313797, 0.020395979285240173, -0.24929089844226837, 0.12136939913034439, 0.011215316131711006, 0.07952730357646942, 0.023016484454274178, 0.0897836983203888, -0.24018831551074982, -0.16040600836277008, 0.22886264324188232, 0.34558072686195374, -0.1591661274433136, -0.06027297303080559, -0.05895065516233444, 0.304524302482605, -0.3686721622943878, 0.33526545763015747, -0.07823031395673752, 0.35699260234832764, 0.18490147590637207, -0.17017534375190735, 0.020104635506868362, 0.19424653053283691, 0.07412048429250717, -0.17606297135353088, 0.11428365111351013, 0.1050393134355545, 0.3372461199760437, -0.14759135246276855, 0.08756473660469055, -0.1600450873374939, 0.3091045618057251, 0.010209586471319199, -0.09800935536623001, -0.06314129382371902, -0.07624028623104095, -0.18100056052207947, 0.21614117920398712, -0.015531318262219429, -0.6039142608642578, 0.21933792531490326, 0.6066969633102417, -0.05026446282863617, 0.26645731925964355, 0.18905839323997498, -0.3052854537963867, 0.009106215089559555, 0.09645864367485046, -0.23719270527362823, 0.07765839993953705, 0.26823991537094116, 0.16865596175193787, 0.038563378155231476, -0.03255142271518707, -0.1328754425048828, 0.028776973485946655, -0.06176435947418213, -0.04823997989296913, 0.5199934244155884, 0.23964810371398926, 0.12906238436698914, -0.4704148769378662, -0.20760302245616913, -0.10374108701944351, 0.0820092111825943, -0.26976996660232544, -0.16348189115524292, -0.07283448427915573, -0.37107232213020325, -0.050854772329330444, -0.050670310854911804, -0.3408680856227875, -0.1255008578300476, 0.39608508348464966, 0.3298538029193878, 0.008716277778148651, 0.409694105386734, 0.05115405097603798, 0.15715312957763672, 0.06009835749864578, -0.1292622685432434, -0.07130011916160583, -0.08996128290891647, -0.16714635491371155, 0.2367100715637207, 0.14320266246795654, -0.19590505957603455, 0.23391450941562653, -0.005052480846643448, 0.12643516063690186, 0.03593580797314644, -0.4879772961139679, 0.18575161695480347, -0.4026752710342407, -0.2273769974708557, 0.005752526223659515, 0.000028617680072784424, 0.08938445150852203, -0.4461905360221863, 0.07067174464464188, -0.2756737470626831, -0.21094553172588348, -0.09130386263132095, -0.17451485991477966, 0.0008464496349915862, -0.300188273191452, -0.5085433721542358, -0.12444860488176346, -0.5271831750869751, 0.17929574847221375, -0.281921923160553, 0.11613169312477112, 0.2779880464076996, -0.16887672245502472, 0.10679075121879578, -0.25143903493881226, 0.44547075033187866, -0.3080193102359772, -0.22585070133209229, 0.22663390636444092, -0.19530628621578217, -0.30691787600517273, 0.03141453489661217, -0.1508219838142395, 0.5303359627723694, -0.015935445204377174, -0.08824101835489273, -0.17844939231872559, -0.02838064543902874, 0.2868051528930664, -0.031425781548023224, 0.06839486956596375, 0.23626206815242767, 0.2672898471355438, -0.2033076137304306, -0.16307294368743896, -0.13078641891479492, 0.02340826392173767, 0.1973065435886383, 0.07845763862133026, -0.014975324273109436, 0.1801186501979828, 0.13507907092571259, 0.8288178443908691, 0.060088399797677994, -0.24521182477474213, 0.27925795316696167, -0.2965867221355438, 0.24241113662719727, 0.012059658765792847, -0.231593519449234, 0.3489261567592621, 0.13632924854755402, 0.18739226460456848, 0.4802672863006592, 0.08529616892337799, -0.014055456966161728, -0.09350325167179108, 0.09539026021957397, -0.3411554992198944, -0.3090344965457916, 0.21234671771526337, -0.13604839146137238, 0.1384045034646988, 0.021422438323497772, 0.06572521477937698, -0.19595248997211456, -0.10944332182407379, 0.36814847588539124, 0.13098536431789398, -0.06330350786447525, -0.15359391272068024, 0.14432202279567719, -0.014917097985744476, -0.311148464679718, 0.043271541595458984, 0.2908509373664856, 0.16502073407173157, -0.30336645245552063, -0.15878784656524658, -0.20497216284275055, 0.2093771994113922, 0.2548341751098633, -0.20755362510681152, -0.17398710548877716, 0.16005274653434753, 0.24650248885154724, 0.0190082099288702, 0.27263951301574707, -0.09692473709583282, -0.116656094789505, 0.15923959016799927, 0.1634504497051239, -0.3500538468360901, -0.05767934024333954, -0.21007873117923737, 0.23656320571899414, -0.040483132004737854, 0.0786973312497139, -0.04890681430697441, -0.21199876070022583, -0.2692856788635254, -0.03033888339996338, 0.0934455394744873, -0.02162867784500122, -0.016563529148697853, -0.017462939023971558, 0.3813253939151764, -0.235531747341156, 0.41515517234802246, 0.3084322512149811, 0.009539035148918629, 0.28116655349731445, 0.25005316734313965, 0.11806368082761765, 0.22237753868103027, 0.023210860788822174, 0.311849445104599, 0.11292438209056854, -0.21612250804901123, -0.18791013956069946, -0.19739557802677155, 0.4451722502708435, 0.11900723725557327, 0.21692241728305817, 0.08251616358757019, -0.0761464536190033, 0.029180187731981277, -0.1812078207731247, 0.3324921429157257, 0.30719679594039917, 0.2214367389678955, -0.18135400116443634, -0.2902567684650421, 0.142640620470047, -0.006095741875469685, -0.17870789766311646, 0.3708268702030182, -0.011330738663673401, -0.3125833570957184, 0.12018340826034546, -0.38054510951042175, 1.0539366006851196, 0.10600563883781433, 0.17056326568126678, 0.3440309464931488, 0.17082667350769043, 0.2144339233636856, -0.4325200915336609, 0.14121535420417786, 0.062289174646139145, -0.21152925491333008, 0.057500869035720825, 0.16621632874011993, -0.18852385878562927, 0.03317020833492279, -0.363122820854187, 0.06026604399085045, 0.015908613801002502, 0.06024913862347603, 0.1308228224515915, 0.39938563108444214, -0.06641780585050583, -0.48733189702033997, -0.24968034029006958, 0.19656974077224731, -0.12725985050201416, 0.26015815138816833, 0.17860931158065796, -0.24985407292842865, -0.28136393427848816, -0.08410629630088806, -0.2218988835811615, 0.20950362086296082, -0.24998369812965393, -0.21657779812812805, -0.0586407445371151, 0.05421575903892517, 0.262861043214798, 0.02354738675057888, 0.26354366540908813, 0.1367248296737671, -0.2656133472919464, 0.16961199045181274, 0.20357662439346313, 0.14257538318634033, -0.03953712061047554, 0.10316146165132523, 0.48672235012054443, -0.26188668608665466, -0.1868194341659546, 0.14631107449531555, 0.0967751145362854, -0.008075002580881119, -0.3674495816230774, -0.37585288286209106, 0.06263865530490875, -0.2191755473613739, 0.38164806365966797, 0.23621904850006104, -0.07461346685886383, -0.12784379720687866, 0.24537059664726257, 0.18140950798988342, -0.3947039246559143, 0.012283064424991608, 0.129330575466156, 0.06214269995689392, -0.1587812751531601, 0.16833722591400146, 0.11270374804735184, -0.049609266221523285, 0.3067154884338379, 0.12754814326763153, -0.057534828782081604, -0.30171576142311096, -0.3166986107826233, 0.023554537445306778, -0.2233232855796814, -0.33518290519714355, 0.010589906945824623, -0.31369340419769287, -0.10528089851140976, 0.26681846380233765, 0.06110627204179764, 0.1855638325214386, 0.007017616182565689, -0.05538177862763405, -0.5129716992378235, 0.10316358506679535, 0.08678761124610901, 0.1530071347951889, -0.2143237590789795, 0.33227643370628357, 0.1086520105600357, 0.16538938879966736, -0.5192533135414124, -0.24624262750148773, 0.03329085558652878, 0.19248537719249725, 0.18423312902450562, -0.27023765444755554, 0.32704535126686096, -0.11535842716693878, 0.3327230215072632, 0.036193426698446274, -0.030536875128746033, -0.31458112597465515, -0.2067764848470688, 0.07174994796514511, 0.2016599178314209, -0.004105669446289539, 0.14886903762817383, 0.19700399041175842, -0.21910126507282257, -0.1433822065591812, 0.2331744134426117, 0.060771018266677856, -0.010069556534290314, 0.1859634965658188, 0.0054922401905059814, 0.08294177055358887, 0.236380472779274, -0.3351302444934845, 0.07736372202634811, 0.15779581665992737, 0.12530066072940826, -0.0204266756772995, -0.22572565078735352, -0.22163847088813782, 0.020990297198295593, 0.19401250779628754, 0.1762096881866455, -0.08129895478487015, 0.2119426429271698, -0.012676984071731567, -0.13161350786685944, 0.2430471032857895, 0.49362578988075256, 0.037207141518592834, -0.10534277558326721, -0.017730524763464928, 0.3020400404930115, 0.3756219744682312, -0.3024635314941406, 0.15578708052635193, 0.1194753348827362, -0.18147756159305573, 0.3449593782424927, 0.11649062484502792, -0.0015548132359981537, 0.12042003870010376, -0.04639314115047455, -0.026950551196932793, -0.05550542101264, -0.23702143132686615, 0.0296386256814003, 0.030387913808226585, -0.05365467816591263, 0.026065915822982788, 0.10193976014852524, -0.008862443268299103, 0.3165411651134491, 0.20173603296279907, -0.21977907419204712, 0.35012418031692505, 0.11471858620643616, -0.15322205424308777, 0.432158499956131, -0.05663246661424637, 0.015575399622321129, 0.0331125482916832, -0.06502500176429749, 0.2184813916683197, 0.08243520557880402, 0.5198341012001038, -0.181976780295372, -0.2765977382659912, 0.15746955573558807, 0.3043001890182495, -0.06080491095781326, -0.05194795876741409, -0.13808810710906982, -0.028653942048549652, -0.12118526548147202, -0.281014084815979, 0.21425949037075043, -0.03455669432878494, 0.13609714806079865, -0.022731952369213104, -0.1195058673620224, -0.09476016461849213, -0.20544356107711792, 0.09517967700958252, 0.570304811000824, -0.04886314645409584, 0.2297980636358261, 0.0943031758069992, -0.35981500148773193, 0.10324239730834961, 0.3485672175884247, 0.2855002284049988, -0.11418017745018005, -0.17025263607501984, 0.45187848806381226, -0.12363235652446747, -0.05184943228960037, -0.08539437502622604, 0.16822686791419983, 0.248292475938797, 0.03721624240279198, 0.0963401049375534, 0.23968273401260376, -0.288735032081604, -0.18794035911560059, 0.01634608581662178, 0.014205964282155037, -0.052394069731235504, 0.14530164003372192, -0.18795958161354065, -0.1568937748670578, -0.35509589314460754, -0.109355129301548, -0.5188397169113159, -0.12691578269004822, 0.4577682316303253, 0.09511266648769379, 0.14408984780311584, -0.352483332157135, 0.1503073126077652, 0.07764920592308044, 0.1650584191083908, 0.38416412472724915, 0.10569024831056595, 0.25536030530929565, 0.012490510940551758, -0.498258501291275, 0.27321889996528625, 0.17420686781406403, -0.0787290558218956, -0.308437317609787, -0.020290296524763107, 0.3806377053260803, 0.06946282088756561, 0.05835624784231186, -0.2635872960090637, -0.16060879826545715, -0.31069713830947876, -0.25412213802337646, -0.012029647827148438, -0.34385520219802856, 0.1505679339170456, 0.2203054577112198, -0.19606062769889832, 0.012534327805042267, -0.2732776403427124, 0.24780526757240295, -0.15335258841514587, 0.08552245795726776, -0.05753258988261223, -0.17119748890399933, 0.222947895526886, -0.046171337366104126, 0.27968764305114746, -0.33144330978393555, -0.2411099076271057, -0.007700737565755844, -0.14235848188400269, -0.308387815952301, 0.12256397306919098, 0.07038861513137817, 0.5162590742111206, 0.05529902130365372, -0.13878090679645538, -0.26119187474250793, 0.1268988698720932, 0.14181005954742432, -0.24113638699054718, -0.11241521686315536, 0.31348952651023865, -0.02180049940943718, 0.07893236726522446, 0.11398303508758545, 0.2645881772041321, -0.18105652928352356, -0.023557068780064583, -0.2825866937637329, -0.5902601480484009, 0.4051390588283539, -0.26498091220855713, -0.2718052566051483, -0.22904379665851593, 0.2613842189311981, 0.049172885715961456, 0.03271755948662758, -0.5370393395423889, 0.11342913657426834, 0.2650887370109558, 0.10484974086284637, -0.23215171694755554, 0.03501395136117935, -0.011358873918652534, -0.27136343717575073, -0.09939403831958771, 0.2948486804962158, 0.09603197872638702, -0.05318325757980347, 0.10733313858509064, -0.2708474099636078 ]
https://github.com/huggingface/datasets/issues/1840
Add common voice
I saw that this current datasets package holds common voice version 6.1, how to add the new version 7.0 that is already available?
## Adding a Dataset - **Name:** *common voice* - **Description:** *Mozilla Common Voice Dataset* - **Paper:** Homepage: https://voice.mozilla.org/en/datasets - **Data:** https://voice.mozilla.org/en/datasets - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/common_voice If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
23
Add common voice ## Adding a Dataset - **Name:** *common voice* - **Description:** *Mozilla Common Voice Dataset* - **Paper:** Homepage: https://voice.mozilla.org/en/datasets - **Data:** https://voice.mozilla.org/en/datasets - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/common_voice If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). I saw that this current datasets package holds common voice version 6.1, how to add the new version 7.0 that is already available?
[ -0.3583085536956787, -0.3505193591117859, -0.012085563503205776, -0.2336006909608841, -0.4511430263519287, 0.06780575960874557, -0.03324483707547188, 0.5403197407722473, -0.10086557269096375, 0.08199585974216461, -0.2226712852716446, 0.24644479155540466, -0.23897962272167206, 0.06251909583806992, -0.09577372670173645, -0.2583044767379761, 0.11434635519981384, 0.15225714445114136, 0.19452711939811707, -0.1707911491394043, -0.12377264350652695, 0.10815637558698654, -0.07173439860343933, -0.09809085726737976, -0.04893049970269203, -0.32998111844062805, -0.06955334544181824, -0.2347559928894043, -0.2684198021888733, -0.24283285439014435, 0.07875944674015045, 0.3951268196105957, 0.22163107991218567, 0.6137539148330688, -0.00011295994772808626, 0.03698430955410004, 0.2248372733592987, -0.005324263125658035, -0.031853847205638885, -0.4036148190498352, -0.3523940443992615, -0.03872210532426834, -0.4229104816913605, 0.27639302611351013, 0.03037150204181671, -0.2925678491592407, 0.07658635824918747, -0.23291774094104767, 0.29643434286117554, 0.43242356181144714, 0.19525204598903656, -0.006009836681187153, -0.002533789724111557, -0.03922642394900322, -0.05915949493646622, -0.048849061131477356, -0.26729944348335266, 0.10513290762901306, 0.29060250520706177, 0.12020087242126465, 0.08843764662742615, 0.3285418152809143, 0.059757836163043976, -0.22255662083625793, -0.09126760810613632, -0.033598970621824265, 0.12420958280563354, -0.3518329858779907, 0.18706431984901428, 0.5254446864128113, 0.8187978267669678, -0.17585578560829163, -0.5179089903831482, 0.052990227937698364, 0.22564910352230072, -0.5650976896286011, 0.06290643662214279, -0.2294742614030838, -0.0726037472486496, 0.12469194829463959, -0.032559216022491455, -0.43947431445121765, -0.31207892298698425, 0.28949660062789917, 0.05273369699716568, 0.4834749102592468, -0.05309993028640747, -0.03816015273332596, 0.1731904000043869, -0.19246307015419006, -0.035553302615880966, 0.2462063878774643, 0.015048811212182045, 0.16403622925281525, -0.1574244350194931, -0.3648064136505127, 0.0056745558977127075, -0.6697838306427002, 0.3093850910663605, -0.33635061979293823, 0.04196227714419365, 0.08213891088962555, -0.5721991062164307, -0.007450893521308899, -0.11853832006454468, 0.12495662271976471, 0.3058880567550659, -0.0965123176574707, 0.26506587862968445, 0.07359448075294495, 0.3321963846683502, 0.21076664328575134, -0.1237969696521759, -0.02602742239832878, -0.12239250540733337, 0.13299381732940674, 0.2573223114013672, -0.11871400475502014, 0.11725442856550217, 0.027893826365470886, -0.14671149849891663, -0.0580621138215065, -0.07317281514406204, 0.12694135308265686, -0.008019480854272842, 0.40833112597465515, -0.10585528612136841, 0.21865662932395935, -0.06728667765855789, -0.35192662477493286, -0.011365776881575584, 0.016277451068162918, 0.1375807374715805, 0.2443421632051468, 0.16023412346839905, -0.19817282259464264, 0.19900375604629517, 0.06392136961221695, -0.060733988881111145, 0.1218743622303009, -0.12495595961809158, 0.05993780121207237, -0.17111602425575256, 0.05885865166783333, -0.1557283252477646, 0.2951805889606476, -0.24372221529483795, 0.11949160695075989, -0.24728909134864807, 0.13941125571727753, -0.14573627710342407, -0.246507465839386, -0.6074967980384827, 0.15976151823997498, 0.18247170746326447, -0.2868497967720032, -0.16886118054389954, 0.5957244634628296, -0.02395770698785782, -0.32702961564064026, -0.11523289233446121, -0.01514611765742302, -0.626063346862793, -0.18053749203681946, 0.050384633243083954, 0.06093312054872513, -0.5975382328033447, -0.054412614554166794, -0.2836185395717621, 0.14836867153644562, -0.14693990349769592, 0.09735822677612305, 0.020584654062986374, -0.19880858063697815, -0.018889816477894783, 0.1360521912574768, 0.6023394465446472, -0.2568680942058563, -0.47224804759025574, -0.0051238201558589935, -0.126985564827919, 0.1606515496969223, 0.2540987730026245, 0.05558713153004646, 0.03552302345633507, 0.06247038394212723, 0.3193097710609436, 0.05693443864583969, -0.2086111307144165, -0.33242252469062805, -0.03703279420733452, -0.2771078050136566, 0.009892527014017105, -0.0205787792801857, 0.18342472612857819, -0.014875352382659912, 0.11888711154460907, -0.023406006395816803, 0.23416739702224731, -0.15183429419994354, 0.04202520102262497, 0.14125707745552063, 0.557767927646637, -0.05383870005607605, 0.1346655786037445, -0.131463885307312, -0.403155118227005, 0.30281421542167664, 0.1674475520849228, -0.016836948692798615, 0.00430779904127121, -0.30370235443115234, -0.25197821855545044, -0.19578109681606293, -0.02069644257426262, 0.10760357975959778, 0.10700608789920807, 0.29244720935821533, 0.08715058863162994, -0.14159893989562988, -0.2610588073730469, 0.2843593955039978, -0.03943982347846031, 0.013558382168412209, 0.027197526767849922, 0.17371654510498047, -0.22134409844875336, -0.16122595965862274, 0.008954238146543503, 0.23562359809875488, -0.009151369333267212, -0.13300453126430511, 0.06829442083835602, 0.2488458752632141, -0.37084493041038513, 0.2565927505493164, 0.08964662998914719, 0.2607082724571228, 0.2067420333623886, 0.02920202538371086, 0.19682063162326813, -0.07697150111198425, -0.2600274085998535, 0.18985897302627563, 0.2240017056465149, 0.10129976272583008, 0.5602583289146423, -0.21297946572303772, 0.027173839509487152, -0.14769724011421204, 0.2779565751552582, 0.2172681987285614, 0.056928180158138275, -0.11630602926015854, -0.15208987891674042, -0.06207798048853874, -0.12800873816013336, -0.18126222491264343, -0.43340936303138733, 0.20440110564231873, 0.6716207265853882, -0.23128871619701385, 0.12422782182693481, 0.020511426031589508, -0.16805920004844666, -0.0677414983510971, 0.14738871157169342, -0.1010412946343422, 0.018453985452651978, 0.21797943115234375, 0.1691267490386963, -0.01141352392733097, -0.2184937447309494, 0.0649028792977333, -0.0729965791106224, 0.042356137186288834, 0.06118326634168625, 0.2779960632324219, 0.09526180475950241, 0.18043643236160278, -0.262184202671051, -0.31754863262176514, 0.1097433790564537, 0.26800230145454407, 0.048368435353040695, -0.19980789721012115, -0.19680418074131012, -0.1461077630519867, -0.3705078065395355, 0.1207580715417862, -0.42754822969436646, 0.004588242620229721, 0.23913729190826416, 0.5503567457199097, 0.1884566694498062, 0.27617397904396057, -0.043256670236587524, 0.18654245138168335, 0.029672687873244286, 0.041182853281497955, 0.24114081263542175, 0.27663132548332214, -0.2519943416118622, 0.11425493657588959, -0.02849876880645752, -0.3570273816585541, 0.17560653388500214, -0.19564464688301086, 0.02543102204799652, -0.21571850776672363, -0.6510058045387268, 0.09925343841314316, -0.3668784499168396, -0.1459921896457672, -0.13943098485469818, -0.035244449973106384, 0.0020311586558818817, -0.27723029255867004, -0.14999587833881378, -0.32856833934783936, -0.20840664207935333, -0.16986654698848724, -0.39715322852134705, 0.1299884170293808, -0.025509461760520935, -0.7505225539207458, -0.29006749391555786, -0.48025739192962646, 0.10903210937976837, -0.2630935609340668, 0.23234833776950836, 0.38449400663375854, -0.109577476978302, 0.07570771872997284, -0.14242614805698395, 0.4647649824619293, -0.18097876012325287, -0.1663755476474762, 0.24615009129047394, -0.16054576635360718, -0.17856183648109436, 0.2599547207355499, -0.3179126977920532, 0.3131914436817169, 0.13046146929264069, -0.1283940225839615, -0.26607391238212585, -0.02006620354950428, 0.5114758014678955, 0.0006047748029232025, 0.039844758808612823, 0.5504136085510254, 0.1172465905547142, -0.10722893476486206, -0.1324882209300995, -0.1672573834657669, -0.17656302452087402, 0.6956040859222412, 0.237796813249588, 0.35875266790390015, 0.3140870928764343, 0.11873757839202881, 0.9821809530258179, 0.21940791606903076, -0.23508195579051971, 0.19277061522006989, -0.2220006138086319, 0.2543658912181854, 0.07626238465309143, -0.02925082854926586, 0.03167065978050232, 0.23978769779205322, 0.45311713218688965, 0.3293713629245758, 0.1253027319908142, -0.057023629546165466, 0.030022956430912018, -0.2789434492588043, -0.1678466796875, -0.18724945187568665, 0.0964115783572197, -0.14595650136470795, 0.297354131937027, -0.06064653769135475, -0.10181191563606262, -0.4669308066368103, -0.13775789737701416, 0.2631840109825134, 0.24775362014770508, -0.13802149891853333, 0.04581261798739433, 0.15671104192733765, 0.02480790577828884, -0.4083001911640167, 0.316378653049469, 0.4706089198589325, 0.49157261848449707, -0.21510915458202362, 0.05203934758901596, -0.25646263360977173, 0.2230735868215561, 0.32920438051223755, -0.43947634100914, -0.2642943859100342, 0.07166182994842529, 0.15075771510601044, 0.030975496396422386, 0.1457243412733078, 0.0032832585275173187, -0.029241109266877174, 0.09660524129867554, 0.2327852100133896, 0.18520274758338928, -0.18504394590854645, 0.1914799064397812, 0.3749416470527649, -0.019663706421852112, 0.02885323390364647, 0.004618018865585327, -0.10035409033298492, 0.021218949928879738, -0.14904305338859558, -0.15186645090579987, 0.11201602965593338, -0.18017947673797607, -0.06871303915977478, 0.41178759932518005, -0.4314250648021698, 0.1897062361240387, 0.04096921533346176, -0.022375239059329033, 0.5111886858940125, 0.11188317835330963, 0.2001846879720688, 0.07165887206792831, 0.23082339763641357, 0.1854013204574585, 0.10616405308246613, -0.34896379709243774, -0.19041898846626282, -0.08414970338344574, 0.29733943939208984, 0.030838273465633392, 0.043833885341882706, 0.1429186910390854, -0.009276846423745155, -0.1681525558233261, 0.1413666009902954, 0.27713993191719055, 0.4643081724643707, 0.22978806495666504, -0.5021705627441406, -0.265668123960495, 0.1411782205104828, 0.30365532636642456, -0.26186078786849976, 0.388718843460083, 0.1254696398973465, -0.18702614307403564, -0.2131691724061966, -0.560926616191864, 0.6293551325798035, 0.037741392850875854, 0.0887320339679718, 0.07925713807344437, 0.18047605454921722, 0.18347208201885223, -0.38730746507644653, 0.12989769876003265, 0.1437239646911621, -0.4156281650066376, -0.10591130703687668, 0.23297715187072754, 0.18169932067394257, -0.14169728755950928, -0.36674144864082336, 0.28888487815856934, 0.19607029855251312, 0.01349632814526558, 0.2655756175518036, 0.4241391718387604, -0.044275641441345215, -0.17394660413265228, 0.1847800612449646, 0.05840592086315155, -0.102511927485466, 0.2636818587779999, 0.07545948028564453, 0.02832287736237049, -0.1451651006937027, -0.3067413568496704, -0.2014683187007904, -0.03338497504591942, 0.2256588339805603, -0.1390066146850586, 0.08039388060569763, 0.07615578174591064, 0.5016495585441589, -0.05213087424635887, 0.4273707866668701, 0.01886604167521, -0.1719893515110016, -0.025552738457918167, 0.1763208508491516, 0.04588552191853523, -0.050147250294685364, -0.007155563682317734, 0.3579566478729248, -0.11987227201461792, -0.2628348767757416, 0.36783909797668457, 0.09656628221273422, -0.24559661746025085, -0.26796913146972656, -0.6048880219459534, 0.2475583851337433, 0.018127329647541046, 0.51270991563797, 0.25662195682525635, 0.010466385632753372, -0.17381472885608673, 0.14170442521572113, 0.21475699543952942, -0.4454762935638428, -0.1342450976371765, -0.03607982024550438, -0.1321217566728592, -0.042529720813035965, 0.26956304907798767, 0.35271650552749634, -0.07604219019412994, 0.42672842741012573, 0.08576031029224396, 0.11210274696350098, -0.11360738426446915, -0.3862939476966858, 0.18654444813728333, -0.10747654736042023, -0.2862561345100403, -0.04224947839975357, -0.23044176399707794, 0.004963933490216732, 0.5873570442199707, 0.03302767872810364, 0.19226109981536865, -0.051443759351968765, -0.05869641155004501, -0.4756229519844055, 0.20474499464035034, -0.16560041904449463, 0.27087166905403137, -0.018911732360720634, -0.04207397624850273, 0.14435282349586487, 0.055615589022636414, -0.2875516414642334, -0.16872034966945648, 0.2402944266796112, 0.34000205993652344, 0.28559911251068115, 0.06654274463653564, 0.2452695518732071, 0.03671674057841301, 0.16948148608207703, -0.2796679139137268, -0.17637071013450623, -0.11735641211271286, -0.21820801496505737, 0.0924270749092102, 0.08548853546380997, -0.024906741455197334, 0.1987406462430954, -0.19449955224990845, -0.16239748895168304, 0.12902283668518066, 0.36241862177848816, 0.14118796586990356, -0.03650723397731781, 0.3814910650253296, 0.13651104271411896, -0.07547346502542496, 0.1626163125038147, 0.1361052691936493, 0.12918074429035187, 0.21236580610275269, -0.05568636208772659, 0.46229615807533264, 0.023928167298436165, -0.1923166811466217, -0.21022386848926544, 0.18452447652816772, 0.062145281583070755, 0.006637789309024811, -0.004877306520938873, -0.1581098586320877, 0.06060970202088356, 0.2170119434595108, 0.3599591851234436, -0.11480353772640228, -0.0037810695357620716, 0.06952442973852158, 0.35195329785346985, 0.1709664762020111, -0.2653375566005707, 0.008235614746809006, 0.21503202617168427, -0.22032278776168823, 0.16528882086277008, 0.15411651134490967, 0.16604477167129517, 0.2801550328731537, 0.339968740940094, -0.10449772328138351, -0.3561900854110718, -0.08536451309919357, 0.45275944471359253, 0.22350099682807922, 0.06910331547260284, 0.04350012540817261, 0.3455895185470581, -0.02956639975309372, 0.022081851959228516, 0.04873988777399063, -0.41663485765457153, 0.09370395541191101, 0.13113227486610413, -0.12200212478637695, 0.5428832173347473, -0.24095910787582397, 0.13649190962314606, -0.005169510841369629, 0.03770671784877777, 0.14017900824546814, 0.259329617023468, 0.3651852011680603, 0.029696594923734665, -0.3178413510322571, -0.03169942647218704, 0.04117925092577934, -0.07270046323537827, -0.2188243418931961, -0.16089864075183868, -0.11274555325508118, -0.2638745903968811, -0.11880083382129669, 0.1272933930158615, -0.12458924949169159, 0.049246110022068024, 0.06662750244140625, -0.13190649449825287, -0.12099994719028473, -0.04001587629318237, 0.0074010007083415985, 0.06313207000494003, 0.04471741244196892, 0.4562150537967682, -0.20130257308483124, -0.403111070394516, 0.2506026327610016, 0.09200774133205414, 0.012100346386432648, -0.16168418526649475, 0.035666532814502716, 0.3616633713245392, 0.19970600306987762, -0.10763353109359741, 0.19102974236011505, 0.01623724028468132, 0.19586536288261414, 0.22175388038158417, 0.008649935945868492, 0.07718465477228165, -0.10015818476676941, -0.005889575928449631, -0.12064820528030396, 0.19128671288490295, -0.3143661618232727, 0.4425676167011261, -0.006685771048069, -0.05278592184185982, -0.19617751240730286, 0.12668974697589874, -0.3610303997993469, -0.03152089938521385, 0.5138074159622192, 0.01714996248483658, -0.09243062138557434, -0.2337612509727478, 0.06157545745372772, -0.08185699582099915, -0.11757272481918335, 0.3602066934108734, 0.06935487687587738, 0.2548956573009491, 0.016679510474205017, -0.2033275067806244, 0.3281611502170563, 0.08354055881500244, -0.07765287905931473, -0.21570207178592682, -0.1363975703716278, 0.17711250483989716, -0.07425642758607864, 0.2908805012702942, -0.5286784172058105, -0.10648951679468155, -0.14695490896701813, -0.11047720909118652, -0.21278752386569977, 0.10710397362709045, 0.2547725737094879, 0.07986365258693695, -0.16438129544258118, -0.035246994346380234, -0.25869500637054443, 0.02640380710363388, -0.08553360402584076, 0.041185736656188965, 0.005764879286289215, -0.4895680248737335, 0.33347266912460327, -0.17112122476100922, 0.3226028382778168, -0.23469403386116028, -0.18131645023822784, -0.38215166330337524, -0.08578749746084213, -0.32709982991218567, 0.0923277735710144, -0.06243975833058357, 0.8024917840957642, -0.29747098684310913, 0.3298361599445343, -0.1382867693901062, 0.08563075214624405, -0.12128627300262451, -0.20744410157203674, -0.18340431153774261, 0.4728720784187317, -0.248994380235672, -0.04473274201154709, 0.3070923686027527, 0.07821983098983765, -0.023109450936317444, -0.051490046083927155, -0.15278717875480652, -0.20347461104393005, 0.30449652671813965, -0.272500216960907, -0.18908077478408813, -0.55991131067276, 0.18862484395503998, 0.08914019912481308, -0.08100777864456177, -0.39930662512779236, 0.19367903470993042, 0.28401556611061096, 0.03471292927861214, -0.01791725680232048, 0.18368637561798096, 0.12552978098392487, -0.21818633377552032, -0.04747084900736809, 0.4153708219528198, 0.049479514360427856, -0.12164727598428726, 0.04706733301281929, -0.2941110134124756 ]
https://github.com/huggingface/datasets/issues/1840
Add common voice
Common voice still appears to be a 6.1. Is the plan still to upgrade to 7.0?
## Adding a Dataset - **Name:** *common voice* - **Description:** *Mozilla Common Voice Dataset* - **Paper:** Homepage: https://voice.mozilla.org/en/datasets - **Data:** https://voice.mozilla.org/en/datasets - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/common_voice If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
16
Add common voice ## Adding a Dataset - **Name:** *common voice* - **Description:** *Mozilla Common Voice Dataset* - **Paper:** Homepage: https://voice.mozilla.org/en/datasets - **Data:** https://voice.mozilla.org/en/datasets - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/common_voice If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Common voice still appears to be a 6.1. Is the plan still to upgrade to 7.0?
[ -0.2122885137796402, -0.3657418489456177, -0.06681407988071442, -0.2508973479270935, -0.1655757874250412, -0.14418208599090576, 0.20839086174964905, 0.5740474462509155, -0.16342295706272125, 0.18665501475334167, -0.12672364711761475, 0.1299785077571869, -0.22137947380542755, -0.054073892533779144, -0.16524745523929596, -0.17251577973365784, 0.18746063113212585, 0.09233855456113815, 0.22414027154445648, -0.2989586591720581, -0.09334687143564224, 0.19908328354358673, -0.17873814702033997, -0.11587081849575043, -0.18606269359588623, -0.10556020587682724, -0.15260066092014313, -0.24196219444274902, -0.22031547129154205, -0.11308204382658005, 0.04438811540603638, 0.46907395124435425, 0.0795973539352417, 0.5579513907432556, -0.00010465351806487888, -0.184518963098526, 0.24185512959957123, 0.016831455752253532, -0.07247747480869293, -0.26485341787338257, -0.2515436112880707, 0.13193444907665253, -0.33412641286849976, 0.344490647315979, -0.04814567789435387, -0.057908665388822556, 0.10701309889554977, -0.19679735600948334, 0.23415228724479675, 0.368835985660553, 0.2583068907260895, -0.013643334619700909, 0.014282364398241043, 0.10993915796279907, -0.007754459977149963, 0.10644246637821198, -0.4248713254928589, 0.08659893274307251, 0.44124239683151245, -0.1369134783744812, -0.05640333145856857, 0.4784083962440491, 0.12746572494506836, -0.27713069319725037, -0.06901078671216965, -0.0170733705163002, 0.10576948523521423, -0.5599303245544434, 0.16290831565856934, 0.46514803171157837, 0.6900518536567688, 0.017551081255078316, -0.3366566598415375, -0.03674039989709854, 0.10485950112342834, -0.36439967155456543, 0.06822782754898071, -0.14921113848686218, -0.21666018664836884, 0.14624367654323578, -0.054746437817811966, -0.36756283044815063, -0.17661581933498383, 0.28779733180999756, -0.06189119070768356, 0.5196652412414551, -0.0716792643070221, -0.10533689707517624, 0.1286565661430359, -0.049994103610515594, -0.20747090876102448, 0.30253124237060547, 0.07124440371990204, 0.23483292758464813, -0.28997597098350525, -0.3146696090698242, 0.19622734189033508, -0.5680252909660339, 0.21168509125709534, -0.3232824206352234, 0.022609425708651543, 0.11949368566274643, -0.469870388507843, -0.011624276638031006, 0.10913300514221191, 0.1773582547903061, 0.2233208417892456, -0.2645959258079529, 0.3360675573348999, 0.010087473317980766, 0.27744361758232117, 0.25307169556617737, -0.17181406915187836, 0.08885668963193893, -0.15418069064617157, -0.0473020076751709, 0.26380640268325806, 0.00932956114411354, 0.033314675092697144, 0.18029379844665527, -0.09911590814590454, -0.0583956204354763, -0.10351446270942688, 0.02108103409409523, 0.01986689865589142, 0.5997174382209778, -0.0690639317035675, 0.15717890858650208, 0.05276408791542053, -0.2874734103679657, -0.12161998450756073, -0.10655193030834198, -0.15320397913455963, 0.12629762291908264, 0.1578855663537979, -0.12467579543590546, -0.0262160561978817, 0.005219067446887493, 0.14140290021896362, 0.04674079269170761, -0.17927026748657227, 0.11191776394844055, -0.08017133921384811, 0.13505280017852783, -0.4101983904838562, 0.2198101282119751, -0.05290147289633751, 0.24631701409816742, -0.14186793565750122, 0.051271114498376846, -0.05461425334215164, -0.15612494945526123, -0.43188607692718506, 0.2339618057012558, 0.17588666081428528, -0.22637182474136353, 0.044180240482091904, 0.6501262187957764, 0.11301195621490479, -0.2118237167596817, 0.009684845805168152, -0.0361018180847168, -0.5290248990058899, -0.0632704570889473, 0.005948297679424286, -0.12613360583782196, -0.3892018496990204, 0.06390176713466644, -0.15355707705020905, 0.15593521296977997, -0.08211272209882736, 0.20574234426021576, 0.09859104454517365, -0.2858925461769104, 0.004429733380675316, 0.31218260526657104, 0.5102222561836243, -0.24257977306842804, -0.38820669054985046, 0.10965139418840408, -0.148075133562088, 0.0206191036850214, 0.1453527808189392, -0.07192174345254898, 0.06996482610702515, -0.043802544474601746, 0.3958626091480255, -0.040857311338186264, -0.26688700914382935, -0.06665417551994324, -0.2463740110397339, -0.38279974460601807, -0.031132712960243225, 0.0005525369197130203, 0.1112615168094635, -0.04454178363084793, -0.056850023567676544, -0.1794106364250183, 0.2555510103702545, -0.12596824765205383, 0.13457804918289185, -0.036795154213905334, 0.6218761801719666, -0.09168048202991486, 0.11459695547819138, -0.07543566823005676, -0.20258566737174988, 0.11282461136579514, 0.25717493891716003, 0.20609046518802643, 0.24566414952278137, -0.35471630096435547, -0.08568637818098068, -0.2127419114112854, -0.036035630851984024, 0.05451561510562897, 0.19683371484279633, 0.11362642049789429, -0.027852239087224007, -0.11058385670185089, -0.5458107590675354, 0.27143386006355286, -0.009506115689873695, -0.09642797708511353, 0.1014898419380188, 0.2550773024559021, -0.21999484300613403, -0.2209792584180832, 0.09499149024486542, 0.23147329688072205, -0.170289546251297, -0.13738566637039185, 0.057725246995687485, 0.15496376156806946, -0.31154578924179077, 0.2170802801847458, -0.0071196891367435455, 0.3339134156703949, 0.1734924465417862, 0.0640391856431961, 0.16539864242076874, -0.031597238034009933, -0.1488146334886551, 0.037305787205696106, 0.23351767659187317, 0.13704566657543182, 0.6064643263816833, -0.19164913892745972, 0.08161577582359314, -0.029790282249450684, 0.14494070410728455, 0.2400352656841278, -0.041971199214458466, -0.05045637488365173, -0.12567739188671112, -0.216037318110466, -0.08400905877351761, -0.07937217503786087, -0.5027113556861877, 0.2676646113395691, 0.8282563090324402, -0.1747686117887497, 0.2108539342880249, 0.19661566615104675, -0.038681261241436005, -0.23923054337501526, 0.09081592410802841, -0.23614312708377838, 0.06969781219959259, 0.196733757853508, 0.19014976918697357, 0.05645967274904251, 0.004126912914216518, -0.0012245364487171173, -0.09128513187170029, 0.052046049386262894, 0.052914924919605255, 0.26200777292251587, 0.14113475382328033, 0.20899270474910736, -0.4558650851249695, -0.2906169593334198, 0.013112913817167282, 0.09217937290668488, -0.001077011227607727, -0.14422772824764252, -0.02703097276389599, -0.06785450875759125, -0.05127653479576111, 0.02621295303106308, -0.5136851072311401, -0.28458917140960693, 0.30978143215179443, 0.5721811056137085, 0.25748324394226074, 0.2921495735645294, -0.1729963719844818, 0.3641635775566101, 0.05751994997262955, 0.09920437633991241, -0.06133122369647026, 0.13488894701004028, -0.21796587109565735, 0.19079606235027313, 0.05044994130730629, -0.5909534692764282, 0.12632215023040771, -0.07826565951108932, -0.0013552075251936913, -0.06877901405096054, -0.5928505659103394, 0.19514943659305573, -0.4950180649757385, -0.3941294550895691, -0.1676771640777588, -0.07912573218345642, -0.0606999397277832, -0.16113683581352234, -0.13438363373279572, -0.2869054079055786, -0.3333820700645447, -0.060204606503248215, -0.1703653484582901, 0.02176743559539318, -0.11304029822349548, -0.6377632021903992, -0.10404322296380997, -0.49155041575431824, 0.19896212220191956, -0.3888785243034363, 0.10016541182994843, 0.4282775819301605, -0.17603141069412231, 0.04074997082352638, -0.3048018217086792, 0.36504846811294556, -0.2575838565826416, -0.18727925419807434, 0.06093674525618553, -0.010175079107284546, -0.27478843927383423, 0.10282059013843536, -0.15146620571613312, 0.37562066316604614, 0.03503967076539993, -0.19886691868305206, -0.25736144185066223, 0.01838713325560093, 0.4275103211402893, 0.07335325330495834, -0.1540134698152542, 0.506941556930542, 0.16038642823696136, -0.21836568415164948, 0.061803869903087616, -0.04134649038314819, -0.10629022866487503, 0.7294498682022095, 0.15377715229988098, 0.18105489015579224, 0.1310875564813614, 0.21273458003997803, 1.0733977556228638, 0.20272532105445862, -0.17909587919712067, 0.14677231013774872, -0.04291069507598877, 0.2066023349761963, -0.055512912571430206, -0.12315020710229874, 0.36716151237487793, 0.15336200594902039, 0.2947378158569336, 0.38775235414505005, 0.05019230395555496, -0.17074008285999298, -0.026943737640976906, -0.025816649198532104, -0.08125506341457367, -0.22118829190731049, 0.05860525369644165, -0.22657060623168945, 0.1759943813085556, -0.0157802514731884, 0.051242269575595856, -0.2151123434305191, -0.11197665333747864, 0.20008674263954163, 0.2930997610092163, -0.08383991569280624, -0.17665091156959534, 0.2405577152967453, 0.17480602860450745, -0.5188964605331421, 0.21941696107387543, 0.26724973320961, 0.4464293122291565, -0.3007412850856781, -0.12696705758571625, -0.1271946132183075, 0.0846460685133934, 0.36361393332481384, -0.30841973423957825, -0.36486661434173584, 0.21037574112415314, 0.15753452479839325, 0.1445978581905365, 0.15691828727722168, 0.04238070175051689, -0.0706801488995552, 0.15969358384609222, 0.1649947464466095, 0.19053524732589722, -0.35181066393852234, 0.17578214406967163, 0.17127948999404907, 0.07607424259185791, 0.058769870549440384, -0.12356023490428925, 0.05220124125480652, 0.11218206584453583, -0.03996411710977554, 0.00962265394628048, -0.033198948949575424, -0.2598206698894501, -0.11859779059886932, 0.4204235374927521, -0.5141311287879944, 0.2633816599845886, 0.15359994769096375, -0.30471572279930115, 0.19167467951774597, 0.06533779203891754, 0.20984047651290894, 0.029355447739362717, 0.09607373178005219, 0.10258737951517105, 0.19959405064582825, -0.31015828251838684, 0.001184934750199318, -0.10472860932350159, 0.3541969358921051, 0.17290347814559937, 0.0792701318860054, -0.04237215965986252, -0.0449196919798851, -0.01822838932275772, -0.04884359985589981, 0.17214752733707428, 0.6034420728683472, 0.20900647342205048, -0.4254570007324219, -0.11612297594547272, 0.1620458960533142, 0.05850888416171074, -0.24886956810951233, 0.531158447265625, 0.11043739318847656, -0.15447695553302765, -0.1942373365163803, -0.47667747735977173, 0.8916528820991516, 0.06036641076207161, 0.18880406022071838, 0.25792428851127625, 0.29701948165893555, 0.05749063566327095, -0.44091296195983887, 0.3093138337135315, 0.08009734749794006, -0.25556498765945435, -0.10346761345863342, 0.2483193278312683, -0.027018480002880096, -0.15358130633831024, -0.31995704770088196, 0.20826399326324463, 0.14550773799419403, 0.027195580303668976, 0.23846480250358582, 0.3351297974586487, -0.10773082822561264, -0.19690477848052979, 0.054542794823646545, 0.1582825928926468, -0.0691457986831665, 0.3690986931324005, 0.15328064560890198, -0.04753569886088371, -0.1541237235069275, -0.21845054626464844, -0.23609495162963867, 0.14248457551002502, 0.15266041457653046, -0.14717373251914978, 0.08105318248271942, 0.11080478131771088, 0.3751990795135498, 0.008407305926084518, 0.3044359087944031, -0.05225757881999016, -0.1781831830739975, -0.0391555093228817, 0.2222336232662201, 0.12407148629426956, 0.01578434370458126, -0.0009410688653588295, 0.462365061044693, -0.227014422416687, -0.17729687690734863, 0.24970710277557373, 0.10316437482833862, -0.1508389711380005, -0.4084336459636688, -0.3474787473678589, 0.25707128643989563, -0.05481532961130142, 0.57147216796875, 0.3547747731208801, -0.12414908409118652, -0.10156339406967163, 0.2131149023771286, 0.2059570699930191, -0.33608463406562805, -0.061591558158397675, 0.08257186412811279, -0.08730383962392807, -0.10569296777248383, 0.37179678678512573, 0.24158886075019836, -0.20664483308792114, 0.26488304138183594, 0.053064849227666855, -0.053003765642642975, -0.3350025415420532, -0.21019360423088074, 0.16030293703079224, -0.0798424780368805, -0.24097703397274017, -0.10411051660776138, -0.2846311330795288, 0.018335875123739243, 0.49768492579460144, -0.11357857286930084, 0.07810483127832413, -0.24862422049045563, -0.042866237461566925, -0.5209844708442688, 0.1402900069952011, -0.2286863476037979, 0.18401958048343658, -0.1554434597492218, -0.08999966084957123, 0.2965925633907318, -0.01632692478597164, -0.4206622242927551, -0.27553269267082214, 0.21431498229503632, 0.1395498514175415, 0.29352375864982605, -0.25822052359580994, 0.3358680009841919, -0.038778044283390045, 0.2866651713848114, -0.2877131700515747, -0.2586767077445984, -0.265586256980896, -0.16490565240383148, 0.06933308392763138, 0.23066836595535278, 0.08135373890399933, 0.27600187063217163, -0.07734093815088272, -0.40558886528015137, 0.0382503904402256, 0.26629388332366943, 0.10882041603326797, -0.027696289122104645, 0.25544217228889465, 0.09037584811449051, 0.05242225155234337, 0.4475446939468384, -0.0658341646194458, 0.1555253267288208, 0.2610046863555908, -0.03226109594106674, 0.25504177808761597, 0.14237351715564728, -0.2384156882762909, -0.19112905859947205, 0.23098719120025635, -0.0761185884475708, -0.1389559805393219, 0.08506397157907486, -0.11656929552555084, -0.023299187421798706, 0.02460392378270626, 0.39449542760849, 0.01853341981768608, -0.024694053456187248, -0.19457103312015533, 0.25530773401260376, 0.26478075981140137, -0.12749642133712769, 0.054146405309438705, 0.10512815415859222, 0.08332559466362, 0.10377734899520874, 0.10529565066099167, 0.05259643867611885, 0.15440958738327026, 0.3211798667907715, -0.12728893756866455, -0.2882331907749176, -0.1445201188325882, 0.30539315938949585, 0.1089232936501503, -0.0357503667473793, 0.10091474652290344, 0.3564196825027466, -0.09451721608638763, 0.06279259920120239, 0.15149638056755066, -0.3377136290073395, 0.25573697686195374, 0.19201815128326416, 0.04709291458129883, 0.5530755519866943, 0.00023346394300460815, 0.0518183559179306, -0.015354886651039124, -0.059796154499053955, 0.13343314826488495, 0.1336313635110855, 0.3646908104419708, -0.17020125687122345, -0.19287368655204773, -0.1590518355369568, 0.11811496317386627, -0.1354195475578308, -0.11311677098274231, -0.13943907618522644, 0.010877169668674469, -0.19855155050754547, -0.18047067523002625, 0.03840205818414688, 0.013937525451183319, 0.18952946364879608, 0.12653528153896332, -0.09058800339698792, -0.03303354233503342, 0.0045812055468559265, -0.1359708607196808, 0.4640379250049591, 0.093849778175354, 0.4167957901954651, -0.20726148784160614, -0.25461652874946594, 0.15612125396728516, 0.17376387119293213, 0.10219910740852356, 0.05195433646440506, -0.21841973066329956, 0.20927856862545013, 0.0696602314710617, -0.16500651836395264, 0.03135179728269577, 0.12865766882896423, 0.2578628361225128, 0.3094146251678467, -0.001353391446173191, 0.17867031693458557, -0.12272170931100845, 0.10269375145435333, -0.10694277286529541, 0.14093658328056335, -0.26224684715270996, 0.43468573689460754, -0.143554225564003, -0.1678667664527893, -0.19900964200496674, 0.11171658337116241, -0.3643396496772766, -0.08252217620611191, 0.48291951417922974, -0.05451420694589615, -0.009881049394607544, -0.33098897337913513, 0.11416251957416534, -0.010238610208034515, 0.027320822700858116, 0.30977877974510193, 0.02913060411810875, 0.24941386282444, 0.050477415323257446, -0.09224916994571686, 0.2779686748981476, 0.2655610740184784, 0.08545103669166565, -0.33780720829963684, -0.026662051677703857, 0.22922828793525696, 0.0992577001452446, 0.13367792963981628, -0.5254479646682739, -0.28677862882614136, -0.16405639052391052, -0.16666598618030548, 0.06136675551533699, -0.074323371052742, 0.26789382100105286, 0.10908502340316772, -0.19331207871437073, 0.11748693138360977, -0.339767724275589, 0.07034708559513092, -0.1027732640504837, 0.043611228466033936, 0.034273892641067505, -0.18730205297470093, 0.20573094487190247, -0.03295676410198212, 0.2282402664422989, -0.11447477340698242, -0.3602149486541748, -0.3265962302684784, -0.130049929022789, -0.2774856388568878, 0.033302728086709976, -0.0959026962518692, 0.5835565328598022, -0.22337208688259125, 0.11581413447856903, -0.17974436283111572, 0.04916626214981079, 0.013908479362726212, -0.08172575384378433, -0.1151350736618042, 0.31224524974823, 0.01395726203918457, 0.04874716326594353, 0.3081989884376526, 0.08593620359897614, -0.13857069611549377, -0.1845017373561859, -0.23456335067749023, -0.22050052881240845, 0.19701579213142395, -0.27466943860054016, -0.25412362813949585, -0.5165646076202393, 0.15041707456111908, 0.10371056944131851, -0.12721578776836395, -0.4456747770309448, 0.074826680123806, 0.24229887127876282, 0.050120435655117035, -0.1877453625202179, 0.03566696122288704, 0.10245363414287567, -0.331731379032135, -0.15218240022659302, 0.24907566606998444, -0.007565438747406006, -0.0194968543946743, 0.06407354772090912, -0.25117284059524536 ]
https://github.com/huggingface/datasets/issues/1840
Add common voice
We actually already have the code and everything ready to add Common Voice 7.0 to `datasets` but are still waiting for the common voice authors to give us the green light :-) Also gently pinging @phirework and @milupo here
## Adding a Dataset - **Name:** *common voice* - **Description:** *Mozilla Common Voice Dataset* - **Paper:** Homepage: https://voice.mozilla.org/en/datasets - **Data:** https://voice.mozilla.org/en/datasets - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/common_voice If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
39
Add common voice ## Adding a Dataset - **Name:** *common voice* - **Description:** *Mozilla Common Voice Dataset* - **Paper:** Homepage: https://voice.mozilla.org/en/datasets - **Data:** https://voice.mozilla.org/en/datasets - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/common_voice If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). We actually already have the code and everything ready to add Common Voice 7.0 to `datasets` but are still waiting for the common voice authors to give us the green light :-) Also gently pinging @phirework and @milupo here
[ -0.29971563816070557, -0.30469417572021484, -0.05582562834024429, -0.25547146797180176, -0.045264601707458496, -0.12001187354326248, 0.3751794695854187, 0.41504204273223877, -0.1786259114742279, 0.2442779541015625, -0.24192845821380615, 0.24217142164707184, -0.16800722479820251, 0.04018191993236542, -0.11211676895618439, -0.20511677861213684, -0.10206670314073563, 0.18604224920272827, 0.13009300827980042, -0.12976475059986115, 0.12364055216312408, 0.0410161092877388, -0.0580400750041008, -0.05567431449890137, -0.10850910097360611, -0.15883706510066986, 0.1077602356672287, -0.14565205574035645, -0.10250132530927658, -0.09758882969617844, -0.11307153850793839, 0.3124794363975525, -0.09298228472471237, 0.520568311214447, -0.00009792888886295259, 0.003148026764392853, 0.18074053525924683, -0.11110106110572815, -0.12104067206382751, -0.09848681092262268, -0.16494129598140717, 0.16444890201091766, -0.3461677134037018, 0.1795710027217865, -0.22466334700584412, -0.19761432707309723, 0.026805510744452477, -0.17866598069667816, 0.35095810890197754, 0.3816344141960144, 0.32051563262939453, 0.15162308514118195, -0.14920581877231598, 0.07685902714729309, 0.06511501222848892, 0.09580705314874649, -0.338346004486084, 0.02037382498383522, 0.3209688365459442, -0.11463498324155807, -0.15395501255989075, 0.5010685920715332, 0.07600504159927368, -0.20199592411518097, -0.13281524181365967, -0.05365414172410965, -0.036677174270153046, -0.36593297123908997, 0.06549695879220963, 0.4969235360622406, 0.5530772805213928, -0.30234989523887634, -0.2377183735370636, -0.18838909268379211, 0.04881243407726288, -0.3551270067691803, 0.06504032015800476, -0.13471941649913788, -0.24257634580135345, 0.2061186581850052, -0.009325874038040638, -0.12701644003391266, -0.11863337457180023, 0.1061888337135315, 0.034737780690193176, 0.3404384255409241, -0.07590606808662415, -0.29280948638916016, 0.05242222175002098, -0.20725081861019135, -0.1913805454969406, 0.24252104759216309, 0.16957451403141022, 0.04882218316197395, -0.3529064953327179, -0.2758616507053375, 0.18326367437839508, -0.5263786911964417, 0.2768949568271637, -0.2328687459230423, 0.18484985828399658, 0.22925570607185364, -0.3539295494556427, 0.13824330270290375, -0.027669407427310944, 0.17283879220485687, 0.16787657141685486, -0.21097642183303833, 0.3850749731063843, -0.0074311052449047565, 0.10759207606315613, 0.12587982416152954, -0.020157262682914734, 0.0655277743935585, -0.15226586163043976, 0.03931620717048645, 0.09100000560283661, 0.006469372659921646, -0.18004059791564941, 0.06899482011795044, -0.09674723446369171, 0.08963319659233093, 0.08712084591388702, 0.18071144819259644, -0.015254064463078976, 0.41396400332450867, -0.05600115656852722, 0.19995348155498505, -0.0940193459391594, -0.42088449001312256, -0.11627733707427979, -0.0923728495836258, -0.08429558575153351, 0.2084311842918396, 0.2386605590581894, 0.08565886318683624, 0.15221847593784332, -0.0014708815142512321, 0.16796794533729553, 0.1334126889705658, -0.0063278554007411, 0.17196598649024963, -0.09477739781141281, -0.012933444231748581, -0.03203297406435013, 0.07560864835977554, -0.04805353656411171, 0.042748935520648956, -0.10801272094249725, -0.07612635940313339, 0.059769406914711, -0.168854221701622, -0.4016614854335785, 0.3549239933490753, 0.1731766164302826, -0.17242206633090973, 0.08699679374694824, 0.5263698697090149, 0.10767710953950882, -0.24158543348312378, 0.0923309177160263, 0.055001527070999146, -0.43218082189559937, -0.00778328999876976, 0.12473971396684647, 0.05896303057670593, -0.34267520904541016, -0.045768991112709045, -0.1860966980457306, 0.10896854102611542, -0.04271271079778671, 0.2602837085723877, -0.013140417635440826, -0.06333992630243301, -0.0410635843873024, 0.4589950442314148, 0.40438783168792725, -0.254679411649704, -0.3047834038734436, 0.10484865307807922, -0.2691968083381653, 0.12864361703395844, 0.1881866753101349, -0.06910301744937897, 0.16707682609558105, 0.011652737855911255, 0.41610077023506165, 0.22150400280952454, -0.18788428604602814, 0.11074983328580856, -0.2233036607503891, -0.2984906733036041, -0.040143467485904694, 0.21411025524139404, -0.026151347905397415, -0.0684124156832695, -0.07669941335916519, -0.10779319703578949, 0.22017809748649597, -0.34818071126937866, 0.16689690947532654, 0.06851579248905182, 0.4814201891422272, -0.016604416072368622, 0.05293499678373337, -0.2091062366962433, -0.049738503992557526, -0.010223452001810074, 0.17246955633163452, 0.22772346436977386, 0.007538028061389923, -0.47984665632247925, -0.1500716507434845, -0.28002479672431946, -0.028648603707551956, 0.1312408149242401, 0.35755324363708496, 0.24160532653331757, -0.08285161852836609, -0.012553399428725243, -0.23704087734222412, 0.23435823619365692, -0.1382075399160385, -0.08847542107105255, 0.06717444211244583, 0.0797986090183258, -0.23923693597316742, -0.20550639927387238, 0.14063087105751038, 0.1957278847694397, -0.2576424181461334, -0.04807526245713234, 0.03039432130753994, 0.24336948990821838, -0.36237603425979614, 0.2844462990760803, -0.022163420915603638, 0.41258111596107483, 0.18626275658607483, -0.15956349670886993, 0.08443762362003326, 0.10952755808830261, -0.08406418561935425, 0.016176924109458923, 0.2523657977581024, 0.1908128261566162, 0.5376531481742859, -0.2533795237541199, 0.13193100690841675, -0.10342147201299667, 0.26279178261756897, -0.04261259734630585, -0.12287511676549911, -0.015888329595327377, -0.031114112585783005, -0.1692356914281845, -0.05824067071080208, -0.1665896475315094, -0.5551193952560425, 0.23947018384933472, 0.725070595741272, -0.11009588837623596, 0.3890182673931122, 0.10894858092069626, -0.2504044473171234, -0.07978536188602448, 0.08651004731655121, -0.2661173343658447, 0.07594193518161774, 0.3093785345554352, 0.15345485508441925, -0.04171321541070938, -0.06537114083766937, -0.07876525819301605, 0.041186898946762085, 0.0013620555400848389, -0.13187015056610107, 0.4382007122039795, 0.2491365671157837, -0.015312074683606625, -0.5578550696372986, -0.25284868478775024, -0.02871086448431015, 0.0409274622797966, -0.1772174835205078, -0.08160554617643356, -0.15436945855617523, -0.2630944550037384, 0.025518428534269333, 0.19560225307941437, -0.1673731803894043, -0.07861752808094025, 0.48465484380722046, 0.5129979252815247, -0.035092271864414215, 0.3236542344093323, -0.028258055448532104, 0.37849515676498413, 0.1235511302947998, 0.02769840694963932, 0.012827478349208832, -0.07802915573120117, -0.1555374264717102, 0.277936190366745, 0.1266656368970871, -0.3119521141052246, 0.23518143594264984, -0.0020888857543468475, 0.06213869899511337, -0.04433325678110123, -0.44502732157707214, 0.2288290560245514, -0.3427721858024597, -0.2699197828769684, -0.13954757153987885, -0.029059916734695435, 0.013345003128051758, -0.3807518780231476, -0.06179534271359444, -0.23167255520820618, -0.27837035059928894, -0.0046560876071453094, -0.1626800298690796, 0.015925318002700806, -0.29220712184906006, -0.4726036489009857, -0.11958801001310349, -0.6256841421127319, 0.13067969679832458, -0.35995912551879883, 0.05591832473874092, 0.3191875219345093, -0.19269859790802002, 0.084361232817173, -0.1834624856710434, 0.4459070563316345, -0.28444579243659973, -0.1573082059621811, 0.21229276061058044, -0.2217807173728943, -0.31739577651023865, -0.13776808977127075, -0.175235316157341, 0.294068843126297, 0.0024017938412725925, -0.15332062542438507, -0.28172460198402405, -0.04795559495687485, 0.3374904990196228, 0.05573923885822296, -0.07586055994033813, 0.2566204369068146, 0.23968803882598877, -0.2303999364376068, -0.11628121882677078, -0.06565791368484497, 0.018641546368598938, 0.434855580329895, 0.034120626747608185, 0.09006442129611969, 0.09456117451190948, 0.09004093706607819, 0.8501757979393005, 0.05129582807421684, -0.20680375397205353, 0.23886175453662872, -0.15805384516716003, 0.16912686824798584, -0.02070213109254837, -0.07976125180721283, 0.30669376254081726, 0.16924017667770386, 0.28575700521469116, 0.5571874380111694, -0.0030329320579767227, -0.2407967895269394, 0.04774171859025955, -0.038721781224012375, -0.20875173807144165, -0.27245813608169556, 0.09859276562929153, -0.14720787107944489, 0.11653280258178711, -0.07868674397468567, -0.004689380526542664, -0.20306062698364258, -0.05897756665945053, 0.3436562716960907, 0.08125418424606323, -0.13240087032318115, -0.23718149960041046, 0.16838280856609344, 0.08996385335922241, -0.29811930656433105, 0.07885004580020905, 0.2562001943588257, 0.2399551123380661, -0.3180929720401764, -0.2206084430217743, -0.18004991114139557, 0.10046493262052536, 0.3437744081020355, -0.3214937150478363, -0.2259087711572647, 0.07514888048171997, 0.24481123685836792, 0.12325239926576614, 0.27634549140930176, -0.10416212677955627, -0.1844746470451355, 0.06701096892356873, 0.13404810428619385, -0.10016223788261414, -0.05838816612958908, -0.07580596953630447, 0.22467002272605896, -0.005072452127933502, 0.07728574424982071, 0.0067648254334926605, -0.09900598973035812, -0.11737329512834549, 0.06079769879579544, 0.09678849577903748, 0.05932413414120674, -0.12115790694952011, -0.12769313156604767, 0.3467402458190918, -0.2848493158817291, 0.3617435097694397, 0.30766427516937256, -0.14250275492668152, 0.1626860797405243, 0.18423977494239807, 0.10029953718185425, 0.14527380466461182, 0.004253355786204338, 0.06457944959402084, 0.22834789752960205, -0.2037932276725769, -0.0899403989315033, -0.11868593096733093, 0.28055623173713684, 0.08260189741849899, 0.18412527441978455, 0.11855006217956543, -0.07479894161224365, 0.07176576554775238, -0.09839922934770584, 0.26256635785102844, 0.335469514131546, 0.28115561604499817, -0.2562237083911896, -0.16269879043102264, 0.0816473513841629, 0.038920436054468155, -0.12120799720287323, 0.32900068163871765, 0.009078145027160645, -0.3214948773384094, 0.051875028759241104, -0.4135071635246277, 0.873488187789917, 0.11820390820503235, 0.16585420072078705, 0.28808853030204773, 0.32960671186447144, 0.1211906298995018, -0.5304721593856812, 0.2512734532356262, 0.09352760016918182, -0.3310862183570862, -0.0035099443048238754, 0.23646900057792664, -0.17941340804100037, -0.04215541481971741, -0.45750635862350464, 0.04449803754687309, 0.044737473130226135, 0.06620139628648758, 0.09879909455776215, 0.2996089458465576, -0.06140431761741638, -0.4362175464630127, -0.14174993336200714, 0.24839171767234802, 0.009746603667736053, 0.10724268853664398, 0.211002916097641, -0.19633083045482635, -0.11092795431613922, -0.07881684601306915, -0.2388037145137787, 0.23133528232574463, 0.0022811093367636204, -0.11416947841644287, -0.06710861623287201, 0.14859671890735626, 0.33399227261543274, 0.028272997587919235, 0.3576344847679138, 0.0699014961719513, -0.20115458965301514, 0.04235255718231201, 0.3010919690132141, 0.1712934523820877, -0.08379337936639786, 0.09617872536182404, 0.31344297528266907, -0.23488646745681763, -0.1420307606458664, 0.2219247817993164, 0.20127633213996887, -0.15278926491737366, -0.29556378722190857, -0.34944242238998413, 0.16045817732810974, -0.01090172678232193, 0.4816807508468628, 0.2843150496482849, -0.15672895312309265, -0.15844964981079102, 0.27779051661491394, 0.058378372341394424, -0.3829333782196045, 0.028945062309503555, 0.1079028993844986, 0.043176472187042236, -0.10537709295749664, 0.14489111304283142, 0.22920849919319153, -0.02601257711648941, 0.26670166850090027, 0.11512117087841034, -0.11374913156032562, -0.4014359712600708, -0.32652047276496887, 0.030701372772455215, -0.11722688376903534, -0.16194340586662292, -0.02293078601360321, -0.41959816217422485, -0.0766410082578659, 0.3390907645225525, -0.1004660427570343, 0.1724403202533722, -0.16064663231372833, -0.009043063968420029, -0.4647175669670105, 0.13155214488506317, -0.0029692277312278748, 0.23992760479450226, -0.1496097445487976, 0.08006636798381805, 0.01694481261074543, -0.04222935438156128, -0.5291252136230469, -0.3476748466491699, 0.005188440904021263, 0.19998039305210114, 0.23538334667682648, -0.27072542905807495, 0.35468000173568726, 0.03178924694657326, 0.3608233630657196, -0.05835486948490143, -0.06829536706209183, -0.38314148783683777, -0.18555034697055817, 0.0634184256196022, 0.1623767614364624, 0.0016679468099027872, 0.2594168782234192, 0.06961540877819061, -0.2615789473056793, -0.054792001843452454, 0.29912376403808594, 0.06215701252222061, -0.004029355943202972, 0.16791167855262756, 0.015904396772384644, 0.020131342113018036, 0.27209001779556274, -0.1253765970468521, 0.14988301694393158, 0.2000843584537506, -0.025354186072945595, 0.11441956460475922, 0.005128711462020874, -0.24579906463623047, -0.02112508751451969, 0.21629849076271057, 0.148917555809021, 0.03172243759036064, 0.08072815090417862, 0.012504763901233673, -0.09130913764238358, 0.1527901589870453, 0.40574443340301514, -0.11531111598014832, -0.12311261892318726, -0.07281239330768585, 0.287871390581131, 0.42051345109939575, -0.21932104229927063, 0.03224796801805496, 0.08154042065143585, -0.22971616685390472, 0.3722212016582489, 0.14290505647659302, -0.07427556812763214, 0.16046230494976044, 0.19531473517417908, -0.10313795506954193, -0.298223614692688, -0.1626131236553192, 0.1177276074886322, 0.14278173446655273, -0.06401852518320084, -0.05685187503695488, 0.14282655715942383, -0.05220060423016548, 0.2643643021583557, 0.21216022968292236, -0.2708126902580261, 0.20164234936237335, 0.15183815360069275, -0.02604782208800316, 0.4211890399456024, 0.04464174434542656, 0.09578810632228851, -0.03301656246185303, 0.028222933411598206, 0.19892215728759766, 0.11249132454395294, 0.34050947427749634, -0.14601899683475494, -0.2215294986963272, -0.057204559445381165, 0.24997945129871368, -0.10187598317861557, -0.11445310711860657, -0.2391727715730667, 0.004808314144611359, -0.2547997236251831, -0.17902220785617828, 0.2005237340927124, 0.11038850247859955, 0.021963320672512054, 0.0760749951004982, -0.05749949812889099, -0.040798649191856384, -0.03319290280342102, 0.04813655465841293, 0.41914716362953186, -0.009545553475618362, 0.25584542751312256, -0.09771883487701416, -0.2526032626628876, 0.14257259666919708, 0.2597687542438507, 0.14400959014892578, -0.0252755768597126, -0.19358369708061218, 0.3831194043159485, -0.019626058638095856, -0.10652241855859756, -0.1297435611486435, 0.1021680161356926, 0.31449463963508606, 0.15381847321987152, 0.1100640743970871, 0.2643987536430359, -0.2923326790332794, -0.09077250957489014, -0.01460176333785057, -0.02943359687924385, -0.10853448510169983, 0.23070865869522095, -0.0005777440965175629, -0.09028087556362152, -0.3135185241699219, -0.12866106629371643, -0.4868662357330322, -0.012316242791712284, 0.45631110668182373, -0.008551949635148048, 0.06905397027730942, -0.3143402338027954, 0.17187069356441498, -0.05938767269253731, 0.14417284727096558, 0.27630549669265747, 0.03710290789604187, 0.29935234785079956, 0.05358801782131195, -0.26004570722579956, 0.2926708161830902, 0.16296173632144928, 0.008750749751925468, -0.352402925491333, -0.03553985059261322, 0.3841296136379242, 0.06879295408725739, 0.017770051956176758, -0.4300268292427063, -0.19687333703041077, -0.13866634666919708, -0.23033635318279266, 0.019821682944893837, -0.1094496101140976, 0.14219887554645538, 0.19352950155735016, -0.3154267370700836, 0.06368955224752426, -0.17021220922470093, 0.2584974765777588, -0.05601721256971359, 0.07551373541355133, -0.056364044547080994, -0.3320423662662506, 0.15612399578094482, -0.0869443267583847, 0.20712503790855408, -0.30672550201416016, -0.26181355118751526, -0.07608145475387573, -0.18702448904514313, -0.32791802287101746, -0.12218568474054337, 0.07976719737052917, 0.5333510637283325, -0.023970577865839005, 0.11191527545452118, -0.203225776553154, 0.12783664464950562, 0.11220256984233856, -0.12691180408000946, -0.05481813848018646, 0.31380486488342285, 0.016367070376873016, -0.03812245652079582, 0.07360808551311493, 0.11643069237470627, -0.18752649426460266, -0.07984024286270142, -0.1147952675819397, -0.4337141215801239, 0.3068402409553528, -0.3031904399394989, -0.24839603900909424, -0.2672503888607025, 0.3024700880050659, 0.0733024999499321, -0.02094823308289051, -0.3831130266189575, 0.1403062343597412, 0.18507859110832214, -0.0008840188384056091, -0.11476851999759674, 0.1972622126340866, 0.10644334554672241, -0.23777033388614655, -0.09218136966228485, 0.255784273147583, 0.08639305830001831, -0.03704429790377617, 0.07369069755077362, -0.3041478395462036 ]
https://github.com/huggingface/datasets/issues/1838
Add tedlium
Hi @patrickvonplaten I can have a look to this dataset later since I am trying to add the OpenSLR dataset https://github.com/huggingface/datasets/pull/2173 Hopefully I have enough space since the compressed file is 21GB. The release 3 is even bigger: 54GB :-0
## Adding a Dataset - **Name:** *tedlium* - **Description:** *The TED-LIUM 1-3 corpus is English-language TED talks, with transcriptions, sampled at 16kHz. It contains about 118 hours of speech.* - **Paper:** Homepage: http://www.openslr.org/7/, https://lium.univ-lemans.fr/en/ted-lium2/ &, https://www.openslr.org/51/ - **Data:** http://www.openslr.org/7/ - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/tedlium If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
40
Add tedlium ## Adding a Dataset - **Name:** *tedlium* - **Description:** *The TED-LIUM 1-3 corpus is English-language TED talks, with transcriptions, sampled at 16kHz. It contains about 118 hours of speech.* - **Paper:** Homepage: http://www.openslr.org/7/, https://lium.univ-lemans.fr/en/ted-lium2/ &, https://www.openslr.org/51/ - **Data:** http://www.openslr.org/7/ - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/tedlium If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Hi @patrickvonplaten I can have a look to this dataset later since I am trying to add the OpenSLR dataset https://github.com/huggingface/datasets/pull/2173 Hopefully I have enough space since the compressed file is 21GB. The release 3 is even bigger: 54GB :-0
[ -0.3431778848171234, 0.07050658762454987, -0.06830776482820511, 0.13331203162670135, 0.06836758553981781, -0.020420070737600327, 0.035357993096113205, 0.37950727343559265, -0.4294745922088623, 0.2744410037994385, -0.25794869661331177, 0.3504008650779724, -0.20843729376792908, -0.09178808331489563, 0.2269742488861084, -0.36181944608688354, -0.14128366112709045, 0.1973719596862793, -0.1658695787191391, -0.18006162345409393, 0.04707283526659012, 0.12849199771881104, -0.05396554619073868, -0.45203620195388794, -0.2660464644432068, -0.08072798699140549, -0.11426285654306412, 0.02599785476922989, -0.18035724759101868, -0.032637596130371094, -0.010999987833201885, 0.10458806157112122, 0.00204339437186718, 0.5920302271842957, -0.00010600443056318909, 0.07620109617710114, 0.2563403844833374, -0.19704225659370422, -0.12616625428199768, -0.09200425446033478, 0.22391372919082642, -0.18769718706607819, -0.40690934658050537, 0.016463913023471832, -0.2588907480239868, -0.30763736367225647, 0.08345404267311096, -0.0051604993641376495, 0.2092909961938858, 0.3986491858959198, 0.23539137840270996, 0.5247448682785034, 0.3459709584712982, -0.13761889934539795, 0.26156550645828247, 0.05995719134807587, -0.18796306848526, -0.006951482966542244, 0.1280573308467865, 0.16609887778759003, 0.09799428284168243, 0.3711439073085785, -0.06103795766830444, -0.13150575757026672, -0.09253808110952377, 0.04558054730296135, -0.3500030040740967, -0.23853087425231934, 0.0007925629615783691, 0.5430957674980164, 0.6054992079734802, -0.013903625309467316, -0.18671293556690216, -0.13106679916381836, 0.06369840353727341, -0.4326331615447998, 0.0834902748465538, 0.14287182688713074, -0.23880331218242645, 0.1338605135679245, 0.14944401383399963, -0.11929789930582047, -0.3330073356628418, 0.4302217364311218, 0.13756206631660461, 0.21578596532344818, -0.14521533250808716, -0.09252540022134781, 0.15935951471328735, -0.175065279006958, -0.2267788201570511, 0.13491924107074738, 0.0857594907283783, 0.03088870644569397, -0.299776166677475, -0.18996098637580872, 0.04823583364486694, -0.32863649725914, 0.34310081601142883, -0.10682940483093262, 0.03705883398652077, 0.09686019271612167, -0.19721408188343048, -0.09674429148435593, -0.14319628477096558, 0.12444372475147247, -0.196144700050354, 0.05629349499940872, 0.026355236768722534, -0.07687942683696747, -0.033964335918426514, 0.04442829266190529, -0.18014393746852875, 0.005402190610766411, -0.19894438982009888, -0.1756485104560852, 0.0056032054126262665, 0.028462979942560196, 0.07304064929485321, 0.02557417005300522, -0.1170150637626648, -0.007727842312306166, -0.05212651565670967, 0.2615170180797577, -0.07376144081354141, 0.19353002309799194, 0.06409388035535812, 0.17936500906944275, -0.06680998206138611, -0.22734375298023224, -0.24117854237556458, 0.2027684599161148, 0.008669640868902206, 0.18342289328575134, 0.2094162553548813, -0.1675245612859726, 0.4441903829574585, -0.07171020656824112, 0.30502915382385254, 0.19252581894397736, 0.26712483167648315, -0.09309668838977814, 0.12177024781703949, 0.32773351669311523, 0.0867614597082138, 0.13704492151737213, -0.018653299659490585, -0.10395178943872452, -0.09375457465648651, 0.12360622733831406, -0.04260684549808502, -0.18356271088123322, -0.32416364550590515, 0.2468048483133316, 0.04723576456308365, -0.1724044531583786, -0.26655280590057373, 0.4495428800582886, 0.025436758995056152, 0.011575184762477875, -0.013362370431423187, 0.0912327840924263, -0.4628691077232361, 0.008844894357025623, 0.13888335227966309, 0.06605421006679535, -0.18564310669898987, 0.07948032021522522, -0.009876154363155365, 0.273985356092453, 0.3011516034603119, 0.33966296911239624, -0.11635098606348038, 0.14940646290779114, -0.0522676482796669, 0.37317001819610596, 0.3246428668498993, -0.5450289845466614, -0.45335856080055237, 0.10476959496736526, -0.3069198429584503, 0.051935188472270966, 0.2519708573818207, 0.14997033774852753, 0.3737608790397644, -0.08304566144943237, 0.4227798581123352, 0.20344547927379608, 0.01105789840221405, -0.13203378021717072, -0.32993409037590027, -0.21081990003585815, 0.07213935256004333, 0.23344440758228302, -0.04651105776429176, -0.14304664731025696, -0.1827775239944458, 0.5555556416511536, 0.21206730604171753, -0.17186081409454346, 0.11728526651859283, 0.32813769578933716, 0.059160396456718445, 0.0588180311024189, -0.017208805307745934, -0.2287878692150116, -0.07493371516466141, -0.12331167608499527, 0.2061934471130371, 0.5123473405838013, 0.30073434114456177, -0.2830674648284912, -0.11932747811079025, -0.28817498683929443, -0.005893271416425705, -0.004929579794406891, 0.24349281191825867, 0.19549784064292908, 0.1445726603269577, 0.05927809700369835, -0.17525774240493774, 0.20670820772647858, -0.340485543012619, 0.0865430012345314, -0.3777465522289276, 0.14741356670856476, -0.07588450610637665, -0.28321710228919983, 0.32211044430732727, 0.07952534407377243, -0.06625198572874069, -0.22124870121479034, 0.11548995971679688, 0.13404154777526855, -0.23289360105991364, 0.2099723517894745, -0.06790386140346527, 0.25082236528396606, 0.24302420020103455, -0.2084757536649704, -0.04382794350385666, 0.3286624848842621, -0.03762132301926613, -0.13054582476615906, -0.04505264759063721, -0.05071921646595001, 0.2623153030872345, -0.24464035034179688, -0.01819845661520958, -0.032066456973552704, 0.3046455979347229, -0.08504383265972137, -0.1413041651248932, -0.19665610790252686, 0.2957744002342224, 0.21944594383239746, -0.1282251626253128, -0.006285315379500389, -0.4803936779499054, 0.229660302400589, 0.341532826423645, -0.16804328560829163, 0.13003292679786682, 0.25494641065597534, -0.2882516086101532, -0.031942665576934814, -0.04856300354003906, -0.18393656611442566, 0.2958202064037323, 0.3423232436180115, 0.18629907071590424, -0.010988006368279457, 0.03245612606406212, -0.2777961790561676, 0.1596098244190216, -0.02295537292957306, 0.017058677971363068, 0.3979538679122925, 0.2667992115020752, 0.10276146978139877, -0.45139360427856445, -0.010057730600237846, 0.049609169363975525, 0.2514972388744354, -0.11098448932170868, -0.23173575103282928, -0.2771240770816803, -0.21047323942184448, -0.10243989527225494, -0.13423962891101837, 0.005529414862394333, -0.04016657918691635, 0.25749945640563965, 0.30702975392341614, -0.11065414547920227, 0.18581172823905945, 0.17109058797359467, 0.038719937205314636, 0.15629565715789795, -0.1112629845738411, 0.021046750247478485, 0.0019959413912147284, -0.14980760216712952, 0.17644214630126953, 0.13085217773914337, 0.10329785197973251, 0.3310491740703583, -0.05679662525653839, 0.005552183836698532, -0.16061647236347198, -0.5656263828277588, 0.27930670976638794, -0.38470572233200073, 0.08757558465003967, -0.03390301764011383, 0.246028870344162, 0.15054282546043396, -0.459891676902771, 0.029226303100585938, 0.08525509387254715, -0.25328823924064636, -0.04718952625989914, -0.18322771787643433, -0.10326249152421951, -0.1788063943386078, -0.4804844558238983, -0.11461556702852249, -0.5522739291191101, 0.19624082744121552, 0.06530635058879852, 0.06348337233066559, 0.4290139079093933, -0.09632387012243271, 0.17652592062950134, 0.0646984875202179, 0.15739423036575317, -0.3818119764328003, -0.29103222489356995, 0.5326827168464661, -0.3773006796836853, -0.4238976538181305, -0.09341247379779816, -0.11861857771873474, 0.10722135752439499, -0.0012673567980527878, -0.3916934132575989, -0.3313254415988922, -0.139249786734581, -0.04912713170051575, -0.05119320750236511, 0.020505182445049286, 0.24273817241191864, -0.1608283668756485, -0.21024790406227112, -0.18639054894447327, 0.007603354752063751, 0.16238641738891602, 0.17662805318832397, 0.06794165074825287, -0.10427730530500412, 0.1803446114063263, -0.027317065745592117, 0.23209938406944275, 0.3803940713405609, -0.13082067668437958, 0.2389179766178131, -0.12932851910591125, 0.2053574025630951, -0.21617382764816284, -0.1501186639070511, 0.30809536576271057, 0.22393181920051575, 0.10043440759181976, 0.44234806299209595, 0.08397038280963898, -0.0068222880363464355, 0.048706263303756714, -0.29186683893203735, -0.04601380601525307, -0.28751346468925476, 0.2097437083721161, 0.33042848110198975, 0.0942363515496254, -0.039319828152656555, -0.13844041526317596, -0.2583664059638977, -0.3234784007072449, 0.19807663559913635, 0.2372494488954544, -0.11271854490041733, -0.07326527684926987, -0.4805630147457123, 0.3063945472240448, -0.6605843901634216, 0.04691321402788162, 0.16851700842380524, 0.23971815407276154, -0.23501038551330566, -0.05481237918138504, -0.090300053358078, 0.03486178442835808, 0.5300663113594055, -0.2390967756509781, -0.11947566270828247, 0.15872833132743835, 0.1821475476026535, -0.16536329686641693, 0.31140315532684326, -0.2298675775527954, -0.22696051001548767, 0.29780417680740356, 0.4735632836818695, -0.3214170038700104, 0.006511312909424305, 0.3584795892238617, 0.3582867681980133, 0.07073590159416199, -0.03159713000059128, -0.16296525299549103, -0.5779344439506531, -0.16531489789485931, -0.10914235562086105, 0.2232021987438202, 0.29616281390190125, 0.26420867443084717, -0.23368659615516663, 0.2393156886100769, -0.14970795810222626, 0.38350075483322144, -0.1288924217224121, 0.16939789056777954, 0.46447670459747314, 0.19346436858177185, -0.026081018149852753, -0.0012997910380363464, 0.16904808580875397, 0.18431290984153748, 0.12550964951515198, -0.3187146484851837, 0.09650669991970062, -0.4157077670097351, 0.07754826545715332, 0.11776836216449738, -0.008136684074997902, 0.21318355202674866, -0.31962060928344727, 0.33372050523757935, -0.23758278787136078, 0.4872475862503052, 0.30902424454689026, 0.03804713487625122, -0.36095890402793884, -0.22621427476406097, 0.39784500002861023, 0.020064543932676315, 0.16308744251728058, 0.6163816452026367, 0.17523795366287231, -0.25172144174575806, 0.20078592002391815, -0.11263919621706009, 1.0684711933135986, 0.004505690187215805, 0.14938168227672577, 0.49841174483299255, 0.15194983780384064, 0.45577481389045715, -0.4085036516189575, 0.09112919867038727, 0.3247397840023041, -0.22845254838466644, 0.04704049229621887, 0.13970404863357544, -0.16720488667488098, -0.08585026860237122, -0.49164217710494995, -0.06979759782552719, -0.02028777077794075, -0.09104675054550171, 0.030360840260982513, 0.5705026388168335, 0.052748315036296844, -0.45451921224594116, -0.4049416482448578, 0.23123306035995483, 0.2329302877187729, 0.11132960021495819, 0.14141783118247986, -0.16985785961151123, -0.23187784850597382, -0.07953986525535583, -0.3921780586242676, -0.00854555144906044, -0.15243905782699585, -0.10356520861387253, -0.07071621716022491, -0.33873963356018066, 0.14035163819789886, 0.2051343023777008, 0.4466017484664917, 0.06534940004348755, -0.24535039067268372, 0.15920540690422058, -0.3543913960456848, -0.2051926851272583, 0.020993642508983612, -0.17987698316574097, 0.36633485555648804, -0.3109206259250641, 0.03398934751749039, 0.2256438434123993, 0.10664083063602448, -0.22489316761493683, -0.1531492918729782, -0.28632044792175293, -0.1165720522403717, -0.1228957399725914, 0.04175025224685669, 0.43276000022888184, -0.2238212525844574, -0.14104963839054108, 0.20169004797935486, -0.009342141449451447, -0.33797359466552734, -0.0702149048447609, 0.18146690726280212, -0.1663372814655304, -0.013168968260288239, 0.24019291996955872, 0.3308611214160919, -0.04178947955369949, 0.46714624762535095, 0.27511435747146606, -0.1293354332447052, -0.24958324432373047, -0.22516661882400513, -0.06196694076061249, -0.2933136522769928, 0.023881573230028152, 0.14277736842632294, 0.02414076030254364, 0.0520799420773983, 0.5436133742332458, 0.0070556215941905975, -0.10380838066339493, -0.1791743040084839, 0.017618022859096527, -0.47040286660194397, 0.06027322635054588, -0.1382645219564438, 0.11040718108415604, -0.07395481318235397, 0.49508604407310486, -0.059942103922367096, 0.20715542137622833, -0.40440645813941956, 0.028052883222699165, -0.10699117183685303, 0.18812347948551178, 0.3210678994655609, -0.1531078815460205, 0.37616270780563354, -0.009805405512452126, 0.17064853012561798, 0.09292807430028915, -0.18388953804969788, -0.2533867657184601, -0.23445120453834534, 0.06262020766735077, 0.10277910530567169, -0.08437439054250717, 0.0830770879983902, -0.11792472004890442, -0.28849002718925476, -0.030963081866502762, 0.33035340905189514, 0.07960758358240128, -0.06391963362693787, -0.008283828385174274, 0.010267090052366257, -0.02151268720626831, 0.1327536702156067, -0.038555242121219635, 0.12752456963062286, 0.26221346855163574, 0.08459962904453278, -0.0269375741481781, 0.07923479378223419, -0.1881304830312729, -0.1115223839879036, 0.2177870273590088, 0.17967760562896729, -0.22911173105239868, 0.23723670840263367, -0.1142953485250473, -0.09210037440061569, 0.15452687442302704, 0.1713135987520218, -0.1187022477388382, -0.19748620688915253, 0.04277041554450989, 0.28520452976226807, 0.28012874722480774, -0.32123252749443054, -0.024203775450587273, 0.12203732132911682, -0.042660363018512726, 0.21538183093070984, 0.06799040734767914, 0.02460656687617302, 0.0851312130689621, 0.0855642631649971, 0.06167890131473541, 0.05120762065052986, 0.029099050909280777, 0.10722196102142334, 0.09474620223045349, 0.05217721685767174, 0.013673435896635056, -0.08816308528184891, -0.02368370071053505, 0.1438586413860321, -0.04949674755334854, -0.04202941805124283, 0.4759678244590759, 0.06040724366903305, 0.020888883620500565, 0.1528874635696411, -0.08183395862579346, -0.17961233854293823, 0.27073702216148376, 0.14823448657989502, 0.3688293993473053, -0.010209910571575165, 0.5753251910209656, 0.07804442942142487, -0.08323494344949722, -0.032319582998752594, 0.33083203434944153, -0.030084073543548584, -0.10516037046909332, -0.22051924467086792, -0.08473944664001465, -0.17597584426403046, -0.00099969282746315, 0.17675061523914337, -0.09959752857685089, -0.36185580492019653, 0.2024529129266739, -0.17533303797245026, -0.010282296687364578, -0.11822587996721268, 0.036201175302267075, 0.021751053631305695, -0.1454067975282669, 0.3191003203392029, 0.17872224748134613, -0.1570979356765747, 0.09542546421289444, 0.3117292821407318, 0.3932815194129944, -0.034617677330970764, -0.03258456662297249, 0.378440260887146, -0.0071040913462638855, -0.04266807809472084, -0.10956989228725433, 0.36526918411254883, 0.3000549077987671, -0.1450003683567047, 0.2046089768409729, 0.17622630298137665, -0.3138994872570038, -0.010108176618814468, 0.019819241017103195, -0.09884342551231384, -0.21416030824184418, -0.11335913091897964, -0.04545006901025772, 0.02765384316444397, -0.42618662118911743, -0.2730334401130676, -0.4859863817691803, 0.269759863615036, 0.43828141689300537, -0.14229175448417664, 0.05457957834005356, -0.08690114319324493, 0.1318081170320511, -0.3137732744216919, 0.39436599612236023, 0.31681597232818604, 0.1392354518175125, 0.0983060821890831, -0.4539986252784729, -0.4440169334411621, 0.3314885199069977, -0.1936246156692505, -0.3071642220020294, -0.1699739694595337, 0.2537256181240082, 0.4797629714012146, 0.2120731621980667, -0.05764886736869812, -0.6558498740196228, -0.11153396219015121, 0.020235352218151093, -0.3238794207572937, 0.21110105514526367, -0.1695868819952011, 0.18981125950813293, 0.10442247986793518, -0.12298472970724106, -0.0006069652736186981, 0.028497543185949326, 0.14516422152519226, -0.4149305820465088, 0.2897210419178009, -0.20879873633384705, 0.012734215706586838, 0.19098114967346191, -0.07229454815387726, 0.2729308307170868, -0.3162324130535126, -0.13068917393684387, -0.13382726907730103, 0.13076439499855042, -0.24909263849258423, -0.20177286863327026, 0.15915076434612274, 0.3778848648071289, -0.1294214427471161, 0.2802937626838684, -0.109881691634655, 0.3118390142917633, 0.011589210480451584, -0.027020329609513283, -0.31531521677970886, 0.27752214670181274, -0.10674020648002625, -0.10656581073999405, 0.12288747727870941, 0.4937793016433716, -0.03325518220663071, -0.031683098524808884, -0.2956218421459198, -0.5551960468292236, 0.4337226152420044, -0.533399224281311, -0.26639890670776367, 0.10709209740161896, 0.03607000410556793, 0.16705745458602905, -0.011261889711022377, -0.7686288952827454, 0.20830833911895752, 0.23062166571617126, 0.22123026847839355, -0.18435123562812805, 0.31456127762794495, 0.06856735050678253, -0.05728580057621002, -0.031486742198467255, 0.10106698423624039, 0.13174913823604584, -0.23075062036514282, -0.12340867519378662, -0.3093242049217224 ]
https://github.com/huggingface/datasets/issues/1837
Add VCTK
@patrickvonplaten I'd like to take this, if nobody has already done it. I have added datasets before through the datasets sprint, but I feel rusty on the details, so I'll look at the guide as well as similar audio PRs (#1878 in particular comes to mind). If there is any detail I should be aware of please, let me know! Otherwise, I'll try to write up a PR in the coming days.
## Adding a Dataset - **Name:** *VCTK* - **Description:** *This CSTR VCTK Corpus includes speech data uttered by 110 English speakers with various accents. Each speaker reads out about 400 sentences, which were selected from a newspaper, the rainbow passage and an elicitation paragraph used for the speech accent archive.* - **Paper:** Homepage: https://datashare.ed.ac.uk/handle/10283/3443 - **Data:** https://datashare.ed.ac.uk/handle/10283/3443 - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/vctk If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
72
Add VCTK ## Adding a Dataset - **Name:** *VCTK* - **Description:** *This CSTR VCTK Corpus includes speech data uttered by 110 English speakers with various accents. Each speaker reads out about 400 sentences, which were selected from a newspaper, the rainbow passage and an elicitation paragraph used for the speech accent archive.* - **Paper:** Homepage: https://datashare.ed.ac.uk/handle/10283/3443 - **Data:** https://datashare.ed.ac.uk/handle/10283/3443 - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/vctk If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). @patrickvonplaten I'd like to take this, if nobody has already done it. I have added datasets before through the datasets sprint, but I feel rusty on the details, so I'll look at the guide as well as similar audio PRs (#1878 in particular comes to mind). If there is any detail I should be aware of please, let me know! Otherwise, I'll try to write up a PR in the coming days.
[ -0.32403212785720825, -0.16146838665008545, -0.08462529629468918, -0.13768528401851654, 0.013386495411396027, -0.16477975249290466, 0.29924923181533813, 0.15711823105812073, -0.3928881287574768, 0.36969488859176636, -0.1535664200782776, 0.20890849828720093, -0.1626087725162506, 0.09880395978689194, 0.18489551544189453, -0.44375237822532654, -0.09217726439237595, 0.16082946956157684, 0.011819690465927124, -0.15695154666900635, 0.16521233320236206, 0.03189801052212715, -0.17243847250938416, -0.16202512383460999, -0.09930720925331116, -0.2303973138332367, -0.04679753631353378, -0.13307854533195496, 0.027149762958288193, -0.06371448189020157, -0.12949639558792114, 0.19290956854820251, -0.021573472768068314, 0.3918757140636444, -0.00010089289571624249, -0.07452654093503952, 0.0664689913392067, -0.2229982614517212, -0.07298587262630463, 0.21040938794612885, 0.09333080798387527, 0.024964632466435432, -0.3809390068054199, -0.11463494598865509, -0.27492037415504456, -0.044236354529857635, -0.08821361511945724, -0.07902496308088303, 0.2854576110839844, 0.5214911699295044, 0.280686616897583, 0.3199211359024048, 0.010572630912065506, 0.01914004608988762, 0.22948262095451355, 0.13291113078594208, -0.2077152281999588, -0.15228906273841858, 0.23353928327560425, 0.262775719165802, -0.1617715060710907, 0.38360336422920227, -0.05772314965724945, -0.013985641300678253, -0.04873150587081909, 0.0029513854533433914, -0.30043932795524597, -0.22399026155471802, 0.04170447587966919, 0.5147067904472351, 0.6199707984924316, -0.16413110494613647, -0.2334807813167572, -0.18683400750160217, 0.04387645423412323, -0.5415112972259521, -0.05519217997789383, -0.09334572404623032, -0.3210926651954651, 0.17979738116264343, -0.08450398594141006, 0.01626516319811344, -0.16809377074241638, 0.07838153839111328, 0.16208286583423615, -0.15729565918445587, -0.10678967833518982, -0.14168652892112732, 0.07473188638687134, -0.1644536256790161, -0.1452619433403015, 0.10530050843954086, 0.1555730104446411, 0.11843419820070267, -0.4857024550437927, -0.2536984980106354, 0.2724462151527405, -0.27736636996269226, 0.15784135460853577, 0.05346229672431946, 0.05823899060487747, 0.2336747944355011, -0.40485596656799316, 0.13304531574249268, -0.07940320670604706, 0.11522479355335236, -0.11607307940721512, -0.13400384783744812, 0.15784990787506104, -0.37442532181739807, -0.06588471680879593, 0.059379227459430695, -0.018778637051582336, -0.09325367212295532, -0.06394587457180023, 0.05081570893526077, -0.2572845220565796, -0.08559107780456543, -0.1677396446466446, 0.146462544798851, 0.07019925862550735, 0.12329089641571045, -0.09429765492677689, 0.1856626570224762, 0.1659088283777237, 0.37687528133392334, -0.01227140799164772, 0.23602783679962158, -0.10371404886245728, -0.3146480321884155, -0.17192471027374268, 0.22066646814346313, 0.02152303233742714, 0.05493839085102081, 0.21104393899440765, -0.04573998227715492, 0.20686881244182587, 0.05101761966943741, 0.22526249289512634, 0.05206214636564255, -0.08324779570102692, 0.11232830584049225, 0.1563343107700348, -0.0009107924997806549, 0.01061774417757988, 0.002790043130517006, -0.16400164365768433, 0.03173569589853287, -0.1916918158531189, -0.01167723536491394, 0.11022427678108215, -0.17231658101081848, -0.38091158866882324, 0.257680207490921, -0.05475957691669464, -0.1866007298231125, -0.29764094948768616, 0.7335056066513062, 0.04204424098134041, -0.24592718482017517, 0.021583132445812225, 0.03434497490525246, -0.3365771472454071, -0.044877372682094574, 0.23245471715927124, 0.13440172374248505, -0.6248853802680969, 0.05341053009033203, -0.12384629249572754, 0.06810927391052246, 0.10271347314119339, 0.45256519317626953, -0.08207350224256516, 0.1940239816904068, -0.0895300805568695, 0.24788467586040497, 0.057570308446884155, -0.37124401330947876, -0.11170298606157303, 0.16798318922519684, -0.26687005162239075, 0.013691345229744911, 0.08594177663326263, -0.08420919626951218, 0.4507216215133667, -0.07846113294363022, -0.02088860422372818, 0.28190135955810547, -0.25174957513809204, 0.1646273285150528, -0.2188110053539276, -0.2511427700519562, 0.010491501539945602, 0.11423026025295258, -0.004704773426055908, -0.08055400103330612, -0.15605732798576355, 0.08827729523181915, 0.08345945179462433, -0.2658664286136627, 0.2527962327003479, 0.19375470280647278, 0.2571432590484619, 0.023161139339208603, -0.04844219610095024, -0.3154906630516052, 0.07342838495969772, -0.1679038107395172, 0.43297117948532104, 0.4364006221294403, 0.13139477372169495, -0.35970938205718994, -0.06922411918640137, -0.22749264538288116, 0.13642112910747528, -0.09935671091079712, 0.2601417005062103, 0.1467318832874298, 0.08145467936992645, 0.11367259919643402, -0.17184165120124817, 0.13878220319747925, -0.053425777703523636, -0.16631446778774261, -0.05992482230067253, 0.11367514729499817, 0.034777816385030746, -0.20818103849887848, 0.1605878621339798, 0.3946722745895386, -0.2061517834663391, -0.02982732094824314, -0.015677576884627342, 0.23259922862052917, -0.2705809772014618, 0.32757747173309326, -0.14920607209205627, 0.20035189390182495, 0.20932896435260773, -0.42861923575401306, -0.002420799806714058, -0.12760326266288757, 0.05354256555438042, -0.06343261897563934, 0.003537159413099289, 0.18674367666244507, 0.41077396273612976, -0.0640077218413353, -0.010599642992019653, -0.07035156339406967, 0.21533824503421783, 0.024320479482412338, -0.019172314554452896, 0.10917724668979645, 0.0794215053319931, 0.06526131182909012, 0.1794222891330719, -0.23641963303089142, -0.4729176461696625, 0.379591703414917, 0.3142718970775604, -0.1804974526166916, 0.09431807696819305, 0.1606263518333435, -0.22351568937301636, -0.01512298546731472, 0.06373288482427597, -0.2973966598510742, 0.13251706957817078, 0.3111201524734497, 0.15518908202648163, -0.22118458151817322, -0.04586794599890709, -0.16272984445095062, 0.14562419056892395, -0.00035058706998825073, -0.1949177086353302, 0.4129801094532013, 0.22704197466373444, 0.06201154738664627, -0.6808943152427673, -0.19940030574798584, 0.09340295940637589, 0.12761497497558594, -0.16781657934188843, -0.08603445440530777, -0.18147237598896027, -0.1740487515926361, -0.010896109975874424, -0.025819189846515656, 0.19295045733451843, 0.018939783796668053, 0.3028342127799988, 0.31055527925491333, -0.3137936592102051, 0.2301902025938034, 0.24895942211151123, 0.4097985029220581, 0.11319108307361603, -0.06431305408477783, 0.0017282851040363312, -0.25426071882247925, -0.06348389387130737, 0.2787269055843353, 0.12131628394126892, 0.19123999774456024, 0.2087513655424118, 0.17645373940467834, 0.17488189041614532, -0.13738879561424255, -0.4145961403846741, 0.2387493997812271, -0.34132111072540283, 0.00797134730964899, -0.06940193474292755, 0.09787620604038239, -0.17181415855884552, -0.7790616154670715, -0.2179245501756668, -0.1383223533630371, -0.2500549852848053, 0.15279163420200348, -0.17259372770786285, -0.1360902190208435, -0.22441959381103516, -0.5399037003517151, -0.18581092357635498, -0.5183106064796448, 0.189385324716568, -0.13504566252231598, 0.1059984639286995, 0.09524685144424438, 0.009659023024141788, 0.2330259084701538, 0.14134010672569275, 0.11319336295127869, -0.34526780247688293, -0.15867294371128082, 0.22280633449554443, -0.3970212936401367, -0.290129154920578, -0.22151993215084076, -0.23647576570510864, 0.052003033459186554, -0.14291363954544067, -0.30490899085998535, -0.13906894624233246, -0.09872458130121231, 0.3421885073184967, 0.10998710244894028, 0.07388051599264145, 0.27526387572288513, 0.00859166495501995, -0.19460226595401764, -0.1261661946773529, -0.0527607798576355, 0.1562180519104004, 0.25934189558029175, 0.06691339612007141, 0.06946081668138504, 0.19323807954788208, 0.06889212131500244, 0.509774923324585, 0.16943466663360596, -0.2316507250070572, 0.23024882376194, -0.12447994202375412, 0.19208499789237976, -0.20087969303131104, -0.03450501710176468, 0.5408466458320618, 0.06357543170452118, 0.02047133818268776, 0.5182237029075623, 0.05821078643202782, -0.3042204976081848, 0.0017094723880290985, 0.03372349217534065, -0.26522302627563477, -0.3924758732318878, 0.1684540957212448, -0.21085506677627563, 0.15463681519031525, -0.0652642697095871, -0.012474063783884048, -0.26464930176734924, -0.10057283192873001, 0.0750039666891098, -0.01188214123249054, 0.0037655532360076904, -0.1576944887638092, -0.3396488428115845, 0.22662553191184998, -0.4308532476425171, 0.031249187886714935, 0.17531007528305054, 0.27938270568847656, -0.30827707052230835, -0.011216314509510994, -0.13846230506896973, 0.17524755001068115, 0.3599703907966614, -0.5391638278961182, -0.06724411994218826, 0.06380043923854828, 0.3371075689792633, 0.06658231467008591, 0.17026342451572418, -0.3715987801551819, -0.3208581209182739, 0.05950058251619339, 0.11213351786136627, -0.21730643510818481, 0.1404164582490921, 0.289380818605423, 0.3082447052001953, 0.08996409177780151, 0.0328688807785511, 0.10511098802089691, -0.3371208608150482, -0.1395837515592575, 0.3436349332332611, 0.3085326552391052, 0.14006081223487854, -0.13222534954547882, 0.02563389763236046, 0.23186451196670532, 0.004588831216096878, 0.4177340865135193, 0.1009940654039383, 0.11951109766960144, 0.35654306411743164, 0.09851264953613281, 0.046338096261024475, -0.2083689570426941, -0.09203314781188965, 0.088646300137043, 0.1474289894104004, -0.2144460678100586, 0.11698506027460098, -0.3561486601829529, 0.3259078860282898, 0.29842299222946167, 0.15522989630699158, 0.2170282006263733, -0.21537701785564423, 0.07604986429214478, -0.07445891946554184, 0.38063982129096985, 0.0604255348443985, 0.2939715087413788, -0.07671921700239182, -0.13149100542068481, 0.3155537545681, -0.0842747688293457, -0.151181161403656, 0.13096937537193298, 0.08931873738765717, -0.4070756435394287, 0.6459389925003052, -0.1875898241996765, 0.9356846213340759, 0.24640755355358124, -0.03185258433222771, 0.29545703530311584, 0.22328518331050873, 0.3699142336845398, -0.42037564516067505, -0.016772128641605377, 0.05776968225836754, -0.3852384090423584, -0.0270509235560894, 0.0892975777387619, -0.2330777943134308, 0.25865110754966736, -0.3790283799171448, -0.1040024608373642, 0.14934945106506348, 0.18747685849666595, 0.23704752326011658, 0.357789546251297, 0.12262309342622757, -0.5201833248138428, -0.146145299077034, 0.3254731595516205, -0.018785469233989716, 0.03697293624281883, 0.2399480640888214, -0.20437400043010712, -0.06204831600189209, -0.10755489021539688, -0.5926945209503174, -0.021428991109132767, -0.1534615457057953, 0.07790844142436981, -0.07987989485263824, -0.25151997804641724, 0.3018162250518799, 0.272201806306839, 0.4613872766494751, 0.2600094974040985, -0.26781490445137024, 0.13030774891376495, 0.35911044478416443, 0.09011010080575943, 0.10987257212400436, -0.020349426195025444, 0.40240147709846497, -0.15143540501594543, -0.29567772150039673, 0.2883147597312927, 0.02748262882232666, -0.27704283595085144, 0.05562146008014679, -0.27682894468307495, 0.0639808177947998, -0.032996002584695816, -0.02288811281323433, 0.3716197609901428, -0.2446904182434082, -0.17803506553173065, 0.20618921518325806, 0.006644241511821747, -0.3690774440765381, 0.268356055021286, 0.1437043845653534, 0.047565966844558716, -0.02868765965104103, 0.05999496951699257, 0.020813262090086937, -0.14119461178779602, 0.16934572160243988, 0.3154040575027466, -0.21713052690029144, -0.3483685255050659, -0.07281524688005447, -0.026281768456101418, -0.2864533066749573, -0.04039734601974487, 0.04268275201320648, -0.2266058623790741, 0.014926920644938946, 0.3680557310581207, 0.04995451867580414, -0.000022202730178833008, -0.29471197724342346, -0.09635993093252182, -0.38240110874176025, 0.18635624647140503, -0.04359376057982445, 0.3374674916267395, -0.03454318642616272, 0.4095413088798523, -0.06229805946350098, 0.09833421558141708, -0.48129141330718994, -0.11458609998226166, -0.029344379901885986, 0.2720748782157898, 0.17390543222427368, -0.2836868464946747, 0.26181560754776, -0.1946825236082077, 0.20665845274925232, 0.1791849583387375, -0.19994617998600006, -0.32587647438049316, -0.21246857941150665, 0.07324625551700592, 0.08419007062911987, -0.11587684601545334, 0.17614945769309998, 0.09838709980249405, -0.24721038341522217, -0.06028040498495102, 0.39396706223487854, 0.016286294907331467, -0.1514209657907486, 0.2642357051372528, -0.24652908742427826, 0.18292319774627686, 0.14786604046821594, -0.1767035722732544, 0.21473409235477448, 0.262359082698822, 0.14240038394927979, 0.010255765169858932, 0.08222788572311401, -0.1545397937297821, 0.02125900611281395, 0.3134596347808838, 0.14638715982437134, 0.01163884624838829, 0.009293440729379654, -0.013515293598175049, -0.03721124678850174, 0.1715906709432602, 0.3190222680568695, 0.01189267635345459, -0.09382311254739761, -0.14624731242656708, 0.32652547955513, 0.3756392002105713, -0.276860773563385, 0.1263040155172348, -0.020017866045236588, -0.08806609362363815, 0.37890544533729553, 0.10033898055553436, 0.18969514966011047, -0.1468956619501114, 0.20792247354984283, 0.018667850643396378, 0.15888433158397675, -0.40601247549057007, -0.017184434458613396, 0.26344260573387146, -0.012259986251592636, -0.01353178545832634, -0.07852092385292053, -0.028850916773080826, 0.1458471715450287, 0.18613512814044952, -0.12152763456106186, -0.019349267706274986, 0.04821247234940529, -0.06412941217422485, 0.23726946115493774, -0.05552435293793678, 0.1639493703842163, 0.117590993642807, -0.0785413533449173, 0.40787574648857117, 0.16960439085960388, 0.6201818585395813, -0.11097698658704758, -0.2411128431558609, -0.2126825749874115, 0.24667610228061676, -0.10451976209878922, -0.18580299615859985, -0.16188742220401764, -0.020242057740688324, -0.24880743026733398, -0.11953973770141602, 0.020765651017427444, 0.013765089213848114, 0.11634256690740585, 0.07479497790336609, 0.03547949716448784, -0.24291367828845978, 0.05883046239614487, -0.1936531960964203, 0.3665277361869812, -0.06467211991548538, 0.4387085437774658, 0.12115861475467682, -0.11065420508384705, 0.2284250110387802, 0.2502921223640442, 0.19952784478664398, -0.10677862167358398, -0.22289887070655823, 0.35076242685317993, -0.2664106488227844, -0.07360605150461197, 0.049087464809417725, 0.2639802098274231, 0.0853516012430191, 0.10570134222507477, 0.3539842665195465, 0.2145097851753235, -0.2558669149875641, 0.0036078281700611115, 0.3678491413593292, -0.17509125173091888, -0.20779424905776978, -0.09801612049341202, 0.0891517773270607, 0.03971821814775467, -0.3690388798713684, -0.2461256980895996, -0.22373265027999878, -0.10096454620361328, 0.22537580132484436, -0.21623866260051727, 0.054140448570251465, 0.007853887043893337, 0.15526075661182404, -0.1920284926891327, 0.3436276912689209, 0.3881382644176483, 0.10461600124835968, 0.044843290001153946, -0.13784611225128174, -0.4730755686759949, 0.07702482491731644, 0.1505536437034607, -0.18919923901557922, -0.09796325862407684, 0.2294856160879135, 0.46656760573387146, 0.3271870017051697, -0.3333708643913269, -0.29673081636428833, -0.4119592010974884, 0.2099601924419403, -0.43122079968452454, 0.1867111474275589, -0.11919817328453064, 0.31087058782577515, 0.09134899824857712, -0.299156129360199, 0.010999023914337158, 0.24116215109825134, 0.19955375790596008, -0.13679465651512146, 0.08876313269138336, -0.075246162712574, -0.05292048305273056, 0.035586804151535034, 0.0062055885791778564, 0.47716033458709717, -0.25323525071144104, 0.07039964944124222, -0.09335272014141083, -0.027898689731955528, -0.3566262423992157, -0.0013569146394729614, 0.20549464225769043, 0.6137758493423462, 0.08595109730958939, 0.08205229043960571, 0.1189853698015213, 0.22427929937839508, 0.3528609275817871, -0.09949107468128204, -0.37016060948371887, 0.3534594476222992, -0.16589534282684326, 0.07226353883743286, 0.028660807758569717, 0.2518048584461212, -0.10304509103298187, 0.10264880210161209, -0.19638049602508545, -0.6933981776237488, 0.30108997225761414, -0.27631324529647827, -0.20358429849147797, 0.021480727940797806, 0.30841365456581116, 0.477241188287735, -0.07833316922187805, -0.5625446438789368, 0.01404491811990738, 0.0713898316025734, -0.0364607498049736, -0.17863407731056213, 0.31220799684524536, -0.05092329904437065, -0.1457354724407196, -0.08060324192047119, 0.35422590374946594, 0.12933334708213806, -0.12293495237827301, -0.18915054202079773, -0.429037868976593 ]
https://github.com/huggingface/datasets/issues/1837
Add VCTK
That sounds great @jaketae - let me know if you need any help i.e. feel free to ping me on a first PR :-)
## Adding a Dataset - **Name:** *VCTK* - **Description:** *This CSTR VCTK Corpus includes speech data uttered by 110 English speakers with various accents. Each speaker reads out about 400 sentences, which were selected from a newspaper, the rainbow passage and an elicitation paragraph used for the speech accent archive.* - **Paper:** Homepage: https://datashare.ed.ac.uk/handle/10283/3443 - **Data:** https://datashare.ed.ac.uk/handle/10283/3443 - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/vctk If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
24
Add VCTK ## Adding a Dataset - **Name:** *VCTK* - **Description:** *This CSTR VCTK Corpus includes speech data uttered by 110 English speakers with various accents. Each speaker reads out about 400 sentences, which were selected from a newspaper, the rainbow passage and an elicitation paragraph used for the speech accent archive.* - **Paper:** Homepage: https://datashare.ed.ac.uk/handle/10283/3443 - **Data:** https://datashare.ed.ac.uk/handle/10283/3443 - **Motivation:** Important speech dataset - **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/vctk If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). That sounds great @jaketae - let me know if you need any help i.e. feel free to ping me on a first PR :-)
[ -0.3135918378829956, -0.20290184020996094, -0.1356344074010849, -0.09008026123046875, -0.09441131353378296, -0.17342624068260193, 0.3951476812362671, 0.24535660445690155, -0.3127599060535431, 0.27071642875671387, -0.10963541269302368, 0.11686651408672333, -0.11426649242639542, 0.13000808656215668, 0.11526267975568771, -0.3554120659828186, -0.16473373770713806, 0.16061703860759735, -0.1079573929309845, -0.15049928426742554, 0.26098179817199707, 0.018786754459142685, -0.04072744399309158, -0.11909519135951996, -0.08603392541408539, -0.17446212470531464, -0.013266487047076225, -0.18201062083244324, 0.1001797690987587, 0.0498465970158577, -0.18141061067581177, 0.1622002124786377, -0.06376069039106369, 0.24163097143173218, -0.00010027129610534757, 0.03586988151073456, 0.0198773592710495, -0.24180492758750916, -0.09440073370933533, 0.12082374095916748, 0.1992056667804718, 0.07405304908752441, -0.2453388273715973, -0.17613673210144043, -0.3554410934448242, 0.09689567238092422, -0.03979499638080597, -0.05003679171204567, 0.3716909885406494, 0.502396821975708, 0.3055782616138458, 0.28369665145874023, -0.09111598879098892, 0.05735962465405464, 0.23097094893455505, 0.15835979580879211, -0.19940385222434998, -0.19832299649715424, 0.1893823742866516, 0.21777842938899994, -0.2660374939441681, 0.42281922698020935, -0.08625167608261108, -0.07377825677394867, -0.1338101625442505, 0.030646704137325287, -0.11968917399644852, -0.1718829721212387, -0.009096257388591766, 0.47644665837287903, 0.48019349575042725, -0.049353472888469696, -0.17685151100158691, -0.1964571475982666, 0.014349966309964657, -0.31323403120040894, -0.11303193122148514, -0.09838974475860596, -0.3130529820919037, 0.24900349974632263, 0.030620774254202843, -0.04272906109690666, -0.21393641829490662, 0.13052216172218323, 0.07629407942295074, 0.011997893452644348, -0.10094504803419113, -0.1705649197101593, -0.022421900182962418, -0.16720977425575256, -0.1254979819059372, 0.146316796541214, 0.18245911598205566, 0.07580633461475372, -0.42779386043548584, -0.2661473751068115, 0.18966957926750183, -0.39296624064445496, 0.2041817307472229, 0.0977039784193039, 0.1833261400461197, 0.2759025990962982, -0.36985814571380615, 0.13193556666374207, -0.0196090005338192, 0.1528903990983963, -0.05006980150938034, -0.20432956516742706, 0.15817919373512268, -0.3778086304664612, -0.18658392131328583, 0.08826656639575958, -0.07695749402046204, -0.05693548172712326, -0.03365384414792061, 0.05074319243431091, -0.27741527557373047, -0.01896905153989792, -0.18283304572105408, 0.12280203402042389, 0.09191732853651047, 0.14627283811569214, -0.06712497770786285, 0.2502868175506592, 0.12145590037107468, 0.37503522634506226, 0.0316149964928627, 0.13393191993236542, -0.06979046016931534, -0.3958028554916382, -0.21318216621875763, 0.18560363352298737, 0.002672530710697174, 0.0385291650891304, 0.17136327922344208, -0.10633674263954163, 0.1846543252468109, 0.03504890948534012, 0.18825702369213104, 0.05710116773843765, -0.11366704106330872, -0.00711181852966547, 0.21160200238227844, -0.06500948965549469, 0.03420131281018257, -0.05943386256694794, -0.0551891066133976, 0.04714800417423248, -0.15131673216819763, -0.026590898633003235, 0.03123614937067032, -0.1004488468170166, -0.4605141282081604, 0.301248162984848, 0.01772528514266014, -0.25990015268325806, -0.26234617829322815, 0.7171255350112915, 0.06734460592269897, -0.14630694687366486, 0.03233511745929718, 0.15125393867492676, -0.21006625890731812, -0.05087152123451233, 0.17407789826393127, 0.15841057896614075, -0.5402796268463135, 0.021782413125038147, -0.12550142407417297, 0.09864866733551025, 0.09812207520008087, 0.48157182335853577, -0.07884357869625092, 0.17467863857746124, -0.11467606574296951, 0.312786340713501, 0.028796955943107605, -0.30750617384910583, -0.04316330701112747, 0.20028704404830933, -0.24276123940944672, 0.006872763857245445, 0.12430478632450104, -0.07090230286121368, 0.42164096236228943, -0.022607335820794106, -0.08715808391571045, 0.3132592439651489, -0.17383140325546265, 0.18111713230609894, -0.1573587954044342, -0.33552613854408264, 0.018022160977125168, 0.12433840334415436, 0.004229981452226639, -0.09689704328775406, -0.1512528359889984, 0.06551846861839294, 0.14478671550750732, -0.30259695649147034, 0.22673659026622772, 0.12334682047367096, 0.17227433621883392, 0.09515801817178726, 0.003667370416224003, -0.27293118834495544, 0.03297202289104462, -0.24348700046539307, 0.41551700234413147, 0.356522798538208, 0.08914622664451599, -0.40215522050857544, -0.0786709263920784, -0.2524614632129669, 0.24313294887542725, -0.027300473302602768, 0.3375535011291504, 0.080184206366539, 0.07822374999523163, 0.09928657114505768, -0.16729918122291565, 0.21285206079483032, -0.20801039040088654, -0.17005765438079834, 0.02653752639889717, 0.178654283285141, -0.0007962062954902649, -0.1991286426782608, 0.1189926266670227, 0.3026108145713806, -0.2216370403766632, -0.0814381018280983, 0.04126539081335068, 0.12820471823215485, -0.33501753211021423, 0.3080260455608368, -0.12547466158866882, 0.20345501601696014, 0.06776309758424759, -0.37156298756599426, -0.08257041126489639, -0.0011237803846597672, -0.012245738878846169, -0.0729684978723526, 0.08618219941854477, 0.17860126495361328, 0.4598095118999481, -0.047728411853313446, 0.02404189109802246, -0.08101704716682434, 0.24506932497024536, -0.07246813923120499, 0.040998779237270355, -0.056968167424201965, 0.13677431643009186, 0.03543151542544365, 0.12985630333423615, -0.20704272389411926, -0.48389217257499695, 0.37116411328315735, 0.3321950435638428, -0.021550288423895836, 0.22175061702728271, 0.2145388126373291, -0.243319571018219, 0.004167333245277405, 0.02596316486597061, -0.3440958857536316, 0.04923597723245621, 0.28593921661376953, 0.14242547750473022, -0.198526069521904, 0.04951833188533783, -0.18197529017925262, 0.189217671751976, -0.11140970885753632, -0.14859040081501007, 0.3832981586456299, 0.1667470484972, 0.03010721504688263, -0.6629035472869873, -0.1687895804643631, -0.005433007143437862, 0.03870047628879547, -0.14218272268772125, 0.0490453839302063, -0.16512183845043182, -0.21142005920410156, 0.03288617357611656, 0.004718364682048559, 0.2011742889881134, 0.06532005220651627, 0.31438887119293213, 0.2804604470729828, -0.3485197126865387, 0.12206225097179413, 0.2489374279975891, 0.37009933590888977, 0.1855759620666504, -0.06529638171195984, -0.0748276561498642, -0.32716840505599976, -0.015143781900405884, 0.3038366436958313, 0.0531487911939621, 0.11881253123283386, 0.194608673453331, 0.03362786024808884, 0.16825059056282043, -0.1218978688120842, -0.3707178235054016, 0.24349316954612732, -0.34476834535598755, -0.03246035426855087, -0.034598544239997864, 0.16055919229984283, -0.253238707780838, -0.6958916187286377, -0.21308469772338867, -0.15392476320266724, -0.2912612855434418, 0.07790669053792953, -0.09105431288480759, -0.11121910810470581, -0.2269645631313324, -0.5343691110610962, -0.1877424269914627, -0.47457846999168396, 0.12276722490787506, -0.11891528964042664, 0.1604575216770172, 0.140274316072464, -0.013531380333006382, 0.24423573911190033, 0.06418347358703613, 0.23749274015426636, -0.3577747344970703, -0.10211937129497528, 0.2189091295003891, -0.42568230628967285, -0.2975468337535858, -0.2630826532840729, -0.2718891501426697, 0.1280815452337265, -0.19411419332027435, -0.3128373622894287, -0.06688784807920456, -0.10419093072414398, 0.27201613783836365, 0.02896757982671261, 0.014344345778226852, 0.2745601534843445, -0.06831542402505875, -0.23909173905849457, -0.11204494535923004, 0.06252416968345642, 0.2346588373184204, 0.2279709279537201, -0.07341625541448593, 0.0480140745639801, 0.12529659271240234, 0.07022391259670258, 0.43199223279953003, 0.08989226818084717, -0.2271111160516739, 0.29102379083633423, -0.11846766620874405, 0.09512387216091156, -0.15221711993217468, -0.05858650058507919, 0.4433010518550873, 0.09202373027801514, 0.02862686663866043, 0.5834921598434448, 0.0006578527390956879, -0.35723844170570374, -0.02804327756166458, -0.07582461833953857, -0.33860403299331665, -0.4225779175758362, 0.22800688445568085, -0.2304825484752655, 0.14434897899627686, -0.11304359138011932, -0.03396319970488548, -0.21764512360095978, -0.12872934341430664, 0.16177614033222198, 0.042301420122385025, -0.04230264574289322, -0.2436404526233673, -0.2129524052143097, 0.09287508577108383, -0.3292991518974304, 0.08342499285936356, 0.22849950194358826, 0.12968526780605316, -0.30308103561401367, -0.021350868046283722, -0.12254518270492554, 0.14148637652397156, 0.3529278635978699, -0.396820992231369, -0.10041895508766174, 0.036871861666440964, 0.2022870033979416, 0.018674494698643684, 0.22715623676776886, -0.2876044809818268, -0.3612651824951172, 0.10548076033592224, 0.13828463852405548, -0.30431458353996277, 0.11706355214118958, 0.24826779961585999, 0.2776799499988556, 0.020438749343156815, -0.05069514736533165, 0.12643307447433472, -0.22744369506835938, -0.09634354710578918, 0.27876004576683044, 0.28676295280456543, 0.10535156726837158, -0.030710494145751, -0.029759295284748077, 0.12091343104839325, -0.04171513766050339, 0.38418054580688477, 0.16418489813804626, 0.06530927121639252, 0.2980951964855194, 0.01814078539609909, -0.026659123599529266, -0.0762321799993515, -0.21256723999977112, 0.09041948616504669, 0.23879894614219666, -0.13721683621406555, -0.04799576848745346, -0.352750301361084, 0.3051823377609253, 0.19899798929691315, 0.08936341106891632, 0.29389387369155884, -0.2808287739753723, 0.00029212236404418945, -0.04072655364871025, 0.3377617299556732, 0.023879222571849823, 0.3601814806461334, -0.07041677087545395, -0.15198329091072083, 0.27931731939315796, -0.10214810073375702, -0.09845948964357376, 0.08744172751903534, 0.06028714030981064, -0.4435397684574127, 0.589177668094635, -0.15431568026542664, 0.9089158177375793, 0.21896915137767792, 0.0170862078666687, 0.2576355040073395, 0.28458666801452637, 0.36369049549102783, -0.2879091501235962, -0.03001656010746956, -0.02028878778219223, -0.3567582368850708, -0.034753695130348206, 0.16027258336544037, -0.20410987734794617, 0.31312841176986694, -0.4511931240558624, -0.14829008281230927, 0.025102242827415466, 0.1913514882326126, 0.16694752871990204, 0.3226736783981323, 0.1131129190325737, -0.5255575776100159, -0.1732088029384613, 0.31981271505355835, -0.03180617094039917, 0.014851395040750504, 0.1807440221309662, -0.1716456115245819, -0.06966506689786911, -0.064519003033638, -0.5459271669387817, -0.010036848485469818, -0.19372418522834778, 0.04141220822930336, -0.08679752051830292, -0.19172167778015137, 0.26148706674575806, 0.20964518189430237, 0.508446455001831, 0.21315264701843262, -0.18731249868869781, 0.06112683564424515, 0.3704646825790405, -0.0005314690060913563, 0.10795266181230545, 0.031178463250398636, 0.42110541462898254, -0.1615963876247406, -0.25716426968574524, 0.3356390595436096, 0.10222732275724411, -0.3018266558647156, 0.016406968235969543, -0.20703791081905365, 0.02633431926369667, -0.07421129941940308, -0.04799550026655197, 0.3940863609313965, -0.29428666830062866, -0.12660019099712372, 0.24836397171020508, 0.06365413963794708, -0.2801577150821686, 0.2340724766254425, 0.21452441811561584, 0.016386307775974274, 0.004316335543990135, 0.050622452050447464, 0.1471073031425476, -0.11797957867383957, 0.17858217656612396, 0.31092703342437744, -0.24538826942443848, -0.3903978168964386, -0.13373345136642456, -0.0372016467154026, -0.2979815602302551, 0.004086683504283428, 0.032724007964134216, -0.29139286279678345, -0.014237185008823872, 0.3977643847465515, 0.052774637937545776, 0.0963161364197731, -0.269914835691452, -0.05943030118942261, -0.37765267491340637, 0.152629092335701, -0.0500146858394146, 0.22758159041404724, 0.10176574438810349, 0.31049373745918274, -0.10884203016757965, 0.07757560163736343, -0.5076882243156433, -0.15577341616153717, -0.09807393699884415, 0.26906225085258484, 0.1499917060136795, -0.2598511874675751, 0.32129842042922974, -0.12100216746330261, 0.2775734066963196, 0.21119475364685059, -0.13814248144626617, -0.3977201282978058, -0.22860993444919586, 0.0425981730222702, 0.07852429151535034, -0.05642492324113846, 0.19786898791790009, 0.09708992391824722, -0.15228982269763947, -0.059474021196365356, 0.3948988914489746, 0.026704959571361542, -0.06405264139175415, 0.2757509648799896, -0.20312251150608063, 0.14293286204338074, 0.03916669636964798, -0.1797199249267578, 0.19957923889160156, 0.3040078282356262, 0.04211041331291199, -0.023622237145900726, 0.05231108516454697, -0.1599729359149933, 0.015615135431289673, 0.2785508930683136, 0.15914314985275269, 0.091173455119133, 0.033341456204652786, 0.011888578534126282, -0.10418466478586197, 0.1692630797624588, 0.26148200035095215, -0.07039397954940796, -0.07439311593770981, -0.07250599563121796, 0.33817070722579956, 0.4178314208984375, -0.297015517950058, 0.21863532066345215, -0.028761327266693115, -0.1267048865556717, 0.4455680251121521, 0.18585726618766785, 0.09130556881427765, -0.17364084720611572, 0.23639905452728271, -0.0006351415067911148, 0.05562755465507507, -0.28833985328674316, -0.06279401481151581, 0.29784005880355835, 0.04949018731713295, -0.08087320625782013, -0.08899006247520447, 0.010366978123784065, 0.17532598972320557, 0.1409883350133896, -0.06307629495859146, -0.03073113225400448, 0.1002281978726387, 0.07430148869752884, 0.22036707401275635, 0.14392004907131195, 0.14918167889118195, 0.17895053327083588, -0.0741603672504425, 0.42789679765701294, 0.10565651208162308, 0.5779929161071777, 0.037736788392066956, -0.24221624433994293, -0.13452482223510742, 0.2846134305000305, -0.1434827744960785, -0.139008566737175, -0.20512230694293976, 0.007897689938545227, -0.2735421061515808, -0.17610719799995422, 0.09806601703166962, -0.03381776809692383, 0.04222037270665169, 0.16690118610858917, 0.09473468363285065, -0.16276760399341583, 0.059597257524728775, -0.19496124982833862, 0.43108099699020386, -0.08275455981492996, 0.41864997148513794, 0.08474469184875488, -0.0516485795378685, 0.2059144228696823, 0.30116620659828186, 0.1284252256155014, -0.0732085332274437, -0.1896914690732956, 0.3481341004371643, -0.3077969551086426, -0.0978325828909874, -0.035919010639190674, 0.19711387157440186, 0.1357991099357605, 0.07809890061616898, 0.3506542444229126, 0.25265708565711975, -0.3112093508243561, 0.006893329322338104, 0.33364200592041016, -0.14129497110843658, -0.17269571125507355, -0.13459530472755432, 0.1831061840057373, 0.07954015582799911, -0.43023285269737244, -0.2678377628326416, -0.34920281171798706, -0.0984339788556099, 0.19776178896427155, -0.2554281949996948, 0.05898769199848175, -0.024462375789880753, 0.1720590889453888, -0.1596452295780182, 0.39295485615730286, 0.2837272584438324, 0.14505267143249512, 0.11311207711696625, -0.18266192078590393, -0.30593985319137573, 0.1112307459115982, 0.1325528472661972, -0.1681922972202301, -0.10267478972673416, 0.24178309738636017, 0.4334302246570587, 0.3608555793762207, -0.2598477602005005, -0.3130655884742737, -0.4221872091293335, 0.14063450694084167, -0.39727720618247986, 0.20493413507938385, -0.1943046599626541, 0.30619046092033386, 0.1239069402217865, -0.24408894777297974, -0.0033427663147449493, 0.18472960591316223, 0.24054491519927979, -0.12634414434432983, 0.055918388068675995, -0.037694428116083145, -0.02318751811981201, 0.07445620000362396, -0.0875551626086235, 0.4160727262496948, -0.29852238297462463, 0.12737475335597992, -0.018521752208471298, -0.09088139981031418, -0.41275930404663086, 0.09186868369579315, 0.28574007749557495, 0.4848058521747589, 0.08880892395973206, 0.0900765061378479, 0.14291392266750336, 0.22588831186294556, 0.3520895838737488, -0.13153642416000366, -0.20650985836982727, 0.3613704442977905, -0.10262120515108109, 0.0066010719165205956, -0.09532544016838074, 0.3508930206298828, -0.10210895538330078, 0.015101155266165733, -0.11702293157577515, -0.7033888101577759, 0.20561236143112183, -0.32499662041664124, -0.2951773703098297, 0.11375850439071655, 0.2534714341163635, 0.4059825837612152, -0.037042975425720215, -0.4826188385486603, 0.019771188497543335, 0.09278199076652527, -0.01572972536087036, -0.07632382214069366, 0.22840268909931183, 0.08689934015274048, -0.11178464442491531, -0.1107381135225296, 0.2959780693054199, 0.16668346524238586, -0.04890386015176773, -0.2599647343158722, -0.4588920474052429 ]
https://github.com/huggingface/datasets/issues/1835
Add CHiME4 dataset
Hey @patrickvonplaten, I have managed to download the zip on [here]( http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html) and successfully uploaded all the files on a hugging face dataset: https://huggingface.co/datasets/ksbai123/Chime4 However I am getting this error when trying to use the dataset viewer: ![Screenshot 2023-12-27 at 18 40 59](https://github.com/huggingface/datasets/assets/35923560/a5a9ed3d-8dbd-41c4-b83a-4e80728b1450) Can you take a look and let me know if I have missed any files please
## Adding a Dataset - **Name:** Chime4 - **Description:** Chime4 is a dataset for automatic speech recognition. It is especially useful for evaluating models in a noisy environment and for multi-channel ASR - **Paper:** Dataset comes from a channel: http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/ . Results paper: - **Data:** http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html - **Motivation:** So far there are very little datasets for speech in `datasets`. Only `lbirispeech_asr` so far. If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
59
Add CHiME4 dataset ## Adding a Dataset - **Name:** Chime4 - **Description:** Chime4 is a dataset for automatic speech recognition. It is especially useful for evaluating models in a noisy environment and for multi-channel ASR - **Paper:** Dataset comes from a channel: http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/ . Results paper: - **Data:** http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html - **Motivation:** So far there are very little datasets for speech in `datasets`. Only `lbirispeech_asr` so far. If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Hey @patrickvonplaten, I have managed to download the zip on [here]( http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html) and successfully uploaded all the files on a hugging face dataset: https://huggingface.co/datasets/ksbai123/Chime4 However I am getting this error when trying to use the dataset viewer: ![Screenshot 2023-12-27 at 18 40 59](https://github.com/huggingface/datasets/assets/35923560/a5a9ed3d-8dbd-41c4-b83a-4e80728b1450) Can you take a look and let me know if I have missed any files please
[ -0.31192660331726074, -0.13228026032447815, -0.04796861112117767, 0.26990216970443726, 0.2633964419364929, 0.31428033113479614, 0.007615257054567337, 0.2430901825428009, 0.11598415672779083, 0.2912293076515198, -0.22295306622982025, -0.0876038521528244, -0.42077338695526123, 0.34963494539260864, 0.03793933987617493, -0.21347394585609436, -0.015759050846099854, 0.14367082715034485, 0.11318064481019974, -0.043641459196805954, -0.11352603882551193, 0.3465288281440735, 0.03485614061355591, 0.01400534063577652, -0.35702231526374817, -0.2578825056552887, -0.09577886760234833, 0.012060623615980148, -0.3721606433391571, -0.41364726424217224, 0.10544651746749878, 0.020216872915625572, 0.13378167152404785, 0.5812034010887146, -0.00011168149649165571, -0.0003664866089820862, 0.3452834486961365, -0.016200728714466095, -0.3210599422454834, -0.3219906687736511, 0.0032369904220104218, -0.23890146613121033, -0.04339482635259628, 0.15054988861083984, -0.1978333294391632, -0.16066309809684753, 0.2722252905368805, -0.4404946565628052, 0.22688941657543182, 0.45268577337265015, 0.22544175386428833, 0.23824700713157654, 0.2410232275724411, -0.37161096930503845, 0.13071030378341675, 0.10830524563789368, -0.07819393277168274, 0.13069605827331543, 0.08581804484128952, 0.2377331554889679, -0.08202414959669113, 0.2847593426704407, 0.14843972027301788, -0.0945822149515152, 0.3206191956996918, -0.03416473791003227, -0.2219393253326416, -0.274614542722702, 0.0153400469571352, 0.19545599818229675, 0.5969693064689636, -0.17184004187583923, -0.22160588204860687, -0.3247283399105072, 0.10133331269025803, -0.24383527040481567, 0.2414945662021637, 0.11297085136175156, -0.17695079743862152, 0.15024495124816895, -0.24733935296535492, -0.1628618687391281, -0.1254645735025406, 0.2819215953350067, 0.0931568294763565, -0.176577627658844, -0.23118825256824493, 0.03629135712981224, 0.25923779606819153, -0.23561282455921173, 0.0438990518450737, 0.09827424585819244, 0.03019689954817295, 0.20169135928153992, -0.25894880294799805, 0.002626512199640274, 0.14000344276428223, 0.34667345881462097, 0.053387127816677094, -0.04703052341938019, -0.2940131723880768, -0.08896828442811966, -0.14670203626155853, 0.06559018790721893, 0.1283971071243286, 0.19874541461467743, 0.15726569294929504, -0.15560074150562286, 0.17389492690563202, 0.35045892000198364, 0.22439613938331604, -0.13516029715538025, -0.06989774107933044, -0.25906237959861755, -0.25671523809432983, -0.23025760054588318, 0.2479517012834549, -0.10871367156505585, -0.3544614315032959, 0.1331726312637329, -0.06410622596740723, -0.12105932086706161, 0.1839228719472885, 0.4411720037460327, 0.15152022242546082, -0.13630229234695435, 0.17164242267608643, 0.17817287147045135, 0.017936138436198235, -0.44055938720703125, -0.1965065747499466, 0.19213522970676422, -0.12449641525745392, 0.018787957727909088, 0.24327145516872406, -0.2381400167942047, 0.21320943534374237, -0.21516525745391846, 0.5628033876419067, 0.19751210510730743, -0.21164575219154358, -0.05292303487658501, -0.21021470427513123, 0.24393188953399658, 0.16609373688697815, 0.2560020983219147, 0.02509990520775318, -0.0947670191526413, -0.05096840858459473, -0.15186938643455505, 0.14704656600952148, -0.1301797330379486, -0.22472776472568512, 0.15838515758514404, -0.35371196269989014, -0.09619010984897614, -0.3049856126308441, 0.2762683928012848, -0.08873633295297623, -0.32587265968322754, -0.05612590163946152, -0.03180631995201111, -0.3951067328453064, -0.13892871141433716, 0.254009872674942, 0.5785956382751465, -0.19547657668590546, -0.15019908547401428, -0.07934121042490005, -0.20853763818740845, -0.09724991768598557, 0.2840214967727661, -0.11288697272539139, 0.08573197573423386, -0.3350710868835449, 0.23012135922908783, 0.19337071478366852, -0.3534910976886749, -0.5367321968078613, 0.1466640830039978, -0.17902697622776031, 0.19219592213630676, 0.06683126837015152, 0.06622952967882156, -0.030478760600090027, -0.025828199461102486, 0.04954729601740837, -0.11928288638591766, 0.049864448606967926, -0.1415829360485077, -0.2081974297761917, -0.25984784960746765, 0.27152934670448303, 0.3765076696872711, -0.0028828009963035583, -0.00836627185344696, 0.2657613754272461, -0.15809829533100128, 0.06334839016199112, -0.19983810186386108, 0.2323186844587326, -0.009671013802289963, 0.3785525858402252, 0.22021204233169556, -0.0019331021467223763, -0.254070520401001, -0.41038236021995544, 0.12746268510818481, 0.045622386038303375, 0.19928385317325592, -0.08591580390930176, 0.04489396512508392, -0.1372068226337433, -0.13188409805297852, -0.3137221932411194, -0.047597434371709824, 0.13458263874053955, 0.20627672970294952, -0.013863649219274521, -0.04184918850660324, -0.2270851880311966, 0.5659130215644836, -0.08021747320890427, 0.1715680956840515, -0.28661999106407166, 0.26658183336257935, -0.18442657589912415, -0.10425575077533722, 0.2329811155796051, 0.13563653826713562, 0.19450989365577698, -0.056952860206365585, -0.007924890145659447, 0.42641153931617737, -0.1029948890209198, 0.22096168994903564, 0.06525605171918869, -0.010445758700370789, 0.17471061646938324, -0.5851085186004639, 0.11152461171150208, 0.14941872656345367, -0.0005746632814407349, 0.04422527551651001, -0.05558507889509201, -0.023668840527534485, 0.1250988394021988, -0.03549966961145401, 0.023335754871368408, 0.21630749106407166, 0.25715550780296326, 0.11393097043037415, -0.07253779470920563, -0.006307240575551987, 0.45174160599708557, -0.15737807750701904, 0.3959274888038635, -0.2558273375034332, -0.37724679708480835, -0.1032853052020073, 0.1456107348203659, -0.10791358351707458, -0.015920542180538177, 0.23783332109451294, -0.1557011902332306, -0.022709272801876068, -0.04177442938089371, 0.13736067712306976, 0.17513898015022278, 0.23177523910999298, -0.15125875174999237, 0.22717687487602234, 0.010926857590675354, -0.05049172788858414, 0.04961175471544266, 0.18940061330795288, 0.004031375050544739, 0.27054664492607117, 0.08801009505987167, -0.08979887515306473, -0.3804919719696045, -0.11662180721759796, -0.044502321630716324, 0.2736305594444275, -0.43682658672332764, -0.30980920791625977, 0.09699136018753052, -0.24321237206459045, 0.0037687281146645546, -0.025944698601961136, -0.25779107213020325, -0.21719299256801605, -0.03731319308280945, -0.04789857193827629, 0.03263802453875542, -0.007275084033608437, -0.21300169825553894, 0.332755982875824, -0.05452883243560791, 0.07833518087863922, -0.22479353845119476, 0.12457463145256042, -0.20557421445846558, 0.08617986738681793, 0.36038434505462646, 0.219045951962471, 0.32086095213890076, -0.21356302499771118, 0.38992607593536377, -0.42191797494888306, -0.3704264163970947, 0.1494254618883133, -0.24730269610881805, 0.6341574788093567, 0.3712693750858307, 0.06381621956825256, -0.28586345911026, -0.4522767961025238, 0.21208210289478302, -0.14762935042381287, -0.2442854940891266, -0.12766823172569275, -0.03039877861738205, -0.15911175310611725, 0.036829691380262375, -0.2254132628440857, -0.1944168657064438, -0.49481362104415894, 0.5265605449676514, -0.015169264748692513, 0.05108066275715828, 0.22986388206481934, 0.0016187522560358047, 0.41407033801078796, -0.10997418314218521, 0.0794367715716362, -0.28969189524650574, -0.4462974965572357, 0.4615422487258911, -0.25387442111968994, -0.3562825918197632, 0.23805910348892212, 0.12779809534549713, 0.18641112744808197, -0.07395613938570023, -0.33742755651474, -0.0017227157950401306, -0.16528956592082977, 0.13896474242210388, 0.1446223258972168, -0.1310846358537674, 0.38643479347229004, -0.09229526668787003, 0.012706207111477852, -0.19388800859451294, -0.3520001173019409, 0.17330807447433472, 0.12441051006317139, 0.2441239058971405, -0.2811897397041321, 0.2640989124774933, -0.019111020490527153, 0.38766157627105713, 0.33113402128219604, -0.09162935614585876, 0.3324519395828247, 0.023427361622452736, 0.43219608068466187, -0.06760216504335403, -0.477611780166626, 0.2245969921350479, -0.1066179871559143, -0.058921851217746735, 0.32218459248542786, -0.011440413072705269, 0.005647130310535431, -0.31142303347587585, -0.17094822227954865, -0.34188857674598694, -0.1391722410917282, -0.1885422170162201, 0.1916550099849701, 0.14687223732471466, -0.06378409266471863, -0.05212573707103729, 0.008727466687560081, -0.22235259413719177, 0.3237065076828003, 0.5018467903137207, 0.13166335225105286, 0.08855082094669342, -0.6544902920722961, -0.12183425575494766, -0.3889946937561035, 0.4525343179702759, 0.04945099353790283, 0.1668769121170044, -0.1823500096797943, -0.06092101335525513, 0.0410618782043457, 0.01743220165371895, 0.634593665599823, -0.2763255834579468, -0.2677827477455139, -0.017352398484945297, 0.2518268823623657, -0.10233113169670105, 0.13640065491199493, -0.16088883578777313, -0.029769470915198326, -0.005713623017072678, 0.28271597623825073, -0.14001089334487915, -0.010199065320193768, 0.18496578931808472, 0.10656705498695374, 0.08094903826713562, -0.16082559525966644, -0.15240854024887085, -0.3249526619911194, -0.2075636386871338, -0.12838095426559448, 0.035719819366931915, 0.24100124835968018, 0.13902121782302856, 0.246083065867424, 0.14973857998847961, -0.05641283467411995, 0.5007348656654358, -0.0014171665534377098, 0.34725987911224365, 0.279021680355072, 0.27380335330963135, 0.7657777070999146, 0.09384390711784363, 0.4171401262283325, 0.5336331725120544, -0.2172122597694397, -0.5801582336425781, 0.18656688928604126, 0.06673294305801392, 0.33624258637428284, 0.24787089228630066, 0.03309980034828186, -0.12441455572843552, 0.07249951362609863, 0.17252250015735626, -0.01018471922725439, 0.30255216360092163, 0.3117864727973938, 0.011301427148282528, -0.16894689202308655, -0.32311126589775085, 0.27699726819992065, -0.15204750001430511, 0.022955767810344696, 0.1688355803489685, 0.4376377463340759, -0.09005015343427658, 0.05398021265864372, -0.03500320762395859, 0.9618146419525146, -0.11233671009540558, 0.04683519899845123, 0.31717225909233093, -0.2685677707195282, 0.19694450497627258, -0.3190538287162781, 0.16685038805007935, -0.013677656650543213, -0.15721113979816437, -0.10722314566373825, -0.07293292880058289, 0.2614695131778717, -0.06535737216472626, -0.29326972365379333, 0.08538567274808884, -0.03103785589337349, -0.022281181067228317, 0.042784783989191055, 0.3272000253200531, -0.2536594569683075, -0.24218764901161194, -0.21752065420150757, 0.17229816317558289, -0.08936755359172821, 0.2671866714954376, 0.02629571408033371, -0.09780426323413849, -0.16494117677211761, -0.3497897982597351, -0.2525058686733246, -0.0164068304002285, -0.33627796173095703, -0.24616412818431854, 0.04756192862987518, -0.1399671882390976, 0.7050907015800476, 0.46054646372795105, 0.29226383566856384, 0.08168616890907288, -0.30752819776535034, 0.23501279950141907, 0.024603143334388733, -0.15891461074352264, -0.08123556524515152, -0.10714096575975418, 0.21131150424480438, -0.04199760779738426, -0.09405332058668137, 0.2799619734287262, 0.007647273130714893, -0.17182642221450806, -0.3571353256702423, -0.05059710144996643, -0.20709247887134552, -0.5399720072746277, -0.11138896644115448, -0.12498179078102112, 0.13062001764774323, -0.18883344531059265, 0.10948537290096283, 0.26885366439819336, -0.2226906567811966, -0.30817943811416626, 0.17550742626190186, -0.13080453872680664, 0.08090640604496002, 0.2716748118400574, -0.13195309042930603, -0.47285422682762146, 0.6605608463287354, 0.20236952602863312, -0.3572245240211487, -0.157006174325943, -0.12207196652889252, 0.3417244553565979, -0.26123949885368347, 0.004661092069000006, -0.050108931958675385, 0.0463482141494751, -0.09219909459352493, 0.33722764253616333, 0.1412482112646103, -0.13084697723388672, 0.26393967866897583, -0.32028377056121826, -0.43748894333839417, 0.35024142265319824, -0.09300239384174347, 0.286968469619751, 0.015194829553365707, 0.13654248416423798, 0.205205038189888, -0.0449293777346611, -0.317947119474411, 0.20868302881717682, -0.11757916957139969, 0.04544484615325928, 0.36434271931648254, -0.23744764924049377, 0.3045584261417389, -0.1390235871076584, 0.10650317370891571, 0.09700605273246765, -0.3940257728099823, -0.11965503543615341, -0.0020925644785165787, 0.117249496281147, 0.060046158730983734, -0.14158974587917328, 0.311799556016922, 0.010386589914560318, -0.06664830446243286, 0.027906933799386024, -0.09492625296115875, 0.19988545775413513, -0.1535179764032364, -0.1577201932668686, 0.16315792500972748, -0.2609677016735077, 0.06287243217229843, -0.05182319134473801, 0.1650657057762146, 0.02349095791578293, 0.11579704284667969, 0.04833170026540756, -0.03414549678564072, 0.01592668890953064, 0.42078885436058044, 0.3227647840976715, 0.28547215461730957, 0.01796233095228672, 0.17340503633022308, -0.3838646411895752, -0.019223527982831, 0.30585962533950806, 0.3026346266269684, 0.10523861646652222, -0.3324379026889801, 0.08247023820877075, 0.35780367255210876, 0.16787011921405792, -0.3606736660003662, 0.06467430293560028, 0.26083335280418396, -0.1318405568599701, 0.1150202751159668, -0.041091255843639374, 0.26415494084358215, 0.07218104600906372, -0.0665273368358612, 0.051835112273693085, 0.20631423592567444, -0.004241416230797768, 0.24641431868076324, 0.45966488122940063, -0.23024076223373413, -0.06456312537193298, 0.29328060150146484, 0.19423918426036835, 0.043430112302303314, 0.587358295917511, -0.4469188451766968, 0.2656036615371704, -0.24548965692520142, 0.21925857663154602, 0.10263517498970032, -0.49762463569641113, 0.11740852892398834, 0.25299549102783203, -0.08425435423851013, 0.13747882843017578, -0.16437092423439026, 0.7322641015052795, -0.025817766785621643, 0.04315664991736412, -0.035664644092321396, 0.22380688786506653, -0.11281337589025497, -0.036394644528627396, 0.07289354503154755, -0.33137673139572144, -0.43027567863464355, -0.07824946939945221, 0.05409979075193405, -0.2889731526374817, 0.1687881350517273, 0.08970572054386139, -0.11019057035446167, 0.03520361706614494, -0.20427551865577698, 0.11425431817770004, 0.0028584375977516174, -0.31428954005241394, 0.271429181098938, 0.25018370151519775, -0.23023396730422974, 0.36040568351745605, 0.3603852093219757, 0.4714696407318115, 0.010501531884074211, -0.1319412738084793, 0.3052126467227936, -0.028518609702587128, -0.08358875662088394, 0.14041723310947418, 0.28294238448143005, 0.27877289056777954, 0.3035924434661865, 0.35098010301589966, 0.06813075393438339, -0.16865326464176178, -0.14108724892139435, -0.1391499787569046, 0.25618842244148254, -0.47526392340660095, 0.009644433856010437, -0.4066724181175232, -0.04121582955121994, -0.4085592031478882, -0.24573013186454773, -0.46857908368110657, 0.011002056300640106, 0.2580430805683136, -0.17375977337360382, -0.037263594567775726, -0.04910377040505409, 0.06977254152297974, 0.03347569704055786, 0.27744337916374207, 0.5939767360687256, 0.22555062174797058, -0.23406703770160675, -0.49449944496154785, -0.7815812826156616, 0.06333483010530472, 0.023442625999450684, 0.08442408591508865, -0.15355153381824493, 0.008033528923988342, 0.2794210612773895, -0.059886492788791656, 0.3103402256965637, 0.022275641560554504, -0.13577741384506226, -0.008581139147281647, 0.09591390192508698, 0.01785958744585514, 0.1770617514848709, 0.11703647673130035, 0.07383366674184799, -0.04291635751724243, 0.05130323767662048, 0.24277016520500183, -0.009832128882408142, -0.13470332324504852, 0.2541217803955078, -0.4292495548725128, -0.6103613376617432, 0.2311718463897705, 0.036063238978385925, 0.7028793096542358, -0.17711865901947021, -0.15505288541316986, -0.18143895268440247, -0.18091829121112823, -0.14723239839076996, 0.1623683124780655, 0.1325996071100235, 0.6855696439743042, -0.14995066821575165, -0.052146587520837784, -0.25813624262809753, 0.1825374811887741, 0.10692146420478821, -0.03179829567670822, -0.5245819091796875, 0.19856496155261993, -0.41341787576675415, 0.05802035331726074, 0.24311064183712006, 0.18154498934745789, 0.03269378840923309, -0.0491965115070343, -0.28534364700317383, -0.33011695742607117, 0.622359037399292, -0.5937329530715942, -0.23092852532863617, -0.2023378163576126, 0.08926781266927719, 0.27779003977775574, -0.18301033973693848, -0.7285786271095276, -0.022058874368667603, 0.2613418698310852, 0.0668315440416336, -0.03376466780900955, 0.2657727897167206, -0.147340789437294, -0.17932824790477753, 0.053484443575143814, 0.4391355812549591, 0.30811211466789246, -0.0838489830493927, 0.1571568101644516, -0.3364490866661072 ]
https://github.com/huggingface/datasets/issues/1835
Add CHiME4 dataset
Hi @KossaiSbai, Thanks for your contribution. As the issue is not strictly related to the `datasets` library, but to the specific implementation of the CHiME4 dataset, I have opened an issue in the Discussion tab of the dataset: https://huggingface.co/datasets/ksbai123/Chime4/discussions/2 Let's continue the discussion there!
## Adding a Dataset - **Name:** Chime4 - **Description:** Chime4 is a dataset for automatic speech recognition. It is especially useful for evaluating models in a noisy environment and for multi-channel ASR - **Paper:** Dataset comes from a channel: http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/ . Results paper: - **Data:** http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html - **Motivation:** So far there are very little datasets for speech in `datasets`. Only `lbirispeech_asr` so far. If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
44
Add CHiME4 dataset ## Adding a Dataset - **Name:** Chime4 - **Description:** Chime4 is a dataset for automatic speech recognition. It is especially useful for evaluating models in a noisy environment and for multi-channel ASR - **Paper:** Dataset comes from a channel: http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/ . Results paper: - **Data:** http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html - **Motivation:** So far there are very little datasets for speech in `datasets`. Only `lbirispeech_asr` so far. If interested in tackling this issue, feel free to tag @patrickvonplaten Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Hi @KossaiSbai, Thanks for your contribution. As the issue is not strictly related to the `datasets` library, but to the specific implementation of the CHiME4 dataset, I have opened an issue in the Discussion tab of the dataset: https://huggingface.co/datasets/ksbai123/Chime4/discussions/2 Let's continue the discussion there!
[ -0.28923505544662476, -0.005949549376964569, -0.05206134170293808, 0.1703219711780548, 0.12225434184074402, 0.05769725888967514, 0.24907836318016052, 0.029373809695243835, -0.03208685293793678, 0.30227863788604736, -0.20700393617153168, 0.17952492833137512, -0.318153440952301, 0.16968895494937897, 0.06506465375423431, 0.0835811197757721, -0.06571958214044571, 0.10337167978286743, 0.15290194749832153, -0.0029283761978149414, -0.07256964594125748, 0.19426970183849335, -0.12189019471406937, 0.05446862429380417, -0.31929484009742737, -0.30548304319381714, 0.12204605340957642, -0.14632105827331543, -0.26345083117485046, -0.3970942795276642, 0.14942249655723572, 0.11757174134254456, -0.1678617298603058, 0.5507079362869263, -0.00010046709940070286, -0.0435497984290123, 0.2938464283943176, 0.05707057565450668, -0.41307130455970764, -0.16513757407665253, 0.010717682540416718, -0.004937709774821997, -0.09927356243133545, 0.13545605540275574, -0.19187763333320618, 0.0070325396955013275, 0.07649606466293335, -0.2820594906806946, 0.1045171320438385, 0.3954724967479706, 0.31377455592155457, 0.16453248262405396, -0.05045510083436966, -0.16526393592357635, 0.12549789249897003, 0.10699405521154404, -0.09450024366378784, 0.11288104951381683, 0.25034159421920776, 0.19600129127502441, -0.2853313088417053, 0.32340729236602783, 0.20082375407218933, -0.08775335550308228, 0.13786205649375916, -0.14790590107440948, -0.26839500665664673, -0.0509810596704483, 0.049926161766052246, 0.2997960150241852, 0.43560677766799927, -0.3005894422531128, -0.3307936489582062, -0.3549146354198456, 0.1535700410604477, -0.36054444313049316, 0.1956254541873932, -0.013383764773607254, -0.18161576986312866, 0.21794873476028442, -0.045610055327415466, -0.13455577194690704, -0.0003239437937736511, 0.15087184309959412, 0.08614590764045715, 0.07397262752056122, -0.21529483795166016, -0.041795261204242706, 0.056240878999233246, -0.27996206283569336, 0.11782769858837128, 0.1322353184223175, 0.013606585562229156, 0.08104639500379562, -0.3757683038711548, 0.0018663480877876282, 0.27267688512802124, 0.25079435110092163, 0.2582743763923645, -0.1909073293209076, -0.13002711534500122, 0.15401947498321533, -0.032006796449422836, 0.04251439496874809, 0.1688101589679718, 0.17841345071792603, 0.17602598667144775, -0.30445584654808044, 0.38275277614593506, 0.3132665455341339, 0.08168447017669678, -0.030554793775081635, 0.016210857778787613, -0.0770401656627655, -0.07966714352369308, -0.1949191391468048, 0.2174479216337204, -0.10522479563951492, -0.4847254157066345, 0.21410143375396729, -0.12494178861379623, -0.05249403044581413, 0.21576064825057983, 0.3441837728023529, 0.23325438797473907, 0.024430422112345695, 0.14758682250976562, 0.054983124136924744, -0.024929983541369438, -0.35231953859329224, -0.27230319380760193, 0.0915692001581192, -0.18358653783798218, 0.17108827829360962, 0.1115109920501709, 0.10672450065612793, 0.308534175157547, -0.06427605450153351, 0.6038286685943604, 0.1716325283050537, -0.20235268771648407, -0.04183965548872948, -0.17634376883506775, 0.1446264684200287, -0.05472417175769806, 0.24680744111537933, -0.23863716423511505, 0.06792071461677551, -0.08857070654630661, -0.1670936942100525, 0.18305128812789917, -0.07195203751325607, -0.18925067782402039, 0.2946583032608032, -0.1755491942167282, -0.058004193007946014, -0.30836766958236694, 0.40255317091941833, 0.06737015396356583, -0.2654589116573334, 0.05275500938296318, -0.11583453416824341, -0.4334842264652252, -0.1229223906993866, 0.11480363458395004, 0.3998834490776062, -0.09706936776638031, -0.12678056955337524, 0.043673671782016754, -0.040949273854494095, -0.08396648615598679, 0.406527578830719, -0.30933254957199097, 0.054591283202171326, -0.18337398767471313, 0.2783418297767639, 0.1318659484386444, -0.21625147759914398, -0.5740477442741394, -0.09006789326667786, -0.16879819333553314, 0.23258523643016815, 0.0431198850274086, -0.036421217024326324, -0.03384928032755852, 0.017550991848111153, 0.3038676381111145, 0.08252288401126862, 0.013821295462548733, -0.0662822499871254, -0.23371799290180206, -0.3215065896511078, 0.21260936558246613, 0.21419870853424072, -0.07821324467658997, -0.042040012776851654, 0.10455159842967987, -0.05111151188611984, 0.1352909356355667, -0.272683322429657, 0.22430498898029327, 0.11138460040092468, 0.4814254939556122, 0.09378888458013535, 0.08229684829711914, -0.4310677945613861, -0.22900670766830444, 0.10678762942552567, 0.02747948467731476, 0.33584994077682495, -0.06501844525337219, -0.1480509340763092, -0.09611962735652924, -0.06682368367910385, -0.17985394597053528, -0.1615089774131775, 0.2851908206939697, 0.2841593027114868, -0.12456449866294861, -0.07740520685911179, -0.16173121333122253, 0.6100730895996094, -0.3275911211967468, -0.015632377937436104, -0.1912120282649994, 0.14436951279640198, -0.14451605081558228, -0.34842649102211, 0.20829260349273682, 0.34734687209129333, 0.05026906728744507, 0.016157688573002815, 0.021811578422784805, 0.48691436648368835, -0.1264752745628357, 0.1692025363445282, -0.12033190578222275, 0.007743537425994873, 0.06829166412353516, -0.4196716845035553, 0.07575047761201859, 0.17931167781352997, 0.014592972584068775, 0.1384812295436859, 0.042821548879146576, 0.06722360849380493, 0.27525821328163147, -0.11246759444475174, 0.1719789355993271, 0.06740651279687881, 0.35291787981987, 0.04077189788222313, -0.16207414865493774, 0.008591040968894958, 0.26722779870033264, -0.1953781694173813, 0.34796467423439026, -0.02529394067823887, -0.43308714032173157, 0.07454507797956467, 0.32389524579048157, 0.04826342687010765, 0.2533513009548187, 0.23321470618247986, -0.2642843425273895, -0.21676340699195862, -0.013330167159438133, 0.05714311823248863, 0.1548423171043396, 0.2918069064617157, -0.007950101047754288, -0.024586854502558708, -0.07267200201749802, -0.037684738636016846, 0.07251957058906555, 0.15164485573768616, -0.05175848305225372, 0.2833676338195801, 0.33334359526634216, -0.10449440032243729, -0.5292514562606812, -0.21464313566684723, -0.1332159787416458, 0.23966512084007263, -0.4235323965549469, -0.2587355673313141, -0.07769948244094849, -0.013670511543750763, 0.0017483718693256378, -0.017049409449100494, -0.08174842596054077, -0.09604744613170624, 0.15145185589790344, -0.07955369353294373, -0.059537287801504135, 0.09260953217744827, -0.23186355829238892, 0.18505096435546875, -0.04962866008281708, 0.18110565841197968, -0.16174545884132385, 0.029730631038546562, -0.2545028328895569, 0.15634332597255707, 0.06149926781654358, 0.28555840253829956, 0.2835637927055359, -0.040869444608688354, 0.1812330037355423, -0.25725674629211426, -0.4415319263935089, 0.22001239657402039, -0.1414942592382431, 0.6672658324241638, 0.3127508759498596, -0.04937414824962616, -0.3119926452636719, -0.4321047365665436, 0.009860141202807426, -0.2585868835449219, -0.3040759563446045, 0.04605765640735626, -0.10031376779079437, -0.04222811758518219, -0.08664645254611969, -0.4768425524234772, -0.08785802125930786, -0.5306153297424316, 0.39510875940322876, -0.24605309963226318, 0.009605631232261658, 0.35493287444114685, -0.03952186927199364, 0.28877905011177063, -0.22240838408470154, 0.2636883854866028, -0.40810340642929077, -0.2882216274738312, 0.3493463695049286, -0.22798147797584534, -0.2805379033088684, -0.09115341305732727, 0.0011946801096200943, 0.14432507753372192, 0.06681330502033234, -0.2123108059167862, -0.08542446047067642, -0.16416476666927338, 0.20613017678260803, 0.06537354737520218, -0.11639446020126343, 0.3643489480018616, -0.011398207396268845, -0.16768215596675873, -0.2892068922519684, -0.4490451216697693, 0.2349044680595398, 0.2682667076587677, 0.06595753133296967, -0.18852365016937256, 0.2711668610572815, 0.08033369481563568, 0.42265480756759644, 0.15113912522792816, -0.18958361446857452, 0.33894532918930054, 0.09656660258769989, 0.419159859418869, -0.08451665192842484, -0.29018837213516235, 0.3283100128173828, 0.028581686317920685, -0.057434797286987305, 0.41420823335647583, 0.003093188628554344, -0.10146582871675491, -0.05420529097318649, -0.21076500415802002, -0.2490575909614563, -0.245687797665596, -0.13351142406463623, 0.19437535107135773, 0.2993963062763214, -0.030966565012931824, -0.0624554343521595, 0.027256596833467484, -0.11168723553419113, 0.1951056271791458, 0.22567403316497803, 0.013262882828712463, -0.12466029822826385, -0.7161917090415955, 0.0912434384226799, -0.3009832203388214, 0.19742140173912048, 0.16871076822280884, 0.44443222880363464, -0.1484881490468979, -0.19966647028923035, -0.0011888667941093445, -0.026645300909876823, 0.344001829624176, -0.2530178129673004, -0.15427371859550476, 0.11717183887958527, 0.46750348806381226, -0.06939972937107086, 0.21061499416828156, -0.1758730411529541, -0.0020138202235102654, 0.16532693803310394, 0.1897588074207306, -0.27324533462524414, -0.1314302682876587, 0.12214586138725281, 0.22097019851207733, 0.08102862536907196, -0.022199474275112152, -0.15629027783870697, -0.36509254574775696, -0.11188983917236328, 0.04050111398100853, 0.08556115627288818, 0.20386965572834015, 0.24983684718608856, 0.08015084266662598, 0.24454443156719208, -0.12780719995498657, 0.5051110982894897, 0.06649427115917206, 0.33367496728897095, 0.2671450078487396, 0.32123202085494995, 0.3630099594593048, 0.11308063566684723, 0.4276004731655121, 0.4187895655632019, -0.2744811475276947, -0.45982950925827026, 0.16180023550987244, 0.013374240137636662, 0.360591322183609, 0.3150312304496765, -0.10856761038303375, 0.12934033572673798, -0.07985479384660721, 0.05726746842265129, 0.02830205112695694, 0.299184113740921, 0.23460173606872559, 0.001764015294611454, -0.023294517770409584, -0.2699074447154999, 0.15985991060733795, -0.160004660487175, -0.20589858293533325, 0.14340129494667053, 0.3600948452949524, -0.2692801058292389, 0.16472239792346954, -0.0260799378156662, 0.9418550133705139, 0.027411211282014847, 0.07975874096155167, 0.29210010170936584, -0.27517765760421753, 0.04996762424707413, -0.21454112231731415, 0.0748157799243927, -0.0023901350796222687, -0.06752258539199829, 0.027025720104575157, 0.005038183182477951, 0.14540010690689087, 0.04106252267956734, -0.2011452317237854, 0.03230341151356697, -0.03688106685876846, -0.017761651426553726, 0.10181594640016556, 0.2997303307056427, -0.353562593460083, -0.3357354700565338, -0.2991710901260376, 0.2568056285381317, -0.08200037479400635, -0.0460515059530735, 0.13707101345062256, -0.0741281658411026, -0.05008906126022339, -0.34005433320999146, -0.25174638628959656, -0.04689425230026245, -0.37920528650283813, -0.2879685163497925, 0.14444397389888763, -0.16669246554374695, 0.5627479553222656, 0.1930965930223465, 0.2877616286277771, 0.07372090220451355, -0.22446297109127045, 0.2827262878417969, 0.08123915642499924, 0.03584618121385574, -0.023633774369955063, -0.028355050832033157, 0.3789632022380829, -0.016673222184181213, -0.06598182767629623, 0.1529501974582672, 0.08565160632133484, -0.2657611668109894, -0.37981367111206055, -0.09021972119808197, -0.09867936372756958, -0.5603545308113098, 0.09986457228660583, -0.03316889703273773, 0.2273799479007721, -0.440260112285614, 0.22626672685146332, 0.3459671139717102, -0.2346024066209793, -0.06454303115606308, 0.115977942943573, -0.09423364698886871, -0.06005150452256203, 0.2362869679927826, 0.04123840481042862, -0.33671027421951294, 0.49562689661979675, 0.20313014090061188, -0.3671572804450989, -0.3295764625072479, -0.2212132215499878, 0.27228817343711853, -0.12478971481323242, 0.09805792570114136, -0.07843116670846939, -0.17502246797084808, -0.0633377656340599, 0.35572585463523865, -0.03305515646934509, -0.06472074240446091, -0.012929309159517288, -0.22739852964878082, -0.41461992263793945, 0.3882037401199341, -0.03770150616765022, 0.26865169405937195, 0.014228444546461105, 0.11295019090175629, -0.04227510094642639, -0.03067329339683056, -0.48172879219055176, 0.03504756838083267, -0.19633391499519348, 0.1778857409954071, 0.2380470186471939, -0.2919606864452362, 0.3184925317764282, -0.021134987473487854, 0.25301411747932434, 0.001345064491033554, -0.20113351941108704, -0.2520151734352112, -0.10247968137264252, 0.06298448145389557, -0.02244715392589569, 0.09634202718734741, 0.282674103975296, -0.04002765566110611, -0.13139821588993073, -0.06239151954650879, 0.19708795845508575, 0.29411453008651733, -0.1490861475467682, -0.0737294852733612, 0.026560164988040924, -0.08286433666944504, 0.21617381274700165, -0.17520993947982788, -0.027844607830047607, -0.16487915813922882, 0.09454073011875153, 0.09688996523618698, -0.0444195494055748, -0.06410621106624603, 0.331459641456604, 0.2715054452419281, 0.21505945920944214, 0.07437463849782944, 0.010849572718143463, -0.24600942432880402, -0.1883644461631775, 0.4619295001029968, 0.26175978779792786, 0.1533723771572113, -0.26128655672073364, -0.07727677375078201, 0.35252976417541504, 0.318742036819458, -0.30539101362228394, 0.006507428362965584, 0.10770608484745026, -0.29720044136047363, 0.2818179726600647, 0.04259943217039108, 0.29506123065948486, 0.012945935130119324, -0.0023005008697509766, 0.034265466034412384, 0.024420909583568573, -0.132831409573555, -0.02303752861917019, 0.4026147127151489, -0.1662633717060089, -0.07221230864524841, 0.4078913927078247, 0.12455971539020538, 0.26710259914398193, 0.5929352641105652, -0.163070946931839, 0.4780931770801544, -0.06987454742193222, 0.15634401142597198, 0.19259703159332275, -0.28294628858566284, 0.09969499707221985, 0.1857251226902008, 0.06517991423606873, 0.13152262568473816, -0.15213415026664734, 0.6812043190002441, -0.04617917165160179, 0.14240258932113647, 0.03525078296661377, -0.0018151253461837769, -0.341513067483902, -0.24737730622291565, 0.018489960581064224, -0.3275254964828491, -0.3174039125442505, -0.18984301388263702, -0.03483271971344948, -0.007858678698539734, 0.1882200688123703, -0.105197474360466, -0.11607374250888824, -0.17463822662830353, -0.15624254941940308, 0.05255412682890892, 0.00858180969953537, -0.23034222424030304, 0.2520371675491333, 0.009749539196491241, -0.19070535898208618, 0.18843360245227814, 0.4827318787574768, 0.2575136125087738, 0.043663494288921356, -0.15013618767261505, 0.1936129331588745, 0.04017360508441925, -0.08517848700284958, -0.14900773763656616, 0.3263625204563141, 0.28259599208831787, 0.3604188859462738, 0.2588784694671631, 0.16301095485687256, -0.289898157119751, -0.17006754875183105, -0.05954169109463692, 0.04356524348258972, -0.3866783678531647, 0.13314497470855713, -0.25336143374443054, 0.010498329997062683, -0.2568514943122864, -0.21141886711120605, -0.27436473965644836, -0.04019095003604889, 0.33675017952919006, -0.13016018271446228, -0.06967636942863464, -0.22599773108959198, 0.16814687848091125, -0.04023433104157448, 0.2428477704524994, 0.3185923397541046, 0.07214686274528503, 0.049597304314374924, -0.27369004487991333, -0.6855645775794983, 0.1046924963593483, 0.111654132604599, 0.04409770667552948, -0.2364005744457245, 0.1607893407344818, 0.2878492772579193, -0.06814227998256683, 0.2204451858997345, -0.1058516874909401, -0.18464623391628265, -0.08451449871063232, -0.05533171445131302, 0.027399977669119835, 0.0932169184088707, 0.06372685730457306, 0.1678393930196762, -0.14092616736888885, -0.1505034863948822, 0.2400084137916565, 0.10400881618261337, -0.21139851212501526, 0.04643082618713379, -0.19171568751335144, -0.4052022099494934, 0.392374187707901, 0.052097711712121964, 0.4164203703403473, -0.25285768508911133, -0.17142702639102936, -0.2382601797580719, -0.237288236618042, -0.08018273115158081, 0.07133682072162628, -0.020091146230697632, 0.6606485843658447, -0.1022840365767479, -0.039875853806734085, -0.14528578519821167, 0.14516693353652954, 0.1305387318134308, -0.13778790831565857, -0.3873130679130554, 0.3630404472351074, -0.347696453332901, 0.008856767788529396, 0.0719008594751358, 0.2584180533885956, -0.07916438579559326, -0.12522703409194946, -0.2290579229593277, -0.49292030930519104, 0.518823504447937, -0.47859591245651245, -0.3505416512489319, -0.2704884111881256, 0.3371761441230774, 0.2447730302810669, -0.2455233633518219, -0.7863671183586121, -0.01511547714471817, 0.25787800550460815, 0.2195967733860016, -0.1387764811515808, 0.27347618341445923, -0.02545994147658348, -0.18131543695926666, 0.0024834871292114258, 0.4807618260383606, 0.24124127626419067, -0.08345343172550201, 0.12633016705513, -0.3192119598388672 ]
https://github.com/huggingface/datasets/issues/1831
Some question about raw dataset download info in the project .
Hi ! The `dl_manager` is a `DownloadManager` object and is responsible for downloading the raw data files. It is used by dataset builders in their `_split_generators` method to download the raw data files that are necessary to build the datasets splits. The `Conll2003` class is a dataset builder, and so you can download all the raw data files by calling `_split_generators` with a download manager: ```python from datasets import DownloadManager from datasets.load import import_main_class conll2003_builder = import_main_class(...) dl_manager = DownloadManager() splis_generators = conll2003_builder._split_generators(dl_manager) ``` Then you can see what files have been downloaded with ```python dl_manager.get_recorded_sizes_checksums() ``` It returns a dictionary with the format {url: {num_bytes: int, checksum: str}} Then you can get the actual location of the downloaded files with ```python from datasets import cached_path local_path_to_downloaded_file = cached_path(url) ``` ------------------ Note that you can also get the urls from the Dataset object: ```python from datasets import load_dataset conll2003 = load_dataset("conll2003") print(conll2003["train"].download_checksums) ``` It returns the same dictionary with the format {url: {num_bytes: int, checksum: str}}
Hi , i review the code in https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py in the _split_generators function is the truly logic of download raw datasets with dl_manager and use Conll2003 cls by use import_main_class in load_dataset function My question is that , with this logic it seems that i can not have the raw dataset download location in variable in downloaded_files in _split_generators. If someone also want use huggingface datasets as raw dataset downloader, how can he retrieve the raw dataset download path from attributes in datasets.dataset_dict.DatasetDict ?
166
Some question about raw dataset download info in the project . Hi , i review the code in https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py in the _split_generators function is the truly logic of download raw datasets with dl_manager and use Conll2003 cls by use import_main_class in load_dataset function My question is that , with this logic it seems that i can not have the raw dataset download location in variable in downloaded_files in _split_generators. If someone also want use huggingface datasets as raw dataset downloader, how can he retrieve the raw dataset download path from attributes in datasets.dataset_dict.DatasetDict ? Hi ! The `dl_manager` is a `DownloadManager` object and is responsible for downloading the raw data files. It is used by dataset builders in their `_split_generators` method to download the raw data files that are necessary to build the datasets splits. The `Conll2003` class is a dataset builder, and so you can download all the raw data files by calling `_split_generators` with a download manager: ```python from datasets import DownloadManager from datasets.load import import_main_class conll2003_builder = import_main_class(...) dl_manager = DownloadManager() splis_generators = conll2003_builder._split_generators(dl_manager) ``` Then you can see what files have been downloaded with ```python dl_manager.get_recorded_sizes_checksums() ``` It returns a dictionary with the format {url: {num_bytes: int, checksum: str}} Then you can get the actual location of the downloaded files with ```python from datasets import cached_path local_path_to_downloaded_file = cached_path(url) ``` ------------------ Note that you can also get the urls from the Dataset object: ```python from datasets import load_dataset conll2003 = load_dataset("conll2003") print(conll2003["train"].download_checksums) ``` It returns the same dictionary with the format {url: {num_bytes: int, checksum: str}}
[ -0.1392950713634491, -0.09699537605047226, -0.057543665170669556, 0.5315544009208679, 0.180654376745224, -0.07769393920898438, 0.12914817035198212, -0.06849342584609985, 0.13074767589569092, 0.1263667196035385, -0.4010898470878601, 0.1903989464044571, -0.07171797007322311, 0.5283398628234863, 0.16424007713794708, -0.06509832292795181, -0.11068303138017654, 0.14757853746414185, -0.09337617456912994, -0.07304331660270691, -0.39444470405578613, 0.2827208936214447, -0.31262707710266113, 0.12862692773342133, -0.13044410943984985, 0.005231801420450211, -0.037559013813734055, 0.2881942093372345, -0.4633619785308838, -0.27664661407470703, 0.3559415340423584, 0.22831149399280548, 0.4103100895881653, 0.2549617886543274, -0.00012279483780730516, 0.04534430056810379, 0.294766902923584, -0.32166579365730286, -0.5304587483406067, -0.3504643440246582, -0.6374025940895081, -0.006607720162719488, -0.08765899389982224, -0.30261099338531494, 0.07270067930221558, -0.04441486671566963, -0.07044904679059982, -0.23771944642066956, 0.11797051131725311, 0.10204321891069412, 0.07890811562538147, 0.2801707088947296, -0.025804679840803146, 0.0432845801115036, 0.28489696979522705, 0.28035926818847656, 0.0525379404425621, 0.10770325362682343, -0.07476794719696045, 0.40119513869285583, 0.2505825161933899, 0.31001609563827515, 0.13770870864391327, 0.1574471890926361, 0.5022881627082825, 0.3205779194831848, -0.27263128757476807, -0.30463865399360657, 0.10461340844631195, 0.19351670145988464, 0.40408140420913696, -0.36739709973335266, -0.5436561703681946, -0.34836074709892273, -0.16833700239658356, -0.592606782913208, 0.03220425546169281, 0.14673751592636108, -0.3645540475845337, 0.3069462478160858, -0.5524965524673462, -0.42425602674484253, -0.10692355036735535, -0.029514148831367493, -0.19636358320713043, 0.3718145787715912, -0.3595739006996155, 0.06532472372055054, 0.07806907594203949, 0.4294741153717041, 0.19982364773750305, -0.2933293879032135, -0.017640266567468643, 0.2759217321872711, -0.17268060147762299, -0.08907794952392578, -0.021097779273986816, 0.30464357137680054, 0.19167828559875488, -0.003178626298904419, -0.11859017610549927, -0.1960320770740509, 0.06447871029376984, 0.09115487337112427, 0.36028292775154114, 0.13484030961990356, 0.12200543284416199, 0.271299809217453, 0.22105391323566437, 0.1582036018371582, 0.16287510097026825, -0.2994871735572815, -0.039951130747795105, -0.049970343708992004, -0.30933070182800293, 0.16166234016418457, 0.07092653959989548, -0.12266477942466736, -0.19936606287956238, -0.21416187286376953, -0.10704207420349121, -0.2923627197742462, 0.3221350610256195, 0.40481817722320557, -0.11206189543008804, 0.07313172519207001, -0.01970309019088745, 0.04848204553127289, 0.13255026936531067, -0.2103046178817749, -0.1068648099899292, -0.14259159564971924, -0.14245235919952393, 0.13092084228992462, -0.27598097920417786, -0.07525217533111572, 0.38062649965286255, 0.05235151946544647, 0.015529979020357132, 0.007027778774499893, 0.02054751105606556, -0.13927751779556274, 0.2036895900964737, 0.15111392736434937, -0.013136053457856178, 0.3002583086490631, -0.1582261323928833, -0.33505600690841675, -0.19506095349788666, -0.09400517493486404, -0.3649282455444336, -0.4216024577617645, 0.01582459732890129, 0.025518212467432022, -0.2253229320049286, 0.10368628799915314, -0.30645668506622314, -0.025836098939180374, 0.10352826118469238, 0.3552071154117584, 0.07360424101352692, -0.04130416363477707, -0.4622369706630707, -0.26651161909103394, 0.440036416053772, 0.48189759254455566, -0.24818384647369385, -0.1428898274898529, 0.04885988309979439, -0.37079861760139465, 0.11049720644950867, 0.02471175231039524, -0.3937756419181824, 0.5463495850563049, -0.4110981523990631, -0.12885066866874695, 0.4111631214618683, -0.4205341935157776, -0.27437177300453186, 0.559400200843811, 0.1189887672662735, -0.004063259810209274, 0.3508138358592987, -0.0029532001353800297, 0.25213301181793213, -0.0863129273056984, -0.11830645799636841, 0.5005717277526855, 0.17850565910339355, -0.11542890965938568, -0.015047002583742142, -0.1998094618320465, -0.1504228115081787, -0.10768292844295502, -0.13249842822551727, 0.2510327994823456, 0.03637871518731117, -0.09306088835000992, 0.5309388041496277, -0.11459650099277496, 0.1999671906232834, 0.31543177366256714, 0.026568366214632988, 0.2461877465248108, -0.0191203486174345, 0.029234685003757477, -0.6519914865493774, 0.16605451703071594, -0.3580189347267151, -0.2422894835472107, -0.30387306213378906, -0.3468744158744812, -0.3359973430633545, 0.15263774991035461, -0.2951543629169464, -0.37116101384162903, -0.05847177281975746, 0.16493037343025208, 0.49272894859313965, -0.033501412719488144, -0.3086249530315399, 0.5376637578010559, -0.07711277902126312, 0.11037106066942215, -0.1524743139743805, 0.02150660566985607, 0.10994801670312881, 0.18408329784870148, -0.06649643182754517, 0.10192658007144928, 0.10839788615703583, -0.1885490119457245, 0.05988183245062828, 0.5309787392616272, 0.23963326215744019, 0.1818333864212036, 0.1540878713130951, 0.029221147298812866, 0.2496577799320221, 0.12449236214160919, -0.07289400696754456, -0.219706192612648, 0.21307431161403656, 0.20210975408554077, 0.09575770795345306, 0.4194432497024536, 0.003916464745998383, 0.2770686149597168, 0.13969872891902924, -0.07814785838127136, 0.13789646327495575, -0.061810173094272614, 0.15540440380573273, -0.16009870171546936, -0.17537130415439606, 0.20472835004329681, 0.3687288165092468, 0.1324181705713272, -0.20144832134246826, 0.19544461369514465, 0.36349931359291077, -0.08196793496608734, -0.24796214699745178, 0.016517862677574158, -0.2928122580051422, -0.040300872176885605, 0.020246494561433792, 0.7880978584289551, 0.4842381477355957, 0.009911078959703445, 0.19300827383995056, 0.08171799033880234, 0.2897278964519501, -0.13008104264736176, 0.404466450214386, 0.1461009383201599, -0.07099359482526779, -0.033552393317222595, -0.47654110193252563, -0.1736866682767868, 0.16128107905387878, -0.018255528062582016, 0.1560422033071518, 0.13740862905979156, -0.3770773112773895, 0.12285386770963669, -0.24532441794872284, -0.35932308435440063, -0.28252577781677246, -0.1824905425310135, 0.07965682446956635, -0.17885376513004303, -0.30236440896987915, -0.09605273604393005, -0.08657387644052505, -0.19618497788906097, -0.028491146862506866, 0.00786137580871582, -0.26903316378593445, 0.034626662731170654, -0.17259162664413452, -0.18462271988391876, -0.1305115818977356, -0.07384417951107025, 0.16627761721611023, 0.03421027585864067, 0.08375785499811172, -0.4706435203552246, 0.06891770660877228, -0.16951458156108856, 0.17596399784088135, 0.32473456859588623, 0.057017333805561066, 0.17769597470760345, 0.390632301568985, 0.14288660883903503, -0.141759991645813, 0.02283613011240959, -0.0706351101398468, 0.10466837882995605, -0.144224151968956, -0.39273566007614136, 0.13368083536624908, 0.060838911682367325, -0.10030277073383331, -0.1797950565814972, -0.701850175857544, -0.09427088499069214, 0.14840072393417358, -0.11413614451885223, 0.22856256365776062, -0.06347562372684479, -0.18335969746112823, 0.11429043859243393, -0.27394017577171326, 0.049795493483543396, -0.23460829257965088, -0.7871100902557373, 0.28944066166877747, -0.3476828932762146, -0.2662127912044525, -0.04405389726161957, -0.09772449731826782, 0.19840145111083984, 0.01549152284860611, -0.25377511978149414, -0.03174096345901489, -0.22029593586921692, 0.17114558815956116, 0.10691210627555847, 0.3687533140182495, 0.012761920690536499, -0.10263703763484955, 0.13000406324863434, -0.1975702941417694, -0.06178306043148041, 0.18270796537399292, -0.38249480724334717, 0.30856654047966003, 0.38242200016975403, -0.033521391451358795, 0.17485311627388, 0.7821304202079773, 0.24443942308425903, -0.1355075240135193, 0.18098455667495728, -0.07585607469081879, 0.4101742208003998, 0.2839820981025696, -0.2186226099729538, -0.048932697623968124, -0.033904969692230225, -0.10784824937582016, 0.14400309324264526, 0.06046980619430542, 0.18966349959373474, -0.31658825278282166, -0.11236926913261414, -0.1500527560710907, -0.15170468389987946, -0.12551549077033997, 0.5231517553329468, 0.18937548995018005, 0.06159934028983116, 0.19744491577148438, -0.006582329049706459, 0.09127941727638245, 0.06185675784945488, 0.43060439825057983, 0.3460766077041626, 0.19759739935398102, -0.19607174396514893, -0.08577308058738708, -0.2044922411441803, 0.11648888885974884, 0.28588640689849854, -0.11611218750476837, 0.17969200015068054, 0.12008332461118698, 0.17902812361717224, 0.11770569533109665, 0.6446791887283325, 0.022620469331741333, -0.04019525647163391, -0.12750929594039917, -0.3101220428943634, -0.07607873529195786, 0.12807300686836243, -0.15003229677677155, 0.07375304400920868, 0.42132169008255005, 0.16378818452358246, -0.40368393063545227, -0.3825347125530243, 0.07454107701778412, 0.1352340579032898, -0.2881729304790497, -0.14954403042793274, -0.14889192581176758, -0.2091284990310669, -0.17887015640735626, -0.23087596893310547, 0.12962773442268372, 0.12780603766441345, 0.03469716012477875, 0.002544417977333069, 0.050595879554748535, 0.11937039345502853, 0.003072790801525116, 0.0747293084859848, 0.3675093352794647, -0.05619912967085838, -0.1057412177324295, 0.37542715668678284, 0.3393513858318329, 0.16903775930404663, 0.4490526616573334, -0.3288884460926056, -0.1851527988910675, -0.06483686715364456, 0.09757140278816223, 0.6481598615646362, 0.1496814787387848, -0.4898107051849365, 0.04934881627559662, 0.03485473617911339, -0.14900584518909454, -0.38975971937179565, 0.24325284361839294, 0.26383286714553833, 0.007181378081440926, -0.09935566782951355, -0.7190078496932983, 0.4855562746524811, -0.007340125739574432, -0.22853663563728333, 0.16060678660869598, 0.08337998390197754, -0.3551579713821411, -0.13822801411151886, 0.034919194877147675, 0.8198537230491638, 0.1342671811580658, 0.082252636551857, 0.10077732056379318, -0.4830276370048523, 0.588997483253479, -0.060216695070266724, -0.17315948009490967, -0.22252485156059265, 0.02223483845591545, -0.15202133357524872, -0.28602325916290283, 0.07052182406187057, -0.07608050107955933, -0.10988263785839081, 0.3645530641078949, -0.09830176830291748, 0.04982367902994156, 0.043595537543296814, 0.5104304552078247, -0.08311741054058075, -0.140968456864357, 0.07536736875772476, -0.08400030434131622, 0.19180819392204285, 0.4800058901309967, -0.1140027716755867, -0.43102532625198364, -0.25505682826042175, 0.07956989109516144, -0.06545120477676392, -0.10178381949663162, -0.43335670232772827, 0.03022390976548195, 0.01337408646941185, -0.3217701315879822, -0.037124425172805786, 0.6608507037162781, 0.279049813747406, 0.01643640175461769, -0.2199331670999527, 0.06367034465074539, -0.09201604872941971, 0.12733688950538635, 0.25037142634391785, 0.12391097843647003, -0.05763976275920868, -0.053484223783016205, -0.16293546557426453, 0.15574409067630768, -0.005832070484757423, -0.18104782700538635, 0.17484945058822632, -0.10168567299842834, 0.21251976490020752, -0.2507408857345581, -0.05611557140946388, -0.01082099974155426, 0.06260710954666138, -0.06816103309392929, -0.0006634518504142761, 0.24378308653831482, -0.3698790371417999, 0.07067305594682693, -0.27986466884613037, -0.42271140217781067, -0.1907726228237152, 0.36060458421707153, -0.0719442293047905, 0.07881809771060944, 0.26846975088119507, -0.10255076736211777, -0.22497867047786713, -0.03090987727046013, 0.28865674138069153, -0.1091570034623146, -0.3159407675266266, 0.2659706175327301, 0.30490201711654663, 0.17883802950382233, -0.4056989848613739, 0.25608310103416443, 0.001107882708311081, -0.2817433178424835, -0.2222939431667328, -0.49930548667907715, -0.20701850950717926, 0.1097567081451416, -0.2958483397960663, 0.15518724918365479, -0.012738315388560295, 0.17065009474754333, 0.10408931970596313, 0.028384491801261902, -0.19552487134933472, 0.01576044037938118, -0.0842280387878418, -0.10643303394317627, 0.33751025795936584, 0.09713050723075867, 0.24823911488056183, -0.0030777398496866226, -0.05896040052175522, -0.039009444415569305, -0.09004654735326767, -0.03145577758550644, -0.2268638163805008, 0.18874989449977875, -0.0839846059679985, -0.2017306089401245, 0.08763102442026138, -0.061708949506282806, -0.07869923114776611, 0.05908238887786865, 0.2508065700531006, 0.26612260937690735, 0.12934377789497375, 0.3978656828403473, -0.05771588906645775, -0.0034341514110565186, -0.5778406262397766, 0.3355065584182739, 0.06922300159931183, 0.40350329875946045, -0.07793077826499939, 0.4459482431411743, -0.384908527135849, -0.10467062890529633, 0.12545202672481537, -0.12114682048559189, 0.012670867145061493, -0.08861906826496124, 0.43485668301582336, -0.04359522461891174, 0.10812583565711975, 0.11747214198112488, 0.2370527982711792, 0.23825383186340332, -0.0896989032626152, 0.029672959819436073, 0.19401013851165771, -0.02735223062336445, -0.008573018014431, 0.023925790563225746, -0.13703133165836334, -0.04063620790839195, 0.024102333933115005, 0.34812942147254944, 0.33337536454200745, 0.03856002539396286, -0.07780671119689941, -0.27102237939834595, 0.4011269807815552, 0.4406711459159851, 0.04602103680372238, 0.5709136128425598, 0.12831324338912964, 0.36279380321502686, 0.2117367535829544, 0.6090319156646729, 0.15640632808208466, 0.3393482565879822, -0.2610032260417938, -0.008980592712759972, -0.08740996569395065, 0.24500706791877747, 0.31073084473609924, -0.44853198528289795, 0.17224179208278656, 0.20228812098503113, -0.22620472311973572, 0.02192607894539833, -0.2994122803211212, 0.5222712755203247, -0.15515975654125214, 0.13281436264514923, -0.10601038485765457, 0.47106921672821045, 0.04575206711888313, -0.2884922921657562, -0.17623353004455566, -0.18811577558517456, -0.1317509114742279, 0.15237344801425934, -0.04613502696156502, -0.4370726943016052, 0.13623443245887756, -0.1464456170797348, 0.042722638696432114, 0.01835339143872261, 0.05309344083070755, 0.10409644991159439, 0.02159544825553894, -0.21229594945907593, 0.19153636693954468, -0.041656509041786194, 0.2909666895866394, 0.3288475275039673, 0.2829507291316986, 0.06739626824855804, 0.3388292193412781, 0.14623069763183594, -0.21369466185569763, 0.22142843902111053, -0.06889890134334564, -0.08749038726091385, 0.0249391570687294, -0.20105275511741638, -0.07470344007015228, 0.4496804475784302, -0.01030271127820015, -0.022859064862132072, -0.30539199709892273, 0.14118322730064392, 0.31311994791030884, -0.01410331204533577, 0.5945335030555725, -0.025931112468242645, 0.06706353276968002, 0.09257054328918457, 0.06102713569998741, -0.4617902636528015, 0.06957089900970459, 0.27481940388679504, -0.26477763056755066, 0.21410837769508362, -0.0019733370281755924, 0.01213931292295456, -0.024173174053430557, 0.3711703419685364, 0.20920711755752563, 0.33825886249542236, -0.42826107144355774, -0.21278050541877747, -0.4922035038471222, -0.2341073751449585, 0.34327617287635803, -0.2409980446100235, -0.061452530324459076, 0.3055998980998993, -0.22224211692810059, 0.24406197667121887, -0.04240885376930237, 0.27618181705474854, -0.009667748585343361, 0.0954618826508522, -0.05047281086444855, -0.15809892117977142, -0.37761902809143066, 0.14843454957008362, 0.11209852993488312, -0.22211280465126038, 0.33929958939552307, -0.21881873905658722, -0.11058735847473145, -0.08951397985219955, 0.23480716347694397, 0.16858862340450287, -0.22783848643302917, 0.1703929901123047, -0.0179747287184, 0.14916206896305084, -0.060574356466531754, 0.031915366649627686, 0.2514953911304474, 0.24191217124462128, -0.2968154549598694, -0.008200548589229584, -0.14755013585090637, -0.1339506208896637, -0.32015228271484375, 0.02095809020102024, -0.4668421745300293, 0.37591612339019775, 0.31989991664886475, 0.00025075694429688156, -0.04862452298402786, -0.024210672825574875, -0.4064563512802124, 0.03823624178767204, 0.5310793519020081, 0.16299700736999512, -0.2717089354991913, 0.0698959156870842, -0.2187841683626175, -0.05781668424606323, 0.5587483644485474, -0.26715973019599915, 0.12109905481338501, 0.04035032168030739, 0.2279321849346161, 0.3333333134651184, -0.09136787056922913, -0.5478305220603943, 0.2801439166069031, 0.5396885871887207, -0.08369620144367218, 0.03364693745970726, 0.21228347718715668, 0.08878053724765778, -0.0016809292137622833, -0.1219751238822937, 0.47519901394844055, 0.15408188104629517, -0.33863338828086853, 0.09727630019187927, -0.029898066073656082 ]
https://github.com/huggingface/datasets/issues/1831
Some question about raw dataset download info in the project .
I am afraid that there is not a very straightforward way to get that location. Another option, from _split_generators would be to use: - `dl_manager._download_config.cache_dir` to get the directory where all the raw downloaded files are: ```python download_dir = dl_manager._download_config.cache_dir ``` - the function `datasets.utils.file_utils.hash_url_to_filename` to get the filenames of the raw downloaded files: ```python filenames = [hash_url_to_filename(url) for url in urls_to_download.values()] ``` Therefore the complete path to the raw downloaded files would be the join of both: ```python downloaded_paths = [os.path.join(download_dir, filename) for filename in filenames] ``` Maybe it would be interesting to make these paths accessible more easily. I could work on this. What do you think, @lhoestq ?
Hi , i review the code in https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py in the _split_generators function is the truly logic of download raw datasets with dl_manager and use Conll2003 cls by use import_main_class in load_dataset function My question is that , with this logic it seems that i can not have the raw dataset download location in variable in downloaded_files in _split_generators. If someone also want use huggingface datasets as raw dataset downloader, how can he retrieve the raw dataset download path from attributes in datasets.dataset_dict.DatasetDict ?
111
Some question about raw dataset download info in the project . Hi , i review the code in https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py in the _split_generators function is the truly logic of download raw datasets with dl_manager and use Conll2003 cls by use import_main_class in load_dataset function My question is that , with this logic it seems that i can not have the raw dataset download location in variable in downloaded_files in _split_generators. If someone also want use huggingface datasets as raw dataset downloader, how can he retrieve the raw dataset download path from attributes in datasets.dataset_dict.DatasetDict ? I am afraid that there is not a very straightforward way to get that location. Another option, from _split_generators would be to use: - `dl_manager._download_config.cache_dir` to get the directory where all the raw downloaded files are: ```python download_dir = dl_manager._download_config.cache_dir ``` - the function `datasets.utils.file_utils.hash_url_to_filename` to get the filenames of the raw downloaded files: ```python filenames = [hash_url_to_filename(url) for url in urls_to_download.values()] ``` Therefore the complete path to the raw downloaded files would be the join of both: ```python downloaded_paths = [os.path.join(download_dir, filename) for filename in filenames] ``` Maybe it would be interesting to make these paths accessible more easily. I could work on this. What do you think, @lhoestq ?
[ -0.1346980482339859, -0.029141776263713837, -0.05659536272287369, 0.5307524800300598, 0.11883720010519028, -0.11446952819824219, 0.10200811922550201, -0.008243769407272339, 0.041508402675390244, 0.0833943709731102, -0.4197900891304016, 0.20728343725204468, -0.12456416338682175, 0.54497891664505, 0.17082025110721588, -0.09607571363449097, -0.09937653690576553, 0.12215863168239594, -0.10155962407588959, -0.06752215325832367, -0.38628557324409485, 0.29641374945640564, -0.2933220863342285, 0.1700219213962555, -0.12043644487857819, -0.04371295124292374, -0.03890813887119293, 0.3107960820198059, -0.42152971029281616, -0.2855052053928375, 0.2851448357105255, 0.2104237675666809, 0.389726847410202, 0.2601923942565918, -0.00012526338105089962, 0.03395618498325348, 0.25762829184532166, -0.33769434690475464, -0.52913898229599, -0.30453187227249146, -0.6149908900260925, -0.018427502363920212, -0.07356952130794525, -0.2560710310935974, 0.1428726613521576, -0.06211503967642784, -0.08166877180337906, -0.19801439344882965, 0.02480275183916092, 0.02571914717555046, 0.05692701414227486, 0.30730140209198, -0.07054934650659561, 0.07332019507884979, 0.27434444427490234, 0.2889508605003357, 0.006941435858607292, 0.1065993458032608, -0.009436063468456268, 0.309707373380661, 0.1909421682357788, 0.31418418884277344, 0.19176356494426727, 0.11618408560752869, 0.45441481471061707, 0.35118746757507324, -0.36054521799087524, -0.3333875834941864, 0.0019013024866580963, 0.24149340391159058, 0.33117422461509705, -0.3499562740325928, -0.6002612113952637, -0.4451582431793213, -0.14475944638252258, -0.5862120985984802, 0.08666523545980453, 0.14513489603996277, -0.4294036328792572, 0.2783696949481964, -0.5737099051475525, -0.47020605206489563, -0.1078227311372757, -0.06307543814182281, -0.12458992004394531, 0.38332799077033997, -0.3021121621131897, 0.03660919517278671, 0.12226176261901855, 0.3665379285812378, 0.18311017751693726, -0.20400582253932953, 0.006497617810964584, 0.262843519449234, -0.12735998630523682, -0.09684818983078003, -0.06920824199914932, 0.2800368070602417, 0.1793467402458191, 0.0004263259470462799, -0.09320209175348282, -0.26254090666770935, -0.022448299452662468, 0.03677866607904434, 0.3256852924823761, 0.08879426121711731, 0.0588160939514637, 0.2508298456668854, 0.24193550646305084, 0.18523554503917694, 0.2261742353439331, -0.25655367970466614, -0.07564885169267654, -0.09280369430780411, -0.39821287989616394, 0.16897976398468018, 0.023065365850925446, -0.08815617859363556, -0.25641998648643494, -0.25847139954566956, -0.11732054501771927, -0.3153943419456482, 0.328413188457489, 0.3631954789161682, -0.1064460501074791, 0.09190018475055695, -0.02186424285173416, 0.030009832233190536, 0.13420401513576508, -0.25130754709243774, -0.060254454612731934, -0.13667736947536469, -0.14983905851840973, 0.15868590772151947, -0.23554377257823944, -0.07405281066894531, 0.3717944622039795, 0.041712723672389984, 0.030304688960313797, 0.0919634997844696, -0.005171892233192921, -0.1027107834815979, 0.19871631264686584, 0.11280219256877899, 0.031949687749147415, 0.2906244397163391, -0.2086743861436844, -0.28544142842292786, -0.21640190482139587, -0.12387528270483017, -0.2959263026714325, -0.4238964319229126, 0.010931355878710747, -0.02659621834754944, -0.14969520270824432, 0.13803412020206451, -0.24266254901885986, 0.0063025206327438354, 0.06413635611534119, 0.33717355132102966, 0.021131813526153564, 0.006673334166407585, -0.4359378516674042, -0.28752171993255615, 0.43704789876937866, 0.4985272288322449, -0.2790232300758362, -0.10948625206947327, 0.09182977676391602, -0.36534082889556885, 0.04100425913929939, 0.08937100321054459, -0.37694108486175537, 0.5260190367698669, -0.4255954325199127, -0.15583088994026184, 0.49349477887153625, -0.4139981269836426, -0.2834486663341522, 0.548224687576294, 0.08194117248058319, -0.011938855983316898, 0.3946039378643036, -0.0027311090379953384, 0.28096869587898254, -0.09966295957565308, -0.06136681139469147, 0.5419445633888245, 0.12379885464906693, -0.11095330864191055, -0.03870951011776924, -0.28574469685554504, -0.11888708174228668, -0.09950868785381317, -0.1401035189628601, 0.20854172110557556, 0.06305147707462311, -0.1487574726343155, 0.569438636302948, -0.0648537129163742, 0.2024187594652176, 0.3641735315322876, 0.016141947358846664, 0.2217395156621933, -0.0397491529583931, 0.03275763988494873, -0.6237201690673828, 0.1450575590133667, -0.29158809781074524, -0.25667649507522583, -0.3464306592941284, -0.3692539930343628, -0.28351107239723206, 0.13590435683727264, -0.22058512270450592, -0.3565538227558136, -0.08133816719055176, 0.1932125985622406, 0.47992610931396484, -0.03777730464935303, -0.32691705226898193, 0.5276398062705994, -0.026415899395942688, 0.10044486820697784, -0.15842205286026, 0.039596185088157654, 0.15314584970474243, 0.1568755954504013, -0.02858797088265419, 0.11564319580793381, 0.11600105464458466, -0.20312339067459106, 0.08793822675943375, 0.4732973873615265, 0.1667211353778839, 0.2244890183210373, 0.24886679649353027, 0.08665205538272858, 0.2675854563713074, 0.18159985542297363, -0.050037942826747894, -0.28405556082725525, 0.11663911491632462, 0.26935306191444397, 0.021753404289484024, 0.4050777554512024, -0.04022933915257454, 0.2749062776565552, 0.2071463018655777, -0.058607317507267, 0.13754774630069733, -0.04612456262111664, 0.19098582863807678, -0.17176513373851776, -0.14505822956562042, 0.19571861624717712, 0.3370572030544281, 0.1461297869682312, -0.28319111466407776, 0.29675132036209106, 0.43354544043540955, -0.04222540929913521, -0.280387282371521, 0.007216747850179672, -0.2794590890407562, -0.014330418780446053, 0.04629715532064438, 0.7960910797119141, 0.4438537359237671, 0.023025155067443848, 0.19142264127731323, 0.03006015717983246, 0.2835536003112793, -0.0816388800740242, 0.35438066720962524, 0.13280832767486572, -0.08093484491109848, -0.019626125693321228, -0.4542379379272461, -0.16633346676826477, 0.19308406114578247, -0.04399541765451431, 0.18451498448848724, 0.17200574278831482, -0.3527049124240875, 0.07897982001304626, -0.24307861924171448, -0.39655759930610657, -0.24743956327438354, -0.18865562975406647, 0.034291621297597885, -0.17886054515838623, -0.21458926796913147, -0.046575795859098434, -0.13735559582710266, -0.15257219970226288, -0.07528027147054672, -0.023088186979293823, -0.2846533954143524, 0.05192773789167404, -0.17617064714431763, -0.10791446268558502, -0.08718361705541611, -0.0735015869140625, 0.2006448209285736, 0.008561694994568825, 0.09787152707576752, -0.46970659494400024, 0.08699631690979004, -0.24512535333633423, 0.18683689832687378, 0.3407445251941681, 0.061188310384750366, 0.16299425065517426, 0.38500913977622986, 0.1543997973203659, -0.12841206789016724, -0.03554447367787361, -0.10438863933086395, 0.11080177128314972, -0.1283790022134781, -0.4418487548828125, 0.12645578384399414, 0.07320304960012436, -0.09493203461170197, -0.2078496515750885, -0.7182446122169495, -0.10018764436244965, 0.22224025428295135, -0.14307661354541779, 0.2521548271179199, -0.16815917193889618, -0.22397685050964355, 0.042441509664058685, -0.3285966217517853, 0.05128861218690872, -0.18833747506141663, -0.7643770575523376, 0.2837580740451813, -0.36135053634643555, -0.24173210561275482, -0.0683540552854538, -0.1362403929233551, 0.15212589502334595, 0.057837922126054764, -0.1992672085762024, -0.01713671162724495, -0.16935016214847565, 0.21995285153388977, 0.11566831171512604, 0.30866020917892456, 0.035693198442459106, -0.030962565913796425, 0.1584857851266861, -0.15024779736995697, -0.0465523898601532, 0.21519815921783447, -0.342245489358902, 0.3589678704738617, 0.394750714302063, -0.042576178908348083, 0.21589168906211853, 0.7951545715332031, 0.22893351316452026, -0.11305046081542969, 0.1516203135251999, -0.10193892568349838, 0.39062023162841797, 0.3349595367908478, -0.23026706278324127, -0.04808758199214935, 0.012357622385025024, -0.03995277360081673, 0.13240334391593933, 0.09985443204641342, 0.22798968851566315, -0.2753504514694214, -0.12350279092788696, -0.17704364657402039, -0.18521174788475037, -0.07103434205055237, 0.5313083529472351, 0.1815865933895111, 0.07378430664539337, 0.20228511095046997, -0.02809220552444458, 0.07284308224916458, 0.06058854982256889, 0.42104488611221313, 0.4186689555644989, 0.19214843213558197, -0.13437268137931824, -0.03966264799237251, -0.18153119087219238, 0.05332373082637787, 0.33523014187812805, -0.15678535401821136, 0.147299125790596, 0.0737624391913414, 0.17967009544372559, 0.11913623660802841, 0.7116190195083618, 0.02388898842036724, -0.06984447687864304, -0.14316228032112122, -0.28018176555633545, -0.07078789919614792, 0.1149270236492157, -0.09573592990636826, 0.024242747575044632, 0.47469648718833923, 0.2359752655029297, -0.39264580607414246, -0.39261266589164734, 0.12823879718780518, 0.1697731763124466, -0.2994645833969116, -0.11545445770025253, -0.10367725789546967, -0.17778170108795166, -0.19071556627750397, -0.22257062792778015, 0.10763391107320786, 0.06300917267799377, -0.0058770631439983845, -0.006822355091571808, 0.10048247873783112, 0.09173183888196945, 0.014331407845020294, 0.163255974650383, 0.42218127846717834, -0.03973611444234848, -0.018868111073970795, 0.4088662564754486, 0.39366886019706726, 0.18982839584350586, 0.4766066074371338, -0.4284283220767975, -0.17425855994224548, -0.042308494448661804, 0.04919669032096863, 0.6706674098968506, 0.2639821767807007, -0.499154269695282, 0.04119342193007469, -0.02937573939561844, -0.12053002417087555, -0.39011240005493164, 0.222776859998703, 0.2994392216205597, -0.005516583099961281, -0.16258279979228973, -0.6853827834129333, 0.4479738771915436, -0.04211509972810745, -0.275461882352829, 0.18759986758232117, 0.052628662437200546, -0.3134815990924835, -0.15793593227863312, -0.04296969622373581, 0.8905707597732544, 0.10916860401630402, 0.13263924419879913, 0.09643567353487015, -0.4127986431121826, 0.6062420606613159, -0.09399176388978958, -0.12761767208576202, -0.22416791319847107, -0.008478696458041668, -0.15410977602005005, -0.2611880898475647, -0.0181296244263649, -0.06391400843858719, -0.042786065489053726, 0.39585044980049133, -0.06760282814502716, 0.031684234738349915, 0.02922678366303444, 0.4977272152900696, -0.04417441785335541, -0.1707649677991867, 0.04482373595237732, -0.11758804321289062, 0.2282162606716156, 0.4401249885559082, -0.07899542152881622, -0.4989718198776245, -0.30095261335372925, 0.1147170215845108, -0.05454939231276512, -0.07100498676300049, -0.4479239284992218, 0.02869817614555359, 0.03538871556520462, -0.33402204513549805, -0.08539837598800659, 0.626283586025238, 0.2829657196998596, -0.0037522464990615845, -0.1767270416021347, 0.07250621914863586, -0.057848937809467316, 0.07569582760334015, 0.27388718724250793, 0.15861190855503082, -0.07887598872184753, -0.03856176137924194, -0.17388392984867096, 0.08792613446712494, -0.038208745419979095, -0.19048115611076355, 0.1107863187789917, -0.1293092966079712, 0.21010644733905792, -0.24702930450439453, -0.01842488721013069, -0.015843048691749573, 0.08169481158256531, -0.06744744628667831, -0.01877690851688385, 0.28362900018692017, -0.30480942130088806, 0.0630546286702156, -0.2820972800254822, -0.3546582758426666, -0.17880244553089142, 0.3114255666732788, -0.11399617046117783, 0.05608338117599487, 0.2382427304983139, -0.12300010025501251, -0.28120794892311096, 0.0032602474093437195, 0.27753281593322754, -0.13801166415214539, -0.36784881353378296, 0.2783263027667999, 0.3043949604034424, 0.15695609152317047, -0.3993861973285675, 0.2558903396129608, 0.051277779042720795, -0.3115510940551758, -0.23245200514793396, -0.48711246252059937, -0.22405074536800385, 0.1930629014968872, -0.31251609325408936, 0.10297305881977081, -0.06957206130027771, 0.11959883570671082, 0.07090184837579727, -0.022924406453967094, -0.17744699120521545, 0.011233555153012276, -0.051606226712465286, -0.14223834872245789, 0.35806408524513245, 0.10301204770803452, 0.3002461791038513, 0.028435543179512024, -0.06409298628568649, -0.0792621523141861, -0.03254086151719093, 0.002625543624162674, -0.25506162643432617, 0.19151540100574493, -0.12907269597053528, -0.21191932260990143, 0.08967787772417068, -0.10739099979400635, -0.0728527158498764, 0.03868386149406433, 0.23451367020606995, 0.26771748065948486, 0.19941890239715576, 0.3762880563735962, -0.05581224337220192, -0.07181116193532944, -0.5359950065612793, 0.4292730391025543, 0.06651432812213898, 0.4807565212249756, -0.11214044690132141, 0.4839847683906555, -0.412417471408844, -0.09120730310678482, 0.17447277903556824, -0.13535580039024353, -0.04912768304347992, -0.051689498126506805, 0.41210320591926575, 0.016532044857740402, 0.10322803258895874, 0.12271842360496521, 0.24864542484283447, 0.24842549860477448, -0.05891427397727966, 0.0733959823846817, 0.25887617468833923, -0.056736499071121216, -0.05752033740282059, 0.0019686699379235506, -0.12957727909088135, -0.01492444146424532, 0.04100988432765007, 0.34637802839279175, 0.33147692680358887, -0.016273103654384613, 0.007801279425621033, -0.2843843400478363, 0.37583765387535095, 0.44763725996017456, 0.00985984317958355, 0.6277908086776733, 0.15138554573059082, 0.38644203543663025, 0.19796469807624817, 0.6132421493530273, 0.18739822506904602, 0.3135607838630676, -0.26710736751556396, -0.09850075095891953, -0.10006771236658096, 0.22155123949050903, 0.3323749303817749, -0.44877591729164124, 0.13228261470794678, 0.15278321504592896, -0.17467254400253296, 0.02691805362701416, -0.28321385383605957, 0.5812450051307678, -0.13071928918361664, 0.11581778526306152, -0.12242200970649719, 0.49584314227104187, 0.07821398973464966, -0.24743875861167908, -0.09647449851036072, -0.23816022276878357, -0.12135531008243561, 0.20788225531578064, -0.06114952638745308, -0.45058125257492065, 0.10272722691297531, -0.0796879380941391, 0.1519848257303238, 0.023210056126117706, 0.07237230241298676, 0.13939103484153748, 0.08828834444284439, -0.19747139513492584, 0.16374239325523376, -0.01880858838558197, 0.29371166229248047, 0.33347922563552856, 0.2842673063278198, 0.04944971203804016, 0.30337169766426086, 0.1744869351387024, -0.24000144004821777, 0.24576717615127563, -0.012386173009872437, -0.08532514423131943, -0.02837812528014183, -0.13752926886081696, -0.07904167473316193, 0.4382873475551605, -0.03689023479819298, -0.005012410692870617, -0.2990783452987671, 0.1053154468536377, 0.27478545904159546, 0.05074646696448326, 0.557540237903595, -0.05248201638460159, 0.036030739545822144, 0.12577039003372192, -0.005042746663093567, -0.45621925592422485, 0.05324752628803253, 0.2740342617034912, -0.2587764263153076, 0.211805522441864, 0.021720275282859802, -0.0001454632729291916, 0.023895205929875374, 0.26188865303993225, 0.19031158089637756, 0.34039103984832764, -0.3425285816192627, -0.2439441680908203, -0.5069088339805603, -0.20153209567070007, 0.36208322644233704, -0.25355324149131775, -0.127285435795784, 0.2939569056034088, -0.22352147102355957, 0.21327868103981018, 0.051013246178627014, 0.28685852885246277, -0.031867027282714844, 0.1422690749168396, -0.11172623932361603, -0.17621099948883057, -0.3298959732055664, 0.12014203518629074, 0.1010260283946991, -0.1956544816493988, 0.31695568561553955, -0.17720963060855865, -0.13248100876808167, -0.10151973366737366, 0.24131768941879272, 0.14228405058383942, -0.16645357012748718, 0.11815949529409409, -0.0227623600512743, 0.0994168221950531, -0.0737084150314331, -0.061180926859378815, 0.1847684681415558, 0.1632819026708603, -0.2971653938293457, 0.003246776759624481, -0.14494392275810242, -0.1646411120891571, -0.3252429962158203, 0.0519830584526062, -0.5005981922149658, 0.34183549880981445, 0.2640053629875183, 0.04531373083591461, -0.048656903207302094, -0.041342977434396744, -0.31966903805732727, 0.050228483974933624, 0.5476951003074646, 0.11396381258964539, -0.29533153772354126, 0.00012133456766605377, -0.1792999655008316, -0.004662550985813141, 0.5082623958587646, -0.26898089051246643, 0.1456078588962555, 0.07433099299669266, 0.18205353617668152, 0.3494510352611542, -0.04596990346908569, -0.5170993208885193, 0.22811517119407654, 0.5126156806945801, -0.07096610963344574, 0.13376322388648987, 0.17367435991764069, 0.04469282925128937, -0.02027452364563942, -0.11745503544807434, 0.4670485854148865, 0.17937394976615906, -0.38254982233047485, 0.12299410998821259, -0.0028740819543600082 ]
https://github.com/huggingface/datasets/issues/1831
Some question about raw dataset download info in the project .
Sure it would be nice to have an easier access to these paths ! The dataset builder could have a method to return those, what do you think ? Feel free to work on this @albertvillanova , it would be a nice addition :) Your suggestion does work as well @albertvillanova if you complete it by specifying `etag=` to `hash_url_to_filename`. The ETag is obtained by a HEAD request and is used to know if the file on the remote host has changed. Therefore if a file is updated on the remote host, then the hash returned by `hash_url_to_filename` is different.
Hi , i review the code in https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py in the _split_generators function is the truly logic of download raw datasets with dl_manager and use Conll2003 cls by use import_main_class in load_dataset function My question is that , with this logic it seems that i can not have the raw dataset download location in variable in downloaded_files in _split_generators. If someone also want use huggingface datasets as raw dataset downloader, how can he retrieve the raw dataset download path from attributes in datasets.dataset_dict.DatasetDict ?
100
Some question about raw dataset download info in the project . Hi , i review the code in https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py in the _split_generators function is the truly logic of download raw datasets with dl_manager and use Conll2003 cls by use import_main_class in load_dataset function My question is that , with this logic it seems that i can not have the raw dataset download location in variable in downloaded_files in _split_generators. If someone also want use huggingface datasets as raw dataset downloader, how can he retrieve the raw dataset download path from attributes in datasets.dataset_dict.DatasetDict ? Sure it would be nice to have an easier access to these paths ! The dataset builder could have a method to return those, what do you think ? Feel free to work on this @albertvillanova , it would be a nice addition :) Your suggestion does work as well @albertvillanova if you complete it by specifying `etag=` to `hash_url_to_filename`. The ETag is obtained by a HEAD request and is used to know if the file on the remote host has changed. Therefore if a file is updated on the remote host, then the hash returned by `hash_url_to_filename` is different.
[ -0.11998701095581055, -0.10072702914476395, -0.0441226027905941, 0.5240060687065125, 0.0438980907201767, -0.14139975607395172, 0.1183398962020874, 0.017049618065357208, 0.01131482794880867, 0.13442552089691162, -0.3461928963661194, 0.15114381909370422, -0.13548950850963593, 0.5920692682266235, 0.18941214680671692, -0.03796309977769852, -0.08418423682451248, 0.12170040607452393, -0.10777196288108826, -0.08790066838264465, -0.35656777024269104, 0.28227314352989197, -0.26870307326316833, 0.16571155190467834, -0.19466684758663177, -0.02484658919274807, -0.018101632595062256, 0.31912729144096375, -0.4727252125740051, -0.27376291155815125, 0.3005139231681824, 0.21283221244812012, 0.40053442120552063, 0.17420734465122223, -0.0001249202323378995, 0.03750193864107132, 0.2728613615036011, -0.3402905762195587, -0.5269051194190979, -0.26960575580596924, -0.6916819214820862, -0.008249526843428612, -0.05797363817691803, -0.20705395936965942, 0.15472543239593506, 0.011263921856880188, -0.053100526332855225, -0.13250064849853516, 0.0858321487903595, 0.11862953752279282, 0.051858432590961456, 0.3697150647640228, -0.09700582921504974, 0.06019417569041252, 0.3183313012123108, 0.29083290696144104, 0.007792921736836433, 0.1266435980796814, -0.07617367804050446, 0.3405938744544983, 0.10568825900554657, 0.30244192481040955, 0.2225823998451233, 0.10281138122081757, 0.4406280815601349, 0.33734893798828125, -0.37812429666519165, -0.27691227197647095, 0.037309639155864716, 0.24233075976371765, 0.35371240973472595, -0.2812838852405548, -0.5841252207756042, -0.40834560990333557, -0.11912539601325989, -0.46854254603385925, 0.1080772876739502, 0.12144513428211212, -0.42812371253967285, 0.3086462914943695, -0.5675064921379089, -0.47802507877349854, -0.16583940386772156, -0.08521480858325958, -0.13754983246326447, 0.3164403438568115, -0.27753376960754395, 0.06630583852529526, 0.07925637811422348, 0.38436269760131836, 0.270130455493927, -0.2281228005886078, -0.021869484335184097, 0.21743474900722504, -0.10736137628555298, -0.11027906835079193, -0.05122409760951996, 0.29540085792541504, 0.17769628763198853, 0.019523343071341515, -0.12462583184242249, -0.2577977478504181, -0.0622393973171711, 0.03449594974517822, 0.34081315994262695, 0.033425889909267426, 0.13010336458683014, 0.24120943248271942, 0.2612251341342926, 0.17661093175411224, 0.16608883440494537, -0.2614014148712158, -0.11514890938997269, -0.06749756634235382, -0.34620338678359985, 0.1671789586544037, 0.0185232013463974, -0.11034376174211502, -0.1785893589258194, -0.23918145895004272, -0.027964998036623, -0.3496950566768646, 0.3141704797744751, 0.3573302924633026, -0.12206724286079407, 0.04270705208182335, -0.12956437468528748, -0.0033858120441436768, 0.10850515216588974, -0.34348756074905396, -0.0575920045375824, -0.20418423414230347, -0.18113555014133453, 0.11465450376272202, -0.24677583575248718, -0.11905990540981293, 0.3445099890232086, 0.03687789663672447, 0.004490494728088379, 0.05116714537143707, -0.02122936025261879, -0.055425189435482025, 0.26338374614715576, 0.11531275510787964, 0.022503789514303207, 0.24984003603458405, -0.17231926321983337, -0.2595715820789337, -0.19419561326503754, -0.14013421535491943, -0.32650959491729736, -0.46929216384887695, -0.05500435084104538, -0.03652191162109375, -0.13976448774337769, 0.08825572580099106, -0.20459240674972534, -0.035948630422353745, -0.004326470196247101, 0.2903865575790405, 0.015333704650402069, 0.0368744321167469, -0.43757447600364685, -0.26140740513801575, 0.41507166624069214, 0.5498956441879272, -0.26407578587532043, -0.12488196045160294, 0.1626143604516983, -0.41130462288856506, 0.00550764799118042, 0.08511451631784439, -0.37622153759002686, 0.44812607765197754, -0.39542850852012634, -0.14911937713623047, 0.42845410108566284, -0.3486127555370331, -0.2835327684879303, 0.5134187936782837, 0.06857338547706604, -0.009267078712582588, 0.4227089583873749, 0.0049933562986552715, 0.30713289976119995, -0.08315383642911911, -0.07494789361953735, 0.516032338142395, 0.1115894541144371, -0.11258532106876373, -0.014631766825914383, -0.2521876394748688, -0.15627317130565643, -0.08697642385959625, -0.09833954274654388, 0.2540663480758667, 0.13402992486953735, -0.18789707124233246, 0.5806199312210083, -0.0906960517168045, 0.20480425655841827, 0.28495854139328003, 0.06661238521337509, 0.14460641145706177, -0.04341551288962364, 0.05923950672149658, -0.6398258805274963, 0.20616856217384338, -0.27134737372398376, -0.2402375340461731, -0.37892812490463257, -0.33210283517837524, -0.28967198729515076, 0.13957707583904266, -0.2251719981431961, -0.3142988085746765, -0.08741091191768646, 0.14751467108726501, 0.47253406047821045, 0.04230799153447151, -0.3148837685585022, 0.5093703269958496, -0.0809047669172287, 0.12229650467634201, -0.16393783688545227, 0.05523426830768585, 0.16159485280513763, 0.19284985959529877, -0.0075576528906822205, 0.0963904857635498, 0.11788363009691238, -0.15112105011940002, 0.037869516760110855, 0.4245799481868744, 0.12220386415719986, 0.2514209747314453, 0.3347150683403015, 0.05761624872684479, 0.2651583254337311, 0.14589829742908478, -0.00568648986518383, -0.2740899920463562, 0.07453286647796631, 0.2104530930519104, 0.038413532078266144, 0.4083470106124878, -0.019851479679346085, 0.2785646319389343, 0.16968083381652832, -0.008430846966803074, 0.10390067100524902, -0.030802195891737938, 0.14525432884693146, -0.16566196084022522, -0.1733819544315338, 0.1735544055700302, 0.32528117299079895, 0.09082677215337753, -0.24939391016960144, 0.2692500054836273, 0.46805521845817566, -0.0680285394191742, -0.3477782905101776, 0.11484164744615555, -0.2691212594509125, -0.05571678280830383, 0.12462755292654037, 0.8814337253570557, 0.40175360441207886, 0.012343941256403923, 0.23615053296089172, 0.07185424864292145, 0.2702479362487793, -0.06831704080104828, 0.3649231791496277, 0.08198672533035278, -0.09131745994091034, -0.014956645667552948, -0.4808919131755829, -0.19156649708747864, 0.1524692177772522, -0.02260642498731613, 0.18273840844631195, 0.1612292379140854, -0.36833927035331726, 0.03308223932981491, -0.2861863374710083, -0.37137115001678467, -0.22214734554290771, -0.1441483497619629, -0.08420583605766296, -0.18021415174007416, -0.23560182750225067, -0.09176871180534363, -0.15674921870231628, -0.2011982798576355, -0.11801689863204956, 0.029021725058555603, -0.22266243398189545, 0.06880593299865723, -0.1916801631450653, -0.15537074208259583, -0.09857521206140518, -0.09070202708244324, 0.18381457030773163, -0.039757128804922104, 0.0875820517539978, -0.4963953495025635, 0.14699463546276093, -0.305164635181427, 0.2047581970691681, 0.3494753837585449, 0.033692263066768646, 0.1768495738506317, 0.40609461069107056, 0.2000521719455719, -0.06655342131853104, 0.00304544810205698, -0.10940246284008026, 0.09116187691688538, -0.10930483788251877, -0.3894084095954895, 0.14040793478488922, 0.09432382881641388, -0.04756835103034973, -0.22936856746673584, -0.6929690837860107, -0.04163147509098053, 0.24087700247764587, -0.1981220245361328, 0.27621567249298096, -0.10551416128873825, -0.1378173530101776, 0.03868178278207779, -0.40837207436561584, -0.013105485588312149, -0.1860484480857849, -0.8774715065956116, 0.27538082003593445, -0.35449835658073425, -0.23037974536418915, -0.0539298914372921, -0.05970202758908272, 0.17877164483070374, 0.0648881047964096, -0.21972538530826569, -0.015143388882279396, -0.11512760818004608, 0.2784603238105774, 0.12762658298015594, 0.2927648723125458, 0.05189453065395355, -0.0566532164812088, 0.16488274931907654, -0.158871129155159, -0.05074501782655716, 0.23709139227867126, -0.3477133810520172, 0.3656218349933624, 0.40611717104911804, -0.013174101710319519, 0.2261146605014801, 0.7650009393692017, 0.18526598811149597, -0.07836596667766571, 0.14704182744026184, -0.12832900881767273, 0.33871185779571533, 0.3169540762901306, -0.1909826099872589, -0.04542652517557144, -0.07151710987091064, -0.07895335555076599, 0.17518216371536255, 0.12322487682104111, 0.23929066956043243, -0.2906848192214966, -0.21207121014595032, -0.16550031304359436, -0.18593114614486694, -0.1148141473531723, 0.5175089836120605, 0.16060101985931396, 0.11399221420288086, 0.21112802624702454, -0.11490881443023682, 0.046660151332616806, 0.09160731732845306, 0.37275463342666626, 0.4440426826477051, 0.18545664846897125, -0.13311979174613953, 0.01728622242808342, -0.22045958042144775, 0.08725796639919281, 0.3334241211414337, -0.138530433177948, 0.1563546508550644, 0.05649608373641968, 0.19492831826210022, 0.14949370920658112, 0.7233952879905701, -0.010727161541581154, -0.03193751722574234, -0.21975451707839966, -0.256963312625885, -0.026556119322776794, 0.12340229749679565, -0.048227459192276, 0.0339769572019577, 0.45495444536209106, 0.24888470768928528, -0.3597499430179596, -0.36239299178123474, 0.15460413694381714, 0.11621014028787613, -0.27467671036720276, -0.11467629671096802, -0.08331207931041718, -0.08994066715240479, -0.1801081746816635, -0.2004740834236145, 0.053967952728271484, 0.056837018579244614, -0.0310868788510561, -0.026908166706562042, 0.15273517370224, 0.1428893506526947, -0.033535122871398926, 0.17499825358390808, 0.34823960065841675, -0.06587278842926025, -0.023458819836378098, 0.4482233226299286, 0.4415006935596466, 0.17504213750362396, 0.45152193307876587, -0.37988507747650146, -0.19042998552322388, -0.0910220742225647, 0.015267063863575459, 0.6671968102455139, 0.27025705575942993, -0.4598643183708191, 0.025337204337120056, 0.09219110012054443, -0.09705975651741028, -0.4243963360786438, 0.20113888382911682, 0.2834627032279968, -0.025295794010162354, -0.19498077034950256, -0.6230818629264832, 0.49084940552711487, -0.1123150885105133, -0.24026446044445038, 0.18117618560791016, 0.1288716346025467, -0.3148919343948364, -0.16431444883346558, -0.005881801247596741, 0.8531166315078735, 0.12055103480815887, 0.15518611669540405, 0.11117923259735107, -0.4877253770828247, 0.568189263343811, -0.11022205650806427, -0.15492761135101318, -0.26228612661361694, -0.013986106030642986, -0.20053496956825256, -0.23488293588161469, -0.007567651569843292, -0.053538791835308075, 0.0036481134593486786, 0.3770984709262848, 0.008833855390548706, 0.09623997658491135, 0.019093504175543785, 0.5144586563110352, -0.05744162201881409, -0.15685676038265228, 0.10193247348070145, -0.11203659325838089, 0.2022063285112381, 0.4311728775501251, -0.06114289164543152, -0.5024580955505371, -0.2511906325817108, 0.08234632760286331, -0.03678880259394646, -0.057554036378860474, -0.4359014630317688, -0.06462828069925308, 0.10108640789985657, -0.3668350577354431, -0.10168223083019257, 0.5698293447494507, 0.24791905283927917, 0.021381227299571037, -0.2106354981660843, 0.1094164252281189, -0.09360925108194351, 0.1404229700565338, 0.24287228286266327, 0.11148909479379654, -0.07985864579677582, -0.06513442099094391, -0.206864133477211, 0.07147249579429626, -0.03932701051235199, -0.26188796758651733, 0.1217392086982727, -0.10655444860458374, 0.1592170000076294, -0.26591867208480835, -0.023822879418730736, -0.06511765718460083, 0.0663718432188034, -0.08321739733219147, -0.01986651122570038, 0.22813279926776886, -0.2856940031051636, 0.03718692064285278, -0.23541481792926788, -0.3530791401863098, -0.170494943857193, 0.36650019884109497, -0.18454331159591675, 0.03698916733264923, 0.2687326669692993, -0.09281811118125916, -0.26680809259414673, 0.015024062246084213, 0.30829310417175293, -0.10778383910655975, -0.3853510618209839, 0.24817834794521332, 0.29175588488578796, 0.19743047654628754, -0.40337511897087097, 0.23622733354568481, 0.01753954030573368, -0.2571887969970703, -0.18180304765701294, -0.4481990337371826, -0.2201613038778305, 0.13894520699977875, -0.35900697112083435, 0.11877039074897766, -0.05643204227089882, 0.10305383801460266, 0.08750728517770767, -0.06090790778398514, -0.1775813102722168, 0.02925116941332817, -0.03166276961565018, -0.17088042199611664, 0.30032312870025635, 0.12318681925535202, 0.32150691747665405, 0.03046509623527527, -0.07578666508197784, -0.03750254958868027, -0.02389676496386528, 0.012370806187391281, -0.2674652338027954, 0.20465338230133057, -0.11779113858938217, -0.17218832671642303, 0.0988987535238266, -0.06692874431610107, -0.10826975107192993, 0.11157233268022537, 0.2172592431306839, 0.25193026661872864, 0.17155501246452332, 0.43274176120758057, -0.05780657008290291, -0.07814095169305801, -0.5655522346496582, 0.4370851218700409, 0.07442402839660645, 0.5529666543006897, -0.14224302768707275, 0.49687060713768005, -0.4778566062450409, -0.05982114374637604, 0.1709108203649521, -0.06790486723184586, -0.03516204655170441, -0.09247290343046188, 0.4812837541103363, 0.027164116501808167, 0.08242705464363098, 0.11390893906354904, 0.2881808876991272, 0.2134973108768463, -0.05599541962146759, -0.022076746448874474, 0.2925490140914917, -0.06583501398563385, -0.02433815971016884, -0.006055747624486685, -0.1152772605419159, -0.05155147612094879, -0.0074525922536849976, 0.26729246973991394, 0.31705915927886963, -0.057474300265312195, 0.03666076064109802, -0.2835754156112671, 0.303159236907959, 0.4111514687538147, 0.01609136164188385, 0.6047905683517456, 0.1351974755525589, 0.3596572279930115, 0.20577159523963928, 0.5650693774223328, 0.14625129103660583, 0.34692150354385376, -0.27325934171676636, -0.1061105877161026, -0.06793264299631119, 0.2807176113128662, 0.3305306136608124, -0.47023195028305054, 0.14464429020881653, 0.11347902566194534, -0.22966599464416504, 0.000669628381729126, -0.29540619254112244, 0.6380743384361267, -0.048207201063632965, 0.14276880025863647, -0.18980607390403748, 0.5034022331237793, 0.0923021137714386, -0.2670195400714874, -0.1357157826423645, -0.2603684067726135, -0.1646873950958252, 0.27091044187545776, -0.06806755065917969, -0.42041510343551636, 0.09851729869842529, -0.050477057695388794, 0.17679455876350403, 0.02801358327269554, 0.0287285428494215, 0.0661977082490921, 0.09504957497119904, -0.22672158479690552, 0.10044623911380768, 0.016167953610420227, 0.29247725009918213, 0.4172533452510834, 0.23270131647586823, 0.03231622278690338, 0.2583261728286743, 0.20042233169078827, -0.22062526643276215, 0.24011078476905823, -0.018181607127189636, -0.06581839919090271, 0.027501164004206657, -0.12936431169509888, 0.013820374384522438, 0.4370175004005432, -0.04640953987836838, 0.021123286336660385, -0.29373899102211, 0.04024311900138855, 0.2716839909553528, -0.013460978865623474, 0.4885111451148987, 0.011189058423042297, 0.021814949810504913, 0.07291246205568314, 0.014839619398117065, -0.4192562997341156, 0.07811832427978516, 0.3170059621334076, -0.23124724626541138, 0.1861358880996704, -0.00942407175898552, -0.004024092108011246, -0.06532400846481323, 0.35258471965789795, 0.22034196555614471, 0.38038963079452515, -0.3470636308193207, -0.24780146777629852, -0.45142942667007446, -0.21482491493225098, 0.36791178584098816, -0.22358150780200958, -0.08212587982416153, 0.2524750530719757, -0.23522067070007324, 0.17950677871704102, 0.014575935900211334, 0.2517451345920563, -0.051587462425231934, 0.18124321103096008, -0.07469603419303894, -0.1761794239282608, -0.3598529100418091, 0.1285802721977234, 0.08890814334154129, -0.1742633432149887, 0.3584088683128357, -0.1178860068321228, -0.16735370457172394, -0.0971776694059372, 0.23763614892959595, 0.17410032451152802, -0.23551881313323975, 0.17223083972930908, 0.041374947875738144, 0.1344534009695053, -0.06455408781766891, -0.05570955574512482, 0.12124642729759216, 0.16739872097969055, -0.32418814301490784, -0.03889603167772293, -0.1537385880947113, -0.13084354996681213, -0.19898824393749237, 0.03942897170782089, -0.5205609798431396, 0.38177645206451416, 0.24143929779529572, 0.09032470732927322, -0.05928143858909607, -0.05648656189441681, -0.29585424065589905, 0.011627709493041039, 0.5659486651420593, 0.13104936480522156, -0.24987757205963135, 0.02304871939122677, -0.19824868440628052, 0.01729913242161274, 0.5022479295730591, -0.30083075165748596, 0.1593635380268097, 0.0607876256108284, 0.2231656014919281, 0.3416748046875, -0.10279935598373413, -0.5669336915016174, 0.20016947388648987, 0.5056933164596558, -0.11717230826616287, 0.15273964405059814, 0.16592130064964294, 0.14244550466537476, 0.0287003256380558, -0.10235846042633057, 0.5085362195968628, 0.1950046420097351, -0.4277583360671997, 0.13146959245204926, -0.02523314207792282 ]
https://github.com/huggingface/datasets/issues/1831
Some question about raw dataset download info in the project .
Once #1846 will be merged, the paths to the raw downloaded files will be accessible as: ```python builder_instance.dl_manager.downloaded_paths ```
Hi , i review the code in https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py in the _split_generators function is the truly logic of download raw datasets with dl_manager and use Conll2003 cls by use import_main_class in load_dataset function My question is that , with this logic it seems that i can not have the raw dataset download location in variable in downloaded_files in _split_generators. If someone also want use huggingface datasets as raw dataset downloader, how can he retrieve the raw dataset download path from attributes in datasets.dataset_dict.DatasetDict ?
19
Some question about raw dataset download info in the project . Hi , i review the code in https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py in the _split_generators function is the truly logic of download raw datasets with dl_manager and use Conll2003 cls by use import_main_class in load_dataset function My question is that , with this logic it seems that i can not have the raw dataset download location in variable in downloaded_files in _split_generators. If someone also want use huggingface datasets as raw dataset downloader, how can he retrieve the raw dataset download path from attributes in datasets.dataset_dict.DatasetDict ? Once #1846 will be merged, the paths to the raw downloaded files will be accessible as: ```python builder_instance.dl_manager.downloaded_paths ```
[ -0.22275230288505554, -0.07279067486524582, -0.07953472435474396, 0.5368555188179016, 0.11309221386909485, -0.07173092663288116, 0.11943317949771881, -0.04083823040127754, 0.03015894815325737, 0.12580569088459015, -0.37297266721725464, 0.19036926329135895, -0.11315012723207474, 0.6030982136726379, 0.14625492691993713, -0.049461573362350464, -0.05285138636827469, 0.19315499067306519, -0.09360204637050629, -0.04381445795297623, -0.41981449723243713, 0.30987516045570374, -0.36746329069137573, 0.11164367198944092, -0.18325702846050262, 0.0009525474160909653, 0.004193821921944618, 0.28491339087486267, -0.4855918288230896, -0.2597878873348236, 0.2608335316181183, 0.2013038545846939, 0.40079566836357117, 0.2447414994239807, -0.00012469073408283293, 0.04527248442173004, 0.29022127389907837, -0.3360069990158081, -0.4938015043735504, -0.26953452825546265, -0.6499729156494141, 0.008085042238235474, -0.07448269426822662, -0.18322938680648804, 0.08800093084573746, -0.09403705596923828, -0.08865856379270554, -0.11867299675941467, 0.1216423362493515, 0.09114298969507217, 0.06241064891219139, 0.35189005732536316, -0.021356631070375443, 0.02447360008955002, 0.22501710057258606, 0.2522042691707611, 0.05808297544717789, 0.061889685690402985, -0.025266170501708984, 0.3873560130596161, 0.19038036465644836, 0.2815835475921631, 0.2330067753791809, 0.11517627537250519, 0.44007980823516846, 0.27466413378715515, -0.28496408462524414, -0.34415188431739807, 0.0646265521645546, 0.1897079050540924, 0.3417404592037201, -0.3277813494205475, -0.48005008697509766, -0.3511134684085846, -0.12979766726493835, -0.5806764364242554, 0.0638197734951973, 0.12261468917131424, -0.45668312907218933, 0.2788126766681671, -0.5162336230278015, -0.5137308835983276, -0.1360848993062973, -0.09485398232936859, -0.23399052023887634, 0.469361275434494, -0.36340564489364624, 0.033922918140888214, 0.0787886530160904, 0.4059504270553589, 0.25238972902297974, -0.19821114838123322, -0.03294413164258003, 0.23633138835430145, -0.1470579355955124, -0.14512935280799866, -0.1241968646645546, 0.2437325119972229, 0.18728873133659363, -0.010250106453895569, -0.15922851860523224, -0.2508053481578827, 0.06323210895061493, 0.04142298549413681, 0.3790726959705353, 0.048365604132413864, 0.07307527959346771, 0.2580433785915375, 0.25100207328796387, 0.12097617983818054, 0.1441139131784439, -0.23359131813049316, -0.09296716749668121, -0.06286199390888214, -0.3814375698566437, 0.14220598340034485, 0.02510100230574608, -0.054440177977085114, -0.2750721275806427, -0.21448838710784912, -0.08977013826370239, -0.32153263688087463, 0.30578723549842834, 0.3743990659713745, -0.10193625837564468, 0.022057052701711655, -0.04234665632247925, 0.015864847227931023, 0.12651047110557556, -0.32918834686279297, -0.0845957100391388, -0.23305122554302216, -0.15517134964466095, 0.03512383624911308, -0.28792673349380493, -0.10389550030231476, 0.4116898477077484, 0.10918450355529785, 0.014077447354793549, 0.059960007667541504, 0.013430405408143997, -0.07171904295682907, 0.16966621577739716, 0.1859181672334671, 0.04905131831765175, 0.21484684944152832, -0.19173665344715118, -0.25927770137786865, -0.17380791902542114, -0.0748298242688179, -0.322701096534729, -0.42819300293922424, -0.12090140581130981, 0.008147436194121838, -0.16941337287425995, 0.11976379156112671, -0.21290695667266846, 0.02802637778222561, 0.12359961122274399, 0.28714147210121155, 0.015298120677471161, -0.01119023934006691, -0.42825639247894287, -0.25140121579170227, 0.38355621695518494, 0.43487417697906494, -0.22151358425617218, -0.12300127744674683, 0.0940123200416565, -0.4314323365688324, 0.06299147754907608, 0.04781702905893326, -0.35829073190689087, 0.5085855722427368, -0.4254651665687561, -0.1822807788848877, 0.5232151746749878, -0.3267562687397003, -0.2476576864719391, 0.5593611001968384, 0.11161313951015472, -0.09789664298295975, 0.40940433740615845, -0.030503690242767334, 0.28242868185043335, -0.07300296425819397, -0.07145504653453827, 0.5319200158119202, 0.13482145965099335, -0.11838629096746445, 0.030750300735235214, -0.2429308146238327, -0.1591515690088272, -0.11991351842880249, -0.11367425322532654, 0.2524615526199341, 0.07389429956674576, -0.1367603838443756, 0.5260575413703918, -0.04977177456021309, 0.2035021334886551, 0.33507752418518066, -0.011146754026412964, 0.13695746660232544, 0.01732943020761013, -0.015498962253332138, -0.6657517552375793, 0.08385219424962997, -0.2974469065666199, -0.25763288140296936, -0.26900869607925415, -0.35591262578964233, -0.337718665599823, 0.17514649033546448, -0.2877248525619507, -0.3327605128288269, -0.07928220927715302, 0.0922703668475151, 0.4710848927497864, -0.02587807923555374, -0.39520978927612305, 0.5251184701919556, -0.04188060387969017, 0.16154150664806366, -0.08880361914634705, -0.004625711590051651, 0.14276054501533508, 0.1398673802614212, 0.0007158517837524414, 0.11269554495811462, 0.08031411468982697, -0.17828655242919922, 0.06293107569217682, 0.46621936559677124, 0.15163086354732513, 0.19590690732002258, 0.17180246114730835, 0.009357929229736328, 0.25832945108413696, 0.1817045360803604, -0.051087141036987305, -0.22975502908229828, 0.0971025824546814, 0.21278893947601318, 0.05651405453681946, 0.3524632453918457, 0.022318394854664803, 0.25957292318344116, 0.16509461402893066, -0.06907409429550171, 0.1472308486700058, -0.016898617148399353, 0.19596019387245178, -0.2239765226840973, -0.148638516664505, 0.20687589049339294, 0.397129088640213, 0.15361732244491577, -0.2714308500289917, 0.19678941369056702, 0.4208643436431885, -0.06795485317707062, -0.2724217176437378, 0.034227404743433, -0.3187575042247772, -0.03334954380989075, 0.056656621396541595, 0.7819692492485046, 0.48301881551742554, 0.019000016152858734, 0.19432635605335236, 0.08965291827917099, 0.29206812381744385, -0.1252109706401825, 0.40044742822647095, 0.12244507670402527, -0.032064151018857956, 0.07603952288627625, -0.47855544090270996, -0.20692072808742523, 0.1402297019958496, 0.028768416494131088, 0.24543580412864685, 0.15550069510936737, -0.3239542543888092, 0.053590498864650726, -0.23969267308712006, -0.399260938167572, -0.28191938996315, -0.14867429435253143, -0.015991587191820145, -0.16451340913772583, -0.24365632236003876, -0.057424504309892654, -0.09815317392349243, -0.16977065801620483, -0.048838093876838684, 0.005650699138641357, -0.2327384054660797, 0.07420623302459717, -0.17073974013328552, -0.09411326050758362, -0.10392584651708603, -0.0643208771944046, 0.177467480301857, -0.022661926224827766, 0.08939985930919647, -0.46940866112709045, 0.12176193296909332, -0.1666528731584549, 0.18321508169174194, 0.35408127307891846, 0.08138006925582886, 0.1517675817012787, 0.4431499242782593, 0.12896814942359924, -0.02049046941101551, 0.006859102286398411, -0.1250995397567749, 0.12453585863113403, -0.1264803111553192, -0.4716932773590088, 0.10300382971763611, 0.09852968156337738, -0.08310385793447495, -0.20642927289009094, -0.7116604447364807, -0.09922640025615692, 0.12189576029777527, -0.1045544296503067, 0.2185325026512146, -0.13338762521743774, -0.1711408793926239, 0.017439570277929306, -0.2863849103450775, -0.0070474110543727875, -0.2202375829219818, -0.7402295470237732, 0.20953787863254547, -0.37350645661354065, -0.20580558478832245, -0.05531492084264755, -0.12005658447742462, 0.21114540100097656, -0.008677789941430092, -0.16509731113910675, 0.05140525475144386, -0.16194364428520203, 0.17685958743095398, 0.08311163634061813, 0.3762400448322296, -0.034780457615852356, -0.04974346607923508, 0.16115741431713104, -0.19358664751052856, -0.0018394123762845993, 0.18269230425357819, -0.391580194234848, 0.36621877551078796, 0.3890749216079712, -0.024343039840459824, 0.12294919788837433, 0.7561135292053223, 0.2864709496498108, -0.15027397871017456, 0.1753430962562561, -0.13640348613262177, 0.42529699206352234, 0.2925862967967987, -0.17734724283218384, -0.04888768121600151, 0.07276714593172073, -0.06939860433340073, 0.18231382966041565, 0.09213308244943619, 0.22848467528820038, -0.26282405853271484, -0.16670821607112885, -0.11210209876298904, -0.13025978207588196, -0.14206144213676453, 0.5496488213539124, 0.19257095456123352, 0.09298771619796753, 0.1902044713497162, -0.0035491902381181717, 0.06130806356668472, 0.021015450358390808, 0.40957003831863403, 0.3880935609340668, 0.16189879179000854, -0.06720665097236633, -0.07496077567338943, -0.22479760646820068, 0.07422192394733429, 0.28973665833473206, -0.1773892641067505, 0.17768855392932892, 0.09866633266210556, 0.20313775539398193, 0.11854324489831924, 0.702144205570221, -0.018074417486786842, -0.09241701662540436, -0.13284830749034882, -0.21924269199371338, -0.011309169232845306, 0.10380347073078156, -0.1278323233127594, 0.1078297421336174, 0.511014461517334, 0.2077200710773468, -0.37211519479751587, -0.4381561279296875, 0.21518290042877197, 0.10949421674013138, -0.2812061607837677, -0.18378403782844543, -0.15446841716766357, -0.10781921446323395, -0.22265462577342987, -0.2091923952102661, 0.1499243527650833, 0.08814941346645355, -0.0057040550746023655, -0.05667814984917641, 0.08265107870101929, 0.08418189734220505, -0.00867772102355957, 0.14627297222614288, 0.3609341084957123, -0.012086248025298119, -0.07332880795001984, 0.3574349582195282, 0.39060649275779724, 0.19430387020111084, 0.4637274146080017, -0.3728161156177521, -0.17683112621307373, -0.026509825140237808, 0.053140562027692795, 0.7556015253067017, 0.17636573314666748, -0.48826736211776733, 0.06012370437383652, -0.01163436472415924, -0.0755683183670044, -0.37209799885749817, 0.2422153800725937, 0.2992216646671295, 0.0321989469230175, -0.18011026084423065, -0.6387314200401306, 0.4800696074962616, -0.05209903046488762, -0.20184046030044556, 0.16663038730621338, 0.006974227726459503, -0.3069559633731842, -0.14859779179096222, -0.010579496622085571, 0.7889214158058167, 0.16144771873950958, 0.11219993233680725, 0.08578617870807648, -0.4110880494117737, 0.56215500831604, -0.12681815028190613, -0.17076432704925537, -0.29673275351524353, 0.053773947060108185, -0.1420811414718628, -0.26154226064682007, 0.048769865185022354, -0.09641434252262115, -0.08357000350952148, 0.35387852787971497, -0.1031552255153656, 0.07831205427646637, 0.03511657565832138, 0.5478222966194153, -0.09284060448408127, -0.10320283472537994, 0.09889603406190872, -0.11135603487491608, 0.25751566886901855, 0.4692692756652832, -0.12615543603897095, -0.4839959144592285, -0.183550164103508, 0.10571339726448059, -0.05138307437300682, -0.09796992689371109, -0.43277573585510254, -0.01700049638748169, 0.09261558204889297, -0.35371696949005127, 0.012873329222202301, 0.6208474040031433, 0.2836613655090332, 0.023147664964199066, -0.16483402252197266, 0.06734482944011688, -0.049520283937454224, 0.07690142095088959, 0.24807778000831604, 0.20850417017936707, -0.06990478932857513, -0.07847261428833008, -0.15814827382564545, 0.13687610626220703, 0.010729962028563023, -0.20631244778633118, 0.08965475857257843, -0.10356515645980835, 0.18163543939590454, -0.33170413970947266, -0.03476041927933693, -0.04171796143054962, 0.06684225797653198, -0.06872771680355072, -0.010938011109828949, 0.22277086973190308, -0.3475801944732666, 0.06214278191328049, -0.2775218188762665, -0.38756701350212097, -0.1929181069135666, 0.28779342770576477, -0.05374094843864441, 0.060010626912117004, 0.22071291506290436, -0.09823399037122726, -0.20244872570037842, -0.039891354739665985, 0.3363059163093567, -0.10708589106798172, -0.2793481647968292, 0.33726105093955994, 0.3225172162055969, 0.09401173889636993, -0.36375632882118225, 0.3148415982723236, -0.0405123233795166, -0.23936668038368225, -0.245291605591774, -0.4822888970375061, -0.2695069909095764, 0.12329407781362534, -0.33198434114456177, 0.12494032084941864, -0.06201799586415291, 0.19582879543304443, 0.06519702821969986, -0.024379072710871696, -0.1795799732208252, 0.009097358211874962, -0.03626267984509468, -0.1489293873310089, 0.30708643794059753, 0.09862378239631653, 0.27303653955459595, 0.0948401391506195, -0.0722217857837677, -0.020914189517498016, -0.0723859965801239, -0.010793060064315796, -0.22540080547332764, 0.18569427728652954, -0.12888643145561218, -0.1764187514781952, 0.11621881276369095, -0.0721571147441864, -0.17466071248054504, 0.12631069123744965, 0.29377827048301697, 0.1577111780643463, 0.1738811433315277, 0.38274648785591125, -0.07631321251392365, -0.05025647580623627, -0.5465725064277649, 0.35602107644081116, 0.09666074067354202, 0.47935187816619873, -0.17473289370536804, 0.48573803901672363, -0.4541742205619812, -0.044782254844903946, 0.1853283941745758, -0.12383110076189041, 0.004905074834823608, -0.11672220379114151, 0.42325255274772644, -0.021385692059993744, 0.10240112245082855, 0.10843213647603989, 0.294776052236557, 0.2523186504840851, -0.10781185328960419, 0.044097237288951874, 0.19664371013641357, -0.04593467712402344, -0.05867617949843407, -0.0020267837680876255, -0.11702336370944977, -0.007699617184698582, 0.02139722928404808, 0.32239672541618347, 0.3394869565963745, 0.015130177140235901, -0.011926569044589996, -0.24167677760124207, 0.33748340606689453, 0.4738023281097412, 0.030713610351085663, 0.6178556084632874, 0.15476663410663605, 0.39503276348114014, 0.2319708913564682, 0.6090509295463562, 0.1564681977033615, 0.3764045238494873, -0.25118884444236755, -0.09264097362756729, -0.07205317914485931, 0.20948301255702972, 0.37991657853126526, -0.43240129947662354, 0.1841050237417221, 0.18723829090595245, -0.21922412514686584, 0.028991088271141052, -0.24777072668075562, 0.58083575963974, -0.14306822419166565, 0.11188992112874985, -0.17776133120059967, 0.4941421151161194, -0.006395768374204636, -0.25833049416542053, -0.14018614590168, -0.20411601662635803, -0.09134949743747711, 0.2170604169368744, -0.0641435980796814, -0.4420028328895569, 0.025470145046710968, -0.10101333260536194, 0.1205315962433815, 0.050895243883132935, 0.07091251015663147, 0.0971241295337677, 0.019592680037021637, -0.21969792246818542, 0.2089305818080902, -0.0922003835439682, 0.3163808584213257, 0.3709082305431366, 0.2975153625011444, 0.097418412566185, 0.31268996000289917, 0.15958595275878906, -0.28444409370422363, 0.20181696116924286, -0.047547634690999985, -0.09056125581264496, 0.006174130365252495, -0.12108679115772247, 0.0058420319110155106, 0.4182610511779785, -0.04614253714680672, -0.020061945542693138, -0.36481428146362305, 0.16890043020248413, 0.25127822160720825, 0.0000590076670050621, 0.5455227494239807, -0.053551748394966125, 0.008328638970851898, 0.08692637085914612, -0.017251119017601013, -0.47711101174354553, 0.060271184891462326, 0.3029375970363617, -0.25793197751045227, 0.20564204454421997, 0.004927710629999638, -0.002101300284266472, -0.06428763270378113, 0.3228244185447693, 0.13366450369358063, 0.35694336891174316, -0.36905407905578613, -0.28266751766204834, -0.4720335900783539, -0.15786120295524597, 0.3902360796928406, -0.2169177085161209, -0.08853726089000702, 0.26076245307922363, -0.2557816505432129, 0.22716860473155975, 0.034068115055561066, 0.32264140248298645, 0.010752041824162006, 0.14977392554283142, -0.06564083695411682, -0.16148199141025543, -0.3975391387939453, 0.10980971902608871, 0.11434325575828552, -0.19394132494926453, 0.36256134510040283, -0.22834330797195435, -0.1399366706609726, -0.11161008477210999, 0.2486993372440338, 0.2083442360162735, -0.204941987991333, 0.11925198137760162, -0.03921990096569061, 0.15622861683368683, -0.06644024699926376, 0.016616011038422585, 0.23282255232334137, 0.20918917655944824, -0.3784237504005432, -0.000628150999546051, -0.10048717260360718, -0.19409285485744476, -0.30430567264556885, 0.04658067598938942, -0.4616064429283142, 0.3110303282737732, 0.2901492714881897, 0.06870903074741364, -0.05696810781955719, -0.03966726362705231, -0.3614218831062317, 0.05343569442629814, 0.5975099205970764, 0.17920148372650146, -0.2954568862915039, -0.0016950778663158417, -0.20202851295471191, 0.018105311319231987, 0.47211605310440063, -0.27607452869415283, 0.09747061133384705, -0.039548635482788086, 0.1857442855834961, 0.3565405607223511, -0.1293281465768814, -0.5400485992431641, 0.24399402737617493, 0.5118326544761658, -0.12002439051866531, 0.1001458615064621, 0.24151143431663513, 0.15310366451740265, -0.016218777745962143, -0.09920103847980499, 0.5105974078178406, 0.2011978030204773, -0.41276732087135315, 0.13263264298439026, -0.014809291809797287 ]
https://github.com/huggingface/datasets/issues/1830
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
Hi @wumpusman `datasets` has a caching mechanism that allows to cache the results of `.map` so that when you want to re-run it later it doesn't recompute it again. So when you do `.map`, what actually happens is: 1. compute the hash used to identify your `map` for the cache 2. apply your function on every batch This can explain the time difference between your different experiments. The hash computation time depends of how complex your function is. For a tokenizer, the hash computation scans the lists of the words in the tokenizer to identify this tokenizer. Usually it takes 2-3 seconds. Also note that you can disable caching though using ```python import datasets datasets.set_caching_enabled(False) ```
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
116
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer? This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function. Hi @wumpusman `datasets` has a caching mechanism that allows to cache the results of `.map` so that when you want to re-run it later it doesn't recompute it again. So when you do `.map`, what actually happens is: 1. compute the hash used to identify your `map` for the cache 2. apply your function on every batch This can explain the time difference between your different experiments. The hash computation time depends of how complex your function is. For a tokenizer, the hash computation scans the lists of the words in the tokenizer to identify this tokenizer. Usually it takes 2-3 seconds. Also note that you can disable caching though using ```python import datasets datasets.set_caching_enabled(False) ```
[ -0.40404728055000305, -0.01300717145204544, -0.10247054696083069, 0.1034291684627533, 0.14530566334724426, -0.12255395948886871, 0.2550537884235382, 0.1890888214111328, 0.13067761063575745, -0.006501898169517517, -0.05422341078519821, 0.4988860785961151, -0.1724812239408493, -0.2727595269680023, -0.1320432871580124, 0.06504257768392563, 0.21975907683372498, 0.022416770458221436, 0.24164487421512604, -0.034286655485630035, -0.1218729019165039, 0.10230173915624619, -0.17672543227672577, 0.24139907956123352, -0.31526270508766174, -0.07799291610717773, 0.08123118430376053, -0.20963355898857117, -0.002756858244538307, -0.5689612627029419, -0.20842988789081573, 0.15812477469444275, 0.02094278112053871, 0.533124566078186, -0.00011487364827189595, 0.04034285247325897, -0.02916356921195984, 0.2731476426124573, 0.13471747934818268, 0.04436098039150238, 0.35295429825782776, -0.19428551197052002, -0.16858325898647308, -0.22576633095741272, -0.054171204566955566, -0.2808627784252167, -0.02212238870561123, -0.22417739033699036, 0.06830838322639465, 0.030042309314012527, 0.16085880994796753, 0.11519482731819153, -0.3964320719242096, -0.05951574444770813, -0.0024587735533714294, -0.1042250394821167, -0.09915442764759064, 0.014026454649865627, 0.07132945954799652, -0.2551872134208679, -0.21165668964385986, 0.19490475952625275, -0.21304312348365784, -0.14781400561332703, 0.2687233090400696, 0.21636949479579926, 0.034611500799655914, -0.24252483248710632, 0.1680864691734314, 0.2316349744796753, 0.06701106578111649, -0.02721283584833145, -0.017125165089964867, -0.3350789546966553, -0.3706915080547333, -0.02848217636346817, 0.1461225003004074, -0.4334976077079773, -0.12065143883228302, -0.08960263431072235, -0.41406527161598206, 0.2037731111049652, 0.264242559671402, -0.12239387631416321, -0.20393069088459015, 0.43524378538131714, 0.09542796015739441, 0.14973461627960205, 0.10415232926607132, -0.09975200891494751, -0.28079161047935486, -0.26437780261039734, -0.15957695245742798, 0.3733043372631073, -0.34158673882484436, -0.17395520210266113, 0.26929545402526855, -0.30913490056991577, -0.1407884955406189, 0.1142800971865654, -0.14243142306804657, 0.19466519355773926, 0.2083410620689392, -0.04711989313364029, 0.06630697846412659, 0.24600403010845184, 0.038447748869657516, 0.17384636402130127, 0.029690610244870186, -0.4802928566932678, -0.3160501718521118, -0.09036076813936234, -0.1888754516839981, 0.020213767886161804, 0.3458714187145233, -0.24245864152908325, -0.2370806187391281, -0.07258336246013641, -0.020596789196133614, -0.17130690813064575, -0.37994447350502014, -0.09833713620901108, 0.06586102396249771, 0.18545490503311157, 0.05874723941087723, 0.06103825569152832, -0.36479800939559937, -0.20216697454452515, -0.09283135831356049, -0.07672666013240814, -0.12862785160541534, -0.1720004379749298, -0.10449197143316269, 0.25425758957862854, -0.18827322125434875, 0.09130582213401794, 0.2601751685142517, 0.07899506390094757, -0.11537612974643707, 0.21030840277671814, 0.21960456669330597, -0.36432287096977234, 0.1047283187508583, -0.11305445432662964, 0.07480095326900482, 0.43602678179740906, -0.005507688969373703, 0.0017840713262557983, -0.25952884554862976, 0.20827564597129822, -0.26490849256515503, -0.22648875415325165, 0.2413850575685501, 0.11916032433509827, -0.08314234018325806, -0.1221609115600586, -0.4942292869091034, 0.4385456144809723, 0.2539222538471222, -0.1163535863161087, -0.0749136283993721, -0.18091319501399994, -0.5298192501068115, -0.21674194931983948, 0.267924964427948, -0.018771812319755554, -0.07221245765686035, -0.19377996027469635, 0.34180352091789246, 0.19217228889465332, 0.3103511929512024, 0.64305579662323, -0.38648295402526855, 0.7953370213508606, -0.1250496506690979, 0.7483618855476379, 0.2579936385154724, -0.24770547449588776, -0.37781819701194763, 0.11663870513439178, -0.17846891283988953, 0.27222102880477905, -0.28185170888900757, -0.12006288766860962, 0.70263671875, -0.22527869045734406, 0.34198471903800964, 0.10614454001188278, 0.24699558317661285, 0.3040958046913147, -0.24837328493595123, -0.04919016361236572, 0.5504589676856995, -0.08022263646125793, -0.22425304353237152, -0.15098139643669128, -0.15340656042099, 0.11113331466913223, -0.03155418485403061, -0.12037332355976105, -0.1554092913866043, 0.06173226237297058, 0.01511157676577568, 0.027055785059928894, -0.0637362003326416, 0.21922630071640015, 0.147112637758255, 0.21719422936439514, 0.07411746680736542, 0.068392813205719, 0.42903053760528564, -0.006117053329944611, 0.10551666468381882, -0.06455042958259583, -0.15043263137340546, -0.14192789793014526, 0.17265325784683228, 0.12822045385837555, 0.06789854168891907, 0.08919259905815125, 0.23117227852344513, -0.10698017477989197, 0.015444153919816017, 0.1270228922367096, 0.44377678632736206, -0.3041419982910156, 0.14068661630153656, -0.160288468003273, -0.10612224042415619, -0.19360360503196716, 0.14087358117103577, 0.10873284190893173, -0.18346554040908813, 0.16243290901184082, 0.1247907504439354, 0.30946648120880127, -0.17306947708129883, 0.20741267502307892, 0.11455947160720825, 0.2654835283756256, 0.04486136510968208, 0.1117049902677536, 0.016418371349573135, -0.1618005931377411, -0.10114359110593796, 0.24875250458717346, 0.76655513048172, 0.2934231758117676, -0.0981307402253151, -0.19185051321983337, -0.007449474185705185, 0.20522290468215942, 0.12545940279960632, 0.09028607606887817, -0.017213623970746994, 0.30128994584083557, 0.4247044622898102, 0.17126646637916565, 0.3508587181568146, 0.474333792924881, 0.5267606973648071, -0.1261989027261734, -0.21092328429222107, 0.11692474782466888, -0.3413843810558319, -0.4390025734901428, -0.03245564550161362, -0.4132472574710846, 0.1679462045431137, 0.10433124005794525, 0.22383281588554382, -0.16898339986801147, -0.013875714503228664, 0.002553023397922516, 0.2727617919445038, 0.23192822933197021, -0.0062523228116333485, -0.03470814973115921, 0.1677316278219223, 0.2354772537946701, -0.3278363049030304, -0.1683434396982193, -0.017744751647114754, 0.24668413400650024, -0.020203396677970886, -0.08809293061494827, 0.06602846086025238, 0.17903846502304077, 0.48365598917007446, -0.07303361594676971, 0.04387972503900528, -0.23364856839179993, -0.08682671189308167, 0.0112861767411232, 0.07300588488578796, 0.14293424785137177, 0.20160508155822754, 0.04160480201244354, 0.05537938326597214, -0.13247564435005188, -0.032635945826768875, -0.20362256467342377, -0.3690440356731415, 0.06732751429080963, 0.0478154756128788, -0.10531284660100937, 0.30129051208496094, 0.18954911828041077, -0.07064664363861084, -0.028474101796746254, -0.45728859305381775, 0.08773922920227051, -0.1803114265203476, 0.009878138080239296, -0.10766516625881195, -0.15344294905662537, -0.19836817681789398, 0.04000264033675194, 0.11686036735773087, -0.27817514538764954, -0.2616518437862396, -0.3224227726459503, -0.11807239800691605, -0.17440913617610931, 0.14054423570632935, -0.020054161548614502, 0.05114235728979111, -0.03128029778599739, 0.12230005115270615, 0.10087120532989502, 0.12934523820877075, -0.2491520196199417, -0.1672079861164093, 0.19397687911987305, -0.05200427025556564, -0.012172069400548935, -0.3335230350494385, -0.24970465898513794, 0.3890588581562042, -0.06997024267911911, -0.014193754643201828, -0.2141367346048355, 0.09421406686306, 0.16698022186756134, 0.13987205922603607, -0.24602219462394714, 0.21763961017131805, -0.3044709861278534, 0.26148006319999695, 0.03844340518116951, -0.21672217547893524, 0.3941025733947754, 0.2282126545906067, -0.12224412709474564, 0.16977044939994812, -0.24780593812465668, 0.1691341996192932, -0.05900334566831589, -0.23506364226341248, 0.0723128616809845, 0.4840388596057892, 0.24679642915725708, 0.6211668848991394, 0.04898199066519737, -0.013337384909391403, -0.00010479241609573364, -0.3113273084163666, -0.13158224523067474, -0.4311894476413727, -0.07551337778568268, 0.20715612173080444, -0.09913642704486847, 0.025744158774614334, 0.48657655715942383, -0.08505569398403168, -0.3330840468406677, 0.2221699059009552, -0.17344248294830322, 0.04907567799091339, -0.19993911683559418, 0.12732847034931183, -0.0947733223438263, 0.05930540710687637, 0.0013976357877254486, 0.40461084246635437, -0.5339138507843018, -0.14910292625427246, 0.23746751248836517, -0.2787156105041504, 0.2525825500488281, -0.25178951025009155, -0.9455530643463135, 0.3512921631336212, -0.8524879217147827, 0.09497635811567307, 0.01654793508350849, 0.22760270535945892, 0.04750743880867958, -0.0270619448274374, 0.11630081385374069, -0.03245183825492859, 0.16581302881240845, -0.053808704018592834, -0.08455531299114227, 0.2370498776435852, -0.5604736804962158, -0.11725729703903198, -0.14565131068229675, -0.078785240650177, 0.19362692534923553, 0.5949993133544922, 0.7412642240524292, -0.09443050622940063, -0.2862768769264221, -0.3504449725151062, -0.04790698364377022, 0.06967751681804657, 0.03928505629301071, -0.013841859996318817, -0.10236944258213043, -0.1808013767004013, 0.010817199945449829, 0.10237520188093185, 0.18226686120033264, 0.13341988623142242, -0.15410926938056946, -0.08755295723676682, 0.15052032470703125, 0.30369699001312256, 0.27780210971832275, 0.24230724573135376, -0.038768261671066284, 0.34377962350845337, 0.3173718750476837, 0.10557398200035095, -0.11109791696071625, -0.15754641592502594, 0.2181520015001297, -0.36953097581863403, 0.09002270549535751, 0.09987189620733261, 0.06710663437843323, 0.16950537264347076, -0.032325420528650284, 0.2138267457485199, -0.2696317732334137, 0.3467106223106384, -0.19183045625686646, 0.3990115225315094, 0.5268696546554565, 0.13443554937839508, -0.5008943676948547, -0.3026985228061676, 0.07103843241930008, 0.5278066396713257, -0.26714885234832764, 0.43690693378448486, -0.4802761673927307, -0.4048759341239929, 0.4786459803581238, 0.2622498571872711, 0.5893489718437195, -0.00019755959510803223, 0.21312566101551056, 0.2467377483844757, 0.28208768367767334, 0.18717972934246063, -0.44224393367767334, -0.1283496916294098, -0.23518304526805878, 0.2189825475215912, 0.04329981654882431, -0.07354763895273209, 0.06810372322797775, 0.23929408192634583, -0.11905810236930847, -0.07074674218893051, 0.1343747079372406, 0.882922351360321, -0.013043368235230446, 0.3027331233024597, 0.4876135587692261, -0.3995562493801117, 0.3429583013057709, 0.13938862085342407, 0.22414198517799377, 0.0627053827047348, 0.0940348356962204, 0.09735546261072159, -0.06829366087913513, -0.1550719439983368, -0.24992884695529938, -0.2025584578514099, -0.5686981081962585, 0.2977931499481201, -0.20471394062042236, 0.03080093115568161, 0.07980066537857056, 0.14483767747879028, 0.04165821149945259, 0.24064290523529053, 0.0066324155777692795, 0.2885671555995941, 0.21322670578956604, 0.33644169569015503, 0.2534503936767578, -0.5096054673194885, -0.19772887229919434, -0.00980672799050808, -0.015243232250213623, 0.1644136905670166, -0.26448115706443787, -0.3185320496559143, -0.642041802406311, -0.04586450755596161, 0.3040485680103302, -0.36560505628585815, 0.019045107066631317, 0.10112300515174866, -0.079265296459198, -0.19805815815925598, 0.08064164966344833, -0.15343168377876282, 0.08537718653678894, 0.40806373953819275, -0.07441210746765137, -0.2806633710861206, 0.018494319170713425, 0.3022502660751343, 0.12154626101255417, -0.21070414781570435, 0.43070188164711, -0.47031137347221375, -0.2629357576370239, -0.10358759015798569, 0.21543627977371216, 0.13631519675254822, 0.11987597495317459, 0.09263504296541214, -0.13185419142246246, -0.18322856724262238, 0.09514603763818741, 0.26415467262268066, -0.12749488651752472, -0.10990751534700394, -0.17242029309272766, -0.018341217190027237, -0.306043803691864, -0.010590247809886932, -0.05993114039301872, 0.09162308275699615, 0.09735330194234848, 0.13492800295352936, -0.3185405433177948, 0.1697496622800827, -0.25776854157447815, -0.12103110551834106, 0.12591196596622467, 0.15388117730617523, -0.20141154527664185, -0.1586650013923645, 0.1208089217543602, 0.04116205498576164, 0.09976769983768463, 0.2575889825820923, 0.035096004605293274, -0.22869470715522766, -0.08349362760782242, 0.14248965680599213, 0.046630315482616425, -0.36045733094215393, 0.06594091653823853, 0.1358204334974289, -0.08454747498035431, -0.5128015279769897, 0.20534510910511017, 0.17162397503852844, 0.013776779174804688, -0.42633458971977234, 0.1967771351337433, -0.004544563591480255, -0.006976518779993057, 0.1540147066116333, -0.040920138359069824, 0.019588693976402283, 0.10938411206007004, 0.21673014760017395, 0.12089195847511292, -0.20395323634147644, 0.04365489259362221, 0.2604888379573822, 0.33503156900405884, 0.1718846559524536, 0.01198059692978859, -0.026033155620098114, -0.0632946640253067, 0.1637771725654602, -0.16997887194156647, 0.2126777619123459, -0.22457046806812286, -0.4430891275405884, 0.20653828978538513, 0.1477208286523819, 0.06795012950897217, -0.2368668168783188, 0.41122525930404663, -0.2698410153388977, 0.17054681479930878, 0.05370637774467468, 0.22349035739898682, 0.25585702061653137, -0.21674422919750214, -0.16781353950500488, 0.45805037021636963, -0.1856306940317154, 0.09275642037391663, 0.11852137744426727, -0.046437788754701614, 0.014366008341312408, 0.3236364424228668, 0.08962982892990112, 0.13182947039604187, 0.4207836389541626, 0.206501305103302, 0.2570439875125885, 0.23929360508918762, 0.37313559651374817, -0.18872371315956116, -0.2324150800704956, -0.057918380945920944, 0.4835403859615326, -0.33757835626602173, 0.1452251672744751, -0.003101758658885956, -0.009072095155715942, 0.015063965693116188, -0.557723879814148, -0.036190055310726166, 0.3808555603027344, -0.37380120158195496, -0.26346394419670105, -0.10397452116012573, 0.000050455331802368164, -0.04441508278250694, 0.35797324776649475, -0.13069286942481995, -0.04405184090137482, -0.32288870215415955, -0.10856428742408752, -0.070136159658432, 0.1116296797990799, -0.25398293137550354, -0.2345300316810608, 0.21848884224891663, -0.21756063401699066, 0.2340625673532486, -0.4240419864654541, 0.13494271039962769, -0.05566536262631416, 0.37406396865844727, 0.37340253591537476, 0.27637237310409546, -0.13791479170322418, 0.060441870242357254, -0.07821515202522278, 0.09102997928857803, 0.03761180862784386, 0.1411617398262024, -0.0731155276298523, -0.3212684094905853, 0.1342654675245285, 0.0041144490242004395, -0.17982761561870575, -0.3566519618034363, 0.032982438802719116, -0.10908152163028717, 0.19662682712078094, 0.22091209888458252, 0.050985127687454224, -0.14805643260478973, 0.11666053533554077, 0.06280158460140228, 0.08144893497228622, -0.16012780368328094, 0.14899785816669464, 0.07930716872215271, 0.1826460361480713, -0.08430469781160355, 0.07061059772968292, 0.037876203656196594, 0.4189380407333374, 0.02741478756070137, -0.11204174906015396, -0.378652960062027, -0.33077019453048706, -0.3441822826862335, -0.08834495395421982, -0.19330374896526337, 0.13737988471984863, -0.002271256409585476, 0.09053803235292435, 0.1760571002960205, 0.19486284255981445, 0.20748423039913177, 0.12348546087741852, -0.2083263397216797, -0.09985029697418213, -0.2851068079471588, 0.48169541358947754, -0.17266547679901123, 0.03965563327074051, 0.006443113088607788, -0.3506651818752289, 0.4216938018798828, 0.016046229749917984, 0.13119348883628845, -0.17603757977485657, 0.05233059078454971, -0.021239500492811203, 0.09319616854190826, 0.6377805471420288, 0.16887125372886658, 0.06171915680170059, -0.03467871621251106, 0.16214929521083832, 0.15414535999298096, 0.18101780116558075, -0.22026044130325317, 0.06765644252300262, -0.015729296952486038, -0.0018746573477983475, 0.058215945959091187, 0.027588628232479095, -0.07953554391860962, -0.11201352626085281, 0.174183651804924, -0.09662441909313202, -0.22798775136470795, -0.09358848631381989, 0.007984936237335205, 0.12249387055635452, -0.2413402944803238, 0.3319843113422394, 0.07341548800468445, 0.20806652307510376, -0.39738744497299194, -0.06145142763853073, 0.4318278431892395, -0.6654883027076721, -0.12014979124069214, -0.26930925250053406, -0.011783331632614136, 0.3286215662956238, 0.17322078347206116, -0.10575181990861893, -0.28178825974464417, 0.529181718826294, 0.027850715443491936, -0.28139546513557434, 0.3174487054347992, -0.06961531937122345, -0.00765402615070343, -0.03373267874121666, 0.3865731358528137, -0.2410539984703064, -0.1833973228931427, -0.07387245446443558, -0.04495921730995178 ]
https://github.com/huggingface/datasets/issues/1830
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
Hi @lhoestq , Thanks for the reply. It's entirely possible that is the issue. Since it's a side project I won't be looking at it till later this week, but, I'll verify it by disabling caching and hopefully I'll see the same runtime. Appreciate the reference, Michael
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
47
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer? This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function. Hi @lhoestq , Thanks for the reply. It's entirely possible that is the issue. Since it's a side project I won't be looking at it till later this week, but, I'll verify it by disabling caching and hopefully I'll see the same runtime. Appreciate the reference, Michael
[ -0.40404728055000305, -0.01300717145204544, -0.10247054696083069, 0.1034291684627533, 0.14530566334724426, -0.12255395948886871, 0.2550537884235382, 0.1890888214111328, 0.13067761063575745, -0.006501898169517517, -0.05422341078519821, 0.4988860785961151, -0.1724812239408493, -0.2727595269680023, -0.1320432871580124, 0.06504257768392563, 0.21975907683372498, 0.022416770458221436, 0.24164487421512604, -0.034286655485630035, -0.1218729019165039, 0.10230173915624619, -0.17672543227672577, 0.24139907956123352, -0.31526270508766174, -0.07799291610717773, 0.08123118430376053, -0.20963355898857117, -0.002756858244538307, -0.5689612627029419, -0.20842988789081573, 0.15812477469444275, 0.02094278112053871, 0.533124566078186, -0.00011487364827189595, 0.04034285247325897, -0.02916356921195984, 0.2731476426124573, 0.13471747934818268, 0.04436098039150238, 0.35295429825782776, -0.19428551197052002, -0.16858325898647308, -0.22576633095741272, -0.054171204566955566, -0.2808627784252167, -0.02212238870561123, -0.22417739033699036, 0.06830838322639465, 0.030042309314012527, 0.16085880994796753, 0.11519482731819153, -0.3964320719242096, -0.05951574444770813, -0.0024587735533714294, -0.1042250394821167, -0.09915442764759064, 0.014026454649865627, 0.07132945954799652, -0.2551872134208679, -0.21165668964385986, 0.19490475952625275, -0.21304312348365784, -0.14781400561332703, 0.2687233090400696, 0.21636949479579926, 0.034611500799655914, -0.24252483248710632, 0.1680864691734314, 0.2316349744796753, 0.06701106578111649, -0.02721283584833145, -0.017125165089964867, -0.3350789546966553, -0.3706915080547333, -0.02848217636346817, 0.1461225003004074, -0.4334976077079773, -0.12065143883228302, -0.08960263431072235, -0.41406527161598206, 0.2037731111049652, 0.264242559671402, -0.12239387631416321, -0.20393069088459015, 0.43524378538131714, 0.09542796015739441, 0.14973461627960205, 0.10415232926607132, -0.09975200891494751, -0.28079161047935486, -0.26437780261039734, -0.15957695245742798, 0.3733043372631073, -0.34158673882484436, -0.17395520210266113, 0.26929545402526855, -0.30913490056991577, -0.1407884955406189, 0.1142800971865654, -0.14243142306804657, 0.19466519355773926, 0.2083410620689392, -0.04711989313364029, 0.06630697846412659, 0.24600403010845184, 0.038447748869657516, 0.17384636402130127, 0.029690610244870186, -0.4802928566932678, -0.3160501718521118, -0.09036076813936234, -0.1888754516839981, 0.020213767886161804, 0.3458714187145233, -0.24245864152908325, -0.2370806187391281, -0.07258336246013641, -0.020596789196133614, -0.17130690813064575, -0.37994447350502014, -0.09833713620901108, 0.06586102396249771, 0.18545490503311157, 0.05874723941087723, 0.06103825569152832, -0.36479800939559937, -0.20216697454452515, -0.09283135831356049, -0.07672666013240814, -0.12862785160541534, -0.1720004379749298, -0.10449197143316269, 0.25425758957862854, -0.18827322125434875, 0.09130582213401794, 0.2601751685142517, 0.07899506390094757, -0.11537612974643707, 0.21030840277671814, 0.21960456669330597, -0.36432287096977234, 0.1047283187508583, -0.11305445432662964, 0.07480095326900482, 0.43602678179740906, -0.005507688969373703, 0.0017840713262557983, -0.25952884554862976, 0.20827564597129822, -0.26490849256515503, -0.22648875415325165, 0.2413850575685501, 0.11916032433509827, -0.08314234018325806, -0.1221609115600586, -0.4942292869091034, 0.4385456144809723, 0.2539222538471222, -0.1163535863161087, -0.0749136283993721, -0.18091319501399994, -0.5298192501068115, -0.21674194931983948, 0.267924964427948, -0.018771812319755554, -0.07221245765686035, -0.19377996027469635, 0.34180352091789246, 0.19217228889465332, 0.3103511929512024, 0.64305579662323, -0.38648295402526855, 0.7953370213508606, -0.1250496506690979, 0.7483618855476379, 0.2579936385154724, -0.24770547449588776, -0.37781819701194763, 0.11663870513439178, -0.17846891283988953, 0.27222102880477905, -0.28185170888900757, -0.12006288766860962, 0.70263671875, -0.22527869045734406, 0.34198471903800964, 0.10614454001188278, 0.24699558317661285, 0.3040958046913147, -0.24837328493595123, -0.04919016361236572, 0.5504589676856995, -0.08022263646125793, -0.22425304353237152, -0.15098139643669128, -0.15340656042099, 0.11113331466913223, -0.03155418485403061, -0.12037332355976105, -0.1554092913866043, 0.06173226237297058, 0.01511157676577568, 0.027055785059928894, -0.0637362003326416, 0.21922630071640015, 0.147112637758255, 0.21719422936439514, 0.07411746680736542, 0.068392813205719, 0.42903053760528564, -0.006117053329944611, 0.10551666468381882, -0.06455042958259583, -0.15043263137340546, -0.14192789793014526, 0.17265325784683228, 0.12822045385837555, 0.06789854168891907, 0.08919259905815125, 0.23117227852344513, -0.10698017477989197, 0.015444153919816017, 0.1270228922367096, 0.44377678632736206, -0.3041419982910156, 0.14068661630153656, -0.160288468003273, -0.10612224042415619, -0.19360360503196716, 0.14087358117103577, 0.10873284190893173, -0.18346554040908813, 0.16243290901184082, 0.1247907504439354, 0.30946648120880127, -0.17306947708129883, 0.20741267502307892, 0.11455947160720825, 0.2654835283756256, 0.04486136510968208, 0.1117049902677536, 0.016418371349573135, -0.1618005931377411, -0.10114359110593796, 0.24875250458717346, 0.76655513048172, 0.2934231758117676, -0.0981307402253151, -0.19185051321983337, -0.007449474185705185, 0.20522290468215942, 0.12545940279960632, 0.09028607606887817, -0.017213623970746994, 0.30128994584083557, 0.4247044622898102, 0.17126646637916565, 0.3508587181568146, 0.474333792924881, 0.5267606973648071, -0.1261989027261734, -0.21092328429222107, 0.11692474782466888, -0.3413843810558319, -0.4390025734901428, -0.03245564550161362, -0.4132472574710846, 0.1679462045431137, 0.10433124005794525, 0.22383281588554382, -0.16898339986801147, -0.013875714503228664, 0.002553023397922516, 0.2727617919445038, 0.23192822933197021, -0.0062523228116333485, -0.03470814973115921, 0.1677316278219223, 0.2354772537946701, -0.3278363049030304, -0.1683434396982193, -0.017744751647114754, 0.24668413400650024, -0.020203396677970886, -0.08809293061494827, 0.06602846086025238, 0.17903846502304077, 0.48365598917007446, -0.07303361594676971, 0.04387972503900528, -0.23364856839179993, -0.08682671189308167, 0.0112861767411232, 0.07300588488578796, 0.14293424785137177, 0.20160508155822754, 0.04160480201244354, 0.05537938326597214, -0.13247564435005188, -0.032635945826768875, -0.20362256467342377, -0.3690440356731415, 0.06732751429080963, 0.0478154756128788, -0.10531284660100937, 0.30129051208496094, 0.18954911828041077, -0.07064664363861084, -0.028474101796746254, -0.45728859305381775, 0.08773922920227051, -0.1803114265203476, 0.009878138080239296, -0.10766516625881195, -0.15344294905662537, -0.19836817681789398, 0.04000264033675194, 0.11686036735773087, -0.27817514538764954, -0.2616518437862396, -0.3224227726459503, -0.11807239800691605, -0.17440913617610931, 0.14054423570632935, -0.020054161548614502, 0.05114235728979111, -0.03128029778599739, 0.12230005115270615, 0.10087120532989502, 0.12934523820877075, -0.2491520196199417, -0.1672079861164093, 0.19397687911987305, -0.05200427025556564, -0.012172069400548935, -0.3335230350494385, -0.24970465898513794, 0.3890588581562042, -0.06997024267911911, -0.014193754643201828, -0.2141367346048355, 0.09421406686306, 0.16698022186756134, 0.13987205922603607, -0.24602219462394714, 0.21763961017131805, -0.3044709861278534, 0.26148006319999695, 0.03844340518116951, -0.21672217547893524, 0.3941025733947754, 0.2282126545906067, -0.12224412709474564, 0.16977044939994812, -0.24780593812465668, 0.1691341996192932, -0.05900334566831589, -0.23506364226341248, 0.0723128616809845, 0.4840388596057892, 0.24679642915725708, 0.6211668848991394, 0.04898199066519737, -0.013337384909391403, -0.00010479241609573364, -0.3113273084163666, -0.13158224523067474, -0.4311894476413727, -0.07551337778568268, 0.20715612173080444, -0.09913642704486847, 0.025744158774614334, 0.48657655715942383, -0.08505569398403168, -0.3330840468406677, 0.2221699059009552, -0.17344248294830322, 0.04907567799091339, -0.19993911683559418, 0.12732847034931183, -0.0947733223438263, 0.05930540710687637, 0.0013976357877254486, 0.40461084246635437, -0.5339138507843018, -0.14910292625427246, 0.23746751248836517, -0.2787156105041504, 0.2525825500488281, -0.25178951025009155, -0.9455530643463135, 0.3512921631336212, -0.8524879217147827, 0.09497635811567307, 0.01654793508350849, 0.22760270535945892, 0.04750743880867958, -0.0270619448274374, 0.11630081385374069, -0.03245183825492859, 0.16581302881240845, -0.053808704018592834, -0.08455531299114227, 0.2370498776435852, -0.5604736804962158, -0.11725729703903198, -0.14565131068229675, -0.078785240650177, 0.19362692534923553, 0.5949993133544922, 0.7412642240524292, -0.09443050622940063, -0.2862768769264221, -0.3504449725151062, -0.04790698364377022, 0.06967751681804657, 0.03928505629301071, -0.013841859996318817, -0.10236944258213043, -0.1808013767004013, 0.010817199945449829, 0.10237520188093185, 0.18226686120033264, 0.13341988623142242, -0.15410926938056946, -0.08755295723676682, 0.15052032470703125, 0.30369699001312256, 0.27780210971832275, 0.24230724573135376, -0.038768261671066284, 0.34377962350845337, 0.3173718750476837, 0.10557398200035095, -0.11109791696071625, -0.15754641592502594, 0.2181520015001297, -0.36953097581863403, 0.09002270549535751, 0.09987189620733261, 0.06710663437843323, 0.16950537264347076, -0.032325420528650284, 0.2138267457485199, -0.2696317732334137, 0.3467106223106384, -0.19183045625686646, 0.3990115225315094, 0.5268696546554565, 0.13443554937839508, -0.5008943676948547, -0.3026985228061676, 0.07103843241930008, 0.5278066396713257, -0.26714885234832764, 0.43690693378448486, -0.4802761673927307, -0.4048759341239929, 0.4786459803581238, 0.2622498571872711, 0.5893489718437195, -0.00019755959510803223, 0.21312566101551056, 0.2467377483844757, 0.28208768367767334, 0.18717972934246063, -0.44224393367767334, -0.1283496916294098, -0.23518304526805878, 0.2189825475215912, 0.04329981654882431, -0.07354763895273209, 0.06810372322797775, 0.23929408192634583, -0.11905810236930847, -0.07074674218893051, 0.1343747079372406, 0.882922351360321, -0.013043368235230446, 0.3027331233024597, 0.4876135587692261, -0.3995562493801117, 0.3429583013057709, 0.13938862085342407, 0.22414198517799377, 0.0627053827047348, 0.0940348356962204, 0.09735546261072159, -0.06829366087913513, -0.1550719439983368, -0.24992884695529938, -0.2025584578514099, -0.5686981081962585, 0.2977931499481201, -0.20471394062042236, 0.03080093115568161, 0.07980066537857056, 0.14483767747879028, 0.04165821149945259, 0.24064290523529053, 0.0066324155777692795, 0.2885671555995941, 0.21322670578956604, 0.33644169569015503, 0.2534503936767578, -0.5096054673194885, -0.19772887229919434, -0.00980672799050808, -0.015243232250213623, 0.1644136905670166, -0.26448115706443787, -0.3185320496559143, -0.642041802406311, -0.04586450755596161, 0.3040485680103302, -0.36560505628585815, 0.019045107066631317, 0.10112300515174866, -0.079265296459198, -0.19805815815925598, 0.08064164966344833, -0.15343168377876282, 0.08537718653678894, 0.40806373953819275, -0.07441210746765137, -0.2806633710861206, 0.018494319170713425, 0.3022502660751343, 0.12154626101255417, -0.21070414781570435, 0.43070188164711, -0.47031137347221375, -0.2629357576370239, -0.10358759015798569, 0.21543627977371216, 0.13631519675254822, 0.11987597495317459, 0.09263504296541214, -0.13185419142246246, -0.18322856724262238, 0.09514603763818741, 0.26415467262268066, -0.12749488651752472, -0.10990751534700394, -0.17242029309272766, -0.018341217190027237, -0.306043803691864, -0.010590247809886932, -0.05993114039301872, 0.09162308275699615, 0.09735330194234848, 0.13492800295352936, -0.3185405433177948, 0.1697496622800827, -0.25776854157447815, -0.12103110551834106, 0.12591196596622467, 0.15388117730617523, -0.20141154527664185, -0.1586650013923645, 0.1208089217543602, 0.04116205498576164, 0.09976769983768463, 0.2575889825820923, 0.035096004605293274, -0.22869470715522766, -0.08349362760782242, 0.14248965680599213, 0.046630315482616425, -0.36045733094215393, 0.06594091653823853, 0.1358204334974289, -0.08454747498035431, -0.5128015279769897, 0.20534510910511017, 0.17162397503852844, 0.013776779174804688, -0.42633458971977234, 0.1967771351337433, -0.004544563591480255, -0.006976518779993057, 0.1540147066116333, -0.040920138359069824, 0.019588693976402283, 0.10938411206007004, 0.21673014760017395, 0.12089195847511292, -0.20395323634147644, 0.04365489259362221, 0.2604888379573822, 0.33503156900405884, 0.1718846559524536, 0.01198059692978859, -0.026033155620098114, -0.0632946640253067, 0.1637771725654602, -0.16997887194156647, 0.2126777619123459, -0.22457046806812286, -0.4430891275405884, 0.20653828978538513, 0.1477208286523819, 0.06795012950897217, -0.2368668168783188, 0.41122525930404663, -0.2698410153388977, 0.17054681479930878, 0.05370637774467468, 0.22349035739898682, 0.25585702061653137, -0.21674422919750214, -0.16781353950500488, 0.45805037021636963, -0.1856306940317154, 0.09275642037391663, 0.11852137744426727, -0.046437788754701614, 0.014366008341312408, 0.3236364424228668, 0.08962982892990112, 0.13182947039604187, 0.4207836389541626, 0.206501305103302, 0.2570439875125885, 0.23929360508918762, 0.37313559651374817, -0.18872371315956116, -0.2324150800704956, -0.057918380945920944, 0.4835403859615326, -0.33757835626602173, 0.1452251672744751, -0.003101758658885956, -0.009072095155715942, 0.015063965693116188, -0.557723879814148, -0.036190055310726166, 0.3808555603027344, -0.37380120158195496, -0.26346394419670105, -0.10397452116012573, 0.000050455331802368164, -0.04441508278250694, 0.35797324776649475, -0.13069286942481995, -0.04405184090137482, -0.32288870215415955, -0.10856428742408752, -0.070136159658432, 0.1116296797990799, -0.25398293137550354, -0.2345300316810608, 0.21848884224891663, -0.21756063401699066, 0.2340625673532486, -0.4240419864654541, 0.13494271039962769, -0.05566536262631416, 0.37406396865844727, 0.37340253591537476, 0.27637237310409546, -0.13791479170322418, 0.060441870242357254, -0.07821515202522278, 0.09102997928857803, 0.03761180862784386, 0.1411617398262024, -0.0731155276298523, -0.3212684094905853, 0.1342654675245285, 0.0041144490242004395, -0.17982761561870575, -0.3566519618034363, 0.032982438802719116, -0.10908152163028717, 0.19662682712078094, 0.22091209888458252, 0.050985127687454224, -0.14805643260478973, 0.11666053533554077, 0.06280158460140228, 0.08144893497228622, -0.16012780368328094, 0.14899785816669464, 0.07930716872215271, 0.1826460361480713, -0.08430469781160355, 0.07061059772968292, 0.037876203656196594, 0.4189380407333374, 0.02741478756070137, -0.11204174906015396, -0.378652960062027, -0.33077019453048706, -0.3441822826862335, -0.08834495395421982, -0.19330374896526337, 0.13737988471984863, -0.002271256409585476, 0.09053803235292435, 0.1760571002960205, 0.19486284255981445, 0.20748423039913177, 0.12348546087741852, -0.2083263397216797, -0.09985029697418213, -0.2851068079471588, 0.48169541358947754, -0.17266547679901123, 0.03965563327074051, 0.006443113088607788, -0.3506651818752289, 0.4216938018798828, 0.016046229749917984, 0.13119348883628845, -0.17603757977485657, 0.05233059078454971, -0.021239500492811203, 0.09319616854190826, 0.6377805471420288, 0.16887125372886658, 0.06171915680170059, -0.03467871621251106, 0.16214929521083832, 0.15414535999298096, 0.18101780116558075, -0.22026044130325317, 0.06765644252300262, -0.015729296952486038, -0.0018746573477983475, 0.058215945959091187, 0.027588628232479095, -0.07953554391860962, -0.11201352626085281, 0.174183651804924, -0.09662441909313202, -0.22798775136470795, -0.09358848631381989, 0.007984936237335205, 0.12249387055635452, -0.2413402944803238, 0.3319843113422394, 0.07341548800468445, 0.20806652307510376, -0.39738744497299194, -0.06145142763853073, 0.4318278431892395, -0.6654883027076721, -0.12014979124069214, -0.26930925250053406, -0.011783331632614136, 0.3286215662956238, 0.17322078347206116, -0.10575181990861893, -0.28178825974464417, 0.529181718826294, 0.027850715443491936, -0.28139546513557434, 0.3174487054347992, -0.06961531937122345, -0.00765402615070343, -0.03373267874121666, 0.3865731358528137, -0.2410539984703064, -0.1833973228931427, -0.07387245446443558, -0.04495921730995178 ]
https://github.com/huggingface/datasets/issues/1830
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
I believe this is an actual issue, tokenizing a ~4GB txt file went from an hour and a half to ~10 minutes when I switched from my pre-trained tokenizer(on the same dataset) to the default gpt2 tokenizer. Both were loaded using: ``` AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True) ``` I trained the tokenizer using ByteLevelBPETokenizer from the Tokenizers library and save it to a tokenizer.json file. I have tested the caching ideas above, changing the number of process, the TOKENIZERS_PARALLELISM env variable, keep_in_memory=True and batching with different sizes. Apologies I can't really upload much code, but wanted to back up the finding and hopefully a fix/the problem can be found. I will comment back if I find a fix as well.
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
117
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer? This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function. I believe this is an actual issue, tokenizing a ~4GB txt file went from an hour and a half to ~10 minutes when I switched from my pre-trained tokenizer(on the same dataset) to the default gpt2 tokenizer. Both were loaded using: ``` AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True) ``` I trained the tokenizer using ByteLevelBPETokenizer from the Tokenizers library and save it to a tokenizer.json file. I have tested the caching ideas above, changing the number of process, the TOKENIZERS_PARALLELISM env variable, keep_in_memory=True and batching with different sizes. Apologies I can't really upload much code, but wanted to back up the finding and hopefully a fix/the problem can be found. I will comment back if I find a fix as well.
[ -0.40404728055000305, -0.01300717145204544, -0.10247054696083069, 0.1034291684627533, 0.14530566334724426, -0.12255395948886871, 0.2550537884235382, 0.1890888214111328, 0.13067761063575745, -0.006501898169517517, -0.05422341078519821, 0.4988860785961151, -0.1724812239408493, -0.2727595269680023, -0.1320432871580124, 0.06504257768392563, 0.21975907683372498, 0.022416770458221436, 0.24164487421512604, -0.034286655485630035, -0.1218729019165039, 0.10230173915624619, -0.17672543227672577, 0.24139907956123352, -0.31526270508766174, -0.07799291610717773, 0.08123118430376053, -0.20963355898857117, -0.002756858244538307, -0.5689612627029419, -0.20842988789081573, 0.15812477469444275, 0.02094278112053871, 0.533124566078186, -0.00011487364827189595, 0.04034285247325897, -0.02916356921195984, 0.2731476426124573, 0.13471747934818268, 0.04436098039150238, 0.35295429825782776, -0.19428551197052002, -0.16858325898647308, -0.22576633095741272, -0.054171204566955566, -0.2808627784252167, -0.02212238870561123, -0.22417739033699036, 0.06830838322639465, 0.030042309314012527, 0.16085880994796753, 0.11519482731819153, -0.3964320719242096, -0.05951574444770813, -0.0024587735533714294, -0.1042250394821167, -0.09915442764759064, 0.014026454649865627, 0.07132945954799652, -0.2551872134208679, -0.21165668964385986, 0.19490475952625275, -0.21304312348365784, -0.14781400561332703, 0.2687233090400696, 0.21636949479579926, 0.034611500799655914, -0.24252483248710632, 0.1680864691734314, 0.2316349744796753, 0.06701106578111649, -0.02721283584833145, -0.017125165089964867, -0.3350789546966553, -0.3706915080547333, -0.02848217636346817, 0.1461225003004074, -0.4334976077079773, -0.12065143883228302, -0.08960263431072235, -0.41406527161598206, 0.2037731111049652, 0.264242559671402, -0.12239387631416321, -0.20393069088459015, 0.43524378538131714, 0.09542796015739441, 0.14973461627960205, 0.10415232926607132, -0.09975200891494751, -0.28079161047935486, -0.26437780261039734, -0.15957695245742798, 0.3733043372631073, -0.34158673882484436, -0.17395520210266113, 0.26929545402526855, -0.30913490056991577, -0.1407884955406189, 0.1142800971865654, -0.14243142306804657, 0.19466519355773926, 0.2083410620689392, -0.04711989313364029, 0.06630697846412659, 0.24600403010845184, 0.038447748869657516, 0.17384636402130127, 0.029690610244870186, -0.4802928566932678, -0.3160501718521118, -0.09036076813936234, -0.1888754516839981, 0.020213767886161804, 0.3458714187145233, -0.24245864152908325, -0.2370806187391281, -0.07258336246013641, -0.020596789196133614, -0.17130690813064575, -0.37994447350502014, -0.09833713620901108, 0.06586102396249771, 0.18545490503311157, 0.05874723941087723, 0.06103825569152832, -0.36479800939559937, -0.20216697454452515, -0.09283135831356049, -0.07672666013240814, -0.12862785160541534, -0.1720004379749298, -0.10449197143316269, 0.25425758957862854, -0.18827322125434875, 0.09130582213401794, 0.2601751685142517, 0.07899506390094757, -0.11537612974643707, 0.21030840277671814, 0.21960456669330597, -0.36432287096977234, 0.1047283187508583, -0.11305445432662964, 0.07480095326900482, 0.43602678179740906, -0.005507688969373703, 0.0017840713262557983, -0.25952884554862976, 0.20827564597129822, -0.26490849256515503, -0.22648875415325165, 0.2413850575685501, 0.11916032433509827, -0.08314234018325806, -0.1221609115600586, -0.4942292869091034, 0.4385456144809723, 0.2539222538471222, -0.1163535863161087, -0.0749136283993721, -0.18091319501399994, -0.5298192501068115, -0.21674194931983948, 0.267924964427948, -0.018771812319755554, -0.07221245765686035, -0.19377996027469635, 0.34180352091789246, 0.19217228889465332, 0.3103511929512024, 0.64305579662323, -0.38648295402526855, 0.7953370213508606, -0.1250496506690979, 0.7483618855476379, 0.2579936385154724, -0.24770547449588776, -0.37781819701194763, 0.11663870513439178, -0.17846891283988953, 0.27222102880477905, -0.28185170888900757, -0.12006288766860962, 0.70263671875, -0.22527869045734406, 0.34198471903800964, 0.10614454001188278, 0.24699558317661285, 0.3040958046913147, -0.24837328493595123, -0.04919016361236572, 0.5504589676856995, -0.08022263646125793, -0.22425304353237152, -0.15098139643669128, -0.15340656042099, 0.11113331466913223, -0.03155418485403061, -0.12037332355976105, -0.1554092913866043, 0.06173226237297058, 0.01511157676577568, 0.027055785059928894, -0.0637362003326416, 0.21922630071640015, 0.147112637758255, 0.21719422936439514, 0.07411746680736542, 0.068392813205719, 0.42903053760528564, -0.006117053329944611, 0.10551666468381882, -0.06455042958259583, -0.15043263137340546, -0.14192789793014526, 0.17265325784683228, 0.12822045385837555, 0.06789854168891907, 0.08919259905815125, 0.23117227852344513, -0.10698017477989197, 0.015444153919816017, 0.1270228922367096, 0.44377678632736206, -0.3041419982910156, 0.14068661630153656, -0.160288468003273, -0.10612224042415619, -0.19360360503196716, 0.14087358117103577, 0.10873284190893173, -0.18346554040908813, 0.16243290901184082, 0.1247907504439354, 0.30946648120880127, -0.17306947708129883, 0.20741267502307892, 0.11455947160720825, 0.2654835283756256, 0.04486136510968208, 0.1117049902677536, 0.016418371349573135, -0.1618005931377411, -0.10114359110593796, 0.24875250458717346, 0.76655513048172, 0.2934231758117676, -0.0981307402253151, -0.19185051321983337, -0.007449474185705185, 0.20522290468215942, 0.12545940279960632, 0.09028607606887817, -0.017213623970746994, 0.30128994584083557, 0.4247044622898102, 0.17126646637916565, 0.3508587181568146, 0.474333792924881, 0.5267606973648071, -0.1261989027261734, -0.21092328429222107, 0.11692474782466888, -0.3413843810558319, -0.4390025734901428, -0.03245564550161362, -0.4132472574710846, 0.1679462045431137, 0.10433124005794525, 0.22383281588554382, -0.16898339986801147, -0.013875714503228664, 0.002553023397922516, 0.2727617919445038, 0.23192822933197021, -0.0062523228116333485, -0.03470814973115921, 0.1677316278219223, 0.2354772537946701, -0.3278363049030304, -0.1683434396982193, -0.017744751647114754, 0.24668413400650024, -0.020203396677970886, -0.08809293061494827, 0.06602846086025238, 0.17903846502304077, 0.48365598917007446, -0.07303361594676971, 0.04387972503900528, -0.23364856839179993, -0.08682671189308167, 0.0112861767411232, 0.07300588488578796, 0.14293424785137177, 0.20160508155822754, 0.04160480201244354, 0.05537938326597214, -0.13247564435005188, -0.032635945826768875, -0.20362256467342377, -0.3690440356731415, 0.06732751429080963, 0.0478154756128788, -0.10531284660100937, 0.30129051208496094, 0.18954911828041077, -0.07064664363861084, -0.028474101796746254, -0.45728859305381775, 0.08773922920227051, -0.1803114265203476, 0.009878138080239296, -0.10766516625881195, -0.15344294905662537, -0.19836817681789398, 0.04000264033675194, 0.11686036735773087, -0.27817514538764954, -0.2616518437862396, -0.3224227726459503, -0.11807239800691605, -0.17440913617610931, 0.14054423570632935, -0.020054161548614502, 0.05114235728979111, -0.03128029778599739, 0.12230005115270615, 0.10087120532989502, 0.12934523820877075, -0.2491520196199417, -0.1672079861164093, 0.19397687911987305, -0.05200427025556564, -0.012172069400548935, -0.3335230350494385, -0.24970465898513794, 0.3890588581562042, -0.06997024267911911, -0.014193754643201828, -0.2141367346048355, 0.09421406686306, 0.16698022186756134, 0.13987205922603607, -0.24602219462394714, 0.21763961017131805, -0.3044709861278534, 0.26148006319999695, 0.03844340518116951, -0.21672217547893524, 0.3941025733947754, 0.2282126545906067, -0.12224412709474564, 0.16977044939994812, -0.24780593812465668, 0.1691341996192932, -0.05900334566831589, -0.23506364226341248, 0.0723128616809845, 0.4840388596057892, 0.24679642915725708, 0.6211668848991394, 0.04898199066519737, -0.013337384909391403, -0.00010479241609573364, -0.3113273084163666, -0.13158224523067474, -0.4311894476413727, -0.07551337778568268, 0.20715612173080444, -0.09913642704486847, 0.025744158774614334, 0.48657655715942383, -0.08505569398403168, -0.3330840468406677, 0.2221699059009552, -0.17344248294830322, 0.04907567799091339, -0.19993911683559418, 0.12732847034931183, -0.0947733223438263, 0.05930540710687637, 0.0013976357877254486, 0.40461084246635437, -0.5339138507843018, -0.14910292625427246, 0.23746751248836517, -0.2787156105041504, 0.2525825500488281, -0.25178951025009155, -0.9455530643463135, 0.3512921631336212, -0.8524879217147827, 0.09497635811567307, 0.01654793508350849, 0.22760270535945892, 0.04750743880867958, -0.0270619448274374, 0.11630081385374069, -0.03245183825492859, 0.16581302881240845, -0.053808704018592834, -0.08455531299114227, 0.2370498776435852, -0.5604736804962158, -0.11725729703903198, -0.14565131068229675, -0.078785240650177, 0.19362692534923553, 0.5949993133544922, 0.7412642240524292, -0.09443050622940063, -0.2862768769264221, -0.3504449725151062, -0.04790698364377022, 0.06967751681804657, 0.03928505629301071, -0.013841859996318817, -0.10236944258213043, -0.1808013767004013, 0.010817199945449829, 0.10237520188093185, 0.18226686120033264, 0.13341988623142242, -0.15410926938056946, -0.08755295723676682, 0.15052032470703125, 0.30369699001312256, 0.27780210971832275, 0.24230724573135376, -0.038768261671066284, 0.34377962350845337, 0.3173718750476837, 0.10557398200035095, -0.11109791696071625, -0.15754641592502594, 0.2181520015001297, -0.36953097581863403, 0.09002270549535751, 0.09987189620733261, 0.06710663437843323, 0.16950537264347076, -0.032325420528650284, 0.2138267457485199, -0.2696317732334137, 0.3467106223106384, -0.19183045625686646, 0.3990115225315094, 0.5268696546554565, 0.13443554937839508, -0.5008943676948547, -0.3026985228061676, 0.07103843241930008, 0.5278066396713257, -0.26714885234832764, 0.43690693378448486, -0.4802761673927307, -0.4048759341239929, 0.4786459803581238, 0.2622498571872711, 0.5893489718437195, -0.00019755959510803223, 0.21312566101551056, 0.2467377483844757, 0.28208768367767334, 0.18717972934246063, -0.44224393367767334, -0.1283496916294098, -0.23518304526805878, 0.2189825475215912, 0.04329981654882431, -0.07354763895273209, 0.06810372322797775, 0.23929408192634583, -0.11905810236930847, -0.07074674218893051, 0.1343747079372406, 0.882922351360321, -0.013043368235230446, 0.3027331233024597, 0.4876135587692261, -0.3995562493801117, 0.3429583013057709, 0.13938862085342407, 0.22414198517799377, 0.0627053827047348, 0.0940348356962204, 0.09735546261072159, -0.06829366087913513, -0.1550719439983368, -0.24992884695529938, -0.2025584578514099, -0.5686981081962585, 0.2977931499481201, -0.20471394062042236, 0.03080093115568161, 0.07980066537857056, 0.14483767747879028, 0.04165821149945259, 0.24064290523529053, 0.0066324155777692795, 0.2885671555995941, 0.21322670578956604, 0.33644169569015503, 0.2534503936767578, -0.5096054673194885, -0.19772887229919434, -0.00980672799050808, -0.015243232250213623, 0.1644136905670166, -0.26448115706443787, -0.3185320496559143, -0.642041802406311, -0.04586450755596161, 0.3040485680103302, -0.36560505628585815, 0.019045107066631317, 0.10112300515174866, -0.079265296459198, -0.19805815815925598, 0.08064164966344833, -0.15343168377876282, 0.08537718653678894, 0.40806373953819275, -0.07441210746765137, -0.2806633710861206, 0.018494319170713425, 0.3022502660751343, 0.12154626101255417, -0.21070414781570435, 0.43070188164711, -0.47031137347221375, -0.2629357576370239, -0.10358759015798569, 0.21543627977371216, 0.13631519675254822, 0.11987597495317459, 0.09263504296541214, -0.13185419142246246, -0.18322856724262238, 0.09514603763818741, 0.26415467262268066, -0.12749488651752472, -0.10990751534700394, -0.17242029309272766, -0.018341217190027237, -0.306043803691864, -0.010590247809886932, -0.05993114039301872, 0.09162308275699615, 0.09735330194234848, 0.13492800295352936, -0.3185405433177948, 0.1697496622800827, -0.25776854157447815, -0.12103110551834106, 0.12591196596622467, 0.15388117730617523, -0.20141154527664185, -0.1586650013923645, 0.1208089217543602, 0.04116205498576164, 0.09976769983768463, 0.2575889825820923, 0.035096004605293274, -0.22869470715522766, -0.08349362760782242, 0.14248965680599213, 0.046630315482616425, -0.36045733094215393, 0.06594091653823853, 0.1358204334974289, -0.08454747498035431, -0.5128015279769897, 0.20534510910511017, 0.17162397503852844, 0.013776779174804688, -0.42633458971977234, 0.1967771351337433, -0.004544563591480255, -0.006976518779993057, 0.1540147066116333, -0.040920138359069824, 0.019588693976402283, 0.10938411206007004, 0.21673014760017395, 0.12089195847511292, -0.20395323634147644, 0.04365489259362221, 0.2604888379573822, 0.33503156900405884, 0.1718846559524536, 0.01198059692978859, -0.026033155620098114, -0.0632946640253067, 0.1637771725654602, -0.16997887194156647, 0.2126777619123459, -0.22457046806812286, -0.4430891275405884, 0.20653828978538513, 0.1477208286523819, 0.06795012950897217, -0.2368668168783188, 0.41122525930404663, -0.2698410153388977, 0.17054681479930878, 0.05370637774467468, 0.22349035739898682, 0.25585702061653137, -0.21674422919750214, -0.16781353950500488, 0.45805037021636963, -0.1856306940317154, 0.09275642037391663, 0.11852137744426727, -0.046437788754701614, 0.014366008341312408, 0.3236364424228668, 0.08962982892990112, 0.13182947039604187, 0.4207836389541626, 0.206501305103302, 0.2570439875125885, 0.23929360508918762, 0.37313559651374817, -0.18872371315956116, -0.2324150800704956, -0.057918380945920944, 0.4835403859615326, -0.33757835626602173, 0.1452251672744751, -0.003101758658885956, -0.009072095155715942, 0.015063965693116188, -0.557723879814148, -0.036190055310726166, 0.3808555603027344, -0.37380120158195496, -0.26346394419670105, -0.10397452116012573, 0.000050455331802368164, -0.04441508278250694, 0.35797324776649475, -0.13069286942481995, -0.04405184090137482, -0.32288870215415955, -0.10856428742408752, -0.070136159658432, 0.1116296797990799, -0.25398293137550354, -0.2345300316810608, 0.21848884224891663, -0.21756063401699066, 0.2340625673532486, -0.4240419864654541, 0.13494271039962769, -0.05566536262631416, 0.37406396865844727, 0.37340253591537476, 0.27637237310409546, -0.13791479170322418, 0.060441870242357254, -0.07821515202522278, 0.09102997928857803, 0.03761180862784386, 0.1411617398262024, -0.0731155276298523, -0.3212684094905853, 0.1342654675245285, 0.0041144490242004395, -0.17982761561870575, -0.3566519618034363, 0.032982438802719116, -0.10908152163028717, 0.19662682712078094, 0.22091209888458252, 0.050985127687454224, -0.14805643260478973, 0.11666053533554077, 0.06280158460140228, 0.08144893497228622, -0.16012780368328094, 0.14899785816669464, 0.07930716872215271, 0.1826460361480713, -0.08430469781160355, 0.07061059772968292, 0.037876203656196594, 0.4189380407333374, 0.02741478756070137, -0.11204174906015396, -0.378652960062027, -0.33077019453048706, -0.3441822826862335, -0.08834495395421982, -0.19330374896526337, 0.13737988471984863, -0.002271256409585476, 0.09053803235292435, 0.1760571002960205, 0.19486284255981445, 0.20748423039913177, 0.12348546087741852, -0.2083263397216797, -0.09985029697418213, -0.2851068079471588, 0.48169541358947754, -0.17266547679901123, 0.03965563327074051, 0.006443113088607788, -0.3506651818752289, 0.4216938018798828, 0.016046229749917984, 0.13119348883628845, -0.17603757977485657, 0.05233059078454971, -0.021239500492811203, 0.09319616854190826, 0.6377805471420288, 0.16887125372886658, 0.06171915680170059, -0.03467871621251106, 0.16214929521083832, 0.15414535999298096, 0.18101780116558075, -0.22026044130325317, 0.06765644252300262, -0.015729296952486038, -0.0018746573477983475, 0.058215945959091187, 0.027588628232479095, -0.07953554391860962, -0.11201352626085281, 0.174183651804924, -0.09662441909313202, -0.22798775136470795, -0.09358848631381989, 0.007984936237335205, 0.12249387055635452, -0.2413402944803238, 0.3319843113422394, 0.07341548800468445, 0.20806652307510376, -0.39738744497299194, -0.06145142763853073, 0.4318278431892395, -0.6654883027076721, -0.12014979124069214, -0.26930925250053406, -0.011783331632614136, 0.3286215662956238, 0.17322078347206116, -0.10575181990861893, -0.28178825974464417, 0.529181718826294, 0.027850715443491936, -0.28139546513557434, 0.3174487054347992, -0.06961531937122345, -0.00765402615070343, -0.03373267874121666, 0.3865731358528137, -0.2410539984703064, -0.1833973228931427, -0.07387245446443558, -0.04495921730995178 ]
https://github.com/huggingface/datasets/issues/1830
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
Hi @johncookds do you think this can come from one tokenizer being faster than the other one ? Can you try to compare their speed without using `datasets` just to make sure ?
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
33
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer? This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function. Hi @johncookds do you think this can come from one tokenizer being faster than the other one ? Can you try to compare their speed without using `datasets` just to make sure ?
[ -0.40404728055000305, -0.01300717145204544, -0.10247054696083069, 0.1034291684627533, 0.14530566334724426, -0.12255395948886871, 0.2550537884235382, 0.1890888214111328, 0.13067761063575745, -0.006501898169517517, -0.05422341078519821, 0.4988860785961151, -0.1724812239408493, -0.2727595269680023, -0.1320432871580124, 0.06504257768392563, 0.21975907683372498, 0.022416770458221436, 0.24164487421512604, -0.034286655485630035, -0.1218729019165039, 0.10230173915624619, -0.17672543227672577, 0.24139907956123352, -0.31526270508766174, -0.07799291610717773, 0.08123118430376053, -0.20963355898857117, -0.002756858244538307, -0.5689612627029419, -0.20842988789081573, 0.15812477469444275, 0.02094278112053871, 0.533124566078186, -0.00011487364827189595, 0.04034285247325897, -0.02916356921195984, 0.2731476426124573, 0.13471747934818268, 0.04436098039150238, 0.35295429825782776, -0.19428551197052002, -0.16858325898647308, -0.22576633095741272, -0.054171204566955566, -0.2808627784252167, -0.02212238870561123, -0.22417739033699036, 0.06830838322639465, 0.030042309314012527, 0.16085880994796753, 0.11519482731819153, -0.3964320719242096, -0.05951574444770813, -0.0024587735533714294, -0.1042250394821167, -0.09915442764759064, 0.014026454649865627, 0.07132945954799652, -0.2551872134208679, -0.21165668964385986, 0.19490475952625275, -0.21304312348365784, -0.14781400561332703, 0.2687233090400696, 0.21636949479579926, 0.034611500799655914, -0.24252483248710632, 0.1680864691734314, 0.2316349744796753, 0.06701106578111649, -0.02721283584833145, -0.017125165089964867, -0.3350789546966553, -0.3706915080547333, -0.02848217636346817, 0.1461225003004074, -0.4334976077079773, -0.12065143883228302, -0.08960263431072235, -0.41406527161598206, 0.2037731111049652, 0.264242559671402, -0.12239387631416321, -0.20393069088459015, 0.43524378538131714, 0.09542796015739441, 0.14973461627960205, 0.10415232926607132, -0.09975200891494751, -0.28079161047935486, -0.26437780261039734, -0.15957695245742798, 0.3733043372631073, -0.34158673882484436, -0.17395520210266113, 0.26929545402526855, -0.30913490056991577, -0.1407884955406189, 0.1142800971865654, -0.14243142306804657, 0.19466519355773926, 0.2083410620689392, -0.04711989313364029, 0.06630697846412659, 0.24600403010845184, 0.038447748869657516, 0.17384636402130127, 0.029690610244870186, -0.4802928566932678, -0.3160501718521118, -0.09036076813936234, -0.1888754516839981, 0.020213767886161804, 0.3458714187145233, -0.24245864152908325, -0.2370806187391281, -0.07258336246013641, -0.020596789196133614, -0.17130690813064575, -0.37994447350502014, -0.09833713620901108, 0.06586102396249771, 0.18545490503311157, 0.05874723941087723, 0.06103825569152832, -0.36479800939559937, -0.20216697454452515, -0.09283135831356049, -0.07672666013240814, -0.12862785160541534, -0.1720004379749298, -0.10449197143316269, 0.25425758957862854, -0.18827322125434875, 0.09130582213401794, 0.2601751685142517, 0.07899506390094757, -0.11537612974643707, 0.21030840277671814, 0.21960456669330597, -0.36432287096977234, 0.1047283187508583, -0.11305445432662964, 0.07480095326900482, 0.43602678179740906, -0.005507688969373703, 0.0017840713262557983, -0.25952884554862976, 0.20827564597129822, -0.26490849256515503, -0.22648875415325165, 0.2413850575685501, 0.11916032433509827, -0.08314234018325806, -0.1221609115600586, -0.4942292869091034, 0.4385456144809723, 0.2539222538471222, -0.1163535863161087, -0.0749136283993721, -0.18091319501399994, -0.5298192501068115, -0.21674194931983948, 0.267924964427948, -0.018771812319755554, -0.07221245765686035, -0.19377996027469635, 0.34180352091789246, 0.19217228889465332, 0.3103511929512024, 0.64305579662323, -0.38648295402526855, 0.7953370213508606, -0.1250496506690979, 0.7483618855476379, 0.2579936385154724, -0.24770547449588776, -0.37781819701194763, 0.11663870513439178, -0.17846891283988953, 0.27222102880477905, -0.28185170888900757, -0.12006288766860962, 0.70263671875, -0.22527869045734406, 0.34198471903800964, 0.10614454001188278, 0.24699558317661285, 0.3040958046913147, -0.24837328493595123, -0.04919016361236572, 0.5504589676856995, -0.08022263646125793, -0.22425304353237152, -0.15098139643669128, -0.15340656042099, 0.11113331466913223, -0.03155418485403061, -0.12037332355976105, -0.1554092913866043, 0.06173226237297058, 0.01511157676577568, 0.027055785059928894, -0.0637362003326416, 0.21922630071640015, 0.147112637758255, 0.21719422936439514, 0.07411746680736542, 0.068392813205719, 0.42903053760528564, -0.006117053329944611, 0.10551666468381882, -0.06455042958259583, -0.15043263137340546, -0.14192789793014526, 0.17265325784683228, 0.12822045385837555, 0.06789854168891907, 0.08919259905815125, 0.23117227852344513, -0.10698017477989197, 0.015444153919816017, 0.1270228922367096, 0.44377678632736206, -0.3041419982910156, 0.14068661630153656, -0.160288468003273, -0.10612224042415619, -0.19360360503196716, 0.14087358117103577, 0.10873284190893173, -0.18346554040908813, 0.16243290901184082, 0.1247907504439354, 0.30946648120880127, -0.17306947708129883, 0.20741267502307892, 0.11455947160720825, 0.2654835283756256, 0.04486136510968208, 0.1117049902677536, 0.016418371349573135, -0.1618005931377411, -0.10114359110593796, 0.24875250458717346, 0.76655513048172, 0.2934231758117676, -0.0981307402253151, -0.19185051321983337, -0.007449474185705185, 0.20522290468215942, 0.12545940279960632, 0.09028607606887817, -0.017213623970746994, 0.30128994584083557, 0.4247044622898102, 0.17126646637916565, 0.3508587181568146, 0.474333792924881, 0.5267606973648071, -0.1261989027261734, -0.21092328429222107, 0.11692474782466888, -0.3413843810558319, -0.4390025734901428, -0.03245564550161362, -0.4132472574710846, 0.1679462045431137, 0.10433124005794525, 0.22383281588554382, -0.16898339986801147, -0.013875714503228664, 0.002553023397922516, 0.2727617919445038, 0.23192822933197021, -0.0062523228116333485, -0.03470814973115921, 0.1677316278219223, 0.2354772537946701, -0.3278363049030304, -0.1683434396982193, -0.017744751647114754, 0.24668413400650024, -0.020203396677970886, -0.08809293061494827, 0.06602846086025238, 0.17903846502304077, 0.48365598917007446, -0.07303361594676971, 0.04387972503900528, -0.23364856839179993, -0.08682671189308167, 0.0112861767411232, 0.07300588488578796, 0.14293424785137177, 0.20160508155822754, 0.04160480201244354, 0.05537938326597214, -0.13247564435005188, -0.032635945826768875, -0.20362256467342377, -0.3690440356731415, 0.06732751429080963, 0.0478154756128788, -0.10531284660100937, 0.30129051208496094, 0.18954911828041077, -0.07064664363861084, -0.028474101796746254, -0.45728859305381775, 0.08773922920227051, -0.1803114265203476, 0.009878138080239296, -0.10766516625881195, -0.15344294905662537, -0.19836817681789398, 0.04000264033675194, 0.11686036735773087, -0.27817514538764954, -0.2616518437862396, -0.3224227726459503, -0.11807239800691605, -0.17440913617610931, 0.14054423570632935, -0.020054161548614502, 0.05114235728979111, -0.03128029778599739, 0.12230005115270615, 0.10087120532989502, 0.12934523820877075, -0.2491520196199417, -0.1672079861164093, 0.19397687911987305, -0.05200427025556564, -0.012172069400548935, -0.3335230350494385, -0.24970465898513794, 0.3890588581562042, -0.06997024267911911, -0.014193754643201828, -0.2141367346048355, 0.09421406686306, 0.16698022186756134, 0.13987205922603607, -0.24602219462394714, 0.21763961017131805, -0.3044709861278534, 0.26148006319999695, 0.03844340518116951, -0.21672217547893524, 0.3941025733947754, 0.2282126545906067, -0.12224412709474564, 0.16977044939994812, -0.24780593812465668, 0.1691341996192932, -0.05900334566831589, -0.23506364226341248, 0.0723128616809845, 0.4840388596057892, 0.24679642915725708, 0.6211668848991394, 0.04898199066519737, -0.013337384909391403, -0.00010479241609573364, -0.3113273084163666, -0.13158224523067474, -0.4311894476413727, -0.07551337778568268, 0.20715612173080444, -0.09913642704486847, 0.025744158774614334, 0.48657655715942383, -0.08505569398403168, -0.3330840468406677, 0.2221699059009552, -0.17344248294830322, 0.04907567799091339, -0.19993911683559418, 0.12732847034931183, -0.0947733223438263, 0.05930540710687637, 0.0013976357877254486, 0.40461084246635437, -0.5339138507843018, -0.14910292625427246, 0.23746751248836517, -0.2787156105041504, 0.2525825500488281, -0.25178951025009155, -0.9455530643463135, 0.3512921631336212, -0.8524879217147827, 0.09497635811567307, 0.01654793508350849, 0.22760270535945892, 0.04750743880867958, -0.0270619448274374, 0.11630081385374069, -0.03245183825492859, 0.16581302881240845, -0.053808704018592834, -0.08455531299114227, 0.2370498776435852, -0.5604736804962158, -0.11725729703903198, -0.14565131068229675, -0.078785240650177, 0.19362692534923553, 0.5949993133544922, 0.7412642240524292, -0.09443050622940063, -0.2862768769264221, -0.3504449725151062, -0.04790698364377022, 0.06967751681804657, 0.03928505629301071, -0.013841859996318817, -0.10236944258213043, -0.1808013767004013, 0.010817199945449829, 0.10237520188093185, 0.18226686120033264, 0.13341988623142242, -0.15410926938056946, -0.08755295723676682, 0.15052032470703125, 0.30369699001312256, 0.27780210971832275, 0.24230724573135376, -0.038768261671066284, 0.34377962350845337, 0.3173718750476837, 0.10557398200035095, -0.11109791696071625, -0.15754641592502594, 0.2181520015001297, -0.36953097581863403, 0.09002270549535751, 0.09987189620733261, 0.06710663437843323, 0.16950537264347076, -0.032325420528650284, 0.2138267457485199, -0.2696317732334137, 0.3467106223106384, -0.19183045625686646, 0.3990115225315094, 0.5268696546554565, 0.13443554937839508, -0.5008943676948547, -0.3026985228061676, 0.07103843241930008, 0.5278066396713257, -0.26714885234832764, 0.43690693378448486, -0.4802761673927307, -0.4048759341239929, 0.4786459803581238, 0.2622498571872711, 0.5893489718437195, -0.00019755959510803223, 0.21312566101551056, 0.2467377483844757, 0.28208768367767334, 0.18717972934246063, -0.44224393367767334, -0.1283496916294098, -0.23518304526805878, 0.2189825475215912, 0.04329981654882431, -0.07354763895273209, 0.06810372322797775, 0.23929408192634583, -0.11905810236930847, -0.07074674218893051, 0.1343747079372406, 0.882922351360321, -0.013043368235230446, 0.3027331233024597, 0.4876135587692261, -0.3995562493801117, 0.3429583013057709, 0.13938862085342407, 0.22414198517799377, 0.0627053827047348, 0.0940348356962204, 0.09735546261072159, -0.06829366087913513, -0.1550719439983368, -0.24992884695529938, -0.2025584578514099, -0.5686981081962585, 0.2977931499481201, -0.20471394062042236, 0.03080093115568161, 0.07980066537857056, 0.14483767747879028, 0.04165821149945259, 0.24064290523529053, 0.0066324155777692795, 0.2885671555995941, 0.21322670578956604, 0.33644169569015503, 0.2534503936767578, -0.5096054673194885, -0.19772887229919434, -0.00980672799050808, -0.015243232250213623, 0.1644136905670166, -0.26448115706443787, -0.3185320496559143, -0.642041802406311, -0.04586450755596161, 0.3040485680103302, -0.36560505628585815, 0.019045107066631317, 0.10112300515174866, -0.079265296459198, -0.19805815815925598, 0.08064164966344833, -0.15343168377876282, 0.08537718653678894, 0.40806373953819275, -0.07441210746765137, -0.2806633710861206, 0.018494319170713425, 0.3022502660751343, 0.12154626101255417, -0.21070414781570435, 0.43070188164711, -0.47031137347221375, -0.2629357576370239, -0.10358759015798569, 0.21543627977371216, 0.13631519675254822, 0.11987597495317459, 0.09263504296541214, -0.13185419142246246, -0.18322856724262238, 0.09514603763818741, 0.26415467262268066, -0.12749488651752472, -0.10990751534700394, -0.17242029309272766, -0.018341217190027237, -0.306043803691864, -0.010590247809886932, -0.05993114039301872, 0.09162308275699615, 0.09735330194234848, 0.13492800295352936, -0.3185405433177948, 0.1697496622800827, -0.25776854157447815, -0.12103110551834106, 0.12591196596622467, 0.15388117730617523, -0.20141154527664185, -0.1586650013923645, 0.1208089217543602, 0.04116205498576164, 0.09976769983768463, 0.2575889825820923, 0.035096004605293274, -0.22869470715522766, -0.08349362760782242, 0.14248965680599213, 0.046630315482616425, -0.36045733094215393, 0.06594091653823853, 0.1358204334974289, -0.08454747498035431, -0.5128015279769897, 0.20534510910511017, 0.17162397503852844, 0.013776779174804688, -0.42633458971977234, 0.1967771351337433, -0.004544563591480255, -0.006976518779993057, 0.1540147066116333, -0.040920138359069824, 0.019588693976402283, 0.10938411206007004, 0.21673014760017395, 0.12089195847511292, -0.20395323634147644, 0.04365489259362221, 0.2604888379573822, 0.33503156900405884, 0.1718846559524536, 0.01198059692978859, -0.026033155620098114, -0.0632946640253067, 0.1637771725654602, -0.16997887194156647, 0.2126777619123459, -0.22457046806812286, -0.4430891275405884, 0.20653828978538513, 0.1477208286523819, 0.06795012950897217, -0.2368668168783188, 0.41122525930404663, -0.2698410153388977, 0.17054681479930878, 0.05370637774467468, 0.22349035739898682, 0.25585702061653137, -0.21674422919750214, -0.16781353950500488, 0.45805037021636963, -0.1856306940317154, 0.09275642037391663, 0.11852137744426727, -0.046437788754701614, 0.014366008341312408, 0.3236364424228668, 0.08962982892990112, 0.13182947039604187, 0.4207836389541626, 0.206501305103302, 0.2570439875125885, 0.23929360508918762, 0.37313559651374817, -0.18872371315956116, -0.2324150800704956, -0.057918380945920944, 0.4835403859615326, -0.33757835626602173, 0.1452251672744751, -0.003101758658885956, -0.009072095155715942, 0.015063965693116188, -0.557723879814148, -0.036190055310726166, 0.3808555603027344, -0.37380120158195496, -0.26346394419670105, -0.10397452116012573, 0.000050455331802368164, -0.04441508278250694, 0.35797324776649475, -0.13069286942481995, -0.04405184090137482, -0.32288870215415955, -0.10856428742408752, -0.070136159658432, 0.1116296797990799, -0.25398293137550354, -0.2345300316810608, 0.21848884224891663, -0.21756063401699066, 0.2340625673532486, -0.4240419864654541, 0.13494271039962769, -0.05566536262631416, 0.37406396865844727, 0.37340253591537476, 0.27637237310409546, -0.13791479170322418, 0.060441870242357254, -0.07821515202522278, 0.09102997928857803, 0.03761180862784386, 0.1411617398262024, -0.0731155276298523, -0.3212684094905853, 0.1342654675245285, 0.0041144490242004395, -0.17982761561870575, -0.3566519618034363, 0.032982438802719116, -0.10908152163028717, 0.19662682712078094, 0.22091209888458252, 0.050985127687454224, -0.14805643260478973, 0.11666053533554077, 0.06280158460140228, 0.08144893497228622, -0.16012780368328094, 0.14899785816669464, 0.07930716872215271, 0.1826460361480713, -0.08430469781160355, 0.07061059772968292, 0.037876203656196594, 0.4189380407333374, 0.02741478756070137, -0.11204174906015396, -0.378652960062027, -0.33077019453048706, -0.3441822826862335, -0.08834495395421982, -0.19330374896526337, 0.13737988471984863, -0.002271256409585476, 0.09053803235292435, 0.1760571002960205, 0.19486284255981445, 0.20748423039913177, 0.12348546087741852, -0.2083263397216797, -0.09985029697418213, -0.2851068079471588, 0.48169541358947754, -0.17266547679901123, 0.03965563327074051, 0.006443113088607788, -0.3506651818752289, 0.4216938018798828, 0.016046229749917984, 0.13119348883628845, -0.17603757977485657, 0.05233059078454971, -0.021239500492811203, 0.09319616854190826, 0.6377805471420288, 0.16887125372886658, 0.06171915680170059, -0.03467871621251106, 0.16214929521083832, 0.15414535999298096, 0.18101780116558075, -0.22026044130325317, 0.06765644252300262, -0.015729296952486038, -0.0018746573477983475, 0.058215945959091187, 0.027588628232479095, -0.07953554391860962, -0.11201352626085281, 0.174183651804924, -0.09662441909313202, -0.22798775136470795, -0.09358848631381989, 0.007984936237335205, 0.12249387055635452, -0.2413402944803238, 0.3319843113422394, 0.07341548800468445, 0.20806652307510376, -0.39738744497299194, -0.06145142763853073, 0.4318278431892395, -0.6654883027076721, -0.12014979124069214, -0.26930925250053406, -0.011783331632614136, 0.3286215662956238, 0.17322078347206116, -0.10575181990861893, -0.28178825974464417, 0.529181718826294, 0.027850715443491936, -0.28139546513557434, 0.3174487054347992, -0.06961531937122345, -0.00765402615070343, -0.03373267874121666, 0.3865731358528137, -0.2410539984703064, -0.1833973228931427, -0.07387245446443558, -0.04495921730995178 ]
https://github.com/huggingface/datasets/issues/1830
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
Hi yes, I'm closing the loop here with some timings below. The issue seems to be at least somewhat/mainly with the tokenizer's themselves. Moreover legacy saves of the trainer tokenizer perform faster but differently than the new tokenizer.json saves(note nothing about the training process/adding of special tokens changed between the top two trained tokenizer tests, only the way it was saved). This is only a 3x slowdown vs like a 10x but I think the slowdown is most likely due to this. ``` trained tokenizer - tokenizer.json save (same results for AutoTokenizer legacy_format=False): Tokenizer time(seconds): 0.32767510414123535 Tokenized avg. length: 323.01 trained tokenizer - AutoTokenizer legacy_format=True: Tokenizer time(seconds): 0.09258866310119629 Tokenized avg. length: 301.01 GPT2 Tokenizer from huggingface Tokenizer time(seconds): 0.1010282039642334 Tokenized avg. length: 461.21 ```
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
124
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer? This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function. Hi yes, I'm closing the loop here with some timings below. The issue seems to be at least somewhat/mainly with the tokenizer's themselves. Moreover legacy saves of the trainer tokenizer perform faster but differently than the new tokenizer.json saves(note nothing about the training process/adding of special tokens changed between the top two trained tokenizer tests, only the way it was saved). This is only a 3x slowdown vs like a 10x but I think the slowdown is most likely due to this. ``` trained tokenizer - tokenizer.json save (same results for AutoTokenizer legacy_format=False): Tokenizer time(seconds): 0.32767510414123535 Tokenized avg. length: 323.01 trained tokenizer - AutoTokenizer legacy_format=True: Tokenizer time(seconds): 0.09258866310119629 Tokenized avg. length: 301.01 GPT2 Tokenizer from huggingface Tokenizer time(seconds): 0.1010282039642334 Tokenized avg. length: 461.21 ```
[ -0.40404728055000305, -0.01300717145204544, -0.10247054696083069, 0.1034291684627533, 0.14530566334724426, -0.12255395948886871, 0.2550537884235382, 0.1890888214111328, 0.13067761063575745, -0.006501898169517517, -0.05422341078519821, 0.4988860785961151, -0.1724812239408493, -0.2727595269680023, -0.1320432871580124, 0.06504257768392563, 0.21975907683372498, 0.022416770458221436, 0.24164487421512604, -0.034286655485630035, -0.1218729019165039, 0.10230173915624619, -0.17672543227672577, 0.24139907956123352, -0.31526270508766174, -0.07799291610717773, 0.08123118430376053, -0.20963355898857117, -0.002756858244538307, -0.5689612627029419, -0.20842988789081573, 0.15812477469444275, 0.02094278112053871, 0.533124566078186, -0.00011487364827189595, 0.04034285247325897, -0.02916356921195984, 0.2731476426124573, 0.13471747934818268, 0.04436098039150238, 0.35295429825782776, -0.19428551197052002, -0.16858325898647308, -0.22576633095741272, -0.054171204566955566, -0.2808627784252167, -0.02212238870561123, -0.22417739033699036, 0.06830838322639465, 0.030042309314012527, 0.16085880994796753, 0.11519482731819153, -0.3964320719242096, -0.05951574444770813, -0.0024587735533714294, -0.1042250394821167, -0.09915442764759064, 0.014026454649865627, 0.07132945954799652, -0.2551872134208679, -0.21165668964385986, 0.19490475952625275, -0.21304312348365784, -0.14781400561332703, 0.2687233090400696, 0.21636949479579926, 0.034611500799655914, -0.24252483248710632, 0.1680864691734314, 0.2316349744796753, 0.06701106578111649, -0.02721283584833145, -0.017125165089964867, -0.3350789546966553, -0.3706915080547333, -0.02848217636346817, 0.1461225003004074, -0.4334976077079773, -0.12065143883228302, -0.08960263431072235, -0.41406527161598206, 0.2037731111049652, 0.264242559671402, -0.12239387631416321, -0.20393069088459015, 0.43524378538131714, 0.09542796015739441, 0.14973461627960205, 0.10415232926607132, -0.09975200891494751, -0.28079161047935486, -0.26437780261039734, -0.15957695245742798, 0.3733043372631073, -0.34158673882484436, -0.17395520210266113, 0.26929545402526855, -0.30913490056991577, -0.1407884955406189, 0.1142800971865654, -0.14243142306804657, 0.19466519355773926, 0.2083410620689392, -0.04711989313364029, 0.06630697846412659, 0.24600403010845184, 0.038447748869657516, 0.17384636402130127, 0.029690610244870186, -0.4802928566932678, -0.3160501718521118, -0.09036076813936234, -0.1888754516839981, 0.020213767886161804, 0.3458714187145233, -0.24245864152908325, -0.2370806187391281, -0.07258336246013641, -0.020596789196133614, -0.17130690813064575, -0.37994447350502014, -0.09833713620901108, 0.06586102396249771, 0.18545490503311157, 0.05874723941087723, 0.06103825569152832, -0.36479800939559937, -0.20216697454452515, -0.09283135831356049, -0.07672666013240814, -0.12862785160541534, -0.1720004379749298, -0.10449197143316269, 0.25425758957862854, -0.18827322125434875, 0.09130582213401794, 0.2601751685142517, 0.07899506390094757, -0.11537612974643707, 0.21030840277671814, 0.21960456669330597, -0.36432287096977234, 0.1047283187508583, -0.11305445432662964, 0.07480095326900482, 0.43602678179740906, -0.005507688969373703, 0.0017840713262557983, -0.25952884554862976, 0.20827564597129822, -0.26490849256515503, -0.22648875415325165, 0.2413850575685501, 0.11916032433509827, -0.08314234018325806, -0.1221609115600586, -0.4942292869091034, 0.4385456144809723, 0.2539222538471222, -0.1163535863161087, -0.0749136283993721, -0.18091319501399994, -0.5298192501068115, -0.21674194931983948, 0.267924964427948, -0.018771812319755554, -0.07221245765686035, -0.19377996027469635, 0.34180352091789246, 0.19217228889465332, 0.3103511929512024, 0.64305579662323, -0.38648295402526855, 0.7953370213508606, -0.1250496506690979, 0.7483618855476379, 0.2579936385154724, -0.24770547449588776, -0.37781819701194763, 0.11663870513439178, -0.17846891283988953, 0.27222102880477905, -0.28185170888900757, -0.12006288766860962, 0.70263671875, -0.22527869045734406, 0.34198471903800964, 0.10614454001188278, 0.24699558317661285, 0.3040958046913147, -0.24837328493595123, -0.04919016361236572, 0.5504589676856995, -0.08022263646125793, -0.22425304353237152, -0.15098139643669128, -0.15340656042099, 0.11113331466913223, -0.03155418485403061, -0.12037332355976105, -0.1554092913866043, 0.06173226237297058, 0.01511157676577568, 0.027055785059928894, -0.0637362003326416, 0.21922630071640015, 0.147112637758255, 0.21719422936439514, 0.07411746680736542, 0.068392813205719, 0.42903053760528564, -0.006117053329944611, 0.10551666468381882, -0.06455042958259583, -0.15043263137340546, -0.14192789793014526, 0.17265325784683228, 0.12822045385837555, 0.06789854168891907, 0.08919259905815125, 0.23117227852344513, -0.10698017477989197, 0.015444153919816017, 0.1270228922367096, 0.44377678632736206, -0.3041419982910156, 0.14068661630153656, -0.160288468003273, -0.10612224042415619, -0.19360360503196716, 0.14087358117103577, 0.10873284190893173, -0.18346554040908813, 0.16243290901184082, 0.1247907504439354, 0.30946648120880127, -0.17306947708129883, 0.20741267502307892, 0.11455947160720825, 0.2654835283756256, 0.04486136510968208, 0.1117049902677536, 0.016418371349573135, -0.1618005931377411, -0.10114359110593796, 0.24875250458717346, 0.76655513048172, 0.2934231758117676, -0.0981307402253151, -0.19185051321983337, -0.007449474185705185, 0.20522290468215942, 0.12545940279960632, 0.09028607606887817, -0.017213623970746994, 0.30128994584083557, 0.4247044622898102, 0.17126646637916565, 0.3508587181568146, 0.474333792924881, 0.5267606973648071, -0.1261989027261734, -0.21092328429222107, 0.11692474782466888, -0.3413843810558319, -0.4390025734901428, -0.03245564550161362, -0.4132472574710846, 0.1679462045431137, 0.10433124005794525, 0.22383281588554382, -0.16898339986801147, -0.013875714503228664, 0.002553023397922516, 0.2727617919445038, 0.23192822933197021, -0.0062523228116333485, -0.03470814973115921, 0.1677316278219223, 0.2354772537946701, -0.3278363049030304, -0.1683434396982193, -0.017744751647114754, 0.24668413400650024, -0.020203396677970886, -0.08809293061494827, 0.06602846086025238, 0.17903846502304077, 0.48365598917007446, -0.07303361594676971, 0.04387972503900528, -0.23364856839179993, -0.08682671189308167, 0.0112861767411232, 0.07300588488578796, 0.14293424785137177, 0.20160508155822754, 0.04160480201244354, 0.05537938326597214, -0.13247564435005188, -0.032635945826768875, -0.20362256467342377, -0.3690440356731415, 0.06732751429080963, 0.0478154756128788, -0.10531284660100937, 0.30129051208496094, 0.18954911828041077, -0.07064664363861084, -0.028474101796746254, -0.45728859305381775, 0.08773922920227051, -0.1803114265203476, 0.009878138080239296, -0.10766516625881195, -0.15344294905662537, -0.19836817681789398, 0.04000264033675194, 0.11686036735773087, -0.27817514538764954, -0.2616518437862396, -0.3224227726459503, -0.11807239800691605, -0.17440913617610931, 0.14054423570632935, -0.020054161548614502, 0.05114235728979111, -0.03128029778599739, 0.12230005115270615, 0.10087120532989502, 0.12934523820877075, -0.2491520196199417, -0.1672079861164093, 0.19397687911987305, -0.05200427025556564, -0.012172069400548935, -0.3335230350494385, -0.24970465898513794, 0.3890588581562042, -0.06997024267911911, -0.014193754643201828, -0.2141367346048355, 0.09421406686306, 0.16698022186756134, 0.13987205922603607, -0.24602219462394714, 0.21763961017131805, -0.3044709861278534, 0.26148006319999695, 0.03844340518116951, -0.21672217547893524, 0.3941025733947754, 0.2282126545906067, -0.12224412709474564, 0.16977044939994812, -0.24780593812465668, 0.1691341996192932, -0.05900334566831589, -0.23506364226341248, 0.0723128616809845, 0.4840388596057892, 0.24679642915725708, 0.6211668848991394, 0.04898199066519737, -0.013337384909391403, -0.00010479241609573364, -0.3113273084163666, -0.13158224523067474, -0.4311894476413727, -0.07551337778568268, 0.20715612173080444, -0.09913642704486847, 0.025744158774614334, 0.48657655715942383, -0.08505569398403168, -0.3330840468406677, 0.2221699059009552, -0.17344248294830322, 0.04907567799091339, -0.19993911683559418, 0.12732847034931183, -0.0947733223438263, 0.05930540710687637, 0.0013976357877254486, 0.40461084246635437, -0.5339138507843018, -0.14910292625427246, 0.23746751248836517, -0.2787156105041504, 0.2525825500488281, -0.25178951025009155, -0.9455530643463135, 0.3512921631336212, -0.8524879217147827, 0.09497635811567307, 0.01654793508350849, 0.22760270535945892, 0.04750743880867958, -0.0270619448274374, 0.11630081385374069, -0.03245183825492859, 0.16581302881240845, -0.053808704018592834, -0.08455531299114227, 0.2370498776435852, -0.5604736804962158, -0.11725729703903198, -0.14565131068229675, -0.078785240650177, 0.19362692534923553, 0.5949993133544922, 0.7412642240524292, -0.09443050622940063, -0.2862768769264221, -0.3504449725151062, -0.04790698364377022, 0.06967751681804657, 0.03928505629301071, -0.013841859996318817, -0.10236944258213043, -0.1808013767004013, 0.010817199945449829, 0.10237520188093185, 0.18226686120033264, 0.13341988623142242, -0.15410926938056946, -0.08755295723676682, 0.15052032470703125, 0.30369699001312256, 0.27780210971832275, 0.24230724573135376, -0.038768261671066284, 0.34377962350845337, 0.3173718750476837, 0.10557398200035095, -0.11109791696071625, -0.15754641592502594, 0.2181520015001297, -0.36953097581863403, 0.09002270549535751, 0.09987189620733261, 0.06710663437843323, 0.16950537264347076, -0.032325420528650284, 0.2138267457485199, -0.2696317732334137, 0.3467106223106384, -0.19183045625686646, 0.3990115225315094, 0.5268696546554565, 0.13443554937839508, -0.5008943676948547, -0.3026985228061676, 0.07103843241930008, 0.5278066396713257, -0.26714885234832764, 0.43690693378448486, -0.4802761673927307, -0.4048759341239929, 0.4786459803581238, 0.2622498571872711, 0.5893489718437195, -0.00019755959510803223, 0.21312566101551056, 0.2467377483844757, 0.28208768367767334, 0.18717972934246063, -0.44224393367767334, -0.1283496916294098, -0.23518304526805878, 0.2189825475215912, 0.04329981654882431, -0.07354763895273209, 0.06810372322797775, 0.23929408192634583, -0.11905810236930847, -0.07074674218893051, 0.1343747079372406, 0.882922351360321, -0.013043368235230446, 0.3027331233024597, 0.4876135587692261, -0.3995562493801117, 0.3429583013057709, 0.13938862085342407, 0.22414198517799377, 0.0627053827047348, 0.0940348356962204, 0.09735546261072159, -0.06829366087913513, -0.1550719439983368, -0.24992884695529938, -0.2025584578514099, -0.5686981081962585, 0.2977931499481201, -0.20471394062042236, 0.03080093115568161, 0.07980066537857056, 0.14483767747879028, 0.04165821149945259, 0.24064290523529053, 0.0066324155777692795, 0.2885671555995941, 0.21322670578956604, 0.33644169569015503, 0.2534503936767578, -0.5096054673194885, -0.19772887229919434, -0.00980672799050808, -0.015243232250213623, 0.1644136905670166, -0.26448115706443787, -0.3185320496559143, -0.642041802406311, -0.04586450755596161, 0.3040485680103302, -0.36560505628585815, 0.019045107066631317, 0.10112300515174866, -0.079265296459198, -0.19805815815925598, 0.08064164966344833, -0.15343168377876282, 0.08537718653678894, 0.40806373953819275, -0.07441210746765137, -0.2806633710861206, 0.018494319170713425, 0.3022502660751343, 0.12154626101255417, -0.21070414781570435, 0.43070188164711, -0.47031137347221375, -0.2629357576370239, -0.10358759015798569, 0.21543627977371216, 0.13631519675254822, 0.11987597495317459, 0.09263504296541214, -0.13185419142246246, -0.18322856724262238, 0.09514603763818741, 0.26415467262268066, -0.12749488651752472, -0.10990751534700394, -0.17242029309272766, -0.018341217190027237, -0.306043803691864, -0.010590247809886932, -0.05993114039301872, 0.09162308275699615, 0.09735330194234848, 0.13492800295352936, -0.3185405433177948, 0.1697496622800827, -0.25776854157447815, -0.12103110551834106, 0.12591196596622467, 0.15388117730617523, -0.20141154527664185, -0.1586650013923645, 0.1208089217543602, 0.04116205498576164, 0.09976769983768463, 0.2575889825820923, 0.035096004605293274, -0.22869470715522766, -0.08349362760782242, 0.14248965680599213, 0.046630315482616425, -0.36045733094215393, 0.06594091653823853, 0.1358204334974289, -0.08454747498035431, -0.5128015279769897, 0.20534510910511017, 0.17162397503852844, 0.013776779174804688, -0.42633458971977234, 0.1967771351337433, -0.004544563591480255, -0.006976518779993057, 0.1540147066116333, -0.040920138359069824, 0.019588693976402283, 0.10938411206007004, 0.21673014760017395, 0.12089195847511292, -0.20395323634147644, 0.04365489259362221, 0.2604888379573822, 0.33503156900405884, 0.1718846559524536, 0.01198059692978859, -0.026033155620098114, -0.0632946640253067, 0.1637771725654602, -0.16997887194156647, 0.2126777619123459, -0.22457046806812286, -0.4430891275405884, 0.20653828978538513, 0.1477208286523819, 0.06795012950897217, -0.2368668168783188, 0.41122525930404663, -0.2698410153388977, 0.17054681479930878, 0.05370637774467468, 0.22349035739898682, 0.25585702061653137, -0.21674422919750214, -0.16781353950500488, 0.45805037021636963, -0.1856306940317154, 0.09275642037391663, 0.11852137744426727, -0.046437788754701614, 0.014366008341312408, 0.3236364424228668, 0.08962982892990112, 0.13182947039604187, 0.4207836389541626, 0.206501305103302, 0.2570439875125885, 0.23929360508918762, 0.37313559651374817, -0.18872371315956116, -0.2324150800704956, -0.057918380945920944, 0.4835403859615326, -0.33757835626602173, 0.1452251672744751, -0.003101758658885956, -0.009072095155715942, 0.015063965693116188, -0.557723879814148, -0.036190055310726166, 0.3808555603027344, -0.37380120158195496, -0.26346394419670105, -0.10397452116012573, 0.000050455331802368164, -0.04441508278250694, 0.35797324776649475, -0.13069286942481995, -0.04405184090137482, -0.32288870215415955, -0.10856428742408752, -0.070136159658432, 0.1116296797990799, -0.25398293137550354, -0.2345300316810608, 0.21848884224891663, -0.21756063401699066, 0.2340625673532486, -0.4240419864654541, 0.13494271039962769, -0.05566536262631416, 0.37406396865844727, 0.37340253591537476, 0.27637237310409546, -0.13791479170322418, 0.060441870242357254, -0.07821515202522278, 0.09102997928857803, 0.03761180862784386, 0.1411617398262024, -0.0731155276298523, -0.3212684094905853, 0.1342654675245285, 0.0041144490242004395, -0.17982761561870575, -0.3566519618034363, 0.032982438802719116, -0.10908152163028717, 0.19662682712078094, 0.22091209888458252, 0.050985127687454224, -0.14805643260478973, 0.11666053533554077, 0.06280158460140228, 0.08144893497228622, -0.16012780368328094, 0.14899785816669464, 0.07930716872215271, 0.1826460361480713, -0.08430469781160355, 0.07061059772968292, 0.037876203656196594, 0.4189380407333374, 0.02741478756070137, -0.11204174906015396, -0.378652960062027, -0.33077019453048706, -0.3441822826862335, -0.08834495395421982, -0.19330374896526337, 0.13737988471984863, -0.002271256409585476, 0.09053803235292435, 0.1760571002960205, 0.19486284255981445, 0.20748423039913177, 0.12348546087741852, -0.2083263397216797, -0.09985029697418213, -0.2851068079471588, 0.48169541358947754, -0.17266547679901123, 0.03965563327074051, 0.006443113088607788, -0.3506651818752289, 0.4216938018798828, 0.016046229749917984, 0.13119348883628845, -0.17603757977485657, 0.05233059078454971, -0.021239500492811203, 0.09319616854190826, 0.6377805471420288, 0.16887125372886658, 0.06171915680170059, -0.03467871621251106, 0.16214929521083832, 0.15414535999298096, 0.18101780116558075, -0.22026044130325317, 0.06765644252300262, -0.015729296952486038, -0.0018746573477983475, 0.058215945959091187, 0.027588628232479095, -0.07953554391860962, -0.11201352626085281, 0.174183651804924, -0.09662441909313202, -0.22798775136470795, -0.09358848631381989, 0.007984936237335205, 0.12249387055635452, -0.2413402944803238, 0.3319843113422394, 0.07341548800468445, 0.20806652307510376, -0.39738744497299194, -0.06145142763853073, 0.4318278431892395, -0.6654883027076721, -0.12014979124069214, -0.26930925250053406, -0.011783331632614136, 0.3286215662956238, 0.17322078347206116, -0.10575181990861893, -0.28178825974464417, 0.529181718826294, 0.027850715443491936, -0.28139546513557434, 0.3174487054347992, -0.06961531937122345, -0.00765402615070343, -0.03373267874121666, 0.3865731358528137, -0.2410539984703064, -0.1833973228931427, -0.07387245446443558, -0.04495921730995178 ]
https://github.com/huggingface/datasets/issues/1830
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
@lhoestq , Hi, which version of datasets has datasets.set_caching_enabled(False)? I get module 'datasets' has no attribute 'set_caching_enabled'. To hopefully get around this, I reran my code on a new set of data, and did so only once. @johncookds , thanks for chiming in, it looks this might be an issue of Tokenizer. **Tokenizer**: The runtime of GPT2TokenizerFast.from_pretrained("gpt2") on 1000 chars is: **143 ms** **SlowTokenizer**: The runtime of a locally saved and loaded Tokenizer using the same vocab on 1000 chars is: **4.43 s** That being said, I compared performance on the map function: Running Tokenizer versus using it in the map function for 1000 chars goes from **141 ms** to **356 ms** Running SlowTokenizer versus using it in the map function for 1000 chars with a single element goes from **4.43 s** to **9.76 s** I'm trying to figure out why the overhead of map would increase the time by double (figured it would be a fixed increase in time)? Though maybe this is expected behavior. @lhoestq, do you by chance know how I can redirect this issue to Tokenizer? Regards, Michael
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
182
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer? This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function. @lhoestq , Hi, which version of datasets has datasets.set_caching_enabled(False)? I get module 'datasets' has no attribute 'set_caching_enabled'. To hopefully get around this, I reran my code on a new set of data, and did so only once. @johncookds , thanks for chiming in, it looks this might be an issue of Tokenizer. **Tokenizer**: The runtime of GPT2TokenizerFast.from_pretrained("gpt2") on 1000 chars is: **143 ms** **SlowTokenizer**: The runtime of a locally saved and loaded Tokenizer using the same vocab on 1000 chars is: **4.43 s** That being said, I compared performance on the map function: Running Tokenizer versus using it in the map function for 1000 chars goes from **141 ms** to **356 ms** Running SlowTokenizer versus using it in the map function for 1000 chars with a single element goes from **4.43 s** to **9.76 s** I'm trying to figure out why the overhead of map would increase the time by double (figured it would be a fixed increase in time)? Though maybe this is expected behavior. @lhoestq, do you by chance know how I can redirect this issue to Tokenizer? Regards, Michael
[ -0.40404728055000305, -0.01300717145204544, -0.10247054696083069, 0.1034291684627533, 0.14530566334724426, -0.12255395948886871, 0.2550537884235382, 0.1890888214111328, 0.13067761063575745, -0.006501898169517517, -0.05422341078519821, 0.4988860785961151, -0.1724812239408493, -0.2727595269680023, -0.1320432871580124, 0.06504257768392563, 0.21975907683372498, 0.022416770458221436, 0.24164487421512604, -0.034286655485630035, -0.1218729019165039, 0.10230173915624619, -0.17672543227672577, 0.24139907956123352, -0.31526270508766174, -0.07799291610717773, 0.08123118430376053, -0.20963355898857117, -0.002756858244538307, -0.5689612627029419, -0.20842988789081573, 0.15812477469444275, 0.02094278112053871, 0.533124566078186, -0.00011487364827189595, 0.04034285247325897, -0.02916356921195984, 0.2731476426124573, 0.13471747934818268, 0.04436098039150238, 0.35295429825782776, -0.19428551197052002, -0.16858325898647308, -0.22576633095741272, -0.054171204566955566, -0.2808627784252167, -0.02212238870561123, -0.22417739033699036, 0.06830838322639465, 0.030042309314012527, 0.16085880994796753, 0.11519482731819153, -0.3964320719242096, -0.05951574444770813, -0.0024587735533714294, -0.1042250394821167, -0.09915442764759064, 0.014026454649865627, 0.07132945954799652, -0.2551872134208679, -0.21165668964385986, 0.19490475952625275, -0.21304312348365784, -0.14781400561332703, 0.2687233090400696, 0.21636949479579926, 0.034611500799655914, -0.24252483248710632, 0.1680864691734314, 0.2316349744796753, 0.06701106578111649, -0.02721283584833145, -0.017125165089964867, -0.3350789546966553, -0.3706915080547333, -0.02848217636346817, 0.1461225003004074, -0.4334976077079773, -0.12065143883228302, -0.08960263431072235, -0.41406527161598206, 0.2037731111049652, 0.264242559671402, -0.12239387631416321, -0.20393069088459015, 0.43524378538131714, 0.09542796015739441, 0.14973461627960205, 0.10415232926607132, -0.09975200891494751, -0.28079161047935486, -0.26437780261039734, -0.15957695245742798, 0.3733043372631073, -0.34158673882484436, -0.17395520210266113, 0.26929545402526855, -0.30913490056991577, -0.1407884955406189, 0.1142800971865654, -0.14243142306804657, 0.19466519355773926, 0.2083410620689392, -0.04711989313364029, 0.06630697846412659, 0.24600403010845184, 0.038447748869657516, 0.17384636402130127, 0.029690610244870186, -0.4802928566932678, -0.3160501718521118, -0.09036076813936234, -0.1888754516839981, 0.020213767886161804, 0.3458714187145233, -0.24245864152908325, -0.2370806187391281, -0.07258336246013641, -0.020596789196133614, -0.17130690813064575, -0.37994447350502014, -0.09833713620901108, 0.06586102396249771, 0.18545490503311157, 0.05874723941087723, 0.06103825569152832, -0.36479800939559937, -0.20216697454452515, -0.09283135831356049, -0.07672666013240814, -0.12862785160541534, -0.1720004379749298, -0.10449197143316269, 0.25425758957862854, -0.18827322125434875, 0.09130582213401794, 0.2601751685142517, 0.07899506390094757, -0.11537612974643707, 0.21030840277671814, 0.21960456669330597, -0.36432287096977234, 0.1047283187508583, -0.11305445432662964, 0.07480095326900482, 0.43602678179740906, -0.005507688969373703, 0.0017840713262557983, -0.25952884554862976, 0.20827564597129822, -0.26490849256515503, -0.22648875415325165, 0.2413850575685501, 0.11916032433509827, -0.08314234018325806, -0.1221609115600586, -0.4942292869091034, 0.4385456144809723, 0.2539222538471222, -0.1163535863161087, -0.0749136283993721, -0.18091319501399994, -0.5298192501068115, -0.21674194931983948, 0.267924964427948, -0.018771812319755554, -0.07221245765686035, -0.19377996027469635, 0.34180352091789246, 0.19217228889465332, 0.3103511929512024, 0.64305579662323, -0.38648295402526855, 0.7953370213508606, -0.1250496506690979, 0.7483618855476379, 0.2579936385154724, -0.24770547449588776, -0.37781819701194763, 0.11663870513439178, -0.17846891283988953, 0.27222102880477905, -0.28185170888900757, -0.12006288766860962, 0.70263671875, -0.22527869045734406, 0.34198471903800964, 0.10614454001188278, 0.24699558317661285, 0.3040958046913147, -0.24837328493595123, -0.04919016361236572, 0.5504589676856995, -0.08022263646125793, -0.22425304353237152, -0.15098139643669128, -0.15340656042099, 0.11113331466913223, -0.03155418485403061, -0.12037332355976105, -0.1554092913866043, 0.06173226237297058, 0.01511157676577568, 0.027055785059928894, -0.0637362003326416, 0.21922630071640015, 0.147112637758255, 0.21719422936439514, 0.07411746680736542, 0.068392813205719, 0.42903053760528564, -0.006117053329944611, 0.10551666468381882, -0.06455042958259583, -0.15043263137340546, -0.14192789793014526, 0.17265325784683228, 0.12822045385837555, 0.06789854168891907, 0.08919259905815125, 0.23117227852344513, -0.10698017477989197, 0.015444153919816017, 0.1270228922367096, 0.44377678632736206, -0.3041419982910156, 0.14068661630153656, -0.160288468003273, -0.10612224042415619, -0.19360360503196716, 0.14087358117103577, 0.10873284190893173, -0.18346554040908813, 0.16243290901184082, 0.1247907504439354, 0.30946648120880127, -0.17306947708129883, 0.20741267502307892, 0.11455947160720825, 0.2654835283756256, 0.04486136510968208, 0.1117049902677536, 0.016418371349573135, -0.1618005931377411, -0.10114359110593796, 0.24875250458717346, 0.76655513048172, 0.2934231758117676, -0.0981307402253151, -0.19185051321983337, -0.007449474185705185, 0.20522290468215942, 0.12545940279960632, 0.09028607606887817, -0.017213623970746994, 0.30128994584083557, 0.4247044622898102, 0.17126646637916565, 0.3508587181568146, 0.474333792924881, 0.5267606973648071, -0.1261989027261734, -0.21092328429222107, 0.11692474782466888, -0.3413843810558319, -0.4390025734901428, -0.03245564550161362, -0.4132472574710846, 0.1679462045431137, 0.10433124005794525, 0.22383281588554382, -0.16898339986801147, -0.013875714503228664, 0.002553023397922516, 0.2727617919445038, 0.23192822933197021, -0.0062523228116333485, -0.03470814973115921, 0.1677316278219223, 0.2354772537946701, -0.3278363049030304, -0.1683434396982193, -0.017744751647114754, 0.24668413400650024, -0.020203396677970886, -0.08809293061494827, 0.06602846086025238, 0.17903846502304077, 0.48365598917007446, -0.07303361594676971, 0.04387972503900528, -0.23364856839179993, -0.08682671189308167, 0.0112861767411232, 0.07300588488578796, 0.14293424785137177, 0.20160508155822754, 0.04160480201244354, 0.05537938326597214, -0.13247564435005188, -0.032635945826768875, -0.20362256467342377, -0.3690440356731415, 0.06732751429080963, 0.0478154756128788, -0.10531284660100937, 0.30129051208496094, 0.18954911828041077, -0.07064664363861084, -0.028474101796746254, -0.45728859305381775, 0.08773922920227051, -0.1803114265203476, 0.009878138080239296, -0.10766516625881195, -0.15344294905662537, -0.19836817681789398, 0.04000264033675194, 0.11686036735773087, -0.27817514538764954, -0.2616518437862396, -0.3224227726459503, -0.11807239800691605, -0.17440913617610931, 0.14054423570632935, -0.020054161548614502, 0.05114235728979111, -0.03128029778599739, 0.12230005115270615, 0.10087120532989502, 0.12934523820877075, -0.2491520196199417, -0.1672079861164093, 0.19397687911987305, -0.05200427025556564, -0.012172069400548935, -0.3335230350494385, -0.24970465898513794, 0.3890588581562042, -0.06997024267911911, -0.014193754643201828, -0.2141367346048355, 0.09421406686306, 0.16698022186756134, 0.13987205922603607, -0.24602219462394714, 0.21763961017131805, -0.3044709861278534, 0.26148006319999695, 0.03844340518116951, -0.21672217547893524, 0.3941025733947754, 0.2282126545906067, -0.12224412709474564, 0.16977044939994812, -0.24780593812465668, 0.1691341996192932, -0.05900334566831589, -0.23506364226341248, 0.0723128616809845, 0.4840388596057892, 0.24679642915725708, 0.6211668848991394, 0.04898199066519737, -0.013337384909391403, -0.00010479241609573364, -0.3113273084163666, -0.13158224523067474, -0.4311894476413727, -0.07551337778568268, 0.20715612173080444, -0.09913642704486847, 0.025744158774614334, 0.48657655715942383, -0.08505569398403168, -0.3330840468406677, 0.2221699059009552, -0.17344248294830322, 0.04907567799091339, -0.19993911683559418, 0.12732847034931183, -0.0947733223438263, 0.05930540710687637, 0.0013976357877254486, 0.40461084246635437, -0.5339138507843018, -0.14910292625427246, 0.23746751248836517, -0.2787156105041504, 0.2525825500488281, -0.25178951025009155, -0.9455530643463135, 0.3512921631336212, -0.8524879217147827, 0.09497635811567307, 0.01654793508350849, 0.22760270535945892, 0.04750743880867958, -0.0270619448274374, 0.11630081385374069, -0.03245183825492859, 0.16581302881240845, -0.053808704018592834, -0.08455531299114227, 0.2370498776435852, -0.5604736804962158, -0.11725729703903198, -0.14565131068229675, -0.078785240650177, 0.19362692534923553, 0.5949993133544922, 0.7412642240524292, -0.09443050622940063, -0.2862768769264221, -0.3504449725151062, -0.04790698364377022, 0.06967751681804657, 0.03928505629301071, -0.013841859996318817, -0.10236944258213043, -0.1808013767004013, 0.010817199945449829, 0.10237520188093185, 0.18226686120033264, 0.13341988623142242, -0.15410926938056946, -0.08755295723676682, 0.15052032470703125, 0.30369699001312256, 0.27780210971832275, 0.24230724573135376, -0.038768261671066284, 0.34377962350845337, 0.3173718750476837, 0.10557398200035095, -0.11109791696071625, -0.15754641592502594, 0.2181520015001297, -0.36953097581863403, 0.09002270549535751, 0.09987189620733261, 0.06710663437843323, 0.16950537264347076, -0.032325420528650284, 0.2138267457485199, -0.2696317732334137, 0.3467106223106384, -0.19183045625686646, 0.3990115225315094, 0.5268696546554565, 0.13443554937839508, -0.5008943676948547, -0.3026985228061676, 0.07103843241930008, 0.5278066396713257, -0.26714885234832764, 0.43690693378448486, -0.4802761673927307, -0.4048759341239929, 0.4786459803581238, 0.2622498571872711, 0.5893489718437195, -0.00019755959510803223, 0.21312566101551056, 0.2467377483844757, 0.28208768367767334, 0.18717972934246063, -0.44224393367767334, -0.1283496916294098, -0.23518304526805878, 0.2189825475215912, 0.04329981654882431, -0.07354763895273209, 0.06810372322797775, 0.23929408192634583, -0.11905810236930847, -0.07074674218893051, 0.1343747079372406, 0.882922351360321, -0.013043368235230446, 0.3027331233024597, 0.4876135587692261, -0.3995562493801117, 0.3429583013057709, 0.13938862085342407, 0.22414198517799377, 0.0627053827047348, 0.0940348356962204, 0.09735546261072159, -0.06829366087913513, -0.1550719439983368, -0.24992884695529938, -0.2025584578514099, -0.5686981081962585, 0.2977931499481201, -0.20471394062042236, 0.03080093115568161, 0.07980066537857056, 0.14483767747879028, 0.04165821149945259, 0.24064290523529053, 0.0066324155777692795, 0.2885671555995941, 0.21322670578956604, 0.33644169569015503, 0.2534503936767578, -0.5096054673194885, -0.19772887229919434, -0.00980672799050808, -0.015243232250213623, 0.1644136905670166, -0.26448115706443787, -0.3185320496559143, -0.642041802406311, -0.04586450755596161, 0.3040485680103302, -0.36560505628585815, 0.019045107066631317, 0.10112300515174866, -0.079265296459198, -0.19805815815925598, 0.08064164966344833, -0.15343168377876282, 0.08537718653678894, 0.40806373953819275, -0.07441210746765137, -0.2806633710861206, 0.018494319170713425, 0.3022502660751343, 0.12154626101255417, -0.21070414781570435, 0.43070188164711, -0.47031137347221375, -0.2629357576370239, -0.10358759015798569, 0.21543627977371216, 0.13631519675254822, 0.11987597495317459, 0.09263504296541214, -0.13185419142246246, -0.18322856724262238, 0.09514603763818741, 0.26415467262268066, -0.12749488651752472, -0.10990751534700394, -0.17242029309272766, -0.018341217190027237, -0.306043803691864, -0.010590247809886932, -0.05993114039301872, 0.09162308275699615, 0.09735330194234848, 0.13492800295352936, -0.3185405433177948, 0.1697496622800827, -0.25776854157447815, -0.12103110551834106, 0.12591196596622467, 0.15388117730617523, -0.20141154527664185, -0.1586650013923645, 0.1208089217543602, 0.04116205498576164, 0.09976769983768463, 0.2575889825820923, 0.035096004605293274, -0.22869470715522766, -0.08349362760782242, 0.14248965680599213, 0.046630315482616425, -0.36045733094215393, 0.06594091653823853, 0.1358204334974289, -0.08454747498035431, -0.5128015279769897, 0.20534510910511017, 0.17162397503852844, 0.013776779174804688, -0.42633458971977234, 0.1967771351337433, -0.004544563591480255, -0.006976518779993057, 0.1540147066116333, -0.040920138359069824, 0.019588693976402283, 0.10938411206007004, 0.21673014760017395, 0.12089195847511292, -0.20395323634147644, 0.04365489259362221, 0.2604888379573822, 0.33503156900405884, 0.1718846559524536, 0.01198059692978859, -0.026033155620098114, -0.0632946640253067, 0.1637771725654602, -0.16997887194156647, 0.2126777619123459, -0.22457046806812286, -0.4430891275405884, 0.20653828978538513, 0.1477208286523819, 0.06795012950897217, -0.2368668168783188, 0.41122525930404663, -0.2698410153388977, 0.17054681479930878, 0.05370637774467468, 0.22349035739898682, 0.25585702061653137, -0.21674422919750214, -0.16781353950500488, 0.45805037021636963, -0.1856306940317154, 0.09275642037391663, 0.11852137744426727, -0.046437788754701614, 0.014366008341312408, 0.3236364424228668, 0.08962982892990112, 0.13182947039604187, 0.4207836389541626, 0.206501305103302, 0.2570439875125885, 0.23929360508918762, 0.37313559651374817, -0.18872371315956116, -0.2324150800704956, -0.057918380945920944, 0.4835403859615326, -0.33757835626602173, 0.1452251672744751, -0.003101758658885956, -0.009072095155715942, 0.015063965693116188, -0.557723879814148, -0.036190055310726166, 0.3808555603027344, -0.37380120158195496, -0.26346394419670105, -0.10397452116012573, 0.000050455331802368164, -0.04441508278250694, 0.35797324776649475, -0.13069286942481995, -0.04405184090137482, -0.32288870215415955, -0.10856428742408752, -0.070136159658432, 0.1116296797990799, -0.25398293137550354, -0.2345300316810608, 0.21848884224891663, -0.21756063401699066, 0.2340625673532486, -0.4240419864654541, 0.13494271039962769, -0.05566536262631416, 0.37406396865844727, 0.37340253591537476, 0.27637237310409546, -0.13791479170322418, 0.060441870242357254, -0.07821515202522278, 0.09102997928857803, 0.03761180862784386, 0.1411617398262024, -0.0731155276298523, -0.3212684094905853, 0.1342654675245285, 0.0041144490242004395, -0.17982761561870575, -0.3566519618034363, 0.032982438802719116, -0.10908152163028717, 0.19662682712078094, 0.22091209888458252, 0.050985127687454224, -0.14805643260478973, 0.11666053533554077, 0.06280158460140228, 0.08144893497228622, -0.16012780368328094, 0.14899785816669464, 0.07930716872215271, 0.1826460361480713, -0.08430469781160355, 0.07061059772968292, 0.037876203656196594, 0.4189380407333374, 0.02741478756070137, -0.11204174906015396, -0.378652960062027, -0.33077019453048706, -0.3441822826862335, -0.08834495395421982, -0.19330374896526337, 0.13737988471984863, -0.002271256409585476, 0.09053803235292435, 0.1760571002960205, 0.19486284255981445, 0.20748423039913177, 0.12348546087741852, -0.2083263397216797, -0.09985029697418213, -0.2851068079471588, 0.48169541358947754, -0.17266547679901123, 0.03965563327074051, 0.006443113088607788, -0.3506651818752289, 0.4216938018798828, 0.016046229749917984, 0.13119348883628845, -0.17603757977485657, 0.05233059078454971, -0.021239500492811203, 0.09319616854190826, 0.6377805471420288, 0.16887125372886658, 0.06171915680170059, -0.03467871621251106, 0.16214929521083832, 0.15414535999298096, 0.18101780116558075, -0.22026044130325317, 0.06765644252300262, -0.015729296952486038, -0.0018746573477983475, 0.058215945959091187, 0.027588628232479095, -0.07953554391860962, -0.11201352626085281, 0.174183651804924, -0.09662441909313202, -0.22798775136470795, -0.09358848631381989, 0.007984936237335205, 0.12249387055635452, -0.2413402944803238, 0.3319843113422394, 0.07341548800468445, 0.20806652307510376, -0.39738744497299194, -0.06145142763853073, 0.4318278431892395, -0.6654883027076721, -0.12014979124069214, -0.26930925250053406, -0.011783331632614136, 0.3286215662956238, 0.17322078347206116, -0.10575181990861893, -0.28178825974464417, 0.529181718826294, 0.027850715443491936, -0.28139546513557434, 0.3174487054347992, -0.06961531937122345, -0.00765402615070343, -0.03373267874121666, 0.3865731358528137, -0.2410539984703064, -0.1833973228931427, -0.07387245446443558, -0.04495921730995178 ]
https://github.com/huggingface/datasets/issues/1830
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
Thanks for the experiments @johncookds and @wumpusman ! > Hi, which version of datasets has datasets.set_caching_enabled(False)? Currently you have to install `datasets` from source to have this feature, but this will be available in the next release in a few days. > I'm trying to figure out why the overhead of map would increase the time by double (figured it would be a fixed increase in time)? Though maybe this is expected behavior. Could you also try with double the number of characters ? This should let us have an idea of the fixed cost (hashing) and the dynamic cost (actual tokenization, grows with the size of the input) > @lhoestq, do you by chance know how I can redirect this issue to Tokenizer? Feel free to post an issue on the `transformers` repo. Also I'm sure there should be related issues so you can also look for someone with the same concerns on the `transformers` repo.
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
157
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer? This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function. Thanks for the experiments @johncookds and @wumpusman ! > Hi, which version of datasets has datasets.set_caching_enabled(False)? Currently you have to install `datasets` from source to have this feature, but this will be available in the next release in a few days. > I'm trying to figure out why the overhead of map would increase the time by double (figured it would be a fixed increase in time)? Though maybe this is expected behavior. Could you also try with double the number of characters ? This should let us have an idea of the fixed cost (hashing) and the dynamic cost (actual tokenization, grows with the size of the input) > @lhoestq, do you by chance know how I can redirect this issue to Tokenizer? Feel free to post an issue on the `transformers` repo. Also I'm sure there should be related issues so you can also look for someone with the same concerns on the `transformers` repo.
[ -0.40404728055000305, -0.01300717145204544, -0.10247054696083069, 0.1034291684627533, 0.14530566334724426, -0.12255395948886871, 0.2550537884235382, 0.1890888214111328, 0.13067761063575745, -0.006501898169517517, -0.05422341078519821, 0.4988860785961151, -0.1724812239408493, -0.2727595269680023, -0.1320432871580124, 0.06504257768392563, 0.21975907683372498, 0.022416770458221436, 0.24164487421512604, -0.034286655485630035, -0.1218729019165039, 0.10230173915624619, -0.17672543227672577, 0.24139907956123352, -0.31526270508766174, -0.07799291610717773, 0.08123118430376053, -0.20963355898857117, -0.002756858244538307, -0.5689612627029419, -0.20842988789081573, 0.15812477469444275, 0.02094278112053871, 0.533124566078186, -0.00011487364827189595, 0.04034285247325897, -0.02916356921195984, 0.2731476426124573, 0.13471747934818268, 0.04436098039150238, 0.35295429825782776, -0.19428551197052002, -0.16858325898647308, -0.22576633095741272, -0.054171204566955566, -0.2808627784252167, -0.02212238870561123, -0.22417739033699036, 0.06830838322639465, 0.030042309314012527, 0.16085880994796753, 0.11519482731819153, -0.3964320719242096, -0.05951574444770813, -0.0024587735533714294, -0.1042250394821167, -0.09915442764759064, 0.014026454649865627, 0.07132945954799652, -0.2551872134208679, -0.21165668964385986, 0.19490475952625275, -0.21304312348365784, -0.14781400561332703, 0.2687233090400696, 0.21636949479579926, 0.034611500799655914, -0.24252483248710632, 0.1680864691734314, 0.2316349744796753, 0.06701106578111649, -0.02721283584833145, -0.017125165089964867, -0.3350789546966553, -0.3706915080547333, -0.02848217636346817, 0.1461225003004074, -0.4334976077079773, -0.12065143883228302, -0.08960263431072235, -0.41406527161598206, 0.2037731111049652, 0.264242559671402, -0.12239387631416321, -0.20393069088459015, 0.43524378538131714, 0.09542796015739441, 0.14973461627960205, 0.10415232926607132, -0.09975200891494751, -0.28079161047935486, -0.26437780261039734, -0.15957695245742798, 0.3733043372631073, -0.34158673882484436, -0.17395520210266113, 0.26929545402526855, -0.30913490056991577, -0.1407884955406189, 0.1142800971865654, -0.14243142306804657, 0.19466519355773926, 0.2083410620689392, -0.04711989313364029, 0.06630697846412659, 0.24600403010845184, 0.038447748869657516, 0.17384636402130127, 0.029690610244870186, -0.4802928566932678, -0.3160501718521118, -0.09036076813936234, -0.1888754516839981, 0.020213767886161804, 0.3458714187145233, -0.24245864152908325, -0.2370806187391281, -0.07258336246013641, -0.020596789196133614, -0.17130690813064575, -0.37994447350502014, -0.09833713620901108, 0.06586102396249771, 0.18545490503311157, 0.05874723941087723, 0.06103825569152832, -0.36479800939559937, -0.20216697454452515, -0.09283135831356049, -0.07672666013240814, -0.12862785160541534, -0.1720004379749298, -0.10449197143316269, 0.25425758957862854, -0.18827322125434875, 0.09130582213401794, 0.2601751685142517, 0.07899506390094757, -0.11537612974643707, 0.21030840277671814, 0.21960456669330597, -0.36432287096977234, 0.1047283187508583, -0.11305445432662964, 0.07480095326900482, 0.43602678179740906, -0.005507688969373703, 0.0017840713262557983, -0.25952884554862976, 0.20827564597129822, -0.26490849256515503, -0.22648875415325165, 0.2413850575685501, 0.11916032433509827, -0.08314234018325806, -0.1221609115600586, -0.4942292869091034, 0.4385456144809723, 0.2539222538471222, -0.1163535863161087, -0.0749136283993721, -0.18091319501399994, -0.5298192501068115, -0.21674194931983948, 0.267924964427948, -0.018771812319755554, -0.07221245765686035, -0.19377996027469635, 0.34180352091789246, 0.19217228889465332, 0.3103511929512024, 0.64305579662323, -0.38648295402526855, 0.7953370213508606, -0.1250496506690979, 0.7483618855476379, 0.2579936385154724, -0.24770547449588776, -0.37781819701194763, 0.11663870513439178, -0.17846891283988953, 0.27222102880477905, -0.28185170888900757, -0.12006288766860962, 0.70263671875, -0.22527869045734406, 0.34198471903800964, 0.10614454001188278, 0.24699558317661285, 0.3040958046913147, -0.24837328493595123, -0.04919016361236572, 0.5504589676856995, -0.08022263646125793, -0.22425304353237152, -0.15098139643669128, -0.15340656042099, 0.11113331466913223, -0.03155418485403061, -0.12037332355976105, -0.1554092913866043, 0.06173226237297058, 0.01511157676577568, 0.027055785059928894, -0.0637362003326416, 0.21922630071640015, 0.147112637758255, 0.21719422936439514, 0.07411746680736542, 0.068392813205719, 0.42903053760528564, -0.006117053329944611, 0.10551666468381882, -0.06455042958259583, -0.15043263137340546, -0.14192789793014526, 0.17265325784683228, 0.12822045385837555, 0.06789854168891907, 0.08919259905815125, 0.23117227852344513, -0.10698017477989197, 0.015444153919816017, 0.1270228922367096, 0.44377678632736206, -0.3041419982910156, 0.14068661630153656, -0.160288468003273, -0.10612224042415619, -0.19360360503196716, 0.14087358117103577, 0.10873284190893173, -0.18346554040908813, 0.16243290901184082, 0.1247907504439354, 0.30946648120880127, -0.17306947708129883, 0.20741267502307892, 0.11455947160720825, 0.2654835283756256, 0.04486136510968208, 0.1117049902677536, 0.016418371349573135, -0.1618005931377411, -0.10114359110593796, 0.24875250458717346, 0.76655513048172, 0.2934231758117676, -0.0981307402253151, -0.19185051321983337, -0.007449474185705185, 0.20522290468215942, 0.12545940279960632, 0.09028607606887817, -0.017213623970746994, 0.30128994584083557, 0.4247044622898102, 0.17126646637916565, 0.3508587181568146, 0.474333792924881, 0.5267606973648071, -0.1261989027261734, -0.21092328429222107, 0.11692474782466888, -0.3413843810558319, -0.4390025734901428, -0.03245564550161362, -0.4132472574710846, 0.1679462045431137, 0.10433124005794525, 0.22383281588554382, -0.16898339986801147, -0.013875714503228664, 0.002553023397922516, 0.2727617919445038, 0.23192822933197021, -0.0062523228116333485, -0.03470814973115921, 0.1677316278219223, 0.2354772537946701, -0.3278363049030304, -0.1683434396982193, -0.017744751647114754, 0.24668413400650024, -0.020203396677970886, -0.08809293061494827, 0.06602846086025238, 0.17903846502304077, 0.48365598917007446, -0.07303361594676971, 0.04387972503900528, -0.23364856839179993, -0.08682671189308167, 0.0112861767411232, 0.07300588488578796, 0.14293424785137177, 0.20160508155822754, 0.04160480201244354, 0.05537938326597214, -0.13247564435005188, -0.032635945826768875, -0.20362256467342377, -0.3690440356731415, 0.06732751429080963, 0.0478154756128788, -0.10531284660100937, 0.30129051208496094, 0.18954911828041077, -0.07064664363861084, -0.028474101796746254, -0.45728859305381775, 0.08773922920227051, -0.1803114265203476, 0.009878138080239296, -0.10766516625881195, -0.15344294905662537, -0.19836817681789398, 0.04000264033675194, 0.11686036735773087, -0.27817514538764954, -0.2616518437862396, -0.3224227726459503, -0.11807239800691605, -0.17440913617610931, 0.14054423570632935, -0.020054161548614502, 0.05114235728979111, -0.03128029778599739, 0.12230005115270615, 0.10087120532989502, 0.12934523820877075, -0.2491520196199417, -0.1672079861164093, 0.19397687911987305, -0.05200427025556564, -0.012172069400548935, -0.3335230350494385, -0.24970465898513794, 0.3890588581562042, -0.06997024267911911, -0.014193754643201828, -0.2141367346048355, 0.09421406686306, 0.16698022186756134, 0.13987205922603607, -0.24602219462394714, 0.21763961017131805, -0.3044709861278534, 0.26148006319999695, 0.03844340518116951, -0.21672217547893524, 0.3941025733947754, 0.2282126545906067, -0.12224412709474564, 0.16977044939994812, -0.24780593812465668, 0.1691341996192932, -0.05900334566831589, -0.23506364226341248, 0.0723128616809845, 0.4840388596057892, 0.24679642915725708, 0.6211668848991394, 0.04898199066519737, -0.013337384909391403, -0.00010479241609573364, -0.3113273084163666, -0.13158224523067474, -0.4311894476413727, -0.07551337778568268, 0.20715612173080444, -0.09913642704486847, 0.025744158774614334, 0.48657655715942383, -0.08505569398403168, -0.3330840468406677, 0.2221699059009552, -0.17344248294830322, 0.04907567799091339, -0.19993911683559418, 0.12732847034931183, -0.0947733223438263, 0.05930540710687637, 0.0013976357877254486, 0.40461084246635437, -0.5339138507843018, -0.14910292625427246, 0.23746751248836517, -0.2787156105041504, 0.2525825500488281, -0.25178951025009155, -0.9455530643463135, 0.3512921631336212, -0.8524879217147827, 0.09497635811567307, 0.01654793508350849, 0.22760270535945892, 0.04750743880867958, -0.0270619448274374, 0.11630081385374069, -0.03245183825492859, 0.16581302881240845, -0.053808704018592834, -0.08455531299114227, 0.2370498776435852, -0.5604736804962158, -0.11725729703903198, -0.14565131068229675, -0.078785240650177, 0.19362692534923553, 0.5949993133544922, 0.7412642240524292, -0.09443050622940063, -0.2862768769264221, -0.3504449725151062, -0.04790698364377022, 0.06967751681804657, 0.03928505629301071, -0.013841859996318817, -0.10236944258213043, -0.1808013767004013, 0.010817199945449829, 0.10237520188093185, 0.18226686120033264, 0.13341988623142242, -0.15410926938056946, -0.08755295723676682, 0.15052032470703125, 0.30369699001312256, 0.27780210971832275, 0.24230724573135376, -0.038768261671066284, 0.34377962350845337, 0.3173718750476837, 0.10557398200035095, -0.11109791696071625, -0.15754641592502594, 0.2181520015001297, -0.36953097581863403, 0.09002270549535751, 0.09987189620733261, 0.06710663437843323, 0.16950537264347076, -0.032325420528650284, 0.2138267457485199, -0.2696317732334137, 0.3467106223106384, -0.19183045625686646, 0.3990115225315094, 0.5268696546554565, 0.13443554937839508, -0.5008943676948547, -0.3026985228061676, 0.07103843241930008, 0.5278066396713257, -0.26714885234832764, 0.43690693378448486, -0.4802761673927307, -0.4048759341239929, 0.4786459803581238, 0.2622498571872711, 0.5893489718437195, -0.00019755959510803223, 0.21312566101551056, 0.2467377483844757, 0.28208768367767334, 0.18717972934246063, -0.44224393367767334, -0.1283496916294098, -0.23518304526805878, 0.2189825475215912, 0.04329981654882431, -0.07354763895273209, 0.06810372322797775, 0.23929408192634583, -0.11905810236930847, -0.07074674218893051, 0.1343747079372406, 0.882922351360321, -0.013043368235230446, 0.3027331233024597, 0.4876135587692261, -0.3995562493801117, 0.3429583013057709, 0.13938862085342407, 0.22414198517799377, 0.0627053827047348, 0.0940348356962204, 0.09735546261072159, -0.06829366087913513, -0.1550719439983368, -0.24992884695529938, -0.2025584578514099, -0.5686981081962585, 0.2977931499481201, -0.20471394062042236, 0.03080093115568161, 0.07980066537857056, 0.14483767747879028, 0.04165821149945259, 0.24064290523529053, 0.0066324155777692795, 0.2885671555995941, 0.21322670578956604, 0.33644169569015503, 0.2534503936767578, -0.5096054673194885, -0.19772887229919434, -0.00980672799050808, -0.015243232250213623, 0.1644136905670166, -0.26448115706443787, -0.3185320496559143, -0.642041802406311, -0.04586450755596161, 0.3040485680103302, -0.36560505628585815, 0.019045107066631317, 0.10112300515174866, -0.079265296459198, -0.19805815815925598, 0.08064164966344833, -0.15343168377876282, 0.08537718653678894, 0.40806373953819275, -0.07441210746765137, -0.2806633710861206, 0.018494319170713425, 0.3022502660751343, 0.12154626101255417, -0.21070414781570435, 0.43070188164711, -0.47031137347221375, -0.2629357576370239, -0.10358759015798569, 0.21543627977371216, 0.13631519675254822, 0.11987597495317459, 0.09263504296541214, -0.13185419142246246, -0.18322856724262238, 0.09514603763818741, 0.26415467262268066, -0.12749488651752472, -0.10990751534700394, -0.17242029309272766, -0.018341217190027237, -0.306043803691864, -0.010590247809886932, -0.05993114039301872, 0.09162308275699615, 0.09735330194234848, 0.13492800295352936, -0.3185405433177948, 0.1697496622800827, -0.25776854157447815, -0.12103110551834106, 0.12591196596622467, 0.15388117730617523, -0.20141154527664185, -0.1586650013923645, 0.1208089217543602, 0.04116205498576164, 0.09976769983768463, 0.2575889825820923, 0.035096004605293274, -0.22869470715522766, -0.08349362760782242, 0.14248965680599213, 0.046630315482616425, -0.36045733094215393, 0.06594091653823853, 0.1358204334974289, -0.08454747498035431, -0.5128015279769897, 0.20534510910511017, 0.17162397503852844, 0.013776779174804688, -0.42633458971977234, 0.1967771351337433, -0.004544563591480255, -0.006976518779993057, 0.1540147066116333, -0.040920138359069824, 0.019588693976402283, 0.10938411206007004, 0.21673014760017395, 0.12089195847511292, -0.20395323634147644, 0.04365489259362221, 0.2604888379573822, 0.33503156900405884, 0.1718846559524536, 0.01198059692978859, -0.026033155620098114, -0.0632946640253067, 0.1637771725654602, -0.16997887194156647, 0.2126777619123459, -0.22457046806812286, -0.4430891275405884, 0.20653828978538513, 0.1477208286523819, 0.06795012950897217, -0.2368668168783188, 0.41122525930404663, -0.2698410153388977, 0.17054681479930878, 0.05370637774467468, 0.22349035739898682, 0.25585702061653137, -0.21674422919750214, -0.16781353950500488, 0.45805037021636963, -0.1856306940317154, 0.09275642037391663, 0.11852137744426727, -0.046437788754701614, 0.014366008341312408, 0.3236364424228668, 0.08962982892990112, 0.13182947039604187, 0.4207836389541626, 0.206501305103302, 0.2570439875125885, 0.23929360508918762, 0.37313559651374817, -0.18872371315956116, -0.2324150800704956, -0.057918380945920944, 0.4835403859615326, -0.33757835626602173, 0.1452251672744751, -0.003101758658885956, -0.009072095155715942, 0.015063965693116188, -0.557723879814148, -0.036190055310726166, 0.3808555603027344, -0.37380120158195496, -0.26346394419670105, -0.10397452116012573, 0.000050455331802368164, -0.04441508278250694, 0.35797324776649475, -0.13069286942481995, -0.04405184090137482, -0.32288870215415955, -0.10856428742408752, -0.070136159658432, 0.1116296797990799, -0.25398293137550354, -0.2345300316810608, 0.21848884224891663, -0.21756063401699066, 0.2340625673532486, -0.4240419864654541, 0.13494271039962769, -0.05566536262631416, 0.37406396865844727, 0.37340253591537476, 0.27637237310409546, -0.13791479170322418, 0.060441870242357254, -0.07821515202522278, 0.09102997928857803, 0.03761180862784386, 0.1411617398262024, -0.0731155276298523, -0.3212684094905853, 0.1342654675245285, 0.0041144490242004395, -0.17982761561870575, -0.3566519618034363, 0.032982438802719116, -0.10908152163028717, 0.19662682712078094, 0.22091209888458252, 0.050985127687454224, -0.14805643260478973, 0.11666053533554077, 0.06280158460140228, 0.08144893497228622, -0.16012780368328094, 0.14899785816669464, 0.07930716872215271, 0.1826460361480713, -0.08430469781160355, 0.07061059772968292, 0.037876203656196594, 0.4189380407333374, 0.02741478756070137, -0.11204174906015396, -0.378652960062027, -0.33077019453048706, -0.3441822826862335, -0.08834495395421982, -0.19330374896526337, 0.13737988471984863, -0.002271256409585476, 0.09053803235292435, 0.1760571002960205, 0.19486284255981445, 0.20748423039913177, 0.12348546087741852, -0.2083263397216797, -0.09985029697418213, -0.2851068079471588, 0.48169541358947754, -0.17266547679901123, 0.03965563327074051, 0.006443113088607788, -0.3506651818752289, 0.4216938018798828, 0.016046229749917984, 0.13119348883628845, -0.17603757977485657, 0.05233059078454971, -0.021239500492811203, 0.09319616854190826, 0.6377805471420288, 0.16887125372886658, 0.06171915680170059, -0.03467871621251106, 0.16214929521083832, 0.15414535999298096, 0.18101780116558075, -0.22026044130325317, 0.06765644252300262, -0.015729296952486038, -0.0018746573477983475, 0.058215945959091187, 0.027588628232479095, -0.07953554391860962, -0.11201352626085281, 0.174183651804924, -0.09662441909313202, -0.22798775136470795, -0.09358848631381989, 0.007984936237335205, 0.12249387055635452, -0.2413402944803238, 0.3319843113422394, 0.07341548800468445, 0.20806652307510376, -0.39738744497299194, -0.06145142763853073, 0.4318278431892395, -0.6654883027076721, -0.12014979124069214, -0.26930925250053406, -0.011783331632614136, 0.3286215662956238, 0.17322078347206116, -0.10575181990861893, -0.28178825974464417, 0.529181718826294, 0.027850715443491936, -0.28139546513557434, 0.3174487054347992, -0.06961531937122345, -0.00765402615070343, -0.03373267874121666, 0.3865731358528137, -0.2410539984703064, -0.1833973228931427, -0.07387245446443558, -0.04495921730995178 ]
https://github.com/huggingface/datasets/issues/1830
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
@lhoestq, I just checked that previous run time was actually 3000 chars. I increased it to 6k chars, again, roughly double. SlowTokenizer **7.4 s** to **15.7 s** Tokenizer: **276 ms** to **616 ms** I'll post this issue on Tokenizer, seems it hasn't quite been raised (albeit I noticed a similar issue that might relate). Regards, Michael
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
56
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer? This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function. @lhoestq, I just checked that previous run time was actually 3000 chars. I increased it to 6k chars, again, roughly double. SlowTokenizer **7.4 s** to **15.7 s** Tokenizer: **276 ms** to **616 ms** I'll post this issue on Tokenizer, seems it hasn't quite been raised (albeit I noticed a similar issue that might relate). Regards, Michael
[ -0.40404728055000305, -0.01300717145204544, -0.10247054696083069, 0.1034291684627533, 0.14530566334724426, -0.12255395948886871, 0.2550537884235382, 0.1890888214111328, 0.13067761063575745, -0.006501898169517517, -0.05422341078519821, 0.4988860785961151, -0.1724812239408493, -0.2727595269680023, -0.1320432871580124, 0.06504257768392563, 0.21975907683372498, 0.022416770458221436, 0.24164487421512604, -0.034286655485630035, -0.1218729019165039, 0.10230173915624619, -0.17672543227672577, 0.24139907956123352, -0.31526270508766174, -0.07799291610717773, 0.08123118430376053, -0.20963355898857117, -0.002756858244538307, -0.5689612627029419, -0.20842988789081573, 0.15812477469444275, 0.02094278112053871, 0.533124566078186, -0.00011487364827189595, 0.04034285247325897, -0.02916356921195984, 0.2731476426124573, 0.13471747934818268, 0.04436098039150238, 0.35295429825782776, -0.19428551197052002, -0.16858325898647308, -0.22576633095741272, -0.054171204566955566, -0.2808627784252167, -0.02212238870561123, -0.22417739033699036, 0.06830838322639465, 0.030042309314012527, 0.16085880994796753, 0.11519482731819153, -0.3964320719242096, -0.05951574444770813, -0.0024587735533714294, -0.1042250394821167, -0.09915442764759064, 0.014026454649865627, 0.07132945954799652, -0.2551872134208679, -0.21165668964385986, 0.19490475952625275, -0.21304312348365784, -0.14781400561332703, 0.2687233090400696, 0.21636949479579926, 0.034611500799655914, -0.24252483248710632, 0.1680864691734314, 0.2316349744796753, 0.06701106578111649, -0.02721283584833145, -0.017125165089964867, -0.3350789546966553, -0.3706915080547333, -0.02848217636346817, 0.1461225003004074, -0.4334976077079773, -0.12065143883228302, -0.08960263431072235, -0.41406527161598206, 0.2037731111049652, 0.264242559671402, -0.12239387631416321, -0.20393069088459015, 0.43524378538131714, 0.09542796015739441, 0.14973461627960205, 0.10415232926607132, -0.09975200891494751, -0.28079161047935486, -0.26437780261039734, -0.15957695245742798, 0.3733043372631073, -0.34158673882484436, -0.17395520210266113, 0.26929545402526855, -0.30913490056991577, -0.1407884955406189, 0.1142800971865654, -0.14243142306804657, 0.19466519355773926, 0.2083410620689392, -0.04711989313364029, 0.06630697846412659, 0.24600403010845184, 0.038447748869657516, 0.17384636402130127, 0.029690610244870186, -0.4802928566932678, -0.3160501718521118, -0.09036076813936234, -0.1888754516839981, 0.020213767886161804, 0.3458714187145233, -0.24245864152908325, -0.2370806187391281, -0.07258336246013641, -0.020596789196133614, -0.17130690813064575, -0.37994447350502014, -0.09833713620901108, 0.06586102396249771, 0.18545490503311157, 0.05874723941087723, 0.06103825569152832, -0.36479800939559937, -0.20216697454452515, -0.09283135831356049, -0.07672666013240814, -0.12862785160541534, -0.1720004379749298, -0.10449197143316269, 0.25425758957862854, -0.18827322125434875, 0.09130582213401794, 0.2601751685142517, 0.07899506390094757, -0.11537612974643707, 0.21030840277671814, 0.21960456669330597, -0.36432287096977234, 0.1047283187508583, -0.11305445432662964, 0.07480095326900482, 0.43602678179740906, -0.005507688969373703, 0.0017840713262557983, -0.25952884554862976, 0.20827564597129822, -0.26490849256515503, -0.22648875415325165, 0.2413850575685501, 0.11916032433509827, -0.08314234018325806, -0.1221609115600586, -0.4942292869091034, 0.4385456144809723, 0.2539222538471222, -0.1163535863161087, -0.0749136283993721, -0.18091319501399994, -0.5298192501068115, -0.21674194931983948, 0.267924964427948, -0.018771812319755554, -0.07221245765686035, -0.19377996027469635, 0.34180352091789246, 0.19217228889465332, 0.3103511929512024, 0.64305579662323, -0.38648295402526855, 0.7953370213508606, -0.1250496506690979, 0.7483618855476379, 0.2579936385154724, -0.24770547449588776, -0.37781819701194763, 0.11663870513439178, -0.17846891283988953, 0.27222102880477905, -0.28185170888900757, -0.12006288766860962, 0.70263671875, -0.22527869045734406, 0.34198471903800964, 0.10614454001188278, 0.24699558317661285, 0.3040958046913147, -0.24837328493595123, -0.04919016361236572, 0.5504589676856995, -0.08022263646125793, -0.22425304353237152, -0.15098139643669128, -0.15340656042099, 0.11113331466913223, -0.03155418485403061, -0.12037332355976105, -0.1554092913866043, 0.06173226237297058, 0.01511157676577568, 0.027055785059928894, -0.0637362003326416, 0.21922630071640015, 0.147112637758255, 0.21719422936439514, 0.07411746680736542, 0.068392813205719, 0.42903053760528564, -0.006117053329944611, 0.10551666468381882, -0.06455042958259583, -0.15043263137340546, -0.14192789793014526, 0.17265325784683228, 0.12822045385837555, 0.06789854168891907, 0.08919259905815125, 0.23117227852344513, -0.10698017477989197, 0.015444153919816017, 0.1270228922367096, 0.44377678632736206, -0.3041419982910156, 0.14068661630153656, -0.160288468003273, -0.10612224042415619, -0.19360360503196716, 0.14087358117103577, 0.10873284190893173, -0.18346554040908813, 0.16243290901184082, 0.1247907504439354, 0.30946648120880127, -0.17306947708129883, 0.20741267502307892, 0.11455947160720825, 0.2654835283756256, 0.04486136510968208, 0.1117049902677536, 0.016418371349573135, -0.1618005931377411, -0.10114359110593796, 0.24875250458717346, 0.76655513048172, 0.2934231758117676, -0.0981307402253151, -0.19185051321983337, -0.007449474185705185, 0.20522290468215942, 0.12545940279960632, 0.09028607606887817, -0.017213623970746994, 0.30128994584083557, 0.4247044622898102, 0.17126646637916565, 0.3508587181568146, 0.474333792924881, 0.5267606973648071, -0.1261989027261734, -0.21092328429222107, 0.11692474782466888, -0.3413843810558319, -0.4390025734901428, -0.03245564550161362, -0.4132472574710846, 0.1679462045431137, 0.10433124005794525, 0.22383281588554382, -0.16898339986801147, -0.013875714503228664, 0.002553023397922516, 0.2727617919445038, 0.23192822933197021, -0.0062523228116333485, -0.03470814973115921, 0.1677316278219223, 0.2354772537946701, -0.3278363049030304, -0.1683434396982193, -0.017744751647114754, 0.24668413400650024, -0.020203396677970886, -0.08809293061494827, 0.06602846086025238, 0.17903846502304077, 0.48365598917007446, -0.07303361594676971, 0.04387972503900528, -0.23364856839179993, -0.08682671189308167, 0.0112861767411232, 0.07300588488578796, 0.14293424785137177, 0.20160508155822754, 0.04160480201244354, 0.05537938326597214, -0.13247564435005188, -0.032635945826768875, -0.20362256467342377, -0.3690440356731415, 0.06732751429080963, 0.0478154756128788, -0.10531284660100937, 0.30129051208496094, 0.18954911828041077, -0.07064664363861084, -0.028474101796746254, -0.45728859305381775, 0.08773922920227051, -0.1803114265203476, 0.009878138080239296, -0.10766516625881195, -0.15344294905662537, -0.19836817681789398, 0.04000264033675194, 0.11686036735773087, -0.27817514538764954, -0.2616518437862396, -0.3224227726459503, -0.11807239800691605, -0.17440913617610931, 0.14054423570632935, -0.020054161548614502, 0.05114235728979111, -0.03128029778599739, 0.12230005115270615, 0.10087120532989502, 0.12934523820877075, -0.2491520196199417, -0.1672079861164093, 0.19397687911987305, -0.05200427025556564, -0.012172069400548935, -0.3335230350494385, -0.24970465898513794, 0.3890588581562042, -0.06997024267911911, -0.014193754643201828, -0.2141367346048355, 0.09421406686306, 0.16698022186756134, 0.13987205922603607, -0.24602219462394714, 0.21763961017131805, -0.3044709861278534, 0.26148006319999695, 0.03844340518116951, -0.21672217547893524, 0.3941025733947754, 0.2282126545906067, -0.12224412709474564, 0.16977044939994812, -0.24780593812465668, 0.1691341996192932, -0.05900334566831589, -0.23506364226341248, 0.0723128616809845, 0.4840388596057892, 0.24679642915725708, 0.6211668848991394, 0.04898199066519737, -0.013337384909391403, -0.00010479241609573364, -0.3113273084163666, -0.13158224523067474, -0.4311894476413727, -0.07551337778568268, 0.20715612173080444, -0.09913642704486847, 0.025744158774614334, 0.48657655715942383, -0.08505569398403168, -0.3330840468406677, 0.2221699059009552, -0.17344248294830322, 0.04907567799091339, -0.19993911683559418, 0.12732847034931183, -0.0947733223438263, 0.05930540710687637, 0.0013976357877254486, 0.40461084246635437, -0.5339138507843018, -0.14910292625427246, 0.23746751248836517, -0.2787156105041504, 0.2525825500488281, -0.25178951025009155, -0.9455530643463135, 0.3512921631336212, -0.8524879217147827, 0.09497635811567307, 0.01654793508350849, 0.22760270535945892, 0.04750743880867958, -0.0270619448274374, 0.11630081385374069, -0.03245183825492859, 0.16581302881240845, -0.053808704018592834, -0.08455531299114227, 0.2370498776435852, -0.5604736804962158, -0.11725729703903198, -0.14565131068229675, -0.078785240650177, 0.19362692534923553, 0.5949993133544922, 0.7412642240524292, -0.09443050622940063, -0.2862768769264221, -0.3504449725151062, -0.04790698364377022, 0.06967751681804657, 0.03928505629301071, -0.013841859996318817, -0.10236944258213043, -0.1808013767004013, 0.010817199945449829, 0.10237520188093185, 0.18226686120033264, 0.13341988623142242, -0.15410926938056946, -0.08755295723676682, 0.15052032470703125, 0.30369699001312256, 0.27780210971832275, 0.24230724573135376, -0.038768261671066284, 0.34377962350845337, 0.3173718750476837, 0.10557398200035095, -0.11109791696071625, -0.15754641592502594, 0.2181520015001297, -0.36953097581863403, 0.09002270549535751, 0.09987189620733261, 0.06710663437843323, 0.16950537264347076, -0.032325420528650284, 0.2138267457485199, -0.2696317732334137, 0.3467106223106384, -0.19183045625686646, 0.3990115225315094, 0.5268696546554565, 0.13443554937839508, -0.5008943676948547, -0.3026985228061676, 0.07103843241930008, 0.5278066396713257, -0.26714885234832764, 0.43690693378448486, -0.4802761673927307, -0.4048759341239929, 0.4786459803581238, 0.2622498571872711, 0.5893489718437195, -0.00019755959510803223, 0.21312566101551056, 0.2467377483844757, 0.28208768367767334, 0.18717972934246063, -0.44224393367767334, -0.1283496916294098, -0.23518304526805878, 0.2189825475215912, 0.04329981654882431, -0.07354763895273209, 0.06810372322797775, 0.23929408192634583, -0.11905810236930847, -0.07074674218893051, 0.1343747079372406, 0.882922351360321, -0.013043368235230446, 0.3027331233024597, 0.4876135587692261, -0.3995562493801117, 0.3429583013057709, 0.13938862085342407, 0.22414198517799377, 0.0627053827047348, 0.0940348356962204, 0.09735546261072159, -0.06829366087913513, -0.1550719439983368, -0.24992884695529938, -0.2025584578514099, -0.5686981081962585, 0.2977931499481201, -0.20471394062042236, 0.03080093115568161, 0.07980066537857056, 0.14483767747879028, 0.04165821149945259, 0.24064290523529053, 0.0066324155777692795, 0.2885671555995941, 0.21322670578956604, 0.33644169569015503, 0.2534503936767578, -0.5096054673194885, -0.19772887229919434, -0.00980672799050808, -0.015243232250213623, 0.1644136905670166, -0.26448115706443787, -0.3185320496559143, -0.642041802406311, -0.04586450755596161, 0.3040485680103302, -0.36560505628585815, 0.019045107066631317, 0.10112300515174866, -0.079265296459198, -0.19805815815925598, 0.08064164966344833, -0.15343168377876282, 0.08537718653678894, 0.40806373953819275, -0.07441210746765137, -0.2806633710861206, 0.018494319170713425, 0.3022502660751343, 0.12154626101255417, -0.21070414781570435, 0.43070188164711, -0.47031137347221375, -0.2629357576370239, -0.10358759015798569, 0.21543627977371216, 0.13631519675254822, 0.11987597495317459, 0.09263504296541214, -0.13185419142246246, -0.18322856724262238, 0.09514603763818741, 0.26415467262268066, -0.12749488651752472, -0.10990751534700394, -0.17242029309272766, -0.018341217190027237, -0.306043803691864, -0.010590247809886932, -0.05993114039301872, 0.09162308275699615, 0.09735330194234848, 0.13492800295352936, -0.3185405433177948, 0.1697496622800827, -0.25776854157447815, -0.12103110551834106, 0.12591196596622467, 0.15388117730617523, -0.20141154527664185, -0.1586650013923645, 0.1208089217543602, 0.04116205498576164, 0.09976769983768463, 0.2575889825820923, 0.035096004605293274, -0.22869470715522766, -0.08349362760782242, 0.14248965680599213, 0.046630315482616425, -0.36045733094215393, 0.06594091653823853, 0.1358204334974289, -0.08454747498035431, -0.5128015279769897, 0.20534510910511017, 0.17162397503852844, 0.013776779174804688, -0.42633458971977234, 0.1967771351337433, -0.004544563591480255, -0.006976518779993057, 0.1540147066116333, -0.040920138359069824, 0.019588693976402283, 0.10938411206007004, 0.21673014760017395, 0.12089195847511292, -0.20395323634147644, 0.04365489259362221, 0.2604888379573822, 0.33503156900405884, 0.1718846559524536, 0.01198059692978859, -0.026033155620098114, -0.0632946640253067, 0.1637771725654602, -0.16997887194156647, 0.2126777619123459, -0.22457046806812286, -0.4430891275405884, 0.20653828978538513, 0.1477208286523819, 0.06795012950897217, -0.2368668168783188, 0.41122525930404663, -0.2698410153388977, 0.17054681479930878, 0.05370637774467468, 0.22349035739898682, 0.25585702061653137, -0.21674422919750214, -0.16781353950500488, 0.45805037021636963, -0.1856306940317154, 0.09275642037391663, 0.11852137744426727, -0.046437788754701614, 0.014366008341312408, 0.3236364424228668, 0.08962982892990112, 0.13182947039604187, 0.4207836389541626, 0.206501305103302, 0.2570439875125885, 0.23929360508918762, 0.37313559651374817, -0.18872371315956116, -0.2324150800704956, -0.057918380945920944, 0.4835403859615326, -0.33757835626602173, 0.1452251672744751, -0.003101758658885956, -0.009072095155715942, 0.015063965693116188, -0.557723879814148, -0.036190055310726166, 0.3808555603027344, -0.37380120158195496, -0.26346394419670105, -0.10397452116012573, 0.000050455331802368164, -0.04441508278250694, 0.35797324776649475, -0.13069286942481995, -0.04405184090137482, -0.32288870215415955, -0.10856428742408752, -0.070136159658432, 0.1116296797990799, -0.25398293137550354, -0.2345300316810608, 0.21848884224891663, -0.21756063401699066, 0.2340625673532486, -0.4240419864654541, 0.13494271039962769, -0.05566536262631416, 0.37406396865844727, 0.37340253591537476, 0.27637237310409546, -0.13791479170322418, 0.060441870242357254, -0.07821515202522278, 0.09102997928857803, 0.03761180862784386, 0.1411617398262024, -0.0731155276298523, -0.3212684094905853, 0.1342654675245285, 0.0041144490242004395, -0.17982761561870575, -0.3566519618034363, 0.032982438802719116, -0.10908152163028717, 0.19662682712078094, 0.22091209888458252, 0.050985127687454224, -0.14805643260478973, 0.11666053533554077, 0.06280158460140228, 0.08144893497228622, -0.16012780368328094, 0.14899785816669464, 0.07930716872215271, 0.1826460361480713, -0.08430469781160355, 0.07061059772968292, 0.037876203656196594, 0.4189380407333374, 0.02741478756070137, -0.11204174906015396, -0.378652960062027, -0.33077019453048706, -0.3441822826862335, -0.08834495395421982, -0.19330374896526337, 0.13737988471984863, -0.002271256409585476, 0.09053803235292435, 0.1760571002960205, 0.19486284255981445, 0.20748423039913177, 0.12348546087741852, -0.2083263397216797, -0.09985029697418213, -0.2851068079471588, 0.48169541358947754, -0.17266547679901123, 0.03965563327074051, 0.006443113088607788, -0.3506651818752289, 0.4216938018798828, 0.016046229749917984, 0.13119348883628845, -0.17603757977485657, 0.05233059078454971, -0.021239500492811203, 0.09319616854190826, 0.6377805471420288, 0.16887125372886658, 0.06171915680170059, -0.03467871621251106, 0.16214929521083832, 0.15414535999298096, 0.18101780116558075, -0.22026044130325317, 0.06765644252300262, -0.015729296952486038, -0.0018746573477983475, 0.058215945959091187, 0.027588628232479095, -0.07953554391860962, -0.11201352626085281, 0.174183651804924, -0.09662441909313202, -0.22798775136470795, -0.09358848631381989, 0.007984936237335205, 0.12249387055635452, -0.2413402944803238, 0.3319843113422394, 0.07341548800468445, 0.20806652307510376, -0.39738744497299194, -0.06145142763853073, 0.4318278431892395, -0.6654883027076721, -0.12014979124069214, -0.26930925250053406, -0.011783331632614136, 0.3286215662956238, 0.17322078347206116, -0.10575181990861893, -0.28178825974464417, 0.529181718826294, 0.027850715443491936, -0.28139546513557434, 0.3174487054347992, -0.06961531937122345, -0.00765402615070343, -0.03373267874121666, 0.3865731358528137, -0.2410539984703064, -0.1833973228931427, -0.07387245446443558, -0.04495921730995178 ]
https://github.com/huggingface/datasets/issues/1830
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
Hi, I'm following up here as I found my exact issue. It was with saving and re-loading the tokenizer. When I trained then processed the data without saving and reloading it, it was 10x-100x faster than when I saved and re-loaded it. Both resulted in the exact same tokenized datasets as well. There is additionally a bug where the older legacy tokenizer save does not preserve a learned tokenizing behavior if trained from scratch. Understand its not exactly Datasets related but hope it can help someone if they have the same issue. Thanks!
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
93
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer? This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower: ```` def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"): words_unique = set(text.split(" ")) for i in words_unique: original_tokenizer.add_tokens(i) original_tokenizer.save_pretrained(path) tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad")) train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]}) ```` I then applied the dataset map function on a fairly small set of text: ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds **100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s** In comparison using (even after adding additional tokens): ` tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")` ``` %%time train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True) ``` The time is **100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms** It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function. I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function. Hi, I'm following up here as I found my exact issue. It was with saving and re-loading the tokenizer. When I trained then processed the data without saving and reloading it, it was 10x-100x faster than when I saved and re-loaded it. Both resulted in the exact same tokenized datasets as well. There is additionally a bug where the older legacy tokenizer save does not preserve a learned tokenizing behavior if trained from scratch. Understand its not exactly Datasets related but hope it can help someone if they have the same issue. Thanks!
[ -0.40404728055000305, -0.01300717145204544, -0.10247054696083069, 0.1034291684627533, 0.14530566334724426, -0.12255395948886871, 0.2550537884235382, 0.1890888214111328, 0.13067761063575745, -0.006501898169517517, -0.05422341078519821, 0.4988860785961151, -0.1724812239408493, -0.2727595269680023, -0.1320432871580124, 0.06504257768392563, 0.21975907683372498, 0.022416770458221436, 0.24164487421512604, -0.034286655485630035, -0.1218729019165039, 0.10230173915624619, -0.17672543227672577, 0.24139907956123352, -0.31526270508766174, -0.07799291610717773, 0.08123118430376053, -0.20963355898857117, -0.002756858244538307, -0.5689612627029419, -0.20842988789081573, 0.15812477469444275, 0.02094278112053871, 0.533124566078186, -0.00011487364827189595, 0.04034285247325897, -0.02916356921195984, 0.2731476426124573, 0.13471747934818268, 0.04436098039150238, 0.35295429825782776, -0.19428551197052002, -0.16858325898647308, -0.22576633095741272, -0.054171204566955566, -0.2808627784252167, -0.02212238870561123, -0.22417739033699036, 0.06830838322639465, 0.030042309314012527, 0.16085880994796753, 0.11519482731819153, -0.3964320719242096, -0.05951574444770813, -0.0024587735533714294, -0.1042250394821167, -0.09915442764759064, 0.014026454649865627, 0.07132945954799652, -0.2551872134208679, -0.21165668964385986, 0.19490475952625275, -0.21304312348365784, -0.14781400561332703, 0.2687233090400696, 0.21636949479579926, 0.034611500799655914, -0.24252483248710632, 0.1680864691734314, 0.2316349744796753, 0.06701106578111649, -0.02721283584833145, -0.017125165089964867, -0.3350789546966553, -0.3706915080547333, -0.02848217636346817, 0.1461225003004074, -0.4334976077079773, -0.12065143883228302, -0.08960263431072235, -0.41406527161598206, 0.2037731111049652, 0.264242559671402, -0.12239387631416321, -0.20393069088459015, 0.43524378538131714, 0.09542796015739441, 0.14973461627960205, 0.10415232926607132, -0.09975200891494751, -0.28079161047935486, -0.26437780261039734, -0.15957695245742798, 0.3733043372631073, -0.34158673882484436, -0.17395520210266113, 0.26929545402526855, -0.30913490056991577, -0.1407884955406189, 0.1142800971865654, -0.14243142306804657, 0.19466519355773926, 0.2083410620689392, -0.04711989313364029, 0.06630697846412659, 0.24600403010845184, 0.038447748869657516, 0.17384636402130127, 0.029690610244870186, -0.4802928566932678, -0.3160501718521118, -0.09036076813936234, -0.1888754516839981, 0.020213767886161804, 0.3458714187145233, -0.24245864152908325, -0.2370806187391281, -0.07258336246013641, -0.020596789196133614, -0.17130690813064575, -0.37994447350502014, -0.09833713620901108, 0.06586102396249771, 0.18545490503311157, 0.05874723941087723, 0.06103825569152832, -0.36479800939559937, -0.20216697454452515, -0.09283135831356049, -0.07672666013240814, -0.12862785160541534, -0.1720004379749298, -0.10449197143316269, 0.25425758957862854, -0.18827322125434875, 0.09130582213401794, 0.2601751685142517, 0.07899506390094757, -0.11537612974643707, 0.21030840277671814, 0.21960456669330597, -0.36432287096977234, 0.1047283187508583, -0.11305445432662964, 0.07480095326900482, 0.43602678179740906, -0.005507688969373703, 0.0017840713262557983, -0.25952884554862976, 0.20827564597129822, -0.26490849256515503, -0.22648875415325165, 0.2413850575685501, 0.11916032433509827, -0.08314234018325806, -0.1221609115600586, -0.4942292869091034, 0.4385456144809723, 0.2539222538471222, -0.1163535863161087, -0.0749136283993721, -0.18091319501399994, -0.5298192501068115, -0.21674194931983948, 0.267924964427948, -0.018771812319755554, -0.07221245765686035, -0.19377996027469635, 0.34180352091789246, 0.19217228889465332, 0.3103511929512024, 0.64305579662323, -0.38648295402526855, 0.7953370213508606, -0.1250496506690979, 0.7483618855476379, 0.2579936385154724, -0.24770547449588776, -0.37781819701194763, 0.11663870513439178, -0.17846891283988953, 0.27222102880477905, -0.28185170888900757, -0.12006288766860962, 0.70263671875, -0.22527869045734406, 0.34198471903800964, 0.10614454001188278, 0.24699558317661285, 0.3040958046913147, -0.24837328493595123, -0.04919016361236572, 0.5504589676856995, -0.08022263646125793, -0.22425304353237152, -0.15098139643669128, -0.15340656042099, 0.11113331466913223, -0.03155418485403061, -0.12037332355976105, -0.1554092913866043, 0.06173226237297058, 0.01511157676577568, 0.027055785059928894, -0.0637362003326416, 0.21922630071640015, 0.147112637758255, 0.21719422936439514, 0.07411746680736542, 0.068392813205719, 0.42903053760528564, -0.006117053329944611, 0.10551666468381882, -0.06455042958259583, -0.15043263137340546, -0.14192789793014526, 0.17265325784683228, 0.12822045385837555, 0.06789854168891907, 0.08919259905815125, 0.23117227852344513, -0.10698017477989197, 0.015444153919816017, 0.1270228922367096, 0.44377678632736206, -0.3041419982910156, 0.14068661630153656, -0.160288468003273, -0.10612224042415619, -0.19360360503196716, 0.14087358117103577, 0.10873284190893173, -0.18346554040908813, 0.16243290901184082, 0.1247907504439354, 0.30946648120880127, -0.17306947708129883, 0.20741267502307892, 0.11455947160720825, 0.2654835283756256, 0.04486136510968208, 0.1117049902677536, 0.016418371349573135, -0.1618005931377411, -0.10114359110593796, 0.24875250458717346, 0.76655513048172, 0.2934231758117676, -0.0981307402253151, -0.19185051321983337, -0.007449474185705185, 0.20522290468215942, 0.12545940279960632, 0.09028607606887817, -0.017213623970746994, 0.30128994584083557, 0.4247044622898102, 0.17126646637916565, 0.3508587181568146, 0.474333792924881, 0.5267606973648071, -0.1261989027261734, -0.21092328429222107, 0.11692474782466888, -0.3413843810558319, -0.4390025734901428, -0.03245564550161362, -0.4132472574710846, 0.1679462045431137, 0.10433124005794525, 0.22383281588554382, -0.16898339986801147, -0.013875714503228664, 0.002553023397922516, 0.2727617919445038, 0.23192822933197021, -0.0062523228116333485, -0.03470814973115921, 0.1677316278219223, 0.2354772537946701, -0.3278363049030304, -0.1683434396982193, -0.017744751647114754, 0.24668413400650024, -0.020203396677970886, -0.08809293061494827, 0.06602846086025238, 0.17903846502304077, 0.48365598917007446, -0.07303361594676971, 0.04387972503900528, -0.23364856839179993, -0.08682671189308167, 0.0112861767411232, 0.07300588488578796, 0.14293424785137177, 0.20160508155822754, 0.04160480201244354, 0.05537938326597214, -0.13247564435005188, -0.032635945826768875, -0.20362256467342377, -0.3690440356731415, 0.06732751429080963, 0.0478154756128788, -0.10531284660100937, 0.30129051208496094, 0.18954911828041077, -0.07064664363861084, -0.028474101796746254, -0.45728859305381775, 0.08773922920227051, -0.1803114265203476, 0.009878138080239296, -0.10766516625881195, -0.15344294905662537, -0.19836817681789398, 0.04000264033675194, 0.11686036735773087, -0.27817514538764954, -0.2616518437862396, -0.3224227726459503, -0.11807239800691605, -0.17440913617610931, 0.14054423570632935, -0.020054161548614502, 0.05114235728979111, -0.03128029778599739, 0.12230005115270615, 0.10087120532989502, 0.12934523820877075, -0.2491520196199417, -0.1672079861164093, 0.19397687911987305, -0.05200427025556564, -0.012172069400548935, -0.3335230350494385, -0.24970465898513794, 0.3890588581562042, -0.06997024267911911, -0.014193754643201828, -0.2141367346048355, 0.09421406686306, 0.16698022186756134, 0.13987205922603607, -0.24602219462394714, 0.21763961017131805, -0.3044709861278534, 0.26148006319999695, 0.03844340518116951, -0.21672217547893524, 0.3941025733947754, 0.2282126545906067, -0.12224412709474564, 0.16977044939994812, -0.24780593812465668, 0.1691341996192932, -0.05900334566831589, -0.23506364226341248, 0.0723128616809845, 0.4840388596057892, 0.24679642915725708, 0.6211668848991394, 0.04898199066519737, -0.013337384909391403, -0.00010479241609573364, -0.3113273084163666, -0.13158224523067474, -0.4311894476413727, -0.07551337778568268, 0.20715612173080444, -0.09913642704486847, 0.025744158774614334, 0.48657655715942383, -0.08505569398403168, -0.3330840468406677, 0.2221699059009552, -0.17344248294830322, 0.04907567799091339, -0.19993911683559418, 0.12732847034931183, -0.0947733223438263, 0.05930540710687637, 0.0013976357877254486, 0.40461084246635437, -0.5339138507843018, -0.14910292625427246, 0.23746751248836517, -0.2787156105041504, 0.2525825500488281, -0.25178951025009155, -0.9455530643463135, 0.3512921631336212, -0.8524879217147827, 0.09497635811567307, 0.01654793508350849, 0.22760270535945892, 0.04750743880867958, -0.0270619448274374, 0.11630081385374069, -0.03245183825492859, 0.16581302881240845, -0.053808704018592834, -0.08455531299114227, 0.2370498776435852, -0.5604736804962158, -0.11725729703903198, -0.14565131068229675, -0.078785240650177, 0.19362692534923553, 0.5949993133544922, 0.7412642240524292, -0.09443050622940063, -0.2862768769264221, -0.3504449725151062, -0.04790698364377022, 0.06967751681804657, 0.03928505629301071, -0.013841859996318817, -0.10236944258213043, -0.1808013767004013, 0.010817199945449829, 0.10237520188093185, 0.18226686120033264, 0.13341988623142242, -0.15410926938056946, -0.08755295723676682, 0.15052032470703125, 0.30369699001312256, 0.27780210971832275, 0.24230724573135376, -0.038768261671066284, 0.34377962350845337, 0.3173718750476837, 0.10557398200035095, -0.11109791696071625, -0.15754641592502594, 0.2181520015001297, -0.36953097581863403, 0.09002270549535751, 0.09987189620733261, 0.06710663437843323, 0.16950537264347076, -0.032325420528650284, 0.2138267457485199, -0.2696317732334137, 0.3467106223106384, -0.19183045625686646, 0.3990115225315094, 0.5268696546554565, 0.13443554937839508, -0.5008943676948547, -0.3026985228061676, 0.07103843241930008, 0.5278066396713257, -0.26714885234832764, 0.43690693378448486, -0.4802761673927307, -0.4048759341239929, 0.4786459803581238, 0.2622498571872711, 0.5893489718437195, -0.00019755959510803223, 0.21312566101551056, 0.2467377483844757, 0.28208768367767334, 0.18717972934246063, -0.44224393367767334, -0.1283496916294098, -0.23518304526805878, 0.2189825475215912, 0.04329981654882431, -0.07354763895273209, 0.06810372322797775, 0.23929408192634583, -0.11905810236930847, -0.07074674218893051, 0.1343747079372406, 0.882922351360321, -0.013043368235230446, 0.3027331233024597, 0.4876135587692261, -0.3995562493801117, 0.3429583013057709, 0.13938862085342407, 0.22414198517799377, 0.0627053827047348, 0.0940348356962204, 0.09735546261072159, -0.06829366087913513, -0.1550719439983368, -0.24992884695529938, -0.2025584578514099, -0.5686981081962585, 0.2977931499481201, -0.20471394062042236, 0.03080093115568161, 0.07980066537857056, 0.14483767747879028, 0.04165821149945259, 0.24064290523529053, 0.0066324155777692795, 0.2885671555995941, 0.21322670578956604, 0.33644169569015503, 0.2534503936767578, -0.5096054673194885, -0.19772887229919434, -0.00980672799050808, -0.015243232250213623, 0.1644136905670166, -0.26448115706443787, -0.3185320496559143, -0.642041802406311, -0.04586450755596161, 0.3040485680103302, -0.36560505628585815, 0.019045107066631317, 0.10112300515174866, -0.079265296459198, -0.19805815815925598, 0.08064164966344833, -0.15343168377876282, 0.08537718653678894, 0.40806373953819275, -0.07441210746765137, -0.2806633710861206, 0.018494319170713425, 0.3022502660751343, 0.12154626101255417, -0.21070414781570435, 0.43070188164711, -0.47031137347221375, -0.2629357576370239, -0.10358759015798569, 0.21543627977371216, 0.13631519675254822, 0.11987597495317459, 0.09263504296541214, -0.13185419142246246, -0.18322856724262238, 0.09514603763818741, 0.26415467262268066, -0.12749488651752472, -0.10990751534700394, -0.17242029309272766, -0.018341217190027237, -0.306043803691864, -0.010590247809886932, -0.05993114039301872, 0.09162308275699615, 0.09735330194234848, 0.13492800295352936, -0.3185405433177948, 0.1697496622800827, -0.25776854157447815, -0.12103110551834106, 0.12591196596622467, 0.15388117730617523, -0.20141154527664185, -0.1586650013923645, 0.1208089217543602, 0.04116205498576164, 0.09976769983768463, 0.2575889825820923, 0.035096004605293274, -0.22869470715522766, -0.08349362760782242, 0.14248965680599213, 0.046630315482616425, -0.36045733094215393, 0.06594091653823853, 0.1358204334974289, -0.08454747498035431, -0.5128015279769897, 0.20534510910511017, 0.17162397503852844, 0.013776779174804688, -0.42633458971977234, 0.1967771351337433, -0.004544563591480255, -0.006976518779993057, 0.1540147066116333, -0.040920138359069824, 0.019588693976402283, 0.10938411206007004, 0.21673014760017395, 0.12089195847511292, -0.20395323634147644, 0.04365489259362221, 0.2604888379573822, 0.33503156900405884, 0.1718846559524536, 0.01198059692978859, -0.026033155620098114, -0.0632946640253067, 0.1637771725654602, -0.16997887194156647, 0.2126777619123459, -0.22457046806812286, -0.4430891275405884, 0.20653828978538513, 0.1477208286523819, 0.06795012950897217, -0.2368668168783188, 0.41122525930404663, -0.2698410153388977, 0.17054681479930878, 0.05370637774467468, 0.22349035739898682, 0.25585702061653137, -0.21674422919750214, -0.16781353950500488, 0.45805037021636963, -0.1856306940317154, 0.09275642037391663, 0.11852137744426727, -0.046437788754701614, 0.014366008341312408, 0.3236364424228668, 0.08962982892990112, 0.13182947039604187, 0.4207836389541626, 0.206501305103302, 0.2570439875125885, 0.23929360508918762, 0.37313559651374817, -0.18872371315956116, -0.2324150800704956, -0.057918380945920944, 0.4835403859615326, -0.33757835626602173, 0.1452251672744751, -0.003101758658885956, -0.009072095155715942, 0.015063965693116188, -0.557723879814148, -0.036190055310726166, 0.3808555603027344, -0.37380120158195496, -0.26346394419670105, -0.10397452116012573, 0.000050455331802368164, -0.04441508278250694, 0.35797324776649475, -0.13069286942481995, -0.04405184090137482, -0.32288870215415955, -0.10856428742408752, -0.070136159658432, 0.1116296797990799, -0.25398293137550354, -0.2345300316810608, 0.21848884224891663, -0.21756063401699066, 0.2340625673532486, -0.4240419864654541, 0.13494271039962769, -0.05566536262631416, 0.37406396865844727, 0.37340253591537476, 0.27637237310409546, -0.13791479170322418, 0.060441870242357254, -0.07821515202522278, 0.09102997928857803, 0.03761180862784386, 0.1411617398262024, -0.0731155276298523, -0.3212684094905853, 0.1342654675245285, 0.0041144490242004395, -0.17982761561870575, -0.3566519618034363, 0.032982438802719116, -0.10908152163028717, 0.19662682712078094, 0.22091209888458252, 0.050985127687454224, -0.14805643260478973, 0.11666053533554077, 0.06280158460140228, 0.08144893497228622, -0.16012780368328094, 0.14899785816669464, 0.07930716872215271, 0.1826460361480713, -0.08430469781160355, 0.07061059772968292, 0.037876203656196594, 0.4189380407333374, 0.02741478756070137, -0.11204174906015396, -0.378652960062027, -0.33077019453048706, -0.3441822826862335, -0.08834495395421982, -0.19330374896526337, 0.13737988471984863, -0.002271256409585476, 0.09053803235292435, 0.1760571002960205, 0.19486284255981445, 0.20748423039913177, 0.12348546087741852, -0.2083263397216797, -0.09985029697418213, -0.2851068079471588, 0.48169541358947754, -0.17266547679901123, 0.03965563327074051, 0.006443113088607788, -0.3506651818752289, 0.4216938018798828, 0.016046229749917984, 0.13119348883628845, -0.17603757977485657, 0.05233059078454971, -0.021239500492811203, 0.09319616854190826, 0.6377805471420288, 0.16887125372886658, 0.06171915680170059, -0.03467871621251106, 0.16214929521083832, 0.15414535999298096, 0.18101780116558075, -0.22026044130325317, 0.06765644252300262, -0.015729296952486038, -0.0018746573477983475, 0.058215945959091187, 0.027588628232479095, -0.07953554391860962, -0.11201352626085281, 0.174183651804924, -0.09662441909313202, -0.22798775136470795, -0.09358848631381989, 0.007984936237335205, 0.12249387055635452, -0.2413402944803238, 0.3319843113422394, 0.07341548800468445, 0.20806652307510376, -0.39738744497299194, -0.06145142763853073, 0.4318278431892395, -0.6654883027076721, -0.12014979124069214, -0.26930925250053406, -0.011783331632614136, 0.3286215662956238, 0.17322078347206116, -0.10575181990861893, -0.28178825974464417, 0.529181718826294, 0.027850715443491936, -0.28139546513557434, 0.3174487054347992, -0.06961531937122345, -0.00765402615070343, -0.03373267874121666, 0.3865731358528137, -0.2410539984703064, -0.1833973228931427, -0.07387245446443558, -0.04495921730995178 ]
https://github.com/huggingface/datasets/issues/1827
Regarding On-the-fly Data Loading
Hi @acul3 Issue #1776 talks about doing on-the-fly data pre-processing, which I think is solved in the next release as mentioned in the issue #1825. I also look forward to using this feature, though :) I wanted to ask about on-the-fly data loading from the cache (before pre-processing).
Hi, I was wondering if it is possible to load images/texts as a batch during the training process, without loading the entire dataset on the RAM at any given point. Thanks, Gunjan
48
Regarding On-the-fly Data Loading Hi, I was wondering if it is possible to load images/texts as a batch during the training process, without loading the entire dataset on the RAM at any given point. Thanks, Gunjan Hi @acul3 Issue #1776 talks about doing on-the-fly data pre-processing, which I think is solved in the next release as mentioned in the issue #1825. I also look forward to using this feature, though :) I wanted to ask about on-the-fly data loading from the cache (before pre-processing).
[ -0.17268456518650055, -0.28359854221343994, -0.1183970719575882, 0.21907863020896912, 0.332197368144989, 0.09173033386468887, 0.570720374584198, 0.1317177265882492, 0.12047600746154785, 0.0670044869184494, 0.07138823717832565, -0.08571431040763855, -0.09656039625406265, 0.21161910891532898, 0.27250972390174866, 0.230967715382576, 0.0025832578539848328, 0.06899991631507874, 0.059121787548065186, -0.02845664508640766, -0.040243349969387054, -0.07282187044620514, -0.012369833886623383, -0.3621984124183655, -0.42743468284606934, -0.09350594133138657, -0.1793471723794937, 0.057144895195961, -0.15365582704544067, -0.28904029726982117, 0.18861527740955353, 0.25400310754776, 0.27082523703575134, 0.11724090576171875, -0.00012036383122904226, -0.01245032623410225, 0.3828079104423523, -0.14356490969657898, -0.32064998149871826, 0.12207009643316269, -0.09934429824352264, 0.11576889455318451, 0.1064213290810585, -0.17253562808036804, -0.07603541761636734, 0.4242568016052246, 0.12474749237298965, -0.3189670741558075, 0.4757882356643677, -0.08197073638439178, 0.04561198502779007, -0.06935051083564758, -0.3194621205329895, 0.030737584456801414, 0.21068817377090454, 0.15202301740646362, -0.04288911074399948, -0.04137922078371048, 0.36629077792167664, -0.11797482520341873, -0.10223158448934555, 0.3062209188938141, -0.0025012921541929245, 0.004144391044974327, 0.2204100787639618, -0.015438868664205074, 0.060090016573667526, -0.4758678376674652, -0.023906812071800232, 0.15862902998924255, 0.5854740142822266, 0.06450103968381882, -0.31788572669029236, -0.3903414309024811, 0.019841842353343964, -0.3572826087474823, 0.08624999970197678, 0.3821425437927246, -0.32880473136901855, 0.09323161095380783, -0.5378331542015076, -0.40872204303741455, -0.2208573967218399, -0.11402426660060883, -0.09020227938890457, -0.2912576198577881, 0.06889913976192474, -0.07242835313081741, 0.08587723970413208, 0.20787331461906433, 0.6285197138786316, -0.11197718977928162, -0.11090551316738129, 0.49374744296073914, -0.27213922142982483, -0.2085573524236679, -0.4864161014556885, -0.19672363996505737, -0.0057812705636024475, -0.18262790143489838, 0.2753620743751526, 0.17976459860801697, -0.19198650121688843, 0.062158696353435516, 0.35620710253715515, 0.027306847274303436, 0.1653119921684265, -0.031149279326200485, 0.00646788626909256, -0.29586416482925415, -0.2373790591955185, -0.06342028081417084, -0.40458545088768005, 0.13686053454875946, -0.11525295674800873, -0.2681529223918915, -0.4467127323150635, -0.250643789768219, 0.2545190453529358, -0.2527227997779846, 0.1836281418800354, -0.04034826532006264, -0.23139773309230804, 0.312717467546463, -0.02880052477121353, 0.008306646719574928, 0.2975398898124695, -0.1674124300479889, -0.07752898335456848, -0.2540166676044464, -0.04786066338419914, -0.01818177103996277, -0.2493310123682022, 0.13302011787891388, 0.2042917013168335, 0.05891968682408333, 0.11790347844362259, -0.13133324682712555, 0.004141330718994141, 0.02703988552093506, -0.0003009233623743057, -0.31792646646499634, 0.3636935353279114, 0.2754962146282196, -0.015098640695214272, -0.29168900847435, 0.031247735023498535, 0.33353835344314575, -0.020160146057605743, 0.5988045930862427, -0.2974318265914917, -0.08271971344947815, 0.3635726869106293, 0.01181799080222845, -0.02962341159582138, -0.23988541960716248, -0.26265332102775574, 0.4184545874595642, 0.24895668029785156, 0.08594393730163574, 0.2036079615354538, 0.07725583016872406, -0.28514695167541504, -0.0212873425334692, 0.11057534068822861, 0.35016098618507385, -0.4026869833469391, -0.30870485305786133, 0.2794795632362366, 0.022267024964094162, -0.12208356708288193, -0.009187404066324234, -0.24881698191165924, 0.3373204171657562, 0.011671986430883408, 0.037483252584934235, 0.11233216524124146, -0.292156457901001, -0.023615138605237007, 0.435523122549057, 0.049038536846637726, -0.031964462250471115, -0.009076148271560669, 0.4269595444202423, 0.10203239321708679, 0.17151953279972076, 0.2959528863430023, 0.7635233998298645, 0.053849149495363235, 0.07486153393983841, -0.1958499699831009, -0.3414077162742615, -0.2395242601633072, 0.3621116578578949, 0.24150390923023224, 0.2589145004749298, 0.25173333287239075, 0.027311738580465317, 0.08375127613544464, -0.22633978724479675, -0.01701362617313862, 0.13052165508270264, -0.03172538802027702, 0.16698279976844788, -0.04165825620293617, 0.28199365735054016, -0.46860647201538086, 0.2828410267829895, -0.18402723968029022, -0.04597251117229462, 0.10989680886268616, -0.009528230875730515, 0.38886094093322754, -0.20769362151622772, 0.09937553107738495, 0.1737116426229477, -0.09558629989624023, -0.21280953288078308, -0.09971588850021362, -0.00996796041727066, -0.4909346401691437, 0.8521468043327332, -0.4758828282356262, 0.21149517595767975, -0.10445350408554077, 0.10741659998893738, 0.4491937756538391, -0.10812081396579742, -0.19637927412986755, -0.17193439602851868, -0.29919207096099854, 0.018171843141317368, 0.006165497004985809, 0.4675188958644867, 0.13238659501075745, 0.2539476752281189, -0.09844733029603958, 0.10485780984163284, 0.2965150475502014, 0.07313752174377441, 0.2004057914018631, -0.38389691710472107, 0.04076945036649704, -0.19573432207107544, -0.40626436471939087, 0.6067577004432678, 0.060874093323946, 0.19549071788787842, 0.2967917323112488, -0.230545774102211, -0.012099295854568481, -0.16540749371051788, -0.0860125720500946, 0.11904346942901611, 0.007978621870279312, 0.10607823729515076, 0.5033363699913025, -0.031371548771858215, -0.18199333548545837, -0.22418764233589172, -0.03934268280863762, -0.022538283839821815, -0.1010950431227684, 0.15623900294303894, -0.033374205231666565, -0.09684412181377411, 0.04030942544341087, -0.03764971345663071, 0.3064708113670349, 0.08656822144985199, -0.008805010467767715, 0.14406365156173706, 0.21520526707172394, -0.07109862565994263, 0.10037866234779358, -0.025686264038085938, 0.4002474546432495, 0.019601374864578247, 0.0668523907661438, 0.05422027409076691, -0.41418853402137756, 0.37610673904418945, 0.240252286195755, -0.20681357383728027, -0.11946475505828857, 0.024952461943030357, 0.18020306527614594, -0.2877337336540222, 0.05112946778535843, 0.07856029272079468, -0.2679387927055359, 0.2447858303785324, 0.0626738965511322, -0.03547294810414314, 0.2312709093093872, -0.10078617185354233, -0.05055634677410126, 1.058915138244629, -0.07786941528320312, 0.03968958929181099, -0.1933262199163437, -0.07249798625707626, 0.21993067860603333, 0.017727985978126526, 0.18433427810668945, -0.11261364817619324, 0.23499883711338043, 0.12983982264995575, -0.11272457987070084, 0.2563572824001312, -0.10569740831851959, 0.1894393116235733, 0.21939250826835632, 0.12377475202083588, -0.33094415068626404, -0.008498631417751312, -0.204974964261055, 0.04210556671023369, -0.1971980184316635, -0.4081791639328003, -0.2879916727542877, -0.47515347599983215, 0.3778953552246094, 0.11208759248256683, -0.16715797781944275, 0.025095567107200623, -0.4167981445789337, -0.04016894847154617, 0.20773956179618835, 0.33846837282180786, 0.14067138731479645, 0.37731149792671204, 0.020809926092624664, -0.18069973587989807, -0.15928608179092407, -0.10367492586374283, -0.2029183804988861, -0.6760939955711365, -0.09393937885761261, -0.14167213439941406, -0.19505152106285095, -0.035687580704689026, 0.09361996501684189, 0.03620518743991852, 0.6651353240013123, -0.8735559582710266, -0.053198713809251785, 0.02622833475470543, -0.12403929233551025, -0.20428374409675598, -0.07866048067808151, 0.13736996054649353, -0.2599744200706482, -0.010377122089266777, -0.04974665120244026, 0.2246381640434265, 0.19290080666542053, 0.03367311507463455, 0.0734003484249115, 0.27874743938446045, 0.03189987689256668, 0.1225324273109436, 0.8831713199615479, -0.37121954560279846, -0.06594188511371613, 0.267894446849823, 0.15738672018051147, 0.38014325499534607, -0.23865094780921936, 0.2636004090309143, -0.13469454646110535, -0.16586056351661682, -0.19585415720939636, 0.15652455389499664, 0.08727441728115082, -0.536945641040802, -0.41274768114089966, 0.41586408019065857, -0.12845923006534576, 0.11699166893959045, 0.20796824991703033, -0.32253479957580566, 0.25579461455345154, 0.026795830577611923, 0.0214499831199646, -0.19682112336158752, -0.21158969402313232, 0.019126329571008682, -0.05765828490257263, 0.6054167151451111, -0.21143470704555511, -0.12409000098705292, 0.32193687558174133, -0.27472084760665894, 0.007873311638832092, 0.03062979318201542, 0.21628230810165405, -0.029861347749829292, -0.19581636786460876, 0.32481876015663147, -0.014948349446058273, 0.6353760957717896, -0.17680633068084717, 0.000897187739610672, 0.06563204526901245, -0.46181759238243103, 0.06653038412332535, 0.019755151122808456, -0.06427286565303802, -0.11485985666513443, 0.046699754893779755, 0.2646922767162323, 0.13517504930496216, -0.11732025444507599, -0.08773380517959595, -0.26651886105537415, -0.3192571699619293, -0.3963136374950409, -0.0701058954000473, 0.16051599383354187, -0.2127302587032318, 0.08174264430999756, 0.1631471961736679, -0.040869008749723434, -0.25039082765579224, -0.028384530916810036, -0.3545408546924591, 0.4247925877571106, -0.13198265433311462, -0.24785688519477844, -0.055451445281505585, 0.26833611726760864, 0.18440474569797516, 0.23861323297023773, 0.14158272743225098, -0.015265187248587608, 0.20344366133213043, -0.2024107724428177, 0.08007904142141342, -0.15074101090431213, -0.1296238899230957, 0.24927598237991333, 0.6636570692062378, 0.2860677242279053, -0.030301958322525024, 0.15060508251190186, -0.11892953515052795, -0.2937452793121338, 0.13095222413539886, 0.031346410512924194, -0.29293566942214966, -0.1620040386915207, -0.5915785431861877, 0.6851967573165894, 0.22249411046504974, 0.023062415421009064, 0.35443294048309326, -0.5506951212882996, -0.3202624022960663, 0.2900855541229248, 0.3368040919303894, 0.92003333568573, -0.3764575123786926, 0.5159752368927002, -0.29942673444747925, 0.30966436862945557, 0.0008140059653669596, -0.3276219367980957, 0.20930776000022888, -0.33696308732032776, -0.283255398273468, -0.14732098579406738, -0.17532648146152496, -0.11738251894712448, 0.3771114945411682, 0.12502042949199677, -0.07226391136646271, 0.11685289442539215, 0.01818303018808365, 0.054808296263217926, -0.09467662125825882, 0.06083995848894119, -0.40459248423576355, -0.06368779391050339, 0.06485342979431152, 0.21623758971691132, 0.21443504095077515, -0.2849903106689453, 0.05485350266098976, 0.17310549318790436, -0.1351609230041504, 0.0026147589087486267, 0.06200801581144333, -0.2733362019062042, 0.00414620153605938, -0.20198124647140503, -0.28398555517196655, -0.3501138687133789, 0.14865125715732574, 0.30035316944122314, -0.15882490575313568, 0.04286915063858032, 0.21379943192005157, 0.23113417625427246, 0.10839087516069412, -0.04475332051515579, -0.004500899463891983, 0.38017964363098145, -0.08694949746131897, 0.13718518614768982, 0.13905401527881622, -0.24541248381137848, -0.5426344871520996, -0.018865570425987244, 0.10415834933519363, 0.21035180985927582, -0.012463122606277466, -0.21622999012470245, 0.2761099338531494, 0.09403041005134583, 0.09880009293556213, 0.073687344789505, 0.26839661598205566, -0.19851700961589813, 0.34516459703445435, 0.08301830291748047, -0.18664351105690002, 0.04977910965681076, 0.6502141952514648, 0.1749265193939209, -0.44052326679229736, 0.17861241102218628, 0.11505492031574249, -0.08829078078269958, -0.07991153746843338, 0.016613125801086426, 0.23431402444839478, -0.22399842739105225, 0.09348832815885544, 0.07933071255683899, 0.16056163609027863, -0.08549193292856216, 0.20371457934379578, 0.09905590116977692, -0.05569428950548172, -0.19452156126499176, -0.23886407911777496, -0.31764546036720276, 0.16628561913967133, -0.13898910582065582, 0.3290904760360718, 0.15828493237495422, -0.23707778751850128, 0.2533075511455536, 0.181443989276886, -0.2273145616054535, 0.19668596982955933, 0.11325351148843765, 0.2126765251159668, -0.0204177163541317, 0.12598112225532532, -0.12172239273786545, -0.07827281951904297, -0.06083349138498306, 0.09267476201057434, 0.0013126619160175323, -0.18895938992500305, 0.08946709334850311, 0.2597552239894867, 0.10290336608886719, -0.06154236942529678, -0.06418660283088684, -0.24945785105228424, -0.21114857494831085, -0.010368959978222847, 0.2952498197555542, 0.08706177026033401, -0.16299355030059814, -0.16167530417442322, 0.2854115664958954, 0.5793208479881287, -0.1693764477968216, 0.44712957739830017, 0.012473002076148987, 0.34422382712364197, 0.08855296671390533, -0.030133016407489777, -0.23653073608875275, 0.1098896712064743, 0.2594617009162903, -0.09176982194185257, 0.24938057363033295, 0.017095722258090973, 0.18777838349342346, -0.41057658195495605, 0.15096762776374817, -0.1571803092956543, 0.185447558760643, 0.27357858419418335, -0.4995350241661072, 0.0643143504858017, 0.31178948283195496, 0.14442268013954163, 0.069968581199646, -0.19013027846813202, -0.10925309360027313, -0.36218222975730896, -0.16494965553283691, 0.28041186928749084, 0.5584877729415894, 0.030295275151729584, 0.00034353137016296387, 0.04399268329143524, 0.3751169741153717, -0.4146686792373657, 0.07821580767631531, 0.4015361964702606, -0.04632861167192459, 0.04907762259244919, 0.08587297797203064, 0.5185027718544006, -0.012563832104206085, 0.17871823906898499, 0.015060395002365112, 0.2180618941783905, 0.045853689312934875, 0.09360940009355545, -0.2677713632583618, -0.43083953857421875, 0.05870256572961807, 0.6751397252082825, -0.07134990394115448, 0.45192253589630127, -0.36957430839538574, -0.055846668779850006, -0.016970980912446976, -0.25552862882614136, -0.1590128242969513, 0.12865623831748962, -0.1327875554561615, 0.07607756555080414, -0.10523506999015808, -0.12485136836767197, -0.14457041025161743, 0.4197896122932434, -0.10075666010379791, -0.14252795279026031, 0.2564862072467804, 0.2617850601673126, 0.013031333684921265, 0.19899903237819672, -0.1012510284781456, 0.09684325754642487, 0.2134021520614624, -0.27319711446762085, 0.22596929967403412, -0.4411216378211975, 0.177398681640625, 0.48344677686691284, 0.3473459482192993, -0.08138205111026764, 0.31859344244003296, -0.10274171829223633, 0.09607693552970886, 0.096718430519104, 0.06918910890817642, -0.025632711127400398, 0.3193225562572479, 0.3588230609893799, 0.06351178884506226, 0.10424643754959106, 0.025396747514605522, -0.07524582743644714, 0.4104229807853699, -0.010571103543043137, -0.030715256929397583, -0.36591848731040955, 0.1415158063173294, 0.2978208661079407, -0.12302488088607788, 0.0002620182931423187, 0.006375350058078766, -0.39584827423095703, 0.08554162085056305, 0.22740967571735382, -0.4957813322544098, 0.005138592794537544, 0.4473087787628174, 0.01617766171693802, -0.20252394676208496, 0.5034617185592651, 0.3643020689487457, 0.11371445655822754, -0.2773648500442505, -0.2858840823173523, -0.34513601660728455, 0.024138152599334717, 0.043824534863233566, 0.16584961116313934, -0.006225527264177799, 0.2346552163362503, 0.18113254010677338, 0.155462384223938, -0.1374717503786087, -0.47723326086997986, -0.10181480646133423, 0.14823272824287415, -0.3347151577472687, 0.228040412068367, 0.17978450655937195, 0.4630301594734192, -0.2251700460910797, -0.22883102297782898, 0.18368981778621674, 0.14242282509803772, -0.20466643571853638, 0.37404078245162964, -0.0874626636505127, 0.006389528512954712, 0.07313807308673859, 0.40849077701568604, -0.4653456509113312, 0.3128403425216675, 0.017308346927165985, 0.007558474317193031, -0.11583657562732697, -0.351105272769928, -0.2685948312282562, -0.13591504096984863, 0.11389198899269104, 0.002849869430065155, -0.21716080605983734, -0.0792466253042221, -0.017818249762058258, -0.2589983642101288, -0.08528238534927368, -0.12338587641716003, -0.14467567205429077, -0.49792060256004333, -0.0809306874871254, -0.0383521132171154, 0.2050117552280426, 0.33650100231170654, -0.0431855246424675, -0.24619752168655396, -0.34404265880584717, -0.0021830089390277863, 0.30992114543914795, -0.4316573441028595, 0.008486654609441757, -0.22643737494945526, 0.03243281692266464, -0.008222207427024841, 0.152889221906662, -0.44107648730278015, 0.1689276099205017, 0.29952430725097656, -0.11882076412439346, -0.04642421379685402, 0.3388530910015106, 0.13880698382854462, -0.04593561217188835, -0.11660788953304291, 0.2619568109512329, 0.011112473905086517, -0.09114617854356766, -0.6637376546859741, -0.4207080006599426 ]
https://github.com/huggingface/datasets/issues/1827
Regarding On-the-fly Data Loading
Hi ! Currently when you load a dataset via `load_dataset` for example, then the dataset is memory-mapped from an Arrow file on disk. Therefore there's almost no RAM usage even if your dataset contains TB of data. Usually at training time only one batch of data at a time is loaded in memory. Does that answer your question or were you thinking about something else ?
Hi, I was wondering if it is possible to load images/texts as a batch during the training process, without loading the entire dataset on the RAM at any given point. Thanks, Gunjan
66
Regarding On-the-fly Data Loading Hi, I was wondering if it is possible to load images/texts as a batch during the training process, without loading the entire dataset on the RAM at any given point. Thanks, Gunjan Hi ! Currently when you load a dataset via `load_dataset` for example, then the dataset is memory-mapped from an Arrow file on disk. Therefore there's almost no RAM usage even if your dataset contains TB of data. Usually at training time only one batch of data at a time is loaded in memory. Does that answer your question or were you thinking about something else ?
[ -0.28694337606430054, -0.3630419373512268, -0.14953327178955078, 0.27318263053894043, 0.41436249017715454, 0.17094269394874573, 0.4223020672798157, 0.12925849854946136, 0.18513989448547363, 0.08023841679096222, 0.12164261192083359, -0.06799068301916122, -0.24279607832431793, 0.19639994204044342, 0.18935036659240723, 0.23707489669322968, -0.0065636709332466125, 0.13835488259792328, -0.18601316213607788, 0.0667945072054863, -0.009469471871852875, -0.22810231149196625, -0.13453203439712524, -0.3600881099700928, -0.35198336839675903, -0.1788703054189682, -0.2061009258031845, -0.08167450875043869, -0.06644201278686523, -0.18078739941120148, 0.03830129653215408, 0.14545823633670807, 0.2661631405353546, 0.2168913185596466, -0.00011344836821081117, 0.026361890137195587, 0.18785759806632996, -0.16152018308639526, -0.43583324551582336, 0.19280436635017395, -0.08492711931467056, 0.05344416946172714, 0.14894632995128632, -0.2591665983200073, -0.043293941766023636, 0.26364225149154663, 0.18210434913635254, -0.3938758671283722, 0.393626868724823, -0.05979339778423309, 0.12879447638988495, -0.031294386833906174, -0.3372349739074707, 0.011578420177102089, 0.049605872482061386, 0.13176490366458893, 0.07075529545545578, 0.07038222253322601, 0.2710406184196472, -0.059978336095809937, -0.1753787398338318, 0.3019688129425049, 0.004044441506266594, 0.04812043905258179, 0.3422018885612488, 0.053604140877723694, 0.07542884349822998, -0.33612436056137085, -0.03241579979658127, 0.08975647389888763, 0.5630343556404114, -0.034745343029499054, -0.15533091127872467, -0.36639654636383057, 0.1146521046757698, -0.26986920833587646, -0.06252705305814743, 0.48933330178260803, -0.4659106433391571, 0.04075324162840843, -0.5683216452598572, -0.42560896277427673, -0.25264474749565125, -0.04365234822034836, -0.03672115504741669, -0.4735996425151825, 0.13232965767383575, 0.007984887808561325, 0.13946114480495453, 0.13082702457904816, 0.3437521755695343, -0.23167672753334045, -0.04601703956723213, 0.4015500843524933, -0.25778669118881226, -0.09600308537483215, -0.6005838513374329, -0.2998286187648773, 0.03833509236574173, -0.27605873346328735, 0.1747637242078781, 0.15818002820014954, -0.09513512253761292, 0.10614059865474701, 0.3347075581550598, -0.01938682794570923, 0.024412866681814194, 0.025478560477495193, -0.00010361522436141968, -0.2759264409542084, -0.2644041180610657, -0.057874731719493866, -0.45958685874938965, 0.0949927493929863, 0.033191364258527756, -0.3942999541759491, -0.46618974208831787, 0.008762303739786148, 0.1717684268951416, -0.2818396985530853, 0.04121153801679611, -0.013791503384709358, -0.2435891032218933, 0.2964886724948883, 0.013982907868921757, -0.04814170300960541, 0.46048909425735474, -0.286204993724823, -0.12497996538877487, -0.2746884822845459, -0.06371977925300598, 0.06568988412618637, -0.30600792169570923, 0.264606773853302, 0.1331711858510971, 0.1531427502632141, 0.06672923266887665, -0.13713936507701874, -0.06699918210506439, 0.03640460968017578, 0.019988058134913445, -0.33561211824417114, 0.2059187889099121, 0.15517468750476837, -0.11780612170696259, -0.2792704701423645, -0.03816883638501167, 0.31183743476867676, 0.006095856428146362, 0.5027793049812317, -0.2631542980670929, -0.06981188803911209, 0.4293097257614136, 0.08178216964006424, 0.08337385952472687, -0.15463359653949738, -0.6008704304695129, 0.36559200286865234, 0.13699597120285034, 0.13334186375141144, 0.07057695835828781, -0.007777061313390732, -0.3763470947742462, 0.005117170512676239, 0.2648199498653412, 0.32712870836257935, -0.3991864025592804, -0.3566911816596985, 0.41850316524505615, -0.015825245529413223, -0.13916301727294922, 0.10627950727939606, -0.3086325526237488, 0.4188516139984131, 0.030043216422200203, -0.10012204200029373, 0.098215252161026, -0.2143736332654953, -0.05439352989196777, 0.3533628582954407, 0.01586078852415085, -0.10139261931180954, 0.024709373712539673, 0.5722172260284424, 0.09385698288679123, 0.24929185211658478, 0.3291521370410919, 0.7063391804695129, 0.14415472745895386, 0.12000489979982376, -0.1268431544303894, -0.26030904054641724, -0.3210427761077881, 0.3683962821960449, 0.16437196731567383, 0.16850171983242035, 0.08416377753019333, 0.019454505294561386, 0.23472100496292114, -0.22007620334625244, 0.059916503727436066, 0.2151896059513092, -0.051826972514390945, 0.13261428475379944, -0.10097737610340118, 0.22995978593826294, -0.43850040435791016, 0.2532014846801758, 0.044466279447078705, 0.08210521936416626, 0.11397430300712585, -0.005487680435180664, 0.3631192147731781, -0.24878159165382385, 0.15078194439411163, 0.2011348158121109, -0.044428884983062744, -0.31011417508125305, -0.2252044677734375, -0.022929489612579346, -0.41129159927368164, 0.6960089802742004, -0.47965008020401, 0.21734483540058136, -0.1416357457637787, 0.09893955290317535, 0.5003316402435303, -0.08495964109897614, -0.08525356650352478, -0.23359113931655884, -0.46351316571235657, 0.03531279414892197, 0.06894436478614807, 0.38180863857269287, 0.1407141238451004, 0.17824479937553406, 0.03169902414083481, 0.04924455285072327, 0.18138277530670166, 0.026836220175027847, 0.18267694115638733, -0.3104831874370575, 0.16193066537380219, -0.15216422080993652, -0.3586108088493347, 0.4180774688720703, 0.09458101540803909, 0.2759920656681061, 0.3086816668510437, -0.1523553878068924, 0.014110883697867393, -0.14440205693244934, -0.05347432941198349, 0.10241447389125824, 0.043866902589797974, 0.22685843706130981, 0.4621657431125641, 0.17079582810401917, -0.2648867666721344, -0.34579718112945557, 0.05040152370929718, -0.11201928555965424, -0.04329177737236023, 0.22490349411964417, -0.126993328332901, 0.03646295517683029, 0.03297928348183632, -0.09820647537708282, 0.2339932918548584, 0.2031128704547882, -0.0120159350335598, 0.17038127779960632, 0.21888196468353271, 0.00952482596039772, 0.08827731013298035, 0.0622376948595047, 0.47839170694351196, -0.1956157386302948, -0.0780266523361206, -0.029674727469682693, -0.264093816280365, 0.250811368227005, 0.14174911379814148, -0.1726946085691452, -0.13916826248168945, -0.024238860234618187, 0.004701914265751839, -0.30658701062202454, -0.09982506185770035, 0.3313092291355133, -0.1850052922964096, 0.36011403799057007, -0.012678742408752441, 0.02249959297478199, 0.16963112354278564, 0.007144891191273928, -0.09758982062339783, 0.9094576239585876, -0.04696456342935562, -0.21003708243370056, -0.021173547953367233, -0.0736696645617485, -0.0035657398402690887, 0.034306976944208145, 0.34309476613998413, -0.048393383622169495, 0.37043190002441406, 0.14064909517765045, -0.17756621539592743, 0.14927545189857483, 0.22401636838912964, 0.15290707349777222, 0.2234518676996231, -0.01678810827434063, -0.3906618356704712, 0.10242022573947906, -0.2542731761932373, 0.047784946858882904, -0.08781853318214417, -0.33875772356987, -0.22434015572071075, -0.3469254672527313, 0.3597925901412964, 0.09800844639539719, -0.03539738804101944, -0.007406502962112427, -0.44342073798179626, -0.0958465039730072, 0.1404806673526764, 0.19948376715183258, 0.10518980026245117, 0.3841192424297333, 0.16945406794548035, -0.1420046091079712, -0.1363411545753479, -0.025812232866883278, 0.05465678125619888, -0.47638922929763794, -0.0898561179637909, 0.049223341047763824, -0.17513297498226166, -0.09486003965139389, 0.040258415043354034, 0.018546631559729576, 0.8389368653297424, -0.8290780782699585, 0.13934668898582458, -0.037930816411972046, -0.21410630643367767, -0.2819705903530121, 0.05184941738843918, 0.03995503857731819, -0.2387922704219818, -0.09567388892173767, 0.047306954860687256, 0.31018415093421936, 0.1588173806667328, -0.10290820151567459, 0.03734640032052994, 0.29887890815734863, 0.14543648064136505, 0.1473432332277298, 0.7117270827293396, -0.21235264837741852, -0.16627295315265656, 0.1837857961654663, -0.05570901930332184, 0.2883816361427307, -0.13273251056671143, 0.2319423258304596, -0.16282647848129272, -0.20905083417892456, -0.2608184814453125, 0.17890268564224243, 0.0664997398853302, -0.30495086312294006, -0.4226721227169037, 0.24039426445960999, -0.08135390281677246, -0.03205021098256111, 0.3473740220069885, -0.3740391731262207, 0.33034828305244446, -0.0016484800726175308, -0.0334109291434288, -0.09696130454540253, -0.2357499897480011, -0.005357912741601467, -0.10438470542430878, 0.4143749475479126, -0.2544369697570801, -0.23465225100517273, 0.4172893464565277, -0.25920501351356506, 0.06299164891242981, -0.09616208076477051, 0.18167522549629211, 0.07276852428913116, -0.14022547006607056, 0.2659955620765686, 0.14215406775474548, 0.5721113085746765, 0.08010692894458771, -0.1290566325187683, 0.04823538288474083, -0.4424254894256592, -0.22158899903297424, 0.004601713269948959, -0.13777868449687958, -0.09473961591720581, -0.0602911151945591, 0.3573642671108246, -0.034016285091638565, -0.2430552989244461, -0.022322919219732285, -0.0218734722584486, -0.406721830368042, -0.3591224253177643, -0.17929579317569733, 0.14779427647590637, -0.0813555046916008, 0.07000017166137695, 0.18959787487983704, 0.016089748591184616, 0.046733252704143524, -0.15479452908039093, -0.3114154040813446, 0.35882338881492615, 0.034928008913993835, -0.2902463376522064, 0.012869653292000294, 0.27836769819259644, 0.2972322702407837, 0.15600910782814026, 0.16766513884067535, 0.28240767121315, 0.211509108543396, -0.2807260751724243, 0.030746515840291977, -0.14020892977714539, -0.04483412578701973, 0.38987505435943604, 0.4764654338359833, 0.22142134606838226, 0.06385547667741776, 0.1461300104856491, 0.01897433027625084, -0.550263524055481, 0.17621371150016785, 0.09592755138874054, -0.1931820660829544, -0.21836307644844055, -0.6674817204475403, 0.7044339776039124, 0.22654718160629272, 0.03043939918279648, 0.3714713156223297, -0.4017283320426941, -0.3358762860298157, 0.15638354420661926, 0.31377914547920227, 0.7594908475875854, -0.5083619356155396, 0.5862457752227783, -0.20890793204307556, 0.31207942962646484, -0.04320612549781799, -0.24296218156814575, 0.2859005928039551, -0.27826952934265137, -0.21864762902259827, -0.05736742541193962, -0.22832922637462616, -0.1376565396785736, 0.4003315567970276, 0.18752208352088928, 0.08054187893867493, 0.11485230922698975, 0.051224637776613235, -0.021650614216923714, -0.04269785061478615, 0.004943643696606159, -0.363723486661911, -0.07007937878370285, 0.12937963008880615, 0.2027827948331833, 0.0689091831445694, -0.22743800282478333, 0.13182806968688965, 0.056933578103780746, -0.05228966474533081, 0.10776937007904053, -0.09698004275560379, -0.3252192437648773, 0.05660443753004074, -0.28044435381889343, -0.15793967247009277, -0.21293717622756958, 0.20187902450561523, -0.012654423713684082, -0.12985759973526, 0.10946112126111984, 0.16359588503837585, 0.03485363721847534, 0.2512392997741699, -0.045520633459091187, -0.02143901400268078, 0.3898712992668152, -0.021895291283726692, 0.029210977256298065, 0.12995506823062897, -0.21889175474643707, -0.3678271174430847, -0.0035805702209472656, 0.09045630693435669, 0.19482861459255219, -0.06765937060117722, -0.18209166824817657, 0.17361778020858765, 0.23278257250785828, 0.20634867250919342, 0.1096123456954956, 0.188012957572937, -0.1446276754140854, 0.49398791790008545, 0.20863096415996552, -0.23867060244083405, 0.08959732949733734, 0.4949345588684082, 0.13674423098564148, -0.3033532500267029, 0.216091126203537, -0.04145665466785431, -0.11339681595563889, -0.13513557612895966, 0.2718048691749573, 0.48319822549819946, -0.038148362189531326, 0.16060197353363037, 0.15192003548145294, 0.226836159825325, -0.07941793650388718, 0.11807934194803238, 0.07830630242824554, -0.16718655824661255, -0.11440300941467285, -0.1036437526345253, -0.4050599932670593, 0.28201737999916077, 0.11862000823020935, 0.34307849407196045, 0.18113186955451965, -0.2666764259338379, 0.18191461265087128, 0.11198373883962631, -0.26809224486351013, 0.19365209341049194, 0.08656349778175354, 0.28394272923469543, -0.11367985606193542, 0.15993112325668335, -0.020743846893310547, -0.05522557720541954, 0.05292727053165436, 0.06346654891967773, 0.0021789316087961197, -0.21078643202781677, 0.13710901141166687, 0.20344431698322296, -0.016318127512931824, 0.00046951882541179657, -0.007761660031974316, -0.4162222743034363, -0.1493646502494812, -0.13763779401779175, 0.18334759771823883, 0.1661137342453003, -0.09337140619754791, -0.15469790995121002, 0.35415688157081604, 0.44255366921424866, -0.20507515966892242, 0.4429435729980469, -0.11981643736362457, 0.3913666605949402, 0.19334127008914948, -0.07820099592208862, 0.016595322638750076, 0.06737567484378815, -0.002388729015365243, -0.011415481567382812, 0.35751378536224365, -0.11862748116254807, -0.013995639979839325, -0.3259766697883606, 0.16052557528018951, -0.1186755821108818, 0.2884546220302582, 0.39290809631347656, -0.5295222401618958, 0.021072274073958397, 0.28827571868896484, 0.21992605924606323, 0.041338302195072174, -0.09991460293531418, 0.0013911295682191849, -0.37316420674324036, -0.08231756091117859, 0.28868958353996277, 0.24442711472511292, 0.05734190344810486, -0.29475826025009155, -0.14558029174804688, 0.27157601714134216, -0.260642409324646, -0.06185039505362511, 0.2537120580673218, 0.10173872113227844, -0.08804014325141907, -0.06677760928869247, 0.5002999305725098, 0.09944874048233032, 0.2923497259616852, -0.10785796493291855, 0.33136656880378723, -0.07803229987621307, 0.06738469749689102, -0.3112194836139679, -0.36041155457496643, 0.011753812432289124, 0.6964066028594971, -0.06039123237133026, 0.17634472250938416, -0.36291688680648804, 0.1245693564414978, 0.11411847919225693, -0.37014877796173096, -0.0549515075981617, -0.02520066127181053, -0.12517514824867249, 0.21374017000198364, -0.16836966574192047, -0.13923877477645874, -0.14880535006523132, 0.42576664686203003, -0.02148275449872017, -0.31612181663513184, 0.18419517576694489, 0.3428279161453247, 0.06291261315345764, 0.23395539820194244, -0.055864930152893066, 0.1977967917919159, 0.09299956262111664, -0.2929554283618927, -0.0018575694411993027, -0.30055755376815796, 0.25026172399520874, 0.4217052757740021, 0.30715131759643555, -0.08880898356437683, 0.23050883412361145, -0.009829556569457054, 0.06922787427902222, 0.1632232815027237, 0.061934128403663635, -0.13808363676071167, 0.11379857361316681, 0.32655012607574463, 0.24479767680168152, 0.13475401699543, 0.07641122490167618, -0.10885943472385406, 0.24045322835445404, 0.0029708556830883026, -0.17576071619987488, -0.43884778022766113, 0.06525681167840958, 0.2699503004550934, -0.15192502737045288, -0.06846971064805984, 0.018650934100151062, -0.2436138391494751, 0.045542750507593155, 0.3752804696559906, -0.5222757458686829, -0.01795707270503044, 0.48555588722229004, 0.053098827600479126, -0.21871024370193481, 0.530219316482544, 0.1026284396648407, 0.2320314645767212, -0.3197323679924011, -0.3163997530937195, -0.39110347628593445, -0.08139092475175858, -0.18390719592571259, 0.12528067827224731, -0.05810229480266571, 0.16720694303512573, 0.22310781478881836, 0.1155928373336792, -0.11437384784221649, -0.4481285512447357, -0.1608467400074005, 0.2227238267660141, -0.3137449026107788, 0.08004399389028549, 0.021004632115364075, 0.4221848249435425, -0.12299562990665436, -0.31178969144821167, 0.06429220736026764, -0.13460972905158997, -0.15305587649345398, 0.3762383460998535, 0.07298435270786285, -0.0030940305441617966, 0.20043927431106567, 0.46007394790649414, -0.47801074385643005, 0.3159678876399994, 0.06746634840965271, 0.01631154678761959, 0.019363176077604294, -0.1592836081981659, -0.2847013771533966, 0.001585058867931366, 0.16155879199504852, -0.037226513028144836, -0.27627986669540405, -0.061141300946474075, -0.03205973654985428, -0.19486907124519348, -0.0641591027379036, -0.20056091248989105, -0.12244962900876999, -0.4066179096698761, 0.05873936414718628, 0.05160694941878319, 0.10415336489677429, 0.33995574712753296, -0.14399930834770203, -0.296009361743927, -0.3409698009490967, 0.043104782700538635, 0.3233136534690857, -0.4750148057937622, 0.019058749079704285, -0.24956893920898438, 0.1382082849740982, -0.06141931563615799, 0.16788606345653534, -0.35136568546295166, 0.11777786165475845, 0.4220014810562134, -0.06161987781524658, -0.10312700271606445, 0.3565874993801117, 0.22949641942977905, -0.02862573228776455, -0.05848926678299904, 0.2589510381221771, -0.2766314148902893, -0.1549825221300125, -0.6072602868080139, -0.42484772205352783 ]
https://github.com/huggingface/datasets/issues/1825
Datasets library not suitable for huge text datasets.
Hi ! Looks related to #861 You are right: tokenizing a dataset using map takes a lot of space since it can store `input_ids` but also `token_type_ids`, `attention_mask` and `special_tokens_mask`. Moreover if your tokenization function returns python integers then by default they'll be stored as int64 which can take a lot of space. Padding can also increase the size of the tokenized dataset. To make things more convenient, we recently added a "lazy map" feature that allows to tokenize each batch at training time as you mentioned. For example you'll be able to do ```python from transformers import BertTokenizer tokenizer = BertTokenizer.from_pretrained("bert-base-uncased") def encode(batch): return tokenizer(batch["text"], padding="longest", truncation=True, max_length=512, return_tensors="pt") dataset.set_transform(encode) print(dataset.format) # {'type': 'custom', 'format_kwargs': {'transform': <function __main__.encode(batch)>}, 'columns': ['idx', 'label', 'sentence1', 'sentence2'], 'output_all_columns': False} print(dataset[:2]) # {'input_ids': tensor([[ 101, 2572, 3217, ... 102]]), 'token_type_ids': tensor([[0, 0, 0, ... 0]]), 'attention_mask': tensor([[1, 1, 1, ... 1]])} ``` In this example the `encode` transform is applied on-the-fly on the "text" column. This feature will be available in the next release 2.0 which will happen in a few days. You can already play with it by installing `datasets` from source if you want :) Hope that helps !
Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions??
197
Datasets library not suitable for huge text datasets. Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions?? Hi ! Looks related to #861 You are right: tokenizing a dataset using map takes a lot of space since it can store `input_ids` but also `token_type_ids`, `attention_mask` and `special_tokens_mask`. Moreover if your tokenization function returns python integers then by default they'll be stored as int64 which can take a lot of space. Padding can also increase the size of the tokenized dataset. To make things more convenient, we recently added a "lazy map" feature that allows to tokenize each batch at training time as you mentioned. For example you'll be able to do ```python from transformers import BertTokenizer tokenizer = BertTokenizer.from_pretrained("bert-base-uncased") def encode(batch): return tokenizer(batch["text"], padding="longest", truncation=True, max_length=512, return_tensors="pt") dataset.set_transform(encode) print(dataset.format) # {'type': 'custom', 'format_kwargs': {'transform': <function __main__.encode(batch)>}, 'columns': ['idx', 'label', 'sentence1', 'sentence2'], 'output_all_columns': False} print(dataset[:2]) # {'input_ids': tensor([[ 101, 2572, 3217, ... 102]]), 'token_type_ids': tensor([[0, 0, 0, ... 0]]), 'attention_mask': tensor([[1, 1, 1, ... 1]])} ``` In this example the `encode` transform is applied on-the-fly on the "text" column. This feature will be available in the next release 2.0 which will happen in a few days. You can already play with it by installing `datasets` from source if you want :) Hope that helps !
[ -0.26444774866104126, 0.070494145154953, 0.00913073867559433, 0.1295921355485916, 0.30825138092041016, 0.008050903677940369, 0.29017916321754456, 0.37177774310112, -0.28073909878730774, -0.01817294955253601, -0.04882340133190155, 0.14737769961357117, -0.23607219755649567, 0.010885654017329216, 0.03961006924510002, 0.02886868827044964, 0.21957656741142273, 0.20255103707313538, 0.14690302312374115, 0.06441634148359299, -0.04219701886177063, -0.24234096705913544, -0.22898849844932556, -0.01328887790441513, -0.43021687865257263, -0.2289031744003296, -0.13010066747665405, -0.2940588891506195, -0.3577355444431305, -0.40371713042259216, -0.03291773423552513, 0.1460275799036026, 0.4799692928791046, 0.4330446720123291, -0.00011875782365677878, -0.17877158522605896, 0.15742594003677368, 0.038837842643260956, -0.09152188897132874, 0.06572163105010986, 0.20808932185173035, -0.34046998620033264, -0.151067852973938, -0.2540649175643921, 0.1679103970527649, -0.18740203976631165, 0.012640874832868576, -0.12231764942407608, 0.2558724880218506, -0.02211228758096695, 0.106958769261837, 0.14781543612480164, -0.11758314073085785, 0.11759301275014877, 0.2055491805076599, -0.02572501450777054, -0.06717502325773239, -0.04616951569914818, 0.3811224699020386, -0.07647920399904251, -0.18748131394386292, 0.30042564868927, -0.1841914802789688, -0.05763635411858559, 0.3920023739337921, -0.004980742000043392, -0.13022935390472412, -0.34289929270744324, 0.23368766903877258, 0.26567786931991577, 0.39120247960090637, -0.34160077571868896, -0.29121705889701843, -0.4751835763454437, -0.14429748058319092, -0.16710472106933594, -0.11603983491659164, 0.13336868584156036, 0.1011422872543335, 0.1327650099992752, -0.5343758463859558, -0.3300272822380066, -0.09421871602535248, 0.28050264716148376, -0.12445572763681412, 0.2533673048019409, -0.030992668122053146, 0.06172199919819832, 0.06749498844146729, -0.30112743377685547, 0.11976176500320435, -0.3782680630683899, 0.125196635723114, 0.4119558036327362, -0.21033041179180145, -0.1967042088508606, -0.16205793619155884, -0.13196823000907898, 0.44410833716392517, -0.2146405726671219, -0.33525481820106506, 0.07517340034246445, -0.24771618843078613, -0.0298868790268898, 0.27384257316589355, 0.201071634888649, -0.18958476185798645, 0.38046136498451233, 0.14127078652381897, -0.251197874546051, -0.07609841972589493, -0.1168309822678566, -0.5041643977165222, 0.002323437947779894, 0.24237065017223358, -0.3414868116378784, -0.25376665592193604, -0.01092229038476944, 0.032196447253227234, 0.09376786649227142, -0.3200734257698059, 0.20490390062332153, 0.15705996751785278, 0.267753005027771, -0.18238577246665955, 0.1182551383972168, -0.2504812479019165, 0.15300065279006958, -0.12956209480762482, 0.013684193603694439, -0.03489253297448158, -0.08092120289802551, -0.31185588240623474, 0.08854246884584427, 0.1323876678943634, 0.036930933594703674, 0.14835427701473236, -0.031159814447164536, 0.08308341354131699, 0.11995285749435425, 0.22865018248558044, -0.3431073725223541, 0.06968992948532104, 0.08816801756620407, -0.05514271557331085, 0.3614562451839447, -0.2426365464925766, 0.0543857142329216, -0.24211612343788147, 0.34587332606315613, -0.357513427734375, -0.36333370208740234, 0.11500589549541473, 0.09564836323261261, -0.21243919432163239, -0.019232742488384247, -0.4771779477596283, 0.31245359778404236, 0.4131705164909363, 0.03535130247473717, 0.030805282294750214, -0.2233496457338333, -0.28915348649024963, -0.11198944598436356, 0.252044677734375, 0.21725797653198242, -0.37461644411087036, -0.04625958204269409, -0.00607704883441329, 0.27745407819747925, 0.35474345088005066, 0.7049415111541748, -0.2344234436750412, 0.468248188495636, -0.021717289462685585, 0.5970690846443176, 0.1308765858411789, -0.012030553072690964, -0.5504742860794067, 0.3064102232456207, 0.13611145317554474, -0.06262790411710739, -0.04742429405450821, 0.04870343208312988, 0.5649157762527466, -0.12646418809890747, 0.24218960106372833, 0.3477281928062439, -0.10757097601890564, 0.23972395062446594, -0.2524232268333435, -0.3894593417644501, 0.254374235868454, 0.21268409490585327, 0.23134228587150574, -0.4073578417301178, -0.10765332728624344, 0.5631250143051147, 0.107465460896492, -0.23449811339378357, 0.35120147466659546, 0.06945973634719849, 0.19328276813030243, 0.1367790699005127, -0.02449345774948597, -0.19177499413490295, -0.11334925144910812, 0.13876011967658997, 0.12848567962646484, -0.03402411937713623, -0.017769798636436462, -0.364934504032135, 0.198836088180542, -0.05589378625154495, -0.045172709971666336, 0.0023121796548366547, -0.00875113159418106, -0.29871976375579834, -0.052314579486846924, 0.045056093484163284, -0.12357895076274872, -0.2520160675048828, -0.14391593635082245, 0.11906368285417557, -0.051043566316366196, 0.06535016745328903, 0.064240001142025, -0.0879654735326767, -0.08188055455684662, 0.2881655693054199, -0.10196063667535782, -0.10989200323820114, -0.04301957041025162, 0.11550341546535492, 0.17926353216171265, -0.17297492921352386, -0.19897755980491638, 0.6291499137878418, 0.33137255907058716, -0.05277683585882187, 0.26208993792533875, 0.05794962868094444, 0.08748454600572586, -0.10105210542678833, -0.0608755424618721, 0.19801318645477295, 0.10384424030780792, 0.18098682165145874, 0.03713371604681015, -0.2367585301399231, 0.18426597118377686, -0.02314542979001999, 0.05771443992853165, -0.0625002458691597, 0.06317659467458725, 0.13999351859092712, 0.40712085366249084, 0.34435155987739563, -0.09917396306991577, -0.12267933040857315, 0.34568876028060913, -0.2547420561313629, 0.09445632249116898, 0.369259238243103, -0.42707645893096924, -0.3702394664287567, 0.056060537695884705, -0.2841126024723053, 0.07367706298828125, 0.1215595006942749, 0.054507385939359665, -0.07435290515422821, 0.3321834206581116, 0.0049928929656744, 0.2567669153213501, 0.17685134708881378, 0.09054076671600342, 0.059908486902713776, 0.15247997641563416, 0.24765905737876892, -0.08318084478378296, -0.14849846065044403, 0.2264685034751892, 0.28120729327201843, -0.06415355950593948, 0.016554521396756172, -0.17820453643798828, -0.14787781238555908, 0.007127765100449324, -0.09211350977420807, -0.10969032347202301, 0.05295078456401825, 0.1498168408870697, -0.05035962536931038, -0.005037052556872368, 0.20966391265392303, 0.056078728288412094, 0.3908674716949463, 0.08884256333112717, -0.2763013243675232, 0.08699613809585571, -0.08992400020360947, -0.3656364679336548, -0.01939120516180992, 0.25631293654441833, -0.3312307596206665, 0.2955760955810547, 0.12390569597482681, 0.1111493706703186, -0.3529423773288727, -0.5111266374588013, 0.0553656667470932, -0.08075962960720062, 0.04302125424146652, 0.005129337310791016, 0.011936582624912262, -0.3470672369003296, 0.04509072005748749, -0.08295781910419464, -0.22048509120941162, -0.048679277300834656, 0.037784893065690994, -0.1488904505968094, -0.1909848302602768, 0.09911932051181793, -0.11782602220773697, -0.2849354147911072, -0.14071591198444366, 0.18217965960502625, -0.17084015905857086, 0.14434747397899628, 0.021597055718302727, 0.05851453170180321, 0.03980769217014313, -0.09085305780172348, -0.21655996143817902, 0.03961140289902687, -0.345656156539917, 0.45405372977256775, 0.05377611517906189, -0.15994279086589813, -0.07391589879989624, -0.059862684458494186, -0.04376186802983284, 0.3011981248855591, -0.4520863890647888, 0.20265404880046844, -0.2943243682384491, 0.23227381706237793, -0.06257255375385284, 0.11541018635034561, 0.06283056735992432, 0.02295510843396187, 0.05326741933822632, 0.08547363430261612, -0.1402454823255539, -0.19865474104881287, -0.044246405363082886, 0.19662532210350037, 0.045827582478523254, 0.1926073133945465, 0.33191365003585815, 0.832305908203125, 0.06499770283699036, -0.12241359055042267, 0.234602153301239, 0.17437544465065002, 0.12439718842506409, -0.33458325266838074, -0.16107584536075592, 0.1468513160943985, -0.044596195220947266, -0.11654660850763321, 0.5374451279640198, 0.13780462741851807, -0.1528317928314209, 0.35038965940475464, -0.3317059874534607, -0.0801910012960434, -0.17754288017749786, 0.3647335469722748, -0.2959563732147217, 0.2762162387371063, 0.00023609958589076996, -0.06912090629339218, -0.22575877606868744, -0.3720049262046814, 0.002813008613884449, -0.010875992476940155, 0.06505599617958069, 0.11884631216526031, -0.33589300513267517, 0.13555842638015747, -0.5341352820396423, 0.18953414261341095, 0.04122285544872284, 0.2819494307041168, 0.18037675321102142, 0.12404531985521317, 0.15111979842185974, 0.12659868597984314, 0.5065204501152039, -0.025491314008831978, -0.1990233212709427, -0.12216615676879883, -0.2344265580177307, -0.07705137878656387, 0.030062038451433182, -0.2233586311340332, 0.10623510181903839, 0.47978660464286804, 0.6534513831138611, -0.3339405357837677, -0.2007194310426712, -0.3113008141517639, 0.43226489424705505, -0.02923056297004223, -0.1336650848388672, 0.028419915586709976, -0.03165724128484726, -0.5678440928459167, 0.2233591079711914, 0.16545218229293823, 0.33977100253105164, 0.24088150262832642, -0.10902102291584015, -0.20264431834220886, -0.01341297011822462, 0.28382325172424316, 0.08371706306934357, 0.16705384850502014, 0.0003051085805054754, 0.2988260090351105, -0.0417269691824913, 0.07444736361503601, 0.43153247237205505, -0.029305964708328247, -0.22439858317375183, -0.41435325145721436, -0.02524634823203087, 0.04621594399213791, 0.5054759383201599, 0.09847603738307953, -0.038524411618709564, 0.2553432285785675, -0.1259787529706955, 0.25325682759284973, -0.28882187604904175, 0.5742154717445374, 0.21887482702732086, 0.09654439985752106, -0.7376469969749451, -0.5411155223846436, 0.0903889611363411, 0.22932551801204681, -0.09818598628044128, 0.17401137948036194, -0.1532958298921585, -0.3754505515098572, 0.5328885912895203, 0.2531069219112396, 0.9069607257843018, -0.3994155526161194, 0.42455026507377625, -0.27230483293533325, 0.4491719603538513, 0.5515658259391785, -0.549382746219635, 0.02990393340587616, -0.3276280164718628, 0.09712758660316467, 0.10513262450695038, 0.028546031564474106, -0.08680912107229233, 0.27664321660995483, -0.08140349388122559, 0.24701844155788422, 0.09727717936038971, 0.35551974177360535, -0.1267232447862625, 0.4976908564567566, 0.1301129013299942, -0.5027880072593689, -0.10418867319822311, 0.07388817518949509, -0.09473185241222382, -0.07158839702606201, -0.17668429017066956, 0.05669798702001572, 0.0730208307504654, -0.06757326424121857, -0.22015666961669922, -0.1896805465221405, -0.1857762187719345, 0.22027361392974854, -0.04199795052409172, 0.03032631427049637, 0.46120989322662354, -0.0011074505746364594, 0.2244463860988617, 0.5506529211997986, -0.150945246219635, 0.11743372678756714, -0.17306235432624817, -0.01764582097530365, 0.08735563606023788, -0.24222299456596375, 0.1032317653298378, 0.06274006515741348, 0.19973832368850708, -0.19907474517822266, 0.08091333508491516, -0.0542823001742363, -0.31793636083602905, -0.11110499501228333, 0.6560400128364563, -0.3565064072608948, -0.16611120104789734, -0.14406529068946838, -0.09685415029525757, 0.006193235516548157, 0.056519098579883575, 0.10022604465484619, -0.04526003822684288, 0.3752143085002899, 0.03471538797020912, -0.2648663818836212, -0.07267192006111145, 0.06463239341974258, 0.050731122493743896, -0.05246557295322418, 0.5686107873916626, 0.03181667998433113, -0.2139265388250351, -0.14696206152439117, 0.38516154885292053, 0.28085222840309143, -0.1480034440755844, 0.11072198301553726, 0.14903107285499573, 0.043537527322769165, -0.1176782175898552, 0.18388284742832184, 0.16708678007125854, -0.3886725604534149, -0.05992573872208595, -0.1476561278104782, -0.4500799775123596, 0.1174713596701622, -0.02761179581284523, 0.22049841284751892, 0.134405255317688, 0.22062821686267853, -0.16937454044818878, 0.052947383373975754, -0.21384814381599426, 0.3104969561100006, 0.007994221523404121, 0.3019274175167084, -0.3741820454597473, 0.004355635493993759, -0.16413067281246185, -0.09826652705669403, -0.09766433387994766, 0.22376590967178345, 0.03107222355902195, -0.1915963888168335, -0.2536720633506775, 0.19749708473682404, 0.29847925901412964, -0.3040182888507843, 0.0982729122042656, -0.21105115115642548, -0.07528109848499298, -0.42497384548187256, 0.2353440523147583, 0.15221211314201355, 0.018068719655275345, -0.18942847847938538, 0.2478577196598053, -0.19596466422080994, -0.25265687704086304, 0.1285891830921173, 0.03377252817153931, 0.19779784977436066, 0.07466036081314087, 0.23859190940856934, 0.3486384451389313, -0.14840014278888702, -0.013297507539391518, 0.1799265444278717, 0.694348931312561, -0.0666871964931488, 0.06683802604675293, -0.08382649719715118, 0.14753764867782593, 0.3351520895957947, 0.00897204875946045, 0.3940814733505249, -0.21362827718257904, -0.38610002398490906, 0.6833882331848145, 0.17242276668548584, -0.060216598212718964, -0.18806903064250946, -0.028869830071926117, -0.17906814813613892, -0.16561830043792725, 0.11210120469331741, 0.1801539957523346, 0.29116037487983704, -0.44189149141311646, -0.0985676571726799, 0.384625107049942, 0.18575111031532288, 0.025836613029241562, 0.46753108501434326, 0.06536757946014404, -0.06930741667747498, 0.3300025761127472, 0.30513399839401245, 0.22508059442043304, 0.4662765860557556, -0.06656470149755478, 0.4718085825443268, 0.06670628488063812, 0.12534044682979584, -0.1344003677368164, -0.39104682207107544, -0.23684914410114288, 0.42562180757522583, 0.1948474645614624, 0.03734223172068596, -0.2140035629272461, 0.27323079109191895, 0.2574637532234192, -0.23213434219360352, -0.050520770251750946, 0.3097577393054962, -0.27512452006340027, -0.16672882437705994, -0.05871593579649925, -0.05017995089292526, 0.03087669610977173, 0.25557973980903625, -0.281486839056015, -0.28131401538848877, 0.10185811668634415, 0.06146474555134773, 0.0013057589530944824, -0.27674224972724915, 0.2092772126197815, 0.09694565087556839, 0.05061594396829605, -0.2989831268787384, 0.23835663497447968, -0.36142754554748535, 0.03960750252008438, -0.20370446145534515, 0.26524683833122253, 0.31675007939338684, 0.4223525822162628, -0.1601739078760147, 0.04025166109204292, -0.19014772772789001, 0.14614929258823395, -0.12595206499099731, 0.3894746005535126, 0.07511879503726959, 0.13779425621032715, 0.10004696249961853, -0.06780240684747696, -0.06970381736755371, -0.10743841528892517, 0.043832194060087204, -0.32806819677352905, -0.022128155454993248, 0.0759526863694191, 0.23820196092128754, -0.24577748775482178, -0.03236113488674164, 0.09718066453933716, -0.31763526797294617, 0.18555258214473724, 0.8031603693962097, -0.30247676372528076, 0.15867525339126587, -0.16049574315547943, 0.048063814640045166, -0.16160286962985992, 0.4464985430240631, 0.4236750304698944, -0.0030973851680755615, -0.5891638994216919, -0.07248204201459885, -0.3910684883594513, 0.13305003941059113, -0.40938931703567505, 0.2987825572490692, -0.004731381312012672, 0.036705076694488525, -0.13461312651634216, 0.09450197964906693, -0.2672286033630371, 0.15311424434185028, -0.46291258931159973, 0.0851815715432167, -0.047690585255622864, 0.29110848903656006, -0.19003938138484955, 0.20476804673671722, -0.004468580707907677, -0.37019747495651245, 0.36270299553871155, -0.1943226456642151, -0.13296839594841003, -0.19116325676441193, 0.29689738154411316, 0.17882750928401947, -0.14119455218315125, 0.44525665044784546, 0.175062894821167, 0.13580438494682312, 0.060782790184020996, 0.2444523572921753, -0.007436651736497879, 0.07304585725069046, -0.24771569669246674, 0.08837001770734787, -0.02074294164776802, -0.04471103847026825, -0.22212770581245422, 0.134427011013031, -0.1506129503250122, -0.13173307478427887, -0.006913714110851288, -0.1570843905210495, -0.22716201841831207, -0.013233269564807415, -0.18070310354232788, 0.14783726632595062, -0.08150525391101837, 0.41592442989349365, -0.1348460465669632, -0.015056558884680271, -0.26929670572280884, -0.28275030851364136, 0.2788332402706146, -0.6746149659156799, -0.40089407563209534, -0.14819127321243286, -0.05688738822937012, 0.5397027730941772, -0.10906960815191269, -0.6030365228652954, 0.10402273386716843, 0.4999958276748657, 0.10653471946716309, -0.4595341980457306, 0.10347163677215576, -0.011323053389787674, 0.017821040004491806, -0.19560089707374573, 0.5466088652610779, -0.19429540634155273, -0.23766298592090607, 0.07500343024730682, -0.2591935396194458 ]
https://github.com/huggingface/datasets/issues/1825
Datasets library not suitable for huge text datasets.
How recently was `set_transform` added? I am actually trying to implement it and getting an error: `AttributeError: 'Dataset' object has no attribute 'set_transform' ` I'm on v.1.2.1. EDIT: Oh, wait I see now it's in the v.2.0. Whoops! This should be really useful.
Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions??
43
Datasets library not suitable for huge text datasets. Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions?? How recently was `set_transform` added? I am actually trying to implement it and getting an error: `AttributeError: 'Dataset' object has no attribute 'set_transform' ` I'm on v.1.2.1. EDIT: Oh, wait I see now it's in the v.2.0. Whoops! This should be really useful.
[ -0.4678060710430145, 0.16560783982276917, 0.030423738062381744, 0.13930311799049377, 0.36984431743621826, -0.07995743304491043, 0.13434426486492157, 0.4200882315635681, -0.4338596761226654, -0.10870705544948578, 0.10512013733386993, 0.09787487238645554, -0.25969332456588745, 0.1617354303598404, 0.13775824010372162, 0.007173918187618256, 0.28806814551353455, 0.17738336324691772, -0.02560882270336151, 0.12198580801486969, -0.06834347546100616, -0.12772156298160553, -0.28676965832710266, -0.0004000142216682434, -0.5252423286437988, -0.2634718418121338, -0.017437811940908432, -0.2435952126979828, -0.4448640048503876, -0.324897438287735, -0.19247473776340485, 0.13646644353866577, 0.4324246644973755, 0.5125053524971008, -0.00012559664901345968, -0.22102531790733337, 0.24720509350299835, -0.03842497244477272, -0.28759077191352844, -0.03947561979293823, 0.29305359721183777, -0.3577702045440674, -0.19684535264968872, -0.21324250102043152, 0.19382911920547485, -0.37451887130737305, -0.04147006571292877, -0.10995032638311386, 0.11619092524051666, 0.2161802053451538, 0.0858881026506424, 0.05413029342889786, 0.07016672194004059, 0.03951600193977356, 0.1645481139421463, -0.001455560326576233, -0.10422704368829727, -0.022880099713802338, 0.45387187600135803, 0.06549226492643356, -0.12683606147766113, 0.13993968069553375, -0.12165302038192749, -0.021264120936393738, 0.45770904421806335, -0.07397318631410599, -0.24550727009773254, -0.2150258719921112, 0.17155787348747253, 0.28892457485198975, 0.5197038650512695, -0.4864009916782379, -0.39775100350379944, -0.5967868566513062, -0.16936218738555908, -0.23335690796375275, -0.005126096308231354, 0.10508536547422409, 0.06447841227054596, 0.19546137750148773, -0.5726397037506104, -0.47434791922569275, -0.11595514416694641, 0.3932582139968872, -0.25518035888671875, 0.11431316286325455, -0.12854208052158356, 0.09376800060272217, 0.18534399569034576, -0.14512129127979279, 0.13376538455486298, -0.2565787136554718, 0.02105676382780075, 0.18751458823680878, -0.3344246745109558, -0.1271079033613205, -0.16220182180404663, -0.021164126694202423, 0.406477689743042, 0.0946197509765625, -0.4326747953891754, 0.06500068306922913, -0.13599996268749237, -0.008353270590305328, 0.25431767106056213, 0.4710545241832733, -0.22278538346290588, 0.2742273509502411, 0.2237858772277832, -0.2196393609046936, 0.012065820395946503, -0.08008397370576859, -0.47909876704216003, -0.17351742088794708, 0.07928001880645752, -0.3584180474281311, -0.12009115517139435, -0.14532826840877533, -0.039694834500551224, -0.0014614416286349297, -0.1404425948858261, 0.19795018434524536, 0.11611069738864899, 0.13200220465660095, -0.057998545467853546, 0.180278480052948, -0.10723206400871277, 0.2354937344789505, -0.13252779841423035, -0.20003534853458405, 0.002107656095176935, -0.020393073558807373, -0.29102790355682373, 0.13602910935878754, 0.1617564857006073, -0.0009595509618520737, 0.08485113829374313, -0.10976219922304153, 0.09472136199474335, 0.11956354975700378, 0.1449592262506485, -0.32303789258003235, 0.0003710612654685974, 0.1692294180393219, -0.12798188626766205, 0.4077444076538086, -0.17298918962478638, -0.04691499099135399, -0.27522027492523193, 0.36724212765693665, -0.29812461137771606, -0.3904722332954407, -0.06154932081699371, 0.07274104654788971, -0.4090564250946045, -0.04889226704835892, -0.5169223546981812, 0.41313645243644714, 0.46669521927833557, 0.0010686293244361877, 0.022856108844280243, -0.20465312898159027, -0.16118988394737244, -0.009331935085356236, 0.17031735181808472, 0.19399504363536835, -0.6206809878349304, -0.07363911718130112, -0.024232197552919388, 0.15784230828285217, 0.2399742603302002, 0.6512375473976135, -0.14100730419158936, 0.3402702808380127, -0.05928748846054077, 0.3595705032348633, 0.2331750988960266, 0.19292259216308594, -0.5321205854415894, 0.2934279441833496, -0.03347283601760864, -0.22859689593315125, -0.018056944012641907, 0.04281290993094444, 0.39133962988853455, -0.11936947703361511, 0.028269454836845398, 0.4206728935241699, -0.06168323755264282, 0.11342135816812515, -0.2282675951719284, -0.32633233070373535, 0.19324232637882233, 0.21309830248355865, 0.20064128935337067, -0.14208418130874634, 0.043817467987537384, 0.454666405916214, 0.03793851286172867, -0.15148356556892395, 0.44036000967025757, 0.09199397265911102, 0.2172999233007431, 0.15100671350955963, 0.059499576687812805, -0.2520763576030731, 0.17664596438407898, 0.039071306586265564, 0.1651211977005005, -0.08735702931880951, -0.03598746657371521, -0.21747703850269318, 0.008902683854103088, -0.022134313359856606, 0.03188992291688919, 0.07268090546131134, -0.12673227488994598, -0.15514172613620758, -0.007907865568995476, 0.17408518493175507, -0.1608189344406128, -0.11975608021020889, -0.23613174259662628, 0.07244325429201126, -0.17394572496414185, 0.07099837809801102, 0.0937701165676117, -0.1703377664089203, 0.0002909749746322632, 0.17705948650836945, -0.11854202300310135, -0.1547641009092331, -0.06339097768068314, 0.22321882843971252, -0.03438654914498329, -0.1681160181760788, -0.3214414119720459, 0.6541767120361328, 0.27077990770339966, -0.06255336105823517, 0.24109672009944916, -0.07508686184883118, 0.04166254773736, -0.10140621662139893, -0.026259928941726685, 0.1974632889032364, 0.031803373247385025, 0.17128202319145203, 0.040797263383865356, -0.21162796020507812, 0.0912056416273117, -0.06580428779125214, 0.12830115854740143, -0.009219121187925339, 0.19616484642028809, 0.028207890689373016, 0.3526707589626312, 0.25810182094573975, -0.08915071934461594, -0.14411145448684692, 0.5428143739700317, -0.25621384382247925, 0.2579786777496338, 0.46385490894317627, -0.43056923151016235, -0.32196763157844543, 0.07507830113172531, -0.10992635041475296, 0.27087217569351196, 0.18141253292560577, 0.03849424421787262, -0.005050692707300186, 0.29580023884773254, -0.058558858931064606, 0.22698178887367249, 0.12926636636257172, 0.23125411570072174, 0.1655014455318451, 0.18570710718631744, 0.1758003681898117, -0.16525481641292572, -0.18095983564853668, 0.2347024381160736, 0.3232022821903229, -0.19560588896274567, 0.08063431084156036, -0.20886938273906708, -0.1941363513469696, -0.09871242940425873, 0.14547938108444214, -0.1387936770915985, 0.0052879564464092255, 0.06360980868339539, -0.09177781641483307, 0.14397256076335907, 0.14538763463497162, 0.11625106632709503, 0.39103835821151733, 0.08752478659152985, -0.3043803572654724, 0.1152976006269455, -0.05897235497832298, -0.43237969279289246, -0.035122111439704895, 0.27948057651519775, -0.42646196484565735, 0.21617470681667328, 0.15202045440673828, 0.07639762759208679, -0.2842862010002136, -0.5105535984039307, 0.01531093567609787, 0.018665887415409088, 0.214548259973526, -0.09795710444450378, 0.020444147288799286, -0.10421665012836456, 0.13048893213272095, -0.032246269285678864, -0.15894551575183868, -0.10282193124294281, 0.09857458621263504, -0.18153490126132965, -0.24359630048274994, 0.12767989933490753, -0.1638970971107483, -0.28687170147895813, -0.21018819510936737, 0.2809816598892212, -0.14801958203315735, 0.0006382912397384644, 0.13611355423927307, 0.15327809751033783, -0.02216418832540512, 0.006242693867534399, -0.07602507621049881, 0.11993291974067688, -0.21263240277767181, 0.5063885450363159, 0.15516886115074158, -0.24017880856990814, -0.11682391911745071, 0.08238303661346436, -0.1706949770450592, 0.404660701751709, -0.48271530866622925, 0.2901179790496826, -0.3174152076244354, 0.18220007419586182, -0.07470162957906723, 0.11960224062204361, 0.13632997870445251, -0.06622184813022614, 0.09119512885808945, 0.07438640296459198, -0.2566072344779968, -0.26442793011665344, -0.03482997417449951, 0.319036602973938, -0.053888171911239624, 0.3580656051635742, 0.504602313041687, 0.5707178711891174, -0.1284002810716629, -0.2025967389345169, 0.30222034454345703, 0.05813787132501602, 0.18593832850456238, -0.3812961280345917, -0.20784880220890045, 0.3076784908771515, -0.11307817697525024, -0.1500234603881836, 0.404294490814209, 0.07336358726024628, -0.12560546398162842, 0.18221372365951538, -0.28580665588378906, -0.0770426094532013, 0.002283882349729538, 0.18168029189109802, -0.2554910480976105, 0.19497032463550568, -0.03322560340166092, -0.14733368158340454, -0.0552726574242115, -0.3543819785118103, 0.006502963602542877, 0.08548559248447418, -0.03988123685121536, 0.2780981957912445, -0.523135244846344, 0.14454597234725952, -0.31722915172576904, 0.1839582622051239, -0.11983831226825714, 0.3176473379135132, 0.08934800326824188, 0.04433470219373703, 0.17285089194774628, -0.0029818196780979633, 0.6573584079742432, 0.1614987701177597, -0.22439207136631012, -0.08020627498626709, -0.1849891096353531, -0.2815258204936981, 0.030736584216356277, -0.15641148388385773, 0.25268006324768066, 0.3969075381755829, 0.4458352327346802, -0.2846600413322449, -0.08748724311590195, -0.15630744397640228, 0.599565863609314, -0.028742976486682892, -0.20907966792583466, 0.009726930409669876, -0.19376108050346375, -0.6171144843101501, 0.141123428940773, 0.11847516149282455, 0.3723028004169464, 0.051324471831321716, -0.017696885392069817, -0.1607234627008438, -0.1487685889005661, 0.33148080110549927, -0.02123773843050003, 0.10765668004751205, -0.07592689990997314, 0.2275632619857788, -0.11483117938041687, 0.16615203022956848, 0.5096877217292786, -0.011208601295948029, 0.1589726358652115, -0.20576199889183044, 0.016030680388212204, 0.08608043938875198, 0.42286574840545654, -0.01824745535850525, -0.15910868346691132, 0.2727680802345276, -0.1592997908592224, 0.3351099491119385, -0.2517125904560089, 0.4993906319141388, 0.14243097603321075, 0.024775516241788864, -0.7850491404533386, -0.44194358587265015, 0.30653831362724304, 0.18344905972480774, -0.002083122730255127, 0.23322167992591858, -0.0898345410823822, -0.3548887073993683, 0.29652297496795654, 0.12644490599632263, 0.9342726469039917, -0.3664012551307678, 0.29557815194129944, -0.3144508898258209, 0.32174158096313477, 0.5618302226066589, -0.6394957304000854, -0.010873157531023026, -0.37641164660453796, 0.051912419497966766, 0.08551422506570816, -0.05422332510352135, 0.13348594307899475, 0.40118736028671265, -0.10392461717128754, 0.24858401715755463, 0.09214858710765839, 0.052966486662626266, -0.028063939884305, 0.6024860143661499, -0.1124618873000145, -0.3547429144382477, -0.13956916332244873, 0.030255895107984543, -0.19786106050014496, -0.017633013427257538, -0.15019851922988892, 0.126851886510849, -0.04800331965088844, 0.08815284073352814, -0.3702215552330017, -0.08578510582447052, -0.0762249156832695, 0.13093292713165283, -0.07100719213485718, -0.15860646963119507, 0.5522643327713013, -0.02438582107424736, 0.29393821954727173, 0.4906296133995056, -0.1599329113960266, 0.19515171647071838, -0.3952568471431732, 0.007243188563734293, 0.22703415155410767, -0.25355297327041626, 0.17695246636867523, -0.0029715821146965027, 0.0467282310128212, -0.22745752334594727, 0.12152774631977081, -0.014459565281867981, -0.18631498515605927, -0.1406598836183548, 0.5457143187522888, -0.2815810739994049, -0.1525866985321045, -0.10812509059906006, 0.0739670842885971, -0.09374891221523285, 0.012491269037127495, 0.16467314958572388, -0.02039461024105549, 0.36885377764701843, -0.06504663825035095, -0.26758524775505066, -0.16352319717407227, 0.22400006651878357, 0.03834839165210724, -0.048234064131975174, 0.5090435147285461, 0.1999020129442215, -0.1995309740304947, -0.09599637985229492, 0.3914942741394043, 0.21927976608276367, -0.28440532088279724, 0.22491052746772766, 0.10755272954702377, -0.018357522785663605, -0.11179181188344955, 0.09261560440063477, 0.11750772595405579, -0.44312554597854614, -0.06794403493404388, -0.22729896008968353, -0.37535059452056885, 0.1325860619544983, -0.03168131783604622, 0.11350204795598984, 0.06224852800369263, 0.12035627663135529, 0.0003969632089138031, 0.11205729097127914, -0.1463400423526764, 0.19430957734584808, 0.09179744124412537, 0.278354287147522, -0.15627188980579376, 0.04785817861557007, -0.26495280861854553, -0.09077481925487518, -0.1531645506620407, 0.10011488944292068, 0.14193110167980194, -0.13766133785247803, -0.20689542591571808, 0.2038152515888214, 0.2516923248767853, -0.2625119984149933, 0.14885573089122772, -0.2941526174545288, -0.1333898901939392, -0.326946884393692, 0.21888980269432068, 0.2685706615447998, -0.010176606476306915, -0.05530104413628578, 0.25932472944259644, -0.3359720706939697, -0.2528073191642761, 0.058605339378118515, -0.03265339881181717, 0.11974705755710602, 0.15321464836597443, 0.3857433795928955, 0.5578309893608093, -0.09740760922431946, -0.3966269791126251, 0.23649436235427856, 0.48236340284347534, -0.10040190070867538, 0.10285970568656921, -0.24522362649440765, 0.11800238490104675, 0.3210252821445465, 0.1504739671945572, 0.48416733741760254, -0.18217666447162628, -0.3888133466243744, 0.5509518384933472, 0.09332103282213211, -0.1055198609828949, -0.1948433220386505, 0.06209012493491173, -0.1472337692975998, -0.23549433052539825, 0.1320221871137619, 0.254441499710083, 0.17404720187187195, -0.4353885054588318, -0.055422816425561905, 0.519748330116272, 0.200178861618042, 0.04026775062084198, 0.4844236671924591, 0.165019229054451, -0.0563526414334774, 0.33965080976486206, 0.25915294885635376, 0.2522546947002411, 0.5600368976593018, -0.015649616718292236, 0.5746829509735107, 0.21593615412712097, 0.22912421822547913, -0.1778339445590973, -0.4864787459373474, -0.127213254570961, 0.3517715334892273, 0.2182939499616623, -0.08247869461774826, -0.2162061333656311, 0.2877638041973114, 0.3367443084716797, -0.12256010621786118, -0.03572890907526016, 0.16637662053108215, -0.19159993529319763, -0.12165118753910065, -0.14636360108852386, -0.1660090833902359, -0.01303863525390625, 0.23122823238372803, -0.27122142910957336, -0.37006086111068726, 0.06008180230855942, 0.03202736750245094, -0.10579957067966461, -0.46287107467651367, 0.4335581064224243, 0.06493452191352844, 0.024106428027153015, -0.27389153838157654, 0.29259955883026123, -0.2164279967546463, 0.07362686097621918, 0.04154421389102936, 0.29992806911468506, 0.4472154974937439, 0.46387091279029846, -0.0596710704267025, 0.010905186645686626, -0.24108566343784332, 0.02453687973320484, -0.1439652144908905, 0.46249932050704956, 0.03497713804244995, 0.27128347754478455, 0.13451728224754333, -0.0633620023727417, -0.03244643658399582, 0.005066756159067154, 0.10227182507514954, -0.3170353174209595, -0.1514539122581482, 0.03702861815690994, 0.15356053411960602, -0.34513047337532043, -0.12387394905090332, 0.18215537071228027, -0.2598913311958313, 0.017143182456493378, 0.9408848285675049, -0.345741331577301, 0.05357080698013306, -0.19018535315990448, 0.01026177778840065, -0.11160124838352203, 0.4436601400375366, 0.45705705881118774, 0.07641837000846863, -0.3387860357761383, -0.07781898975372314, -0.3848975598812103, 0.2020053267478943, -0.29152899980545044, 0.2598515748977661, 0.006815290078520775, 0.09227971732616425, -0.08701059967279434, 0.05216911435127258, -0.27723950147628784, 0.33178916573524475, -0.34693899750709534, 0.07125868648290634, -0.0766105130314827, 0.012940777465701103, -0.11799179017543793, 0.24222733080387115, -0.11845364421606064, -0.3655266761779785, 0.3441644310951233, -0.16349047422409058, -0.16255253553390503, -0.22175082564353943, 0.23441922664642334, 0.18637022376060486, -0.12410454452037811, 0.5211455821990967, 0.1639930158853531, 0.2844225764274597, 0.06964178383350372, 0.3814978003501892, -0.06578001379966736, 0.02962704934179783, -0.36793607473373413, 0.2523973286151886, -0.041301097720861435, 0.020654261112213135, -0.2122359424829483, 0.1473591923713684, -0.0459805428981781, 0.05473925545811653, -0.06017348915338516, -0.025084109976887703, -0.21112415194511414, -0.05758126825094223, -0.1792098879814148, 0.14226435124874115, 0.0848786011338234, 0.2873155176639557, -0.056095488369464874, 0.008838236331939697, -0.3809770345687866, -0.29638320207595825, 0.2829848527908325, -0.41466856002807617, -0.39064958691596985, -0.10515297949314117, -0.026661396026611328, 0.5343506932258606, -0.24056127667427063, -0.5345795750617981, 0.050402067601680756, 0.5844875574111938, 0.05054636299610138, -0.32976657152175903, 0.3089814782142639, -0.23216480016708374, 0.010188672691583633, -0.14436957240104675, 0.5861440896987915, -0.1608719825744629, -0.27098336815834045, 0.008574191480875015, -0.10084080696105957 ]
https://github.com/huggingface/datasets/issues/1825
Datasets library not suitable for huge text datasets.
Yes indeed it was added a few days ago. The code is available on master We'll do a release next week :) Feel free to install `datasets` from source to try it out though, I would love to have some feedbacks
Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions??
41
Datasets library not suitable for huge text datasets. Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions?? Yes indeed it was added a few days ago. The code is available on master We'll do a release next week :) Feel free to install `datasets` from source to try it out though, I would love to have some feedbacks
[ -0.4051041305065155, 0.13909584283828735, 0.015502888709306717, 0.29045364260673523, 0.2991149425506592, 0.007427424192428589, 0.07476881146430969, 0.3566737174987793, -0.3289947211742401, -0.06482821702957153, 0.051100485026836395, 0.060472629964351654, -0.24909020960330963, 0.17772653698921204, 0.044380709528923035, 0.08899611234664917, 0.18884655833244324, 0.15917372703552246, 0.11262908577919006, 0.1340801864862442, 0.03617875277996063, -0.12296712398529053, -0.2318737953901291, 0.02385418489575386, -0.533865213394165, -0.2475266456604004, -0.0014843903481960297, -0.20429447293281555, -0.4535926580429077, -0.31685003638267517, -0.18656109273433685, 0.18781700730323792, 0.5089608430862427, 0.49896979331970215, -0.00012417540710885078, -0.2766101360321045, 0.22809603810310364, -0.0018144212663173676, -0.2488396316766739, 0.03759242594242096, 0.41746920347213745, -0.2963125705718994, -0.208858922123909, -0.19176018238067627, 0.16334375739097595, -0.2845398783683777, -0.024078121408820152, -0.0812099277973175, 0.10663843154907227, 0.07948343455791473, 0.07767802476882935, 0.0891762226819992, 0.03276241943240166, 0.16114391386508942, 0.1430719792842865, 0.0420888289809227, -0.06925531476736069, 0.06855034828186035, 0.4472154676914215, 0.04107585549354553, -0.16497445106506348, 0.18081077933311462, -0.13459810614585876, -0.0035425126552581787, 0.3252600431442261, -0.08419692516326904, -0.11486630886793137, -0.18453826010227203, 0.22418856620788574, 0.27488377690315247, 0.5318580865859985, -0.4414385259151459, -0.26803362369537354, -0.5356901288032532, -0.19476382434368134, -0.29977744817733765, -0.03668568283319473, 0.18115946650505066, -0.02218841388821602, 0.20495660603046417, -0.4301464557647705, -0.4338744282722473, -0.13849768042564392, 0.3633369207382202, -0.21565979719161987, 0.13450030982494354, -0.1368916630744934, 0.11149579286575317, 0.1807049959897995, -0.20489895343780518, 0.10033556818962097, -0.33740463852882385, 0.012752790004014969, 0.19206123054027557, -0.3882724642753601, -0.13607145845890045, -0.19899266958236694, -0.013485722243785858, 0.47187864780426025, -0.027269046753644943, -0.42557770013809204, 0.15663108229637146, -0.12290333211421967, 0.021191902458667755, 0.3621502220630646, 0.21507832407951355, -0.10231053084135056, 0.25367477536201477, 0.1884467452764511, -0.16953769326210022, -0.05735314264893532, -0.07312091439962387, -0.5236898064613342, -0.07493674010038376, 0.10816709697246552, -0.47717151045799255, -0.2528758645057678, -0.19711987674236298, -0.06836774945259094, 0.09076178818941116, -0.19434690475463867, 0.2627507150173187, 0.18459227681159973, 0.16678251326084137, -0.09955032914876938, 0.07954110950231552, -0.20992375910282135, 0.19640302658081055, -0.128683939576149, -0.19921280443668365, 0.0066114612855017185, -0.08780995011329651, -0.26280489563941956, 0.16388049721717834, 0.16365213692188263, -0.023819684982299805, 0.1044936254620552, -0.05774945393204689, 0.084534652531147, -0.0026519112288951874, 0.1463349163532257, -0.3493955135345459, -0.07232388108968735, 0.09370650351047516, -0.04088324308395386, 0.37093037366867065, -0.23784063756465912, 0.03609728813171387, -0.20475608110427856, 0.37893468141555786, -0.2517656683921814, -0.36022648215293884, -0.058722175657749176, 0.0722682848572731, -0.3575674891471863, 0.02887479029595852, -0.523849368095398, 0.369104266166687, 0.45205560326576233, 0.08413496613502502, 0.010002829134464264, -0.10789729654788971, -0.22906874120235443, -0.015236091800034046, 0.166133314371109, 0.1557084023952484, -0.6027984619140625, 0.03751306235790253, -0.07486994564533234, 0.10127280652523041, 0.33040034770965576, 0.7473347187042236, -0.15704329311847687, 0.3759782612323761, -0.10283849388360977, 0.44759202003479004, 0.1434929519891739, 0.1725683957338333, -0.5138144493103027, 0.42069098353385925, 0.0045100972056388855, -0.14456064999103546, -0.00639689713716507, 0.09623044729232788, 0.3777562081813812, -0.11913109570741653, 0.19352874159812927, 0.33155035972595215, -0.06460600346326828, 0.09370947629213333, -0.3203207850456238, -0.32192298769950867, 0.13492846488952637, 0.30810511112213135, 0.19015991687774658, -0.2884479761123657, -0.01604200154542923, 0.3337593674659729, 0.15090513229370117, -0.17023754119873047, 0.3706079125404358, 0.1314394474029541, 0.22654925286769867, 0.1637721210718155, -0.00874067097902298, -0.22587627172470093, 0.14989928901195526, 0.06362510472536087, 0.11208894848823547, -0.1439846009016037, -0.04222266376018524, -0.282977819442749, 0.12736544013023376, -0.0255166944116354, 0.005588304251432419, 0.11121542751789093, -0.09919951111078262, -0.21857711672782898, -0.09508129954338074, 0.1362295001745224, -0.06907126307487488, -0.11327501386404037, -0.3314360976219177, 0.12929338216781616, -0.10116469860076904, 0.031282417476177216, 0.03718066215515137, -0.14106029272079468, 0.03658931702375412, 0.22813302278518677, -0.13172534108161926, -0.1346915364265442, 0.001494050957262516, 0.1887522041797638, 0.015665723010897636, -0.24015112221240997, -0.2595069110393524, 0.5918123126029968, 0.2400098443031311, 0.020717155188322067, 0.24852928519248962, -0.04437544569373131, 0.04712853953242302, -0.11076019704341888, 0.05584467574954033, 0.2861928939819336, 0.08672497421503067, 0.12396734952926636, 0.004620470106601715, -0.290357381105423, 0.083470918238163, -0.03301497548818588, 0.19676314294338226, 0.026462286710739136, 0.2717002332210541, 0.06838198006153107, 0.30776360630989075, 0.3182153105735779, -0.1597675383090973, -0.15071764588356018, 0.3479210138320923, -0.32448869943618774, 0.19424870610237122, 0.4423332214355469, -0.4264603853225708, -0.329738050699234, 0.0858769491314888, -0.23977449536323547, 0.13288243114948273, 0.1559305042028427, 0.05243898928165436, -0.049758248031139374, 0.36608871817588806, -0.07127704471349716, 0.1652616262435913, 0.13844358921051025, 0.1298765242099762, 0.20317456126213074, 0.12044142931699753, 0.13029766082763672, -0.17254230380058289, -0.06471648812294006, 0.1956181824207306, 0.35402044653892517, -0.1527121216058731, 0.05291881412267685, -0.21625851094722748, -0.30771404504776, -0.011039921082556248, 0.18976177275180817, -0.1802600771188736, 0.045926257967948914, 0.12236036360263824, 0.016413243487477303, 0.12563544511795044, 0.05564926564693451, 0.16185623407363892, 0.3633156418800354, 0.03365226835012436, -0.3247651755809784, 0.1699572503566742, -0.09470996260643005, -0.4917173981666565, -0.035466574132442474, 0.3435524106025696, -0.3346312642097473, 0.2998605966567993, 0.21900725364685059, 0.050253868103027344, -0.3155393600463867, -0.4621922969818115, 0.017577171325683594, 0.11388794332742691, 0.22941634058952332, -0.15052850544452667, 0.041552722454071045, -0.1999853402376175, 0.16224750876426697, -0.08434553444385529, -0.12780804932117462, -0.08050268143415451, 0.07361485809087753, -0.15907469391822815, -0.21853028237819672, 0.11135242879390717, -0.030093669891357422, -0.2708161175251007, -0.18253640830516815, 0.2240137904882431, -0.17105424404144287, 0.08794835954904556, 0.01596543751657009, 0.08310580253601074, -0.014135008677840233, -0.062001850455999374, -0.14541269838809967, 0.02980460785329342, -0.3128145635128021, 0.41591140627861023, 0.20498333871364594, -0.2109166383743286, -0.056101664900779724, 0.12676215171813965, -0.07173343002796173, 0.3511762022972107, -0.5438871383666992, 0.30584725737571716, -0.19194267690181732, 0.19673505425453186, -0.10464286804199219, 0.044099755585193634, 0.019037902355194092, -0.15518562495708466, 0.10735584795475006, 0.12181057780981064, -0.22671252489089966, -0.23918819427490234, -0.15586888790130615, 0.3402344286441803, -0.04488200694322586, 0.3125686049461365, 0.42549929022789, 0.5209850668907166, -0.0903388261795044, -0.16132092475891113, 0.3123970329761505, 0.1599564254283905, 0.20839285850524902, -0.30671045184135437, -0.10908082872629166, 0.29639095067977905, -0.0646376758813858, -0.14985257387161255, 0.49757736921310425, 0.14208656549453735, -0.12623780965805054, 0.24445712566375732, -0.32520678639411926, -0.05377325415611267, -0.0712481290102005, 0.2029605507850647, -0.27553167939186096, 0.2106805443763733, -0.021330278366804123, -0.17582756280899048, -0.04685202240943909, -0.37331974506378174, -0.04102325439453125, 0.15872906148433685, -0.03837696462869644, 0.21964764595031738, -0.5036860108375549, 0.22417345643043518, -0.35069647431373596, 0.17271310091018677, -0.10084110498428345, 0.32891058921813965, 0.11931714415550232, 0.19234713912010193, 0.2529749274253845, 0.02959711290895939, 0.5905702710151672, 0.1286064088344574, -0.17127501964569092, -0.14723306894302368, -0.10647501796483994, -0.19701063632965088, 0.044069740921258926, -0.10640452802181244, 0.28712335228919983, 0.4626609981060028, 0.4678311347961426, -0.3716435730457306, -0.15101954340934753, -0.29315274953842163, 0.5599127411842346, -0.011181004345417023, -0.32347530126571655, -0.021163497120141983, -0.14013245701789856, -0.5439136028289795, 0.17722129821777344, 0.1554725170135498, 0.37897956371307373, 0.10985447466373444, -0.07489842176437378, -0.12852181494235992, -0.05839977785944939, 0.33759933710098267, -0.03861717879772186, 0.13933509588241577, -0.16152305901050568, 0.23511537909507751, -0.20482686161994934, 0.1606556475162506, 0.5302141904830933, -0.023548603057861328, 0.13114407658576965, -0.27052193880081177, 0.015060292556881905, 0.04802825301885605, 0.4064317047595978, 0.014354780316352844, -0.13174918293952942, 0.36062854528427124, -0.27246996760368347, 0.27471601963043213, -0.18692347407341003, 0.5377909541130066, 0.13218793272972107, 0.07611113041639328, -0.8546545505523682, -0.3134072721004486, 0.23895570635795593, 0.20963776111602783, -0.020394422113895416, 0.24075141549110413, -0.16545630991458893, -0.2896406650543213, 0.2982032299041748, 0.09519593417644501, 0.8781993985176086, -0.43355488777160645, 0.3147646188735962, -0.3794058859348297, 0.34143996238708496, 0.5416304469108582, -0.606626033782959, -0.048749104142189026, -0.4083095192909241, 0.16152487695217133, 0.14426319301128387, 0.0018781982362270355, 0.03313228115439415, 0.424325168132782, 0.041917961090803146, 0.2461099773645401, 0.11470818519592285, 0.14268314838409424, 0.023164283484220505, 0.6419761776924133, -0.04071633517742157, -0.3181239068508148, -0.13954003155231476, 0.03970986604690552, -0.21207986772060394, -0.04499078914523125, -0.2248382270336151, 0.0811411589384079, 0.0633498877286911, 0.04676546901464462, -0.29771971702575684, -0.15693670511245728, -0.10680286586284637, 0.10426051169633865, -0.03312581405043602, -0.10952745378017426, 0.525096595287323, -0.09116792678833008, 0.24981383979320526, 0.5259625315666199, -0.1830591857433319, 0.13045723736286163, -0.34579914808273315, -0.12371479719877243, 0.17853260040283203, -0.2479609102010727, 0.023518212139606476, -0.02076007053256035, 0.05664677172899246, -0.2709764242172241, 0.1404963731765747, -0.06107646971940994, -0.17204490303993225, -0.09256397187709808, 0.5309394001960754, -0.22463659942150116, -0.18552464246749878, -0.20130416750907898, 0.006534788757562637, -0.058891285210847855, 0.01404787041246891, 0.20201633870601654, -0.0909736305475235, 0.3338695168495178, -0.0031677819788455963, -0.23409181833267212, -0.15266458690166473, 0.14350008964538574, 0.06476607173681259, -0.049458593130111694, 0.4163268804550171, 0.20877890288829803, -0.16092431545257568, -0.13654379546642303, 0.36902347207069397, 0.20423461496829987, -0.1333567202091217, 0.1669922024011612, 0.21570056676864624, 0.033674269914627075, -0.05342303588986397, 0.03140044957399368, 0.16242149472236633, -0.47701776027679443, -0.021520672366023064, -0.20940743386745453, -0.40173718333244324, 0.06507471203804016, -0.06594157218933105, 0.14008697867393494, 0.0986139252781868, 0.18323534727096558, -0.12139756232500076, 0.0774226039648056, -0.14260393381118774, 0.3031955063343048, 0.07172460108995438, 0.256786584854126, -0.20120808482170105, 0.06698109954595566, -0.2717163562774658, -0.07348692417144775, -0.13678410649299622, 0.1810038983821869, 0.08619268983602524, -0.15841451287269592, -0.13021208345890045, 0.20533613860607147, 0.2879725694656372, -0.3035103380680084, 0.19582143425941467, -0.2923232913017273, -0.15716364979743958, -0.28668224811553955, 0.2603018283843994, 0.2527884542942047, 0.019002344459295273, -0.20479188859462738, 0.24754902720451355, -0.18352040648460388, -0.30078256130218506, 0.10867150872945786, -0.06953917443752289, 0.16804596781730652, 0.15729042887687683, 0.3060739040374756, 0.5086439847946167, -0.12639230489730835, -0.24611815810203552, 0.22352883219718933, 0.537969708442688, -0.1390589475631714, 0.046900346875190735, -0.22401736676692963, 0.05626166984438896, 0.3431703746318817, 0.12553447484970093, 0.49190080165863037, -0.17949821054935455, -0.43911275267601013, 0.5194428563117981, 0.11382894963026047, -0.06278423964977264, -0.18755969405174255, 0.01032148115336895, -0.20737206935882568, -0.22746041417121887, 0.11333629488945007, 0.2939918339252472, 0.23187190294265747, -0.4301713705062866, -0.10731413960456848, 0.4482293725013733, 0.22217689454555511, -0.03201211988925934, 0.39895156025886536, 0.20362062752246857, -0.07288014888763428, 0.33514201641082764, 0.3068634867668152, 0.2198590636253357, 0.5268706679344177, -0.0581776425242424, 0.49225956201553345, 0.16629114747047424, 0.2116735875606537, -0.22725412249565125, -0.5121087431907654, -0.21156559884548187, 0.4970753490924835, 0.24008193612098694, -0.12194620817899704, -0.29912975430488586, 0.2617674171924591, 0.2839813232421875, -0.16225889325141907, -0.01326698623597622, 0.1090703010559082, -0.2722470164299011, -0.12889569997787476, -0.16766725480556488, -0.14214684069156647, 0.0024207457900047302, 0.23541316390037537, -0.2957060635089874, -0.3620262145996094, -0.10987333953380585, -0.017090551555156708, -0.13449251651763916, -0.4729762077331543, 0.3292240798473358, 0.1380201131105423, -0.038465820252895355, -0.23978525400161743, 0.3410387933254242, -0.2583080530166626, 0.06377284973859787, 0.00805618241429329, 0.15921688079833984, 0.3800532817840576, 0.4069363474845886, -0.044939715415239334, -0.03948080912232399, -0.25517240166664124, 0.12697996199131012, -0.15809015929698944, 0.4713907837867737, 0.12552334368228912, 0.244581401348114, 0.20401731133460999, -0.07577484101057053, -0.027360692620277405, 0.022505439817905426, 0.15251614153385162, -0.3925792872905731, -0.13442572951316833, -0.028997324407100677, 0.12522819638252258, -0.30831944942474365, -0.18178464472293854, 0.12923602759838104, -0.2639213502407074, 0.02680787444114685, 0.915755033493042, -0.3334183692932129, 0.08087276667356491, -0.16991117596626282, 0.025763079524040222, -0.2719908356666565, 0.4641679525375366, 0.45303237438201904, 0.095929354429245, -0.49369049072265625, -0.10087089985609055, -0.4239511489868164, 0.2393169403076172, -0.41642996668815613, 0.26480385661125183, -0.03226768597960472, 0.0965501144528389, -0.036850981414318085, 0.08344192057847977, -0.35136282444000244, 0.4076354503631592, -0.36635929346084595, 0.029120931401848793, -0.1237228661775589, 0.11585691571235657, -0.14106038212776184, 0.15945398807525635, -0.11524511128664017, -0.4063182771205902, 0.34377044439315796, -0.21577493846416473, -0.16884472966194153, -0.13410711288452148, 0.280243456363678, 0.13607707619667053, -0.15173661708831787, 0.460001677274704, 0.14068856835365295, 0.23416806757450104, 0.1425190269947052, 0.29701387882232666, -0.032654184848070145, 0.15054167807102203, -0.3552691638469696, 0.18383577466011047, 0.027949020266532898, -0.0022605769336223602, -0.13716718554496765, 0.23128530383110046, -0.047078944742679596, 0.03804658353328705, -0.037209440022706985, -0.0808861032128334, -0.13271398842334747, -0.07464073598384857, -0.11984408646821976, 0.15993386507034302, 0.041663605719804764, 0.3343164324760437, -0.03879159688949585, -0.037446536123752594, -0.3385149836540222, -0.22728480398654938, 0.25384825468063354, -0.41440945863723755, -0.2750647962093353, -0.14068013429641724, 0.04054657369852066, 0.6282335519790649, -0.2390318214893341, -0.5446509122848511, 0.08365855365991592, 0.5542652606964111, 0.09899666905403137, -0.29149389266967773, 0.2658553123474121, -0.18755725026130676, 0.06111437454819679, -0.12373602390289307, 0.48273906111717224, -0.13630354404449463, -0.2857731878757477, 0.07829415798187256, -0.1773693859577179 ]
https://github.com/huggingface/datasets/issues/1825
Datasets library not suitable for huge text datasets.
For information: it's now available in `datasets` 1.3.0. The 2.0 is reserved for even cooler features ;)
Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions??
17
Datasets library not suitable for huge text datasets. Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions?? For information: it's now available in `datasets` 1.3.0. The 2.0 is reserved for even cooler features ;)
[ -0.43452227115631104, 0.13323649764060974, 0.01177145168185234, 0.2648242115974426, 0.2677350640296936, 0.020276188850402832, 0.07535038888454437, 0.3607458770275116, -0.3179919719696045, -0.06220676004886627, 0.0359683632850647, 0.05125770345330238, -0.25497353076934814, 0.18891164660453796, 0.052126601338386536, 0.08395815640687943, 0.18551844358444214, 0.1725192666053772, 0.11441221833229065, 0.1579606831073761, 0.022779613733291626, -0.14855387806892395, -0.25367599725723267, 0.0014493688941001892, -0.5004287362098694, -0.24694135785102844, 0.0015424583107233047, -0.21716436743736267, -0.4491959512233734, -0.3404015600681305, -0.17681477963924408, 0.19938616454601288, 0.5116480588912964, 0.4627267122268677, -0.00012381772103253752, -0.28132906556129456, 0.24677607417106628, 0.0012897010892629623, -0.27234354615211487, 0.044750653207302094, 0.38767775893211365, -0.3245376944541931, -0.20082277059555054, -0.17496085166931152, 0.16089880466461182, -0.28470540046691895, 0.014890491962432861, -0.06997855007648468, 0.09651871770620346, 0.0494210310280323, 0.07792708277702332, 0.09297922998666763, 0.018717940896749496, 0.13760749995708466, 0.12420623004436493, 0.034660954028367996, -0.08224721997976303, 0.0537680983543396, 0.45054057240486145, 0.04975206404924393, -0.15521356463432312, 0.1750815063714981, -0.11661171913146973, 0.009522417560219765, 0.3391454219818115, -0.11260960251092911, -0.14051276445388794, -0.1884111911058426, 0.22548776865005493, 0.2983858287334442, 0.5142068862915039, -0.4272148609161377, -0.2893555760383606, -0.5464215278625488, -0.2044093757867813, -0.3196331262588501, -0.06693080812692642, 0.1782541126012802, -0.013110723346471786, 0.2042059302330017, -0.4558205306529999, -0.4421233832836151, -0.11685548722743988, 0.3653898239135742, -0.23501421511173248, 0.14881297945976257, -0.1368507593870163, 0.11416969448328018, 0.1659153401851654, -0.21794457733631134, 0.11262711882591248, -0.3288343548774719, 0.02191031165421009, 0.19511128962039948, -0.37740713357925415, -0.15292692184448242, -0.20385825634002686, -0.03593654930591583, 0.4822561740875244, -0.016551796346902847, -0.43327435851097107, 0.15300914645195007, -0.13893194496631622, 0.02949441783130169, 0.3459944427013397, 0.20498156547546387, -0.10330966860055923, 0.2640492618083954, 0.198286771774292, -0.1752961277961731, -0.04341216757893562, -0.07846423238515854, -0.5217925906181335, -0.05833641439676285, 0.11536943912506104, -0.4676724374294281, -0.2794632911682129, -0.17098145186901093, -0.0768820121884346, 0.08939948678016663, -0.16610518097877502, 0.3055475950241089, 0.17283914983272552, 0.15236103534698486, -0.10397744178771973, 0.085991770029068, -0.21915531158447266, 0.18378378450870514, -0.09745925664901733, -0.1802396923303604, 0.0022477307356894016, -0.10831564664840698, -0.23472736775875092, 0.17558296024799347, 0.15312032401561737, -0.043590109795331955, 0.1302117109298706, -0.057646527886390686, 0.05760037153959274, 0.01218009740114212, 0.16979417204856873, -0.3426534831523895, -0.07270107418298721, 0.11544322967529297, -0.0238886009901762, 0.3663887679576874, -0.24787400662899017, 0.05429663509130478, -0.20580615103244781, 0.3545788824558258, -0.2399347722530365, -0.36117658019065857, -0.04575712978839874, 0.07190489023923874, -0.34077978134155273, 0.02067209966480732, -0.5490442514419556, 0.3761831521987915, 0.4263477921485901, 0.09058403968811035, 0.011853739619255066, -0.11866931617259979, -0.24796126782894135, -0.016100969165563583, 0.1722048968076706, 0.13348853588104248, -0.5778154134750366, 0.0366077646613121, -0.06813952326774597, 0.11240987479686737, 0.30343618988990784, 0.7545220851898193, -0.15124894678592682, 0.33041471242904663, -0.09166665375232697, 0.44232070446014404, 0.1452019214630127, 0.15989573299884796, -0.5134207606315613, 0.42237141728401184, 0.03712131828069687, -0.16403023898601532, -0.01287803053855896, 0.10754236578941345, 0.38078561425209045, -0.1396205574274063, 0.18724612891674042, 0.33402198553085327, -0.0645647794008255, 0.08486183732748032, -0.2775013744831085, -0.3438347578048706, 0.1302630603313446, 0.2880871295928955, 0.19698752462863922, -0.2810753285884857, -0.009794019162654877, 0.3730161190032959, 0.13292360305786133, -0.1553368717432022, 0.3648221790790558, 0.13450972735881805, 0.19093622267246246, 0.1730601042509079, -0.034884341061115265, -0.23714947700500488, 0.14837928116321564, 0.07402896136045456, 0.10630184412002563, -0.17668886482715607, -0.009157426655292511, -0.30779027938842773, 0.1440502107143402, -0.02438363991677761, 0.031187189742922783, 0.1103278249502182, -0.10445217043161392, -0.21971574425697327, -0.08545094728469849, 0.13519902527332306, -0.10436410456895828, -0.11915711313486099, -0.3198545277118683, 0.1355399787425995, -0.0892162024974823, -0.00057203508913517, 0.06296633929014206, -0.13610738515853882, 0.04119165986776352, 0.22461152076721191, -0.14764684438705444, -0.1313590556383133, 0.02190789207816124, 0.18726009130477905, 0.018331432715058327, -0.23570488393306732, -0.27022576332092285, 0.5758532881736755, 0.22755166888237, 0.04800506308674812, 0.20993438363075256, -0.03094303607940674, 0.0352993980050087, -0.09204361587762833, 0.0470423698425293, 0.28214550018310547, 0.10141988098621368, 0.11709014326334, 0.034961335361003876, -0.2804763615131378, 0.10362017154693604, -0.022346124053001404, 0.1937522292137146, 0.006491214036941528, 0.25919297337532043, 0.07921925187110901, 0.3156825006008148, 0.3179972469806671, -0.1806906908750534, -0.17457467317581177, 0.35814210772514343, -0.32104140520095825, 0.21508553624153137, 0.4250733256340027, -0.43669289350509644, -0.33829614520072937, 0.072576604783535, -0.23499992489814758, 0.10562321543693542, 0.14274214208126068, 0.07311281561851501, -0.042808905243873596, 0.36314746737480164, -0.052531786262989044, 0.17528799176216125, 0.13171394169330597, 0.13527832925319672, 0.20914441347122192, 0.12576256692409515, 0.12989534437656403, -0.15941208600997925, -0.0640990138053894, 0.1919548660516739, 0.3366985023021698, -0.10904063284397125, 0.050837285816669464, -0.2087419033050537, -0.30609017610549927, 0.0004511075094342232, 0.21167993545532227, -0.16400399804115295, 0.04269295185804367, 0.12512502074241638, 0.043728720396757126, 0.13064968585968018, 0.05444473773241043, 0.12639164924621582, 0.3693229556083679, 0.05038578063249588, -0.30981701612472534, 0.1500760167837143, -0.05457937344908714, -0.4672502279281616, -0.03708343952894211, 0.3112076222896576, -0.3574158847332001, 0.2815750241279602, 0.2022109478712082, 0.0586501806974411, -0.31880804896354675, -0.44765588641166687, 0.021461008116602898, 0.13178646564483643, 0.20777206122875214, -0.14104492962360382, 0.046733610332012177, -0.19140060245990753, 0.16354747116565704, -0.1014140248298645, -0.1061108261346817, -0.07872831076383591, 0.06497275829315186, -0.16451725363731384, -0.1977960169315338, 0.1205720454454422, -0.0024963170289993286, -0.27043813467025757, -0.19324788451194763, 0.22426436841487885, -0.1564696878194809, 0.07225590944290161, 0.02761705219745636, 0.06438329815864563, -0.02584633231163025, -0.0570879764854908, -0.1401275098323822, 0.05124325305223465, -0.31306207180023193, 0.42596176266670227, 0.20224501192569733, -0.19765330851078033, -0.07767153531312943, 0.11611910164356232, -0.09129905700683594, 0.35886406898498535, -0.5269434452056885, 0.31146830320358276, -0.19906216859817505, 0.19106914103031158, -0.0856885015964508, 0.017711183056235313, 0.009398788213729858, -0.17825795710086823, 0.1044142097234726, 0.12522286176681519, -0.21862591803073883, -0.25508418679237366, -0.15666568279266357, 0.33279183506965637, -0.03448304533958435, 0.3154124319553375, 0.4613988697528839, 0.5344964861869812, -0.07024234533309937, -0.15452685952186584, 0.31311166286468506, 0.17344364523887634, 0.224176824092865, -0.33252599835395813, -0.08601214736700058, 0.2662096619606018, -0.06262476742267609, -0.11468565464019775, 0.47546786069869995, 0.14118102192878723, -0.11461552232503891, 0.2510150969028473, -0.35038644075393677, -0.024831926450133324, -0.06109974533319473, 0.17440086603164673, -0.3004293441772461, 0.23431485891342163, -0.0234207920730114, -0.17322483658790588, -0.027520332485437393, -0.3812793493270874, -0.05800902470946312, 0.17669087648391724, -0.02982115000486374, 0.23851056396961212, -0.4791228473186493, 0.2534339129924774, -0.3464233875274658, 0.17052140831947327, -0.10046161711215973, 0.36179855465888977, 0.1357780247926712, 0.18635401129722595, 0.219988614320755, 0.02147531695663929, 0.5436990261077881, 0.12410277873277664, -0.16323742270469666, -0.17019926011562347, -0.12547031044960022, -0.20087110996246338, 0.05124940350651741, -0.10644664615392685, 0.2916581630706787, 0.4566519558429718, 0.47875267267227173, -0.3634492754936218, -0.13947927951812744, -0.2989521622657776, 0.5648918151855469, -0.011685788631439209, -0.2951665222644806, -0.01168576255440712, -0.14377981424331665, -0.5237724781036377, 0.1901264786720276, 0.15330134332180023, 0.3718516528606415, 0.12376107275485992, -0.09318947792053223, -0.18312713503837585, -0.091984823346138, 0.3282530903816223, -0.03005673736333847, 0.09135574102401733, -0.14281943440437317, 0.2336042821407318, -0.2097427248954773, 0.14488425850868225, 0.5053818225860596, -0.03852901607751846, 0.14477740228176117, -0.28992563486099243, 0.005515569821000099, 0.06989848613739014, 0.38708534836769104, -0.0314590185880661, -0.14350976049900055, 0.3864055871963501, -0.25101691484451294, 0.25984644889831543, -0.193682461977005, 0.5484660267829895, 0.12828771770000458, 0.05516691505908966, -0.8614723086357117, -0.3365224301815033, 0.2391015887260437, 0.2278057336807251, -0.018453486263751984, 0.22788237035274506, -0.18375413119792938, -0.29246756434440613, 0.2764533758163452, 0.10327191650867462, 0.8179152011871338, -0.45558130741119385, 0.324409157037735, -0.4055632948875427, 0.341164767742157, 0.5398201942443848, -0.5751267075538635, -0.03653480485081673, -0.398142009973526, 0.1355864405632019, 0.12986670434474945, 0.006696969270706177, 0.04027433693408966, 0.41503995656967163, 0.07179689407348633, 0.276703804731369, 0.11566287279129028, 0.13288964331150055, 0.008333949372172356, 0.64969402551651, -0.07788649946451187, -0.3102949559688568, -0.13483679294586182, 0.03700500726699829, -0.19221583008766174, -0.050562288612127304, -0.22435396909713745, 0.10704053193330765, 0.11517380177974701, 0.060799770057201385, -0.3009156584739685, -0.1705034077167511, -0.11337607353925705, 0.1218411922454834, -0.031833503395318985, -0.10877345502376556, 0.5061595439910889, -0.0841541737318039, 0.2461422234773636, 0.5565768480300903, -0.17381855845451355, 0.12752646207809448, -0.3588402569293976, -0.12743671238422394, 0.1747511923313141, -0.2499726116657257, 0.026444094255566597, -0.016945337876677513, 0.09738656133413315, -0.2636165916919708, 0.1535225212574005, -0.07091610878705978, -0.1601659208536148, -0.08659830689430237, 0.5369493961334229, -0.20563611388206482, -0.1871606856584549, -0.21344801783561707, 0.01214100793004036, -0.06266723573207855, 0.01025798637419939, 0.19152578711509705, -0.05729299411177635, 0.29915523529052734, -0.013397160917520523, -0.24190157651901245, -0.14464519917964935, 0.14303293824195862, 0.06400150060653687, -0.04269038513302803, 0.4207990765571594, 0.1829645186662674, -0.1477910578250885, -0.12789666652679443, 0.39986032247543335, 0.20367814600467682, -0.10331861674785614, 0.18465252220630646, 0.20323529839515686, 0.029057368636131287, -0.06014402210712433, 0.04956626519560814, 0.13748660683631897, -0.4985470175743103, -0.052676402032375336, -0.21401897072792053, -0.39603450894355774, 0.06683504581451416, -0.06651592254638672, 0.14781896770000458, 0.11989776045084, 0.15610478818416595, -0.14838984608650208, 0.07023143768310547, -0.13346242904663086, 0.30909428000450134, 0.07083015888929367, 0.2612695097923279, -0.20052950084209442, 0.08245065808296204, -0.28941524028778076, -0.05958520621061325, -0.14077866077423096, 0.17343178391456604, 0.09071244299411774, -0.15062788128852844, -0.15724070370197296, 0.20405656099319458, 0.30150482058525085, -0.28974953293800354, 0.19620397686958313, -0.27989041805267334, -0.1721053123474121, -0.3013719618320465, 0.2562597393989563, 0.2545863091945648, 0.024784386157989502, -0.20373821258544922, 0.21781301498413086, -0.18802469968795776, -0.31080543994903564, 0.11956296861171722, -0.0631846934556961, 0.14131629467010498, 0.14139479398727417, 0.32351168990135193, 0.5331245064735413, -0.11390044540166855, -0.25036346912384033, 0.21664196252822876, 0.5411871075630188, -0.1625244915485382, 0.04645421355962753, -0.198503777384758, 0.05624834820628166, 0.34164494276046753, 0.12089969217777252, 0.4793933629989624, -0.16099441051483154, -0.44856691360473633, 0.5291868448257446, 0.10181185603141785, -0.05792183429002762, -0.18641090393066406, -0.020484663546085358, -0.18862265348434448, -0.21632905304431915, 0.10320490598678589, 0.2899166941642761, 0.25100359320640564, -0.4375898838043213, -0.1248645931482315, 0.43206048011779785, 0.2399144321680069, -0.024066055193543434, 0.421100378036499, 0.23112700879573822, -0.09215418994426727, 0.3365713357925415, 0.32323840260505676, 0.24094745516777039, 0.5528312921524048, -0.04776839166879654, 0.5267716646194458, 0.17541569471359253, 0.19595353305339813, -0.19602790474891663, -0.5036004185676575, -0.22269834578037262, 0.4708329737186432, 0.22832992672920227, -0.1109243854880333, -0.3145102262496948, 0.22952497005462646, 0.26375100016593933, -0.14775171875953674, -0.019117875024676323, 0.1155165433883667, -0.2704106867313385, -0.18470744788646698, -0.1443493366241455, -0.13648134469985962, 0.026638053357601166, 0.26353830099105835, -0.2816629111766815, -0.3591855764389038, -0.10414080321788788, -0.03355035185813904, -0.08909569680690765, -0.45429086685180664, 0.37713369727134705, 0.15308481454849243, -0.030548930168151855, -0.23759599030017853, 0.3415531516075134, -0.25116461515426636, 0.0685579776763916, 0.013933701440691948, 0.1642076075077057, 0.37052279710769653, 0.3742660582065582, -0.04299544543027878, -0.043473269790410995, -0.2629965543746948, 0.1246316134929657, -0.16436073184013367, 0.46313515305519104, 0.1134568378329277, 0.24559655785560608, 0.2111252099275589, -0.07804757356643677, -0.01546905655413866, 0.014795022085309029, 0.12942300736904144, -0.40318629145622253, -0.16285455226898193, -0.013906709849834442, 0.12176042050123215, -0.2851451337337494, -0.1575857400894165, 0.17192646861076355, -0.24319005012512207, 0.0065634967759251595, 0.919309139251709, -0.32520967721939087, 0.08081874251365662, -0.1628735214471817, 0.02491193264722824, -0.2839210331439972, 0.46457749605178833, 0.45191800594329834, 0.08232544362545013, -0.44553643465042114, -0.09147701412439346, -0.4034663736820221, 0.2238801121711731, -0.40401986241340637, 0.2532670199871063, -0.044952329248189926, 0.10310899466276169, -0.05480413883924484, 0.08098092675209045, -0.365802526473999, 0.43179553747177124, -0.3566432297229767, 0.02010686695575714, -0.0732470452785492, 0.09479202330112457, -0.13407127559185028, 0.15322595834732056, -0.11740759015083313, -0.4135873317718506, 0.33539101481437683, -0.2376120686531067, -0.16863948106765747, -0.12950709462165833, 0.28475597500801086, 0.15210793912410736, -0.1714218407869339, 0.44866475462913513, 0.1417049765586853, 0.21210068464279175, 0.1436333954334259, 0.2874581515789032, -0.023393716663122177, 0.17063549160957336, -0.3489333689212799, 0.17795762419700623, 0.005574436858296394, -0.01665002852678299, -0.14312300086021423, 0.2426622211933136, -0.01861375942826271, 0.04697461053729057, -0.0603477880358696, -0.09169217944145203, -0.12637118995189667, -0.07897108793258667, -0.1517827957868576, 0.15401965379714966, 0.05766543373465538, 0.34082671999931335, -0.04826587438583374, -0.0625469833612442, -0.3105648159980774, -0.2342224419116974, 0.22982217371463776, -0.42131268978118896, -0.2648097276687622, -0.18015621602535248, 0.015433333814144135, 0.6642016172409058, -0.22019682824611664, -0.5252723097801208, 0.10114303976297379, 0.5639671683311462, 0.09118092060089111, -0.3091641366481781, 0.2561299204826355, -0.18193285167217255, 0.06292548775672913, -0.1353604793548584, 0.4806588590145111, -0.1493544578552246, -0.295160174369812, 0.053943533450365067, -0.1682289093732834 ]
https://github.com/huggingface/datasets/issues/1825
Datasets library not suitable for huge text datasets.
Hi @alexvaca0 , we have optimized Datasets' disk usage in the latest release v1.5. Feel free to update your Datasets version ```shell pip install -U datasets ``` and see if it better suits your needs.
Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions??
35
Datasets library not suitable for huge text datasets. Hi, I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training. Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts). Any suggestions?? Hi @alexvaca0 , we have optimized Datasets' disk usage in the latest release v1.5. Feel free to update your Datasets version ```shell pip install -U datasets ``` and see if it better suits your needs.
[ -0.40281546115875244, 0.0771397054195404, 0.008600357919931412, 0.3193153142929077, 0.3035770654678345, 0.023349441587924957, 0.030155599117279053, 0.35593098402023315, -0.2499682754278183, -0.024190381169319153, 0.03889119625091553, 0.10702231526374817, -0.26298052072525024, 0.1188514456152916, 0.03471608832478523, 0.10915125906467438, 0.21070393919944763, 0.17219865322113037, 0.10670297592878342, 0.14610496163368225, 0.0033637285232543945, -0.07689890265464783, -0.23595556616783142, -0.044224172830581665, -0.4917672276496887, -0.2467966079711914, -0.0052546728402376175, -0.22569036483764648, -0.4161314070224762, -0.3108101189136505, -0.14630143344402313, 0.20579244196414948, 0.4900796115398407, 0.49806514382362366, -0.00012313330080360174, -0.269946426153183, 0.2363724559545517, 0.018644152209162712, -0.3187197148799896, 0.05089011788368225, 0.4693200886249542, -0.3577677011489868, -0.20286013185977936, -0.20813390612602234, 0.16594281792640686, -0.21710288524627686, -0.0014260616153478622, -0.11831577122211456, 0.10756462812423706, 0.05412041023373604, 0.09700199961662292, 0.13032439351081848, 0.010550517588853836, 0.1590500921010971, 0.10155462473630905, 0.09348238259553909, -0.09405004978179932, 0.05962630733847618, 0.46318158507347107, 0.08984265476465225, -0.16768446564674377, 0.22011668980121613, -0.1535091996192932, 0.02759987860918045, 0.3630456030368805, -0.08729980885982513, -0.09161574393510818, -0.16631455719470978, 0.27466943860054016, 0.25929495692253113, 0.5688686370849609, -0.4413164556026459, -0.2612149715423584, -0.5455202460289001, -0.22192656993865967, -0.272244930267334, 0.004418402910232544, 0.16777004301548004, -0.03759205341339111, 0.1915646344423294, -0.4412500262260437, -0.4712108373641968, -0.08853068947792053, 0.34929192066192627, -0.21838773787021637, 0.07992888987064362, -0.16633421182632446, 0.10266625881195068, 0.23827138543128967, -0.24183709919452667, 0.10281215608119965, -0.3338503837585449, 0.002266574651002884, 0.1644579917192459, -0.3736112415790558, -0.14782534539699554, -0.214248925447464, -0.057693757116794586, 0.4252465069293976, 0.0029207784682512283, -0.41507163643836975, 0.1444520652294159, -0.12379877269268036, 0.03630919009447098, 0.3516075909137726, 0.2578931748867035, -0.09909719973802567, 0.25036805868148804, 0.19797749817371368, -0.17370381951332092, -0.01600058004260063, -0.1105489656329155, -0.520844042301178, -0.06630012392997742, 0.13767209649085999, -0.5249611139297485, -0.264523983001709, -0.17633412778377533, -0.08627117425203323, 0.07800401747226715, -0.09805011749267578, 0.24598301947116852, 0.1834302544593811, 0.18184682726860046, -0.07344236969947815, 0.12008409202098846, -0.1878761351108551, 0.16947056353092194, -0.12261680513620377, -0.16767023503780365, 0.004356986377388239, -0.10667023062705994, -0.22870604693889618, 0.11159493774175644, 0.17005814611911774, -0.012980084866285324, 0.11932969838380814, -0.060493335127830505, 0.03899722918868065, 0.009637754410505295, 0.14253544807434082, -0.3770750164985657, -0.07477983087301254, 0.12505854666233063, -0.01624726504087448, 0.38194167613983154, -0.2452014535665512, 0.04385800659656525, -0.23106005787849426, 0.36845099925994873, -0.2714809477329254, -0.37216025590896606, -0.11704137921333313, 0.0728527083992958, -0.32597047090530396, -0.005312833935022354, -0.6098573207855225, 0.3593026399612427, 0.415455162525177, 0.08783785998821259, -0.05402810126543045, -0.1027546226978302, -0.24953685700893402, -0.051295485347509384, 0.16333827376365662, 0.15368354320526123, -0.5558544397354126, 0.04240521043539047, -0.10500587522983551, 0.1381259709596634, 0.3448682427406311, 0.7818448543548584, -0.15406885743141174, 0.34431740641593933, -0.0837312862277031, 0.3829892873764038, 0.13972505927085876, 0.08650307357311249, -0.5390247702598572, 0.42604774236679077, 0.08055578172206879, -0.14692983031272888, 0.016578294336795807, 0.10894696414470673, 0.35082393884658813, -0.14016272127628326, 0.15494240820407867, 0.31973642110824585, -0.01682317443192005, 0.09553828090429306, -0.3492802083492279, -0.31668785214424133, 0.12138747423887253, 0.3060804605484009, 0.16664306819438934, -0.3364424705505371, -0.026737943291664124, 0.37385550141334534, 0.15008363127708435, -0.12572862207889557, 0.3451298773288727, 0.16953229904174805, 0.24980449676513672, 0.17972368001937866, -0.003174913115799427, -0.21268698573112488, 0.12864911556243896, 0.09079814702272415, 0.16976302862167358, -0.19139958918094635, -0.02754548192024231, -0.2772669196128845, 0.14925938844680786, -0.016702383756637573, 0.019645102322101593, 0.10863104462623596, -0.08331751823425293, -0.21049559116363525, -0.057819291949272156, 0.13697229325771332, -0.06656861305236816, -0.15156425535678864, -0.31480076909065247, 0.14000700414180756, -0.06456717848777771, 0.023590093478560448, 0.05243021249771118, -0.11672331392765045, 0.01833532378077507, 0.20916569232940674, -0.16726833581924438, -0.13639476895332336, 0.012123080901801586, 0.1948983371257782, 0.015176478773355484, -0.21381165087223053, -0.1999005377292633, 0.5545612573623657, 0.23319685459136963, 0.05911608412861824, 0.2807883620262146, -0.002175677567720413, 0.05380617454648018, -0.09840886294841766, 0.003216944634914398, 0.21292592585086823, 0.08226199448108673, 0.1509801745414734, -0.01226453110575676, -0.2621985971927643, 0.12468259036540985, 0.01819712296128273, 0.23002652823925018, 0.01793435961008072, 0.26788246631622314, 0.06905899941921234, 0.32527926564216614, 0.31911060214042664, -0.1439492255449295, -0.15288305282592773, 0.3700922727584839, -0.3132965564727783, 0.2127896547317505, 0.4723609387874603, -0.40988263487815857, -0.3531786799430847, 0.07248251885175705, -0.17159384489059448, 0.1418943852186203, 0.15436425805091858, 0.057990726083517075, -0.0924888476729393, 0.3867771625518799, -0.04526601731777191, 0.2055208384990692, 0.13963493704795837, 0.11169120669364929, 0.1776806116104126, 0.13021080195903778, 0.11578698456287384, -0.16113141179084778, -0.0654391497373581, 0.17197389900684357, 0.3680226504802704, -0.11275434494018555, 0.0396665558218956, -0.20157146453857422, -0.2762776017189026, 0.011958091519773006, 0.22388702630996704, -0.15219783782958984, 0.01270207203924656, 0.09252201020717621, 0.04160227254033089, 0.143793523311615, 0.07407281547784805, 0.2089533656835556, 0.3292386531829834, 0.008560249581933022, -0.3077065348625183, 0.11535969376564026, -0.0328584723174572, -0.49638885259628296, -0.028309080749750137, 0.3630422353744507, -0.3414941728115082, 0.29481273889541626, 0.15391533076763153, 0.07663291692733765, -0.32043933868408203, -0.40332987904548645, -0.013397037982940674, 0.102663554251194, 0.22246141731739044, -0.15168176591396332, 0.07971430569887161, -0.25055593252182007, 0.18064454197883606, -0.06579865515232086, -0.1377868354320526, -0.05744470655918121, 0.06796114891767502, -0.15129749476909637, -0.2519557476043701, 0.09811560809612274, -0.018009506165981293, -0.30147266387939453, -0.17827489972114563, 0.2398396134376526, -0.15044361352920532, 0.11317753791809082, 0.014203811064362526, 0.07040701061487198, -0.016082625836133957, -0.05724942311644554, -0.13295935094356537, 0.031835462898015976, -0.35836148262023926, 0.4102058410644531, 0.2523450255393982, -0.17545565962791443, -0.0017285123467445374, 0.15104304254055023, -0.08669455349445343, 0.29853302240371704, -0.5361648201942444, 0.24823249876499176, -0.22713212668895721, 0.17070113122463226, -0.0989372581243515, 0.09395385533571243, 0.008523419499397278, -0.14089961349964142, 0.11263753473758698, 0.13575232028961182, -0.2377646565437317, -0.24940428137779236, -0.12992694973945618, 0.3253563940525055, -0.0392635241150856, 0.31881269812583923, 0.5074323415756226, 0.4777008295059204, -0.07447483390569687, -0.11316332221031189, 0.30970504879951477, 0.18411259353160858, 0.24321050941944122, -0.3235912024974823, -0.11376471072435379, 0.25416508316993713, -0.07053790986537933, -0.13443470001220703, 0.4563223719596863, 0.1818731129169464, -0.1035492867231369, 0.2594855725765228, -0.3549361228942871, -0.0414932519197464, -0.058315761387348175, 0.2022915482521057, -0.2457619607448578, 0.2087106704711914, -0.01662687584757805, -0.16092133522033691, -0.03181228041648865, -0.3627414107322693, -0.054764602333307266, 0.16779325902462006, -0.011003553867340088, 0.22179289162158966, -0.4764857292175293, 0.2394004613161087, -0.399272084236145, 0.1984274983406067, -0.17302700877189636, 0.3066079616546631, 0.14190635085105896, 0.2114691436290741, 0.2595524191856384, 0.017400676384568214, 0.5492854118347168, 0.15288759768009186, -0.14753372967243195, -0.16989766061306, -0.14218780398368835, -0.25792428851127625, 0.055085841566324234, -0.15058603882789612, 0.2799947261810303, 0.43576011061668396, 0.5038670301437378, -0.3647417426109314, -0.20128567516803741, -0.3397356867790222, 0.5800449252128601, -0.048056405037641525, -0.2907162308692932, -0.026797184720635414, -0.21803727746009827, -0.5310128331184387, 0.1750020980834961, 0.18727314472198486, 0.3673219084739685, 0.1741112470626831, -0.05827929079532623, -0.1614656299352646, -0.0703890472650528, 0.3420443534851074, -0.04643941670656204, 0.18441590666770935, -0.1968509405851364, 0.23350733518600464, -0.21284571290016174, 0.11891011893749237, 0.5117977261543274, -0.04240666329860687, 0.07314975559711456, -0.20603549480438232, -0.0037422850728034973, 0.05004321411252022, 0.37260085344314575, -0.03304789960384369, -0.1493561565876007, 0.3144882023334503, -0.29595327377319336, 0.27986812591552734, -0.21720951795578003, 0.4888460338115692, 0.1572149097919464, 0.09786773473024368, -0.7616376876831055, -0.36319249868392944, 0.23610162734985352, 0.24650458991527557, -0.022233329713344574, 0.1951896846294403, -0.15371431410312653, -0.28622204065322876, 0.3004186153411865, 0.11055561900138855, 0.8260051012039185, -0.4686470627784729, 0.2963402569293976, -0.3631172180175781, 0.3105921745300293, 0.5010321736335754, -0.6091917753219604, -0.032177988439798355, -0.3963598608970642, 0.13955487310886383, 0.15462055802345276, 0.00865180417895317, 0.04584360495209694, 0.40683281421661377, 0.03987779840826988, 0.30783823132514954, 0.10454592108726501, 0.09896804392337799, -0.013291656970977783, 0.6598167419433594, -0.10081672668457031, -0.3176693618297577, -0.15282301604747772, 0.06033322960138321, -0.2292148321866989, -0.048292968422174454, -0.1904265284538269, 0.0984812080860138, 0.1104763001203537, 0.04459407925605774, -0.3024245500564575, -0.2183113396167755, -0.10782215744256973, 0.1403215527534485, -0.03097992017865181, -0.09606648981571198, 0.49862369894981384, -0.0021380968391895294, 0.20628255605697632, 0.5608212947845459, -0.16030244529247284, 0.1573556363582611, -0.386406272649765, -0.08734666556119919, 0.18494677543640137, -0.19999876618385315, -0.0410521999001503, -0.05678849294781685, 0.09583810716867447, -0.3077462911605835, 0.1138441190123558, -0.06882566213607788, -0.15529006719589233, -0.08213967084884644, 0.4945063591003418, -0.17613694071769714, -0.23967038094997406, -0.2425159215927124, -0.02398965135216713, -0.05906793847680092, 0.026395108550786972, 0.23462176322937012, -0.07679528743028641, 0.37473973631858826, -0.030220333486795425, -0.2205342799425125, -0.1249232143163681, 0.13245953619480133, 0.08724062144756317, -0.03430038318037987, 0.4078710675239563, 0.14042717218399048, -0.1649450659751892, -0.1530834436416626, 0.4082036018371582, 0.12470769882202148, -0.1289009153842926, 0.21056778728961945, 0.23442447185516357, 0.008898600935935974, -0.05016116425395012, 0.003025513142347336, 0.1752152293920517, -0.5009051561355591, -0.09188414365053177, -0.18051651120185852, -0.3987698256969452, 0.07365673780441284, -0.04599424824118614, 0.1356542706489563, 0.1200379803776741, 0.061237841844558716, -0.13960282504558563, 0.060801610350608826, -0.15730935335159302, 0.3485962152481079, 0.07973535358905792, 0.23960134387016296, -0.22430458664894104, 0.039843443781137466, -0.21724173426628113, -0.09722684323787689, -0.1267707347869873, 0.1385210156440735, 0.09394043684005737, -0.1650671660900116, -0.1413876861333847, 0.1879233866930008, 0.2528238594532013, -0.2673342525959015, 0.187946155667305, -0.2861519455909729, -0.15805377066135406, -0.3490874171257019, 0.2193031907081604, 0.25477010011672974, 0.022253546863794327, -0.18584157526493073, 0.21628205478191376, -0.20886188745498657, -0.2859119176864624, 0.11250477284193039, -0.06780499219894409, 0.1309942752122879, 0.148081973195076, 0.31666696071624756, 0.5489245653152466, -0.13662731647491455, -0.29805445671081543, 0.19850194454193115, 0.5358868837356567, -0.11976931244134903, 0.034727901220321655, -0.20658911764621735, 0.05749759450554848, 0.3748193085193634, 0.10818852484226227, 0.48121580481529236, -0.16833367943763733, -0.44681596755981445, 0.4947698712348938, 0.1289743334054947, -0.05712661147117615, -0.2476886808872223, 0.002982005476951599, -0.18063530325889587, -0.2533295750617981, 0.08099384605884552, 0.31372785568237305, 0.20142066478729248, -0.40668410062789917, -0.1012641042470932, 0.5237576365470886, 0.1653323769569397, 0.0029219049029052258, 0.4272448718547821, 0.22437094151973724, -0.11267377436161041, 0.31663352251052856, 0.29394152760505676, 0.2337687909603119, 0.5904648303985596, -0.07540088146924973, 0.5070326924324036, 0.21955719590187073, 0.1999547928571701, -0.2541436553001404, -0.4688108563423157, -0.2125880867242813, 0.4607970416545868, 0.20106464624404907, -0.10692320019006729, -0.32819026708602905, 0.23881030082702637, 0.22325365245342255, -0.16921012103557587, -0.05010700970888138, 0.07953296601772308, -0.2972472012042999, -0.19670163094997406, -0.04977339878678322, -0.09385398030281067, 0.03154905140399933, 0.2399546504020691, -0.29300031065940857, -0.3910030126571655, -0.14380471408367157, -0.00944511592388153, -0.10312801599502563, -0.39924681186676025, 0.3458116948604584, 0.1379219889640808, -0.03306058794260025, -0.22056598961353302, 0.32623153924942017, -0.24200530350208282, 0.07786600291728973, -0.03038424625992775, 0.14177563786506653, 0.3925175666809082, 0.36106404662132263, -0.04226898401975632, -0.048545751720666885, -0.2711449861526489, 0.14921987056732178, -0.18286766111850739, 0.4642488658428192, 0.06104455143213272, 0.2757786214351654, 0.18165919184684753, -0.05596297234296799, -0.03373543173074722, -0.02688463404774666, 0.12356935441493988, -0.3364807069301605, -0.148485004901886, -0.021715842187404633, 0.08024138957262039, -0.2911401391029358, -0.14841963350772858, 0.14952853322029114, -0.24760887026786804, -0.035649798810482025, 0.8947802186012268, -0.2939741611480713, 0.07426154613494873, -0.1504417210817337, 0.03623664751648903, -0.2652699053287506, 0.4319397211074829, 0.4181506633758545, 0.004571013152599335, -0.47419098019599915, -0.09209886193275452, -0.46547821164131165, 0.1554790884256363, -0.38607293367385864, 0.2582817077636719, -0.0038842568174004555, 0.10885903239250183, -0.04330555349588394, 0.041787080466747284, -0.3536689877510071, 0.4079422354698181, -0.3383271098136902, -0.01262405514717102, -0.11600944399833679, 0.13264383375644684, -0.1304859071969986, 0.1457921415567398, -0.06970833241939545, -0.42477110028266907, 0.3027375042438507, -0.22064536809921265, -0.1616445779800415, -0.13892188668251038, 0.32901278138160706, 0.1359475553035736, -0.08470776677131653, 0.43300366401672363, 0.14649060368537903, 0.19335004687309265, 0.14409300684928894, 0.23000097274780273, -0.010187838226556778, 0.1664082258939743, -0.30353084206581116, 0.16409684717655182, 0.0135091133415699, 0.03175150230526924, -0.1838485300540924, 0.2569766938686371, -0.03700018674135208, 0.06747879832983017, -0.06181790307164192, -0.07447779923677444, -0.11719736456871033, -0.07237522304058075, -0.10054879635572433, 0.1552352011203766, 0.06508901715278625, 0.327576607465744, -0.03248249739408493, -0.05943646281957626, -0.3826102018356323, -0.22084203362464905, 0.22810225188732147, -0.3616302013397217, -0.2914261221885681, -0.15027378499507904, 0.0420757532119751, 0.663684606552124, -0.1947220265865326, -0.5574446320533752, 0.09418901056051254, 0.5367159843444824, 0.09903465956449509, -0.31794002652168274, 0.27287933230400085, -0.17798420786857605, 0.05763895437121391, -0.08851709961891174, 0.5082893371582031, -0.15836915373802185, -0.3004288375377655, 0.06396497786045074, -0.15440648794174194 ]
https://github.com/huggingface/datasets/issues/1821
Provide better exception message when one of many files results in an exception
Hi! Thank you for reporting this issue. I agree that the information about the exception should be more clear and explicit. I could take on this issue. On the meantime, as you can see from the exception stack trace, HF Datasets uses pandas to read the CSV files. You can pass arguments to `pandas.read_csv` by passing additional keyword arguments to `load_dataset`. For example, you may find useful this argument: - `error_bad_lines` : bool, default True Lines with too many fields (e.g. a csv line with too many commas) will by default cause an exception to be raised, and no DataFrame will be returned. If False, then these “bad lines” will be dropped from the DataFrame that is returned. You could try: ```python datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files), error_bad_lines=False) ```
I find when I process many files, i.e. ``` train_files = glob.glob('rain*.csv') validation_files = glob.glob(validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) ``` I sometimes encounter an error due to one of the files being misformed (i.e. no data, or a comma in a field that isn't quoted, etc). For example, this is the tail of an exception which I suspect is due to a stray comma. > File "pandas/_libs/parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read > File "pandas/_libs/parsers.pyx", line 783, in pandas._libs.parsers.TextReader._read_low_memory > File "pandas/_libs/parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows > File "pandas/_libs/parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows > File "pandas/_libs/parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error > pandas.errors.ParserError: Error tokenizing data. C error: Expected 2 fields in line 559, saw 3 It would be nice if the exception trace contained the name of the file being processed (I have 250 separate files!)
129
Provide better exception message when one of many files results in an exception I find when I process many files, i.e. ``` train_files = glob.glob('rain*.csv') validation_files = glob.glob(validation*.csv') datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files)) ``` I sometimes encounter an error due to one of the files being misformed (i.e. no data, or a comma in a field that isn't quoted, etc). For example, this is the tail of an exception which I suspect is due to a stray comma. > File "pandas/_libs/parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read > File "pandas/_libs/parsers.pyx", line 783, in pandas._libs.parsers.TextReader._read_low_memory > File "pandas/_libs/parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows > File "pandas/_libs/parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows > File "pandas/_libs/parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error > pandas.errors.ParserError: Error tokenizing data. C error: Expected 2 fields in line 559, saw 3 It would be nice if the exception trace contained the name of the file being processed (I have 250 separate files!) Hi! Thank you for reporting this issue. I agree that the information about the exception should be more clear and explicit. I could take on this issue. On the meantime, as you can see from the exception stack trace, HF Datasets uses pandas to read the CSV files. You can pass arguments to `pandas.read_csv` by passing additional keyword arguments to `load_dataset`. For example, you may find useful this argument: - `error_bad_lines` : bool, default True Lines with too many fields (e.g. a csv line with too many commas) will by default cause an exception to be raised, and no DataFrame will be returned. If False, then these “bad lines” will be dropped from the DataFrame that is returned. You could try: ```python datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files), error_bad_lines=False) ```
[ -0.1087329089641571, -0.41903063654899597, 0.007515665143728256, 0.2815200090408325, 0.18453587591648102, 0.16356301307678223, 0.14092257618904114, 0.39342936873435974, 0.22628816962242126, 0.28828561305999756, 0.2727561593055725, -0.21747490763664246, -0.05892098695039749, -0.2714683711528778, -0.24078428745269775, -0.1619679182767868, 0.08607456833124161, 0.12357846647500992, 0.2567388415336609, -0.040772393345832825, -0.043557461351156235, 0.17293187975883484, 0.11452484130859375, 0.25118139386177063, -0.4897429049015045, -0.2769162058830261, -0.3172522783279419, 0.3817559778690338, 0.2166707068681717, -0.5677109360694885, 0.0001507531851530075, 0.03105723112821579, 0.10030313581228256, 0.5251939296722412, -0.00011578619159990922, -0.15041692554950714, 0.15018679201602936, 0.027188139036297798, -0.377885103225708, -0.11167491972446442, -0.18566638231277466, -0.6877270936965942, -0.024155983701348305, -0.28132978081703186, 0.35809025168418884, -0.03667057305574417, 0.24455218017101288, -0.15909475088119507, 0.3761558532714844, 0.35479992628097534, 0.09479531645774841, -0.16531194746494293, 0.2582826614379883, -0.0023045833222568035, 0.34243836998939514, 0.14315523207187653, 0.0669533833861351, 0.26457732915878296, 0.3179493546485901, -0.4284537434577942, -0.22579705715179443, 0.06724707782268524, -0.21005943417549133, 0.0604889914393425, 0.07222592830657959, 0.054776936769485474, 0.37658101320266724, -0.17145612835884094, -0.2216401994228363, 0.4012446999549866, 0.204623743891716, -0.14465147256851196, -0.5563563704490662, -0.6639553308486938, 0.18680262565612793, -0.2990669906139374, -0.0956110879778862, 0.3052101731300354, -0.22465719282627106, 0.11646756529808044, 0.3411989212036133, -0.15647147595882416, -0.36960142850875854, -0.06564968824386597, -0.09434439241886139, -0.1774519681930542, 0.11633327603340149, -0.06657258421182632, 0.0795392096042633, -0.03010135143995285, -0.22959186136722565, -0.0244004987180233, -0.14052420854568481, -0.06595662236213684, -0.5154398083686829, -0.06112361699342728, 0.13987323641777039, -0.5946625471115112, 0.23441949486732483, -0.38725054264068604, 0.34230872988700867, 0.12680712342262268, -0.08760944753885269, 0.32406073808670044, 0.36730462312698364, -0.18026483058929443, 0.044651154428720474, -0.07358967512845993, 0.45881789922714233, 0.09755608439445496, -0.12863793969154358, -0.17862588167190552, 0.058048415929079056, -0.28653398156166077, 0.013182710856199265, 0.4915899634361267, 0.09726947546005249, -0.24222655594348907, -0.5625765323638916, 0.17404548823833466, -0.2998228371143341, -0.12949992716312408, -0.10190767049789429, 0.38631105422973633, -0.1491401642560959, 0.29414722323417664, -0.0718407928943634, 0.07430760562419891, 0.10585775226354599, -0.3490166962146759, 0.01900290697813034, 0.09550635516643524, -0.13098976016044617, 0.1971980780363083, -0.10667896270751953, 0.04265310615301132, -0.10532791912555695, 0.21252839267253876, 0.16128823161125183, -0.1958126723766327, -0.026666492223739624, -0.4223648011684418, -0.012304618954658508, 0.13475535809993744, 0.0360868014395237, 0.2787170708179474, 0.11800745129585266, -0.19979171454906464, -0.015529833734035492, 0.039091721177101135, -0.5052163004875183, -0.40552645921707153, -0.1516360640525818, -0.0190637968480587, 0.2258603274822235, 0.20260785520076752, -0.1184595450758934, 0.2543495297431946, -0.06530163437128067, -0.11490365862846375, -0.0961175337433815, -0.11684925854206085, 0.25913092494010925, -0.31468477845191956, 0.07447277009487152, 0.5779364705085754, -0.3668696880340576, 0.28352537751197815, -0.1532498002052307, 0.007168225944042206, 0.3014097511768341, 0.501670241355896, -0.22134992480278015, 0.39205724000930786, -0.30437567830085754, 0.22149084508419037, 0.02144148200750351, -0.2410392314195633, 0.06961259245872498, 0.5922528505325317, -0.09950824081897736, 0.3384661376476288, 0.4496501088142395, -0.054826319217681885, 0.02993164397776127, -0.13199809193611145, 0.23141539096832275, 0.10583298653364182, -0.2101559042930603, 0.11930979043245316, -0.1383862942457199, -0.016488051041960716, 0.05863981321454048, -0.08800491690635681, -0.04579313471913338, -0.16987118124961853, 0.32144567370414734, -0.1717795431613922, 0.6836060285568237, -0.20084309577941895, -0.19860337674617767, 0.32708054780960083, 0.37061694264411926, 0.18016868829727173, -0.3365703821182251, 0.108139269053936, -0.14339306950569153, -0.05629417672753334, -0.09564517438411713, -0.04063081741333008, -0.3002389073371887, -0.38443130254745483, 0.04820872098207474, -0.18805508315563202, 0.11391662061214447, 0.04213637486100197, 0.09093836694955826, 0.11649607121944427, -0.2879987061023712, -0.11917291581630707, 0.12674443423748016, 0.4215738773345947, -0.3311336636543274, 0.22091080248355865, 0.20748522877693176, 0.040895238518714905, -0.128480926156044, -0.09508063644170761, 0.19662855565547943, 0.010517731308937073, 0.3892308473587036, -0.23856598138809204, -0.04539067670702934, 0.43326982855796814, 0.0857672467827797, -0.06951351463794708, -0.005843736231327057, 0.008137047290802002, 0.16192401945590973, 0.15542709827423096, -0.20694296061992645, -0.1082887202501297, -0.20729753375053406, 0.015207566320896149, -0.1600503921508789, 0.15278226137161255, 0.18033885955810547, 0.1812220960855484, 0.1355610340833664, 0.06013408303260803, 0.19992083311080933, 0.08419680595397949, 0.23854750394821167, -0.018100276589393616, 0.04095625877380371, -0.18809989094734192, -0.12259644269943237, -0.08142105489969254, -0.510594367980957, -0.06674101203680038, 0.3919042646884918, -0.03597661107778549, 0.10422862321138382, 0.3644505739212036, 0.2609386742115021, 0.045089706778526306, 0.42438748478889465, 0.2009597271680832, 0.3029172122478485, 0.27374961972236633, -0.16683429479599, -0.1221466138958931, -0.24034707248210907, -0.053033120930194855, 0.15583334863185883, 0.2600560486316681, -0.07535223662853241, 0.28113892674446106, -0.09132403135299683, 0.17306019365787506, -0.0010685548186302185, -0.5670703053474426, -0.004958052188158035, 0.19335047900676727, -0.41359299421310425, 0.11676118522882462, -0.32867294549942017, -0.45252349972724915, -0.3685517907142639, 0.014199677854776382, -0.10776141285896301, -0.28839221596717834, -0.008144285529851913, 0.10772189497947693, -0.17181777954101562, -0.08190178126096725, 0.029916029423475266, 0.16885614395141602, 0.03493180871009827, 0.2562255859375, -0.07613398134708405, 0.1002630814909935, -0.1177724078297615, -0.13308393955230713, 0.36974048614501953, -0.13960354030132294, 0.005186296999454498, -0.009829187765717506, -0.23862597346305847, -0.36819857358932495, 0.08678504079580307, 0.01944713667035103, -0.026784710586071014, -0.11940737068653107, 0.24499931931495667, 0.3923147916793823, -0.1222422793507576, -0.584896445274353, 0.12954439222812653, 0.011956663802266121, 0.018837569281458855, 0.016407456248998642, 0.15677422285079956, 0.043901436030864716, -0.034585338085889816, -0.12335396558046341, -0.1896684616804123, -0.4294610619544983, 0.13023191690444946, -0.487953782081604, 0.32331568002700806, 0.2519044876098633, 0.22060760855674744, 0.11078866571187973, -0.059155602008104324, 0.3506515324115753, 0.29630225896835327, -0.2689560353755951, 0.10747724771499634, -0.14036160707473755, -0.12888185679912567, 0.012331884354352951, 0.05996992439031601, -0.16712135076522827, 0.15417173504829407, -0.4859212040901184, -0.2744216322898865, -0.07205972820520401, -0.08106918632984161, -0.179081529378891, 0.042177289724349976, -0.05323752760887146, 0.04252956062555313, -0.138454407453537, 0.1540130376815796, -0.05461443215608597, -0.08606190234422684, 0.08192011713981628, 0.5511021018028259, -0.18328869342803955, 0.3804512023925781, 0.25425949692726135, 0.437102735042572, 0.07995849847793579, 0.234853133559227, 0.34830498695373535, 0.15146806836128235, 0.2243081033229828, 0.41641557216644287, -0.08178772032260895, 0.06724665313959122, -0.4160611927509308, -0.14379411935806274, 0.0633474588394165, -0.06927435845136642, 0.03549429774284363, 0.08474896848201752, -0.15078392624855042, -0.3204994201660156, -0.4465424120426178, 0.26432639360427856, -0.3387428820133209, 0.09583469480276108, -0.19782660901546478, -0.22514504194259644, 0.1519889086484909, 0.1821354627609253, 0.19942770898342133, 0.36297911405563354, 0.4580833911895752, -0.03209343180060387, 0.4049338400363922, -0.47842931747436523, -0.2203940749168396, 0.27588146924972534, 0.12890444695949554, 0.4157722592353821, -0.2298942357301712, 0.22357040643692017, -0.13019973039627075, 0.018821770325303078, 0.8039574027061462, -0.26204556226730347, -0.32991868257522583, -0.015431537292897701, 0.06815455853939056, 0.13365086913108826, -0.1578279733657837, -0.17999538779258728, 0.44553226232528687, 0.265397846698761, 0.31161630153656006, -0.4177496135234833, -0.2524326741695404, -0.05843248963356018, 0.4364771246910095, -0.018525145947933197, 0.04299142584204674, -0.09980322420597076, 0.01022910326719284, -0.28907880187034607, 0.23860624432563782, 0.29251566529273987, -0.013691646978259087, -0.016936341300606728, -0.2078026533126831, -0.0076674409210681915, -0.047965940088033676, 0.4319797158241272, 0.10462135076522827, 0.12748324871063232, -0.32370465993881226, -0.08900493383407593, -0.051363810896873474, 0.42598482966423035, 0.8350523710250854, 0.2568827271461487, -0.4463811218738556, -0.40043315291404724, -0.026700593531131744, -0.11829216033220291, 0.6949502825737, 0.546037495136261, 0.0011483575217425823, 0.3498134911060333, -0.20617154240608215, 0.1629810780286789, -0.0017578843981027603, 0.24050086736679077, 0.4419853091239929, 0.2451392114162445, -0.5271652936935425, -0.27770525217056274, -0.014318801462650299, 0.2728559374809265, -0.15277723968029022, 0.2488199919462204, 0.2822423577308655, -0.348276287317276, 0.4481821060180664, -0.21800550818443298, 0.9202816486358643, -0.10810007154941559, 0.17698466777801514, -0.2334665060043335, -0.23552849888801575, 0.4540647566318512, -0.41268491744995117, 0.24603775143623352, -0.3492013216018677, -0.4742128551006317, -0.11003206670284271, 0.03650565817952156, 0.36725273728370667, 0.3979194164276123, -0.0953563004732132, 0.4710984230041504, -0.0768573135137558, -0.05947050824761391, -0.13572941720485687, 0.49521100521087646, -0.08080824464559555, -0.2098916918039322, -0.4640027582645416, -0.034216392785310745, 0.057756103575229645, -0.14295224845409393, -0.07747580856084824, -0.2687588334083557, 0.15364953875541687, -0.320218563079834, -0.5534123182296753, -0.27389591932296753, -0.1238662526011467, 0.05200609564781189, -0.10654745995998383, -0.28902074694633484, 0.2439136505126953, 0.06017611175775528, 0.01709192618727684, 0.2996906042098999, 0.07487844675779343, 0.02500217966735363, -0.15568867325782776, 0.00869491882622242, -0.2661742866039276, -0.253412663936615, 0.4243946969509125, 0.26382842659950256, -0.14765676856040955, 0.3652544915676117, -0.19351473450660706, -0.32347726821899414, 0.17945489287376404, 0.040071628987789154, 0.0007878579199314117, 0.11525224149227142, -0.03819458186626434, -0.23171007633209229, -0.23588207364082336, -0.24202530086040497, 0.08617545664310455, 0.20917080342769623, -0.1811235398054123, 0.3741346001625061, -0.0825568288564682, -0.2004743367433548, -0.052582476288080215, -0.07871107012033463, -0.4278915524482727, -0.09174130856990814, 0.24468466639518738, -0.059281446039676666, -0.19561369717121124, -0.12461991608142853, 0.09444620460271835, 0.14893700182437897, -0.045699749141931534, 0.15690931677818298, -0.03892863541841507, 0.07424262166023254, 0.014025449752807617, -0.1312749981880188, 0.4664575457572937, 0.1307409107685089, -0.23548665642738342, -0.38947901129722595, -0.3047161400318146, -0.0004168003797531128, 0.031252309679985046, 0.38605377078056335, 0.07687964290380478, 0.16960150003433228, -0.022142071276903152, 0.21605747938156128, -0.20958386361598969, -0.1860392689704895, -0.15281453728675842, -0.05405358970165253, -0.19071681797504425, 0.2986859083175659, 0.05571912229061127, -0.04655224457383156, 0.07030810415744781, 0.2521039843559265, 0.36892032623291016, -0.047303393483161926, -0.033648695796728134, 0.15817713737487793, -0.029781892895698547, 0.19150131940841675, 0.2068062424659729, -0.25736814737319946, 0.25549551844596863, -0.25445273518562317, -0.0062638986855745316, 0.2262757420539856, 0.053578730672597885, 0.11881795525550842, 0.0879489853978157, 0.023585263639688492, -0.18652625381946564, 0.008752554655075073, -0.11537870764732361, 0.29382258653640747, 0.30380964279174805, 0.18857978284358978, -0.19784657657146454, -0.07137920707464218, 0.1604604423046112, 0.20744988322257996, -0.1234297901391983, -0.07355000823736191, 0.11112794280052185, 0.12114869803190231, -0.4866567850112915, 0.35095277428627014, 0.2637130618095398, 0.10894203186035156, -0.06537023931741714, 0.0964127704501152, 0.3562043309211731, 0.08542033284902573, -0.03531404212117195, -0.14071309566497803, 0.048770613968372345, -0.35521161556243896, -0.0006576254963874817, 0.26934948563575745, 0.26580339670181274, -0.18562686443328857, -0.14219151437282562, -0.09039457142353058, 0.3831520080566406, 0.16088464856147766, 0.011352084577083588, 0.33259257674217224, 0.04841059073805809, 0.015184473246335983, 0.16161097586154938, -0.08125460147857666, 0.4215295612812042, 0.39436882734298706, -0.10595367103815079, -0.1336730569601059, 0.04228063300251961, -0.25661250948905945, -0.29908525943756104, -0.3335377871990204, 0.3333733379840851, 0.12330000847578049, -0.20083341002464294, -0.20570769906044006, 0.1558203399181366, 0.5819076299667358, -0.32555294036865234, -0.16984638571739197, 0.09324377775192261, 0.015196755528450012, -0.12968739867210388, 0.13559401035308838, 0.2539350688457489, 0.11881350725889206, -0.1187751293182373, -0.30393943190574646, 0.16714788973331451, -0.14795395731925964, 0.12355770915746689, -0.011367321014404297, 0.27262234687805176, -0.04290656000375748, -0.12989550828933716, 0.13857367634773254, 0.5868188142776489, -0.24821898341178894, -0.11099604517221451, 0.2599118947982788, -0.12284107506275177, 0.09918121993541718, -0.19525489211082458, 0.6805847883224487, 0.3961874842643738, 0.20241443812847137, -0.21393127739429474, -0.21393299102783203, 0.14381444454193115, 0.08802448958158493, -0.21176159381866455, -0.22782263159751892, -0.17335672676563263, 0.2931327819824219, 0.05964018404483795, -0.06008312478661537, 0.1721617728471756, 0.2266812026500702, 0.04937625303864479, -0.10900743305683136, -0.07340144366025925, 0.05932815372943878, -0.240563303232193, -0.13252517580986023, -0.17903965711593628, -0.2729080319404602, -0.21470652520656586, 0.4603154957294464, -0.28891947865486145, 0.18286091089248657, 0.1995469182729721, 0.0662999227643013, 0.15590326488018036, 0.05911225825548172, 0.44755253195762634, 0.2244105041027069, -0.41791367530822754, 0.08790352940559387, -0.8058598637580872, -0.1965550184249878, -0.1332138329744339, 0.03532075136899948, 0.10432515293359756, 0.07072719931602478, -0.11795944720506668, -0.10679031908512115, 0.34422028064727783, 0.0314410999417305, 0.17978455126285553, 0.2814749479293823, -0.4411149322986603, -0.18659262359142303, -0.20605026185512543, -0.04184266924858093, -0.07269018888473511, -0.03079812228679657, 0.29070472717285156, 0.3199259340763092, 0.012296311557292938, -0.19264520704746246, 0.08796752989292145, -0.015739738941192627, 0.12236753106117249, 0.17414158582687378, 0.015471924096345901, 0.4901053011417389, -0.2843928635120392, -0.243341326713562, 0.17567318677902222, 0.052632853388786316, -0.24112845957279205, 0.22133278846740723, 0.09033115953207016, 0.24688991904258728, -0.09079667925834656, -0.3145156800746918, -0.29641881585121155, 0.35457319021224976, 0.16742336750030518, -0.1575467586517334, -0.264546662569046, 0.42590194940567017, 0.0076896995306015015, -0.038067277520895004, -0.011122900992631912, -0.017594993114471436, 0.006037946790456772, 0.15183424949645996, -0.2819744348526001, -0.33542269468307495, 0.36314770579338074, 0.1472550630569458, -0.02156231366097927, -0.2779441773891449, 0.5018213987350464, -0.12645599246025085, 0.4052014946937561, -0.3974798023700714, -0.34267541766166687, 0.3026511073112488, 0.24519965052604675, -0.5436034202575684, -0.13637857139110565, 0.04925980046391487, 0.07480674982070923, -0.016050882637500763, 0.14132678508758545, 0.15784302353858948, -0.2588273882865906, 0.2586655020713806, -0.13739705085754395 ]
https://github.com/huggingface/datasets/issues/1818
Loading local dataset raise requests.exceptions.ConnectTimeout
Hi ! Thanks for reporting. This was indeed a bug introduced when we moved the `json` dataset loader inside the `datasets` package (before that, the `json` loader was fetched online, as all the other dataset scripts). This should be fixed on master now. Feel free to install `datasets` from source to try it out. The fix will be available in the next release of `datasets` in a few days
Load local dataset: ``` dataset = load_dataset('json', data_files=["../../data/json.json"]) train = dataset["train"] print(train.features) train1 = train.map(lambda x: {"labels": 1}) print(train1[:2]) ``` but it raised requests.exceptions.ConnectTimeout: ``` /Users/littlely/myvirtual/tf2/bin/python3.7 /Users/littlely/projects/python_projects/pytorch_learning/nlp/dataset/transformers_datasets.py Traceback (most recent call last): File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) socket.timeout: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn conn.connect() File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connection.py", line 309, in connect conn = self._new_conn() File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connection.py", line 167, in _new_conn % (self.host, self.timeout), urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x1181e9940>, 'Connection to s3.amazonaws.com timed out. (connect timeout=10)') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='s3.amazonaws.com', port=443): Max retries exceeded with url: /datasets.huggingface.co/datasets/datasets/json/json.py (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1181e9940>, 'Connection to s3.amazonaws.com timed out. (connect timeout=10)')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/littlely/projects/python_projects/pytorch_learning/nlp/dataset/transformers_datasets.py", line 12, in <module> dataset = load_dataset('json', data_files=["../../data/json.json"]) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/load.py", line 591, in load_dataset path, script_version=script_version, download_config=download_config, download_mode=download_mode, dataset=True File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/load.py", line 263, in prepare_module head_hf_s3(path, filename=name, dataset=dataset, max_retries=download_config.max_retries) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 232, in head_hf_s3 max_retries=max_retries, File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 523, in http_head max_retries=max_retries, File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 458, in _request_with_retry raise err File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 454, in _request_with_retry response = requests.request(verb.upper(), url, **params) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/adapters.py", line 504, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='s3.amazonaws.com', port=443): Max retries exceeded with url: /datasets.huggingface.co/datasets/datasets/json/json.py (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1181e9940>, 'Connection to s3.amazonaws.com timed out. (connect timeout=10)')) Process finished with exit code 1 ``` Why it want to connect a remote url when I load local datasets, and how can I fix it?
69
Loading local dataset raise requests.exceptions.ConnectTimeout Load local dataset: ``` dataset = load_dataset('json', data_files=["../../data/json.json"]) train = dataset["train"] print(train.features) train1 = train.map(lambda x: {"labels": 1}) print(train1[:2]) ``` but it raised requests.exceptions.ConnectTimeout: ``` /Users/littlely/myvirtual/tf2/bin/python3.7 /Users/littlely/projects/python_projects/pytorch_learning/nlp/dataset/transformers_datasets.py Traceback (most recent call last): File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) socket.timeout: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn conn.connect() File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connection.py", line 309, in connect conn = self._new_conn() File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connection.py", line 167, in _new_conn % (self.host, self.timeout), urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x1181e9940>, 'Connection to s3.amazonaws.com timed out. (connect timeout=10)') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='s3.amazonaws.com', port=443): Max retries exceeded with url: /datasets.huggingface.co/datasets/datasets/json/json.py (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1181e9940>, 'Connection to s3.amazonaws.com timed out. (connect timeout=10)')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/littlely/projects/python_projects/pytorch_learning/nlp/dataset/transformers_datasets.py", line 12, in <module> dataset = load_dataset('json', data_files=["../../data/json.json"]) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/load.py", line 591, in load_dataset path, script_version=script_version, download_config=download_config, download_mode=download_mode, dataset=True File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/load.py", line 263, in prepare_module head_hf_s3(path, filename=name, dataset=dataset, max_retries=download_config.max_retries) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 232, in head_hf_s3 max_retries=max_retries, File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 523, in http_head max_retries=max_retries, File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 458, in _request_with_retry raise err File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 454, in _request_with_retry response = requests.request(verb.upper(), url, **params) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/adapters.py", line 504, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='s3.amazonaws.com', port=443): Max retries exceeded with url: /datasets.huggingface.co/datasets/datasets/json/json.py (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1181e9940>, 'Connection to s3.amazonaws.com timed out. (connect timeout=10)')) Process finished with exit code 1 ``` Why it want to connect a remote url when I load local datasets, and how can I fix it? Hi ! Thanks for reporting. This was indeed a bug introduced when we moved the `json` dataset loader inside the `datasets` package (before that, the `json` loader was fetched online, as all the other dataset scripts). This should be fixed on master now. Feel free to install `datasets` from source to try it out. The fix will be available in the next release of `datasets` in a few days
[ -0.08766527473926544, -0.3096543550491333, -0.07478275150060654, 0.2496923804283142, 0.3151811957359314, 0.0891387090086937, 0.31492313742637634, 0.28854450583457947, -0.14675407111644745, 0.05681508406996727, -0.04697570204734802, 0.35534021258354187, 0.06246529519557953, -0.07246092706918716, -0.007479115389287472, -0.35710352659225464, -0.14428162574768066, 0.08389325439929962, -0.047547824680805206, -0.15436983108520508, -0.25298723578453064, 0.025725487619638443, -0.18746808171272278, 0.23308341205120087, -0.2529926598072052, -0.20668883621692657, -0.08689676225185394, 0.11692893505096436, 0.02572895772755146, -0.4841199219226837, 0.11799399554729462, -0.31255191564559937, 0.055551834404468536, 0.5283833742141724, -0.00011544358130777255, 0.12221108376979828, 0.09451039135456085, 0.02157617174088955, -0.13214050233364105, -0.04985976219177246, -0.06749654561281204, -0.2368900179862976, 0.2450840026140213, -0.37106847763061523, -0.10751602798700333, -0.3912537097930908, 0.007589312270283699, -0.20665805041790009, 0.5702977776527405, 0.5039223432540894, 0.14577561616897583, 0.5681709051132202, 0.051522742956876755, 0.07855920493602753, 0.2667641043663025, 0.17733758687973022, -0.2064683437347412, 0.2898205518722534, 0.2549915909767151, -0.40056586265563965, 0.04001142457127571, -0.08254614472389221, -0.0017518308013677597, 0.07805213332176208, 0.09075355529785156, 0.127223402261734, -0.13591474294662476, -0.34803667664527893, -0.16557395458221436, 0.35392430424690247, 0.3100980222225189, 0.07070299237966537, -0.29271069169044495, -0.2270766794681549, -0.2015625536441803, -0.02932685986161232, 0.1347281038761139, 0.16665321588516235, -0.3210844397544861, 0.1775446981191635, -0.3006041347980499, 0.05512097850441933, -0.4535173773765564, 0.5489295125007629, 0.08651244640350342, 0.5155916213989258, 0.08303873986005783, 0.3091309368610382, -0.04582251235842705, 0.013397783041000366, -0.008977965451776981, -0.08434421569108963, 0.017115509137511253, 0.18444913625717163, -0.19636709988117218, -0.1544393002986908, 0.11466291546821594, -0.40605878829956055, 0.16018983721733093, 0.06765760481357574, 0.1546439230442047, -0.08788257092237473, -0.1699434071779251, 0.31165167689323425, -0.00259513221681118, 0.12817737460136414, -0.05781971663236618, 0.3318801820278168, 0.3709956407546997, 0.09120535850524902, -0.1829873025417328, 0.15579599142074585, 0.10856480896472931, -0.14456580579280853, 0.041975777596235275, -0.05999720096588135, 0.492986798286438, 0.05110993608832359, 0.0875486209988594, -0.015990469604730606, -0.5868583917617798, -0.03328023478388786, 0.1956094652414322, 0.3493115305900574, -0.3422439694404602, 0.08275395631790161, 0.012364603579044342, -0.05446881800889969, -0.3163072168827057, 0.06910576671361923, -0.24259629845619202, 0.24825718998908997, 0.08045139908790588, -0.05912534147500992, 0.1660156399011612, 0.06363043934106827, 0.4791102409362793, -0.16734424233436584, -0.03491034358739853, -0.0415874719619751, 0.5842088460922241, -0.32330983877182007, 0.1414039582014084, 0.234512060880661, -0.27180221676826477, 0.06876202672719955, 0.28069719672203064, 0.10376201570034027, -0.1080799251794815, 0.02014634758234024, -0.2452029287815094, -0.46281886100769043, -0.04149540513753891, 0.22536663711071014, 0.04435119777917862, -0.10873979330062866, 0.009492248296737671, -0.16324123740196228, 0.41379299759864807, -0.3300025165081024, 0.05240042135119438, -0.21230186522006989, -0.2179459184408188, -0.16497814655303955, 0.22939369082450867, 0.34681373834609985, -0.25868380069732666, 0.0798254907131195, 0.26830369234085083, -0.0013025924563407898, 0.22669929265975952, 0.40938466787338257, -0.5121421813964844, 0.4743845462799072, -0.31705525517463684, 0.141554594039917, 0.5460794568061829, -0.46715104579925537, -0.23845791816711426, 0.5044528841972351, -0.25109559297561646, -0.0711529329419136, 0.04356560483574867, 0.27669042348861694, 0.11966780573129654, 0.07417990267276764, 0.4246087670326233, 0.35099273920059204, -0.29298263788223267, 0.11347406357526779, -0.27661389112472534, -0.20692415535449982, 0.007274795323610306, 0.0785304605960846, 0.062274422496557236, 0.01142437756061554, 0.16178007423877716, 0.033804409205913544, 0.2731344699859619, -0.0619288869202137, 0.10705367475748062, 0.3353096842765808, 0.07649338245391846, -0.09136468172073364, 0.030290178954601288, -0.02159799449145794, -0.20533335208892822, 0.22620007395744324, -0.03073982335627079, 0.24254022538661957, -0.267367422580719, -0.020219959318637848, -0.3861398696899414, 0.06388599425554276, -0.30795004963874817, 0.08516544848680496, 0.0618031844496727, 0.27120691537857056, 0.17252351343631744, 0.15658791363239288, 0.04250360652804375, -0.027529718354344368, -0.257917582988739, 0.1061815395951271, -0.3778764605522156, 0.2617048919200897, -0.05998222529888153, -0.03793545439839363, -0.09198188036680222, -0.12873035669326782, 0.1428043246269226, -0.26893267035484314, -0.2771678864955902, 0.19434502720832825, 0.019040869548916817, 0.1645137369632721, 0.01834423840045929, 0.03859572112560272, 0.0624706968665123, -0.16642336547374725, 0.021231168881058693, 0.09464193880558014, 0.11480818688869476, -0.18700459599494934, -0.17327773571014404, 0.29989102482795715, 0.21567872166633606, 0.32944566011428833, 0.1182267963886261, -0.1258406937122345, 0.24935713410377502, 0.07178151607513428, -0.018965689465403557, -0.010247625410556793, 0.07955372333526611, 0.04120898246765137, 0.11366859078407288, -0.09222114831209183, -0.2574562430381775, 0.06026149541139603, 0.44604963064193726, -0.17017635703086853, 0.04501517862081528, 0.06969205290079117, 0.3061305284500122, -0.10950261354446411, 0.17633679509162903, 0.15495434403419495, 0.6341341137886047, 0.2085806280374527, 0.1621566116809845, 0.15114952623844147, -0.1348973959684372, -0.2292594164609909, 0.06441320478916168, -0.0266805961728096, 0.2473060041666031, 0.3175883889198303, 0.30572590231895447, 0.024318380281329155, -0.42636460065841675, -0.27759507298469543, 0.11619924753904343, 0.3775266110897064, -0.27424049377441406, 0.23515628278255463, -0.10331940650939941, -0.15647810697555542, -0.04775102809071541, 0.03942152485251427, -0.2301470935344696, -0.42150038480758667, 0.058336250483989716, 0.21585334837436676, -0.07317066192626953, 0.2756843864917755, -0.009307248517870903, 0.020146742463111877, 0.35008877515792847, -0.43837714195251465, -0.1064935177564621, -0.17611852288246155, -0.3641541302204132, 0.025294005870819092, 0.15250015258789062, -0.09636399149894714, 0.41775190830230713, -0.04992413520812988, -0.47568774223327637, -0.1872624158859253, -0.2943216562271118, 0.011948548257350922, -0.06520627439022064, 0.24799613654613495, 0.1509261429309845, 0.3515704870223999, -0.017446354031562805, -0.1918196827173233, 0.42213135957717896, -0.08986790478229523, -0.12389764189720154, -0.026795800775289536, 0.02407063916325569, 0.14929305016994476, -0.030747536569833755, -0.637907862663269, -0.404839426279068, -0.40667620301246643, 0.21819795668125153, 0.04661932960152626, 0.27751851081848145, 0.084954634308815, 0.035815320909023285, 0.3597217798233032, 0.11121673136949539, 0.12764057517051697, -0.053862035274505615, -0.3271386921405792, 0.25746044516563416, -0.2653142213821411, -0.26336658000946045, -0.014295320957899094, -0.11728790402412415, 0.08856633305549622, 0.05010051280260086, -0.5194666981697083, -0.44535839557647705, -0.27872905135154724, 0.24074336886405945, -0.2776932716369629, -0.11705277860164642, 0.2961001396179199, -0.1703326553106308, -0.10821849852800369, -0.00647449865937233, -0.044476911425590515, 0.34153681993484497, 0.2659060060977936, 0.1737859547138214, 0.06144845858216286, 0.7596716284751892, -0.033246979117393494, 0.541373074054718, 0.0296797938644886, 0.03527829796075821, 0.48922717571258545, -0.28296929597854614, -0.017478588968515396, -0.07797803729772568, -0.26849207282066345, 0.08018245548009872, 0.14092619717121124, -0.2075178027153015, -0.09336592257022858, 0.1615559458732605, -0.12253084033727646, -0.2405092716217041, -0.23043230175971985, -0.2888835072517395, -0.2335738092660904, 0.009727333672344685, -0.14655053615570068, 0.289532333612442, -0.022246891632676125, 0.06599291414022446, -0.14311723411083221, -0.05162317305803299, -0.14666831493377686, 0.06930664926767349, -0.016799159348011017, -0.16244013607501984, -0.6813396215438843, -0.1749107837677002, -0.5136034488677979, 0.27063554525375366, 0.15675657987594604, 0.5439185500144958, -0.2641366422176361, -0.06843849271535873, 0.2611941397190094, -0.141559898853302, 0.8109992742538452, -0.24084331095218658, 0.10524111986160278, 0.02506934478878975, 0.1355767548084259, -0.3428856432437897, 0.005817871540784836, -0.0008370056748390198, 0.2688807547092438, 0.24819378554821014, 0.5743730068206787, -0.1280052810907364, -0.28656479716300964, 0.20697152614593506, 0.2740252912044525, -0.23582254350185394, -0.07624024152755737, -0.2177325189113617, -0.689669132232666, -0.19684529304504395, 0.08327017724514008, -0.05471581220626831, 0.2027999758720398, 0.09243053197860718, -0.4169507324695587, 0.09523045271635056, 0.16640621423721313, -0.0523577481508255, 0.07994887232780457, -0.11084616929292679, 0.01589001901447773, 0.11482343077659607, -0.24719169735908508, 0.2845288813114166, 0.24503937363624573, 0.3522234559059143, -0.14906908571720123, -0.2630356252193451, 0.14364777505397797, 0.12382054328918457, 0.33185508847236633, 0.29476356506347656, -0.0212467722594738, 0.14088450372219086, 0.15999852120876312, 0.3401944637298584, -0.08283530920743942, 0.3873804211616516, 0.5323923826217651, -0.1223365068435669, -0.20315799117088318, -0.5039529204368591, 0.13323800265789032, -0.04718857631087303, -0.0636865571141243, 0.21920253336429596, -0.2862212657928467, -0.277203768491745, 0.3792083263397217, 0.1395542323589325, 0.9921349287033081, -0.01130598783493042, 0.2558078467845917, 0.6406012773513794, -0.0664973258972168, 0.6649603247642517, -0.264616996049881, 0.2580275535583496, -0.38040298223495483, 0.0429762527346611, -0.10547640174627304, -0.2358797937631607, 0.028509650379419327, 0.09443699568510056, -0.16494818031787872, 0.14919550716876984, -0.11728359758853912, 0.195985347032547, -0.14634299278259277, 0.541419506072998, 0.07562806457281113, -0.05984796956181526, -0.5874490737915039, 0.10640963912010193, -0.026102721691131592, 0.09858319163322449, -0.026835257187485695, -0.10816936939954758, 0.020030338317155838, -0.37317460775375366, 0.15743328630924225, 0.0943819135427475, -0.2812206447124481, 0.5121896862983704, -0.18593010306358337, -0.07586947083473206, -0.015601265244185925, 0.30762606859207153, 0.03486635535955429, -0.000024978071451187134, -0.10644498467445374, 0.03628102317452431, -0.11306820064783096, 0.13087020814418793, -0.1006316989660263, -0.009530840441584587, 0.1547372043132782, -0.11632022261619568, -0.4218953251838684, 0.471874475479126, -0.3494647741317749, -0.37576234340667725, -0.070901058614254, 0.12230071425437927, -0.059524089097976685, -0.4409903883934021, -0.10296235978603363, -0.14436501264572144, -0.26913002133369446, -0.20036722719669342, 0.0858176052570343, 0.01952711120247841, -0.3188183009624481, 0.32040154933929443, 0.01775113120675087, -0.3153621554374695, -0.021574780344963074, 0.4522782862186432, 0.11651390790939331, 0.22168400883674622, 0.752509355545044, 0.16997314989566803, 0.02495885267853737, -0.32926154136657715, 0.46127623319625854, -0.0180304367095232, -0.2892805337905884, 0.10468750447034836, 0.2482043355703354, 0.2518325448036194, 0.06370870023965836, 0.27727705240249634, 0.2292516529560089, 0.13892191648483276, 0.003696877509355545, -0.3916376233100891, -0.47038835287094116, 0.16922535002231598, 0.07654452323913574, 0.21416215598583221, 0.2396148145198822, 0.24989144504070282, -0.18938787281513214, 0.20432420074939728, -0.29546982049942017, 0.05616234987974167, -0.5371047258377075, 0.18564772605895996, -0.03754296898841858, -0.11557143181562424, 0.37837037444114685, 0.06216661259531975, 0.1401452124118805, -0.021300677210092545, -0.3744775056838989, -0.16643717885017395, -0.05052446573972702, 0.16633686423301697, 0.07185029983520508, -0.18647412955760956, -0.4386371970176697, -0.5062547326087952, -0.018147747963666916, 0.09656593203544617, 0.0535423643887043, 0.01884746178984642, -0.08118034899234772, 0.017581705003976822, 0.014158055186271667, 0.12208893895149231, 0.08415984362363815, 0.047268033027648926, -0.15381117165088654, -0.01574283093214035, 0.23016904294490814, 0.07726167142391205, 0.1983967274427414, -0.18857841193675995, -0.06746058166027069, 0.019766077399253845, 0.035625871270895004, -0.17739516496658325, 0.29266899824142456, -0.28478705883026123, -0.2742282748222351, -0.07488124072551727, 0.2242603600025177, 0.3945913016796112, -0.1961331069469452, 0.02837945707142353, 0.19520410895347595, 0.20808641612529755, -0.18331967294216156, -0.2920610308647156, 0.45609167218208313, -0.20194578170776367, 0.1378970742225647, 0.11032246798276901, -0.21274176239967346, 0.08947005867958069, -0.22453199326992035, 0.20336711406707764, 0.23412270843982697, 0.02232637256383896, 0.03718801960349083, 0.3005512058734894, -0.29899829626083374, -0.08281241357326508, 0.1474563330411911, 0.12709501385688782, 0.3212958574295044, 0.004774995148181915, -0.005546003580093384, 0.043327923864126205, -0.37678810954093933, 0.3542632758617401, -0.08602534979581833, -0.48479822278022766, 0.051253169775009155, -0.16886001825332642, -0.29889076948165894, -0.13003107905387878, -0.023750409483909607, 0.48198390007019043, -0.23673969507217407, -0.18818078935146332, -0.19951531291007996, 0.3600146770477295, -0.10282430797815323, -0.1955418735742569, -0.22951535880565643, -0.28582021594047546, 0.13546839356422424, -0.19785059988498688, 0.16091349720954895, 0.019045379012823105, -0.06508700549602509, 0.0894734114408493, 0.03838721290230751, -0.20192477107048035, -0.020145781338214874, 0.06120400130748749, 0.0640069767832756, -0.3245755732059479, 0.194973886013031, 0.2483702450990677, -0.06070369482040405, -0.4171532094478607, 0.01068783737719059, 0.34595704078674316, 0.4239967465400696, -0.021845117211341858, 0.31249961256980896, -0.09471084177494049, -0.15839600563049316, -0.005540668964385986, 0.11348316818475723, 0.23380893468856812, -0.03643759712576866, 0.35148677229881287, 0.09335283190011978, -0.14810240268707275, 0.2936781048774719, -0.02371929958462715, 0.15342970192432404, -0.22117392718791962, 0.5093339681625366, 0.012240786105394363, -0.29287588596343994, 0.0004255808889865875, 0.021105505526065826, -0.4169076383113861, 0.10075099766254425, 0.42973098158836365, -0.13441908359527588, 0.32207825779914856, -0.09887432307004929, 0.05006037652492523, -0.3950720727443695, 0.6884114146232605, 0.23328401148319244, 0.10674795508384705, -0.3425544500350952, 0.0008542463183403015, -0.34072422981262207, 0.02835068106651306, -0.4788582921028137, -0.024035103619098663, 0.07403404265642166, 0.10040050745010376, 0.07500993460416794, -0.0460599884390831, -0.12703274190425873, 0.003035543020814657, 0.021855946630239487, 0.11331192404031754, -0.287662148475647, -0.27596938610076904, -0.004359185695648193, 0.2354527860879898, -0.018737386912107468, -0.47272825241088867, 0.2163546085357666, -0.2600305676460266, -0.03072553686797619, -0.2679131031036377, -0.048462383449077606, 0.2021925151348114, -0.0579153448343277, 0.43436843156814575, 0.3496294617652893, 0.4295276403427124, 0.07208871841430664, -0.0606512576341629, 0.0439474955201149, -0.47898179292678833, 0.04592154547572136, -0.004791766405105591, 0.15769265592098236, 0.5942357778549194, -0.18847359716892242, -0.01807151734828949, -0.3390832245349884, 0.17296263575553894, -0.12381987273693085, -0.3846411406993866, 0.32375940680503845, -0.05246210843324661, 0.02614647150039673, 0.06591520458459854, 0.10016444325447083, 0.13305529952049255, 0.08198647946119308, 0.029797932133078575, -0.2536602020263672, -0.2163209468126297, 0.7234705090522766, -0.3179054260253906, -0.16672754287719727, -0.04373569414019585, 0.18572190403938293, 0.09779821336269379, 0.004968024790287018, -0.15862950682640076, -0.08039925992488861, 0.6721756458282471, 0.08620890974998474, -0.31092825531959534, 0.49042603373527527, 0.15787361562252045, 0.031035002321004868, 0.07257004082202911, -0.03354153037071228, -0.19044116139411926, -0.27471283078193665, -0.0402270182967186, -0.310072124004364 ]
https://github.com/huggingface/datasets/issues/1817
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 599 but got length 1500
Hi ! The error you have is due to the `input_ids` column not having the same number of examples as the other columns. Indeed you're concatenating the `input_ids` at this line: https://github.com/LuCeHe/GenericTools/blob/431835d8e13ec24dceb5ee4dc4ae58f0e873b091/KerasTools/lm_preprocessing.py#L134 However the other columns are kept unchanged, and therefore you end up with an `input_ids` column with 599 elements while the others columns like `attention_mask` have 1500. To fix that you can instead concatenate them all using ```python concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()} ``` Also you may need to drop the "text" column before applying `group_texts` since strings can't be concatenated with lists. You can drop it at the tokenization step: ```python dset = dset.map( tokenize_function, batched=True, remove_columns=["text"] ) ```
I am trying to preprocess any dataset in this package with GPT-2 tokenizer, so I need to structure the datasets as long sequences of text without padding. I've been following a couple of your tutorials and here you can find the script that is failing right at the end https://github.com/LuCeHe/GenericTools/blob/master/KerasTools/lm_preprocessing.py In the last iteration of the last dset.map, it gives the error that I copied in the title. Another issue that I have, if I leave the batch_size set as 1000 in the last .map, I'm afraid it's going to lose most text, so I'm considering setting both writer_batch_size and batch_size to 300 K, but I'm not sure it's the best way to go. Can you help me? Thanks!
116
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 599 but got length 1500 I am trying to preprocess any dataset in this package with GPT-2 tokenizer, so I need to structure the datasets as long sequences of text without padding. I've been following a couple of your tutorials and here you can find the script that is failing right at the end https://github.com/LuCeHe/GenericTools/blob/master/KerasTools/lm_preprocessing.py In the last iteration of the last dset.map, it gives the error that I copied in the title. Another issue that I have, if I leave the batch_size set as 1000 in the last .map, I'm afraid it's going to lose most text, so I'm considering setting both writer_batch_size and batch_size to 300 K, but I'm not sure it's the best way to go. Can you help me? Thanks! Hi ! The error you have is due to the `input_ids` column not having the same number of examples as the other columns. Indeed you're concatenating the `input_ids` at this line: https://github.com/LuCeHe/GenericTools/blob/431835d8e13ec24dceb5ee4dc4ae58f0e873b091/KerasTools/lm_preprocessing.py#L134 However the other columns are kept unchanged, and therefore you end up with an `input_ids` column with 599 elements while the others columns like `attention_mask` have 1500. To fix that you can instead concatenate them all using ```python concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()} ``` Also you may need to drop the "text" column before applying `group_texts` since strings can't be concatenated with lists. You can drop it at the tokenization step: ```python dset = dset.map( tokenize_function, batched=True, remove_columns=["text"] ) ```
[ -0.15500210225582123, -0.07036439329385757, -0.00863446481525898, 0.17082875967025757, 0.255253404378891, 0.03644731640815735, 0.503602147102356, 0.5221659541130066, -0.5246611833572388, 0.010454036295413971, 0.3807777166366577, 0.23190715909004211, 0.07488147914409637, -0.1745080202817917, 0.12614046037197113, -0.28864774107933044, 0.014182120561599731, 0.2477586567401886, -0.013881750404834747, 0.19445441663265228, -0.06766749918460846, 0.3307289481163025, -0.3295416831970215, 0.27166980504989624, -0.3865055441856384, -0.09225161373615265, -0.1422722190618515, -0.16988903284072876, -0.16919858753681183, -0.5931813716888428, 0.0828089565038681, -0.22855830192565918, 0.04780498147010803, 0.27941012382507324, -0.0001236287789652124, -0.11682897806167603, 0.40770095586776733, -0.10667449980974197, 0.0701528787612915, -0.004473835229873657, 0.042279958724975586, -0.23613734543323517, 0.01651359349489212, -0.23402845859527588, 0.09126799553632736, -0.5475603342056274, -0.29207897186279297, 0.26073157787323, 0.2835213840007782, 0.3589549660682678, 0.12578466534614563, -0.04489467293024063, 0.17903964221477509, -0.041286323219537735, 0.570249617099762, 0.053609784692525864, 0.005533294752240181, 0.116050586104393, 0.1458776593208313, -0.20139425992965698, 0.053441304713487625, 0.2144298106431961, -0.2680256962776184, -0.10325197875499725, 0.05808613449335098, -0.0039269449189305305, 0.056531913578510284, -0.20237207412719727, 0.2105337381362915, 0.15889081358909607, 0.30374613404273987, -0.37804800271987915, -0.048350341618061066, -0.2628534138202667, 0.1766875982284546, -0.39863619208335876, -0.08855172246694565, -0.06064809858798981, -0.1943920999765396, 0.18830236792564392, -0.10215397924184799, 0.17451409995555878, -0.2574053108692169, 0.09383925050497055, 0.09563080966472626, 0.2773381769657135, 0.15872672200202942, 0.2896915674209595, -0.07065573334693909, -0.17045532166957855, 0.036509521305561066, 0.1347864270210266, -0.2240157127380371, 0.21089714765548706, -0.23298917710781097, -0.03535615652799606, -0.1298372447490692, -0.22155049443244934, 0.4244506061077118, -0.14328767359256744, 0.28278103470802307, -0.1606895625591278, 0.7112700343132019, -0.1186457946896553, -0.08554695546627045, 0.45989713072776794, 0.2372591197490692, 0.20678284764289856, -0.12706245481967926, -0.38636407256126404, 0.29139795899391174, 0.14709311723709106, -0.26021870970726013, -0.6117147207260132, 0.27573609352111816, 0.16794955730438232, 0.06177928298711777, 0.18029767274856567, -0.1971881240606308, 0.48002809286117554, -0.49648189544677734, -0.025121774524450302, -0.15307629108428955, 0.05534971505403519, 0.0796751081943512, 0.06377243250608444, -0.0022888854146003723, 0.07375271618366241, 0.06430450081825256, -0.2553146779537201, -0.10276945680379868, 0.2139761596918106, -0.391043096780777, 0.060149624943733215, 0.10804910957813263, 0.05606776103377342, 0.30172064900398254, 0.06235768646001816, 0.07460154592990875, 0.06350255757570267, -0.010166584514081478, -0.07176129519939423, 0.24437233805656433, 0.2771906852722168, -0.11861392855644226, 0.18284980952739716, 0.20385339856147766, -0.14459413290023804, -0.30178695917129517, 0.29600289463996887, -0.32703930139541626, -0.3279041349887848, -0.10855644941329956, 0.0631788894534111, 0.10623523592948914, 0.10535778850317001, -0.21858441829681396, 0.15095154941082, 0.6920490264892578, -0.09886469691991806, 0.18233299255371094, -0.4258132576942444, 0.198024183511734, -0.3123606741428375, 0.1485883593559265, 0.16139273345470428, -0.5673121809959412, 0.12170490622520447, 0.3949624300003052, 0.37337765097618103, 0.33287513256073, 0.3813622295856476, -0.08317986875772476, 0.5039737224578857, -0.09069882333278656, 0.7552220225334167, 0.3342806398868561, -0.08883853256702423, -0.2165766954421997, 0.3936944305896759, -0.06433059275150299, -0.23230081796646118, 0.029562033712863922, -0.23195862770080566, 0.21288324892520905, -0.009677901864051819, 0.15474775433540344, -0.10163936764001846, -0.10747230052947998, -0.002956615760922432, -0.2887980341911316, -0.1346040815114975, 0.10846542567014694, -0.068707674741745, -0.1076745092868805, -0.25636234879493713, -0.2608838975429535, -0.4103664457798004, 0.11535459756851196, -0.16352863609790802, 0.3597876727581024, 0.34751105308532715, 0.019629091024398804, 0.026715300977230072, 0.32917824387550354, 0.09509410709142685, -0.1781708002090454, -0.023590244352817535, 0.04429168254137039, -0.0349590927362442, -0.22016678750514984, -0.3523421883583069, -0.2672818601131439, 0.19900213181972504, 0.03817830979824066, 0.1776503473520279, 0.009346045553684235, -0.22651252150535583, 0.1835491806268692, -0.1633615642786026, -0.033649638295173645, -0.2718365490436554, 0.05084274709224701, 0.09642227739095688, -0.18220968544483185, -0.12170226871967316, -0.17315839231014252, -0.40619081258773804, 0.09974974393844604, -0.007511161267757416, 0.2952216565608978, -0.053783152252435684, 0.014354468323290348, 0.3127264380455017, 0.13114239275455475, -0.3347699046134949, -0.395431250333786, 0.20271655917167664, -0.08284145593643188, -0.19415318965911865, -0.19109798967838287, -0.10592542588710785, -0.030232172459363937, -0.08676479011774063, 0.11341690272092819, 0.31142449378967285, 0.08789806067943573, 0.30049943923950195, -0.20775611698627472, -0.031966015696525574, 0.06307556480169296, 0.06867678463459015, -0.2348010390996933, 0.01007051020860672, 0.07786343991756439, -0.04759640619158745, 0.1326376050710678, 0.002354823052883148, -0.31536731123924255, 0.17286168038845062, 0.17700575292110443, 0.01550857350230217, -0.0637860968708992, 0.19869175553321838, -0.08011650294065475, -0.014726289547979832, 0.1154870092868805, -0.1970093548297882, 0.10119052231311798, 0.16590385138988495, -0.02477804198861122, -0.05473574995994568, -0.2063383013010025, -0.19612528383731842, 0.22627604007720947, 0.07360953837633133, 0.20353491604328156, 0.551664412021637, 0.052655722945928574, 0.12736845016479492, 0.05016867071390152, -0.09347482770681381, 0.2298327535390854, 0.35506895184516907, -0.3621889352798462, 0.19337980449199677, -0.2526601552963257, 0.019631605595350266, -0.005975036881864071, -0.6113994121551514, 0.1719786375761032, -0.0306186992675066, 0.045791223645210266, -0.12918250262737274, -0.16222263872623444, 0.3853452801704407, 0.18198752403259277, 0.184983029961586, 0.5495917797088623, -0.16755647957324982, -0.12042839080095291, -0.23683422803878784, -0.1843617856502533, -0.09546428918838501, 0.21327584981918335, -0.1506299078464508, -0.021240057423710823, 0.10779588669538498, -0.11745641380548477, -0.22424934804439545, -0.5022533535957336, 0.3119058907032013, -0.3466987609863281, -0.11216457188129425, 0.40245571732521057, 0.12236716598272324, -0.2633652687072754, -0.228054016828537, 0.05544262006878853, 0.22995439171791077, -0.2798077166080475, 0.3484920859336853, -0.0896361842751503, -0.27465224266052246, -0.15062221884727478, -0.16973668336868286, 0.17459966242313385, -0.19145455956459045, 0.17723402380943298, -0.15346430242061615, 0.14684012532234192, 0.06374981254339218, 0.46530768275260925, 0.036906298249959946, -0.006935832556337118, 0.04242850840091705, 0.057454947382211685, 0.21053245663642883, 0.4343686103820801, -0.2766294479370117, -0.25733843445777893, 0.08655911684036255, -0.17284077405929565, 0.32821908593177795, 0.2733306288719177, -0.3643850088119507, 0.1617097407579422, -0.06859379261732101, 0.0936412662267685, -0.3578871190547943, 0.059033118188381195, 0.4605172872543335, 0.14664991199970245, 0.005105761811137199, -0.11419659107923508, 0.03463299199938774, 0.37367382645606995, -0.2701495289802551, 0.055112775415182114, 0.05525363236665726, 0.6357037425041199, -0.025045383721590042, 0.7274158596992493, 0.28145623207092285, -0.11978262662887573, 0.10136125981807709, -0.2490907609462738, -0.12020927667617798, -0.23989713191986084, 0.16254344582557678, -0.23184894025325775, -0.09498383104801178, 0.03695318102836609, 0.3688105344772339, -0.297247976064682, -0.33300188183784485, 0.22101512551307678, 0.1925230771303177, -0.21420714259147644, -0.07208168506622314, 0.3196912407875061, 0.03605964034795761, 0.32390084862709045, -0.041919536888599396, 0.07907944172620773, -0.19290319085121155, -0.03335470333695412, 0.049535397440195084, -0.37640756368637085, 0.03257020562887192, 0.0649055689573288, -0.2317727953195572, -0.411833256483078, -0.6226683855056763, 0.3684791326522827, 0.3064644932746887, 0.46939775347709656, 0.10163964331150055, -0.31097880005836487, -0.0006429925560951233, -0.27705299854278564, 0.5176248550415039, -0.1439100056886673, -0.3334729075431824, 0.3643976151943207, 0.12546764314174652, -0.420096755027771, -0.33677050471305847, -0.05272160843014717, 0.1455676406621933, 0.3767848312854767, 0.13627612590789795, -0.5397258400917053, -0.031867410987615585, 0.354975163936615, -0.02612120285630226, -0.012666963040828705, -0.14694400131702423, -0.24778515100479126, -0.3502267897129059, -0.20203398168087006, -0.016632311046123505, 0.6145424246788025, 0.3996119797229767, -0.012563644908368587, -0.004970770329236984, -0.05476658046245575, -0.2995450794696808, 0.09771370142698288, 0.009557556360960007, 0.39020466804504395, 0.0011865035630762577, 0.22085776925086975, -0.22350046038627625, 0.3756488561630249, 0.3819260895252228, 0.11470957845449448, 0.15078769624233246, -0.23865988850593567, 0.24952781200408936, -0.2736164927482605, 0.48127904534339905, 0.27605581283569336, -0.22334273159503937, 0.2875675857067108, -0.444521963596344, 0.27942806482315063, -0.07923892885446548, 0.14096753299236298, 0.39659199118614197, -0.17318756878376007, -0.3562674820423126, -0.13050273060798645, 0.24307265877723694, 0.02102423459291458, -0.026337794959545135, 0.4567234218120575, 0.06739550828933716, -0.3701596260070801, 0.3138682246208191, 0.2621949017047882, 1.144781470298767, 0.3166951537132263, 0.2496209591627121, 0.37336447834968567, 0.08351258933544159, 0.006209776736795902, 0.07697103917598724, 0.10554128140211105, -0.5544157028198242, -0.005171020515263081, 0.009371323511004448, -0.16759264469146729, -0.013810023665428162, 0.201398104429245, -0.332941472530365, -0.12819746136665344, -0.315169095993042, 0.17098374664783478, -0.13209417462348938, 0.1428220570087433, -0.005934614688158035, -0.08728036284446716, 0.23794379830360413, -0.0208473838865757, -0.013102278113365173, -0.37003979086875916, -0.16520926356315613, -0.0691831186413765, -0.3673368990421295, -0.35694706439971924, -0.4112292528152466, -0.07522501051425934, -0.2250600904226303, 0.039151743054389954, 0.11218900978565216, -0.2581790089607239, 0.17978954315185547, 0.02625034935772419, 0.2069530040025711, 0.16528238356113434, -0.1984623223543167, 0.008550720289349556, 0.04433034360408783, -0.2909439206123352, -0.158440962433815, -0.14099451899528503, 0.12209347635507584, -0.017199592664837837, 0.05257623642683029, 0.1850583851337433, 0.042504336684942245, 0.06949654966592789, -0.3031349778175354, -0.16276977956295013, 0.2704514265060425, -0.49078238010406494, -0.09217566251754761, 0.03048873320221901, 0.0029676444828510284, -0.1565639078617096, -0.006744571030139923, 0.04925351217389107, -0.2209213227033615, 0.23219850659370422, -0.15297022461891174, -0.2571038603782654, 0.060137681663036346, 0.07232566177845001, 0.002333875745534897, -0.03118857368826866, 0.6073062419891357, 0.31597089767456055, -0.1589478850364685, -0.10699210315942764, 0.16370859742164612, 0.5035052299499512, -0.6606782674789429, 0.07491787523031235, -0.1885090172290802, 0.05945807695388794, 0.05098624527454376, 0.5169560313224792, 0.2717175781726837, 0.3059385418891907, 0.12162265181541443, -0.07537870854139328, -0.29982712864875793, 0.202827587723732, 0.25880685448646545, 0.3612178862094879, -0.20544075965881348, 0.0983739048242569, -0.16207996010780334, 0.11595062166452408, -0.18939834833145142, -0.0878787413239479, -0.05775082856416702, 0.18769554793834686, -0.10303528606891632, -0.018280602991580963, -0.26423466205596924, 0.05146372690796852, -0.03153945133090019, 0.38854944705963135, -0.010244004428386688, -0.10277890413999557, -0.2301063984632492, 0.15278959274291992, 0.06817790865898132, -0.05340875685214996, 0.27421802282333374, -0.14489604532718658, -0.2985363304615021, -0.145013689994812, 0.013673078268766403, -0.053581248968839645, -0.021078884601593018, -0.024211008101701736, 0.42981618642807007, 0.06469076871871948, -0.08738486468791962, 0.027694541960954666, 0.0022439658641815186, 0.14534787833690643, 0.11469204723834991, 0.22810840606689453, 0.09583751857280731, 0.026214227080345154, 0.13615313172340393, 0.33510124683380127, 0.052783966064453125, -0.35522928833961487, 0.13390173017978668, -0.4393783211708069, -0.12965767085552216, -0.05780817195773125, 0.24754169583320618, 0.30091220140457153, -0.36063385009765625, -0.13287995755672455, 0.45031580328941345, 0.15354734659194946, -0.2865341603755951, -0.11641696840524673, -0.18298639357089996, 0.06416600942611694, -0.13798479735851288, 0.20083919167518616, 0.1094474047422409, -0.06060664355754852, -0.220254585146904, 0.17374351620674133, 0.35428816080093384, 0.12318765372037888, -0.395859032869339, 0.3194219768047333, -0.1859205812215805, 0.12398691475391388, 0.316327303647995, 0.2035691887140274, 0.2621990442276001, 0.02975633181631565, -0.11876840144395828, 0.24514739215373993, 0.26783984899520874, 0.0912136510014534, -0.23933392763137817, -0.2031651884317398, -0.07244431972503662, 0.276299387216568, 0.08838185667991638, 0.002818591892719269, 0.17907539010047913, 0.33537033200263977, 0.45249882340431213, -0.2289244383573532, 0.02789013646543026, 0.3590198755264282, -0.19493818283081055, -0.06601493060588837, -0.7122883200645447, 0.08242888003587723, -0.21800383925437927, -0.17494842410087585, -0.10234589874744415, 0.07373111695051193, 0.4343535304069519, 0.09640101343393326, -0.09047451615333557, -0.19873827695846558, 0.07072821259498596, -0.0068391598761081696, 0.09450754523277283, -0.32315367460250854, 0.411929190158844, 0.10049471259117126, -0.28496402502059937, -0.11378185451030731, 0.32789117097854614, 0.6728408932685852, 0.4071211516857147, -0.12611038982868195, -0.3004501760005951, -0.2880658805370331, 0.1028205007314682, 0.10326052457094193, 0.3540622591972351, 0.3359221816062927, 0.13139918446540833, 0.2158367782831192, -0.09179405122995377, -0.03497980907559395, -0.09275177121162415, 0.33172014355659485, -0.06846722960472107, 0.24882006645202637, -0.0547335222363472, -0.15731634199619293, -0.4111023545265198, -0.0005265176296234131, 0.2015107274055481, -0.50547856092453, 0.22050972282886505, 0.5505585074424744, 0.18040812015533447, 0.15158945322036743, -0.09970279783010483, 0.03228007256984711, -0.0781504362821579, 0.4440882205963135, 0.38040369749069214, 0.10107237845659256, -0.3919532597064972, -0.39860790967941284, -0.24106945097446442, 0.13712972402572632, -0.4373246133327484, -0.131199911236763, 0.26528236269950867, 0.16910529136657715, 0.24063599109649658, 0.01958031952381134, 0.11670427024364471, 0.16670937836170197, -0.3454830050468445, 0.5820028781890869, -0.27659350633621216, 0.21085718274116516, 0.1482139527797699, 0.08658044040203094, 0.027279548346996307, -0.19826990365982056, 0.42662593722343445, -0.015100187622010708, -0.01077292114496231, -0.3655937910079956, 0.026914082467556, 0.17973896861076355, 0.21648167073726654, 0.25084954500198364, 0.07890096306800842, 0.2836627960205078, -0.011375470086932182, 0.10577558726072311, -0.30026692152023315, -0.15188489854335785, -0.17744013667106628, 0.3001045286655426, 0.0960739254951477, 0.03666110336780548, -0.18523307144641876, -0.21170474588871002, 0.034273963421583176, -0.11691822111606598, -0.07807770371437073, -0.060733843594789505, -0.3419036567211151, 0.1300678253173828, -0.20002609491348267, 0.18688878417015076, -0.03549572825431824, 0.11377903819084167, 0.10589611530303955, 0.20668354630470276, -0.3272295296192169, -0.6539340615272522, 0.7069849371910095, -0.4853319823741913, -0.497139573097229, -0.02324913814663887, -0.006308794021606445, 0.31704792380332947, 0.1148776113986969, -0.1392877697944641, -0.1747901886701584, 0.2745009660720825, 0.11197103559970856, -0.5378230810165405, 0.30330488085746765, -0.07730300724506378, 0.045005593448877335, -0.17533773183822632, 0.23361092805862427, 0.08318209648132324, -0.22448432445526123, -0.4705749452114105, -0.6530272364616394 ]
https://github.com/huggingface/datasets/issues/1811
Unable to add Multi-label Datasets
Thanks for adding this dataset! As far as I know `supervised_keys` is mostly a holdover from TFDS, but isn't really used, so feel free to drop it (@lhoestq or @thomwolf correct me if I'm wrong). It definitely shouldn't be blocking :)
I am trying to add [CIFAR-100](https://www.cs.toronto.edu/~kriz/cifar.html) dataset. The dataset contains two labels per image - `fine label` and `coarse label`. Using just one label in supervised keys as `supervised_keys=("img", "fine_label")` raises no issue. But trying `supervised_keys=("img", "fine_label","coarse_label")` leads to this error : ```python Traceback (most recent call last): File "test_script.py", line 2, in <module> d = load_dataset('./datasets/cifar100') File "~/datasets/src/datasets/load.py", line 668, in load_dataset **config_kwargs, File "~/datasets/src/datasets/builder.py", line 896, in __init__ super(GeneratorBasedBuilder, self).__init__(*args, **kwargs) File "~/datasets/src/datasets/builder.py", line 247, in __init__ info.update(self._info()) File "~/.cache/huggingface/modules/datasets_modules/datasets/cifar100/61d2489b2d4a4abc34201432541b7380984ec714e290817d9a1ee318e4b74e0f/cifar100.py", line 79, in _info citation=_CITATION, File "<string>", line 19, in __init__ File "~/datasets/src/datasets/info.py", line 136, in __post_init__ self.supervised_keys = SupervisedKeysData(*self.supervised_keys) TypeError: __init__() takes from 1 to 3 positional arguments but 4 were given ``` Is there a way I can fix this? Also, what does adding `supervised_keys` do? Is it necessary? How would I specify `supervised_keys` for a multi-input, multi-label dataset? Thanks, Gunjan
41
Unable to add Multi-label Datasets I am trying to add [CIFAR-100](https://www.cs.toronto.edu/~kriz/cifar.html) dataset. The dataset contains two labels per image - `fine label` and `coarse label`. Using just one label in supervised keys as `supervised_keys=("img", "fine_label")` raises no issue. But trying `supervised_keys=("img", "fine_label","coarse_label")` leads to this error : ```python Traceback (most recent call last): File "test_script.py", line 2, in <module> d = load_dataset('./datasets/cifar100') File "~/datasets/src/datasets/load.py", line 668, in load_dataset **config_kwargs, File "~/datasets/src/datasets/builder.py", line 896, in __init__ super(GeneratorBasedBuilder, self).__init__(*args, **kwargs) File "~/datasets/src/datasets/builder.py", line 247, in __init__ info.update(self._info()) File "~/.cache/huggingface/modules/datasets_modules/datasets/cifar100/61d2489b2d4a4abc34201432541b7380984ec714e290817d9a1ee318e4b74e0f/cifar100.py", line 79, in _info citation=_CITATION, File "<string>", line 19, in __init__ File "~/datasets/src/datasets/info.py", line 136, in __post_init__ self.supervised_keys = SupervisedKeysData(*self.supervised_keys) TypeError: __init__() takes from 1 to 3 positional arguments but 4 were given ``` Is there a way I can fix this? Also, what does adding `supervised_keys` do? Is it necessary? How would I specify `supervised_keys` for a multi-input, multi-label dataset? Thanks, Gunjan Thanks for adding this dataset! As far as I know `supervised_keys` is mostly a holdover from TFDS, but isn't really used, so feel free to drop it (@lhoestq or @thomwolf correct me if I'm wrong). It definitely shouldn't be blocking :)
[ 0.021659571677446365, -0.271222323179245, 0.018146168440580368, 0.1329571008682251, 0.3712175488471985, 0.31664955615997314, 0.6164801120758057, -0.4762450158596039, 0.1994251161813736, 0.2660480737686157, -0.21772584319114685, 0.15355287492275238, -0.2759886085987091, 0.3479333519935608, 0.1080322265625, -0.12047630548477173, 0.17809629440307617, -0.21740180253982544, 0.025601260364055634, -0.03326788917183876, -0.22154118120670319, 0.007429944351315498, -0.23462539911270142, -0.28403598070144653, -0.686424732208252, -0.2522575557231903, -0.3487628996372223, -0.1600370705127716, -0.26118552684783936, -0.684292197227478, 0.17423465847969055, 0.32761648297309875, -0.17998003959655762, 0.4868171513080597, -0.0001189697504742071, 0.053939349949359894, 0.006014849990606308, -0.027013888582587242, -0.13157550990581512, -0.08840879797935486, 0.03389552980661392, -0.09976577758789062, -0.02308090217411518, -0.18768396973609924, -0.02059108391404152, -0.3216593563556671, -0.04785429686307907, -0.26782962679862976, 0.26227903366088867, 0.17089781165122986, 0.1447003334760666, -0.12118249386548996, 0.3119576871395111, -0.17778469622135162, -0.03400491923093796, 0.2013511061668396, -0.12939806282520294, 0.15727446973323822, 0.13255569338798523, -0.1618618369102478, 0.48101046681404114, 0.2527097761631012, -0.004529912024736404, -0.18835024535655975, 0.41284990310668945, -0.040781568735837936, -0.14796853065490723, -0.575507402420044, 0.15249256789684296, 0.3097069263458252, 0.6528840065002441, -0.03769729286432266, -0.6485281586647034, -0.14410240948200226, 0.3986092209815979, -0.16047392785549164, -0.14034289121627808, 0.0104316221550107, -0.003859901800751686, -0.2375010848045349, -0.36924442648887634, -0.0498817078769207, -0.21182480454444885, 0.2764361500740051, 0.33317050337791443, 0.35761386156082153, 0.05226876586675644, 0.35098809003829956, 0.2702970504760742, -0.05738360434770584, -0.02526288852095604, -0.10565544664859772, 0.045155368745326996, 0.22215063869953156, -0.2898249328136444, 0.17264699935913086, -0.04759766906499863, 0.13915178179740906, 0.1451030671596527, -0.10272182524204254, 0.052557408809661865, -0.3232678771018982, -0.21171921491622925, 0.11969350278377533, 0.10273328423500061, -0.01966964453458786, -0.0022726058959960938, 0.40259185433387756, -0.03666394203901291, -0.027458585798740387, 0.11021016538143158, -0.23520296812057495, -0.06834423542022705, -0.12961043417453766, 0.3619585335254669, 0.18700221180915833, -0.142421692609787, 0.1166466474533081, 0.04622425138950348, -0.15703260898590088, -0.06115291267633438, -0.032276224344968796, 0.35671910643577576, 0.30968916416168213, 0.23467816412448883, 0.013895140960812569, 0.10588495433330536, 0.42919015884399414, 0.1078810915350914, 0.05489712581038475, -0.14953775703907013, 0.3543500602245331, -0.14015737175941467, 0.02180071920156479, 0.2909844219684601, 0.0014130305498838425, 0.12716630101203918, 0.32069793343544006, 0.25569331645965576, -0.14872387051582336, 0.04745376110076904, -0.22020022571086884, 0.19376172125339508, 0.35699138045310974, -0.025585608556866646, 0.21459147334098816, -0.04567840322852135, -0.3797813057899475, -0.11004073917865753, 0.04526640102267265, -0.331182599067688, -0.02578042447566986, -0.05222561955451965, 0.06997714936733246, 0.1953081339597702, -0.09171955287456512, -0.47711655497550964, 0.20146875083446503, 0.12351641058921814, 0.03392047807574272, -0.07022564858198166, -0.2045566588640213, -0.26696518063545227, -0.25251102447509766, 0.27518245577812195, 0.4011728763580322, -0.2575547993183136, -0.20916680991649628, -0.11507082730531693, 0.1693906933069229, -0.20349380373954773, 0.21283689141273499, -0.26207318902015686, 0.44873759150505066, -0.09403064846992493, 0.06289282441139221, 0.0426737442612648, -0.8922805190086365, -0.06668254733085632, -0.014758055098354816, 0.08665958046913147, -0.12850357592105865, 0.16140706837177277, 0.32561808824539185, 0.10879859328269958, 0.028979141265153885, 0.1426028311252594, 0.11375997215509415, -0.1924496591091156, -0.04820934683084488, 0.17883774638175964, 0.1565864533185959, -0.10482731461524963, 0.30700230598449707, 0.2102843075990677, -0.21032539010047913, 0.1564217507839203, -0.1566663533449173, -0.01603163778781891, -0.1635691374540329, 0.12073855847120285, 0.379516065120697, 0.20923727750778198, -0.04998692125082016, 0.03132375329732895, 0.03800401836633682, -0.43501991033554077, 0.4339158833026886, 0.2955797612667084, 0.30499547719955444, -0.10492861270904541, -0.17570477724075317, -0.011609368026256561, 0.06134948134422302, -0.48528990149497986, -0.11461734771728516, 0.06567380577325821, 0.2741551697254181, -0.0914810448884964, -0.059961043298244476, 0.02059553936123848, 0.13930103182792664, 0.43971702456474304, 0.1631939858198166, 0.08983618021011353, 0.0351097509264946, -0.12541323900222778, 0.03179706260561943, -0.09822750091552734, 0.01795116439461708, 0.4089218080043793, -0.0632736086845398, 0.03488568216562271, 0.4561130404472351, 0.1855800300836563, -0.3028663396835327, -0.15818524360656738, 0.06319420784711838, 0.40929242968559265, -0.2760539948940277, -0.2940942347049713, -0.2007402926683426, 0.23204244673252106, -0.3411727249622345, -0.15501412749290466, 0.07752612233161926, -0.3345646560192108, 0.28671079874038696, -0.006310891360044479, 0.19574740529060364, 0.13473142683506012, 0.1028221845626831, -0.11359094828367233, -0.20674948394298553, 0.037919025868177414, -0.1822335571050644, -0.022835835814476013, -0.23546527326107025, 0.04138776659965515, 0.06557144969701767, 0.025815412402153015, 0.04009702429175377, -0.06107034534215927, -0.053584977984428406, 0.028656426817178726, 0.243106871843338, 0.15603114664554596, 0.503275454044342, 0.2892152667045593, 0.26658016443252563, -0.16509222984313965, -0.20136240124702454, -0.28969624638557434, 0.05789396911859512, 0.10029511153697968, -0.08127142488956451, 0.18571864068508148, 0.1985812783241272, 0.18826806545257568, 0.0334804430603981, -0.22378313541412354, -0.48005399107933044, 0.3684949278831482, 0.13112373650074005, -0.29117903113365173, 0.013699771836400032, -0.3054611384868622, -0.20973074436187744, -0.04781878739595413, -0.2719694674015045, -0.03293924406170845, -0.27319371700286865, 0.10028474777936935, 0.2303827553987503, 0.11108827590942383, 0.21874000132083893, 0.05057305470108986, 0.22456294298171997, -0.2533397078514099, 0.07365316897630692, -0.029004395008087158, -0.10451309382915497, -0.0029991865158081055, -0.02655758336186409, 0.3638058602809906, -0.33107537031173706, 0.5024330019950867, 0.08928554505109787, -0.14291146397590637, -0.20491619408130646, -0.4361688494682312, 0.027746079489588737, -0.1707720011472702, 0.2560725808143616, 0.0792691558599472, -0.04537881910800934, -0.12055347114801407, -0.2528281807899475, 0.32315537333488464, 0.1433301419019699, -0.06718239933252335, -0.022260043770074844, -0.20926503837108612, -0.3181767165660858, -0.32918256521224976, -0.0019014105200767517, -0.24159149825572968, -0.03133454918861389, 0.17833954095840454, 0.003908440470695496, -0.06209830939769745, 0.6229842305183411, 0.14219796657562256, -0.326935738325119, 0.11143803596496582, 0.10879183560609818, -0.020463066175580025, -0.3791362941265106, 0.23079219460487366, -0.3280828595161438, -0.2458159476518631, 0.11127471923828125, -0.20785440504550934, 0.4561768174171448, -0.023630134761333466, -0.07424137741327286, -0.05166999250650406, 0.060043901205062866, 0.02504332736134529, -0.024221092462539673, 0.22140462696552277, 0.12332729250192642, 0.12238218635320663, 0.0012232176959514618, -0.23970678448677063, -0.43327173590660095, 0.36128169298171997, -0.2303788661956787, 0.23025193810462952, -0.34530434012413025, 0.24058258533477783, 0.07447795569896698, 0.245303675532341, 0.008090460672974586, 0.04155167192220688, 0.43801358342170715, -0.21884475648403168, 0.3824874460697174, -0.19673556089401245, -0.5095445513725281, 0.26635652780532837, 0.006803736090660095, 0.07467489689588547, -0.05643083155155182, 0.002512289211153984, -0.15345582365989685, -0.1369745135307312, 0.4596613049507141, -0.29824885725975037, -0.07141518592834473, -0.13954414427280426, -0.06140054017305374, 0.17932264506816864, -0.12867948412895203, -0.23860058188438416, -0.42521217465400696, -0.09792487323284149, -0.31684279441833496, 0.08370574563741684, 0.030057162046432495, -0.0836135521531105, -0.5794287919998169, -0.27996626496315, -0.20954033732414246, 0.09627489745616913, 0.20156031847000122, 0.19982141256332397, -0.25014346837997437, 0.3073730170726776, 0.04232451319694519, 0.07501110434532166, 0.629977822303772, -0.5078381896018982, -0.20720933377742767, 0.4064024090766907, 0.08233533799648285, -0.4420147240161896, -0.3596889078617096, -0.06376282870769501, 0.2939635217189789, 0.05987972766160965, 0.33752521872520447, -0.31727632880210876, 0.1752975583076477, 0.14427706599235535, 0.02907348982989788, -0.11574646830558777, -0.2602500021457672, -0.1650698184967041, -0.34636861085891724, -0.2542929947376251, 0.03875862434506416, 0.2610556185245514, 0.22202524542808533, 0.07561087608337402, 0.05578826740384102, 0.0451996847987175, 0.04718676209449768, 0.1067100390791893, -0.007339484989643097, 0.08915949612855911, 0.5999580025672913, 0.35219085216522217, 0.044249508529901505, -0.22389426827430725, 0.5654519200325012, 0.49971804022789, -0.34988999366760254, -0.27769213914871216, -0.06960722804069519, -0.2492358684539795, 0.24174916744232178, -0.07404261827468872, 0.245090052485466, 0.20742326974868774, 0.25660768151283264, 0.032664407044649124, 0.016942648217082024, 0.1901453584432602, 0.5320228338241577, -0.03386428952217102, -0.587646484375, -0.3630557060241699, 0.18822401762008667, 0.08403725922107697, -0.09250734746456146, 0.3905683755874634, 0.0355893149971962, -0.31005871295928955, 0.20690207183361053, 0.15201622247695923, 0.712968647480011, -0.504086434841156, 0.20063811540603638, -0.1281062364578247, -0.05140706151723862, 0.6691425442695618, 0.025914736092090607, 0.10605469346046448, -0.16509132087230682, -0.24148492515087128, 0.10752087831497192, 0.063143789768219, 0.05304602533578873, 0.33994030952453613, -0.1476922184228897, 0.10400812327861786, -0.19961661100387573, 0.14421430230140686, -0.22863872349262238, 0.09427833557128906, 0.24139124155044556, -0.3566121757030487, 0.31552785634994507, 0.11481253802776337, -0.03792563080787659, -0.22128263115882874, 0.01474044844508171, -0.013145653530955315, -0.04855402559041977, -0.276263952255249, -0.45603466033935547, -0.10824915021657944, -0.32643482089042664, 0.3514828681945801, -0.05456656590104103, -0.08294723182916641, 0.09229153394699097, 0.36423325538635254, 0.6377289295196533, -0.08701859414577484, -0.01216026209294796, 0.19312581419944763, -0.007270753383636475, -0.18534083664417267, -0.4156341850757599, -0.2583947479724884, 0.15830549597740173, -0.09677446633577347, -0.3491545617580414, 0.06303279101848602, 0.04832116886973381, -0.2924516499042511, -0.17371749877929688, 0.11124110221862793, -0.1338452696800232, 0.08430735021829605, 0.019453195855021477, 0.265888512134552, 0.2253154218196869, -0.31937727332115173, 0.030435582622885704, 0.052268486469984055, -0.0975162461400032, 0.3346412777900696, -0.15794502198696136, 0.02924370765686035, -0.0027381889522075653, 0.3327619731426239, 0.028551388531923294, 0.2265630066394806, 0.41726329922676086, -0.019538287073373795, 0.044150158762931824, -0.07076311111450195, -0.07859770953655243, 0.28072264790534973, -0.3569044768810272, -0.021591737866401672, 0.45095160603523254, 0.06820900738239288, -0.00828237272799015, 0.40703776478767395, 0.006086651235818863, 0.10329732298851013, 0.08792990446090698, -0.1227884441614151, -0.41403186321258545, 0.05718061327934265, -0.40070369839668274, 0.2787560522556305, -0.04079344868659973, 0.44720420241355896, 0.1755111664533615, 0.4107339084148407, -0.20101797580718994, -0.06090395897626877, -0.29435524344444275, -0.0041193291544914246, 0.47798871994018555, 0.055954527109861374, -0.13621313869953156, 0.0865933746099472, 0.10840265452861786, -0.1853458434343338, 0.17125333845615387, -0.031114963814616203, -0.174943745136261, 0.12467296421527863, 0.25140729546546936, 0.1749790608882904, 0.013920658268034458, -0.43095099925994873, -0.15838970243930817, -0.114320307970047, 0.2133873850107193, 0.26294732093811035, -0.09498728811740875, 0.3122137784957886, -0.4964766204357147, 0.0038021430373191833, 0.023873604834079742, 0.144028902053833, 0.04208558052778244, -0.06075941026210785, 0.3293676972389221, 0.07902476191520691, 0.12721115350723267, -0.14993330836296082, -0.3488270938396454, 0.04825393855571747, -0.44326937198638916, -0.12889978289604187, 0.08417962491512299, -0.36321890354156494, 0.44646281003952026, 0.2567116320133209, 0.23998984694480896, -0.12176290154457092, -0.2593408226966858, 0.42965951561927795, 0.08480093628168106, 0.07337191700935364, -0.21977835893630981, -0.41962745785713196, -0.00843142718076706, 0.023884594440460205, 0.141366645693779, 0.2538613975048065, 0.21975430846214294, -0.08435652405023575, 0.01703719049692154, -0.1205667182803154, 0.05921252444386482, 0.07183392345905304, 0.11950424313545227, 0.12819796800613403, -0.07267632335424423, 0.08376406133174896, 0.2819841206073761, 0.23153649270534515, 0.060066837817430496, 0.1948661357164383, -0.07223808020353317, 0.3028276562690735, -0.17646804451942444, -0.07571403682231903, 0.24055033922195435, -0.3558899760246277, 0.49762213230133057, -0.18132278323173523, -0.0065752193331718445, -0.04458749294281006, -0.09601704776287079, 0.20089229941368103, -0.2110218107700348, -0.38870474696159363, -0.2711664140224457, 0.32183369994163513, -0.13058599829673767, -0.10666096210479736, -0.18256214261054993, -0.10564549267292023, -0.056314438581466675, -0.05844903364777565, 0.06906387209892273, -0.19143562018871307, 0.31670546531677246, -0.10986264050006866, -0.15673795342445374, -0.1262350082397461, -0.43054676055908203, 0.46188440918922424, 0.283460795879364, -0.28314313292503357, 0.20363739132881165, 0.35410964488983154, -0.4410456120967865, 0.18974250555038452, 0.33223652839660645, 0.6006937026977539, 0.2195313274860382, 0.2928980588912964, 0.08387775719165802, -0.176064133644104, -0.1078898012638092, 0.17421339452266693, 0.04964391142129898, 0.4417833983898163, -0.0686272531747818, 0.13694529235363007, 0.006778351962566376, -0.08323492109775543, 0.2980153262615204, 0.18124225735664368, 0.33938464522361755, -0.01679578796029091, -0.3750322759151459, -0.03410748392343521, -0.17806115746498108, -0.076300248503685, 0.35836532711982727, -0.32155677676200867, -0.06960895657539368, 0.2845403850078583, -0.08040588349103928, 0.014341548085212708, -0.3408437967300415, 0.01847872883081436, 0.17676842212677002, 0.492386132478714, 0.1872951090335846, 0.16532915830612183, -0.23729443550109863, -0.12396147847175598, -0.5642417073249817, -0.20429736375808716, -0.31968018412590027, -0.23375162482261658, -0.0577932745218277, -0.09947458654642105, 0.364108681678772, -0.20351900160312653, 0.6210823059082031, -0.2856467068195343, 0.38483133912086487, 0.3869745433330536, -0.2538064122200012, 0.06577064841985703, 0.20190148055553436, 0.07720423489809036, 0.039699487388134, -0.15819811820983887, -0.08727136254310608, 0.036885492503643036, 0.0007561780512332916, -0.10404165089130402, 0.16268575191497803, -0.2012912780046463, -0.22074484825134277, 0.19883321225643158, 0.07631029188632965, 0.8045886754989624, -0.055860407650470734, 0.0646558403968811, -0.14962036907672882, -0.05606183782219887, -0.10255484282970428, 0.06812071055173874, 0.4282155930995941, 0.5867264270782471, -0.29106733202934265, -0.0661170482635498, -0.06739877909421921, -0.0161996241658926, -0.09806106984615326, -0.04759194701910019, -0.28806036710739136, 0.31860658526420593, -0.019152387976646423, 0.005598562303930521, 0.2622624933719635, 0.22147658467292786, -0.056542493402957916, 0.04059845209121704, -0.026139430701732635, -0.3694877326488495, 0.5187729597091675, -0.19146980345249176, -0.1348087191581726, -0.17388762533664703, 0.013972930610179901, 0.05077473074197769, 0.10487369447946548, -0.3421271741390228, 0.12844231724739075, 0.2554287016391754, 0.07507656514644623, -0.7180352210998535, 0.4141142666339874, -0.21506409347057343, -0.05440463125705719, 0.08227571845054626, 0.006115071475505829, -0.11764322966337204, 0.020446954295039177, -0.13533322513103485, -0.10601893812417984 ]
https://github.com/huggingface/datasets/issues/1811
Unable to add Multi-label Datasets
Thanks @yjernite @lhoestq The template for new dataset makes it slightly confusing. I suppose the comment suggesting its update can be removed.
I am trying to add [CIFAR-100](https://www.cs.toronto.edu/~kriz/cifar.html) dataset. The dataset contains two labels per image - `fine label` and `coarse label`. Using just one label in supervised keys as `supervised_keys=("img", "fine_label")` raises no issue. But trying `supervised_keys=("img", "fine_label","coarse_label")` leads to this error : ```python Traceback (most recent call last): File "test_script.py", line 2, in <module> d = load_dataset('./datasets/cifar100') File "~/datasets/src/datasets/load.py", line 668, in load_dataset **config_kwargs, File "~/datasets/src/datasets/builder.py", line 896, in __init__ super(GeneratorBasedBuilder, self).__init__(*args, **kwargs) File "~/datasets/src/datasets/builder.py", line 247, in __init__ info.update(self._info()) File "~/.cache/huggingface/modules/datasets_modules/datasets/cifar100/61d2489b2d4a4abc34201432541b7380984ec714e290817d9a1ee318e4b74e0f/cifar100.py", line 79, in _info citation=_CITATION, File "<string>", line 19, in __init__ File "~/datasets/src/datasets/info.py", line 136, in __post_init__ self.supervised_keys = SupervisedKeysData(*self.supervised_keys) TypeError: __init__() takes from 1 to 3 positional arguments but 4 were given ``` Is there a way I can fix this? Also, what does adding `supervised_keys` do? Is it necessary? How would I specify `supervised_keys` for a multi-input, multi-label dataset? Thanks, Gunjan
22
Unable to add Multi-label Datasets I am trying to add [CIFAR-100](https://www.cs.toronto.edu/~kriz/cifar.html) dataset. The dataset contains two labels per image - `fine label` and `coarse label`. Using just one label in supervised keys as `supervised_keys=("img", "fine_label")` raises no issue. But trying `supervised_keys=("img", "fine_label","coarse_label")` leads to this error : ```python Traceback (most recent call last): File "test_script.py", line 2, in <module> d = load_dataset('./datasets/cifar100') File "~/datasets/src/datasets/load.py", line 668, in load_dataset **config_kwargs, File "~/datasets/src/datasets/builder.py", line 896, in __init__ super(GeneratorBasedBuilder, self).__init__(*args, **kwargs) File "~/datasets/src/datasets/builder.py", line 247, in __init__ info.update(self._info()) File "~/.cache/huggingface/modules/datasets_modules/datasets/cifar100/61d2489b2d4a4abc34201432541b7380984ec714e290817d9a1ee318e4b74e0f/cifar100.py", line 79, in _info citation=_CITATION, File "<string>", line 19, in __init__ File "~/datasets/src/datasets/info.py", line 136, in __post_init__ self.supervised_keys = SupervisedKeysData(*self.supervised_keys) TypeError: __init__() takes from 1 to 3 positional arguments but 4 were given ``` Is there a way I can fix this? Also, what does adding `supervised_keys` do? Is it necessary? How would I specify `supervised_keys` for a multi-input, multi-label dataset? Thanks, Gunjan Thanks @yjernite @lhoestq The template for new dataset makes it slightly confusing. I suppose the comment suggesting its update can be removed.
[ 0.021659571677446365, -0.271222323179245, 0.018146168440580368, 0.1329571008682251, 0.3712175488471985, 0.31664955615997314, 0.6164801120758057, -0.4762450158596039, 0.1994251161813736, 0.2660480737686157, -0.21772584319114685, 0.15355287492275238, -0.2759886085987091, 0.3479333519935608, 0.1080322265625, -0.12047630548477173, 0.17809629440307617, -0.21740180253982544, 0.025601260364055634, -0.03326788917183876, -0.22154118120670319, 0.007429944351315498, -0.23462539911270142, -0.28403598070144653, -0.686424732208252, -0.2522575557231903, -0.3487628996372223, -0.1600370705127716, -0.26118552684783936, -0.684292197227478, 0.17423465847969055, 0.32761648297309875, -0.17998003959655762, 0.4868171513080597, -0.0001189697504742071, 0.053939349949359894, 0.006014849990606308, -0.027013888582587242, -0.13157550990581512, -0.08840879797935486, 0.03389552980661392, -0.09976577758789062, -0.02308090217411518, -0.18768396973609924, -0.02059108391404152, -0.3216593563556671, -0.04785429686307907, -0.26782962679862976, 0.26227903366088867, 0.17089781165122986, 0.1447003334760666, -0.12118249386548996, 0.3119576871395111, -0.17778469622135162, -0.03400491923093796, 0.2013511061668396, -0.12939806282520294, 0.15727446973323822, 0.13255569338798523, -0.1618618369102478, 0.48101046681404114, 0.2527097761631012, -0.004529912024736404, -0.18835024535655975, 0.41284990310668945, -0.040781568735837936, -0.14796853065490723, -0.575507402420044, 0.15249256789684296, 0.3097069263458252, 0.6528840065002441, -0.03769729286432266, -0.6485281586647034, -0.14410240948200226, 0.3986092209815979, -0.16047392785549164, -0.14034289121627808, 0.0104316221550107, -0.003859901800751686, -0.2375010848045349, -0.36924442648887634, -0.0498817078769207, -0.21182480454444885, 0.2764361500740051, 0.33317050337791443, 0.35761386156082153, 0.05226876586675644, 0.35098809003829956, 0.2702970504760742, -0.05738360434770584, -0.02526288852095604, -0.10565544664859772, 0.045155368745326996, 0.22215063869953156, -0.2898249328136444, 0.17264699935913086, -0.04759766906499863, 0.13915178179740906, 0.1451030671596527, -0.10272182524204254, 0.052557408809661865, -0.3232678771018982, -0.21171921491622925, 0.11969350278377533, 0.10273328423500061, -0.01966964453458786, -0.0022726058959960938, 0.40259185433387756, -0.03666394203901291, -0.027458585798740387, 0.11021016538143158, -0.23520296812057495, -0.06834423542022705, -0.12961043417453766, 0.3619585335254669, 0.18700221180915833, -0.142421692609787, 0.1166466474533081, 0.04622425138950348, -0.15703260898590088, -0.06115291267633438, -0.032276224344968796, 0.35671910643577576, 0.30968916416168213, 0.23467816412448883, 0.013895140960812569, 0.10588495433330536, 0.42919015884399414, 0.1078810915350914, 0.05489712581038475, -0.14953775703907013, 0.3543500602245331, -0.14015737175941467, 0.02180071920156479, 0.2909844219684601, 0.0014130305498838425, 0.12716630101203918, 0.32069793343544006, 0.25569331645965576, -0.14872387051582336, 0.04745376110076904, -0.22020022571086884, 0.19376172125339508, 0.35699138045310974, -0.025585608556866646, 0.21459147334098816, -0.04567840322852135, -0.3797813057899475, -0.11004073917865753, 0.04526640102267265, -0.331182599067688, -0.02578042447566986, -0.05222561955451965, 0.06997714936733246, 0.1953081339597702, -0.09171955287456512, -0.47711655497550964, 0.20146875083446503, 0.12351641058921814, 0.03392047807574272, -0.07022564858198166, -0.2045566588640213, -0.26696518063545227, -0.25251102447509766, 0.27518245577812195, 0.4011728763580322, -0.2575547993183136, -0.20916680991649628, -0.11507082730531693, 0.1693906933069229, -0.20349380373954773, 0.21283689141273499, -0.26207318902015686, 0.44873759150505066, -0.09403064846992493, 0.06289282441139221, 0.0426737442612648, -0.8922805190086365, -0.06668254733085632, -0.014758055098354816, 0.08665958046913147, -0.12850357592105865, 0.16140706837177277, 0.32561808824539185, 0.10879859328269958, 0.028979141265153885, 0.1426028311252594, 0.11375997215509415, -0.1924496591091156, -0.04820934683084488, 0.17883774638175964, 0.1565864533185959, -0.10482731461524963, 0.30700230598449707, 0.2102843075990677, -0.21032539010047913, 0.1564217507839203, -0.1566663533449173, -0.01603163778781891, -0.1635691374540329, 0.12073855847120285, 0.379516065120697, 0.20923727750778198, -0.04998692125082016, 0.03132375329732895, 0.03800401836633682, -0.43501991033554077, 0.4339158833026886, 0.2955797612667084, 0.30499547719955444, -0.10492861270904541, -0.17570477724075317, -0.011609368026256561, 0.06134948134422302, -0.48528990149497986, -0.11461734771728516, 0.06567380577325821, 0.2741551697254181, -0.0914810448884964, -0.059961043298244476, 0.02059553936123848, 0.13930103182792664, 0.43971702456474304, 0.1631939858198166, 0.08983618021011353, 0.0351097509264946, -0.12541323900222778, 0.03179706260561943, -0.09822750091552734, 0.01795116439461708, 0.4089218080043793, -0.0632736086845398, 0.03488568216562271, 0.4561130404472351, 0.1855800300836563, -0.3028663396835327, -0.15818524360656738, 0.06319420784711838, 0.40929242968559265, -0.2760539948940277, -0.2940942347049713, -0.2007402926683426, 0.23204244673252106, -0.3411727249622345, -0.15501412749290466, 0.07752612233161926, -0.3345646560192108, 0.28671079874038696, -0.006310891360044479, 0.19574740529060364, 0.13473142683506012, 0.1028221845626831, -0.11359094828367233, -0.20674948394298553, 0.037919025868177414, -0.1822335571050644, -0.022835835814476013, -0.23546527326107025, 0.04138776659965515, 0.06557144969701767, 0.025815412402153015, 0.04009702429175377, -0.06107034534215927, -0.053584977984428406, 0.028656426817178726, 0.243106871843338, 0.15603114664554596, 0.503275454044342, 0.2892152667045593, 0.26658016443252563, -0.16509222984313965, -0.20136240124702454, -0.28969624638557434, 0.05789396911859512, 0.10029511153697968, -0.08127142488956451, 0.18571864068508148, 0.1985812783241272, 0.18826806545257568, 0.0334804430603981, -0.22378313541412354, -0.48005399107933044, 0.3684949278831482, 0.13112373650074005, -0.29117903113365173, 0.013699771836400032, -0.3054611384868622, -0.20973074436187744, -0.04781878739595413, -0.2719694674015045, -0.03293924406170845, -0.27319371700286865, 0.10028474777936935, 0.2303827553987503, 0.11108827590942383, 0.21874000132083893, 0.05057305470108986, 0.22456294298171997, -0.2533397078514099, 0.07365316897630692, -0.029004395008087158, -0.10451309382915497, -0.0029991865158081055, -0.02655758336186409, 0.3638058602809906, -0.33107537031173706, 0.5024330019950867, 0.08928554505109787, -0.14291146397590637, -0.20491619408130646, -0.4361688494682312, 0.027746079489588737, -0.1707720011472702, 0.2560725808143616, 0.0792691558599472, -0.04537881910800934, -0.12055347114801407, -0.2528281807899475, 0.32315537333488464, 0.1433301419019699, -0.06718239933252335, -0.022260043770074844, -0.20926503837108612, -0.3181767165660858, -0.32918256521224976, -0.0019014105200767517, -0.24159149825572968, -0.03133454918861389, 0.17833954095840454, 0.003908440470695496, -0.06209830939769745, 0.6229842305183411, 0.14219796657562256, -0.326935738325119, 0.11143803596496582, 0.10879183560609818, -0.020463066175580025, -0.3791362941265106, 0.23079219460487366, -0.3280828595161438, -0.2458159476518631, 0.11127471923828125, -0.20785440504550934, 0.4561768174171448, -0.023630134761333466, -0.07424137741327286, -0.05166999250650406, 0.060043901205062866, 0.02504332736134529, -0.024221092462539673, 0.22140462696552277, 0.12332729250192642, 0.12238218635320663, 0.0012232176959514618, -0.23970678448677063, -0.43327173590660095, 0.36128169298171997, -0.2303788661956787, 0.23025193810462952, -0.34530434012413025, 0.24058258533477783, 0.07447795569896698, 0.245303675532341, 0.008090460672974586, 0.04155167192220688, 0.43801358342170715, -0.21884475648403168, 0.3824874460697174, -0.19673556089401245, -0.5095445513725281, 0.26635652780532837, 0.006803736090660095, 0.07467489689588547, -0.05643083155155182, 0.002512289211153984, -0.15345582365989685, -0.1369745135307312, 0.4596613049507141, -0.29824885725975037, -0.07141518592834473, -0.13954414427280426, -0.06140054017305374, 0.17932264506816864, -0.12867948412895203, -0.23860058188438416, -0.42521217465400696, -0.09792487323284149, -0.31684279441833496, 0.08370574563741684, 0.030057162046432495, -0.0836135521531105, -0.5794287919998169, -0.27996626496315, -0.20954033732414246, 0.09627489745616913, 0.20156031847000122, 0.19982141256332397, -0.25014346837997437, 0.3073730170726776, 0.04232451319694519, 0.07501110434532166, 0.629977822303772, -0.5078381896018982, -0.20720933377742767, 0.4064024090766907, 0.08233533799648285, -0.4420147240161896, -0.3596889078617096, -0.06376282870769501, 0.2939635217189789, 0.05987972766160965, 0.33752521872520447, -0.31727632880210876, 0.1752975583076477, 0.14427706599235535, 0.02907348982989788, -0.11574646830558777, -0.2602500021457672, -0.1650698184967041, -0.34636861085891724, -0.2542929947376251, 0.03875862434506416, 0.2610556185245514, 0.22202524542808533, 0.07561087608337402, 0.05578826740384102, 0.0451996847987175, 0.04718676209449768, 0.1067100390791893, -0.007339484989643097, 0.08915949612855911, 0.5999580025672913, 0.35219085216522217, 0.044249508529901505, -0.22389426827430725, 0.5654519200325012, 0.49971804022789, -0.34988999366760254, -0.27769213914871216, -0.06960722804069519, -0.2492358684539795, 0.24174916744232178, -0.07404261827468872, 0.245090052485466, 0.20742326974868774, 0.25660768151283264, 0.032664407044649124, 0.016942648217082024, 0.1901453584432602, 0.5320228338241577, -0.03386428952217102, -0.587646484375, -0.3630557060241699, 0.18822401762008667, 0.08403725922107697, -0.09250734746456146, 0.3905683755874634, 0.0355893149971962, -0.31005871295928955, 0.20690207183361053, 0.15201622247695923, 0.712968647480011, -0.504086434841156, 0.20063811540603638, -0.1281062364578247, -0.05140706151723862, 0.6691425442695618, 0.025914736092090607, 0.10605469346046448, -0.16509132087230682, -0.24148492515087128, 0.10752087831497192, 0.063143789768219, 0.05304602533578873, 0.33994030952453613, -0.1476922184228897, 0.10400812327861786, -0.19961661100387573, 0.14421430230140686, -0.22863872349262238, 0.09427833557128906, 0.24139124155044556, -0.3566121757030487, 0.31552785634994507, 0.11481253802776337, -0.03792563080787659, -0.22128263115882874, 0.01474044844508171, -0.013145653530955315, -0.04855402559041977, -0.276263952255249, -0.45603466033935547, -0.10824915021657944, -0.32643482089042664, 0.3514828681945801, -0.05456656590104103, -0.08294723182916641, 0.09229153394699097, 0.36423325538635254, 0.6377289295196533, -0.08701859414577484, -0.01216026209294796, 0.19312581419944763, -0.007270753383636475, -0.18534083664417267, -0.4156341850757599, -0.2583947479724884, 0.15830549597740173, -0.09677446633577347, -0.3491545617580414, 0.06303279101848602, 0.04832116886973381, -0.2924516499042511, -0.17371749877929688, 0.11124110221862793, -0.1338452696800232, 0.08430735021829605, 0.019453195855021477, 0.265888512134552, 0.2253154218196869, -0.31937727332115173, 0.030435582622885704, 0.052268486469984055, -0.0975162461400032, 0.3346412777900696, -0.15794502198696136, 0.02924370765686035, -0.0027381889522075653, 0.3327619731426239, 0.028551388531923294, 0.2265630066394806, 0.41726329922676086, -0.019538287073373795, 0.044150158762931824, -0.07076311111450195, -0.07859770953655243, 0.28072264790534973, -0.3569044768810272, -0.021591737866401672, 0.45095160603523254, 0.06820900738239288, -0.00828237272799015, 0.40703776478767395, 0.006086651235818863, 0.10329732298851013, 0.08792990446090698, -0.1227884441614151, -0.41403186321258545, 0.05718061327934265, -0.40070369839668274, 0.2787560522556305, -0.04079344868659973, 0.44720420241355896, 0.1755111664533615, 0.4107339084148407, -0.20101797580718994, -0.06090395897626877, -0.29435524344444275, -0.0041193291544914246, 0.47798871994018555, 0.055954527109861374, -0.13621313869953156, 0.0865933746099472, 0.10840265452861786, -0.1853458434343338, 0.17125333845615387, -0.031114963814616203, -0.174943745136261, 0.12467296421527863, 0.25140729546546936, 0.1749790608882904, 0.013920658268034458, -0.43095099925994873, -0.15838970243930817, -0.114320307970047, 0.2133873850107193, 0.26294732093811035, -0.09498728811740875, 0.3122137784957886, -0.4964766204357147, 0.0038021430373191833, 0.023873604834079742, 0.144028902053833, 0.04208558052778244, -0.06075941026210785, 0.3293676972389221, 0.07902476191520691, 0.12721115350723267, -0.14993330836296082, -0.3488270938396454, 0.04825393855571747, -0.44326937198638916, -0.12889978289604187, 0.08417962491512299, -0.36321890354156494, 0.44646281003952026, 0.2567116320133209, 0.23998984694480896, -0.12176290154457092, -0.2593408226966858, 0.42965951561927795, 0.08480093628168106, 0.07337191700935364, -0.21977835893630981, -0.41962745785713196, -0.00843142718076706, 0.023884594440460205, 0.141366645693779, 0.2538613975048065, 0.21975430846214294, -0.08435652405023575, 0.01703719049692154, -0.1205667182803154, 0.05921252444386482, 0.07183392345905304, 0.11950424313545227, 0.12819796800613403, -0.07267632335424423, 0.08376406133174896, 0.2819841206073761, 0.23153649270534515, 0.060066837817430496, 0.1948661357164383, -0.07223808020353317, 0.3028276562690735, -0.17646804451942444, -0.07571403682231903, 0.24055033922195435, -0.3558899760246277, 0.49762213230133057, -0.18132278323173523, -0.0065752193331718445, -0.04458749294281006, -0.09601704776287079, 0.20089229941368103, -0.2110218107700348, -0.38870474696159363, -0.2711664140224457, 0.32183369994163513, -0.13058599829673767, -0.10666096210479736, -0.18256214261054993, -0.10564549267292023, -0.056314438581466675, -0.05844903364777565, 0.06906387209892273, -0.19143562018871307, 0.31670546531677246, -0.10986264050006866, -0.15673795342445374, -0.1262350082397461, -0.43054676055908203, 0.46188440918922424, 0.283460795879364, -0.28314313292503357, 0.20363739132881165, 0.35410964488983154, -0.4410456120967865, 0.18974250555038452, 0.33223652839660645, 0.6006937026977539, 0.2195313274860382, 0.2928980588912964, 0.08387775719165802, -0.176064133644104, -0.1078898012638092, 0.17421339452266693, 0.04964391142129898, 0.4417833983898163, -0.0686272531747818, 0.13694529235363007, 0.006778351962566376, -0.08323492109775543, 0.2980153262615204, 0.18124225735664368, 0.33938464522361755, -0.01679578796029091, -0.3750322759151459, -0.03410748392343521, -0.17806115746498108, -0.076300248503685, 0.35836532711982727, -0.32155677676200867, -0.06960895657539368, 0.2845403850078583, -0.08040588349103928, 0.014341548085212708, -0.3408437967300415, 0.01847872883081436, 0.17676842212677002, 0.492386132478714, 0.1872951090335846, 0.16532915830612183, -0.23729443550109863, -0.12396147847175598, -0.5642417073249817, -0.20429736375808716, -0.31968018412590027, -0.23375162482261658, -0.0577932745218277, -0.09947458654642105, 0.364108681678772, -0.20351900160312653, 0.6210823059082031, -0.2856467068195343, 0.38483133912086487, 0.3869745433330536, -0.2538064122200012, 0.06577064841985703, 0.20190148055553436, 0.07720423489809036, 0.039699487388134, -0.15819811820983887, -0.08727136254310608, 0.036885492503643036, 0.0007561780512332916, -0.10404165089130402, 0.16268575191497803, -0.2012912780046463, -0.22074484825134277, 0.19883321225643158, 0.07631029188632965, 0.8045886754989624, -0.055860407650470734, 0.0646558403968811, -0.14962036907672882, -0.05606183782219887, -0.10255484282970428, 0.06812071055173874, 0.4282155930995941, 0.5867264270782471, -0.29106733202934265, -0.0661170482635498, -0.06739877909421921, -0.0161996241658926, -0.09806106984615326, -0.04759194701910019, -0.28806036710739136, 0.31860658526420593, -0.019152387976646423, 0.005598562303930521, 0.2622624933719635, 0.22147658467292786, -0.056542493402957916, 0.04059845209121704, -0.026139430701732635, -0.3694877326488495, 0.5187729597091675, -0.19146980345249176, -0.1348087191581726, -0.17388762533664703, 0.013972930610179901, 0.05077473074197769, 0.10487369447946548, -0.3421271741390228, 0.12844231724739075, 0.2554287016391754, 0.07507656514644623, -0.7180352210998535, 0.4141142666339874, -0.21506409347057343, -0.05440463125705719, 0.08227571845054626, 0.006115071475505829, -0.11764322966337204, 0.020446954295039177, -0.13533322513103485, -0.10601893812417984 ]
https://github.com/huggingface/datasets/issues/1810
Add Hateful Memes Dataset
Hi @gchhablani since Array2D doesn't support images of different sizes, I would suggest to store in the dataset the paths to the image file instead of the image data. This has the advantage of not decompressing the data (images are often compressed using jpeg, png etc.). Users can still apply `.map` to load the images if they want to. Though it would en up being Sequences features. In the future we'll add support for ragged tensors for this case and update the relevant dataset with this feature.
## Add Hateful Memes Dataset - **Name:** Hateful Memes - **Description:** [https://ai.facebook.com/blog/hateful-memes-challenge-and-data-set]( https://ai.facebook.com/blog/hateful-memes-challenge-and-data-set) - **Paper:** [https://arxiv.org/pdf/2005.04790.pdf](https://arxiv.org/pdf/2005.04790.pdf) - **Data:** [This link](https://drivendata-competition-fb-hateful-memes-data.s3.amazonaws.com/XjiOc5ycDBRRNwbhRlgH.zip?AWSAccessKeyId=AKIARVBOBDCY4MWEDJKS&Signature=DaUuGgZWUgDHzEPPbyJ2PhSJ56Q%3D&Expires=1612816874) - **Motivation:** Including multi-modal datasets to 🤗 datasets. I will be adding this dataset. It requires the user to sign an agreement on DrivenData. So, it will be used with a manual download. The issue with this dataset is that the images are of different sizes. The image datasets added so far (CIFAR-10 and MNIST) have a uniform shape throughout. So something like ```python datasets.Array2D(shape=(28, 28), dtype="uint8") ``` won't work for the images. How would I add image features then? I checked `datasets/features.py` but couldn't figure out the appropriate class for this. I'm assuming I would want to avoid re-sizing at all since we want the user to be able to access the original images. Also, in case I want to load only a subset of the data, since the actual data is around 8.8GB, how would that be possible? Thanks, Gunjan
87
Add Hateful Memes Dataset ## Add Hateful Memes Dataset - **Name:** Hateful Memes - **Description:** [https://ai.facebook.com/blog/hateful-memes-challenge-and-data-set]( https://ai.facebook.com/blog/hateful-memes-challenge-and-data-set) - **Paper:** [https://arxiv.org/pdf/2005.04790.pdf](https://arxiv.org/pdf/2005.04790.pdf) - **Data:** [This link](https://drivendata-competition-fb-hateful-memes-data.s3.amazonaws.com/XjiOc5ycDBRRNwbhRlgH.zip?AWSAccessKeyId=AKIARVBOBDCY4MWEDJKS&Signature=DaUuGgZWUgDHzEPPbyJ2PhSJ56Q%3D&Expires=1612816874) - **Motivation:** Including multi-modal datasets to 🤗 datasets. I will be adding this dataset. It requires the user to sign an agreement on DrivenData. So, it will be used with a manual download. The issue with this dataset is that the images are of different sizes. The image datasets added so far (CIFAR-10 and MNIST) have a uniform shape throughout. So something like ```python datasets.Array2D(shape=(28, 28), dtype="uint8") ``` won't work for the images. How would I add image features then? I checked `datasets/features.py` but couldn't figure out the appropriate class for this. I'm assuming I would want to avoid re-sizing at all since we want the user to be able to access the original images. Also, in case I want to load only a subset of the data, since the actual data is around 8.8GB, how would that be possible? Thanks, Gunjan Hi @gchhablani since Array2D doesn't support images of different sizes, I would suggest to store in the dataset the paths to the image file instead of the image data. This has the advantage of not decompressing the data (images are often compressed using jpeg, png etc.). Users can still apply `.map` to load the images if they want to. Though it would en up being Sequences features. In the future we'll add support for ragged tensors for this case and update the relevant dataset with this feature.
[ -0.2504211366176605, 0.15920671820640564, -0.14461420476436615, 0.048640768975019455, 0.10480587929487228, 0.2664606273174286, 0.4449886679649353, -0.07321247458457947, -0.08323484659194946, -0.22534532845020294, -0.02304980158805847, -0.28218501806259155, -0.5021377801895142, 0.24750103056430817, 0.01564922370016575, -0.12452086806297302, 0.03239065408706665, 0.03152337670326233, -0.1846613585948944, -0.05561389401555061, -0.039098236709833145, -0.1718231439590454, 0.18335773050785065, -0.26211750507354736, -0.5729023218154907, -0.07941232621669769, -0.2922714650630951, 0.27430275082588196, -0.17466989159584045, -0.47573068737983704, 0.03421176224946976, 0.36687225103378296, 0.14253586530685425, 0.511407196521759, -0.00011803744564531371, 0.061328575015068054, -0.08145667612552643, -0.19743193686008453, 0.04601332172751427, 0.09798040986061096, 0.07889670878648758, -0.5317854881286621, -0.1205245777964592, -0.25938478112220764, 0.14250218868255615, -0.49977394938468933, 0.20766694843769073, -0.05054651200771332, 0.6721629500389099, -0.0005185110494494438, 0.1403406709432602, -0.1678144335746765, 0.22367767989635468, -0.02954212948679924, 0.030244626104831696, 0.7310447096824646, -0.0535113662481308, -0.2448931634426117, 0.0850694477558136, 0.10538944602012634, 0.2414756715297699, 0.26610639691352844, -0.1824451982975006, 0.09815946221351624, 0.4686678946018219, -0.14950500428676605, -0.08503090590238571, -0.3651396632194519, 0.0692552775144577, 0.35330042243003845, 0.3158087730407715, -0.11577402800321579, -0.28308963775634766, -0.4789537489414215, -0.05198703706264496, 0.04707486927509308, -0.09738140553236008, 0.29337015748023987, -0.0024284785613417625, -0.008362408727407455, -0.40787115693092346, -0.11137957870960236, -0.39084911346435547, 0.40310245752334595, -0.012804392725229263, -0.11137475073337555, 0.044160790741443634, 0.331326425075531, -0.04704117402434349, -0.31768012046813965, -0.050353482365608215, -0.03211931139230728, 0.33441099524497986, 0.29427090287208557, 0.24712449312210083, 0.03572412580251694, -0.2338346242904663, -0.2644752860069275, 0.4943545460700989, -0.2746838927268982, -0.03651801496744156, -0.06116972863674164, -0.5127976536750793, -0.10919628292322159, 0.17286798357963562, -0.2186567634344101, -0.4133869707584381, 0.28842249512672424, 0.14234499633312225, 0.0239076167345047, -0.06801819801330566, -0.00006621330976486206, -0.17209991812705994, 0.08526013046503067, -0.02061212994158268, -0.04136740416288376, 0.2201981544494629, 0.006569895893335342, -0.22257128357887268, -0.2236706018447876, 0.10903897136449814, 0.061311572790145874, -0.07975836843252182, 0.1821875423192978, 0.09283751249313354, -0.04679267853498459, -0.06916473060846329, 0.231292724609375, 0.06429305672645569, -0.11133348941802979, -0.12132387608289719, -0.0465071015059948, -0.08350896090269089, 0.218940868973732, 0.3173374831676483, 0.40664142370224, 0.3729764223098755, -0.0502350889146328, 0.036143384873867035, 0.18774870038032532, 0.17032890021800995, -0.1536281704902649, 0.2397407591342926, 0.10256320238113403, 0.1239590048789978, -0.04430428519845009, -0.02590823546051979, 0.13735124468803406, -0.1783612072467804, 0.12348403036594391, -0.29652658104896545, -0.034951381385326385, -0.07875039428472519, 0.06077052652835846, -0.3073103427886963, 0.13937422633171082, -0.09527581185102463, 0.3325943648815155, 0.044598761945962906, -0.09985720366239548, 0.07982192933559418, -0.06911661475896835, -0.2916135787963867, -0.413688987493515, 0.07314556837081909, 0.5717695951461792, -0.4198012053966522, -0.038868069648742676, -0.259800523519516, 0.004877621307969093, -0.3514775335788727, 0.1411672979593277, -0.07384663075208664, 0.08048300445079803, -0.14229577779769897, -0.03955424576997757, 0.19716668128967285, -0.16465391218662262, -0.29173988103866577, 0.14480309188365936, 0.05037252604961395, 0.2691359221935272, 0.19973738491535187, 0.41024619340896606, 0.16798783838748932, -0.09235965460538864, -0.003995418548583984, 0.6235688924789429, -0.22701740264892578, -0.023237083107233047, 0.2167760282754898, -0.45493075251579285, 0.09008949995040894, 0.3774319291114807, 0.30317220091819763, -0.2699359059333801, 0.36620116233825684, -0.05291483551263809, 0.1597318947315216, -0.27863937616348267, 0.18431223928928375, 0.0729183554649353, 0.328051894903183, 0.004464425146579742, 0.08127856999635696, -0.19097039103507996, -0.5832841992378235, 0.2914869785308838, -0.13016244769096375, -0.24256104230880737, -0.18905417621135712, -0.07453663647174835, -0.22265660762786865, -0.1695445477962494, -0.5431599617004395, -0.14398790895938873, 0.08096516877412796, 0.06736772507429123, 0.11733317375183105, -0.08551205694675446, -0.10755760967731476, 0.31084543466567993, 0.03776378929615021, 0.03766334801912308, 0.07594028860330582, 0.35627448558807373, 0.25269371271133423, -0.25909021496772766, -0.15503522753715515, 0.19333100318908691, -0.07706611603498459, -0.2776980400085449, 0.031058650463819504, 0.465775728225708, 0.25330889225006104, 0.19990293681621552, -0.06028234213590622, 0.5921089053153992, 0.3864942193031311, -0.43065693974494934, 0.42465153336524963, 0.29811933636665344, 0.16764754056930542, -0.19624879956245422, -0.1448150873184204, 0.4161931276321411, -0.10860416293144226, 0.09449687600135803, -0.09016009420156479, -0.15687182545661926, 0.12085194885730743, 0.1988416612148285, -0.06973478943109512, -0.4860266447067261, -0.13755802810192108, 0.3124348819255829, -0.03528304770588875, -0.03332003206014633, 0.08166113495826721, -0.031100623309612274, 0.14440737664699554, 0.15842017531394958, 0.1950875222682953, 0.11747799068689346, -0.20450946688652039, 0.21766814589500427, 0.11602488160133362, -0.08205866813659668, 0.5058944225311279, 0.2438027411699295, -0.28843995928764343, 0.1893196403980255, 0.04415499046444893, 0.07033481448888779, -0.05917740613222122, 0.07188104838132858, 0.1592855155467987, 0.18146461248397827, 0.2923966944217682, -0.09721214324235916, -0.29350489377975464, -0.36491507291793823, -0.04641028493642807, -0.13917124271392822, 0.028509166091680527, -0.21593108773231506, -0.17600324749946594, -0.07524248957633972, -0.1771732121706009, 0.061900295317173004, -0.27311238646507263, 0.3103002905845642, 0.24326804280281067, -0.08444727957248688, -0.007646379992365837, 0.098670095205307, -0.1790389120578766, 0.4522790312767029, 0.19030040502548218, -0.1124396100640297, 0.20188942551612854, 0.2738090753555298, -0.17222458124160767, 0.023475103080272675, 0.3414863049983978, 0.018094541504979134, 0.3103947937488556, -0.20857520401477814, 0.28756052255630493, -0.30167996883392334, -0.5269962549209595, -0.017756104469299316, -0.1278628259897232, 0.4184367060661316, 0.15831875801086426, 0.056980837136507034, 0.14661401510238647, -0.04908905550837517, 0.254594087600708, 0.08397025614976883, -0.12615077197551727, -0.35798507928848267, -0.3124558627605438, -0.11762800067663193, 0.08763355016708374, 0.18753938376903534, -0.29376742243766785, -0.24343577027320862, 0.46452856063842773, 0.5125316381454468, 0.1423603594303131, 0.2152908444404602, 0.5227329730987549, -0.15631812810897827, 0.16883789002895355, 0.21147944033145905, -0.0623728409409523, -0.08160436898469925, 0.4824642837047577, -0.2617921829223633, -0.2787492573261261, -0.001184418797492981, -0.20051734149456024, -0.21265143156051636, 0.36345988512039185, -0.487113893032074, -0.17809489369392395, -0.12022493779659271, 0.1878046691417694, 0.03205382823944092, -0.026077313348650932, 0.08247107267379761, -0.028169551864266396, 0.1132403165102005, -0.0663222223520279, -0.09983159601688385, 0.07641272246837616, 0.3912822902202606, 0.22112609446048737, 0.08915501087903976, -0.03605835884809494, 0.28342747688293457, 0.49735313653945923, 0.05044195428490639, -0.07786977291107178, 0.447595477104187, 0.059290118515491486, 0.2628370225429535, -0.0026236996054649353, -0.3571558892726898, 0.3998299837112427, 0.19781799614429474, -0.18149074912071228, 0.14136770367622375, 0.12341267615556717, 0.01404021866619587, 0.04654723405838013, 0.3846583366394043, -0.19507378339767456, -0.1501946598291397, 0.2425009161233902, 0.035655926913022995, 0.20806029438972473, -0.22315412759780884, -0.27749189734458923, -0.7103016376495361, -0.2136518359184265, 0.060836728662252426, 0.24192361533641815, -0.20638889074325562, 0.2661416530609131, -0.6109212636947632, -0.045159224420785904, 0.16075173020362854, 0.3234853148460388, 0.16102249920368195, 0.06865695118904114, -0.12070032954216003, -0.07368912547826767, -0.04315875470638275, 0.02905159443616867, 0.7224552631378174, 0.01848972775042057, -0.3272475600242615, -0.020102104172110558, 0.23693540692329407, -0.38155820965766907, -0.27128180861473083, 0.10928350687026978, -0.08269651234149933, -0.14916710555553436, 0.6568532586097717, -0.25731414556503296, 0.051271386444568634, 0.24504803121089935, 0.3219652473926544, -0.14876355230808258, -0.22229622304439545, -0.09374190866947174, -0.3714407682418823, -0.4741392433643341, -0.13255003094673157, 0.1794007122516632, 0.056334737688302994, 0.17608627676963806, -0.4480549097061157, -0.09188427776098251, -0.19439691305160522, 0.16497768461704254, 0.10580083727836609, 0.0951877161860466, 0.2612835764884949, -0.034572258591651917, 0.17564061284065247, -0.15843436121940613, 0.257520854473114, 0.3741613030433655, 0.043912988156080246, -0.14284761250019073, 0.09494618326425552, -0.16858427226543427, 0.11728934943675995, 0.45974886417388916, 0.2344309687614441, -0.2063051164150238, 0.026582790538668633, -0.07735513150691986, -0.18097294867038727, 0.45010942220687866, 0.14127016067504883, -0.2658025622367859, -0.02445494756102562, -0.5977188944816589, 0.19395649433135986, 0.1625717580318451, 0.038733452558517456, 0.08333448320627213, -0.16627685725688934, -0.29102152585983276, 0.3688749670982361, 0.41488903760910034, 0.8890538811683655, -0.1004762053489685, 0.36901506781578064, -0.17448243498802185, 0.187228724360466, 0.029185136780142784, -0.21270902454853058, -0.2151515930891037, 0.10230717062950134, 0.016673969104886055, -0.12871822714805603, -0.061799366027116776, 0.3094150722026825, 0.21820487082004547, 0.10825952887535095, 0.0370074138045311, 0.13059237599372864, 0.14515827596187592, -0.08333657681941986, 0.19099979102611542, -0.29103025794029236, -0.375447541475296, -0.022443760186433792, 0.07180951535701752, 0.0025822892785072327, -0.09750571846961975, -0.10283661633729935, -0.17508842051029205, -0.12858465313911438, -0.06246433034539223, -0.31393954157829285, -0.41700634360313416, -0.6177829504013062, 0.31160134077072144, 0.0959145724773407, -0.15834319591522217, -0.04774288833141327, 0.43645814061164856, 0.23877355456352234, -0.0216689370572567, -0.09991714358329773, 0.18134766817092896, 0.13933303952217102, 0.01590782031416893, -0.3843264877796173, -0.47229233384132385, 0.3890894949436188, -0.009746044874191284, -0.0883990079164505, 0.0408194437623024, 0.18522228300571442, -0.0622619166970253, -0.6213222742080688, -0.10099504888057709, 0.3510932922363281, -0.237173393368721, -0.3729325234889984, -0.04603941738605499, 0.08459395170211792, -0.0351509153842926, 0.04821182042360306, 0.13556745648384094, 0.05132928118109703, 0.25932756066322327, 0.2925770580768585, -0.13465991616249084, 0.014493688009679317, 0.0537608303129673, 0.1415533870458603, -0.24857044219970703, 0.39792096614837646, 0.019112590700387955, 0.20508815348148346, -0.10097205638885498, 0.4004044532775879, 0.2464224249124527, -0.227555513381958, 0.030111901462078094, 0.05588814616203308, -0.09230809658765793, -0.30109167098999023, 0.186781108379364, 0.30475127696990967, 0.11234496533870697, 0.178667813539505, -0.42059996724128723, -0.338564395904541, 0.3300173878669739, -0.044872935861349106, 0.35951507091522217, -0.09591761231422424, 0.2453261911869049, -0.1896495670080185, 0.20754916965961456, -0.2435893565416336, 0.27979180216789246, 0.034217655658721924, 0.016574159264564514, 0.013361571356654167, -0.08646779507398605, -0.3129190504550934, 0.1869141161441803, 0.054830312728881836, -0.008456181734800339, -0.45453914999961853, -0.08198480308055878, -0.1728130280971527, 0.2163759022951126, 0.15082478523254395, -0.118647001683712, 0.046159617602825165, -0.30853259563446045, -0.07927806675434113, -0.07713223248720169, 0.1993967741727829, -0.12106656283140182, -0.3016907572746277, -0.02121080458164215, -0.2817973494529724, -0.02104421705007553, -0.005085766315460205, 0.19183140993118286, 0.005568400025367737, 0.09474693983793259, 0.4647139012813568, 0.4612269401550293, -0.08992011100053787, -0.07057595252990723, 0.11594328284263611, 0.2631660997867584, 0.13210679590702057, 0.013042939826846123, 0.27116698026657104, -0.21147914230823517, 0.1537310630083084, 0.16224929690361023, 0.02161465585231781, 0.3007538318634033, -0.3699854910373688, 0.10904930531978607, 0.20090711116790771, 0.12139372527599335, -0.21298468112945557, 0.10979077219963074, 0.4337894320487976, -0.0872257798910141, 0.10159417986869812, 0.3715550899505615, 0.39166563749313354, 0.2633986473083496, -0.29220759868621826, 0.10288486629724503, 0.25518178939819336, 0.0022372938692569733, 0.048314549028873444, 0.18768730759620667, -0.30269113183021545, 0.0690411627292633, 0.17461825907230377, 0.4449329078197479, 0.23872140049934387, 0.5049598217010498, -0.34366080164909363, 0.4133920967578888, 0.11043845862150192, -0.16530737280845642, 0.2926429510116577, -0.5142850279808044, 0.23347978293895721, 0.32206809520721436, 0.10034459829330444, 0.44056907296180725, -0.14115215837955475, 0.14298729598522186, -0.08434800803661346, -0.3823215663433075, -0.15363448858261108, 0.18174976110458374, 0.2389146387577057, -0.12872615456581116, -0.3973865509033203, -0.32956182956695557, -0.5255423188209534, -0.05138757824897766, -0.03211190924048424, -0.5779095888137817, 0.14155533909797668, -0.12354697287082672, -0.11330245435237885, -0.3197176456451416, 0.05320000648498535, 0.26410043239593506, 0.021433033049106598, -0.31219950318336487, 0.23554599285125732, 0.4401598572731018, -0.09621070325374603, 0.2448837161064148, -0.061992205679416656, 0.27259549498558044, 0.1712174117565155, -0.2464677393436432, 0.23772472143173218, -0.10224877297878265, -0.27240869402885437, -0.15460047125816345, 0.10530978441238403, 0.05457375943660736, 0.3160358965396881, 0.10644267499446869, 0.06424516439437866, -0.10340524464845657, -0.21141429245471954, -0.14230799674987793, -0.0897926390171051, -0.4951949715614319, -0.14465105533599854, -0.19385947287082672, -0.19583061337471008, -0.06474051624536514, 0.056684449315071106, -0.4392277002334595, -0.6049894094467163, 0.4906969666481018, -0.5163569450378418, 0.22483834624290466, -0.02968953177332878, 0.00923934392631054, -0.42171743512153625, 0.052084408700466156, 0.30188697576522827, -0.014310233294963837, 0.03455543890595436, -0.04473955184221268, -0.38409045338630676, 0.1674562692642212, -0.2783692181110382, -0.2578512728214264, -0.05396807938814163, 0.26809465885162354, 0.22953099012374878, 0.020857281982898712, 0.3160773515701294, -0.10010328143835068, 0.08733118325471878, 0.2617771625518799, -0.24855506420135498, 0.07133492082357407, 0.1462797075510025, 0.5599985718727112, 0.034690774977207184, -0.09364403784275055, 0.040840037167072296, 0.0030869711190462112, -0.0220301803201437, -0.1176193356513977, -0.17512784898281097, 0.05509677901864052, -0.3370945155620575, 0.35059884190559387, 0.04024520516395569, 0.1881270706653595, -0.04771551862359047, -0.0568387433886528, -0.36716428399086, 0.14204920828342438, -0.02024903893470764, -0.010038457810878754, 0.15439367294311523, 0.7235085964202881, -0.3094787299633026, 0.2260924130678177, -0.0420953668653965, 0.3157186210155487, 0.039788633584976196, -0.348549485206604, -0.08143887668848038, 0.3176930546760559, -0.29029616713523865, 0.04746721312403679, 0.11364403367042542, 0.23301944136619568, -0.038628071546554565, -0.13953720033168793, 0.33289432525634766, -0.35733601450920105, 0.43613457679748535, -0.13755854964256287, -0.4307520389556885, 0.013634570874273777, -0.07080928981304169, 0.09605781733989716, 0.4268600344657898, -0.27911287546157837, 0.2198581099510193, 0.34553566575050354, 0.07001518458127975, -0.05147954076528549, 0.32743608951568604, -0.009830977767705917, -0.45154792070388794, -0.0036136768758296967, 0.1303822547197342, -0.34800657629966736, -0.21299850940704346, -0.016291897743940353, -0.3059488534927368 ]
https://github.com/huggingface/datasets/issues/1808
writing Datasets in a human readable format
AFAIK, there is currently no built-in method on the `Dataset` object to do this. However, a workaround is to directly use the Arrow table backing the dataset, **but it implies loading the whole dataset in memory** (correct me if I'm mistaken @lhoestq). You can convert the Arrow table to a pandas dataframe to save the data as csv as follows: ```python arrow_table = dataset.data dataframe = arrow_table.to_pandas() dataframe.to_csv("/path/to/file.csv") ``` Similarly, you can convert the dataset to a Python dict and save it as JSON: ```python import json arrow_table = dataset.data py_dict = arrow_table.to_pydict() with open("/path/to/file.json", "w+") as f: json.dump(py_dict, f) ```
Hi I see there is a save_to_disk function to save data, but this is not human readable format, is there a way I could save a Dataset object in a human readable format to a file like json? thanks @lhoestq
101
writing Datasets in a human readable format Hi I see there is a save_to_disk function to save data, but this is not human readable format, is there a way I could save a Dataset object in a human readable format to a file like json? thanks @lhoestq AFAIK, there is currently no built-in method on the `Dataset` object to do this. However, a workaround is to directly use the Arrow table backing the dataset, **but it implies loading the whole dataset in memory** (correct me if I'm mistaken @lhoestq). You can convert the Arrow table to a pandas dataframe to save the data as csv as follows: ```python arrow_table = dataset.data dataframe = arrow_table.to_pandas() dataframe.to_csv("/path/to/file.csv") ``` Similarly, you can convert the dataset to a Python dict and save it as JSON: ```python import json arrow_table = dataset.data py_dict = arrow_table.to_pydict() with open("/path/to/file.json", "w+") as f: json.dump(py_dict, f) ```
[ -0.106451615691185, 0.2575986981391907, -0.0731423944234848, 0.12428086996078491, 0.4906321167945862, 0.29741978645324707, -0.1625235378742218, 0.34967225790023804, 0.04431087151169777, 0.025896966457366943, -0.15335586667060852, 0.33091312646865845, -0.4147047996520996, 0.2707338333129883, 0.26477620005607605, -0.16611306369304657, 0.07186797261238098, -0.004649639129638672, 0.011518880724906921, 0.1498277187347412, -0.15415030717849731, -0.05089368671178818, 0.2294982522726059, -0.025673091411590576, -0.03894776105880737, -0.38208046555519104, -0.2350027710199356, -0.13195845484733582, -0.2951257824897766, -0.2115112692117691, -0.0870232880115509, 0.058286868035793304, 0.14218977093696594, 0.061991482973098755, -0.0001174360077129677, -0.09034647047519684, 0.059274133294820786, -0.1883002072572708, -0.41857853531837463, -0.11924339830875397, -0.2572656273841858, -0.46725285053253174, 0.282654345035553, -0.3885614275932312, 0.05723227560520172, -0.5000991225242615, 0.16721445322036743, -0.3590872585773468, 0.48386150598526, 0.27061188220977783, 0.21179361641407013, -0.14392207562923431, 0.30980125069618225, 0.29728028178215027, 0.05245045945048332, 0.615929901599884, -0.3162020742893219, 0.1544305384159088, -0.07569998502731323, 0.0732605829834938, 0.3559264838695526, -0.17447029054164886, -0.15455231070518494, -0.31596407294273376, 0.375618577003479, 0.0782594382762909, -0.21540623903274536, -0.029377982020378113, -0.03793252259492874, 0.22238564491271973, 0.7566887736320496, -0.7057833075523376, -0.5702956914901733, -0.014893002808094025, 0.03621930256485939, -0.07665571570396423, -0.14431840181350708, 0.5130932927131653, 0.026252973824739456, 0.22970625758171082, -0.16999413073062897, -0.5853191018104553, -0.36619293689727783, 0.07046382874250412, 0.38599535822868347, -0.11312587559223175, -0.1840333789587021, -0.0402982234954834, 0.05155807361006737, 0.016425922513008118, 0.3137091398239136, -0.17655423283576965, -0.09601457417011261, 0.12274739891290665, -0.15096113085746765, -0.2741805911064148, -0.5675680637359619, -0.20525404810905457, 0.01011599600315094, 0.08443135023117065, 0.4611462652683258, -0.047582246363162994, -0.08112633973360062, 0.09407578408718109, 0.3766880929470062, 0.08812269568443298, 0.18819037079811096, 0.07472659647464752, 0.1809169054031372, -0.24707934260368347, 0.09403669834136963, -0.2720763683319092, 0.01889176294207573, 0.16254058480262756, 0.46249914169311523, -0.08689788728952408, 0.04546740651130676, -0.22658927738666534, -0.04947972297668457, 0.018305853009223938, -0.17806974053382874, 0.1294330358505249, -0.33265361189842224, 0.1597578525543213, 0.024628158658742905, 0.12520749866962433, 0.107100710272789, 0.23881025612354279, 0.12956205010414124, -0.015089491382241249, 0.18516524136066437, 0.18894051015377045, 0.042116809636354446, 0.1680561602115631, -0.09943781793117523, 0.022375192493200302, 0.048801228404045105, -0.07980740070343018, 0.07429290562868118, -0.43120864033699036, 0.34658464789390564, -0.16669993102550507, 0.23003697395324707, 0.284081369638443, 0.1565832644701004, 0.0880090668797493, -0.04188907518982887, -0.5203970670700073, -0.2893023192882538, 0.2648203670978546, 0.009672138839960098, -0.11031535267829895, -0.33929523825645447, 0.05165693163871765, -0.10476002842187881, -0.12741616368293762, -0.7118955850601196, 0.050739586353302, 0.04601448401808739, 0.026446398347616196, 0.1481797844171524, -0.040107131004333496, -0.10918612778186798, -0.5510827898979187, 0.10952266305685043, 0.028597392141819, -0.5763206481933594, 0.17012938857078552, 0.07070335000753403, -0.026981689035892487, 0.07936140894889832, 0.29449763894081116, 0.15841923654079437, 0.3940742015838623, 0.05672270059585571, 0.16138315200805664, 0.3168119192123413, -0.11426980793476105, -0.033938050270080566, 0.3281465768814087, 0.1536332666873932, 0.05279097706079483, -0.2635241448879242, 0.4900132417678833, 0.40485870838165283, 0.011045745573937893, -0.11256228387355804, 0.0533573217689991, 0.14341911673545837, 0.016761960461735725, -0.1362847089767456, -0.37387850880622864, 0.15738481283187866, 0.03596211224794388, -0.3810766637325287, -0.09024573117494583, 0.33903729915618896, -0.0026242695748806, 0.30200377106666565, -0.2979598939418793, 0.2616700828075409, 0.5488736629486084, 0.32985901832580566, 0.08925029635429382, -0.1869286298751831, -0.2176186442375183, -0.23039528727531433, -0.14838579297065735, 0.47374197840690613, -0.16877397894859314, -0.15784116089344025, -0.34113985300064087, 0.14174482226371765, 0.07172595709562302, -0.13180610537528992, 0.21054121851921082, 0.06463635712862015, -0.2472127377986908, -0.17376483976840973, 0.1570233553647995, -0.22539710998535156, 0.33479055762290955, -0.031515829265117645, 0.1102835088968277, -0.21231289207935333, 0.14147832989692688, -0.00430634431540966, -0.29859521985054016, 0.12394651770591736, 0.009376481175422668, 0.0076998695731163025, 0.007159742526710033, -0.039744261652231216, 0.3718755841255188, 0.17178912460803986, 0.05482462793588638, 0.06784753501415253, 0.5374660491943359, 0.06926629692316055, -0.2176721841096878, 0.1381903439760208, 0.20481768250465393, 0.21824808418750763, -0.03289732336997986, -0.6860601902008057, 0.5157958269119263, 0.012228129431605339, 0.009676523506641388, -0.02344427816569805, 0.2769928276538849, 0.1521536111831665, 0.19615617394447327, -0.13982680439949036, 0.05764579027891159, 0.009158734232187271, 0.0627288743853569, -0.1090613454580307, -0.2286323755979538, -0.4677337408065796, 0.04911443591117859, 0.517841100692749, -0.3079946041107178, 0.5596215128898621, 0.02452024444937706, -0.0674511268734932, -0.11978597939014435, 0.13917376101016998, 0.16943328082561493, 0.09880833327770233, 0.013121223077178001, 0.008405420929193497, -0.015211431309580803, -0.13229459524154663, 0.07931963354349136, 0.16362357139587402, -0.17590554058551788, 0.21895363926887512, -0.19260913133621216, -0.08800491690635681, -0.13754050433635712, -0.28385627269744873, 0.2554502785205841, -0.17440950870513916, 0.028631344437599182, -0.23443669080734253, 0.09634894877672195, -0.1480448693037033, 0.06909067928791046, -0.08030085265636444, 0.08357959985733032, -0.10471636056900024, -0.2666877508163452, -0.36073797941207886, 0.13667505979537964, 0.10168401896953583, -0.1860564947128296, -0.06872953474521637, 0.2181333303451538, -0.12240743637084961, -0.02922278456389904, -0.2400658130645752, -0.07898489385843277, 0.05282983183860779, 0.003224208950996399, 0.16773326694965363, 0.2358342856168747, 0.45951324701309204, -0.18646153807640076, 0.31399792432785034, -0.32453659176826477, 0.04257039725780487, -0.23527753353118896, -0.07330751419067383, 0.29685160517692566, -0.03850167989730835, 0.3675038814544678, -0.40578216314315796, 0.05541185289621353, -0.057818055152893066, 0.06804964691400528, -0.12023740261793137, 0.0670580193400383, 0.13108988106250763, -0.1453341692686081, 0.0033633187413215637, 0.13583621382713318, -0.3315480947494507, -0.0918806716799736, 0.5880925059318542, -0.021284494549036026, 0.08518420904874802, -0.20150107145309448, 0.182271808385849, 0.03901982679963112, -0.059449780732393265, -0.11347110569477081, 0.10225905478000641, -0.47992080450057983, 0.3875848650932312, -0.24509501457214355, -0.39184772968292236, 0.21735218167304993, 0.380470335483551, -0.11913862824440002, -0.06054961681365967, -0.13908398151397705, 0.010835728608071804, -0.14336468279361725, -0.17000550031661987, -0.05383794754743576, 0.18139271438121796, 0.0168658047914505, 0.2060142457485199, 0.16378363966941833, 0.0641997680068016, -0.2167954444885254, 0.12245281040668488, 0.3177888095378876, 0.09290990233421326, -0.052032992243766785, 0.36639243364334106, 0.08037324249744415, -0.01821056753396988, 0.3591736853122711, 0.24719347059726715, 0.22780412435531616, -0.048697516322135925, 0.4381054937839508, -0.1248667761683464, 0.02926941029727459, 0.04087932035326958, -0.316415399312973, -0.18999087810516357, -0.10230931639671326, 0.16913136839866638, 0.03626938909292221, 0.2131180763244629, -0.008911088109016418, -0.25116729736328125, -0.25230172276496887, 0.23453029990196228, -0.24229395389556885, 0.026563752442598343, -0.11783237755298615, 0.11001665145158768, -0.01756603829562664, -0.1718045175075531, 0.08063395321369171, 0.38379377126693726, 0.26630422472953796, 0.032268594950437546, -0.5151156187057495, -0.29405590891838074, -0.5803810358047485, 0.09987436980009079, -0.029596449807286263, 0.36184582114219666, 0.10228101909160614, 0.18120744824409485, 0.21470485627651215, -0.11195064336061478, 0.3909142017364502, -0.13434340059757233, -0.2980666160583496, 0.056133490055799484, 0.16215673089027405, -0.3671409487724304, 0.2348608523607254, -0.047350846230983734, 0.2741597890853882, -0.27871328592300415, 0.3191591501235962, -0.17461493611335754, -0.12061131745576859, -0.22882115840911865, 0.3668922483921051, -0.4481755197048187, -0.12007707357406616, 0.08216923475265503, -0.42181065678596497, -0.1823725700378418, -0.3053170442581177, 0.15132224559783936, -0.19544968008995056, 0.006747615057975054, -0.12215001881122589, -0.33441588282585144, 0.07021088898181915, 0.18667063117027283, -0.290348619222641, 0.22430789470672607, -0.011988251470029354, -0.14126993715763092, 0.3285471498966217, 0.30462199449539185, 0.10242144763469696, 0.3054978847503662, -0.0795760452747345, -0.3287595808506012, -0.273293137550354, -0.16700966656208038, 0.3981631100177765, -0.09808790683746338, 0.09665175527334213, -0.03204626590013504, 0.25336796045303345, -0.2423793226480484, -0.38612207770347595, -0.12944428622722626, 0.06608110666275024, 0.14740630984306335, -0.5840485692024231, -0.608749270439148, 0.3970062732696533, 0.11336652934551239, 0.05494125187397003, 0.013898991048336029, 0.19545118510723114, -0.1718692034482956, 0.4643927812576294, 0.3657192289829254, 0.9020753502845764, -0.6044501662254333, 0.5735935568809509, -0.03853258490562439, -0.6457204222679138, 0.27661916613578796, -0.4204302430152893, -0.02732500433921814, -0.371297687292099, 0.11743919551372528, -0.11894413828849792, -0.009326115250587463, 0.30709773302078247, 0.23280921578407288, -0.2221035659313202, 0.17984385788440704, -0.11371900886297226, -0.16957411170005798, 0.08383092284202576, 0.2791963517665863, -0.12142538279294968, -0.10393793880939484, -0.1601458042860031, 0.15066222846508026, -0.17813898622989655, -0.3596469759941101, 0.08953403681516647, -0.3730091452598572, -0.06106655299663544, 0.2402314394712448, -0.2900503873825073, -0.007061997428536415, -0.19048099219799042, 0.10237206518650055, -0.340438574552536, -0.28514620661735535, 0.16273576021194458, 0.25132954120635986, 0.28618910908699036, 0.2359692007303238, -0.03474358469247818, -0.07711808383464813, -0.22712567448616028, 0.0297579113394022, 0.046688683331012726, -0.061585333198308945, 0.1257038563489914, 0.21279177069664001, -0.03251267224550247, 0.23097869753837585, -0.044645607471466064, -0.34997260570526123, 0.11076676845550537, -0.02693156898021698, -0.04270485043525696, -0.20844432711601257, -0.23698486387729645, -0.11784180998802185, -0.16806070506572723, -0.14513848721981049, 0.09682844579219818, 0.40937095880508423, 0.31449970602989197, 0.48921579122543335, -0.04701658710837364, -0.06960178911685944, 0.07398546487092972, 0.07777807861566544, 0.015166893601417542, 0.06508485227823257, 0.21721944212913513, -0.038764163851737976, -0.2438255250453949, -0.22034353017807007, 0.6501061916351318, 0.17381158471107483, 0.005395285785198212, 0.20618943870067596, -0.2736005187034607, 0.14689497649669647, -0.22252511978149414, 0.014907166361808777, 0.09251787513494492, -0.2587207555770874, -0.26711946725845337, -0.41894036531448364, -0.3676983118057251, 0.1884377896785736, 0.3738771378993988, 0.27950024604797363, 0.13001501560211182, -0.29861196875572205, -0.25123128294944763, -0.10851965844631195, -0.1967220902442932, 0.08701489120721817, -0.05389056354761124, -0.05627300590276718, 0.07873750478029251, 0.26800814270973206, 0.21682003140449524, -0.3074115216732025, 0.035041943192481995, -0.051960937678813934, 0.1876034140586853, -0.0996488481760025, -0.19009557366371155, 0.130559504032135, 0.08667397499084473, -0.12534458935260773, -0.16877929866313934, -0.4526861310005188, -0.030536174774169922, -0.15218524634838104, -0.31531086564064026, 0.3631752133369446, -0.0966380387544632, 0.3008655607700348, 0.012591149657964706, 0.13850253820419312, -0.011398406699299812, -0.03357300907373428, 0.06143804267048836, 0.3263464570045471, -0.16980862617492676, 0.05865120887756348, 0.2863141894340515, -0.041973602026700974, -0.11887644231319427, 0.12448662519454956, 0.13706403970718384, -0.12318188697099686, 0.32916259765625, -0.12666696310043335, -0.01093495637178421, -0.07543821632862091, 0.38136786222457886, 0.3408978581428528, -0.17690390348434448, 0.22753813862800598, 0.20486792922019958, 0.07869129627943039, 0.17299911379814148, -0.13411885499954224, 0.25871220231056213, -0.06039314717054367, -0.11561506986618042, 0.11736519634723663, -0.13379718363285065, 0.09443709254264832, -0.38147538900375366, -0.3169582486152649, 0.058198049664497375, -0.12183424830436707, -0.13126236200332642, 0.251933753490448, 0.16931751370429993, -0.11544793844223022, 0.001294560730457306, 0.2567521035671234, 0.2531091570854187, 0.6264762878417969, 0.14461004734039307, 0.11175480484962463, 0.5608847141265869, 0.16771696507930756, 0.06371597945690155, 0.0563952811062336, 0.06642897427082062, -0.15126624703407288, 0.08795729279518127, 0.36255210638046265, 0.42430853843688965, 0.010429106652736664, -0.002010026015341282, -0.22193412482738495, 0.08303742110729218, 0.13123564422130585, -0.04749023914337158, -0.0755932480096817, -0.029651399701833725, -0.050990503281354904, 0.19685614109039307, -0.10944369435310364, -0.29539918899536133, -0.43549156188964844, 0.0387587770819664, 0.19480246305465698, 0.48051655292510986, 0.07810754328966141, 0.3756712079048157, 0.1052037924528122, 0.18894648551940918, -0.245051309466362, -0.25621601939201355, -0.003482729196548462, 0.028407488018274307, -0.344630628824234, 0.16362528502941132, 0.28678426146507263, 0.01345532201230526, -0.11088533699512482, 0.49248361587524414, -0.10116307437419891, -0.18189746141433716, 0.10607083141803741, 0.03414016216993332, 0.1640356332063675, -0.1392955780029297, 0.3932148516178131, 0.12269198894500732, 0.10942737013101578, 0.21093977987766266, 0.021318886429071426, -0.014472151175141335, -0.09887737035751343, 0.09224574267864227, -0.01885346695780754, -0.5013267993927002, -0.12793207168579102, -0.10395399481058121, -0.12719528377056122, -0.21566396951675415, 0.5050704479217529, -0.03525145351886749, 0.11248744279146194, -0.028967559337615967, 0.048233114182949066, 0.04740478843450546, 0.30169203877449036, 0.45443031191825867, 0.08971111476421356, -0.0695183053612709, 0.030858688056468964, -0.15950730443000793, -0.150445818901062, -0.08182308077812195, -0.060745805501937866, -0.027946919202804565, 0.09460636228322983, 0.3062109649181366, 0.3246448040008545, -0.015457376837730408, 0.3501589298248291, -0.09662242978811264, 0.4746275842189789, -0.15297360718250275, -0.10951763391494751, 0.34601008892059326, 0.39628368616104126, 0.024095281958580017, -0.40026167035102844, 0.4055840075016022, 0.24992290139198303, 0.026937536895275116, -0.34915077686309814, 0.3835626542568207, -0.3014106750488281, -0.061345718801021576, 0.3309565782546997, 0.06962750107049942, -0.060631752014160156, -0.021439261734485626, -0.2752469778060913, 0.2633811831474304, 0.3521861135959625, 0.09580741822719574, 0.3177364766597748, -0.07240480184555054, 0.34168171882629395, -0.2775283455848694, 0.16189728677272797, -0.08806632459163666, -0.2432602345943451, -0.5080466866493225, -0.04262378066778183, -0.2744731307029724, 0.10404497385025024, -0.11052528023719788, -0.023446274921298027, 0.16295145452022552, 0.2395676076412201, -0.22787544131278992, 0.21462266147136688, -0.1298564076423645, 0.34454581141471863, -0.060025036334991455, -0.08698350936174393, -0.24439164996147156, 0.3853408992290497, -0.12683899700641632, -0.0440097451210022, -0.02517773024737835, -0.44081929326057434, -0.015444926917552948, 0.3302832841873169, -0.21972736716270447, 0.010537579655647278, 0.2405092567205429, -0.007413674145936966, 0.26871636509895325, -0.003945395350456238, 0.6607906818389893, -0.008084990084171295, -0.00020993314683437347, -0.28927329182624817, -0.38080108165740967 ]
https://github.com/huggingface/datasets/issues/1808
writing Datasets in a human readable format
Indeed this works as long as you have enough memory. It would be amazing to have export options like csv, json etc. ! It should be doable to implement something that iterates through the dataset batch by batch to write to csv for example. There is already an `export` method but currently the only export type that is supported is `tfrecords`.
Hi I see there is a save_to_disk function to save data, but this is not human readable format, is there a way I could save a Dataset object in a human readable format to a file like json? thanks @lhoestq
61
writing Datasets in a human readable format Hi I see there is a save_to_disk function to save data, but this is not human readable format, is there a way I could save a Dataset object in a human readable format to a file like json? thanks @lhoestq Indeed this works as long as you have enough memory. It would be amazing to have export options like csv, json etc. ! It should be doable to implement something that iterates through the dataset batch by batch to write to csv for example. There is already an `export` method but currently the only export type that is supported is `tfrecords`.
[ -0.20983858406543732, 0.049269527196884155, -0.10766667127609253, 0.06642644852399826, 0.5001396536827087, 0.23276939988136292, -0.11725987493991852, 0.35747236013412476, 0.0007518399506807327, 0.1492747664451599, -0.167697474360466, 0.052724212408065796, -0.37114202976226807, 0.42901811003685, 0.3048388957977295, -0.11577880382537842, 0.07499096542596817, -0.13998621702194214, 0.00922808051109314, 0.10330909490585327, -0.17319343984127045, 0.0031020399183034897, 0.18568013608455658, -0.10447025299072266, -0.007600451819598675, -0.42327675223350525, -0.21671640872955322, -0.21662187576293945, -0.1934351623058319, -0.11148039996623993, -0.18560171127319336, 0.0026593059301376343, 0.3307572603225708, 0.037214696407318115, -0.00011813023593276739, -0.18588992953300476, -0.023094743490219116, -0.1615505963563919, -0.37875524163246155, -0.08890414237976074, -0.2690250873565674, -0.2977551817893982, 0.06279946863651276, -0.4023827314376831, 0.09588145464658737, -0.24719004333019257, 0.40783488750457764, -0.3925502598285675, 0.2636528015136719, 0.24290797114372253, 0.1875608265399933, -0.1289432942867279, 0.20890925824642181, 0.21947768330574036, 0.09189863502979279, 0.6853557229042053, -0.3673555552959442, 0.027613019570708275, 0.09163552522659302, 0.18726009130477905, 0.4378954768180847, -0.2874052822589874, -0.131604865193367, -0.344331294298172, 0.3439818322658539, 0.05616709217429161, -0.08948621898889542, -0.08555658906698227, -0.01130342110991478, 0.22844767570495605, 0.8819459080696106, -0.5850656628608704, -0.4965885877609253, 0.05623394995927811, -0.036757078021764755, -0.08458004891872406, -0.1327417492866516, 0.4962071478366852, 0.003153463825583458, 0.25503769516944885, -0.3079487383365631, -0.6020660996437073, -0.4352654814720154, 0.015819016844034195, 0.44329819083213806, -0.07230505347251892, -0.18967027962207794, -0.04866233468055725, 0.06515463441610336, 0.1475459784269333, 0.39596301317214966, -0.11759032309055328, -0.1520473212003708, 0.1304982304573059, -0.1174582839012146, -0.3553518056869507, -0.6162093877792358, -0.07904178649187088, 0.055115386843681335, 0.009114161133766174, 0.35315588116645813, -0.08139020949602127, 0.07632166147232056, 0.0985911637544632, 0.4005741775035858, 0.022674448788166046, 0.3162567615509033, -0.047976166009902954, 0.18185949325561523, -0.4053876996040344, 0.11731915175914764, -0.24355506896972656, 0.00925090815871954, 0.17488616704940796, 0.4574068486690521, -0.004727190360426903, -0.07689733803272247, -0.26489970088005066, 0.042527586221694946, -0.09640344977378845, -0.07804916799068451, -0.026815153658390045, -0.48728471994400024, 0.08152152597904205, 0.019443750381469727, -0.11353642493486404, 0.07426071912050247, 0.07666191458702087, -0.013612968847155571, -0.14999425411224365, 0.20752352476119995, 0.13936284184455872, 0.0309046171605587, 0.17725084722042084, -0.18247850239276886, -0.046700213104486465, -0.0887521505355835, -0.072006456553936, 0.1316600739955902, -0.35860902070999146, 0.3845715820789337, -0.24935267865657806, 0.23367908596992493, 0.0582667700946331, 0.1374218910932541, 0.13787436485290527, -0.13520559668540955, -0.5077314376831055, -0.32943713665008545, 0.20138198137283325, -0.12248284369707108, -0.15181896090507507, -0.35337504744529724, 0.0441594123840332, -0.061738792806863785, -0.23417431116104126, -0.661148190498352, 0.12384800612926483, 0.12324441969394684, -0.038136109709739685, 0.09824403375387192, -0.07325419783592224, -0.1500759869813919, -0.4955061078071594, 0.027269301936030388, -0.036204442381858826, -0.6494605541229248, 0.18830543756484985, 0.16023561358451843, -0.09220649302005768, 0.13514037430286407, 0.3854270875453949, 0.2524663209915161, 0.5349972248077393, -0.005093433894217014, 0.19084982573986053, 0.27928343415260315, 0.005564011633396149, 0.15691222250461578, 0.3973151445388794, 0.12339533865451813, -0.11159373819828033, -0.26462486386299133, 0.4624730050563812, 0.5034454464912415, -0.18585367500782013, -0.17421704530715942, 0.04870234429836273, 0.1154661625623703, -0.014759059995412827, -0.17993293702602386, -0.34906551241874695, 0.01578700542449951, -0.06640772521495819, -0.23193664848804474, -0.04392340034246445, 0.5080920457839966, 0.09981469810009003, 0.2476150393486023, -0.34355026483535767, 0.3596268892288208, 0.5124644041061401, 0.3237610459327698, 0.14293579757213593, -0.27478858828544617, -0.2920856177806854, -0.26497843861579895, -0.23043584823608398, 0.3505924642086029, -0.2540544271469116, 0.2577133774757385, -0.33425140380859375, 0.28628915548324585, 0.018947599455714226, 0.05238912254571915, 0.2952236533164978, 0.019920315593481064, -0.05350138247013092, -0.17088019847869873, 0.15007691085338593, -0.3343758285045624, 0.230433389544487, -0.0469822958111763, -0.07085784524679184, -0.18064388632774353, 0.12904319167137146, 0.0067978426814079285, -0.263565331697464, 0.07304882258176804, -0.11152105778455734, -0.007495947182178497, -0.16513723134994507, 0.025362297892570496, 0.30550849437713623, 0.0756189301609993, 0.07463590055704117, 0.1550769805908203, 0.6029987931251526, 0.029100876301527023, -0.09242935478687286, 0.06181296333670616, 0.045708104968070984, 0.08420392125844955, -0.0397251695394516, -0.7325786352157593, 0.4708707332611084, -0.02990415319800377, -0.02315651625394821, -0.038100142031908035, 0.1662542223930359, 0.03913047909736633, 0.08945834636688232, 0.031824998557567596, 0.08887933194637299, 0.14037089049816132, 0.040222831070423126, -0.2641540467739105, -0.2821543514728546, -0.4200902283191681, 0.09446690231561661, 0.6116838455200195, -0.30299171805381775, 0.4891399145126343, -0.03241126984357834, 0.1629302203655243, -0.07354940474033356, 0.15906009078025818, 0.059953946620225906, 0.16384807229042053, 0.006338874809443951, 0.15231731534004211, -0.02003234066069126, -0.10028562694787979, 0.04145195707678795, 0.18090640008449554, -0.333041250705719, 0.10869709402322769, -0.13668501377105713, -0.27326130867004395, -0.026307914406061172, -0.24125459790229797, 0.20500807464122772, -0.15105599164962769, 0.002807317301630974, -0.2534697353839874, -0.0020916033536195755, -0.14399437606334686, 0.06820780038833618, -0.08929269015789032, 0.2924492359161377, -0.07376155257225037, -0.23023486137390137, -0.28215253353118896, 0.2217075377702713, 0.011072106659412384, -0.2715153992176056, 0.019067127257585526, 0.3949039578437805, -0.2087051272392273, 0.13667196035385132, -0.28056034445762634, -0.010477235540747643, 0.07722169160842896, 0.0013888012617826462, 0.15016672015190125, 0.21212975680828094, 0.5001712441444397, -0.24710118770599365, 0.2344091385602951, -0.36754465103149414, -0.007375098764896393, -0.16004779934883118, -0.006372850388288498, 0.3519592583179474, -0.10124354064464569, 0.3395305573940277, -0.43606412410736084, 0.06279604882001877, -0.15895487368106842, 0.034930482506752014, -0.06507538259029388, -0.07430554926395416, 0.13259685039520264, -0.20864033699035645, -0.0840456560254097, 0.19429266452789307, -0.3629707992076874, -0.12732695043087006, 0.5436402559280396, -0.07024633884429932, 0.10532507300376892, -0.21414683759212494, 0.07463724166154861, -0.06603749841451645, -0.14183373749256134, -0.1646415740251541, 0.07448232173919678, -0.6360775828361511, 0.2971101403236389, -0.36025622487068176, -0.46701738238334656, 0.22323712706565857, 0.5383543372154236, -0.1780405342578888, 0.0747440904378891, -0.21418093144893646, 0.10512363165616989, 0.010400780476629734, -0.2355576455593109, -0.03138455003499985, 0.2207898497581482, 0.031031616032123566, 0.08491630852222443, 0.17215751111507416, 0.062260717153549194, -0.18020734190940857, 0.03177741914987564, 0.32857978343963623, 0.25497522950172424, -0.03337031975388527, 0.2822725474834442, 0.22578123211860657, 0.01458296924829483, 0.258845716714859, 0.22266247868537903, 0.14274749159812927, 0.0221687201410532, 0.41390129923820496, -0.032783545553684235, 0.0022067204117774963, 0.3475814163684845, -0.303190678358078, -0.29852479696273804, -0.019620999693870544, 0.07200305163860321, 0.08487702906131744, 0.1824379861354828, 0.01747235655784607, -0.09043131023645401, -0.23483429849147797, 0.32696691155433655, 0.0030279308557510376, 0.15028667449951172, -0.1556912511587143, 0.11540506035089493, -0.11324666440486908, -0.13365164399147034, 0.07677659392356873, 0.35544252395629883, 0.33676669001579285, 0.10704884678125381, -0.6552960276603699, -0.23153148591518402, -0.485299289226532, 0.19070732593536377, 0.05015818029642105, 0.2119169980287552, -0.12671735882759094, 0.17478403449058533, 0.18910092115402222, -0.02031059004366398, 0.4097018241882324, -0.24297378957271576, -0.22986237704753876, 0.03986208513379097, 0.1058925986289978, -0.18997809290885925, 0.1949254423379898, -0.03075031191110611, 0.2844811975955963, -0.07846616208553314, 0.3948436677455902, -0.12247888743877411, -0.10468117147684097, -0.18357032537460327, 0.2617671489715576, -0.45138201117515564, -0.22741186618804932, 0.21444548666477203, -0.2858102023601532, -0.07936017960309982, -0.24143710732460022, 0.1410571038722992, -0.2363554835319519, -0.06839659065008163, -0.18517155945301056, -0.26650217175483704, 0.13508576154708862, 0.1919199675321579, -0.3439522683620453, -0.010149598121643066, 0.029065212234854698, -0.2233082503080368, 0.28274911642074585, 0.3313412666320801, 0.09688197821378708, 0.07089740037918091, -0.14670243859291077, -0.22907590866088867, -0.07411939650774002, -0.32463639974594116, 0.5238561034202576, -0.11080020666122437, 0.1860698014497757, -0.07084845751523972, 0.33066514134407043, -0.1715371459722519, -0.37155166268348694, -0.20418918132781982, 0.051358774304389954, 0.15175871551036835, -0.7371707558631897, -0.4786505103111267, 0.19428226351737976, 0.01698361337184906, 0.06779012084007263, -0.03196324408054352, 0.10354524850845337, -0.1954328864812851, 0.27186936140060425, 0.5431913733482361, 0.9837470054626465, -0.6078290939331055, 0.41282862424850464, -0.16372883319854736, -0.5005871057510376, 0.32842010259628296, -0.4307343363761902, 0.06277422606945038, -0.35513830184936523, -0.027647696435451508, -0.10781983286142349, 0.008821126073598862, 0.2886621654033661, 0.24762612581253052, -0.25687336921691895, 0.1114460751414299, 0.042963944375514984, -0.027601931244134903, 0.0065247551538050175, 0.2042028307914734, -0.08991830796003342, -0.061659444123506546, -0.004014061763882637, 0.14601418375968933, -0.15743304789066315, -0.32059988379478455, -0.020173296332359314, -0.3327820301055908, 0.1395345777273178, 0.402557909488678, -0.2020188868045807, -0.020927952602505684, -0.14630596339702606, 0.01504443772137165, -0.30826276540756226, -0.25173866748809814, 0.1647445410490036, 0.21795332431793213, 0.5345996618270874, 0.26768308877944946, -0.00825035385787487, -0.21462328732013702, -0.21675509214401245, 0.0655895322561264, -0.02209213748574257, -0.035424068570137024, 0.09397251904010773, 0.16276511549949646, -0.0731019675731659, 0.30645033717155457, 0.028808262199163437, -0.3392607569694519, 0.022816285490989685, -0.0798974335193634, -0.08475740253925323, -0.2946384847164154, -0.11909472942352295, -0.07143528759479523, -0.09038431942462921, -0.0838376134634018, 0.08259913325309753, 0.4026634693145752, 0.3868672847747803, 0.6266881823539734, -0.11384300887584686, -0.024349335581064224, -0.026497263461351395, 0.07358058542013168, 0.08624383807182312, -0.10069625079631805, 0.06233637034893036, -0.005806419998407364, -0.27792656421661377, -0.24183285236358643, 0.6459102630615234, 0.022128844633698463, -0.07292570173740387, 0.24389702081680298, -0.3161088526248932, 0.19310550391674042, -0.18959826231002808, 0.10277573764324188, 0.062011703848838806, -0.304351806640625, -0.34318476915359497, -0.2934032678604126, -0.1822020709514618, 0.10608786344528198, 0.35136228799819946, 0.2742486298084259, 0.19643759727478027, -0.2088545709848404, -0.19808141887187958, -0.07159151136875153, -0.19461077451705933, -0.014815522357821465, -0.08516059070825577, 0.020235516130924225, 0.1642276793718338, 0.26597240567207336, 0.06908561289310455, -0.2713039219379425, -0.032145701348781586, -0.013692256063222885, 0.15241503715515137, -0.07297471165657043, -0.22038085758686066, 0.1443682610988617, 0.06520365178585052, 0.06450510025024414, -0.06267379224300385, -0.3862687945365906, 0.002805527299642563, -0.19175103306770325, -0.3020142912864685, 0.41818350553512573, -0.11121249198913574, 0.3120131492614746, 0.08233466744422913, 0.15628355741500854, -0.0018337741494178772, -0.039866477251052856, 0.2709314525127411, 0.43513309955596924, -0.2582455277442932, 0.10652169585227966, 0.25744035840034485, -0.035161491483449936, -0.12068524211645126, 0.14193391799926758, 0.3585570454597473, -0.0054719820618629456, 0.2918897569179535, -0.132007896900177, 0.021015267819166183, 0.08174614608287811, 0.19229204952716827, 0.2230270653963089, -0.1513841450214386, 0.2095307558774948, 0.20219752192497253, 0.08948154002428055, 0.3666163682937622, -0.09804624319076538, 0.2809939682483673, -0.021984804421663284, -0.18465673923492432, 0.17474579811096191, -0.08884720504283905, 0.015418626368045807, -0.04158388078212738, -0.3821217715740204, 0.06783609092235565, -0.20531903207302094, -0.16555088758468628, 0.2034166008234024, 0.12726572155952454, -0.06631666421890259, -0.029896048828959465, 0.14655263721942902, 0.23360008001327515, 0.49297142028808594, 0.2062361240386963, 0.07325661182403564, 0.4920811951160431, 0.20021884143352509, 0.08246806263923645, -0.09820728003978729, 0.1632053256034851, -0.14841273427009583, 0.11884443461894989, 0.47016391158103943, 0.478024959564209, -0.20228108763694763, -0.1375741958618164, -0.2050098329782486, 0.06068139523267746, 0.07125572860240936, -0.07335307449102402, 0.0407075509428978, -0.1687212586402893, -0.018705852329730988, 0.25554731488227844, 0.01809261366724968, -0.3080139458179474, -0.3289768099784851, 0.03342186287045479, 0.23333480954170227, 0.5413270592689514, 0.14092124998569489, 0.30440017580986023, -0.007762830704450607, 0.1501617133617401, -0.22064553201198578, -0.16229532659053802, -0.15432323515415192, 0.014948457479476929, -0.3174990117549896, 0.3099465072154999, 0.17035029828548431, 0.05884638428688049, 0.07530833780765533, 0.41189447045326233, -0.16234123706817627, -0.08314113318920135, 0.09348619729280472, 0.1500547230243683, 0.07177532464265823, -0.05242391303181648, 0.46477010846138, 0.09880105406045914, 0.16525329649448395, 0.32950496673583984, 0.00590871274471283, -0.12365177273750305, -0.13417205214500427, -0.028353698551654816, 0.12664908170700073, -0.4638586938381195, -0.17279492318630219, -0.13951367139816284, -0.10489854216575623, -0.1019240990281105, 0.43974751234054565, -0.1383691430091858, 0.10569126904010773, 0.06893447786569595, 0.04510653764009476, 0.08107335865497589, 0.31070476770401, 0.5162878632545471, 0.031330447643995285, -0.06847218424081802, 0.06546200811862946, -0.006577007472515106, 0.02529451996088028, 0.016349051147699356, 0.0962507575750351, -0.12077195942401886, 0.1353665143251419, 0.3248266875743866, 0.3486245274543762, 0.03824674338102341, 0.15839146077632904, -0.07539184391498566, 0.5430315136909485, -0.11996987462043762, -0.16421197354793549, 0.33029693365097046, 0.3895037770271301, 0.0072046369314193726, -0.39098697900772095, 0.5046799778938293, 0.2837267816066742, -0.013007279485464096, -0.42211389541625977, 0.4101161062717438, -0.2834376096725464, -0.2210487723350525, 0.3415215313434601, 0.0683487206697464, -0.10183507204055786, -0.018730685114860535, -0.2133675068616867, 0.23067611455917358, 0.39253997802734375, 0.12206369638442993, 0.23812353610992432, 0.07031668722629547, 0.24179977178573608, -0.3717211186885834, 0.09081477671861649, -0.1417986899614334, -0.13966025412082672, -0.4831584095954895, 0.17793942987918854, -0.14557503163814545, -0.011170481331646442, -0.1442711353302002, -0.16531692445278168, 0.32952356338500977, 0.19534999132156372, -0.2057490348815918, 0.205687016248703, -0.1991419792175293, 0.5085458755493164, -0.1622631549835205, -0.09353545308113098, -0.26575812697410583, 0.24928782880306244, -0.1632482409477234, -0.0005455166101455688, -0.043802663683891296, -0.36207303404808044, -0.08300656825304031, 0.3840694725513458, -0.21081140637397766, 0.10241100192070007, 0.29966500401496887, -0.009946713224053383, 0.23322956264019012, 0.05986570194363594, 0.5324206352233887, 0.10187911987304688, -0.05184309184551239, -0.23511160910129547, -0.3200586438179016 ]
https://github.com/huggingface/datasets/issues/1805
can't pickle SwigPyObject objects when calling dataset.get_nearest_examples from FAISS index
Hi ! Indeed we used to require mapping functions to be picklable with `pickle` or `dill` in order to cache the resulting datasets. And FAISS indexes are not picklable unfortunately. But since #1703 this is no longer required (the caching will simply be disabled). This change will be available in the next release of `datasets`, or you can also install `datasets` from source.
So, I have the following instances in my dataset ``` {'question': 'An astronomer observes that a planet rotates faster after a meteorite impact. Which is the most likely effect of this increase in rotation?', 'answer': 'C', 'example_id': 'ARCCH_Mercury_7175875', 'options':[{'option_context': 'One effect of increased amperage in the planetary world (..)', 'option_id': 'A', 'option_text': 'Planetary density will decrease.'}, (...)]} ``` The `options` value is always an list with 4 options, each one is a dict with `option_context`; `option_id` and `option_text`. I would like to overwrite the `option_context` of each instance of my dataset for a dpr result that I am developing. Then, I trained a model already and save it in a FAISS index ``` dpr_dataset = load_dataset( "text", data_files=ARC_CORPUS_TEXT, cache_dir=CACHE_DIR, split="train[:100%]", ) dpr_dataset.load_faiss_index("embeddings", f"{ARC_CORPUS_FAISS}") torch.set_grad_enabled(False) ``` Then, as a processor of my dataset, I created a map function that calls the `dpr_dataset` for each _option_ ``` def generate_context(example): question_text = example['question'] for option in example['options']: question_with_option = question_text + " " + option['option_text'] tokenize_text = question_tokenizer(question_with_option, return_tensors="pt").to(device) question_embed = ( question_encoder(**tokenize_text) )[0][0].cpu().numpy() _, retrieved_examples = dpr_dataset.get_nearest_examples( "embeddings", question_embed, k=10 ) # option["option_context"] = retrieved_examples["text"] # option["option_context"] = " ".join(option["option_context"]).strip() #result_dict = { # 'example_id': example['example_id'], # 'answer': example['answer'], # 'question': question_text, #options': example['options'] # } return example ``` I intentionally commented on this portion of the code. But when I call the `map` method, `ds_with_context = dataset.map(generate_context,load_from_cache_file=False)` It calls the following error: ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-55-75a458ce205c> in <module> ----> 1 ds_with_context = dataset.map(generate_context,load_from_cache_file=False) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/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) 301 num_proc=num_proc, 302 ) --> 303 for k, dataset in self.items() 304 } 305 ) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 301 num_proc=num_proc, 302 ) --> 303 for k, dataset in self.items() 304 } 305 ) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/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) 1257 fn_kwargs=fn_kwargs, 1258 new_fingerprint=new_fingerprint, -> 1259 update_data=update_data, 1260 ) 1261 else: ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 155 } 156 # apply actual function --> 157 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 158 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 159 # re-apply format to the output ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 387 file = StringIO() 388 with _no_cache_fields(obj): --> 389 dump(obj, file) 390 return file.getvalue() 391 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 359 def dump(obj, file): 360 """pickle an object to a file""" --> 361 Pickler(file, recurse=True).dump(obj) 362 return 363 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 452 raise PicklingError(msg) 453 else: --> 454 StockPickler.dump(self, obj) 455 stack.clear() # clear record of 'recursion-sensitive' pickled objects 456 return /usr/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in save_function(pickler, obj) 554 dill._dill._create_function, 555 (obj.__code__, globs, obj.__name__, obj.__defaults__, obj.__closure__, obj.__dict__, fkwdefaults), --> 556 obj=obj, 557 ) 558 else: /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /usr/lib/python3.7/pickle.py in save_tuple(self, obj) 784 write(MARK) 785 for element in obj: --> 786 save(element) 787 788 if id(obj) in memo: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 885 k, v = tmp[0] 886 save(k) --> 887 save(v) 888 write(SETITEM) 889 # else tmp is empty, and we're done /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 885 k, v = tmp[0] 886 save(k) --> 887 save(v) 888 write(SETITEM) 889 # else tmp is empty, and we're done /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle SwigPyObject objects ``` Which I have no idea how to solve/deal with it
63
can't pickle SwigPyObject objects when calling dataset.get_nearest_examples from FAISS index So, I have the following instances in my dataset ``` {'question': 'An astronomer observes that a planet rotates faster after a meteorite impact. Which is the most likely effect of this increase in rotation?', 'answer': 'C', 'example_id': 'ARCCH_Mercury_7175875', 'options':[{'option_context': 'One effect of increased amperage in the planetary world (..)', 'option_id': 'A', 'option_text': 'Planetary density will decrease.'}, (...)]} ``` The `options` value is always an list with 4 options, each one is a dict with `option_context`; `option_id` and `option_text`. I would like to overwrite the `option_context` of each instance of my dataset for a dpr result that I am developing. Then, I trained a model already and save it in a FAISS index ``` dpr_dataset = load_dataset( "text", data_files=ARC_CORPUS_TEXT, cache_dir=CACHE_DIR, split="train[:100%]", ) dpr_dataset.load_faiss_index("embeddings", f"{ARC_CORPUS_FAISS}") torch.set_grad_enabled(False) ``` Then, as a processor of my dataset, I created a map function that calls the `dpr_dataset` for each _option_ ``` def generate_context(example): question_text = example['question'] for option in example['options']: question_with_option = question_text + " " + option['option_text'] tokenize_text = question_tokenizer(question_with_option, return_tensors="pt").to(device) question_embed = ( question_encoder(**tokenize_text) )[0][0].cpu().numpy() _, retrieved_examples = dpr_dataset.get_nearest_examples( "embeddings", question_embed, k=10 ) # option["option_context"] = retrieved_examples["text"] # option["option_context"] = " ".join(option["option_context"]).strip() #result_dict = { # 'example_id': example['example_id'], # 'answer': example['answer'], # 'question': question_text, #options': example['options'] # } return example ``` I intentionally commented on this portion of the code. But when I call the `map` method, `ds_with_context = dataset.map(generate_context,load_from_cache_file=False)` It calls the following error: ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-55-75a458ce205c> in <module> ----> 1 ds_with_context = dataset.map(generate_context,load_from_cache_file=False) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/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) 301 num_proc=num_proc, 302 ) --> 303 for k, dataset in self.items() 304 } 305 ) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 301 num_proc=num_proc, 302 ) --> 303 for k, dataset in self.items() 304 } 305 ) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/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) 1257 fn_kwargs=fn_kwargs, 1258 new_fingerprint=new_fingerprint, -> 1259 update_data=update_data, 1260 ) 1261 else: ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 155 } 156 # apply actual function --> 157 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 158 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 159 # re-apply format to the output ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 387 file = StringIO() 388 with _no_cache_fields(obj): --> 389 dump(obj, file) 390 return file.getvalue() 391 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 359 def dump(obj, file): 360 """pickle an object to a file""" --> 361 Pickler(file, recurse=True).dump(obj) 362 return 363 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 452 raise PicklingError(msg) 453 else: --> 454 StockPickler.dump(self, obj) 455 stack.clear() # clear record of 'recursion-sensitive' pickled objects 456 return /usr/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in save_function(pickler, obj) 554 dill._dill._create_function, 555 (obj.__code__, globs, obj.__name__, obj.__defaults__, obj.__closure__, obj.__dict__, fkwdefaults), --> 556 obj=obj, 557 ) 558 else: /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /usr/lib/python3.7/pickle.py in save_tuple(self, obj) 784 write(MARK) 785 for element in obj: --> 786 save(element) 787 788 if id(obj) in memo: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 885 k, v = tmp[0] 886 save(k) --> 887 save(v) 888 write(SETITEM) 889 # else tmp is empty, and we're done /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 885 k, v = tmp[0] 886 save(k) --> 887 save(v) 888 write(SETITEM) 889 # else tmp is empty, and we're done /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle SwigPyObject objects ``` Which I have no idea how to solve/deal with it Hi ! Indeed we used to require mapping functions to be picklable with `pickle` or `dill` in order to cache the resulting datasets. And FAISS indexes are not picklable unfortunately. But since #1703 this is no longer required (the caching will simply be disabled). This change will be available in the next release of `datasets`, or you can also install `datasets` from source.
[ 0.0690423846244812, -0.38878387212753296, -0.06963580846786499, 0.24682506918907166, 0.1642264574766159, 0.027764610946178436, 0.17842748761177063, 0.05411210656166077, 0.4089649021625519, 0.5476053953170776, -0.05009908229112625, 0.49599722027778625, 0.11579310148954391, -0.12733501195907593, -0.267626017332077, 0.051510535180568695, 0.08499408513307571, 0.013422779738903046, 0.021620120853185654, -0.24258503317832947, -0.5357051491737366, -0.04840259999036789, -0.19842621684074402, 0.049339450895786285, -0.039841216057538986, 0.01803343929350376, -0.033283479511737823, 0.09544800221920013, -0.05844587832689285, -0.4539257884025574, 0.4045758843421936, 0.2576846480369568, 0.21166105568408966, -0.013423509895801544, -0.00012667453847825527, 0.0679020881652832, 0.20534731447696686, -0.021251916885375977, -0.16462285816669464, 0.0867505744099617, -0.0015751905739307404, 0.3058409094810486, 0.294412225484848, -0.35424938797950745, -0.21792444586753845, -0.2550704777240753, -0.050455816090106964, -0.13455581665039062, 0.06806492060422897, 0.19159550964832306, 0.06709259748458862, 0.14567936956882477, -0.11307252943515778, -0.1586892008781433, 0.22158530354499817, -0.010913379490375519, -0.06206204742193222, 0.16215048730373383, 0.2719883322715759, 0.3066602945327759, 0.25445762276649475, 0.274885892868042, -0.2460709661245346, 0.03687251731753349, -0.07259979099035263, 0.09264007955789566, 0.3378050923347473, 0.09200812876224518, 0.15567204356193542, 0.0969466120004654, 0.24981287121772766, -0.27378249168395996, -0.47020769119262695, -0.41377297043800354, -0.06139647960662842, -0.15674859285354614, -0.2627951204776764, -0.5509222745895386, -0.017237093299627304, 0.24829250574111938, 0.12546297907829285, 0.1021859273314476, -0.06395643949508667, 0.5212548971176147, 0.41186076402664185, 0.03595485910773277, 0.014424162916839123, 0.21093320846557617, 0.10664094984531403, -0.0576484277844429, 0.13660329580307007, -0.13325276970863342, -0.028368834406137466, -0.13212020695209503, -0.21314842998981476, -0.1242145523428917, 0.48463907837867737, -0.23541471362113953, 0.24505823850631714, 0.08462624251842499, -0.1290581375360489, 0.40145257115364075, 0.06914123147726059, 0.10754954814910889, 0.1615174412727356, -0.11862683296203613, -0.09838651865720749, 0.03957211226224899, -0.11711718142032623, 0.08703583478927612, -0.1678484082221985, 0.11425778269767761, 0.02690008655190468, -0.055306192487478256, -0.6315294504165649, -0.01294098049402237, 0.320594847202301, -0.14490307867527008, -0.1014324426651001, 0.2506065368652344, -0.6014740467071533, 0.3429087996482849, 0.13187023997306824, 0.5309942960739136, 0.014597701840102673, 0.11663636565208435, 0.19498850405216217, 0.24707752466201782, -0.2960152328014374, 0.4217509627342224, -0.2266983836889267, -0.04202719405293465, 0.03466935083270073, -0.05882047116756439, -0.1218072921037674, 0.4785676598548889, 0.2849896550178528, -0.2606015205383301, 0.09783126413822174, -0.07848387211561203, 0.02272559143602848, -0.11066247522830963, 0.36406904458999634, 0.19701236486434937, -0.05336493253707886, 0.07728326320648193, 0.1710081249475479, -0.09544052183628082, -0.1744898557662964, 0.11748009920120239, 0.13840129971504211, -0.1021391898393631, 0.19039279222488403, 0.07096365094184875, -0.1389864981174469, -0.13179911673069, -0.21304458379745483, 0.12119603157043457, -0.0878358855843544, 0.2369571030139923, 0.1870570182800293, -0.18788264691829681, -0.0876026451587677, -0.1486045867204666, 0.20903997123241425, 0.5161315202713013, -0.2350451797246933, -0.07585541903972626, 0.024493766948580742, 0.1951783299446106, 0.35019537806510925, 0.20101362466812134, -0.3267981708049774, 0.2561725974082947, 0.03712518513202667, 0.23221702873706818, 0.31636497378349304, -0.44901925325393677, -0.6639237403869629, -0.0901995450258255, -0.0756990984082222, 0.039773471653461456, 0.33173874020576477, 0.09758947789669037, 0.37035229802131653, 0.2930632531642914, -0.14594745635986328, 0.5172802209854126, 0.16961592435836792, 0.04346722364425659, -0.2609556019306183, -0.3448407053947449, 0.023141540586948395, 0.12701427936553955, -0.07336844503879547, 0.16323894262313843, -0.044048093259334564, -0.2676261067390442, 0.36140140891075134, -0.15033788979053497, -0.10212841629981995, 0.26906564831733704, 0.5216954350471497, 0.21598705649375916, 0.2130894809961319, -0.20326358079910278, -0.08442654460668564, 0.12828505039215088, -0.15222251415252686, 0.022890152409672737, -0.07821695506572723, -0.2090478539466858, -0.013567804358899593, 0.19774889945983887, -0.31354665756225586, -0.1740482896566391, -0.07465196400880814, 0.15297682583332062, 0.28819912672042847, -0.1318625509738922, -0.09894529730081558, 0.04934301972389221, -0.33996617794036865, 0.2049802988767624, -0.5214464664459229, 0.42709997296333313, -0.09354759752750397, -0.31373655796051025, -0.18720173835754395, 0.2583494782447815, 0.013484969735145569, -0.15099507570266724, -0.15897631645202637, 0.10670279711484909, 0.47489598393440247, -0.4063612222671509, 0.17568831145763397, -0.3079206347465515, -0.019566642120480537, -0.10988828539848328, 0.11341496556997299, 0.009082362055778503, 0.1443973332643509, 0.21565863490104675, -0.009515613317489624, 0.6227208375930786, 0.3724329173564911, 0.15079842507839203, -0.0765269547700882, 0.1891472339630127, 0.14738065004348755, -0.15917319059371948, -0.05282861739397049, -0.5078774690628052, -0.1828075498342514, 0.37408289313316345, 0.11359761655330658, 0.02832978591322899, -0.4408770203590393, 0.4054226875305176, 0.24011659622192383, 0.06032421812415123, -0.11842723935842514, 0.1541837453842163, -0.05681423097848892, -0.03674709051847458, 0.02928915247321129, -0.21392638981342316, 0.1052955612540245, 0.36757421493530273, -0.2779199779033661, -0.3208732008934021, 0.008761883713304996, -0.04218832030892372, 0.06506223976612091, 0.37360912561416626, -0.04236556589603424, -0.24754151701927185, 0.09350927174091339, -0.005427856929600239, -0.38407206535339355, -0.30605030059814453, -0.038119275122880936, 0.07016576081514359, -0.1114429235458374, 0.17438974976539612, -0.374952107667923, -0.14921344816684723, 0.08720819652080536, -0.45783814787864685, 0.19163064658641815, -0.09812366217374802, 0.17391982674598694, 0.22585786879062653, -0.23704379796981812, 0.44666579365730286, 0.11919789016246796, 0.15984661877155304, 0.052976660430431366, -0.19985853135585785, -0.12007678300142288, -0.1755334734916687, -0.4576171040534973, -0.09228944778442383, -0.2286260724067688, 0.40214791893959045, 0.17739461362361908, 0.21580472588539124, -0.09752171486616135, -0.2927098274230957, 0.021101750433444977, 0.028738204389810562, 0.1406075656414032, 0.20209236443042755, 0.18797066807746887, 0.04679879918694496, -0.23935040831565857, -0.1135704293847084, 0.07079390436410904, 0.1661299765110016, -0.20331259071826935, -0.17623791098594666, -0.04304272681474686, -0.08146372437477112, 0.1018625795841217, -0.2113610804080963, -0.28902047872543335, -0.22593742609024048, 0.15159547328948975, 0.0919150561094284, 0.10955388844013214, 0.0218207910656929, 0.37258273363113403, 0.05513656511902809, -0.20809905230998993, -0.10801457613706589, -0.27291062474250793, 0.009455855935811996, -0.07352648675441742, -0.04149967059493065, -0.2861768305301666, -0.5065015554428101, -0.33980226516723633, -0.23709464073181152, 0.1956367790699005, -0.2353995442390442, -0.3361152410507202, -0.34408318996429443, 0.15928950905799866, 0.15567216277122498, 0.14096148312091827, 0.37603920698165894, 0.22478237748146057, -0.08757457137107849, -0.1666589379310608, -0.3055531680583954, 0.4445739984512329, 0.14000210165977478, 0.08830024302005768, 0.10773338377475739, 0.40671780705451965, -0.1840822398662567, 0.527717649936676, 0.12478514015674591, -0.5209570527076721, 0.3717174828052521, -0.014029612764716148, 0.015872318297624588, -0.0675412192940712, -0.28510046005249023, 0.16566422581672668, 0.1925269514322281, -0.18165521323680878, 0.16265076398849487, -0.19840142130851746, 0.05916896462440491, 0.3394254446029663, 0.3197875916957855, -0.3819200098514557, -0.27683591842651367, -0.053732991218566895, -0.1595199704170227, -0.3160981237888336, 0.02526772767305374, 0.33398348093032837, -0.5367697477340698, 0.23682567477226257, 0.08284609019756317, 0.14890623092651367, 0.1879778802394867, -0.05669831112027168, -0.07691194862127304, -0.10680736601352692, -0.35940641164779663, 0.41494935750961304, 0.014454474672675133, 0.2401236742734909, 0.08461444079875946, -0.034012600779533386, 0.34345853328704834, 0.0684322640299797, 0.957189679145813, -0.06147873401641846, -0.023952066898345947, 0.397643506526947, -0.22147290408611298, -0.3634820580482483, 0.025664042681455612, -0.1771548092365265, 0.07975772023200989, 0.10192981362342834, 0.22994251549243927, -0.1601286381483078, -0.33771276473999023, 0.026532471179962158, 0.016739116981625557, -0.12575578689575195, 0.0394161157310009, -0.07083490490913391, -0.41674619913101196, -0.46632933616638184, 0.11469466984272003, -0.020214488729834557, 0.142299085855484, 0.09586663544178009, -0.21130245923995972, -0.5041608214378357, -0.11018228530883789, -0.13649320602416992, 0.15174609422683716, 0.3936239778995514, 0.14543449878692627, 0.13112418353557587, 0.14259345829486847, 0.34860286116600037, 0.6238431334495544, 0.22571760416030884, -0.07521764934062958, -0.21511927247047424, -0.006214398890733719, 0.16428488492965698, 0.09455657750368118, 0.42806801199913025, -0.06382374465465546, 0.436309814453125, -0.041507795453071594, 0.12463456392288208, 0.006139453500509262, 0.2227657288312912, 0.22624839842319489, 0.21135662496089935, 0.0564514696598053, -0.43798911571502686, 0.563046932220459, 0.02108735963702202, -0.17949140071868896, 0.31360024213790894, 0.16185006499290466, -0.25788789987564087, 1.0739563703536987, 0.2233298420906067, 1.0657089948654175, -0.08354927599430084, 0.2263789176940918, 0.198654443025589, 0.0644550770521164, 0.4328974187374115, 0.1228058785200119, 0.15999124944210052, -0.3314415514469147, 0.25742387771606445, 0.007882921025156975, -0.3100058138370514, 0.14132004976272583, 0.24119597673416138, -0.08309231698513031, -0.09476368129253387, -0.21930056810379028, -0.26755383610725403, -0.06948567926883698, 0.03920626640319824, 0.36478516459465027, -0.3496561050415039, -0.3084588348865509, -0.03154245391488075, 0.2854223847389221, 0.29282692074775696, 0.24883168935775757, -0.149113729596138, -0.47247734665870667, -0.18387635052204132, -0.21595998108386993, 0.005299948155879974, -0.2775573432445526, 0.2701743245124817, 0.17104187607765198, -0.3057253956794739, -0.16933844983577728, 0.23805877566337585, 0.18919827044010162, -0.147719606757164, -0.17465519905090332, 0.11698269844055176, 0.1554354578256607, -0.09744912385940552, -0.008984314277768135, -0.27513909339904785, 0.3801995515823364, 0.15564507246017456, -0.3932548761367798, 0.015331495553255081, 0.15893590450286865, -0.43875712156295776, -0.09044503420591354, -0.08017191290855408, -0.23098696768283844, -0.2791678011417389, -0.35150015354156494, -0.0657418817281723, -0.1390065997838974, -0.42861872911453247, -0.02188323810696602, 0.013057056814432144, -0.20575129985809326, 0.4152243733406067, -0.12011440098285675, -0.33868643641471863, -0.1725047528743744, 0.576625406742096, 0.20496207475662231, 0.09537558257579803, 0.49887585639953613, 0.2045176476240158, -0.147626131772995, -0.18616235256195068, -0.46980583667755127, 0.4244089126586914, 0.07368382066488266, 0.3030475080013275, -0.07642918080091476, -0.31452059745788574, -0.10987820476293564, -0.010932553559541702, 0.03224971145391464, -0.13382399082183838, -0.5415477156639099, -0.2227720469236374, -0.5453011989593506, 0.1993277221918106, 0.018919361755251884, 0.4727432131767273, -0.20540380477905273, 0.5167485475540161, -0.5072891712188721, -0.2756149470806122, -0.1670345515012741, -0.022107312455773354, -0.4664250910282135, 0.023473065346479416, -0.33027151226997375, -0.16918957233428955, 0.07720767706632614, 0.05150250717997551, 0.032448910176754, -0.051122426986694336, -0.06589005887508392, -0.1055540218949318, -0.15735933184623718, 0.18042704463005066, 0.09316834807395935, -0.19175319373607635, -0.12359641492366791, -0.04186428710818291, -0.14710715413093567, -0.1790006458759308, 0.18229864537715912, 0.2753225862979889, -0.06500384211540222, 0.1734464466571808, 0.04643943905830383, 0.09533624351024628, 0.2519489526748657, 0.09385300427675247, -0.029661141335964203, 0.3096500039100647, 0.09706570953130722, 0.11753471940755844, -0.12140858173370361, -0.031148385256528854, -0.06392954289913177, 0.023355919867753983, -0.001580663025379181, -0.0470111221075058, -0.08501841872930527, -0.03448394685983658, -0.35944458842277527, 0.32896003127098083, 0.27954474091529846, 0.5147304534912109, 0.08545242995023727, -0.23992270231246948, 0.2423897683620453, 0.04633186385035515, -0.21199281513690948, -0.2285027801990509, 0.3535669147968292, -0.2673211991786957, 0.23388245701789856, 0.21015900373458862, -0.0903715193271637, 0.19812962412834167, -0.3148203492164612, -0.05228175222873688, 0.2038479596376419, 0.3505209684371948, 0.14751948416233063, 0.20917664468288422, 0.13170970976352692, 0.05156376585364342, 0.13663320243358612, 0.4851376414299011, 0.7115122079849243, 0.5667836666107178, -0.010982215404510498, 0.628434419631958, -0.23398223519325256, 0.03877251595258713, 0.033012669533491135, -0.5802496075630188, 0.5933231711387634, 0.08162237703800201, -0.016070596873760223, 0.05523384362459183, 0.06653426587581635, 0.1697085201740265, 0.12200553715229034, -0.24251674115657806, -0.07678118348121643, 0.2856151759624481, -0.22198614478111267, -0.5239716172218323, -0.1637641340494156, 0.013442136347293854, 0.05490945279598236, -0.1030842512845993, -0.004145421087741852, -0.28387612104415894, 0.1822275072336197, -0.18517787754535675, -0.2403620332479477, -0.2812504172325134, -0.28571024537086487, -0.06400879472494125, 0.13659024238586426, -0.07531283795833588, -0.10241121798753738, -0.10063642263412476, -0.141636922955513, -0.11631664633750916, 0.05885467678308487, 0.09470462799072266, 0.14169088006019592, -0.5192404389381409, -0.03782927989959717, -0.057373229414224625, -0.1766134351491928, -0.20650899410247803, 0.023323699831962585, -0.16379757225513458, -0.021264076232910156, 0.19774062931537628, -0.006110692396759987, -0.07587403059005737, -0.34456631541252136, 0.232197105884552, 0.3549705743789673, 0.03815580531954765, 0.09397214651107788, 0.06182694435119629, 0.07818371802568436, 0.08916846662759781, -0.09187101572751999, -0.29696303606033325, -0.09764514863491058, 0.33265435695648193, -0.040677670389413834, 0.19271835684776306, 0.16475026309490204, 0.0005436819046735764, -0.24791693687438965, 0.39039403200149536, 0.3924221694469452, 0.3247530162334442, -0.2164476364850998, 0.3476312756538391, -0.03623563423752785, 0.2104082703590393, -0.04794441536068916, -0.3186001479625702, 0.3779136538505554, 0.18474674224853516, 0.0428156815469265, -0.06572221219539642, 0.014569662511348724, 0.30720001459121704, 0.3281789720058441, 0.6772937774658203, -0.2702368497848511, -0.18753312528133392, -0.3799324035644531, 0.0430867038667202, 0.28654056787490845, -0.30736371874809265, -0.07781112194061279, 0.04722677543759346, -0.12656067311763763, -0.339820921421051, -0.00709514319896698, 0.10334596037864685, -0.16982753574848175, 0.25881239771842957, 0.3162369430065155, 0.1465732753276825, -0.07439769804477692, -0.12184999138116837, -0.12944093346595764, -0.251859188079834, -0.22229896485805511, -0.2623871862888336, -0.17957553267478943, 0.179828941822052, -0.09648353606462479, -0.09733539819717407, -0.16712649166584015, 0.01764450967311859, 0.399120032787323, -0.2093278169631958, -0.16689236462116241, 0.3177429437637329, -0.23154467344284058, 0.05972208082675934, 0.044662751257419586, 0.22182327508926392, -0.005771853029727936, 0.4940704107284546, -0.2855697274208069, -0.07852385938167572, 0.7860209941864014, -0.3918514549732208, -0.022845296189188957, -0.20928427577018738, 0.24637733399868011, -0.08429016917943954, -0.1669451892375946, -0.2345830798149109, 0.00838182121515274, 0.20627132058143616, 0.0018958412110805511, -0.30338722467422485, 0.06010012701153755, 0.46671390533447266, -0.07100821286439896, -0.1460600197315216, 0.39399728178977966, 0.19481486082077026, 0.17317262291908264, 0.11242526769638062, -0.20699907839298248 ]
https://github.com/huggingface/datasets/issues/1805
can't pickle SwigPyObject objects when calling dataset.get_nearest_examples from FAISS index
I totally forgot to answer this issue, I'm so sorry. I was able to get it working by installing `datasets` from source. Huge thanks!
So, I have the following instances in my dataset ``` {'question': 'An astronomer observes that a planet rotates faster after a meteorite impact. Which is the most likely effect of this increase in rotation?', 'answer': 'C', 'example_id': 'ARCCH_Mercury_7175875', 'options':[{'option_context': 'One effect of increased amperage in the planetary world (..)', 'option_id': 'A', 'option_text': 'Planetary density will decrease.'}, (...)]} ``` The `options` value is always an list with 4 options, each one is a dict with `option_context`; `option_id` and `option_text`. I would like to overwrite the `option_context` of each instance of my dataset for a dpr result that I am developing. Then, I trained a model already and save it in a FAISS index ``` dpr_dataset = load_dataset( "text", data_files=ARC_CORPUS_TEXT, cache_dir=CACHE_DIR, split="train[:100%]", ) dpr_dataset.load_faiss_index("embeddings", f"{ARC_CORPUS_FAISS}") torch.set_grad_enabled(False) ``` Then, as a processor of my dataset, I created a map function that calls the `dpr_dataset` for each _option_ ``` def generate_context(example): question_text = example['question'] for option in example['options']: question_with_option = question_text + " " + option['option_text'] tokenize_text = question_tokenizer(question_with_option, return_tensors="pt").to(device) question_embed = ( question_encoder(**tokenize_text) )[0][0].cpu().numpy() _, retrieved_examples = dpr_dataset.get_nearest_examples( "embeddings", question_embed, k=10 ) # option["option_context"] = retrieved_examples["text"] # option["option_context"] = " ".join(option["option_context"]).strip() #result_dict = { # 'example_id': example['example_id'], # 'answer': example['answer'], # 'question': question_text, #options': example['options'] # } return example ``` I intentionally commented on this portion of the code. But when I call the `map` method, `ds_with_context = dataset.map(generate_context,load_from_cache_file=False)` It calls the following error: ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-55-75a458ce205c> in <module> ----> 1 ds_with_context = dataset.map(generate_context,load_from_cache_file=False) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/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) 301 num_proc=num_proc, 302 ) --> 303 for k, dataset in self.items() 304 } 305 ) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 301 num_proc=num_proc, 302 ) --> 303 for k, dataset in self.items() 304 } 305 ) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/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) 1257 fn_kwargs=fn_kwargs, 1258 new_fingerprint=new_fingerprint, -> 1259 update_data=update_data, 1260 ) 1261 else: ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 155 } 156 # apply actual function --> 157 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 158 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 159 # re-apply format to the output ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 387 file = StringIO() 388 with _no_cache_fields(obj): --> 389 dump(obj, file) 390 return file.getvalue() 391 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 359 def dump(obj, file): 360 """pickle an object to a file""" --> 361 Pickler(file, recurse=True).dump(obj) 362 return 363 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 452 raise PicklingError(msg) 453 else: --> 454 StockPickler.dump(self, obj) 455 stack.clear() # clear record of 'recursion-sensitive' pickled objects 456 return /usr/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in save_function(pickler, obj) 554 dill._dill._create_function, 555 (obj.__code__, globs, obj.__name__, obj.__defaults__, obj.__closure__, obj.__dict__, fkwdefaults), --> 556 obj=obj, 557 ) 558 else: /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /usr/lib/python3.7/pickle.py in save_tuple(self, obj) 784 write(MARK) 785 for element in obj: --> 786 save(element) 787 788 if id(obj) in memo: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 885 k, v = tmp[0] 886 save(k) --> 887 save(v) 888 write(SETITEM) 889 # else tmp is empty, and we're done /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 885 k, v = tmp[0] 886 save(k) --> 887 save(v) 888 write(SETITEM) 889 # else tmp is empty, and we're done /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle SwigPyObject objects ``` Which I have no idea how to solve/deal with it
24
can't pickle SwigPyObject objects when calling dataset.get_nearest_examples from FAISS index So, I have the following instances in my dataset ``` {'question': 'An astronomer observes that a planet rotates faster after a meteorite impact. Which is the most likely effect of this increase in rotation?', 'answer': 'C', 'example_id': 'ARCCH_Mercury_7175875', 'options':[{'option_context': 'One effect of increased amperage in the planetary world (..)', 'option_id': 'A', 'option_text': 'Planetary density will decrease.'}, (...)]} ``` The `options` value is always an list with 4 options, each one is a dict with `option_context`; `option_id` and `option_text`. I would like to overwrite the `option_context` of each instance of my dataset for a dpr result that I am developing. Then, I trained a model already and save it in a FAISS index ``` dpr_dataset = load_dataset( "text", data_files=ARC_CORPUS_TEXT, cache_dir=CACHE_DIR, split="train[:100%]", ) dpr_dataset.load_faiss_index("embeddings", f"{ARC_CORPUS_FAISS}") torch.set_grad_enabled(False) ``` Then, as a processor of my dataset, I created a map function that calls the `dpr_dataset` for each _option_ ``` def generate_context(example): question_text = example['question'] for option in example['options']: question_with_option = question_text + " " + option['option_text'] tokenize_text = question_tokenizer(question_with_option, return_tensors="pt").to(device) question_embed = ( question_encoder(**tokenize_text) )[0][0].cpu().numpy() _, retrieved_examples = dpr_dataset.get_nearest_examples( "embeddings", question_embed, k=10 ) # option["option_context"] = retrieved_examples["text"] # option["option_context"] = " ".join(option["option_context"]).strip() #result_dict = { # 'example_id': example['example_id'], # 'answer': example['answer'], # 'question': question_text, #options': example['options'] # } return example ``` I intentionally commented on this portion of the code. But when I call the `map` method, `ds_with_context = dataset.map(generate_context,load_from_cache_file=False)` It calls the following error: ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-55-75a458ce205c> in <module> ----> 1 ds_with_context = dataset.map(generate_context,load_from_cache_file=False) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/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) 301 num_proc=num_proc, 302 ) --> 303 for k, dataset in self.items() 304 } 305 ) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0) 301 num_proc=num_proc, 302 ) --> 303 for k, dataset in self.items() 304 } 305 ) ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/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) 1257 fn_kwargs=fn_kwargs, 1258 new_fingerprint=new_fingerprint, -> 1259 update_data=update_data, 1260 ) 1261 else: ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 155 } 156 # apply actual function --> 157 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 158 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 159 # re-apply format to the output ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs) 156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name 157 kwargs[fingerprint_name] = update_fingerprint( --> 158 self._fingerprint, transform, kwargs_for_fingerprint 159 ) 160 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args) 103 for key in sorted(transform_args): 104 hasher.update(key) --> 105 hasher.update(transform_args[key]) 106 return hasher.hexdigest() 107 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value) 55 def update(self, value): 56 self.m.update(f"=={type(value)}==".encode("utf8")) ---> 57 self.m.update(self.hash(value).encode("utf-8")) 58 59 def hexdigest(self): ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value) 51 return cls.dispatch[type(value)](cls, value) 52 else: ---> 53 return cls.hash_default(value) 54 55 def update(self, value): ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value) 44 @classmethod 45 def hash_default(cls, value): ---> 46 return cls.hash_bytes(dumps(value)) 47 48 @classmethod ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj) 387 file = StringIO() 388 with _no_cache_fields(obj): --> 389 dump(obj, file) 390 return file.getvalue() 391 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file) 359 def dump(obj, file): 360 """pickle an object to a file""" --> 361 Pickler(file, recurse=True).dump(obj) 362 return 363 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj) 452 raise PicklingError(msg) 453 else: --> 454 StockPickler.dump(self, obj) 455 stack.clear() # clear record of 'recursion-sensitive' pickled objects 456 return /usr/lib/python3.7/pickle.py in dump(self, obj) 435 if self.proto >= 4: 436 self.framer.start_framing() --> 437 self.save(obj) 438 self.write(STOP) 439 self.framer.end_framing() /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in save_function(pickler, obj) 554 dill._dill._create_function, 555 (obj.__code__, globs, obj.__name__, obj.__defaults__, obj.__closure__, obj.__dict__, fkwdefaults), --> 556 obj=obj, 557 ) 558 else: /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 636 else: 637 save(func) --> 638 save(args) 639 write(REDUCE) 640 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 /usr/lib/python3.7/pickle.py in save_tuple(self, obj) 784 write(MARK) 785 for element in obj: --> 786 save(element) 787 788 if id(obj) in memo: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 885 k, v = tmp[0] 886 save(k) --> 887 save(v) 888 write(SETITEM) 889 # else tmp is empty, and we're done /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 880 for k, v in tmp: 881 save(k) --> 882 save(v) 883 write(SETITEMS) 884 elif n: /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 547 548 # Save the reduce() output and finally memoize the object --> 549 self.save_reduce(obj=obj, *rv) 550 551 def persistent_id(self, obj): /usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj) 660 661 if state is not None: --> 662 save(state) 663 write(BUILD) 664 /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 502 f = self.dispatch.get(t) 503 if f is not None: --> 504 f(self, obj) # Call unbound method with explicit self 505 return 506 ~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj) 939 # we only care about session the first pass thru 940 pickler._session = False --> 941 StockPickler.save_dict(pickler, obj) 942 log.info("# D2") 943 return /usr/lib/python3.7/pickle.py in save_dict(self, obj) 854 855 self.memoize(obj) --> 856 self._batch_setitems(obj.items()) 857 858 dispatch[dict] = save_dict /usr/lib/python3.7/pickle.py in _batch_setitems(self, items) 885 k, v = tmp[0] 886 save(k) --> 887 save(v) 888 write(SETITEM) 889 # else tmp is empty, and we're done /usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id) 522 reduce = getattr(obj, "__reduce_ex__", None) 523 if reduce is not None: --> 524 rv = reduce(self.proto) 525 else: 526 reduce = getattr(obj, "__reduce__", None) TypeError: can't pickle SwigPyObject objects ``` Which I have no idea how to solve/deal with it I totally forgot to answer this issue, I'm so sorry. I was able to get it working by installing `datasets` from source. Huge thanks!
[ 0.0690423846244812, -0.38878387212753296, -0.06963580846786499, 0.24682506918907166, 0.1642264574766159, 0.027764610946178436, 0.17842748761177063, 0.05411210656166077, 0.4089649021625519, 0.5476053953170776, -0.05009908229112625, 0.49599722027778625, 0.11579310148954391, -0.12733501195907593, -0.267626017332077, 0.051510535180568695, 0.08499408513307571, 0.013422779738903046, 0.021620120853185654, -0.24258503317832947, -0.5357051491737366, -0.04840259999036789, -0.19842621684074402, 0.049339450895786285, -0.039841216057538986, 0.01803343929350376, -0.033283479511737823, 0.09544800221920013, -0.05844587832689285, -0.4539257884025574, 0.4045758843421936, 0.2576846480369568, 0.21166105568408966, -0.013423509895801544, -0.00012667453847825527, 0.0679020881652832, 0.20534731447696686, -0.021251916885375977, -0.16462285816669464, 0.0867505744099617, -0.0015751905739307404, 0.3058409094810486, 0.294412225484848, -0.35424938797950745, -0.21792444586753845, -0.2550704777240753, -0.050455816090106964, -0.13455581665039062, 0.06806492060422897, 0.19159550964832306, 0.06709259748458862, 0.14567936956882477, -0.11307252943515778, -0.1586892008781433, 0.22158530354499817, -0.010913379490375519, -0.06206204742193222, 0.16215048730373383, 0.2719883322715759, 0.3066602945327759, 0.25445762276649475, 0.274885892868042, -0.2460709661245346, 0.03687251731753349, -0.07259979099035263, 0.09264007955789566, 0.3378050923347473, 0.09200812876224518, 0.15567204356193542, 0.0969466120004654, 0.24981287121772766, -0.27378249168395996, -0.47020769119262695, -0.41377297043800354, -0.06139647960662842, -0.15674859285354614, -0.2627951204776764, -0.5509222745895386, -0.017237093299627304, 0.24829250574111938, 0.12546297907829285, 0.1021859273314476, -0.06395643949508667, 0.5212548971176147, 0.41186076402664185, 0.03595485910773277, 0.014424162916839123, 0.21093320846557617, 0.10664094984531403, -0.0576484277844429, 0.13660329580307007, -0.13325276970863342, -0.028368834406137466, -0.13212020695209503, -0.21314842998981476, -0.1242145523428917, 0.48463907837867737, -0.23541471362113953, 0.24505823850631714, 0.08462624251842499, -0.1290581375360489, 0.40145257115364075, 0.06914123147726059, 0.10754954814910889, 0.1615174412727356, -0.11862683296203613, -0.09838651865720749, 0.03957211226224899, -0.11711718142032623, 0.08703583478927612, -0.1678484082221985, 0.11425778269767761, 0.02690008655190468, -0.055306192487478256, -0.6315294504165649, -0.01294098049402237, 0.320594847202301, -0.14490307867527008, -0.1014324426651001, 0.2506065368652344, -0.6014740467071533, 0.3429087996482849, 0.13187023997306824, 0.5309942960739136, 0.014597701840102673, 0.11663636565208435, 0.19498850405216217, 0.24707752466201782, -0.2960152328014374, 0.4217509627342224, -0.2266983836889267, -0.04202719405293465, 0.03466935083270073, -0.05882047116756439, -0.1218072921037674, 0.4785676598548889, 0.2849896550178528, -0.2606015205383301, 0.09783126413822174, -0.07848387211561203, 0.02272559143602848, -0.11066247522830963, 0.36406904458999634, 0.19701236486434937, -0.05336493253707886, 0.07728326320648193, 0.1710081249475479, -0.09544052183628082, -0.1744898557662964, 0.11748009920120239, 0.13840129971504211, -0.1021391898393631, 0.19039279222488403, 0.07096365094184875, -0.1389864981174469, -0.13179911673069, -0.21304458379745483, 0.12119603157043457, -0.0878358855843544, 0.2369571030139923, 0.1870570182800293, -0.18788264691829681, -0.0876026451587677, -0.1486045867204666, 0.20903997123241425, 0.5161315202713013, -0.2350451797246933, -0.07585541903972626, 0.024493766948580742, 0.1951783299446106, 0.35019537806510925, 0.20101362466812134, -0.3267981708049774, 0.2561725974082947, 0.03712518513202667, 0.23221702873706818, 0.31636497378349304, -0.44901925325393677, -0.6639237403869629, -0.0901995450258255, -0.0756990984082222, 0.039773471653461456, 0.33173874020576477, 0.09758947789669037, 0.37035229802131653, 0.2930632531642914, -0.14594745635986328, 0.5172802209854126, 0.16961592435836792, 0.04346722364425659, -0.2609556019306183, -0.3448407053947449, 0.023141540586948395, 0.12701427936553955, -0.07336844503879547, 0.16323894262313843, -0.044048093259334564, -0.2676261067390442, 0.36140140891075134, -0.15033788979053497, -0.10212841629981995, 0.26906564831733704, 0.5216954350471497, 0.21598705649375916, 0.2130894809961319, -0.20326358079910278, -0.08442654460668564, 0.12828505039215088, -0.15222251415252686, 0.022890152409672737, -0.07821695506572723, -0.2090478539466858, -0.013567804358899593, 0.19774889945983887, -0.31354665756225586, -0.1740482896566391, -0.07465196400880814, 0.15297682583332062, 0.28819912672042847, -0.1318625509738922, -0.09894529730081558, 0.04934301972389221, -0.33996617794036865, 0.2049802988767624, -0.5214464664459229, 0.42709997296333313, -0.09354759752750397, -0.31373655796051025, -0.18720173835754395, 0.2583494782447815, 0.013484969735145569, -0.15099507570266724, -0.15897631645202637, 0.10670279711484909, 0.47489598393440247, -0.4063612222671509, 0.17568831145763397, -0.3079206347465515, -0.019566642120480537, -0.10988828539848328, 0.11341496556997299, 0.009082362055778503, 0.1443973332643509, 0.21565863490104675, -0.009515613317489624, 0.6227208375930786, 0.3724329173564911, 0.15079842507839203, -0.0765269547700882, 0.1891472339630127, 0.14738065004348755, -0.15917319059371948, -0.05282861739397049, -0.5078774690628052, -0.1828075498342514, 0.37408289313316345, 0.11359761655330658, 0.02832978591322899, -0.4408770203590393, 0.4054226875305176, 0.24011659622192383, 0.06032421812415123, -0.11842723935842514, 0.1541837453842163, -0.05681423097848892, -0.03674709051847458, 0.02928915247321129, -0.21392638981342316, 0.1052955612540245, 0.36757421493530273, -0.2779199779033661, -0.3208732008934021, 0.008761883713304996, -0.04218832030892372, 0.06506223976612091, 0.37360912561416626, -0.04236556589603424, -0.24754151701927185, 0.09350927174091339, -0.005427856929600239, -0.38407206535339355, -0.30605030059814453, -0.038119275122880936, 0.07016576081514359, -0.1114429235458374, 0.17438974976539612, -0.374952107667923, -0.14921344816684723, 0.08720819652080536, -0.45783814787864685, 0.19163064658641815, -0.09812366217374802, 0.17391982674598694, 0.22585786879062653, -0.23704379796981812, 0.44666579365730286, 0.11919789016246796, 0.15984661877155304, 0.052976660430431366, -0.19985853135585785, -0.12007678300142288, -0.1755334734916687, -0.4576171040534973, -0.09228944778442383, -0.2286260724067688, 0.40214791893959045, 0.17739461362361908, 0.21580472588539124, -0.09752171486616135, -0.2927098274230957, 0.021101750433444977, 0.028738204389810562, 0.1406075656414032, 0.20209236443042755, 0.18797066807746887, 0.04679879918694496, -0.23935040831565857, -0.1135704293847084, 0.07079390436410904, 0.1661299765110016, -0.20331259071826935, -0.17623791098594666, -0.04304272681474686, -0.08146372437477112, 0.1018625795841217, -0.2113610804080963, -0.28902047872543335, -0.22593742609024048, 0.15159547328948975, 0.0919150561094284, 0.10955388844013214, 0.0218207910656929, 0.37258273363113403, 0.05513656511902809, -0.20809905230998993, -0.10801457613706589, -0.27291062474250793, 0.009455855935811996, -0.07352648675441742, -0.04149967059493065, -0.2861768305301666, -0.5065015554428101, -0.33980226516723633, -0.23709464073181152, 0.1956367790699005, -0.2353995442390442, -0.3361152410507202, -0.34408318996429443, 0.15928950905799866, 0.15567216277122498, 0.14096148312091827, 0.37603920698165894, 0.22478237748146057, -0.08757457137107849, -0.1666589379310608, -0.3055531680583954, 0.4445739984512329, 0.14000210165977478, 0.08830024302005768, 0.10773338377475739, 0.40671780705451965, -0.1840822398662567, 0.527717649936676, 0.12478514015674591, -0.5209570527076721, 0.3717174828052521, -0.014029612764716148, 0.015872318297624588, -0.0675412192940712, -0.28510046005249023, 0.16566422581672668, 0.1925269514322281, -0.18165521323680878, 0.16265076398849487, -0.19840142130851746, 0.05916896462440491, 0.3394254446029663, 0.3197875916957855, -0.3819200098514557, -0.27683591842651367, -0.053732991218566895, -0.1595199704170227, -0.3160981237888336, 0.02526772767305374, 0.33398348093032837, -0.5367697477340698, 0.23682567477226257, 0.08284609019756317, 0.14890623092651367, 0.1879778802394867, -0.05669831112027168, -0.07691194862127304, -0.10680736601352692, -0.35940641164779663, 0.41494935750961304, 0.014454474672675133, 0.2401236742734909, 0.08461444079875946, -0.034012600779533386, 0.34345853328704834, 0.0684322640299797, 0.957189679145813, -0.06147873401641846, -0.023952066898345947, 0.397643506526947, -0.22147290408611298, -0.3634820580482483, 0.025664042681455612, -0.1771548092365265, 0.07975772023200989, 0.10192981362342834, 0.22994251549243927, -0.1601286381483078, -0.33771276473999023, 0.026532471179962158, 0.016739116981625557, -0.12575578689575195, 0.0394161157310009, -0.07083490490913391, -0.41674619913101196, -0.46632933616638184, 0.11469466984272003, -0.020214488729834557, 0.142299085855484, 0.09586663544178009, -0.21130245923995972, -0.5041608214378357, -0.11018228530883789, -0.13649320602416992, 0.15174609422683716, 0.3936239778995514, 0.14543449878692627, 0.13112418353557587, 0.14259345829486847, 0.34860286116600037, 0.6238431334495544, 0.22571760416030884, -0.07521764934062958, -0.21511927247047424, -0.006214398890733719, 0.16428488492965698, 0.09455657750368118, 0.42806801199913025, -0.06382374465465546, 0.436309814453125, -0.041507795453071594, 0.12463456392288208, 0.006139453500509262, 0.2227657288312912, 0.22624839842319489, 0.21135662496089935, 0.0564514696598053, -0.43798911571502686, 0.563046932220459, 0.02108735963702202, -0.17949140071868896, 0.31360024213790894, 0.16185006499290466, -0.25788789987564087, 1.0739563703536987, 0.2233298420906067, 1.0657089948654175, -0.08354927599430084, 0.2263789176940918, 0.198654443025589, 0.0644550770521164, 0.4328974187374115, 0.1228058785200119, 0.15999124944210052, -0.3314415514469147, 0.25742387771606445, 0.007882921025156975, -0.3100058138370514, 0.14132004976272583, 0.24119597673416138, -0.08309231698513031, -0.09476368129253387, -0.21930056810379028, -0.26755383610725403, -0.06948567926883698, 0.03920626640319824, 0.36478516459465027, -0.3496561050415039, -0.3084588348865509, -0.03154245391488075, 0.2854223847389221, 0.29282692074775696, 0.24883168935775757, -0.149113729596138, -0.47247734665870667, -0.18387635052204132, -0.21595998108386993, 0.005299948155879974, -0.2775573432445526, 0.2701743245124817, 0.17104187607765198, -0.3057253956794739, -0.16933844983577728, 0.23805877566337585, 0.18919827044010162, -0.147719606757164, -0.17465519905090332, 0.11698269844055176, 0.1554354578256607, -0.09744912385940552, -0.008984314277768135, -0.27513909339904785, 0.3801995515823364, 0.15564507246017456, -0.3932548761367798, 0.015331495553255081, 0.15893590450286865, -0.43875712156295776, -0.09044503420591354, -0.08017191290855408, -0.23098696768283844, -0.2791678011417389, -0.35150015354156494, -0.0657418817281723, -0.1390065997838974, -0.42861872911453247, -0.02188323810696602, 0.013057056814432144, -0.20575129985809326, 0.4152243733406067, -0.12011440098285675, -0.33868643641471863, -0.1725047528743744, 0.576625406742096, 0.20496207475662231, 0.09537558257579803, 0.49887585639953613, 0.2045176476240158, -0.147626131772995, -0.18616235256195068, -0.46980583667755127, 0.4244089126586914, 0.07368382066488266, 0.3030475080013275, -0.07642918080091476, -0.31452059745788574, -0.10987820476293564, -0.010932553559541702, 0.03224971145391464, -0.13382399082183838, -0.5415477156639099, -0.2227720469236374, -0.5453011989593506, 0.1993277221918106, 0.018919361755251884, 0.4727432131767273, -0.20540380477905273, 0.5167485475540161, -0.5072891712188721, -0.2756149470806122, -0.1670345515012741, -0.022107312455773354, -0.4664250910282135, 0.023473065346479416, -0.33027151226997375, -0.16918957233428955, 0.07720767706632614, 0.05150250717997551, 0.032448910176754, -0.051122426986694336, -0.06589005887508392, -0.1055540218949318, -0.15735933184623718, 0.18042704463005066, 0.09316834807395935, -0.19175319373607635, -0.12359641492366791, -0.04186428710818291, -0.14710715413093567, -0.1790006458759308, 0.18229864537715912, 0.2753225862979889, -0.06500384211540222, 0.1734464466571808, 0.04643943905830383, 0.09533624351024628, 0.2519489526748657, 0.09385300427675247, -0.029661141335964203, 0.3096500039100647, 0.09706570953130722, 0.11753471940755844, -0.12140858173370361, -0.031148385256528854, -0.06392954289913177, 0.023355919867753983, -0.001580663025379181, -0.0470111221075058, -0.08501841872930527, -0.03448394685983658, -0.35944458842277527, 0.32896003127098083, 0.27954474091529846, 0.5147304534912109, 0.08545242995023727, -0.23992270231246948, 0.2423897683620453, 0.04633186385035515, -0.21199281513690948, -0.2285027801990509, 0.3535669147968292, -0.2673211991786957, 0.23388245701789856, 0.21015900373458862, -0.0903715193271637, 0.19812962412834167, -0.3148203492164612, -0.05228175222873688, 0.2038479596376419, 0.3505209684371948, 0.14751948416233063, 0.20917664468288422, 0.13170970976352692, 0.05156376585364342, 0.13663320243358612, 0.4851376414299011, 0.7115122079849243, 0.5667836666107178, -0.010982215404510498, 0.628434419631958, -0.23398223519325256, 0.03877251595258713, 0.033012669533491135, -0.5802496075630188, 0.5933231711387634, 0.08162237703800201, -0.016070596873760223, 0.05523384362459183, 0.06653426587581635, 0.1697085201740265, 0.12200553715229034, -0.24251674115657806, -0.07678118348121643, 0.2856151759624481, -0.22198614478111267, -0.5239716172218323, -0.1637641340494156, 0.013442136347293854, 0.05490945279598236, -0.1030842512845993, -0.004145421087741852, -0.28387612104415894, 0.1822275072336197, -0.18517787754535675, -0.2403620332479477, -0.2812504172325134, -0.28571024537086487, -0.06400879472494125, 0.13659024238586426, -0.07531283795833588, -0.10241121798753738, -0.10063642263412476, -0.141636922955513, -0.11631664633750916, 0.05885467678308487, 0.09470462799072266, 0.14169088006019592, -0.5192404389381409, -0.03782927989959717, -0.057373229414224625, -0.1766134351491928, -0.20650899410247803, 0.023323699831962585, -0.16379757225513458, -0.021264076232910156, 0.19774062931537628, -0.006110692396759987, -0.07587403059005737, -0.34456631541252136, 0.232197105884552, 0.3549705743789673, 0.03815580531954765, 0.09397214651107788, 0.06182694435119629, 0.07818371802568436, 0.08916846662759781, -0.09187101572751999, -0.29696303606033325, -0.09764514863491058, 0.33265435695648193, -0.040677670389413834, 0.19271835684776306, 0.16475026309490204, 0.0005436819046735764, -0.24791693687438965, 0.39039403200149536, 0.3924221694469452, 0.3247530162334442, -0.2164476364850998, 0.3476312756538391, -0.03623563423752785, 0.2104082703590393, -0.04794441536068916, -0.3186001479625702, 0.3779136538505554, 0.18474674224853516, 0.0428156815469265, -0.06572221219539642, 0.014569662511348724, 0.30720001459121704, 0.3281789720058441, 0.6772937774658203, -0.2702368497848511, -0.18753312528133392, -0.3799324035644531, 0.0430867038667202, 0.28654056787490845, -0.30736371874809265, -0.07781112194061279, 0.04722677543759346, -0.12656067311763763, -0.339820921421051, -0.00709514319896698, 0.10334596037864685, -0.16982753574848175, 0.25881239771842957, 0.3162369430065155, 0.1465732753276825, -0.07439769804477692, -0.12184999138116837, -0.12944093346595764, -0.251859188079834, -0.22229896485805511, -0.2623871862888336, -0.17957553267478943, 0.179828941822052, -0.09648353606462479, -0.09733539819717407, -0.16712649166584015, 0.01764450967311859, 0.399120032787323, -0.2093278169631958, -0.16689236462116241, 0.3177429437637329, -0.23154467344284058, 0.05972208082675934, 0.044662751257419586, 0.22182327508926392, -0.005771853029727936, 0.4940704107284546, -0.2855697274208069, -0.07852385938167572, 0.7860209941864014, -0.3918514549732208, -0.022845296189188957, -0.20928427577018738, 0.24637733399868011, -0.08429016917943954, -0.1669451892375946, -0.2345830798149109, 0.00838182121515274, 0.20627132058143616, 0.0018958412110805511, -0.30338722467422485, 0.06010012701153755, 0.46671390533447266, -0.07100821286439896, -0.1460600197315216, 0.39399728178977966, 0.19481486082077026, 0.17317262291908264, 0.11242526769638062, -0.20699907839298248 ]
https://github.com/huggingface/datasets/issues/1803
Querying examples from big datasets is slower than small datasets
Hello, @lhoestq / @gaceladri : We have been seeing similar behavior with bigger datasets, where querying time increases. Are you folks aware of any solution that fixes this problem yet?
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed.
30
Querying examples from big datasets is slower than small datasets After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed. Hello, @lhoestq / @gaceladri : We have been seeing similar behavior with bigger datasets, where querying time increases. Are you folks aware of any solution that fixes this problem yet?
[ -0.40549367666244507, 0.058644503355026245, -0.07997141778469086, 0.13153207302093506, -0.07969391345977783, -0.17769165337085724, 0.24417486786842346, 0.491809219121933, -0.23139935731887817, 0.18019406497478485, 0.08149364590644836, 0.05508897826075554, 0.12508602440357208, -0.10075697302818298, 0.1307257115840912, -0.2734062373638153, 0.08074145019054413, 0.124845951795578, -0.07513222098350525, -0.034528665244579315, 0.024029985070228577, -0.19028697907924652, -0.34862685203552246, 0.018470607697963715, -0.0663272887468338, -0.22407233715057373, -0.23070675134658813, 0.10720640420913696, -0.1658501923084259, -0.4173947870731354, -0.05953645706176758, -0.1528192162513733, 0.22992980480194092, 0.42703086137771606, -0.0001130733362515457, 0.016405127942562103, 0.22793084383010864, 0.08941785991191864, -0.1997472047805786, 0.18293417990207672, 0.174807608127594, -0.28385433554649353, 0.08687453716993332, -0.4097662568092346, -0.04715360701084137, -0.2971976697444916, 0.09342829883098602, 0.018900983035564423, -0.04125356674194336, 0.3089761734008789, 0.1403641402721405, 0.5131545066833496, -0.19170476496219635, -0.13366346061229706, 0.6230676770210266, 0.20515218377113342, -0.3506300747394562, 0.5299633741378784, 0.5806368589401245, -0.04879993200302124, -0.30531546473503113, 0.13614049553871155, -0.08144386857748032, 0.270141065120697, 0.037022218108177185, 0.19797320663928986, -0.11280500143766403, 0.17959190905094147, 0.12381015717983246, 0.4088888466358185, 0.3083902597427368, -0.08939183503389359, -0.31488633155822754, -0.292018324136734, -0.05692818760871887, -0.23329347372055054, 0.020307470113039017, 0.32641905546188354, -0.2583792805671692, 0.2713424861431122, -0.3137761652469635, 0.15477785468101501, -0.10565067827701569, 0.17955198884010315, -0.1511588990688324, -0.06861545145511627, 0.11505104601383209, 0.19851043820381165, 0.09379580616950989, 0.01331334002315998, 0.15119317173957825, -0.16962099075317383, 0.02840580604970455, -0.052110880613327026, -0.28830358386039734, -0.08815446496009827, 0.15566331148147583, 0.1755785048007965, 0.2685060501098633, 0.1593102663755417, 0.4223208725452423, 0.1182836964726448, 0.2651940584182739, 0.09436231851577759, 0.0451355017721653, -0.009021572768688202, -0.26956453919410706, -0.000978325493633747, 0.3478800058364868, 0.2753004729747772, -0.294515997171402, 0.020878134295344353, -0.23832127451896667, -0.1844540387392044, 0.1815628558397293, -0.19732993841171265, -0.027453839778900146, -0.13371698558330536, 0.0043225716799497604, -0.08730419725179672, -0.3421141505241394, -0.12782250344753265, -0.026557791978120804, 0.4784686267375946, -0.18346565961837769, -0.02657211199402809, -0.2126668095588684, 0.12222354859113693, -0.3353424370288849, -0.25402504205703735, -0.12431216984987259, -0.18833579123020172, -0.16008037328720093, 0.2303076833486557, 0.10979531705379486, 0.05609758570790291, 0.3020736277103424, 0.058540500700473785, -0.19851483404636383, 0.241962730884552, 0.3923720121383667, -0.1808657944202423, 0.10445661842823029, 0.01975494995713234, 0.011255607008934021, 0.06353175640106201, -0.16374002397060394, 0.244764044880867, -0.39108967781066895, 0.19727066159248352, -0.195356547832489, -0.3384781777858734, 0.030639247968792915, 0.0919933021068573, -0.10569529980421066, -0.09976005554199219, -0.22708028554916382, 0.24624565243721008, -0.06942235678434372, -0.19974613189697266, -0.07743745297193527, -0.09419386088848114, 0.04028991237282753, -0.15313293039798737, 0.14130058884620667, 0.07762692868709564, -0.2506592571735382, 0.20185056328773499, -0.04518630728125572, 0.3970344066619873, 0.2543899118900299, 0.5308362245559692, -0.503103494644165, 0.16236114501953125, -0.13277849555015564, 0.29661595821380615, 0.2320234179496765, -0.0281321220099926, -0.6667605042457581, 0.4973525106906891, -0.004258058965206146, 0.02418888546526432, 0.2724839746952057, 0.16171206533908844, 0.35167786478996277, 0.10784871876239777, -0.049062833189964294, 0.38371187448501587, 0.18394817411899567, 0.22793066501617432, -0.34009987115859985, -0.23031024634838104, -0.04872759431600571, 0.3479747474193573, -0.3244733512401581, -0.15712156891822815, 0.31125104427337646, -0.36459729075431824, 0.49065926671028137, -0.20656412839889526, -0.18362656235694885, 0.2509782910346985, 0.08702355623245239, -0.27774596214294434, 0.11834852397441864, 0.09648793190717697, 0.08594328165054321, 0.24217668175697327, -0.1894872933626175, -0.018464647233486176, 0.04509012773633003, -0.18880893290042877, -0.07221531122922897, 0.06196317821741104, -0.055260349065065384, -0.04738571122288704, -0.04489725083112717, -0.09183025360107422, 0.3306869566440582, -0.003531353548169136, 0.16473349928855896, -0.16320621967315674, -0.2693369388580322, -0.009445670992136002, -0.26261836290359497, 0.0792929157614708, 0.09506809711456299, -0.12131048738956451, 0.009306356310844421, -0.24925285577774048, -0.0884237065911293, -0.0017331305425614119, -0.15193679928779602, 0.3275279402732849, 0.1502290964126587, 0.1502474844455719, 0.22353103756904602, 0.15224765241146088, 0.14195680618286133, -0.08493109047412872, 0.38797441124916077, 0.29686665534973145, 0.07531566917896271, 0.03652630001306534, -0.4053478538990021, 0.5263329148292542, 0.39331328868865967, 0.31605473160743713, 0.29040318727493286, -0.3733903765678406, 0.16444434225559235, 0.04837924614548683, 0.11050213873386383, 0.41063863039016724, 0.2937985956668854, 0.2421559989452362, 0.5489550828933716, 0.16632583737373352, -0.3161974549293518, 0.11558247357606888, 0.4506141245365143, -0.2496013641357422, 0.018042240291833878, 0.18730425834655762, -0.42171287536621094, -0.18561744689941406, 0.37021583318710327, -0.1509695053100586, 0.32658013701438904, 0.33125314116477966, 0.16064414381980896, -0.1239553764462471, 0.027442894876003265, -0.2904404401779175, 0.26255002617836, 0.09679454565048218, 0.14140845835208893, -0.2201085090637207, 0.4368427097797394, -0.09200569242238998, -0.24601101875305176, -0.38159817457199097, -0.0392078198492527, 0.19213195145130157, -0.12640096247196198, 0.30729901790618896, -0.0982983335852623, 0.053619153797626495, -0.03245113044977188, 0.13080070912837982, 0.07907233387231827, -0.08653527498245239, 0.045039016753435135, 0.19354063272476196, -0.18121057748794556, -0.1583382487297058, -0.055191293358802795, 0.22789597511291504, 0.26178810000419617, -0.20876112580299377, -0.0017746277153491974, -0.0716872587800026, -0.3983876407146454, 0.08031298220157623, 0.2775994539260864, 0.1493917554616928, 0.14504538476467133, -0.04691782593727112, -0.18544796109199524, -0.28017380833625793, -0.3152386546134949, -0.0065731629729270935, 0.07990692555904388, 0.2866186201572418, -0.07090029120445251, 0.07639451324939728, -0.3244525194168091, -0.1447664052248001, 0.0637100338935852, -0.23291027545928955, -0.1513255387544632, 0.27600738406181335, -0.18074728548526764, 0.0008986307657323778, 0.08878308534622192, -0.3163755536079407, -0.1673077940940857, -0.30017706751823425, 0.3784308433532715, 0.17276118695735931, 0.20834563672542572, 0.10755542665719986, 0.3943435549736023, 0.1223713606595993, 0.009659772738814354, 0.12281908839941025, 0.037916772067546844, -0.4149511158466339, 0.519088089466095, -0.18026375770568848, -0.45006418228149414, -0.4888223111629486, -0.24293062090873718, -0.16414868831634521, 0.4524995684623718, -0.5341605544090271, -0.031146589666604996, -0.5311311483383179, 0.41277632117271423, 0.12353938817977905, 0.10216754674911499, 0.04960323125123978, -0.21315725147724152, -0.2089555859565735, 0.12922963500022888, 0.08261796832084656, -0.006418675184249878, -0.08785057067871094, 0.20213806629180908, -0.061521224677562714, 0.03371110185980797, -0.009868493303656578, 0.7692424058914185, 0.06894397735595703, -0.012904908508062363, 0.263535737991333, -0.09490318596363068, 0.05190650001168251, -0.16474509239196777, 0.14588795602321625, 0.09050392359495163, -0.2608802020549774, -0.2699277400970459, 0.4183902144432068, 0.16414737701416016, -0.3080245852470398, 0.05913437902927399, -0.18512959778308868, -0.09765896946191788, -0.2781834006309509, 0.2541959881782532, 0.15882492065429688, 0.17439839243888855, 0.06986100971698761, 0.3926577568054199, -0.3018999695777893, -0.13592663407325745, 0.07070943713188171, -0.25781458616256714, 0.02017316222190857, -0.11698358505964279, -0.3373413383960724, -0.059714991599321365, -0.684593141078949, 0.20213952660560608, -0.06980440765619278, 0.03913889452815056, 0.2540455460548401, -0.3021760880947113, 0.2348044067621231, -0.06626403331756592, 0.5487109422683716, 0.19057194888591766, -0.19964441657066345, -0.11521820724010468, -0.2325005978345871, -0.42478930950164795, -0.15542373061180115, -0.49562618136405945, 0.11365188658237457, -0.0005395635962486267, 0.33458149433135986, -0.3185562193393707, 0.11183632165193558, 0.00006049498915672302, 0.3112281262874603, 0.19164972007274628, -0.04427860304713249, -0.16765469312667847, -0.2823411822319031, -0.13252335786819458, 0.16237764060497284, -0.19951477646827698, 0.05044970288872719, -0.26943451166152954, -0.169610857963562, -0.1472621113061905, 0.1772928237915039, 0.11681999266147614, 0.4819425642490387, 0.2846928536891937, -0.4382571578025818, 0.36333411931991577, 0.02722485363483429, 0.1518045961856842, 0.3828197121620178, 0.40001922845840454, 0.32248786091804504, -0.12357711791992188, 0.19988873600959778, 0.10222860425710678, 0.07479631900787354, 0.5333117246627808, -0.001265170518308878, 0.19727258384227753, 0.06110768765211105, 0.2763022184371948, -0.056448791176080704, 0.08236680924892426, 0.3274202048778534, -0.08233878761529922, -0.06249767541885376, -0.316829115152359, 0.7024027109146118, 0.09989838302135468, 0.008582472801208496, 0.23552851378917694, -0.1901874989271164, 0.13044320046901703, 0.30139464139938354, -0.10220619291067123, 0.9143378138542175, -0.12508805096149445, 0.2525980770587921, 0.349473774433136, 0.06673100590705872, 0.007589620538055897, -0.0959177166223526, 0.1510164886713028, -0.31350284814834595, -0.23164929449558258, 0.1761050671339035, -0.2805035710334778, 0.08492116630077362, 0.21285951137542725, -0.13127481937408447, 0.08628800511360168, -0.05373178794980049, 0.19904311001300812, -0.22586047649383545, 0.23925131559371948, -0.2529607117176056, -0.05109252408146858, -0.435341477394104, 0.028821062296628952, 0.0972895622253418, -0.06465215981006622, 0.08860572427511215, -0.14536935091018677, -0.5541805624961853, 0.010253485292196274, -0.09387645125389099, 0.038914747536182404, -0.2355804294347763, 0.16329807043075562, 0.059376370161771774, -0.47716158628463745, -0.08425377309322357, 0.12125369906425476, -0.4953686594963074, 0.07895474135875702, -0.24581170082092285, 0.41740965843200684, 0.04354551061987877, 0.23015880584716797, 0.5308087468147278, -0.3330541253089905, -0.008719535544514656, -0.029219064861536026, -0.21656781435012817, 0.24954074621200562, -0.15398955345153809, -0.2520103454589844, 0.02528531849384308, 0.14373070001602173, 0.3611818552017212, -0.16750192642211914, -0.27764585614204407, -0.12400461733341217, -0.44087374210357666, -0.2431265413761139, 0.08413772284984589, -0.042736947536468506, 0.08555810898542404, 0.2314760982990265, 0.3174692988395691, -0.35499292612075806, -0.2242874652147293, 0.37099969387054443, 0.09431253373622894, 0.2603204548358917, 0.31308677792549133, 0.08809581398963928, -0.21637548506259918, -0.12743738293647766, 0.29655349254608154, 0.41114309430122375, -0.4757106304168701, 0.06908169388771057, 0.013951177708804607, 0.12462691962718964, 0.24618001282215118, 0.018209662288427353, 0.07419745624065399, -0.25699007511138916, -0.33867958188056946, -0.06908656656742096, 0.009943997487425804, 0.32786786556243896, 0.12076172232627869, 0.13579605519771576, 0.057691335678100586, -0.014596251770853996, -0.3653215765953064, 0.014248049817979336, -0.2701687812805176, 0.1390894055366516, -0.02432269975543022, 0.18286335468292236, -0.43158963322639465, 0.01740933582186699, 0.008137536235153675, 0.1431652456521988, 0.10916264355182648, 0.10638198256492615, -0.12343858182430267, -0.21664738655090332, 0.029185544699430466, 0.1290723979473114, -0.13618791103363037, -0.27971911430358887, 0.23944316804409027, -0.2063068002462387, -0.05086604133248329, -0.3758655786514282, 0.14212407171726227, -0.13642072677612305, -0.03166034817695618, -0.42543864250183105, 0.25964275002479553, -0.16920319199562073, -0.30194026231765747, 0.3180858790874481, -0.4044681787490845, 0.17799843847751617, 0.060763854533433914, 0.1787565052509308, 0.00400555320084095, -0.1559257209300995, 0.07209174335002899, 0.2029668688774109, 0.1648201048374176, 0.13967806100845337, 0.3797294497489929, -0.02621212601661682, -0.09722796082496643, -0.10739034414291382, 0.33126673102378845, 0.34939053654670715, 0.03802916035056114, -0.13879123330116272, 0.1757907271385193, 0.2256358116865158, -0.32513704895973206, -0.2828211188316345, -0.12963742017745972, -0.25700643658638, 0.2418893575668335, 0.009579531848430634, 0.2093762755393982, 0.1670224964618683, -0.07895486056804657, -0.20689696073532104, 0.098643459379673, 0.5504121780395508, -0.14517584443092346, 0.6776706576347351, 0.3272513151168823, -0.19930444657802582, 0.27027955651283264, 0.002087036147713661, 0.3459145128726959, 0.36188751459121704, -0.11960335820913315, 0.536824643611908, 0.23207449913024902, 0.24495413899421692, -0.133966863155365, -0.3090496063232422, 0.13521072268486023, -0.0015174299478530884, -0.013642989099025726, 0.1391918957233429, 0.06212903559207916, 0.44904252886772156, 0.005227912217378616, 0.07710173726081848, -0.32662978768348694, -0.12674954533576965, 0.029044203460216522, -0.08261632919311523, -0.04338546469807625, -0.11773930490016937, -0.07485173642635345, 0.1068684309720993, -0.37246638536453247, -0.1312440037727356, 0.3648233115673065, 0.0338449589908123, 0.1812082827091217, -0.44460779428482056, 0.20354139804840088, -0.1569175124168396, 0.21809864044189453, -0.239833265542984, 0.1747613251209259, 0.05008469894528389, -0.06679388880729675, 0.07139241695404053, 0.10168417543172836, 0.3679460287094116, 0.18524238467216492, -0.10660095512866974, -0.17309285700321198, -0.05663987621665001, -0.03850575536489487, -0.013906862586736679, -0.0869700089097023, 0.04141530394554138, -0.09860046207904816, 0.30176180601119995, 0.03081405721604824, -0.15572099387645721, -0.13875797390937805, -0.022854890674352646, -0.22427958250045776, -0.32634490728378296, -0.34533166885375977, -0.2006979137659073, -0.3282325863838196, -0.1295248121023178, -0.18956810235977173, -0.25364336371421814, 0.18352057039737701, 0.22793489694595337, -0.3133319914340973, -0.06755870580673218, 0.0006711401510983706, 0.0845005214214325, -0.5105265378952026, 0.6805163621902466, 0.4650323987007141, 0.5556751489639282, -0.32090654969215393, -0.11604468524456024, -0.4356548488140106, 0.06292129307985306, -0.6595270037651062, -0.04978837072849274, 0.29427123069763184, 0.39310985803604126, 0.1516687572002411, 0.21537776291370392, 0.16460812091827393, 0.13592588901519775, -0.19167523086071014, 0.32111218571662903, -0.530500590801239, -0.08094994723796844, -0.027506984770298004, 0.01697678491473198, -0.21761482954025269, -0.6412057876586914, 0.4145413339138031, -0.4362512528896332, 0.01961914449930191, -0.17953979969024658, -0.1805548518896103, 0.3991861045360565, 0.22178232669830322, 0.5155704021453857, 0.002279948443174362, 0.14303961396217346, 0.024066850543022156, -0.1811051368713379, -0.19200268387794495, -0.03763185814023018, 0.0861414223909378, 0.1762726753950119, -0.0916481614112854, 0.08704788982868195, 0.12938401103019714, -0.1807277500629425, 0.09440816193819046, 0.6064497828483582, -0.10337407141923904, 0.008501249365508556, 0.11393552273511887, -0.14100833237171173, -0.2004249095916748, 0.11038792133331299, -0.18586532771587372, -0.03389827907085419, -0.09858180582523346, -0.2373308390378952, -0.15887252986431122, -0.19998447597026825, 0.42357540130615234, -0.45981642603874207, 0.057306308299303055, -0.17736037075519562, 0.272293359041214, 0.2497566044330597, 0.35054415464401245, -0.19628754258155823, 0.02973061054944992, 0.31973591446876526, 0.0932115912437439, -0.043147310614585876, 0.23114584386348724, 0.1514274775981903, 0.11452256143093109, -0.07493724673986435, 0.391838401556015, -0.3036594092845917, -0.3066388666629791, -0.2293878197669983, -0.3594546914100647 ]
https://github.com/huggingface/datasets/issues/1803
Querying examples from big datasets is slower than small datasets
Hi ! I'm pretty sure that it can be fixed by using the Arrow IPC file format instead of the raw streaming format but I haven't tested yet. I'll take a look at it soon and let you know
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed.
39
Querying examples from big datasets is slower than small datasets After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed. Hi ! I'm pretty sure that it can be fixed by using the Arrow IPC file format instead of the raw streaming format but I haven't tested yet. I'll take a look at it soon and let you know
[ -0.40549367666244507, 0.058644503355026245, -0.07997141778469086, 0.13153207302093506, -0.07969391345977783, -0.17769165337085724, 0.24417486786842346, 0.491809219121933, -0.23139935731887817, 0.18019406497478485, 0.08149364590644836, 0.05508897826075554, 0.12508602440357208, -0.10075697302818298, 0.1307257115840912, -0.2734062373638153, 0.08074145019054413, 0.124845951795578, -0.07513222098350525, -0.034528665244579315, 0.024029985070228577, -0.19028697907924652, -0.34862685203552246, 0.018470607697963715, -0.0663272887468338, -0.22407233715057373, -0.23070675134658813, 0.10720640420913696, -0.1658501923084259, -0.4173947870731354, -0.05953645706176758, -0.1528192162513733, 0.22992980480194092, 0.42703086137771606, -0.0001130733362515457, 0.016405127942562103, 0.22793084383010864, 0.08941785991191864, -0.1997472047805786, 0.18293417990207672, 0.174807608127594, -0.28385433554649353, 0.08687453716993332, -0.4097662568092346, -0.04715360701084137, -0.2971976697444916, 0.09342829883098602, 0.018900983035564423, -0.04125356674194336, 0.3089761734008789, 0.1403641402721405, 0.5131545066833496, -0.19170476496219635, -0.13366346061229706, 0.6230676770210266, 0.20515218377113342, -0.3506300747394562, 0.5299633741378784, 0.5806368589401245, -0.04879993200302124, -0.30531546473503113, 0.13614049553871155, -0.08144386857748032, 0.270141065120697, 0.037022218108177185, 0.19797320663928986, -0.11280500143766403, 0.17959190905094147, 0.12381015717983246, 0.4088888466358185, 0.3083902597427368, -0.08939183503389359, -0.31488633155822754, -0.292018324136734, -0.05692818760871887, -0.23329347372055054, 0.020307470113039017, 0.32641905546188354, -0.2583792805671692, 0.2713424861431122, -0.3137761652469635, 0.15477785468101501, -0.10565067827701569, 0.17955198884010315, -0.1511588990688324, -0.06861545145511627, 0.11505104601383209, 0.19851043820381165, 0.09379580616950989, 0.01331334002315998, 0.15119317173957825, -0.16962099075317383, 0.02840580604970455, -0.052110880613327026, -0.28830358386039734, -0.08815446496009827, 0.15566331148147583, 0.1755785048007965, 0.2685060501098633, 0.1593102663755417, 0.4223208725452423, 0.1182836964726448, 0.2651940584182739, 0.09436231851577759, 0.0451355017721653, -0.009021572768688202, -0.26956453919410706, -0.000978325493633747, 0.3478800058364868, 0.2753004729747772, -0.294515997171402, 0.020878134295344353, -0.23832127451896667, -0.1844540387392044, 0.1815628558397293, -0.19732993841171265, -0.027453839778900146, -0.13371698558330536, 0.0043225716799497604, -0.08730419725179672, -0.3421141505241394, -0.12782250344753265, -0.026557791978120804, 0.4784686267375946, -0.18346565961837769, -0.02657211199402809, -0.2126668095588684, 0.12222354859113693, -0.3353424370288849, -0.25402504205703735, -0.12431216984987259, -0.18833579123020172, -0.16008037328720093, 0.2303076833486557, 0.10979531705379486, 0.05609758570790291, 0.3020736277103424, 0.058540500700473785, -0.19851483404636383, 0.241962730884552, 0.3923720121383667, -0.1808657944202423, 0.10445661842823029, 0.01975494995713234, 0.011255607008934021, 0.06353175640106201, -0.16374002397060394, 0.244764044880867, -0.39108967781066895, 0.19727066159248352, -0.195356547832489, -0.3384781777858734, 0.030639247968792915, 0.0919933021068573, -0.10569529980421066, -0.09976005554199219, -0.22708028554916382, 0.24624565243721008, -0.06942235678434372, -0.19974613189697266, -0.07743745297193527, -0.09419386088848114, 0.04028991237282753, -0.15313293039798737, 0.14130058884620667, 0.07762692868709564, -0.2506592571735382, 0.20185056328773499, -0.04518630728125572, 0.3970344066619873, 0.2543899118900299, 0.5308362245559692, -0.503103494644165, 0.16236114501953125, -0.13277849555015564, 0.29661595821380615, 0.2320234179496765, -0.0281321220099926, -0.6667605042457581, 0.4973525106906891, -0.004258058965206146, 0.02418888546526432, 0.2724839746952057, 0.16171206533908844, 0.35167786478996277, 0.10784871876239777, -0.049062833189964294, 0.38371187448501587, 0.18394817411899567, 0.22793066501617432, -0.34009987115859985, -0.23031024634838104, -0.04872759431600571, 0.3479747474193573, -0.3244733512401581, -0.15712156891822815, 0.31125104427337646, -0.36459729075431824, 0.49065926671028137, -0.20656412839889526, -0.18362656235694885, 0.2509782910346985, 0.08702355623245239, -0.27774596214294434, 0.11834852397441864, 0.09648793190717697, 0.08594328165054321, 0.24217668175697327, -0.1894872933626175, -0.018464647233486176, 0.04509012773633003, -0.18880893290042877, -0.07221531122922897, 0.06196317821741104, -0.055260349065065384, -0.04738571122288704, -0.04489725083112717, -0.09183025360107422, 0.3306869566440582, -0.003531353548169136, 0.16473349928855896, -0.16320621967315674, -0.2693369388580322, -0.009445670992136002, -0.26261836290359497, 0.0792929157614708, 0.09506809711456299, -0.12131048738956451, 0.009306356310844421, -0.24925285577774048, -0.0884237065911293, -0.0017331305425614119, -0.15193679928779602, 0.3275279402732849, 0.1502290964126587, 0.1502474844455719, 0.22353103756904602, 0.15224765241146088, 0.14195680618286133, -0.08493109047412872, 0.38797441124916077, 0.29686665534973145, 0.07531566917896271, 0.03652630001306534, -0.4053478538990021, 0.5263329148292542, 0.39331328868865967, 0.31605473160743713, 0.29040318727493286, -0.3733903765678406, 0.16444434225559235, 0.04837924614548683, 0.11050213873386383, 0.41063863039016724, 0.2937985956668854, 0.2421559989452362, 0.5489550828933716, 0.16632583737373352, -0.3161974549293518, 0.11558247357606888, 0.4506141245365143, -0.2496013641357422, 0.018042240291833878, 0.18730425834655762, -0.42171287536621094, -0.18561744689941406, 0.37021583318710327, -0.1509695053100586, 0.32658013701438904, 0.33125314116477966, 0.16064414381980896, -0.1239553764462471, 0.027442894876003265, -0.2904404401779175, 0.26255002617836, 0.09679454565048218, 0.14140845835208893, -0.2201085090637207, 0.4368427097797394, -0.09200569242238998, -0.24601101875305176, -0.38159817457199097, -0.0392078198492527, 0.19213195145130157, -0.12640096247196198, 0.30729901790618896, -0.0982983335852623, 0.053619153797626495, -0.03245113044977188, 0.13080070912837982, 0.07907233387231827, -0.08653527498245239, 0.045039016753435135, 0.19354063272476196, -0.18121057748794556, -0.1583382487297058, -0.055191293358802795, 0.22789597511291504, 0.26178810000419617, -0.20876112580299377, -0.0017746277153491974, -0.0716872587800026, -0.3983876407146454, 0.08031298220157623, 0.2775994539260864, 0.1493917554616928, 0.14504538476467133, -0.04691782593727112, -0.18544796109199524, -0.28017380833625793, -0.3152386546134949, -0.0065731629729270935, 0.07990692555904388, 0.2866186201572418, -0.07090029120445251, 0.07639451324939728, -0.3244525194168091, -0.1447664052248001, 0.0637100338935852, -0.23291027545928955, -0.1513255387544632, 0.27600738406181335, -0.18074728548526764, 0.0008986307657323778, 0.08878308534622192, -0.3163755536079407, -0.1673077940940857, -0.30017706751823425, 0.3784308433532715, 0.17276118695735931, 0.20834563672542572, 0.10755542665719986, 0.3943435549736023, 0.1223713606595993, 0.009659772738814354, 0.12281908839941025, 0.037916772067546844, -0.4149511158466339, 0.519088089466095, -0.18026375770568848, -0.45006418228149414, -0.4888223111629486, -0.24293062090873718, -0.16414868831634521, 0.4524995684623718, -0.5341605544090271, -0.031146589666604996, -0.5311311483383179, 0.41277632117271423, 0.12353938817977905, 0.10216754674911499, 0.04960323125123978, -0.21315725147724152, -0.2089555859565735, 0.12922963500022888, 0.08261796832084656, -0.006418675184249878, -0.08785057067871094, 0.20213806629180908, -0.061521224677562714, 0.03371110185980797, -0.009868493303656578, 0.7692424058914185, 0.06894397735595703, -0.012904908508062363, 0.263535737991333, -0.09490318596363068, 0.05190650001168251, -0.16474509239196777, 0.14588795602321625, 0.09050392359495163, -0.2608802020549774, -0.2699277400970459, 0.4183902144432068, 0.16414737701416016, -0.3080245852470398, 0.05913437902927399, -0.18512959778308868, -0.09765896946191788, -0.2781834006309509, 0.2541959881782532, 0.15882492065429688, 0.17439839243888855, 0.06986100971698761, 0.3926577568054199, -0.3018999695777893, -0.13592663407325745, 0.07070943713188171, -0.25781458616256714, 0.02017316222190857, -0.11698358505964279, -0.3373413383960724, -0.059714991599321365, -0.684593141078949, 0.20213952660560608, -0.06980440765619278, 0.03913889452815056, 0.2540455460548401, -0.3021760880947113, 0.2348044067621231, -0.06626403331756592, 0.5487109422683716, 0.19057194888591766, -0.19964441657066345, -0.11521820724010468, -0.2325005978345871, -0.42478930950164795, -0.15542373061180115, -0.49562618136405945, 0.11365188658237457, -0.0005395635962486267, 0.33458149433135986, -0.3185562193393707, 0.11183632165193558, 0.00006049498915672302, 0.3112281262874603, 0.19164972007274628, -0.04427860304713249, -0.16765469312667847, -0.2823411822319031, -0.13252335786819458, 0.16237764060497284, -0.19951477646827698, 0.05044970288872719, -0.26943451166152954, -0.169610857963562, -0.1472621113061905, 0.1772928237915039, 0.11681999266147614, 0.4819425642490387, 0.2846928536891937, -0.4382571578025818, 0.36333411931991577, 0.02722485363483429, 0.1518045961856842, 0.3828197121620178, 0.40001922845840454, 0.32248786091804504, -0.12357711791992188, 0.19988873600959778, 0.10222860425710678, 0.07479631900787354, 0.5333117246627808, -0.001265170518308878, 0.19727258384227753, 0.06110768765211105, 0.2763022184371948, -0.056448791176080704, 0.08236680924892426, 0.3274202048778534, -0.08233878761529922, -0.06249767541885376, -0.316829115152359, 0.7024027109146118, 0.09989838302135468, 0.008582472801208496, 0.23552851378917694, -0.1901874989271164, 0.13044320046901703, 0.30139464139938354, -0.10220619291067123, 0.9143378138542175, -0.12508805096149445, 0.2525980770587921, 0.349473774433136, 0.06673100590705872, 0.007589620538055897, -0.0959177166223526, 0.1510164886713028, -0.31350284814834595, -0.23164929449558258, 0.1761050671339035, -0.2805035710334778, 0.08492116630077362, 0.21285951137542725, -0.13127481937408447, 0.08628800511360168, -0.05373178794980049, 0.19904311001300812, -0.22586047649383545, 0.23925131559371948, -0.2529607117176056, -0.05109252408146858, -0.435341477394104, 0.028821062296628952, 0.0972895622253418, -0.06465215981006622, 0.08860572427511215, -0.14536935091018677, -0.5541805624961853, 0.010253485292196274, -0.09387645125389099, 0.038914747536182404, -0.2355804294347763, 0.16329807043075562, 0.059376370161771774, -0.47716158628463745, -0.08425377309322357, 0.12125369906425476, -0.4953686594963074, 0.07895474135875702, -0.24581170082092285, 0.41740965843200684, 0.04354551061987877, 0.23015880584716797, 0.5308087468147278, -0.3330541253089905, -0.008719535544514656, -0.029219064861536026, -0.21656781435012817, 0.24954074621200562, -0.15398955345153809, -0.2520103454589844, 0.02528531849384308, 0.14373070001602173, 0.3611818552017212, -0.16750192642211914, -0.27764585614204407, -0.12400461733341217, -0.44087374210357666, -0.2431265413761139, 0.08413772284984589, -0.042736947536468506, 0.08555810898542404, 0.2314760982990265, 0.3174692988395691, -0.35499292612075806, -0.2242874652147293, 0.37099969387054443, 0.09431253373622894, 0.2603204548358917, 0.31308677792549133, 0.08809581398963928, -0.21637548506259918, -0.12743738293647766, 0.29655349254608154, 0.41114309430122375, -0.4757106304168701, 0.06908169388771057, 0.013951177708804607, 0.12462691962718964, 0.24618001282215118, 0.018209662288427353, 0.07419745624065399, -0.25699007511138916, -0.33867958188056946, -0.06908656656742096, 0.009943997487425804, 0.32786786556243896, 0.12076172232627869, 0.13579605519771576, 0.057691335678100586, -0.014596251770853996, -0.3653215765953064, 0.014248049817979336, -0.2701687812805176, 0.1390894055366516, -0.02432269975543022, 0.18286335468292236, -0.43158963322639465, 0.01740933582186699, 0.008137536235153675, 0.1431652456521988, 0.10916264355182648, 0.10638198256492615, -0.12343858182430267, -0.21664738655090332, 0.029185544699430466, 0.1290723979473114, -0.13618791103363037, -0.27971911430358887, 0.23944316804409027, -0.2063068002462387, -0.05086604133248329, -0.3758655786514282, 0.14212407171726227, -0.13642072677612305, -0.03166034817695618, -0.42543864250183105, 0.25964275002479553, -0.16920319199562073, -0.30194026231765747, 0.3180858790874481, -0.4044681787490845, 0.17799843847751617, 0.060763854533433914, 0.1787565052509308, 0.00400555320084095, -0.1559257209300995, 0.07209174335002899, 0.2029668688774109, 0.1648201048374176, 0.13967806100845337, 0.3797294497489929, -0.02621212601661682, -0.09722796082496643, -0.10739034414291382, 0.33126673102378845, 0.34939053654670715, 0.03802916035056114, -0.13879123330116272, 0.1757907271385193, 0.2256358116865158, -0.32513704895973206, -0.2828211188316345, -0.12963742017745972, -0.25700643658638, 0.2418893575668335, 0.009579531848430634, 0.2093762755393982, 0.1670224964618683, -0.07895486056804657, -0.20689696073532104, 0.098643459379673, 0.5504121780395508, -0.14517584443092346, 0.6776706576347351, 0.3272513151168823, -0.19930444657802582, 0.27027955651283264, 0.002087036147713661, 0.3459145128726959, 0.36188751459121704, -0.11960335820913315, 0.536824643611908, 0.23207449913024902, 0.24495413899421692, -0.133966863155365, -0.3090496063232422, 0.13521072268486023, -0.0015174299478530884, -0.013642989099025726, 0.1391918957233429, 0.06212903559207916, 0.44904252886772156, 0.005227912217378616, 0.07710173726081848, -0.32662978768348694, -0.12674954533576965, 0.029044203460216522, -0.08261632919311523, -0.04338546469807625, -0.11773930490016937, -0.07485173642635345, 0.1068684309720993, -0.37246638536453247, -0.1312440037727356, 0.3648233115673065, 0.0338449589908123, 0.1812082827091217, -0.44460779428482056, 0.20354139804840088, -0.1569175124168396, 0.21809864044189453, -0.239833265542984, 0.1747613251209259, 0.05008469894528389, -0.06679388880729675, 0.07139241695404053, 0.10168417543172836, 0.3679460287094116, 0.18524238467216492, -0.10660095512866974, -0.17309285700321198, -0.05663987621665001, -0.03850575536489487, -0.013906862586736679, -0.0869700089097023, 0.04141530394554138, -0.09860046207904816, 0.30176180601119995, 0.03081405721604824, -0.15572099387645721, -0.13875797390937805, -0.022854890674352646, -0.22427958250045776, -0.32634490728378296, -0.34533166885375977, -0.2006979137659073, -0.3282325863838196, -0.1295248121023178, -0.18956810235977173, -0.25364336371421814, 0.18352057039737701, 0.22793489694595337, -0.3133319914340973, -0.06755870580673218, 0.0006711401510983706, 0.0845005214214325, -0.5105265378952026, 0.6805163621902466, 0.4650323987007141, 0.5556751489639282, -0.32090654969215393, -0.11604468524456024, -0.4356548488140106, 0.06292129307985306, -0.6595270037651062, -0.04978837072849274, 0.29427123069763184, 0.39310985803604126, 0.1516687572002411, 0.21537776291370392, 0.16460812091827393, 0.13592588901519775, -0.19167523086071014, 0.32111218571662903, -0.530500590801239, -0.08094994723796844, -0.027506984770298004, 0.01697678491473198, -0.21761482954025269, -0.6412057876586914, 0.4145413339138031, -0.4362512528896332, 0.01961914449930191, -0.17953979969024658, -0.1805548518896103, 0.3991861045360565, 0.22178232669830322, 0.5155704021453857, 0.002279948443174362, 0.14303961396217346, 0.024066850543022156, -0.1811051368713379, -0.19200268387794495, -0.03763185814023018, 0.0861414223909378, 0.1762726753950119, -0.0916481614112854, 0.08704788982868195, 0.12938401103019714, -0.1807277500629425, 0.09440816193819046, 0.6064497828483582, -0.10337407141923904, 0.008501249365508556, 0.11393552273511887, -0.14100833237171173, -0.2004249095916748, 0.11038792133331299, -0.18586532771587372, -0.03389827907085419, -0.09858180582523346, -0.2373308390378952, -0.15887252986431122, -0.19998447597026825, 0.42357540130615234, -0.45981642603874207, 0.057306308299303055, -0.17736037075519562, 0.272293359041214, 0.2497566044330597, 0.35054415464401245, -0.19628754258155823, 0.02973061054944992, 0.31973591446876526, 0.0932115912437439, -0.043147310614585876, 0.23114584386348724, 0.1514274775981903, 0.11452256143093109, -0.07493724673986435, 0.391838401556015, -0.3036594092845917, -0.3066388666629791, -0.2293878197669983, -0.3594546914100647 ]
https://github.com/huggingface/datasets/issues/1803
Querying examples from big datasets is slower than small datasets
My workaround is to shard the dataset into splits in my ssd disk and feed the data in different training sessions. But it is a bit of a pain when we need to reload the last training session with the rest of the split with the Trainer in transformers. I mean, when I split the training and then reloads the model and optimizer, it not gets the correct global_status of the optimizer, so I need to hardcode some things. I'm planning to open an issue in transformers and think about it. ``` from datasets import load_dataset book_corpus = load_dataset("bookcorpus", split="train[:25%]") wikicorpus = load_dataset("wikicorpus", split="train[:25%]") openwebtext = load_dataset("openwebtext", split="train[:25%]") big_dataset = datasets.concatenate_datasets([wikicorpus, openwebtext, book_corpus]) big_dataset.shuffle(seed=42) big_dataset = big_dataset.map(encode, batched=True, num_proc=20, load_from_cache_file=True, writer_batch_size=5000) big_dataset.set_format(type='torch', columns=["text", "input_ids", "attention_mask", "token_type_ids"]) training_args = TrainingArguments( output_dir="./linear_bert", overwrite_output_dir=True, per_device_train_batch_size=71, save_steps=500, save_total_limit=10, logging_first_step=True, logging_steps=100, gradient_accumulation_steps=9, fp16=True, dataloader_num_workers=20, warmup_steps=24000, learning_rate=0.000545205002870214, adam_epsilon=1e-6, adam_beta2=0.98, weight_decay=0.01, max_steps=138974, # the total number of steps after concatenating 100% datasets max_grad_norm=1.0, ) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=big_dataset, tokenizer=tokenizer)) ``` I do one training pass with the total steps of this shard and I use len(bbig)/batchsize to stop the training (hardcoded in the trainer.py) when I pass over all the examples in this split. Now Im working, I will edit the comment with a more elaborated answer when I left the work.
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed.
218
Querying examples from big datasets is slower than small datasets After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed. My workaround is to shard the dataset into splits in my ssd disk and feed the data in different training sessions. But it is a bit of a pain when we need to reload the last training session with the rest of the split with the Trainer in transformers. I mean, when I split the training and then reloads the model and optimizer, it not gets the correct global_status of the optimizer, so I need to hardcode some things. I'm planning to open an issue in transformers and think about it. ``` from datasets import load_dataset book_corpus = load_dataset("bookcorpus", split="train[:25%]") wikicorpus = load_dataset("wikicorpus", split="train[:25%]") openwebtext = load_dataset("openwebtext", split="train[:25%]") big_dataset = datasets.concatenate_datasets([wikicorpus, openwebtext, book_corpus]) big_dataset.shuffle(seed=42) big_dataset = big_dataset.map(encode, batched=True, num_proc=20, load_from_cache_file=True, writer_batch_size=5000) big_dataset.set_format(type='torch', columns=["text", "input_ids", "attention_mask", "token_type_ids"]) training_args = TrainingArguments( output_dir="./linear_bert", overwrite_output_dir=True, per_device_train_batch_size=71, save_steps=500, save_total_limit=10, logging_first_step=True, logging_steps=100, gradient_accumulation_steps=9, fp16=True, dataloader_num_workers=20, warmup_steps=24000, learning_rate=0.000545205002870214, adam_epsilon=1e-6, adam_beta2=0.98, weight_decay=0.01, max_steps=138974, # the total number of steps after concatenating 100% datasets max_grad_norm=1.0, ) trainer = Trainer( model=model, args=training_args, data_collator=data_collator, train_dataset=big_dataset, tokenizer=tokenizer)) ``` I do one training pass with the total steps of this shard and I use len(bbig)/batchsize to stop the training (hardcoded in the trainer.py) when I pass over all the examples in this split. Now Im working, I will edit the comment with a more elaborated answer when I left the work.
[ -0.40549367666244507, 0.058644503355026245, -0.07997141778469086, 0.13153207302093506, -0.07969391345977783, -0.17769165337085724, 0.24417486786842346, 0.491809219121933, -0.23139935731887817, 0.18019406497478485, 0.08149364590644836, 0.05508897826075554, 0.12508602440357208, -0.10075697302818298, 0.1307257115840912, -0.2734062373638153, 0.08074145019054413, 0.124845951795578, -0.07513222098350525, -0.034528665244579315, 0.024029985070228577, -0.19028697907924652, -0.34862685203552246, 0.018470607697963715, -0.0663272887468338, -0.22407233715057373, -0.23070675134658813, 0.10720640420913696, -0.1658501923084259, -0.4173947870731354, -0.05953645706176758, -0.1528192162513733, 0.22992980480194092, 0.42703086137771606, -0.0001130733362515457, 0.016405127942562103, 0.22793084383010864, 0.08941785991191864, -0.1997472047805786, 0.18293417990207672, 0.174807608127594, -0.28385433554649353, 0.08687453716993332, -0.4097662568092346, -0.04715360701084137, -0.2971976697444916, 0.09342829883098602, 0.018900983035564423, -0.04125356674194336, 0.3089761734008789, 0.1403641402721405, 0.5131545066833496, -0.19170476496219635, -0.13366346061229706, 0.6230676770210266, 0.20515218377113342, -0.3506300747394562, 0.5299633741378784, 0.5806368589401245, -0.04879993200302124, -0.30531546473503113, 0.13614049553871155, -0.08144386857748032, 0.270141065120697, 0.037022218108177185, 0.19797320663928986, -0.11280500143766403, 0.17959190905094147, 0.12381015717983246, 0.4088888466358185, 0.3083902597427368, -0.08939183503389359, -0.31488633155822754, -0.292018324136734, -0.05692818760871887, -0.23329347372055054, 0.020307470113039017, 0.32641905546188354, -0.2583792805671692, 0.2713424861431122, -0.3137761652469635, 0.15477785468101501, -0.10565067827701569, 0.17955198884010315, -0.1511588990688324, -0.06861545145511627, 0.11505104601383209, 0.19851043820381165, 0.09379580616950989, 0.01331334002315998, 0.15119317173957825, -0.16962099075317383, 0.02840580604970455, -0.052110880613327026, -0.28830358386039734, -0.08815446496009827, 0.15566331148147583, 0.1755785048007965, 0.2685060501098633, 0.1593102663755417, 0.4223208725452423, 0.1182836964726448, 0.2651940584182739, 0.09436231851577759, 0.0451355017721653, -0.009021572768688202, -0.26956453919410706, -0.000978325493633747, 0.3478800058364868, 0.2753004729747772, -0.294515997171402, 0.020878134295344353, -0.23832127451896667, -0.1844540387392044, 0.1815628558397293, -0.19732993841171265, -0.027453839778900146, -0.13371698558330536, 0.0043225716799497604, -0.08730419725179672, -0.3421141505241394, -0.12782250344753265, -0.026557791978120804, 0.4784686267375946, -0.18346565961837769, -0.02657211199402809, -0.2126668095588684, 0.12222354859113693, -0.3353424370288849, -0.25402504205703735, -0.12431216984987259, -0.18833579123020172, -0.16008037328720093, 0.2303076833486557, 0.10979531705379486, 0.05609758570790291, 0.3020736277103424, 0.058540500700473785, -0.19851483404636383, 0.241962730884552, 0.3923720121383667, -0.1808657944202423, 0.10445661842823029, 0.01975494995713234, 0.011255607008934021, 0.06353175640106201, -0.16374002397060394, 0.244764044880867, -0.39108967781066895, 0.19727066159248352, -0.195356547832489, -0.3384781777858734, 0.030639247968792915, 0.0919933021068573, -0.10569529980421066, -0.09976005554199219, -0.22708028554916382, 0.24624565243721008, -0.06942235678434372, -0.19974613189697266, -0.07743745297193527, -0.09419386088848114, 0.04028991237282753, -0.15313293039798737, 0.14130058884620667, 0.07762692868709564, -0.2506592571735382, 0.20185056328773499, -0.04518630728125572, 0.3970344066619873, 0.2543899118900299, 0.5308362245559692, -0.503103494644165, 0.16236114501953125, -0.13277849555015564, 0.29661595821380615, 0.2320234179496765, -0.0281321220099926, -0.6667605042457581, 0.4973525106906891, -0.004258058965206146, 0.02418888546526432, 0.2724839746952057, 0.16171206533908844, 0.35167786478996277, 0.10784871876239777, -0.049062833189964294, 0.38371187448501587, 0.18394817411899567, 0.22793066501617432, -0.34009987115859985, -0.23031024634838104, -0.04872759431600571, 0.3479747474193573, -0.3244733512401581, -0.15712156891822815, 0.31125104427337646, -0.36459729075431824, 0.49065926671028137, -0.20656412839889526, -0.18362656235694885, 0.2509782910346985, 0.08702355623245239, -0.27774596214294434, 0.11834852397441864, 0.09648793190717697, 0.08594328165054321, 0.24217668175697327, -0.1894872933626175, -0.018464647233486176, 0.04509012773633003, -0.18880893290042877, -0.07221531122922897, 0.06196317821741104, -0.055260349065065384, -0.04738571122288704, -0.04489725083112717, -0.09183025360107422, 0.3306869566440582, -0.003531353548169136, 0.16473349928855896, -0.16320621967315674, -0.2693369388580322, -0.009445670992136002, -0.26261836290359497, 0.0792929157614708, 0.09506809711456299, -0.12131048738956451, 0.009306356310844421, -0.24925285577774048, -0.0884237065911293, -0.0017331305425614119, -0.15193679928779602, 0.3275279402732849, 0.1502290964126587, 0.1502474844455719, 0.22353103756904602, 0.15224765241146088, 0.14195680618286133, -0.08493109047412872, 0.38797441124916077, 0.29686665534973145, 0.07531566917896271, 0.03652630001306534, -0.4053478538990021, 0.5263329148292542, 0.39331328868865967, 0.31605473160743713, 0.29040318727493286, -0.3733903765678406, 0.16444434225559235, 0.04837924614548683, 0.11050213873386383, 0.41063863039016724, 0.2937985956668854, 0.2421559989452362, 0.5489550828933716, 0.16632583737373352, -0.3161974549293518, 0.11558247357606888, 0.4506141245365143, -0.2496013641357422, 0.018042240291833878, 0.18730425834655762, -0.42171287536621094, -0.18561744689941406, 0.37021583318710327, -0.1509695053100586, 0.32658013701438904, 0.33125314116477966, 0.16064414381980896, -0.1239553764462471, 0.027442894876003265, -0.2904404401779175, 0.26255002617836, 0.09679454565048218, 0.14140845835208893, -0.2201085090637207, 0.4368427097797394, -0.09200569242238998, -0.24601101875305176, -0.38159817457199097, -0.0392078198492527, 0.19213195145130157, -0.12640096247196198, 0.30729901790618896, -0.0982983335852623, 0.053619153797626495, -0.03245113044977188, 0.13080070912837982, 0.07907233387231827, -0.08653527498245239, 0.045039016753435135, 0.19354063272476196, -0.18121057748794556, -0.1583382487297058, -0.055191293358802795, 0.22789597511291504, 0.26178810000419617, -0.20876112580299377, -0.0017746277153491974, -0.0716872587800026, -0.3983876407146454, 0.08031298220157623, 0.2775994539260864, 0.1493917554616928, 0.14504538476467133, -0.04691782593727112, -0.18544796109199524, -0.28017380833625793, -0.3152386546134949, -0.0065731629729270935, 0.07990692555904388, 0.2866186201572418, -0.07090029120445251, 0.07639451324939728, -0.3244525194168091, -0.1447664052248001, 0.0637100338935852, -0.23291027545928955, -0.1513255387544632, 0.27600738406181335, -0.18074728548526764, 0.0008986307657323778, 0.08878308534622192, -0.3163755536079407, -0.1673077940940857, -0.30017706751823425, 0.3784308433532715, 0.17276118695735931, 0.20834563672542572, 0.10755542665719986, 0.3943435549736023, 0.1223713606595993, 0.009659772738814354, 0.12281908839941025, 0.037916772067546844, -0.4149511158466339, 0.519088089466095, -0.18026375770568848, -0.45006418228149414, -0.4888223111629486, -0.24293062090873718, -0.16414868831634521, 0.4524995684623718, -0.5341605544090271, -0.031146589666604996, -0.5311311483383179, 0.41277632117271423, 0.12353938817977905, 0.10216754674911499, 0.04960323125123978, -0.21315725147724152, -0.2089555859565735, 0.12922963500022888, 0.08261796832084656, -0.006418675184249878, -0.08785057067871094, 0.20213806629180908, -0.061521224677562714, 0.03371110185980797, -0.009868493303656578, 0.7692424058914185, 0.06894397735595703, -0.012904908508062363, 0.263535737991333, -0.09490318596363068, 0.05190650001168251, -0.16474509239196777, 0.14588795602321625, 0.09050392359495163, -0.2608802020549774, -0.2699277400970459, 0.4183902144432068, 0.16414737701416016, -0.3080245852470398, 0.05913437902927399, -0.18512959778308868, -0.09765896946191788, -0.2781834006309509, 0.2541959881782532, 0.15882492065429688, 0.17439839243888855, 0.06986100971698761, 0.3926577568054199, -0.3018999695777893, -0.13592663407325745, 0.07070943713188171, -0.25781458616256714, 0.02017316222190857, -0.11698358505964279, -0.3373413383960724, -0.059714991599321365, -0.684593141078949, 0.20213952660560608, -0.06980440765619278, 0.03913889452815056, 0.2540455460548401, -0.3021760880947113, 0.2348044067621231, -0.06626403331756592, 0.5487109422683716, 0.19057194888591766, -0.19964441657066345, -0.11521820724010468, -0.2325005978345871, -0.42478930950164795, -0.15542373061180115, -0.49562618136405945, 0.11365188658237457, -0.0005395635962486267, 0.33458149433135986, -0.3185562193393707, 0.11183632165193558, 0.00006049498915672302, 0.3112281262874603, 0.19164972007274628, -0.04427860304713249, -0.16765469312667847, -0.2823411822319031, -0.13252335786819458, 0.16237764060497284, -0.19951477646827698, 0.05044970288872719, -0.26943451166152954, -0.169610857963562, -0.1472621113061905, 0.1772928237915039, 0.11681999266147614, 0.4819425642490387, 0.2846928536891937, -0.4382571578025818, 0.36333411931991577, 0.02722485363483429, 0.1518045961856842, 0.3828197121620178, 0.40001922845840454, 0.32248786091804504, -0.12357711791992188, 0.19988873600959778, 0.10222860425710678, 0.07479631900787354, 0.5333117246627808, -0.001265170518308878, 0.19727258384227753, 0.06110768765211105, 0.2763022184371948, -0.056448791176080704, 0.08236680924892426, 0.3274202048778534, -0.08233878761529922, -0.06249767541885376, -0.316829115152359, 0.7024027109146118, 0.09989838302135468, 0.008582472801208496, 0.23552851378917694, -0.1901874989271164, 0.13044320046901703, 0.30139464139938354, -0.10220619291067123, 0.9143378138542175, -0.12508805096149445, 0.2525980770587921, 0.349473774433136, 0.06673100590705872, 0.007589620538055897, -0.0959177166223526, 0.1510164886713028, -0.31350284814834595, -0.23164929449558258, 0.1761050671339035, -0.2805035710334778, 0.08492116630077362, 0.21285951137542725, -0.13127481937408447, 0.08628800511360168, -0.05373178794980049, 0.19904311001300812, -0.22586047649383545, 0.23925131559371948, -0.2529607117176056, -0.05109252408146858, -0.435341477394104, 0.028821062296628952, 0.0972895622253418, -0.06465215981006622, 0.08860572427511215, -0.14536935091018677, -0.5541805624961853, 0.010253485292196274, -0.09387645125389099, 0.038914747536182404, -0.2355804294347763, 0.16329807043075562, 0.059376370161771774, -0.47716158628463745, -0.08425377309322357, 0.12125369906425476, -0.4953686594963074, 0.07895474135875702, -0.24581170082092285, 0.41740965843200684, 0.04354551061987877, 0.23015880584716797, 0.5308087468147278, -0.3330541253089905, -0.008719535544514656, -0.029219064861536026, -0.21656781435012817, 0.24954074621200562, -0.15398955345153809, -0.2520103454589844, 0.02528531849384308, 0.14373070001602173, 0.3611818552017212, -0.16750192642211914, -0.27764585614204407, -0.12400461733341217, -0.44087374210357666, -0.2431265413761139, 0.08413772284984589, -0.042736947536468506, 0.08555810898542404, 0.2314760982990265, 0.3174692988395691, -0.35499292612075806, -0.2242874652147293, 0.37099969387054443, 0.09431253373622894, 0.2603204548358917, 0.31308677792549133, 0.08809581398963928, -0.21637548506259918, -0.12743738293647766, 0.29655349254608154, 0.41114309430122375, -0.4757106304168701, 0.06908169388771057, 0.013951177708804607, 0.12462691962718964, 0.24618001282215118, 0.018209662288427353, 0.07419745624065399, -0.25699007511138916, -0.33867958188056946, -0.06908656656742096, 0.009943997487425804, 0.32786786556243896, 0.12076172232627869, 0.13579605519771576, 0.057691335678100586, -0.014596251770853996, -0.3653215765953064, 0.014248049817979336, -0.2701687812805176, 0.1390894055366516, -0.02432269975543022, 0.18286335468292236, -0.43158963322639465, 0.01740933582186699, 0.008137536235153675, 0.1431652456521988, 0.10916264355182648, 0.10638198256492615, -0.12343858182430267, -0.21664738655090332, 0.029185544699430466, 0.1290723979473114, -0.13618791103363037, -0.27971911430358887, 0.23944316804409027, -0.2063068002462387, -0.05086604133248329, -0.3758655786514282, 0.14212407171726227, -0.13642072677612305, -0.03166034817695618, -0.42543864250183105, 0.25964275002479553, -0.16920319199562073, -0.30194026231765747, 0.3180858790874481, -0.4044681787490845, 0.17799843847751617, 0.060763854533433914, 0.1787565052509308, 0.00400555320084095, -0.1559257209300995, 0.07209174335002899, 0.2029668688774109, 0.1648201048374176, 0.13967806100845337, 0.3797294497489929, -0.02621212601661682, -0.09722796082496643, -0.10739034414291382, 0.33126673102378845, 0.34939053654670715, 0.03802916035056114, -0.13879123330116272, 0.1757907271385193, 0.2256358116865158, -0.32513704895973206, -0.2828211188316345, -0.12963742017745972, -0.25700643658638, 0.2418893575668335, 0.009579531848430634, 0.2093762755393982, 0.1670224964618683, -0.07895486056804657, -0.20689696073532104, 0.098643459379673, 0.5504121780395508, -0.14517584443092346, 0.6776706576347351, 0.3272513151168823, -0.19930444657802582, 0.27027955651283264, 0.002087036147713661, 0.3459145128726959, 0.36188751459121704, -0.11960335820913315, 0.536824643611908, 0.23207449913024902, 0.24495413899421692, -0.133966863155365, -0.3090496063232422, 0.13521072268486023, -0.0015174299478530884, -0.013642989099025726, 0.1391918957233429, 0.06212903559207916, 0.44904252886772156, 0.005227912217378616, 0.07710173726081848, -0.32662978768348694, -0.12674954533576965, 0.029044203460216522, -0.08261632919311523, -0.04338546469807625, -0.11773930490016937, -0.07485173642635345, 0.1068684309720993, -0.37246638536453247, -0.1312440037727356, 0.3648233115673065, 0.0338449589908123, 0.1812082827091217, -0.44460779428482056, 0.20354139804840088, -0.1569175124168396, 0.21809864044189453, -0.239833265542984, 0.1747613251209259, 0.05008469894528389, -0.06679388880729675, 0.07139241695404053, 0.10168417543172836, 0.3679460287094116, 0.18524238467216492, -0.10660095512866974, -0.17309285700321198, -0.05663987621665001, -0.03850575536489487, -0.013906862586736679, -0.0869700089097023, 0.04141530394554138, -0.09860046207904816, 0.30176180601119995, 0.03081405721604824, -0.15572099387645721, -0.13875797390937805, -0.022854890674352646, -0.22427958250045776, -0.32634490728378296, -0.34533166885375977, -0.2006979137659073, -0.3282325863838196, -0.1295248121023178, -0.18956810235977173, -0.25364336371421814, 0.18352057039737701, 0.22793489694595337, -0.3133319914340973, -0.06755870580673218, 0.0006711401510983706, 0.0845005214214325, -0.5105265378952026, 0.6805163621902466, 0.4650323987007141, 0.5556751489639282, -0.32090654969215393, -0.11604468524456024, -0.4356548488140106, 0.06292129307985306, -0.6595270037651062, -0.04978837072849274, 0.29427123069763184, 0.39310985803604126, 0.1516687572002411, 0.21537776291370392, 0.16460812091827393, 0.13592588901519775, -0.19167523086071014, 0.32111218571662903, -0.530500590801239, -0.08094994723796844, -0.027506984770298004, 0.01697678491473198, -0.21761482954025269, -0.6412057876586914, 0.4145413339138031, -0.4362512528896332, 0.01961914449930191, -0.17953979969024658, -0.1805548518896103, 0.3991861045360565, 0.22178232669830322, 0.5155704021453857, 0.002279948443174362, 0.14303961396217346, 0.024066850543022156, -0.1811051368713379, -0.19200268387794495, -0.03763185814023018, 0.0861414223909378, 0.1762726753950119, -0.0916481614112854, 0.08704788982868195, 0.12938401103019714, -0.1807277500629425, 0.09440816193819046, 0.6064497828483582, -0.10337407141923904, 0.008501249365508556, 0.11393552273511887, -0.14100833237171173, -0.2004249095916748, 0.11038792133331299, -0.18586532771587372, -0.03389827907085419, -0.09858180582523346, -0.2373308390378952, -0.15887252986431122, -0.19998447597026825, 0.42357540130615234, -0.45981642603874207, 0.057306308299303055, -0.17736037075519562, 0.272293359041214, 0.2497566044330597, 0.35054415464401245, -0.19628754258155823, 0.02973061054944992, 0.31973591446876526, 0.0932115912437439, -0.043147310614585876, 0.23114584386348724, 0.1514274775981903, 0.11452256143093109, -0.07493724673986435, 0.391838401556015, -0.3036594092845917, -0.3066388666629791, -0.2293878197669983, -0.3594546914100647 ]
https://github.com/huggingface/datasets/issues/1803
Querying examples from big datasets is slower than small datasets
I just tested and using the Arrow File format doesn't improve the speed... This will need further investigation. My guess is that it has to iterate over the record batches or chunks of a ChunkedArray in order to retrieve elements. However if we know in advance in which chunk the element is, and at what index it is, then we can access it instantaneously. But this requires dealing with the chunked arrays instead of the pyarrow Table directly which is not practical.
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed.
82
Querying examples from big datasets is slower than small datasets After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed. I just tested and using the Arrow File format doesn't improve the speed... This will need further investigation. My guess is that it has to iterate over the record batches or chunks of a ChunkedArray in order to retrieve elements. However if we know in advance in which chunk the element is, and at what index it is, then we can access it instantaneously. But this requires dealing with the chunked arrays instead of the pyarrow Table directly which is not practical.
[ -0.40549367666244507, 0.058644503355026245, -0.07997141778469086, 0.13153207302093506, -0.07969391345977783, -0.17769165337085724, 0.24417486786842346, 0.491809219121933, -0.23139935731887817, 0.18019406497478485, 0.08149364590644836, 0.05508897826075554, 0.12508602440357208, -0.10075697302818298, 0.1307257115840912, -0.2734062373638153, 0.08074145019054413, 0.124845951795578, -0.07513222098350525, -0.034528665244579315, 0.024029985070228577, -0.19028697907924652, -0.34862685203552246, 0.018470607697963715, -0.0663272887468338, -0.22407233715057373, -0.23070675134658813, 0.10720640420913696, -0.1658501923084259, -0.4173947870731354, -0.05953645706176758, -0.1528192162513733, 0.22992980480194092, 0.42703086137771606, -0.0001130733362515457, 0.016405127942562103, 0.22793084383010864, 0.08941785991191864, -0.1997472047805786, 0.18293417990207672, 0.174807608127594, -0.28385433554649353, 0.08687453716993332, -0.4097662568092346, -0.04715360701084137, -0.2971976697444916, 0.09342829883098602, 0.018900983035564423, -0.04125356674194336, 0.3089761734008789, 0.1403641402721405, 0.5131545066833496, -0.19170476496219635, -0.13366346061229706, 0.6230676770210266, 0.20515218377113342, -0.3506300747394562, 0.5299633741378784, 0.5806368589401245, -0.04879993200302124, -0.30531546473503113, 0.13614049553871155, -0.08144386857748032, 0.270141065120697, 0.037022218108177185, 0.19797320663928986, -0.11280500143766403, 0.17959190905094147, 0.12381015717983246, 0.4088888466358185, 0.3083902597427368, -0.08939183503389359, -0.31488633155822754, -0.292018324136734, -0.05692818760871887, -0.23329347372055054, 0.020307470113039017, 0.32641905546188354, -0.2583792805671692, 0.2713424861431122, -0.3137761652469635, 0.15477785468101501, -0.10565067827701569, 0.17955198884010315, -0.1511588990688324, -0.06861545145511627, 0.11505104601383209, 0.19851043820381165, 0.09379580616950989, 0.01331334002315998, 0.15119317173957825, -0.16962099075317383, 0.02840580604970455, -0.052110880613327026, -0.28830358386039734, -0.08815446496009827, 0.15566331148147583, 0.1755785048007965, 0.2685060501098633, 0.1593102663755417, 0.4223208725452423, 0.1182836964726448, 0.2651940584182739, 0.09436231851577759, 0.0451355017721653, -0.009021572768688202, -0.26956453919410706, -0.000978325493633747, 0.3478800058364868, 0.2753004729747772, -0.294515997171402, 0.020878134295344353, -0.23832127451896667, -0.1844540387392044, 0.1815628558397293, -0.19732993841171265, -0.027453839778900146, -0.13371698558330536, 0.0043225716799497604, -0.08730419725179672, -0.3421141505241394, -0.12782250344753265, -0.026557791978120804, 0.4784686267375946, -0.18346565961837769, -0.02657211199402809, -0.2126668095588684, 0.12222354859113693, -0.3353424370288849, -0.25402504205703735, -0.12431216984987259, -0.18833579123020172, -0.16008037328720093, 0.2303076833486557, 0.10979531705379486, 0.05609758570790291, 0.3020736277103424, 0.058540500700473785, -0.19851483404636383, 0.241962730884552, 0.3923720121383667, -0.1808657944202423, 0.10445661842823029, 0.01975494995713234, 0.011255607008934021, 0.06353175640106201, -0.16374002397060394, 0.244764044880867, -0.39108967781066895, 0.19727066159248352, -0.195356547832489, -0.3384781777858734, 0.030639247968792915, 0.0919933021068573, -0.10569529980421066, -0.09976005554199219, -0.22708028554916382, 0.24624565243721008, -0.06942235678434372, -0.19974613189697266, -0.07743745297193527, -0.09419386088848114, 0.04028991237282753, -0.15313293039798737, 0.14130058884620667, 0.07762692868709564, -0.2506592571735382, 0.20185056328773499, -0.04518630728125572, 0.3970344066619873, 0.2543899118900299, 0.5308362245559692, -0.503103494644165, 0.16236114501953125, -0.13277849555015564, 0.29661595821380615, 0.2320234179496765, -0.0281321220099926, -0.6667605042457581, 0.4973525106906891, -0.004258058965206146, 0.02418888546526432, 0.2724839746952057, 0.16171206533908844, 0.35167786478996277, 0.10784871876239777, -0.049062833189964294, 0.38371187448501587, 0.18394817411899567, 0.22793066501617432, -0.34009987115859985, -0.23031024634838104, -0.04872759431600571, 0.3479747474193573, -0.3244733512401581, -0.15712156891822815, 0.31125104427337646, -0.36459729075431824, 0.49065926671028137, -0.20656412839889526, -0.18362656235694885, 0.2509782910346985, 0.08702355623245239, -0.27774596214294434, 0.11834852397441864, 0.09648793190717697, 0.08594328165054321, 0.24217668175697327, -0.1894872933626175, -0.018464647233486176, 0.04509012773633003, -0.18880893290042877, -0.07221531122922897, 0.06196317821741104, -0.055260349065065384, -0.04738571122288704, -0.04489725083112717, -0.09183025360107422, 0.3306869566440582, -0.003531353548169136, 0.16473349928855896, -0.16320621967315674, -0.2693369388580322, -0.009445670992136002, -0.26261836290359497, 0.0792929157614708, 0.09506809711456299, -0.12131048738956451, 0.009306356310844421, -0.24925285577774048, -0.0884237065911293, -0.0017331305425614119, -0.15193679928779602, 0.3275279402732849, 0.1502290964126587, 0.1502474844455719, 0.22353103756904602, 0.15224765241146088, 0.14195680618286133, -0.08493109047412872, 0.38797441124916077, 0.29686665534973145, 0.07531566917896271, 0.03652630001306534, -0.4053478538990021, 0.5263329148292542, 0.39331328868865967, 0.31605473160743713, 0.29040318727493286, -0.3733903765678406, 0.16444434225559235, 0.04837924614548683, 0.11050213873386383, 0.41063863039016724, 0.2937985956668854, 0.2421559989452362, 0.5489550828933716, 0.16632583737373352, -0.3161974549293518, 0.11558247357606888, 0.4506141245365143, -0.2496013641357422, 0.018042240291833878, 0.18730425834655762, -0.42171287536621094, -0.18561744689941406, 0.37021583318710327, -0.1509695053100586, 0.32658013701438904, 0.33125314116477966, 0.16064414381980896, -0.1239553764462471, 0.027442894876003265, -0.2904404401779175, 0.26255002617836, 0.09679454565048218, 0.14140845835208893, -0.2201085090637207, 0.4368427097797394, -0.09200569242238998, -0.24601101875305176, -0.38159817457199097, -0.0392078198492527, 0.19213195145130157, -0.12640096247196198, 0.30729901790618896, -0.0982983335852623, 0.053619153797626495, -0.03245113044977188, 0.13080070912837982, 0.07907233387231827, -0.08653527498245239, 0.045039016753435135, 0.19354063272476196, -0.18121057748794556, -0.1583382487297058, -0.055191293358802795, 0.22789597511291504, 0.26178810000419617, -0.20876112580299377, -0.0017746277153491974, -0.0716872587800026, -0.3983876407146454, 0.08031298220157623, 0.2775994539260864, 0.1493917554616928, 0.14504538476467133, -0.04691782593727112, -0.18544796109199524, -0.28017380833625793, -0.3152386546134949, -0.0065731629729270935, 0.07990692555904388, 0.2866186201572418, -0.07090029120445251, 0.07639451324939728, -0.3244525194168091, -0.1447664052248001, 0.0637100338935852, -0.23291027545928955, -0.1513255387544632, 0.27600738406181335, -0.18074728548526764, 0.0008986307657323778, 0.08878308534622192, -0.3163755536079407, -0.1673077940940857, -0.30017706751823425, 0.3784308433532715, 0.17276118695735931, 0.20834563672542572, 0.10755542665719986, 0.3943435549736023, 0.1223713606595993, 0.009659772738814354, 0.12281908839941025, 0.037916772067546844, -0.4149511158466339, 0.519088089466095, -0.18026375770568848, -0.45006418228149414, -0.4888223111629486, -0.24293062090873718, -0.16414868831634521, 0.4524995684623718, -0.5341605544090271, -0.031146589666604996, -0.5311311483383179, 0.41277632117271423, 0.12353938817977905, 0.10216754674911499, 0.04960323125123978, -0.21315725147724152, -0.2089555859565735, 0.12922963500022888, 0.08261796832084656, -0.006418675184249878, -0.08785057067871094, 0.20213806629180908, -0.061521224677562714, 0.03371110185980797, -0.009868493303656578, 0.7692424058914185, 0.06894397735595703, -0.012904908508062363, 0.263535737991333, -0.09490318596363068, 0.05190650001168251, -0.16474509239196777, 0.14588795602321625, 0.09050392359495163, -0.2608802020549774, -0.2699277400970459, 0.4183902144432068, 0.16414737701416016, -0.3080245852470398, 0.05913437902927399, -0.18512959778308868, -0.09765896946191788, -0.2781834006309509, 0.2541959881782532, 0.15882492065429688, 0.17439839243888855, 0.06986100971698761, 0.3926577568054199, -0.3018999695777893, -0.13592663407325745, 0.07070943713188171, -0.25781458616256714, 0.02017316222190857, -0.11698358505964279, -0.3373413383960724, -0.059714991599321365, -0.684593141078949, 0.20213952660560608, -0.06980440765619278, 0.03913889452815056, 0.2540455460548401, -0.3021760880947113, 0.2348044067621231, -0.06626403331756592, 0.5487109422683716, 0.19057194888591766, -0.19964441657066345, -0.11521820724010468, -0.2325005978345871, -0.42478930950164795, -0.15542373061180115, -0.49562618136405945, 0.11365188658237457, -0.0005395635962486267, 0.33458149433135986, -0.3185562193393707, 0.11183632165193558, 0.00006049498915672302, 0.3112281262874603, 0.19164972007274628, -0.04427860304713249, -0.16765469312667847, -0.2823411822319031, -0.13252335786819458, 0.16237764060497284, -0.19951477646827698, 0.05044970288872719, -0.26943451166152954, -0.169610857963562, -0.1472621113061905, 0.1772928237915039, 0.11681999266147614, 0.4819425642490387, 0.2846928536891937, -0.4382571578025818, 0.36333411931991577, 0.02722485363483429, 0.1518045961856842, 0.3828197121620178, 0.40001922845840454, 0.32248786091804504, -0.12357711791992188, 0.19988873600959778, 0.10222860425710678, 0.07479631900787354, 0.5333117246627808, -0.001265170518308878, 0.19727258384227753, 0.06110768765211105, 0.2763022184371948, -0.056448791176080704, 0.08236680924892426, 0.3274202048778534, -0.08233878761529922, -0.06249767541885376, -0.316829115152359, 0.7024027109146118, 0.09989838302135468, 0.008582472801208496, 0.23552851378917694, -0.1901874989271164, 0.13044320046901703, 0.30139464139938354, -0.10220619291067123, 0.9143378138542175, -0.12508805096149445, 0.2525980770587921, 0.349473774433136, 0.06673100590705872, 0.007589620538055897, -0.0959177166223526, 0.1510164886713028, -0.31350284814834595, -0.23164929449558258, 0.1761050671339035, -0.2805035710334778, 0.08492116630077362, 0.21285951137542725, -0.13127481937408447, 0.08628800511360168, -0.05373178794980049, 0.19904311001300812, -0.22586047649383545, 0.23925131559371948, -0.2529607117176056, -0.05109252408146858, -0.435341477394104, 0.028821062296628952, 0.0972895622253418, -0.06465215981006622, 0.08860572427511215, -0.14536935091018677, -0.5541805624961853, 0.010253485292196274, -0.09387645125389099, 0.038914747536182404, -0.2355804294347763, 0.16329807043075562, 0.059376370161771774, -0.47716158628463745, -0.08425377309322357, 0.12125369906425476, -0.4953686594963074, 0.07895474135875702, -0.24581170082092285, 0.41740965843200684, 0.04354551061987877, 0.23015880584716797, 0.5308087468147278, -0.3330541253089905, -0.008719535544514656, -0.029219064861536026, -0.21656781435012817, 0.24954074621200562, -0.15398955345153809, -0.2520103454589844, 0.02528531849384308, 0.14373070001602173, 0.3611818552017212, -0.16750192642211914, -0.27764585614204407, -0.12400461733341217, -0.44087374210357666, -0.2431265413761139, 0.08413772284984589, -0.042736947536468506, 0.08555810898542404, 0.2314760982990265, 0.3174692988395691, -0.35499292612075806, -0.2242874652147293, 0.37099969387054443, 0.09431253373622894, 0.2603204548358917, 0.31308677792549133, 0.08809581398963928, -0.21637548506259918, -0.12743738293647766, 0.29655349254608154, 0.41114309430122375, -0.4757106304168701, 0.06908169388771057, 0.013951177708804607, 0.12462691962718964, 0.24618001282215118, 0.018209662288427353, 0.07419745624065399, -0.25699007511138916, -0.33867958188056946, -0.06908656656742096, 0.009943997487425804, 0.32786786556243896, 0.12076172232627869, 0.13579605519771576, 0.057691335678100586, -0.014596251770853996, -0.3653215765953064, 0.014248049817979336, -0.2701687812805176, 0.1390894055366516, -0.02432269975543022, 0.18286335468292236, -0.43158963322639465, 0.01740933582186699, 0.008137536235153675, 0.1431652456521988, 0.10916264355182648, 0.10638198256492615, -0.12343858182430267, -0.21664738655090332, 0.029185544699430466, 0.1290723979473114, -0.13618791103363037, -0.27971911430358887, 0.23944316804409027, -0.2063068002462387, -0.05086604133248329, -0.3758655786514282, 0.14212407171726227, -0.13642072677612305, -0.03166034817695618, -0.42543864250183105, 0.25964275002479553, -0.16920319199562073, -0.30194026231765747, 0.3180858790874481, -0.4044681787490845, 0.17799843847751617, 0.060763854533433914, 0.1787565052509308, 0.00400555320084095, -0.1559257209300995, 0.07209174335002899, 0.2029668688774109, 0.1648201048374176, 0.13967806100845337, 0.3797294497489929, -0.02621212601661682, -0.09722796082496643, -0.10739034414291382, 0.33126673102378845, 0.34939053654670715, 0.03802916035056114, -0.13879123330116272, 0.1757907271385193, 0.2256358116865158, -0.32513704895973206, -0.2828211188316345, -0.12963742017745972, -0.25700643658638, 0.2418893575668335, 0.009579531848430634, 0.2093762755393982, 0.1670224964618683, -0.07895486056804657, -0.20689696073532104, 0.098643459379673, 0.5504121780395508, -0.14517584443092346, 0.6776706576347351, 0.3272513151168823, -0.19930444657802582, 0.27027955651283264, 0.002087036147713661, 0.3459145128726959, 0.36188751459121704, -0.11960335820913315, 0.536824643611908, 0.23207449913024902, 0.24495413899421692, -0.133966863155365, -0.3090496063232422, 0.13521072268486023, -0.0015174299478530884, -0.013642989099025726, 0.1391918957233429, 0.06212903559207916, 0.44904252886772156, 0.005227912217378616, 0.07710173726081848, -0.32662978768348694, -0.12674954533576965, 0.029044203460216522, -0.08261632919311523, -0.04338546469807625, -0.11773930490016937, -0.07485173642635345, 0.1068684309720993, -0.37246638536453247, -0.1312440037727356, 0.3648233115673065, 0.0338449589908123, 0.1812082827091217, -0.44460779428482056, 0.20354139804840088, -0.1569175124168396, 0.21809864044189453, -0.239833265542984, 0.1747613251209259, 0.05008469894528389, -0.06679388880729675, 0.07139241695404053, 0.10168417543172836, 0.3679460287094116, 0.18524238467216492, -0.10660095512866974, -0.17309285700321198, -0.05663987621665001, -0.03850575536489487, -0.013906862586736679, -0.0869700089097023, 0.04141530394554138, -0.09860046207904816, 0.30176180601119995, 0.03081405721604824, -0.15572099387645721, -0.13875797390937805, -0.022854890674352646, -0.22427958250045776, -0.32634490728378296, -0.34533166885375977, -0.2006979137659073, -0.3282325863838196, -0.1295248121023178, -0.18956810235977173, -0.25364336371421814, 0.18352057039737701, 0.22793489694595337, -0.3133319914340973, -0.06755870580673218, 0.0006711401510983706, 0.0845005214214325, -0.5105265378952026, 0.6805163621902466, 0.4650323987007141, 0.5556751489639282, -0.32090654969215393, -0.11604468524456024, -0.4356548488140106, 0.06292129307985306, -0.6595270037651062, -0.04978837072849274, 0.29427123069763184, 0.39310985803604126, 0.1516687572002411, 0.21537776291370392, 0.16460812091827393, 0.13592588901519775, -0.19167523086071014, 0.32111218571662903, -0.530500590801239, -0.08094994723796844, -0.027506984770298004, 0.01697678491473198, -0.21761482954025269, -0.6412057876586914, 0.4145413339138031, -0.4362512528896332, 0.01961914449930191, -0.17953979969024658, -0.1805548518896103, 0.3991861045360565, 0.22178232669830322, 0.5155704021453857, 0.002279948443174362, 0.14303961396217346, 0.024066850543022156, -0.1811051368713379, -0.19200268387794495, -0.03763185814023018, 0.0861414223909378, 0.1762726753950119, -0.0916481614112854, 0.08704788982868195, 0.12938401103019714, -0.1807277500629425, 0.09440816193819046, 0.6064497828483582, -0.10337407141923904, 0.008501249365508556, 0.11393552273511887, -0.14100833237171173, -0.2004249095916748, 0.11038792133331299, -0.18586532771587372, -0.03389827907085419, -0.09858180582523346, -0.2373308390378952, -0.15887252986431122, -0.19998447597026825, 0.42357540130615234, -0.45981642603874207, 0.057306308299303055, -0.17736037075519562, 0.272293359041214, 0.2497566044330597, 0.35054415464401245, -0.19628754258155823, 0.02973061054944992, 0.31973591446876526, 0.0932115912437439, -0.043147310614585876, 0.23114584386348724, 0.1514274775981903, 0.11452256143093109, -0.07493724673986435, 0.391838401556015, -0.3036594092845917, -0.3066388666629791, -0.2293878197669983, -0.3594546914100647 ]
https://github.com/huggingface/datasets/issues/1803
Querying examples from big datasets is slower than small datasets
I have a dataset with about 2.7 million rows (which I'm loading via `load_from_disk`), and I need to fetch around 300k (particular) rows of it, by index. Currently this is taking a really long time (~8 hours). I tried sharding the large dataset but overall it doesn't change how long it takes to fetch the desired rows. I actually have enough RAM that I could fit the large dataset in memory. Would having the large dataset in memory speed up querying? To find out, I tried to load (a column of) the large dataset into memory like this: ``` column_data = large_ds['column_name'] ``` but in itself this takes a really long time. I'm pretty stuck - do you have any ideas what I should do?
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed.
125
Querying examples from big datasets is slower than small datasets After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed. I have a dataset with about 2.7 million rows (which I'm loading via `load_from_disk`), and I need to fetch around 300k (particular) rows of it, by index. Currently this is taking a really long time (~8 hours). I tried sharding the large dataset but overall it doesn't change how long it takes to fetch the desired rows. I actually have enough RAM that I could fit the large dataset in memory. Would having the large dataset in memory speed up querying? To find out, I tried to load (a column of) the large dataset into memory like this: ``` column_data = large_ds['column_name'] ``` but in itself this takes a really long time. I'm pretty stuck - do you have any ideas what I should do?
[ -0.40549367666244507, 0.058644503355026245, -0.07997141778469086, 0.13153207302093506, -0.07969391345977783, -0.17769165337085724, 0.24417486786842346, 0.491809219121933, -0.23139935731887817, 0.18019406497478485, 0.08149364590644836, 0.05508897826075554, 0.12508602440357208, -0.10075697302818298, 0.1307257115840912, -0.2734062373638153, 0.08074145019054413, 0.124845951795578, -0.07513222098350525, -0.034528665244579315, 0.024029985070228577, -0.19028697907924652, -0.34862685203552246, 0.018470607697963715, -0.0663272887468338, -0.22407233715057373, -0.23070675134658813, 0.10720640420913696, -0.1658501923084259, -0.4173947870731354, -0.05953645706176758, -0.1528192162513733, 0.22992980480194092, 0.42703086137771606, -0.0001130733362515457, 0.016405127942562103, 0.22793084383010864, 0.08941785991191864, -0.1997472047805786, 0.18293417990207672, 0.174807608127594, -0.28385433554649353, 0.08687453716993332, -0.4097662568092346, -0.04715360701084137, -0.2971976697444916, 0.09342829883098602, 0.018900983035564423, -0.04125356674194336, 0.3089761734008789, 0.1403641402721405, 0.5131545066833496, -0.19170476496219635, -0.13366346061229706, 0.6230676770210266, 0.20515218377113342, -0.3506300747394562, 0.5299633741378784, 0.5806368589401245, -0.04879993200302124, -0.30531546473503113, 0.13614049553871155, -0.08144386857748032, 0.270141065120697, 0.037022218108177185, 0.19797320663928986, -0.11280500143766403, 0.17959190905094147, 0.12381015717983246, 0.4088888466358185, 0.3083902597427368, -0.08939183503389359, -0.31488633155822754, -0.292018324136734, -0.05692818760871887, -0.23329347372055054, 0.020307470113039017, 0.32641905546188354, -0.2583792805671692, 0.2713424861431122, -0.3137761652469635, 0.15477785468101501, -0.10565067827701569, 0.17955198884010315, -0.1511588990688324, -0.06861545145511627, 0.11505104601383209, 0.19851043820381165, 0.09379580616950989, 0.01331334002315998, 0.15119317173957825, -0.16962099075317383, 0.02840580604970455, -0.052110880613327026, -0.28830358386039734, -0.08815446496009827, 0.15566331148147583, 0.1755785048007965, 0.2685060501098633, 0.1593102663755417, 0.4223208725452423, 0.1182836964726448, 0.2651940584182739, 0.09436231851577759, 0.0451355017721653, -0.009021572768688202, -0.26956453919410706, -0.000978325493633747, 0.3478800058364868, 0.2753004729747772, -0.294515997171402, 0.020878134295344353, -0.23832127451896667, -0.1844540387392044, 0.1815628558397293, -0.19732993841171265, -0.027453839778900146, -0.13371698558330536, 0.0043225716799497604, -0.08730419725179672, -0.3421141505241394, -0.12782250344753265, -0.026557791978120804, 0.4784686267375946, -0.18346565961837769, -0.02657211199402809, -0.2126668095588684, 0.12222354859113693, -0.3353424370288849, -0.25402504205703735, -0.12431216984987259, -0.18833579123020172, -0.16008037328720093, 0.2303076833486557, 0.10979531705379486, 0.05609758570790291, 0.3020736277103424, 0.058540500700473785, -0.19851483404636383, 0.241962730884552, 0.3923720121383667, -0.1808657944202423, 0.10445661842823029, 0.01975494995713234, 0.011255607008934021, 0.06353175640106201, -0.16374002397060394, 0.244764044880867, -0.39108967781066895, 0.19727066159248352, -0.195356547832489, -0.3384781777858734, 0.030639247968792915, 0.0919933021068573, -0.10569529980421066, -0.09976005554199219, -0.22708028554916382, 0.24624565243721008, -0.06942235678434372, -0.19974613189697266, -0.07743745297193527, -0.09419386088848114, 0.04028991237282753, -0.15313293039798737, 0.14130058884620667, 0.07762692868709564, -0.2506592571735382, 0.20185056328773499, -0.04518630728125572, 0.3970344066619873, 0.2543899118900299, 0.5308362245559692, -0.503103494644165, 0.16236114501953125, -0.13277849555015564, 0.29661595821380615, 0.2320234179496765, -0.0281321220099926, -0.6667605042457581, 0.4973525106906891, -0.004258058965206146, 0.02418888546526432, 0.2724839746952057, 0.16171206533908844, 0.35167786478996277, 0.10784871876239777, -0.049062833189964294, 0.38371187448501587, 0.18394817411899567, 0.22793066501617432, -0.34009987115859985, -0.23031024634838104, -0.04872759431600571, 0.3479747474193573, -0.3244733512401581, -0.15712156891822815, 0.31125104427337646, -0.36459729075431824, 0.49065926671028137, -0.20656412839889526, -0.18362656235694885, 0.2509782910346985, 0.08702355623245239, -0.27774596214294434, 0.11834852397441864, 0.09648793190717697, 0.08594328165054321, 0.24217668175697327, -0.1894872933626175, -0.018464647233486176, 0.04509012773633003, -0.18880893290042877, -0.07221531122922897, 0.06196317821741104, -0.055260349065065384, -0.04738571122288704, -0.04489725083112717, -0.09183025360107422, 0.3306869566440582, -0.003531353548169136, 0.16473349928855896, -0.16320621967315674, -0.2693369388580322, -0.009445670992136002, -0.26261836290359497, 0.0792929157614708, 0.09506809711456299, -0.12131048738956451, 0.009306356310844421, -0.24925285577774048, -0.0884237065911293, -0.0017331305425614119, -0.15193679928779602, 0.3275279402732849, 0.1502290964126587, 0.1502474844455719, 0.22353103756904602, 0.15224765241146088, 0.14195680618286133, -0.08493109047412872, 0.38797441124916077, 0.29686665534973145, 0.07531566917896271, 0.03652630001306534, -0.4053478538990021, 0.5263329148292542, 0.39331328868865967, 0.31605473160743713, 0.29040318727493286, -0.3733903765678406, 0.16444434225559235, 0.04837924614548683, 0.11050213873386383, 0.41063863039016724, 0.2937985956668854, 0.2421559989452362, 0.5489550828933716, 0.16632583737373352, -0.3161974549293518, 0.11558247357606888, 0.4506141245365143, -0.2496013641357422, 0.018042240291833878, 0.18730425834655762, -0.42171287536621094, -0.18561744689941406, 0.37021583318710327, -0.1509695053100586, 0.32658013701438904, 0.33125314116477966, 0.16064414381980896, -0.1239553764462471, 0.027442894876003265, -0.2904404401779175, 0.26255002617836, 0.09679454565048218, 0.14140845835208893, -0.2201085090637207, 0.4368427097797394, -0.09200569242238998, -0.24601101875305176, -0.38159817457199097, -0.0392078198492527, 0.19213195145130157, -0.12640096247196198, 0.30729901790618896, -0.0982983335852623, 0.053619153797626495, -0.03245113044977188, 0.13080070912837982, 0.07907233387231827, -0.08653527498245239, 0.045039016753435135, 0.19354063272476196, -0.18121057748794556, -0.1583382487297058, -0.055191293358802795, 0.22789597511291504, 0.26178810000419617, -0.20876112580299377, -0.0017746277153491974, -0.0716872587800026, -0.3983876407146454, 0.08031298220157623, 0.2775994539260864, 0.1493917554616928, 0.14504538476467133, -0.04691782593727112, -0.18544796109199524, -0.28017380833625793, -0.3152386546134949, -0.0065731629729270935, 0.07990692555904388, 0.2866186201572418, -0.07090029120445251, 0.07639451324939728, -0.3244525194168091, -0.1447664052248001, 0.0637100338935852, -0.23291027545928955, -0.1513255387544632, 0.27600738406181335, -0.18074728548526764, 0.0008986307657323778, 0.08878308534622192, -0.3163755536079407, -0.1673077940940857, -0.30017706751823425, 0.3784308433532715, 0.17276118695735931, 0.20834563672542572, 0.10755542665719986, 0.3943435549736023, 0.1223713606595993, 0.009659772738814354, 0.12281908839941025, 0.037916772067546844, -0.4149511158466339, 0.519088089466095, -0.18026375770568848, -0.45006418228149414, -0.4888223111629486, -0.24293062090873718, -0.16414868831634521, 0.4524995684623718, -0.5341605544090271, -0.031146589666604996, -0.5311311483383179, 0.41277632117271423, 0.12353938817977905, 0.10216754674911499, 0.04960323125123978, -0.21315725147724152, -0.2089555859565735, 0.12922963500022888, 0.08261796832084656, -0.006418675184249878, -0.08785057067871094, 0.20213806629180908, -0.061521224677562714, 0.03371110185980797, -0.009868493303656578, 0.7692424058914185, 0.06894397735595703, -0.012904908508062363, 0.263535737991333, -0.09490318596363068, 0.05190650001168251, -0.16474509239196777, 0.14588795602321625, 0.09050392359495163, -0.2608802020549774, -0.2699277400970459, 0.4183902144432068, 0.16414737701416016, -0.3080245852470398, 0.05913437902927399, -0.18512959778308868, -0.09765896946191788, -0.2781834006309509, 0.2541959881782532, 0.15882492065429688, 0.17439839243888855, 0.06986100971698761, 0.3926577568054199, -0.3018999695777893, -0.13592663407325745, 0.07070943713188171, -0.25781458616256714, 0.02017316222190857, -0.11698358505964279, -0.3373413383960724, -0.059714991599321365, -0.684593141078949, 0.20213952660560608, -0.06980440765619278, 0.03913889452815056, 0.2540455460548401, -0.3021760880947113, 0.2348044067621231, -0.06626403331756592, 0.5487109422683716, 0.19057194888591766, -0.19964441657066345, -0.11521820724010468, -0.2325005978345871, -0.42478930950164795, -0.15542373061180115, -0.49562618136405945, 0.11365188658237457, -0.0005395635962486267, 0.33458149433135986, -0.3185562193393707, 0.11183632165193558, 0.00006049498915672302, 0.3112281262874603, 0.19164972007274628, -0.04427860304713249, -0.16765469312667847, -0.2823411822319031, -0.13252335786819458, 0.16237764060497284, -0.19951477646827698, 0.05044970288872719, -0.26943451166152954, -0.169610857963562, -0.1472621113061905, 0.1772928237915039, 0.11681999266147614, 0.4819425642490387, 0.2846928536891937, -0.4382571578025818, 0.36333411931991577, 0.02722485363483429, 0.1518045961856842, 0.3828197121620178, 0.40001922845840454, 0.32248786091804504, -0.12357711791992188, 0.19988873600959778, 0.10222860425710678, 0.07479631900787354, 0.5333117246627808, -0.001265170518308878, 0.19727258384227753, 0.06110768765211105, 0.2763022184371948, -0.056448791176080704, 0.08236680924892426, 0.3274202048778534, -0.08233878761529922, -0.06249767541885376, -0.316829115152359, 0.7024027109146118, 0.09989838302135468, 0.008582472801208496, 0.23552851378917694, -0.1901874989271164, 0.13044320046901703, 0.30139464139938354, -0.10220619291067123, 0.9143378138542175, -0.12508805096149445, 0.2525980770587921, 0.349473774433136, 0.06673100590705872, 0.007589620538055897, -0.0959177166223526, 0.1510164886713028, -0.31350284814834595, -0.23164929449558258, 0.1761050671339035, -0.2805035710334778, 0.08492116630077362, 0.21285951137542725, -0.13127481937408447, 0.08628800511360168, -0.05373178794980049, 0.19904311001300812, -0.22586047649383545, 0.23925131559371948, -0.2529607117176056, -0.05109252408146858, -0.435341477394104, 0.028821062296628952, 0.0972895622253418, -0.06465215981006622, 0.08860572427511215, -0.14536935091018677, -0.5541805624961853, 0.010253485292196274, -0.09387645125389099, 0.038914747536182404, -0.2355804294347763, 0.16329807043075562, 0.059376370161771774, -0.47716158628463745, -0.08425377309322357, 0.12125369906425476, -0.4953686594963074, 0.07895474135875702, -0.24581170082092285, 0.41740965843200684, 0.04354551061987877, 0.23015880584716797, 0.5308087468147278, -0.3330541253089905, -0.008719535544514656, -0.029219064861536026, -0.21656781435012817, 0.24954074621200562, -0.15398955345153809, -0.2520103454589844, 0.02528531849384308, 0.14373070001602173, 0.3611818552017212, -0.16750192642211914, -0.27764585614204407, -0.12400461733341217, -0.44087374210357666, -0.2431265413761139, 0.08413772284984589, -0.042736947536468506, 0.08555810898542404, 0.2314760982990265, 0.3174692988395691, -0.35499292612075806, -0.2242874652147293, 0.37099969387054443, 0.09431253373622894, 0.2603204548358917, 0.31308677792549133, 0.08809581398963928, -0.21637548506259918, -0.12743738293647766, 0.29655349254608154, 0.41114309430122375, -0.4757106304168701, 0.06908169388771057, 0.013951177708804607, 0.12462691962718964, 0.24618001282215118, 0.018209662288427353, 0.07419745624065399, -0.25699007511138916, -0.33867958188056946, -0.06908656656742096, 0.009943997487425804, 0.32786786556243896, 0.12076172232627869, 0.13579605519771576, 0.057691335678100586, -0.014596251770853996, -0.3653215765953064, 0.014248049817979336, -0.2701687812805176, 0.1390894055366516, -0.02432269975543022, 0.18286335468292236, -0.43158963322639465, 0.01740933582186699, 0.008137536235153675, 0.1431652456521988, 0.10916264355182648, 0.10638198256492615, -0.12343858182430267, -0.21664738655090332, 0.029185544699430466, 0.1290723979473114, -0.13618791103363037, -0.27971911430358887, 0.23944316804409027, -0.2063068002462387, -0.05086604133248329, -0.3758655786514282, 0.14212407171726227, -0.13642072677612305, -0.03166034817695618, -0.42543864250183105, 0.25964275002479553, -0.16920319199562073, -0.30194026231765747, 0.3180858790874481, -0.4044681787490845, 0.17799843847751617, 0.060763854533433914, 0.1787565052509308, 0.00400555320084095, -0.1559257209300995, 0.07209174335002899, 0.2029668688774109, 0.1648201048374176, 0.13967806100845337, 0.3797294497489929, -0.02621212601661682, -0.09722796082496643, -0.10739034414291382, 0.33126673102378845, 0.34939053654670715, 0.03802916035056114, -0.13879123330116272, 0.1757907271385193, 0.2256358116865158, -0.32513704895973206, -0.2828211188316345, -0.12963742017745972, -0.25700643658638, 0.2418893575668335, 0.009579531848430634, 0.2093762755393982, 0.1670224964618683, -0.07895486056804657, -0.20689696073532104, 0.098643459379673, 0.5504121780395508, -0.14517584443092346, 0.6776706576347351, 0.3272513151168823, -0.19930444657802582, 0.27027955651283264, 0.002087036147713661, 0.3459145128726959, 0.36188751459121704, -0.11960335820913315, 0.536824643611908, 0.23207449913024902, 0.24495413899421692, -0.133966863155365, -0.3090496063232422, 0.13521072268486023, -0.0015174299478530884, -0.013642989099025726, 0.1391918957233429, 0.06212903559207916, 0.44904252886772156, 0.005227912217378616, 0.07710173726081848, -0.32662978768348694, -0.12674954533576965, 0.029044203460216522, -0.08261632919311523, -0.04338546469807625, -0.11773930490016937, -0.07485173642635345, 0.1068684309720993, -0.37246638536453247, -0.1312440037727356, 0.3648233115673065, 0.0338449589908123, 0.1812082827091217, -0.44460779428482056, 0.20354139804840088, -0.1569175124168396, 0.21809864044189453, -0.239833265542984, 0.1747613251209259, 0.05008469894528389, -0.06679388880729675, 0.07139241695404053, 0.10168417543172836, 0.3679460287094116, 0.18524238467216492, -0.10660095512866974, -0.17309285700321198, -0.05663987621665001, -0.03850575536489487, -0.013906862586736679, -0.0869700089097023, 0.04141530394554138, -0.09860046207904816, 0.30176180601119995, 0.03081405721604824, -0.15572099387645721, -0.13875797390937805, -0.022854890674352646, -0.22427958250045776, -0.32634490728378296, -0.34533166885375977, -0.2006979137659073, -0.3282325863838196, -0.1295248121023178, -0.18956810235977173, -0.25364336371421814, 0.18352057039737701, 0.22793489694595337, -0.3133319914340973, -0.06755870580673218, 0.0006711401510983706, 0.0845005214214325, -0.5105265378952026, 0.6805163621902466, 0.4650323987007141, 0.5556751489639282, -0.32090654969215393, -0.11604468524456024, -0.4356548488140106, 0.06292129307985306, -0.6595270037651062, -0.04978837072849274, 0.29427123069763184, 0.39310985803604126, 0.1516687572002411, 0.21537776291370392, 0.16460812091827393, 0.13592588901519775, -0.19167523086071014, 0.32111218571662903, -0.530500590801239, -0.08094994723796844, -0.027506984770298004, 0.01697678491473198, -0.21761482954025269, -0.6412057876586914, 0.4145413339138031, -0.4362512528896332, 0.01961914449930191, -0.17953979969024658, -0.1805548518896103, 0.3991861045360565, 0.22178232669830322, 0.5155704021453857, 0.002279948443174362, 0.14303961396217346, 0.024066850543022156, -0.1811051368713379, -0.19200268387794495, -0.03763185814023018, 0.0861414223909378, 0.1762726753950119, -0.0916481614112854, 0.08704788982868195, 0.12938401103019714, -0.1807277500629425, 0.09440816193819046, 0.6064497828483582, -0.10337407141923904, 0.008501249365508556, 0.11393552273511887, -0.14100833237171173, -0.2004249095916748, 0.11038792133331299, -0.18586532771587372, -0.03389827907085419, -0.09858180582523346, -0.2373308390378952, -0.15887252986431122, -0.19998447597026825, 0.42357540130615234, -0.45981642603874207, 0.057306308299303055, -0.17736037075519562, 0.272293359041214, 0.2497566044330597, 0.35054415464401245, -0.19628754258155823, 0.02973061054944992, 0.31973591446876526, 0.0932115912437439, -0.043147310614585876, 0.23114584386348724, 0.1514274775981903, 0.11452256143093109, -0.07493724673986435, 0.391838401556015, -0.3036594092845917, -0.3066388666629791, -0.2293878197669983, -0.3594546914100647 ]
https://github.com/huggingface/datasets/issues/1803
Querying examples from big datasets is slower than small datasets
Hi ! Feel free to post a message on the [forum](https://discuss.huggingface.co/c/datasets/10). I'd be happy to help you with this. In your post on the forum, feel free to add more details about your setup: What are column names and types of your dataset ? How was the dataset constructed ? Is the dataset shuffled ? Is the dataset tokenized ? Are you on a SSD or an HDD ? I'm sure we can figure something out. For example on my laptop I can access the 6 millions articles from wikipedia in less than a minute.
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed.
95
Querying examples from big datasets is slower than small datasets After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets. For example ```python from datasets import load_dataset b1 = load_dataset("bookcorpus", split="train[:1%]") b50 = load_dataset("bookcorpus", split="train[:50%]") b100 = load_dataset("bookcorpus", split="train[:100%]") %timeit _ = b1[-1] # 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit _ = b50[-1] # 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) %timeit _ = b100[-1] # 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each) ``` It looks like the time to fetch the example increases with the size of the dataset. This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample. Maybe switching to the Arrow IPC file format could help fixing this issue. Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue: > We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer. cc @gaceladri since it can help speed up your training when this one is fixed. Hi ! Feel free to post a message on the [forum](https://discuss.huggingface.co/c/datasets/10). I'd be happy to help you with this. In your post on the forum, feel free to add more details about your setup: What are column names and types of your dataset ? How was the dataset constructed ? Is the dataset shuffled ? Is the dataset tokenized ? Are you on a SSD or an HDD ? I'm sure we can figure something out. For example on my laptop I can access the 6 millions articles from wikipedia in less than a minute.
[ -0.40549367666244507, 0.058644503355026245, -0.07997141778469086, 0.13153207302093506, -0.07969391345977783, -0.17769165337085724, 0.24417486786842346, 0.491809219121933, -0.23139935731887817, 0.18019406497478485, 0.08149364590644836, 0.05508897826075554, 0.12508602440357208, -0.10075697302818298, 0.1307257115840912, -0.2734062373638153, 0.08074145019054413, 0.124845951795578, -0.07513222098350525, -0.034528665244579315, 0.024029985070228577, -0.19028697907924652, -0.34862685203552246, 0.018470607697963715, -0.0663272887468338, -0.22407233715057373, -0.23070675134658813, 0.10720640420913696, -0.1658501923084259, -0.4173947870731354, -0.05953645706176758, -0.1528192162513733, 0.22992980480194092, 0.42703086137771606, -0.0001130733362515457, 0.016405127942562103, 0.22793084383010864, 0.08941785991191864, -0.1997472047805786, 0.18293417990207672, 0.174807608127594, -0.28385433554649353, 0.08687453716993332, -0.4097662568092346, -0.04715360701084137, -0.2971976697444916, 0.09342829883098602, 0.018900983035564423, -0.04125356674194336, 0.3089761734008789, 0.1403641402721405, 0.5131545066833496, -0.19170476496219635, -0.13366346061229706, 0.6230676770210266, 0.20515218377113342, -0.3506300747394562, 0.5299633741378784, 0.5806368589401245, -0.04879993200302124, -0.30531546473503113, 0.13614049553871155, -0.08144386857748032, 0.270141065120697, 0.037022218108177185, 0.19797320663928986, -0.11280500143766403, 0.17959190905094147, 0.12381015717983246, 0.4088888466358185, 0.3083902597427368, -0.08939183503389359, -0.31488633155822754, -0.292018324136734, -0.05692818760871887, -0.23329347372055054, 0.020307470113039017, 0.32641905546188354, -0.2583792805671692, 0.2713424861431122, -0.3137761652469635, 0.15477785468101501, -0.10565067827701569, 0.17955198884010315, -0.1511588990688324, -0.06861545145511627, 0.11505104601383209, 0.19851043820381165, 0.09379580616950989, 0.01331334002315998, 0.15119317173957825, -0.16962099075317383, 0.02840580604970455, -0.052110880613327026, -0.28830358386039734, -0.08815446496009827, 0.15566331148147583, 0.1755785048007965, 0.2685060501098633, 0.1593102663755417, 0.4223208725452423, 0.1182836964726448, 0.2651940584182739, 0.09436231851577759, 0.0451355017721653, -0.009021572768688202, -0.26956453919410706, -0.000978325493633747, 0.3478800058364868, 0.2753004729747772, -0.294515997171402, 0.020878134295344353, -0.23832127451896667, -0.1844540387392044, 0.1815628558397293, -0.19732993841171265, -0.027453839778900146, -0.13371698558330536, 0.0043225716799497604, -0.08730419725179672, -0.3421141505241394, -0.12782250344753265, -0.026557791978120804, 0.4784686267375946, -0.18346565961837769, -0.02657211199402809, -0.2126668095588684, 0.12222354859113693, -0.3353424370288849, -0.25402504205703735, -0.12431216984987259, -0.18833579123020172, -0.16008037328720093, 0.2303076833486557, 0.10979531705379486, 0.05609758570790291, 0.3020736277103424, 0.058540500700473785, -0.19851483404636383, 0.241962730884552, 0.3923720121383667, -0.1808657944202423, 0.10445661842823029, 0.01975494995713234, 0.011255607008934021, 0.06353175640106201, -0.16374002397060394, 0.244764044880867, -0.39108967781066895, 0.19727066159248352, -0.195356547832489, -0.3384781777858734, 0.030639247968792915, 0.0919933021068573, -0.10569529980421066, -0.09976005554199219, -0.22708028554916382, 0.24624565243721008, -0.06942235678434372, -0.19974613189697266, -0.07743745297193527, -0.09419386088848114, 0.04028991237282753, -0.15313293039798737, 0.14130058884620667, 0.07762692868709564, -0.2506592571735382, 0.20185056328773499, -0.04518630728125572, 0.3970344066619873, 0.2543899118900299, 0.5308362245559692, -0.503103494644165, 0.16236114501953125, -0.13277849555015564, 0.29661595821380615, 0.2320234179496765, -0.0281321220099926, -0.6667605042457581, 0.4973525106906891, -0.004258058965206146, 0.02418888546526432, 0.2724839746952057, 0.16171206533908844, 0.35167786478996277, 0.10784871876239777, -0.049062833189964294, 0.38371187448501587, 0.18394817411899567, 0.22793066501617432, -0.34009987115859985, -0.23031024634838104, -0.04872759431600571, 0.3479747474193573, -0.3244733512401581, -0.15712156891822815, 0.31125104427337646, -0.36459729075431824, 0.49065926671028137, -0.20656412839889526, -0.18362656235694885, 0.2509782910346985, 0.08702355623245239, -0.27774596214294434, 0.11834852397441864, 0.09648793190717697, 0.08594328165054321, 0.24217668175697327, -0.1894872933626175, -0.018464647233486176, 0.04509012773633003, -0.18880893290042877, -0.07221531122922897, 0.06196317821741104, -0.055260349065065384, -0.04738571122288704, -0.04489725083112717, -0.09183025360107422, 0.3306869566440582, -0.003531353548169136, 0.16473349928855896, -0.16320621967315674, -0.2693369388580322, -0.009445670992136002, -0.26261836290359497, 0.0792929157614708, 0.09506809711456299, -0.12131048738956451, 0.009306356310844421, -0.24925285577774048, -0.0884237065911293, -0.0017331305425614119, -0.15193679928779602, 0.3275279402732849, 0.1502290964126587, 0.1502474844455719, 0.22353103756904602, 0.15224765241146088, 0.14195680618286133, -0.08493109047412872, 0.38797441124916077, 0.29686665534973145, 0.07531566917896271, 0.03652630001306534, -0.4053478538990021, 0.5263329148292542, 0.39331328868865967, 0.31605473160743713, 0.29040318727493286, -0.3733903765678406, 0.16444434225559235, 0.04837924614548683, 0.11050213873386383, 0.41063863039016724, 0.2937985956668854, 0.2421559989452362, 0.5489550828933716, 0.16632583737373352, -0.3161974549293518, 0.11558247357606888, 0.4506141245365143, -0.2496013641357422, 0.018042240291833878, 0.18730425834655762, -0.42171287536621094, -0.18561744689941406, 0.37021583318710327, -0.1509695053100586, 0.32658013701438904, 0.33125314116477966, 0.16064414381980896, -0.1239553764462471, 0.027442894876003265, -0.2904404401779175, 0.26255002617836, 0.09679454565048218, 0.14140845835208893, -0.2201085090637207, 0.4368427097797394, -0.09200569242238998, -0.24601101875305176, -0.38159817457199097, -0.0392078198492527, 0.19213195145130157, -0.12640096247196198, 0.30729901790618896, -0.0982983335852623, 0.053619153797626495, -0.03245113044977188, 0.13080070912837982, 0.07907233387231827, -0.08653527498245239, 0.045039016753435135, 0.19354063272476196, -0.18121057748794556, -0.1583382487297058, -0.055191293358802795, 0.22789597511291504, 0.26178810000419617, -0.20876112580299377, -0.0017746277153491974, -0.0716872587800026, -0.3983876407146454, 0.08031298220157623, 0.2775994539260864, 0.1493917554616928, 0.14504538476467133, -0.04691782593727112, -0.18544796109199524, -0.28017380833625793, -0.3152386546134949, -0.0065731629729270935, 0.07990692555904388, 0.2866186201572418, -0.07090029120445251, 0.07639451324939728, -0.3244525194168091, -0.1447664052248001, 0.0637100338935852, -0.23291027545928955, -0.1513255387544632, 0.27600738406181335, -0.18074728548526764, 0.0008986307657323778, 0.08878308534622192, -0.3163755536079407, -0.1673077940940857, -0.30017706751823425, 0.3784308433532715, 0.17276118695735931, 0.20834563672542572, 0.10755542665719986, 0.3943435549736023, 0.1223713606595993, 0.009659772738814354, 0.12281908839941025, 0.037916772067546844, -0.4149511158466339, 0.519088089466095, -0.18026375770568848, -0.45006418228149414, -0.4888223111629486, -0.24293062090873718, -0.16414868831634521, 0.4524995684623718, -0.5341605544090271, -0.031146589666604996, -0.5311311483383179, 0.41277632117271423, 0.12353938817977905, 0.10216754674911499, 0.04960323125123978, -0.21315725147724152, -0.2089555859565735, 0.12922963500022888, 0.08261796832084656, -0.006418675184249878, -0.08785057067871094, 0.20213806629180908, -0.061521224677562714, 0.03371110185980797, -0.009868493303656578, 0.7692424058914185, 0.06894397735595703, -0.012904908508062363, 0.263535737991333, -0.09490318596363068, 0.05190650001168251, -0.16474509239196777, 0.14588795602321625, 0.09050392359495163, -0.2608802020549774, -0.2699277400970459, 0.4183902144432068, 0.16414737701416016, -0.3080245852470398, 0.05913437902927399, -0.18512959778308868, -0.09765896946191788, -0.2781834006309509, 0.2541959881782532, 0.15882492065429688, 0.17439839243888855, 0.06986100971698761, 0.3926577568054199, -0.3018999695777893, -0.13592663407325745, 0.07070943713188171, -0.25781458616256714, 0.02017316222190857, -0.11698358505964279, -0.3373413383960724, -0.059714991599321365, -0.684593141078949, 0.20213952660560608, -0.06980440765619278, 0.03913889452815056, 0.2540455460548401, -0.3021760880947113, 0.2348044067621231, -0.06626403331756592, 0.5487109422683716, 0.19057194888591766, -0.19964441657066345, -0.11521820724010468, -0.2325005978345871, -0.42478930950164795, -0.15542373061180115, -0.49562618136405945, 0.11365188658237457, -0.0005395635962486267, 0.33458149433135986, -0.3185562193393707, 0.11183632165193558, 0.00006049498915672302, 0.3112281262874603, 0.19164972007274628, -0.04427860304713249, -0.16765469312667847, -0.2823411822319031, -0.13252335786819458, 0.16237764060497284, -0.19951477646827698, 0.05044970288872719, -0.26943451166152954, -0.169610857963562, -0.1472621113061905, 0.1772928237915039, 0.11681999266147614, 0.4819425642490387, 0.2846928536891937, -0.4382571578025818, 0.36333411931991577, 0.02722485363483429, 0.1518045961856842, 0.3828197121620178, 0.40001922845840454, 0.32248786091804504, -0.12357711791992188, 0.19988873600959778, 0.10222860425710678, 0.07479631900787354, 0.5333117246627808, -0.001265170518308878, 0.19727258384227753, 0.06110768765211105, 0.2763022184371948, -0.056448791176080704, 0.08236680924892426, 0.3274202048778534, -0.08233878761529922, -0.06249767541885376, -0.316829115152359, 0.7024027109146118, 0.09989838302135468, 0.008582472801208496, 0.23552851378917694, -0.1901874989271164, 0.13044320046901703, 0.30139464139938354, -0.10220619291067123, 0.9143378138542175, -0.12508805096149445, 0.2525980770587921, 0.349473774433136, 0.06673100590705872, 0.007589620538055897, -0.0959177166223526, 0.1510164886713028, -0.31350284814834595, -0.23164929449558258, 0.1761050671339035, -0.2805035710334778, 0.08492116630077362, 0.21285951137542725, -0.13127481937408447, 0.08628800511360168, -0.05373178794980049, 0.19904311001300812, -0.22586047649383545, 0.23925131559371948, -0.2529607117176056, -0.05109252408146858, -0.435341477394104, 0.028821062296628952, 0.0972895622253418, -0.06465215981006622, 0.08860572427511215, -0.14536935091018677, -0.5541805624961853, 0.010253485292196274, -0.09387645125389099, 0.038914747536182404, -0.2355804294347763, 0.16329807043075562, 0.059376370161771774, -0.47716158628463745, -0.08425377309322357, 0.12125369906425476, -0.4953686594963074, 0.07895474135875702, -0.24581170082092285, 0.41740965843200684, 0.04354551061987877, 0.23015880584716797, 0.5308087468147278, -0.3330541253089905, -0.008719535544514656, -0.029219064861536026, -0.21656781435012817, 0.24954074621200562, -0.15398955345153809, -0.2520103454589844, 0.02528531849384308, 0.14373070001602173, 0.3611818552017212, -0.16750192642211914, -0.27764585614204407, -0.12400461733341217, -0.44087374210357666, -0.2431265413761139, 0.08413772284984589, -0.042736947536468506, 0.08555810898542404, 0.2314760982990265, 0.3174692988395691, -0.35499292612075806, -0.2242874652147293, 0.37099969387054443, 0.09431253373622894, 0.2603204548358917, 0.31308677792549133, 0.08809581398963928, -0.21637548506259918, -0.12743738293647766, 0.29655349254608154, 0.41114309430122375, -0.4757106304168701, 0.06908169388771057, 0.013951177708804607, 0.12462691962718964, 0.24618001282215118, 0.018209662288427353, 0.07419745624065399, -0.25699007511138916, -0.33867958188056946, -0.06908656656742096, 0.009943997487425804, 0.32786786556243896, 0.12076172232627869, 0.13579605519771576, 0.057691335678100586, -0.014596251770853996, -0.3653215765953064, 0.014248049817979336, -0.2701687812805176, 0.1390894055366516, -0.02432269975543022, 0.18286335468292236, -0.43158963322639465, 0.01740933582186699, 0.008137536235153675, 0.1431652456521988, 0.10916264355182648, 0.10638198256492615, -0.12343858182430267, -0.21664738655090332, 0.029185544699430466, 0.1290723979473114, -0.13618791103363037, -0.27971911430358887, 0.23944316804409027, -0.2063068002462387, -0.05086604133248329, -0.3758655786514282, 0.14212407171726227, -0.13642072677612305, -0.03166034817695618, -0.42543864250183105, 0.25964275002479553, -0.16920319199562073, -0.30194026231765747, 0.3180858790874481, -0.4044681787490845, 0.17799843847751617, 0.060763854533433914, 0.1787565052509308, 0.00400555320084095, -0.1559257209300995, 0.07209174335002899, 0.2029668688774109, 0.1648201048374176, 0.13967806100845337, 0.3797294497489929, -0.02621212601661682, -0.09722796082496643, -0.10739034414291382, 0.33126673102378845, 0.34939053654670715, 0.03802916035056114, -0.13879123330116272, 0.1757907271385193, 0.2256358116865158, -0.32513704895973206, -0.2828211188316345, -0.12963742017745972, -0.25700643658638, 0.2418893575668335, 0.009579531848430634, 0.2093762755393982, 0.1670224964618683, -0.07895486056804657, -0.20689696073532104, 0.098643459379673, 0.5504121780395508, -0.14517584443092346, 0.6776706576347351, 0.3272513151168823, -0.19930444657802582, 0.27027955651283264, 0.002087036147713661, 0.3459145128726959, 0.36188751459121704, -0.11960335820913315, 0.536824643611908, 0.23207449913024902, 0.24495413899421692, -0.133966863155365, -0.3090496063232422, 0.13521072268486023, -0.0015174299478530884, -0.013642989099025726, 0.1391918957233429, 0.06212903559207916, 0.44904252886772156, 0.005227912217378616, 0.07710173726081848, -0.32662978768348694, -0.12674954533576965, 0.029044203460216522, -0.08261632919311523, -0.04338546469807625, -0.11773930490016937, -0.07485173642635345, 0.1068684309720993, -0.37246638536453247, -0.1312440037727356, 0.3648233115673065, 0.0338449589908123, 0.1812082827091217, -0.44460779428482056, 0.20354139804840088, -0.1569175124168396, 0.21809864044189453, -0.239833265542984, 0.1747613251209259, 0.05008469894528389, -0.06679388880729675, 0.07139241695404053, 0.10168417543172836, 0.3679460287094116, 0.18524238467216492, -0.10660095512866974, -0.17309285700321198, -0.05663987621665001, -0.03850575536489487, -0.013906862586736679, -0.0869700089097023, 0.04141530394554138, -0.09860046207904816, 0.30176180601119995, 0.03081405721604824, -0.15572099387645721, -0.13875797390937805, -0.022854890674352646, -0.22427958250045776, -0.32634490728378296, -0.34533166885375977, -0.2006979137659073, -0.3282325863838196, -0.1295248121023178, -0.18956810235977173, -0.25364336371421814, 0.18352057039737701, 0.22793489694595337, -0.3133319914340973, -0.06755870580673218, 0.0006711401510983706, 0.0845005214214325, -0.5105265378952026, 0.6805163621902466, 0.4650323987007141, 0.5556751489639282, -0.32090654969215393, -0.11604468524456024, -0.4356548488140106, 0.06292129307985306, -0.6595270037651062, -0.04978837072849274, 0.29427123069763184, 0.39310985803604126, 0.1516687572002411, 0.21537776291370392, 0.16460812091827393, 0.13592588901519775, -0.19167523086071014, 0.32111218571662903, -0.530500590801239, -0.08094994723796844, -0.027506984770298004, 0.01697678491473198, -0.21761482954025269, -0.6412057876586914, 0.4145413339138031, -0.4362512528896332, 0.01961914449930191, -0.17953979969024658, -0.1805548518896103, 0.3991861045360565, 0.22178232669830322, 0.5155704021453857, 0.002279948443174362, 0.14303961396217346, 0.024066850543022156, -0.1811051368713379, -0.19200268387794495, -0.03763185814023018, 0.0861414223909378, 0.1762726753950119, -0.0916481614112854, 0.08704788982868195, 0.12938401103019714, -0.1807277500629425, 0.09440816193819046, 0.6064497828483582, -0.10337407141923904, 0.008501249365508556, 0.11393552273511887, -0.14100833237171173, -0.2004249095916748, 0.11038792133331299, -0.18586532771587372, -0.03389827907085419, -0.09858180582523346, -0.2373308390378952, -0.15887252986431122, -0.19998447597026825, 0.42357540130615234, -0.45981642603874207, 0.057306308299303055, -0.17736037075519562, 0.272293359041214, 0.2497566044330597, 0.35054415464401245, -0.19628754258155823, 0.02973061054944992, 0.31973591446876526, 0.0932115912437439, -0.043147310614585876, 0.23114584386348724, 0.1514274775981903, 0.11452256143093109, -0.07493724673986435, 0.391838401556015, -0.3036594092845917, -0.3066388666629791, -0.2293878197669983, -0.3594546914100647 ]
https://github.com/huggingface/datasets/issues/1797
Connection error
Hi ! For future references let me add a link to our discussion here : https://github.com/huggingface/datasets/issues/759#issuecomment-770684693 Let me know if you manage to fix your proxy issue or if we can do something on our end to help you :)
Hi I am hitting to the error, help me and thanks. `train_data = datasets.load_dataset("xsum", split="train")` `ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/xsum/xsum.py`
40
Connection error Hi I am hitting to the error, help me and thanks. `train_data = datasets.load_dataset("xsum", split="train")` `ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/xsum/xsum.py` Hi ! For future references let me add a link to our discussion here : https://github.com/huggingface/datasets/issues/759#issuecomment-770684693 Let me know if you manage to fix your proxy issue or if we can do something on our end to help you :)
[ -0.26246824860572815, -0.4733126163482666, -0.10554547607898712, 0.17871585488319397, 0.5621637105941772, -0.10308811068534851, -0.017071370035409927, 0.2268311232328415, 0.16458760201931, 0.2273808717727661, -0.30961042642593384, -0.004598791711032391, 0.20449627935886383, 0.44322851300239563, 0.2047395259141922, -0.2917325794696808, -0.044043801724910736, -0.08420473337173462, -0.45589616894721985, 0.06750154495239258, 0.08230337500572205, 0.09755158424377441, -0.1073436513543129, 0.03120405226945877, -0.34155794978141785, -0.0755457878112793, -0.12736614048480988, 0.22074660658836365, -0.2686607241630554, -0.10705967247486115, 0.48699021339416504, 0.13938792049884796, 0.023210447281599045, 0.5769347548484802, -0.00010756490519270301, 0.11494694650173187, 0.3164845108985901, 0.02424469031393528, -0.2239992767572403, -0.33114010095596313, -0.11807049065828323, -0.02963685430586338, 0.28681495785713196, -0.07439569383859634, -0.32457980513572693, 0.055190056562423706, 0.16639845073223114, -0.22520403563976288, 0.5972608327865601, 0.17803522944450378, 0.2932913303375244, 0.4454437792301178, 0.34174609184265137, -0.1741364449262619, -0.008784979581832886, -0.23596106469631195, -0.0033455584198236465, 0.4921540915966034, 0.18152709305286407, 0.047187648713588715, 0.21328376233577728, 0.23372328281402588, 0.09236105531454086, -0.11591599881649017, 0.23412510752677917, -0.1357225477695465, 0.08226104825735092, -0.345951110124588, 0.034814268350601196, 0.3595280945301056, 0.5571648478507996, -0.19732540845870972, -0.2897789180278778, 0.0463784784078598, -0.04739529639482498, -0.15393903851509094, 0.22773346304893494, 0.07082337886095047, -0.0782242864370346, 0.1751246154308319, -0.22498491406440735, -0.21495844423770905, -0.27985936403274536, 0.2543150782585144, -0.06235988810658455, 0.023431330919265747, -0.23332373797893524, 0.12854525446891785, 0.0662388950586319, -0.1325381100177765, -0.12613004446029663, 0.15758530795574188, 0.02718084491789341, 0.17377810180187225, -0.46772652864456177, -0.026317499577999115, -0.15106341242790222, 0.23004105687141418, 0.2147616147994995, 0.1480175107717514, -0.1089281216263771, 0.1767996847629547, -0.16455700993537903, 0.23963332176208496, 0.23427002131938934, 0.09919039905071259, -0.09249170869588852, -0.08063186705112457, 0.2583273649215698, 0.2595570385456085, -0.10940216481685638, -0.10852643102407455, -0.07847782969474792, -0.20594076812267303, -0.31374964118003845, -0.062030598521232605, 0.23558960855007172, -0.2644432783126831, -0.20934239029884338, 0.07773827761411667, 0.15082266926765442, -0.053244948387145996, 0.16761662065982819, 0.49416452646255493, -0.24397265911102295, 0.18430691957473755, 0.03984122723340988, 0.15106543898582458, -0.2680296003818512, -0.037311434745788574, -0.3129376769065857, 0.18063031136989594, -0.1964215487241745, -0.061558857560157776, -0.04424189776182175, -0.17723821103572845, 0.216077521443367, -0.07855074107646942, 0.3434208035469055, -0.1640198975801468, 0.05471235513687134, -0.10449405014514923, -0.3085646331310272, 0.2629108428955078, 0.16356393694877625, -0.028210652992129326, 0.28258216381073, -0.060751400887966156, -0.034877169877290726, -0.2365303337574005, -0.33407288789749146, -0.3741346299648285, -0.05521402508020401, 0.2754746079444885, -0.056612126529216766, -0.008533209562301636, -0.33723142743110657, 0.018286345526576042, -0.039647288620471954, 0.12646065652370453, -0.186601459980011, -0.06320759654045105, -0.11090254038572311, -0.12567342817783356, 0.4100497364997864, 0.22694408893585205, -0.06826065480709076, -0.27115923166275024, 0.33551621437072754, -0.37179842591285706, 0.18908114731311798, 0.18692225217819214, -0.12689504027366638, -0.01944655179977417, -0.1061922013759613, 0.11001941561698914, 0.16555890440940857, -0.34521418809890747, -0.3684443533420563, 0.19671021401882172, -0.2838742733001709, -0.07346078753471375, 0.0429040752351284, 0.006849920842796564, 0.09078014642000198, 0.1455778330564499, 0.20330089330673218, 0.20767389237880707, -0.03184186667203903, -0.04367678612470627, -0.1337379366159439, -0.2656520903110504, 0.042770273983478546, 0.27025869488716125, 0.02277403511106968, 0.022779308259487152, 0.1320154368877411, -0.05154818296432495, 0.28431710600852966, 0.050296202301979065, 0.09278067201375961, 0.2592824697494507, 0.20459392666816711, 0.22700388729572296, 0.005305204074829817, -0.35616904497146606, 0.028229229152202606, 0.09118591994047165, 0.04718442261219025, 0.29193314909935, -0.07912275195121765, -0.11056259274482727, -0.36293405294418335, -0.15208223462104797, -0.18350426852703094, -0.0659431517124176, 0.1536896526813507, -0.21986955404281616, 0.19731710851192474, 0.23859481513500214, -0.11917047202587128, 0.2829248011112213, -0.1795577108860016, 0.2405000925064087, -0.4697934091091156, 0.40095895528793335, -0.1937500387430191, 0.006857521366328001, 0.08778975903987885, 0.09348849207162857, 0.11604523658752441, -0.2712264955043793, -0.1282046139240265, 0.4408645033836365, -0.21609455347061157, 0.3192710280418396, 0.3897528648376465, 0.040547579526901245, 0.2562572658061981, -0.4583199620246887, -0.0476713627576828, -0.0960993766784668, 0.06595954298973083, 0.05263257771730423, 0.21869787573814392, 0.20485606789588928, 0.05532127618789673, 0.1382390409708023, 0.13538692891597748, 0.19187535345554352, 0.3227008879184723, 0.0606970377266407, -0.08914494514465332, 0.07026644051074982, 0.21632346510887146, -0.1981060951948166, 0.035574961453676224, -0.19625328481197357, -0.2209896445274353, -0.005444005131721497, 0.007767535746097565, -0.019076209515333176, -0.05225006490945816, 0.07209119945764542, -0.1022571250796318, -0.0005352981388568878, 0.07294046133756638, 0.06906799972057343, 0.2663549482822418, 0.2399248331785202, -0.0378362275660038, 0.27929773926734924, 0.0580013133585453, -0.10217439383268356, 0.18550211191177368, 0.06843040883541107, 0.044950805604457855, -0.03821159899234772, -0.1211705133318901, -0.11825499683618546, -0.2871048152446747, -0.0011869966983795166, -0.22105638682842255, 0.17952175438404083, -0.24707528948783875, -0.021479804068803787, -0.0927760973572731, -0.31237703561782837, 0.06588965654373169, -0.16172559559345245, -0.2731582820415497, -0.34809601306915283, -0.05344425141811371, 0.1365809589624405, 0.03313445672392845, 0.19881179928779602, -0.3494469225406647, 0.10073763132095337, 0.15582500398159027, 0.0168125182390213, -0.11588644236326218, -0.11742115765810013, -0.12868547439575195, 0.1565779149532318, 0.009374718181788921, 0.06263270229101181, 0.39769411087036133, -0.2893913686275482, -0.14186862111091614, -0.10585381090641022, -0.23194444179534912, 0.06298307329416275, -0.10839337110519409, 0.3044184148311615, 0.2778160572052002, 0.45648831129074097, -0.0864182561635971, -0.052034515887498856, 0.6056530475616455, -0.1802675724029541, -0.027554316446185112, -0.034137580543756485, 0.022798065096139908, -0.13315382599830627, 0.11097888648509979, -0.29916951060295105, -0.510417640209198, -0.21315360069274902, 0.14051881432533264, -0.06936882436275482, 0.10471878945827484, 0.11607051640748978, 0.006844351999461651, 0.11729811877012253, -0.18098220229148865, 0.1372247189283371, -0.3094085454940796, -0.8145678639411926, 0.11365891993045807, -0.09336666762828827, -0.4647524058818817, 0.12296003103256226, 0.19538308680057526, 0.25699037313461304, 0.11918482184410095, -0.3289044499397278, -0.3935399055480957, -0.03340897709131241, 0.09856948256492615, 0.18633544445037842, 0.1409386247396469, 0.16609027981758118, -0.26639145612716675, -0.1748816817998886, -0.011950742453336716, 0.02668927237391472, -0.03687702864408493, -0.21505796909332275, 0.4406510889530182, -0.00847802683711052, 0.45177367329597473, -0.016899462789297104, 0.4030778408050537, 0.201205775141716, 0.046653520315885544, 0.4095163643360138, -0.3087843358516693, 0.2212134301662445, -0.035628363490104675, -0.6038444638252258, 0.20429891347885132, -0.1897948980331421, 0.061830803751945496, 0.009605228900909424, 0.1967374086380005, 0.280648410320282, -0.49430781602859497, -0.23548541963100433, -0.21834829449653625, -0.27155184745788574, -0.23543290793895721, -0.005423780530691147, 0.16089440882205963, 0.040553975850343704, -0.14333297312259674, -0.024907805025577545, -0.06678427755832672, -0.016461165621876717, 0.5720889568328857, -0.06939811259508133, 0.11142139136791229, -0.6191421747207642, 0.04223421961069107, -0.6355404257774353, 0.35626327991485596, -0.14486311376094818, 0.16513285040855408, -0.29587483406066895, 0.07922065258026123, 0.09382321685552597, -0.01507646031677723, 0.7718536257743835, 0.001898501068353653, -0.01793035864830017, -0.11051654815673828, -0.19070282578468323, -0.27595651149749756, 0.10915178060531616, -0.008984990417957306, 0.4083506166934967, 0.4919058382511139, 0.24737122654914856, -0.34707415103912354, -0.11454851925373077, 0.08728708326816559, -0.02105650119483471, -0.2440117746591568, -0.20949286222457886, -0.3656117916107178, -0.2786717712879181, -0.1774246096611023, 0.05640087649226189, -0.04372852295637131, 0.3815521001815796, 0.08103961497545242, -0.26562774181365967, 0.00910947471857071, -0.054290078580379486, 0.2826077342033386, 0.038525618612766266, 0.14477911591529846, 0.009443006478250027, 0.16918353736400604, 0.3119986355304718, 0.4208047688007355, 0.1319471299648285, 0.4850691854953766, -0.2108384519815445, -0.27176541090011597, -0.09845175594091415, 0.10138721019029617, 0.12310989946126938, 0.21838372945785522, -0.19412614405155182, 0.20236849784851074, 0.2547459602355957, 0.4601503014564514, -0.1706763505935669, 0.2522599995136261, 0.27734190225601196, 0.2792242467403412, -0.3641134798526764, -0.48653948307037354, 0.15550699830055237, -0.09173890948295593, 0.09430606663227081, 0.26316773891448975, 0.29644572734832764, -0.035594791173934937, -0.16623197495937347, -0.28429168462753296, 1.047812581062317, -0.09567348659038544, 0.006707306951284409, 0.194435715675354, 0.13708429038524628, 0.45075905323028564, -0.09219498187303543, 0.14174985885620117, -0.21442276239395142, -0.2949657440185547, -0.05418004095554352, -0.17437522113323212, 0.16805726289749146, -0.23622433841228485, -0.0537433847784996, 0.3484444320201874, -0.020351070910692215, 0.029256023466587067, -0.13200335204601288, 0.2688502073287964, -0.29671338200569153, 0.012033105827867985, -0.3091319799423218, 0.25536203384399414, -0.13430185616016388, 0.4604222774505615, -0.03021829202771187, -0.1518833339214325, -0.10354319214820862, -0.3361431956291199, -0.06361275911331177, 0.11918843537569046, -0.27147459983825684, 0.10958921909332275, 0.10174307227134705, -0.222469761967659, 0.0017540361732244492, 0.1140812337398529, 0.09383324533700943, 0.07617616653442383, -0.2716827392578125, 0.20655541121959686, -0.5015842318534851, -0.15286868810653687, 0.12703855335712433, 0.11774787306785583, 0.14615851640701294, -0.20068320631980896, -0.4935423731803894, 0.11873575299978256, 0.12498265504837036, -0.1905113309621811, -0.051073260605335236, -0.13718467950820923, 0.09436887502670288, -0.4705697000026703, -0.19561371207237244, -0.31454217433929443, 0.03588898107409477, -0.1969575732946396, 0.20312939584255219, 0.12917611002922058, -0.26068806648254395, 0.0935673639178276, 0.20060113072395325, -0.11756826937198639, -0.06309325993061066, 0.5965721011161804, -0.09246253222227097, 0.005406219512224197, 0.4578073024749756, 0.16776350140571594, -0.1380164921283722, -0.18074938654899597, -0.07790897786617279, 0.22527232766151428, -0.2601613700389862, -0.04465186968445778, 0.04424857348203659, 0.1300586313009262, -0.2083084136247635, 0.03845657408237457, 0.22608157992362976, 0.009782738983631134, 0.27548670768737793, -0.5902448296546936, -0.42073020339012146, 0.16007792949676514, 0.06967926025390625, 0.1743369847536087, 0.2952531576156616, 0.3555337190628052, 0.11888201534748077, 0.08426330238580704, -0.37268030643463135, 0.014194420538842678, -0.25795966386795044, -0.033892758190631866, 0.3824029564857483, -0.3016343414783478, 0.35035401582717896, -0.10163579881191254, 0.22284576296806335, -0.06418857723474503, -0.3282790184020996, -0.22894003987312317, -0.09840898215770721, 0.08980856090784073, -0.018326345831155777, -0.38398849964141846, -0.00035963254049420357, -0.11927644163370132, -0.06859079003334045, 0.005819395650178194, 0.12392154335975647, 0.195806086063385, 0.022974666208028793, -0.1963895857334137, 0.07384595274925232, -0.03654150664806366, -0.09937120974063873, 0.15597815811634064, 0.1055220291018486, 0.2584666609764099, 0.03657383471727371, -0.08118245005607605, -0.10452233254909515, -0.24329911172389984, -0.27364444732666016, -0.06247342377901077, 0.25130337476730347, -0.12784656882286072, 0.2676118314266205, -0.16883063316345215, -0.07256466895341873, 0.14479604363441467, 0.5498507022857666, 0.3072587847709656, -0.27523887157440186, 0.32853206992149353, 0.15257376432418823, 0.2810034453868866, -0.24953188002109528, -0.008856692351400852, 0.2969357669353485, -0.04273452237248421, -0.08192651718854904, -0.1622229814529419, 0.0722937285900116, 0.19964486360549927, 0.024022873491048813, 0.044637784361839294, 0.5042868852615356, -0.0238160602748394, 0.1788913607597351, -0.03507474437355995, -0.05620403587818146, 0.005012538284063339, 0.15214850008487701, 0.2320995181798935, -0.05858690291643143, 0.32246536016464233, -0.3049378991127014, 0.3366057872772217, -0.29978734254837036, 0.25083765387535095, -0.135423481464386, -0.30395522713661194, -0.14471453428268433, 0.13806170225143433, -0.2659606337547302, -0.10883835703134537, -0.2559174597263336, 0.7806468605995178, -0.3334018886089325, -0.013906920328736305, -0.223239004611969, 0.3534823954105377, -0.07585487514734268, -0.3060178756713867, -0.0491388738155365, -0.2112845778465271, -0.032926395535469055, -0.19813422858715057, 0.13099604845046997, -0.24584360420703888, 0.011171236634254456, 0.03439589962363243, -0.08026866614818573, -0.5813344717025757, -0.1702585518360138, 0.19768881797790527, 0.14569705724716187, -0.03879008814692497, 0.23392559587955475, 0.26540571451187134, 0.12019528448581696, 0.07109855115413666, 0.33459508419036865, 0.46034708619117737, 0.22856593132019043, 0.12125851213932037, 0.10230325907468796, 0.14401772618293762, -0.043880440294742584, 0.016588985919952393, 0.05831848084926605, 0.15138009190559387, 0.026812223717570305, 0.2794589400291443, 0.2609654664993286, -0.2058107852935791, 0.025284674018621445, -0.09166137874126434, 0.3647482097148895, -0.24823014438152313, 0.3037289083003998, -0.16168919205665588, 0.01877123862504959, -0.41957104206085205, 0.03843963146209717, -0.7279618978500366, 0.3941766917705536, 0.14012651145458221, -0.08906712383031845, 0.16463562846183777, -0.3102857172489166, 0.1091732382774353, -0.16979186236858368, 0.5486781597137451, 0.27406367659568787, 0.2621701657772064, -0.23711302876472473, -0.18582406640052795, -0.5177459716796875, 0.1752021461725235, -0.04752400889992714, -0.28807249665260315, -0.09666718542575836, 0.04664736986160278, -0.11427558213472366, 0.09653626382350922, 0.12369898706674576, 0.015023970976471901, 0.18972180783748627, -0.055955782532691956, -0.18486544489860535, 0.05355282872915268, -0.31348711252212524, 0.18692180514335632, 0.12494693696498871, -0.1335354447364807, 0.23889221251010895, 0.144446462392807, 0.06276902556419373, -0.03733193501830101, 0.21292302012443542, -0.2674390971660614, -0.29977545142173767, 0.24676449596881866, 0.18387144804000854, 0.5290334224700928, -0.026621252298355103, 0.0692392960190773, -0.10849395394325256, -0.4502318203449249, -0.22546452283859253, 0.09921421855688095, 0.14850670099258423, 0.13362295925617218, -0.010289885103702545, -0.24868635833263397, -0.27915245294570923, 0.430396169424057, -0.05197073891758919, -0.3362521529197693, -0.03941778093576431, -0.06305265426635742, 0.1515260636806488, -0.007633094675838947, 0.15659581124782562, 0.3153596520423889, -0.022659309208393097, 0.08604709804058075, -0.09898161888122559, -0.27005714178085327, 0.6556459665298462, -0.2379179745912552, -0.013021981343626976, -0.25190499424934387, 0.21086794137954712, 0.39940670132637024, -0.1213899776339531, -0.4444725215435028, 0.2536526918411255, 0.23809318244457245, 0.08833755552768707, -0.09615135192871094, 0.47888606786727905, -0.032150957733392715, 0.18700124323368073, 0.024374645203351974, 0.07402366399765015, 0.014395041391253471, -0.12682321667671204, 0.19348740577697754, -0.07435119897127151 ]
https://github.com/huggingface/datasets/issues/1796
Filter on dataset too much slowww
When I use the filter on the arrow table directly, it works like butter. But I can't find a way to update the table in `Dataset` object. ``` ds_table = dataset.data.filter(mask=dataset['flag']) ```
I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ```
32
Filter on dataset too much slowww I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ``` When I use the filter on the arrow table directly, it works like butter. But I can't find a way to update the table in `Dataset` object. ``` ds_table = dataset.data.filter(mask=dataset['flag']) ```
[ -0.2712087333202362, -0.059731677174568176, -0.11476309597492218, -0.27794772386550903, -0.17065070569515228, -0.2504289448261261, 0.17076197266578674, 0.2090250551700592, 0.25987693667411804, -0.11639660596847534, -0.08618342131376266, 0.29582640528678894, -0.0557142049074173, 0.4060818552970886, -0.18042601644992828, 0.24535776674747467, 0.1307906210422516, 0.2970565855503082, 0.19601348042488098, 0.033357277512550354, -0.022402556613087654, -0.1882678121328354, -0.292941153049469, -0.0703883022069931, -0.009625259786844254, -0.262164831161499, 0.18598711490631104, -0.30865177512168884, -0.278518944978714, -0.21260251104831696, -0.0173910204321146, 0.596590518951416, -0.018276864662766457, 0.503816545009613, -0.00013071838475298136, -0.23383833467960358, 0.2439536154270172, 0.07246063649654388, 0.08311831951141357, 0.14980776607990265, -0.21130135655403137, -0.12860415875911713, -0.014037730172276497, -0.0004979521036148071, -0.12500712275505066, 0.002730017527937889, -0.3317999541759491, -0.22165125608444214, 0.349970281124115, 0.09446895867586136, -0.027775119990110397, -0.14122483134269714, -0.2549348473548889, 0.3521129786968231, 0.20528197288513184, 0.3541743755340576, 0.14113406836986542, -0.15136946737766266, 0.5533322095870972, -0.3358144462108612, 0.053945355117321014, 0.605980396270752, -0.4179318845272064, -0.13132882118225098, 0.21006545424461365, -0.2898602783679962, 0.05838333070278168, -0.15155750513076782, 0.2810196876525879, 0.08483466506004333, 0.13357044756412506, -0.16201692819595337, -0.29869192838668823, -0.23227456212043762, -0.08496507257223129, -0.44592854380607605, -0.014387093484401703, -0.09340561181306839, -0.2579452395439148, 0.03457975015044212, -0.5128164291381836, -0.3484368324279785, 0.08615173399448395, 0.12665559351444244, -0.3261454701423645, 0.360015332698822, -0.006306605413556099, 0.20965701341629028, 0.13119766116142273, -0.24526701867580414, 0.06995042413473129, -0.2122395932674408, 0.19134201109409332, 0.3051823675632477, -0.6571981310844421, -0.1016245037317276, -0.09628570824861526, 0.16054341197013855, -0.020917486399412155, 0.06033320724964142, -0.18478423357009888, 0.5039315223693848, 0.2157580852508545, -0.007275789976119995, 0.0003440920263528824, 0.250377357006073, 0.12270466983318329, 0.4484069049358368, 0.2802661061286926, -0.14533311128616333, -0.29913419485092163, 0.1851135492324829, -0.07338353246450424, 0.04879842326045036, 0.08767013251781464, -0.057178281247615814, -0.3887728452682495, -0.12758421897888184, -0.3137279450893402, -0.05338915437459946, -0.2973858118057251, -0.0597958043217659, 0.6444665193557739, 0.5041764974594116, -0.11330601572990417, -0.06504214555025101, -0.07329589128494263, -0.29931944608688354, -0.12936274707317352, 0.017078444361686707, 0.03234144300222397, -0.15808434784412384, -0.10481195896863937, 0.2392277717590332, 0.03781358525156975, -0.23455160856246948, -0.19114737212657928, -0.0324769951403141, -0.1686943918466568, 0.1806279867887497, 0.07120810449123383, -0.3621058762073517, 0.2372623085975647, 0.4139117896556854, -0.268570214509964, 0.3007684648036957, 0.08421188592910767, 0.05566851794719696, -0.12655237317085266, 0.17752733826637268, -0.31561577320098877, -0.333410382270813, 0.22141054272651672, -0.01671867072582245, -0.08474217355251312, 0.13686905801296234, -0.18058088421821594, 0.4090796113014221, 0.2862333059310913, -0.20511004328727722, -0.16437026858329773, -0.17687386274337769, -0.5952664613723755, -0.16068488359451294, 0.26338401436805725, 0.22237804532051086, -0.5520042181015015, 0.052366361021995544, -0.32663050293922424, 0.2614668309688568, 0.49483025074005127, 0.35847073793411255, -0.06717260181903839, 0.21712663769721985, 0.10023890435695648, -0.07036162912845612, 0.29841554164886475, -0.07853974401950836, -0.47584956884384155, 0.5441421866416931, -0.06141606345772743, 0.0120773296803236, 0.1328439712524414, 0.15594184398651123, 0.5201343297958374, -0.244236022233963, 0.39757072925567627, 0.33754652738571167, -0.1997920721769333, 0.07351775467395782, 0.00025378167629241943, -0.009157774038612843, 0.22592134773731232, 0.1488591581583023, -0.3431071639060974, -0.02217032015323639, -0.0321320965886116, -0.4266486167907715, 0.15245939791202545, 0.13803783059120178, -0.013880092650651932, 0.20821288228034973, 0.24694783985614777, 0.14686551690101624, 0.011498099192976952, -0.11738176643848419, -0.002903781831264496, -0.08567927777767181, 0.0895477756857872, -0.20416143536567688, -0.267819881439209, -0.22764934599399567, -0.2681235671043396, 0.12292621284723282, 0.07631808519363403, 0.20277582108974457, -0.1417337954044342, -0.17328113317489624, 0.19183482229709625, -0.2997714579105377, -0.024542562663555145, 0.44238072633743286, -0.11993912607431412, -0.0766720399260521, 0.1876756101846695, 0.004158284515142441, 0.3773689270019531, -0.14786499738693237, 0.15586259961128235, -0.06381639093160629, 0.2566290497779846, 0.05979197472333908, -0.051220834255218506, 0.22286733984947205, 0.48537537455558777, -0.2909351587295532, -0.3249587416648865, 0.19117194414138794, 0.09072641283273697, 0.32233065366744995, 0.1594703048467636, -0.02999534085392952, 0.21721310913562775, -0.06696328520774841, -0.1975269317626953, 0.5968001484870911, -0.08427193760871887, 0.4515284299850464, 0.09617111086845398, -0.05346471816301346, 0.3551803231239319, 0.25798261165618896, -0.13799689710140228, -0.22400376200675964, 0.24839161336421967, -0.016859184950590134, 0.14143143594264984, 0.1916796863079071, -0.10414478182792664, 0.391427218914032, -0.006953246891498566, -0.16840726137161255, -0.057875506579875946, 0.23894590139389038, 0.17030270397663116, 0.030757825821638107, 0.18902668356895447, 0.0051112063229084015, 0.11467733234167099, 0.18449746072292328, -0.14274035394191742, -0.0982930138707161, 0.081593357026577, -0.054758455604314804, 0.25471746921539307, 0.15610122680664062, 0.3075129985809326, -0.25429806113243103, 0.3530648946762085, -0.11373291164636612, -0.17320087552070618, -0.17765000462532043, 0.20347191393375397, 0.33382776379585266, -0.21673502027988434, 0.06997517496347427, -0.37570109963417053, -0.5355600118637085, 0.2271120399236679, -0.11214940994977951, 0.226558119058609, 0.08801180869340897, 0.2230784147977829, 0.07832913100719452, 0.17465509474277496, 0.2855866551399231, 0.1994994431734085, 0.1593724936246872, 0.16612648963928223, -0.44692111015319824, -0.134480282664299, -0.159693643450737, -0.07135366648435593, -0.10749673843383789, 0.2684341371059418, 0.39475616812705994, 0.3735955059528351, 0.28109750151634216, 0.04898669570684433, -0.1861352026462555, -0.558023989200592, -0.21566513180732727, -0.015102740377187729, 0.07447342574596405, 0.2174893468618393, 0.1304197907447815, -0.3905108571052551, -0.050193510949611664, 0.03611206263303757, -0.13265806436538696, -0.18093536794185638, 0.09681206196546555, -0.2643183171749115, 0.07124248147010803, 0.1325807273387909, 0.11713861674070358, -0.23426498472690582, -0.05338004231452942, -0.14802974462509155, -0.09017062187194824, 0.2890060842037201, -0.2378838062286377, 0.03847117722034454, -0.30959898233413696, -0.29004791378974915, -0.0745963305234909, 0.06270217150449753, -0.15425145626068115, 0.236133873462677, 0.28452268242836, -0.010331928730010986, -0.17672841250896454, -0.05455147475004196, -0.29221561551094055, 0.549502432346344, -0.2610015571117401, 0.18067172169685364, -0.40319591760635376, -0.2862224280834198, 0.192729189991951, 0.018468566238880157, 0.3718923032283783, -0.11541654914617538, 0.13654272258281708, -0.0016430839896202087, -0.46508559584617615, -0.163553386926651, -0.1761949062347412, 0.09633567184209824, 0.21246886253356934, 0.8827464580535889, 0.09401598572731018, 0.30705028772354126, 0.06283506751060486, -0.0016842484474182129, 0.07015188038349152, 0.2428099513053894, -0.11538022756576538, -0.2179844081401825, -0.33677178621292114, -0.2030336558818817, 0.14586523175239563, 0.06425172835588455, 0.038709722459316254, 0.13615119457244873, -0.1435866504907608, -0.03396357595920563, -0.2271152287721634, -0.06579655408859253, -0.13549436628818512, 0.09426654130220413, -0.2203654646873474, 0.2903558909893036, 0.3504484295845032, -0.055574312806129456, -0.5428824424743652, -0.34754616022109985, -0.2544794976711273, 0.02634137123823166, 0.13115522265434265, -0.18415462970733643, -0.6282452940940857, -0.31863343715667725, -0.3433009684085846, 0.43916016817092896, 0.18656842410564423, 0.44123145937919617, 0.17403607070446014, 0.07234416902065277, 0.1996859908103943, -0.0993005782365799, 0.7873358726501465, -0.17953649163246155, -0.00008817017078399658, 0.05325401946902275, -0.5388455390930176, -0.4195428490638733, 0.09407919645309448, -0.010187238454818726, 0.24814702570438385, 0.29912251234054565, 0.3818728029727936, -0.27707967162132263, -0.35898181796073914, -0.04079641401767731, 0.12422248721122742, -0.10107164084911346, -0.19607019424438477, -0.23694422841072083, -0.21990111470222473, -0.3587256669998169, 0.2803167998790741, -0.04940596595406532, 0.21888576447963715, 0.36153459548950195, -0.31123068928718567, -0.04769390821456909, -0.19547802209854126, 0.18968386948108673, 0.049326810985803604, 0.05512194335460663, 0.3121332824230194, 0.3041161298751831, -0.07975681126117706, 0.1950199156999588, 0.056564800441265106, -0.10368978977203369, -0.11272940039634705, 0.027073487639427185, -0.00918591022491455, 0.19560952484607697, 0.3815271854400635, 0.526315450668335, -0.12463673204183578, 0.5532615780830383, 0.06299278140068054, 0.4241693615913391, 0.06780649721622467, 0.21347486972808838, -0.1809379607439041, 0.17483603954315186, -0.5886361598968506, -0.7435213923454285, 0.14662803709506989, 0.40048646926879883, -0.3319709897041321, 0.501522958278656, 0.15101361274719238, -0.06407428532838821, 0.4643261432647705, 0.07594834268093109, 0.886493444442749, -0.3235599994659424, -0.1276146024465561, -0.05282261222600937, 0.06507770717144012, 0.35992804169654846, -0.16485747694969177, 0.11933260411024094, 0.026744280010461807, -0.36699408292770386, 0.06097952276468277, -0.09346941113471985, 0.07105684280395508, 0.08029638230800629, 0.06695276498794556, 0.35309043526649475, -0.12661059200763702, 0.06028912961483002, 0.06069256365299225, 0.2552214562892914, 0.21888837218284607, -0.351413756608963, -0.2449193000793457, -0.0771520584821701, 0.17353421449661255, -0.14335475862026215, 0.04479401931166649, 0.04454865679144859, 0.23991498351097107, -0.3018661141395569, -0.21136103570461273, -0.512623131275177, -0.40525346994400024, -0.008172597736120224, -0.18057693541049957, -0.17667891085147858, 0.10861800611019135, -0.20584923028945923, -0.24099861085414886, 0.43169334530830383, 0.15694043040275574, 0.22497712075710297, 0.2834920883178711, 0.31692004203796387, -0.03496623784303665, -0.36785152554512024, 0.22154739499092102, -0.13243970274925232, -0.18027493357658386, 0.013107892125844955, -0.031169123947620392, -0.541283905506134, 0.04195182025432587, 0.17445862293243408, 0.4846717119216919, 0.0853862315416336, -0.17893128097057343, 0.04059852287173271, 0.0019730105996131897, -0.23040743172168732, -0.053991738706827164, 0.06558454036712646, 0.09184356033802032, 0.6818686127662659, 0.010931316763162613, -0.34666603803634644, -0.08234113454818726, 0.2244320511817932, 0.24883151054382324, -0.10499075055122375, 0.3481355607509613, 0.17150132358074188, -0.39529234170913696, -0.11700430512428284, 0.03365729749202728, 0.2506343126296997, 0.1648852825164795, 0.14141932129859924, -0.13451433181762695, -0.23058395087718964, 0.4424910247325897, 0.01796061173081398, -0.15587188303470612, 0.016345135867595673, -0.1148776262998581, -0.6028128862380981, -0.1591871976852417, 0.08877987414598465, -0.03394584730267525, -0.28368955850601196, 0.07924891263246536, 0.17887714505195618, -0.22864025831222534, 0.4104103147983551, -0.14298854768276215, -0.10344544053077698, 0.014918910339474678, 0.19524599611759186, -0.2978614270687103, 0.35532957315444946, -0.10923885554075241, -0.02549137733876705, -0.0584355965256691, 0.081828773021698, 0.01583384908735752, -0.10956898331642151, 0.15820106863975525, 0.1992669552564621, -0.18213847279548645, -0.14827749133110046, 0.11935698986053467, -0.319293737411499, -0.27852749824523926, -0.16671200096607208, 0.08639821410179138, -0.09454238414764404, 0.013538885861635208, -0.62269526720047, 0.07964514940977097, -0.3068784177303314, -0.030854638665914536, 0.1479806900024414, -0.06898297369480133, -0.29936128854751587, 0.03934752568602562, 0.18080931901931763, 0.2547493577003479, -0.07014887779951096, 0.03057059273123741, -0.042586155235767365, 0.00879419595003128, -0.1373344361782074, 0.1609218716621399, -0.013139382004737854, -0.036173418164253235, 0.13345867395401, 0.1339658796787262, 0.3425038456916809, 0.15428338944911957, -0.21892760694026947, 0.46089446544647217, -0.08926854282617569, -0.3246290385723114, -0.162970632314682, 0.18688155710697174, 0.13234443962574005, 0.19144955277442932, 0.1589537262916565, -0.14329442381858826, 0.401459276676178, -0.1859273761510849, 0.18975764513015747, 0.2408549040555954, 0.03352416679263115, -0.1840328574180603, 0.3610530197620392, 0.39693447947502136, -0.11602796614170074, 0.40245145559310913, 0.3945574462413788, -0.22622674703598022, 0.6142655611038208, 0.22249311208724976, 0.41959714889526367, 0.4634610116481781, 0.44516417384147644, -0.30345210433006287, -0.3380829393863678, -0.20565535128116608, 0.6224384307861328, -0.1491273045539856, -0.24016422033309937, 0.10599996894598007, -0.2050473690032959, 0.40297454595565796, -0.44085633754730225, 0.1021219864487648, 0.3491741120815277, 0.24461716413497925, -0.12347477674484253, -0.4045480489730835, 0.016819708049297333, 0.1725483238697052, -0.03653092309832573, -0.012871559709310532, -0.001664578914642334, 0.25514936447143555, 0.011149998754262924, 0.26199355721473694, -0.37601804733276367, -0.23305001854896545, -0.11588982492685318, 0.20287065207958221, 0.02300504967570305, 0.15527476370334625, -0.2527202367782593, 0.329151451587677, 0.33571088314056396, -0.3138510286808014, 0.1728479266166687, 0.42401090264320374, -0.026868678629398346, 0.1570844054222107, -0.3043251931667328, -0.19738802313804626, -0.015255923382937908, 0.3792419135570526, 0.15255647897720337, 0.14516691863536835, -0.06930720806121826, -0.10828808695077896, -0.03440231457352638, -0.02530233934521675, 0.2767588496208191, 0.1954934298992157, 0.08478669822216034, 0.33111685514450073, 0.20295637845993042, 0.014270924031734467, -0.03843240439891815, 0.05764295533299446, -0.11508351564407349, 0.28697043657302856, 0.2904754877090454, -0.3353184759616852, 0.1686612069606781, 0.12979859113693237, -0.005709928460419178, -0.2572619915008545, 0.1182309240102768, -0.07139584422111511, 0.39014843106269836, -0.20781107246875763, -0.3351297974586487, -0.44165849685668945, -0.3361504077911377, -0.34149280190467834, -0.06132045388221741, 0.14465880393981934, 0.08709833025932312, 0.25984328985214233, 0.041154563426971436, 0.14913544058799744, 0.03925825282931328, -0.24253436923027039, 0.06313152611255646, -0.18080492317676544, 0.33768272399902344, -0.16518250107765198, 0.39066824316978455, -0.07435373961925507, -0.3516140580177307, 0.3682194948196411, -0.21278207004070282, -0.05784859135746956, -0.04179176688194275, 0.08142539858818054, 0.20412421226501465, 0.1451190710067749, 0.043264664709568024, -0.014580337330698967, 0.36003223061561584, 0.15218716859817505, 0.5289029479026794, -0.04601680114865303, 0.07234294712543488, -0.32643210887908936, 0.25909075140953064, 0.2396051436662674, 0.1181289404630661, -0.032803792506456375, 0.0460815392434597, 0.16154564917087555, 0.09815815836191177, -0.1329067498445511, -0.1898026317358017, -0.07656757533550262, 0.15682068467140198, 0.19637814164161682, 0.3022770285606384, -0.3197205364704132, 0.1080470085144043, 0.05588991194963455, 0.04699309170246124, -0.30587780475616455, -0.06626355648040771, 0.5844333171844482, -0.5551507472991943, -0.2744625508785248, -0.3311437964439392, 0.22667020559310913, 0.4001959264278412, 0.076299287378788, 0.05329328030347824, -0.10948266834020615, 0.10795595496892929, -0.11847694963216782, -0.31289607286453247, 0.3040601313114166, 0.01938437670469284, 0.0772826075553894, -0.21032707393169403, -0.134958878159523, 0.018336471170186996, -0.17126628756523132, -0.44926291704177856, -0.18770331144332886 ]
https://github.com/huggingface/datasets/issues/1796
Filter on dataset too much slowww
Hi ! Currently the filter method reads the dataset batch by batch to write a new, filtered, arrow file on disk. Therefore all the reading + writing can take some time. Using a mask directly on the arrow table doesn't do any read or write operation therefore it's way quicker. Replacing the old table by the new one should do the job: ```python dataset._data = dataset._data.filter(...) ``` Note: this is a **workaround** and in general users shouldn't have to do that. In particular if you did some `shuffle` or `select` before that then it would not work correctly since the indices mapping (index from `__getitem__` -> index in the table) would not be valid anymore. But if you haven't done any `shuffle`, `select`, `shard`, `train_test_split` etc. then it should work. Ideally it would be awesome to update the filter function to allow masking this way ! If you would like to give it a shot I will be happy to help :)
I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ```
162
Filter on dataset too much slowww I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ``` Hi ! Currently the filter method reads the dataset batch by batch to write a new, filtered, arrow file on disk. Therefore all the reading + writing can take some time. Using a mask directly on the arrow table doesn't do any read or write operation therefore it's way quicker. Replacing the old table by the new one should do the job: ```python dataset._data = dataset._data.filter(...) ``` Note: this is a **workaround** and in general users shouldn't have to do that. In particular if you did some `shuffle` or `select` before that then it would not work correctly since the indices mapping (index from `__getitem__` -> index in the table) would not be valid anymore. But if you haven't done any `shuffle`, `select`, `shard`, `train_test_split` etc. then it should work. Ideally it would be awesome to update the filter function to allow masking this way ! If you would like to give it a shot I will be happy to help :)
[ -0.2580147385597229, -0.12244249135255814, -0.08642463386058807, -0.26014697551727295, -0.16526556015014648, -0.24570009112358093, 0.2593750059604645, 0.26136794686317444, 0.31368890404701233, -0.15321622788906097, 0.006636733654886484, 0.22178915143013, -0.11383556574583054, 0.348147988319397, -0.2551460862159729, 0.20768927037715912, 0.07264888286590576, 0.22438102960586548, 0.38680392503738403, 0.04858500510454178, -0.08172370493412018, -0.14383560419082642, -0.2755506634712219, -0.057454124093055725, -0.019711926579475403, -0.35116490721702576, 0.27382785081863403, -0.18856695294380188, -0.28876546025276184, -0.23911169171333313, -0.023092541843652725, 0.4542040526866913, -0.011224924586713314, 0.4893331229686737, -0.00012605980737134814, -0.30333906412124634, 0.21907995641231537, 0.09674572944641113, 0.09690719842910767, 0.13116957247257233, -0.15553778409957886, -0.034209955483675, -0.0015719715738669038, -0.07323500514030457, -0.13809806108474731, -0.027774270623922348, -0.2938835620880127, -0.3395698666572571, 0.4357997179031372, 0.07627107948064804, -0.02121826633810997, -0.1640915870666504, -0.34362271428108215, 0.3906526565551758, 0.14864662289619446, 0.35527336597442627, 0.16009506583213806, -0.1355319321155548, 0.6643035411834717, -0.39104804396629333, -0.05942339450120926, 0.5160925984382629, -0.5235145688056946, -0.0935746431350708, 0.24680238962173462, -0.2897868752479553, 0.14732395112514496, -0.20446011424064636, 0.2251318097114563, 0.14347338676452637, 0.041436031460762024, -0.13050433993339539, -0.23873375356197357, -0.31142744421958923, -0.08410198241472244, -0.4326247274875641, 0.058440737426280975, 0.05010562390089035, -0.3467148244380951, 0.012645464390516281, -0.5090168714523315, -0.24384631216526031, 0.09583790600299835, 0.12114959955215454, -0.34761932492256165, 0.32074135541915894, 0.04490472376346588, 0.14879575371742249, 0.24621756374835968, -0.195678249001503, 0.08926017582416534, -0.28593510389328003, 0.2442055195569992, 0.33717799186706543, -0.5745356678962708, -0.1418313980102539, -0.1381050944328308, 0.15763135254383087, -0.0300546083599329, 0.08240575343370438, -0.25319457054138184, 0.4543229639530182, 0.2301660031080246, -0.03323180228471756, -0.01789771020412445, 0.20665572583675385, 0.07948041707277298, 0.5078429579734802, 0.2514456510543823, -0.19509324431419373, -0.19720208644866943, 0.250297874212265, -0.03042888641357422, 0.06417994946241379, 0.10519358515739441, -0.0808328241109848, -0.4626240134239197, -0.13824395835399628, -0.24188373982906342, -0.09403958916664124, -0.3737149238586426, -0.09426428377628326, 0.6346335411071777, 0.44186699390411377, -0.0783584862947464, -0.13412684202194214, -0.05089959502220154, -0.27955567836761475, -0.16679027676582336, 0.083887480199337, 0.041388776153326035, -0.11992499232292175, -0.06500915437936783, 0.21818451583385468, 0.09966732561588287, -0.2918970286846161, -0.23063026368618011, 0.04940041899681091, -0.18718399107456207, 0.19880664348602295, 0.22591973841190338, -0.3643767833709717, 0.2283468246459961, 0.34304937720298767, -0.30888059735298157, 0.3217531144618988, 0.1475788801908493, 0.021217286586761475, -0.14084230363368988, 0.18720859289169312, -0.34728384017944336, -0.3065001666545868, 0.22150228917598724, 0.0037913545966148376, -0.15342561900615692, 0.16525326669216156, -0.10675220936536789, 0.31958523392677307, 0.2384776473045349, -0.18455339968204498, -0.2099703550338745, -0.22961877286434174, -0.538913369178772, -0.1934918612241745, 0.23261553049087524, 0.13221527636051178, -0.5897632241249084, 0.017146863043308258, -0.3143191337585449, 0.25967106223106384, 0.5231362581253052, 0.45170530676841736, -0.07432287186384201, 0.22326064109802246, -0.014316683635115623, 0.012673839926719666, 0.25593021512031555, -0.08512681722640991, -0.41655653715133667, 0.6068704724311829, -0.054808761924505234, 0.09065577387809753, 0.1787692904472351, 0.15751436352729797, 0.5775750875473022, -0.2714684009552002, 0.481609582901001, 0.32999902963638306, -0.21298228204250336, 0.08794596046209335, -0.030011791735887527, -0.13233092427253723, 0.1419946551322937, 0.18502116203308105, -0.35078489780426025, -0.12070656567811966, -0.04373828321695328, -0.4507984220981598, 0.21121838688850403, 0.046644579619169235, 0.03340033441781998, 0.13729918003082275, 0.26284313201904297, 0.06773808598518372, 0.002426914405077696, -0.1319776475429535, 0.04370361566543579, -0.007964037358760834, 0.026225823909044266, -0.19918954372406006, -0.28438520431518555, -0.21727444231510162, -0.20583370327949524, -0.010289707221090794, 0.05021960660815239, 0.22812655568122864, -0.1286117434501648, -0.2074560821056366, 0.13403864204883575, -0.23196426033973694, -0.01811537891626358, 0.4373144209384918, -0.11529488861560822, -0.04127929359674454, 0.14159086346626282, -0.06060779094696045, 0.3979142904281616, -0.09762382507324219, 0.10069143772125244, -0.03140587359666824, 0.30018454790115356, 0.040055662393569946, 0.045470330864191055, 0.1611020565032959, 0.4899812936782837, -0.2906467914581299, -0.2897321283817291, 0.17464911937713623, 0.11208613961935043, 0.32102078199386597, 0.15853463113307953, 0.034296467900276184, 0.18428044021129608, -0.09228835999965668, -0.29719045758247375, 0.5812550783157349, -0.10305905342102051, 0.478324830532074, 0.10448190569877625, -0.03949626907706261, 0.31940722465515137, 0.20930138230323792, -0.12256386131048203, -0.1995682716369629, 0.43087220191955566, -0.031435348093509674, 0.10057495534420013, 0.28060224652290344, -0.02775658667087555, 0.32835638523101807, -0.012749787420034409, -0.2614409625530243, -0.054649725556373596, 0.2450743019580841, 0.16617751121520996, 0.098861463367939, 0.1766044646501541, 0.08613625168800354, 0.05341217666864395, 0.22623009979724884, -0.1610710471868515, -0.1625952571630478, 0.004000278655439615, -0.062385283410549164, 0.2874431610107422, 0.12244152277708054, 0.25217491388320923, -0.25394314527511597, 0.201126366853714, -0.11058471351861954, -0.11660675704479218, -0.2918700873851776, 0.194529727101326, 0.3008258640766144, -0.23019112646579742, 0.08147391676902771, -0.3432753384113312, -0.5400555729866028, 0.21443971991539001, -0.09211631119251251, 0.20336498320102692, 0.008993949741125107, 0.17775851488113403, 0.06313551962375641, 0.18228843808174133, 0.1455848664045334, 0.0892179012298584, 0.22768697142601013, 0.2094935029745102, -0.5467380881309509, -0.14838483929634094, -0.21287550032138824, -0.06161786615848541, -0.06493838876485825, 0.33959755301475525, 0.3524472117424011, 0.39188456535339355, 0.31196436285972595, -0.10203820466995239, -0.15463367104530334, -0.445213258266449, -0.15850763022899628, -0.028689436614513397, 0.1104629710316658, 0.1032712534070015, 0.13384246826171875, -0.3872928023338318, -0.15450730919837952, -0.014792210422456264, -0.025487279519438744, -0.17846345901489258, 0.12895505130290985, -0.13892745971679688, 0.11058012396097183, 0.09654168784618378, 0.15773575007915497, -0.21082763373851776, -0.06578651815652847, -0.19223619997501373, -0.08032991737127304, 0.3034643530845642, -0.1891365498304367, -0.09176134318113327, -0.22786739468574524, -0.3064534068107605, -0.09877792000770569, 0.09396618604660034, -0.1424892246723175, 0.27684733271598816, 0.3038763403892517, -0.03706825152039528, -0.09382855892181396, -0.11728779226541519, -0.3516659438610077, 0.6226117014884949, -0.28738993406295776, 0.1780136525630951, -0.4116140902042389, -0.22540919482707977, 0.1542646884918213, 0.03248380869626999, 0.2691566050052643, -0.07421579957008362, 0.13767112791538239, 0.027317948639392853, -0.29385071992874146, -0.18134599924087524, -0.19161778688430786, 0.2125631719827652, 0.2483043670654297, 0.7651827931404114, 0.1278286874294281, 0.34130316972732544, 0.19745731353759766, 0.15694084763526917, -0.01951759308576584, 0.2924419343471527, -0.1555919647216797, -0.18012404441833496, -0.3459392488002777, -0.15391939878463745, 0.1461714804172516, 0.07256433367729187, 0.03395473212003708, 0.1557673215866089, -0.16218847036361694, -0.038527317345142365, -0.14081192016601562, -0.04744641110301018, -0.22001692652702332, 0.15658806264400482, -0.21201854944229126, 0.29280784726142883, 0.25508183240890503, -0.0010023750364780426, -0.5004400610923767, -0.3563646972179413, -0.2340472787618637, 0.024573050439357758, 0.19405697286128998, -0.18265582621097565, -0.4920961856842041, -0.14265784621238708, -0.417956680059433, 0.34048905968666077, 0.1994543820619583, 0.2822414040565491, 0.08681514859199524, 0.03656554967164993, 0.11486409604549408, 0.00044059474021196365, 0.8182603120803833, -0.14719907939434052, 0.015400238335132599, 0.13222473859786987, -0.46859925985336304, -0.4602780044078827, 0.13289880752563477, -0.07987265288829803, 0.1653357595205307, 0.29584380984306335, 0.39029446244239807, -0.2847403883934021, -0.3065437376499176, -0.06258196383714676, 0.1826978176832199, -0.06673496961593628, -0.2874948978424072, -0.19036908447742462, -0.2101450264453888, -0.3705475330352783, 0.2802363932132721, -0.017592033371329308, 0.28088560700416565, 0.37621966004371643, -0.34332284331321716, 0.008050685748457909, -0.2611859440803528, 0.3136886954307556, 0.013887463137507439, 0.006903829053044319, 0.20610056817531586, 0.3031761944293976, 0.01934661716222763, 0.1766960173845291, 0.011615808121860027, -0.12484598159790039, -0.029587920755147934, 0.02428428828716278, 0.013629223220050335, 0.08006629347801208, 0.36168742179870605, 0.5575125813484192, -0.12028829753398895, 0.5586546063423157, 0.05338066816329956, 0.44725537300109863, -0.0033794399350881577, 0.1796390563249588, -0.19857251644134521, 0.15450933575630188, -0.6475353837013245, -0.6661449074745178, 0.08213872462511063, 0.3528614938259125, -0.32092544436454773, 0.4958527684211731, 0.12060129642486572, -0.0689840167760849, 0.47953277826309204, 0.06894419342279434, 0.9122276306152344, -0.4223337173461914, -0.1293206363916397, -0.0037961043417453766, 0.18871326744556427, 0.428833931684494, -0.08921352028846741, 0.128397136926651, 0.07898193597793579, -0.30485057830810547, 0.04422718286514282, -0.1779508888721466, 0.051139239221811295, 0.07521433383226395, 0.08464707434177399, 0.33837950229644775, -0.10615804046392441, 0.007374659180641174, 0.027545996010303497, 0.3325158953666687, 0.18984749913215637, -0.3797967731952667, -0.14620131254196167, -0.05566544830799103, 0.10842815786600113, -0.17344225943088531, 0.06300432980060577, 0.035947032272815704, 0.19659274816513062, -0.219601571559906, -0.1999836266040802, -0.48159000277519226, -0.35524752736091614, 0.019244592636823654, -0.23226696252822876, -0.190912127494812, 0.1824410855770111, -0.21319228410720825, -0.24398978054523468, 0.44882524013519287, 0.09178619831800461, 0.1708308607339859, 0.25803864002227783, 0.29941725730895996, -0.015879135578870773, -0.46014997363090515, 0.19729962944984436, -0.12183494120836258, -0.14652207493782043, 0.05497990548610687, -0.05405819043517113, -0.5098170042037964, 0.04830797016620636, 0.20300185680389404, 0.48852503299713135, 0.009923908859491348, -0.2172056883573532, -0.02510988712310791, -0.007448796182870865, -0.1663377285003662, -0.03554892539978027, 0.15359798073768616, 0.09610968828201294, 0.6945756077766418, -0.052557919174432755, -0.3168729841709137, -0.09988166391849518, 0.10706943273544312, 0.19908848404884338, -0.21463201940059662, 0.2994438707828522, 0.1840757429599762, -0.4404842257499695, -0.10974451154470444, 0.07220114022493362, 0.24741637706756592, 0.29982155561447144, 0.15411856770515442, -0.0664505735039711, -0.2158152461051941, 0.43285077810287476, 0.028471633791923523, -0.08177246153354645, 0.03129463642835617, -0.09280118346214294, -0.5693454146385193, -0.20185807347297668, 0.11442697048187256, -0.043968815356492996, -0.21175332367420197, 0.061469048261642456, 0.18067428469657898, -0.2705647051334381, 0.3613455891609192, -0.16491307318210602, -0.07915624976158142, -0.012851525098085403, 0.21248692274093628, -0.2546992003917694, 0.2238384485244751, -0.07818372547626495, -0.007228632923215628, -0.016349773854017258, 0.07881041616201401, -0.002759612165391445, -0.13119478523731232, 0.11032795906066895, 0.18625366687774658, -0.1803193986415863, -0.29648321866989136, 0.23643583059310913, -0.35413265228271484, -0.2470613420009613, -0.215427428483963, 0.06867654621601105, 0.004094935953617096, 0.01050257682800293, -0.6836888790130615, 0.09632153809070587, -0.4543239176273346, -0.10398358851671219, 0.14559784531593323, -0.16692519187927246, -0.29372233152389526, 0.012015830725431442, 0.2149537354707718, 0.18631339073181152, -0.014235727488994598, 0.0982925221323967, -0.03209167718887329, 0.03504081070423126, -0.09601133316755295, 0.26559165120124817, 0.027856431901454926, -0.04433828219771385, 0.19409096240997314, 0.1606881469488144, 0.3102343678474426, 0.08138512074947357, -0.16667766869068146, 0.4834388792514801, -0.059180907905101776, -0.28374195098876953, -0.20478537678718567, 0.19893498718738556, 0.17913185060024261, 0.18366117775440216, 0.14983245730400085, -0.27268967032432556, 0.3341098129749298, -0.20756734907627106, 0.10903558880090714, 0.3740890622138977, -0.07033801078796387, -0.2158270925283432, 0.393649160861969, 0.4317415952682495, -0.21413151919841766, 0.4373224377632141, 0.3448053002357483, -0.163381427526474, 0.6248002052307129, 0.16256973147392273, 0.3235560655593872, 0.4254291355609894, 0.5249884724617004, -0.3500039875507355, -0.4269687235355377, -0.08666075766086578, 0.6189137101173401, -0.23449096083641052, -0.18344563245773315, 0.09283069521188736, -0.2442382574081421, 0.2608453929424286, -0.3488541543483734, 0.1344263255596161, 0.32924196124076843, 0.18288323283195496, -0.025894105434417725, -0.34408918023109436, -0.004480861127376556, 0.2810177505016327, 0.008098311722278595, -0.04440073296427727, -0.016720987856388092, 0.15775994956493378, 0.14250122010707855, 0.29871463775634766, -0.29461362957954407, -0.1925167441368103, -0.13648062944412231, 0.2268216609954834, -0.07647611945867538, 0.05302928388118744, -0.2720617651939392, 0.29153621196746826, 0.2898279130458832, -0.36701124906539917, 0.2098892778158188, 0.4030945301055908, -0.038155391812324524, 0.14716875553131104, -0.3606915771961212, -0.18133670091629028, -0.015007790178060532, 0.40016797184944153, 0.16768506169319153, 0.15757028758525848, -0.02208142727613449, -0.06040564179420471, -0.05220290273427963, -0.1389399766921997, 0.21763888001441956, 0.07400929927825928, 0.10714462399482727, 0.3026016056537628, 0.2705262303352356, 0.0071116238832473755, -0.061518892645835876, 0.05230538547039032, -0.1224307119846344, 0.34014928340911865, 0.2895958721637726, -0.26517730951309204, 0.2117103636264801, 0.23695233464241028, 0.019252799451351166, -0.22576898336410522, 0.04524748772382736, -0.04557185247540474, 0.39959967136383057, -0.25828927755355835, -0.24781152606010437, -0.42156508564949036, -0.405976265668869, -0.4042247235774994, -0.03657015785574913, 0.14555025100708008, 0.06294678896665573, 0.2698790431022644, 0.09552574157714844, 0.04354896396398544, 0.12980817258358002, -0.2022351175546646, 0.026540713384747505, -0.1372743546962738, 0.3220692276954651, 0.05943608656525612, 0.31538957357406616, -0.1090594232082367, -0.38621944189071655, 0.47283539175987244, -0.22999340295791626, -0.03084784932434559, 0.11621388047933578, 0.04257477819919586, 0.2271537482738495, 0.0803694874048233, -0.05522654950618744, 0.06782371550798416, 0.3736479580402374, 0.19153118133544922, 0.5193091630935669, 0.0005668848752975464, 0.19787023961544037, -0.2546798586845398, 0.2054697871208191, 0.26594698429107666, 0.17926299571990967, -0.10639740526676178, -0.0012779273092746735, 0.04301701858639717, 0.21058706939220428, -0.1673603355884552, -0.19143684208393097, -0.14580975472927094, 0.11354152113199234, 0.13743457198143005, 0.3232652544975281, -0.35128846764564514, 0.12733441591262817, -0.05304902791976929, 0.06735885888338089, -0.2710545063018799, -0.07727530598640442, 0.5529334545135498, -0.6079835295677185, -0.27925390005111694, -0.2729255259037018, 0.2432744950056076, 0.34184029698371887, 0.18270576000213623, 0.12420909851789474, -0.09955360740423203, 0.1359938532114029, -0.17050126194953918, -0.32917162775993347, 0.22025826573371887, -0.05089639872312546, 0.03315598890185356, -0.2044648826122284, -0.17274631559848785, 0.059047628194093704, -0.18523913621902466, -0.35257259011268616, -0.18223164975643158 ]
https://github.com/huggingface/datasets/issues/1796
Filter on dataset too much slowww
Hi @lhoestq @ayubSubhaniya, If there's no progress on this one, can I try working on it? Thanks, Gunjan
I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ```
18
Filter on dataset too much slowww I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ``` Hi @lhoestq @ayubSubhaniya, If there's no progress on this one, can I try working on it? Thanks, Gunjan
[ -0.22525490820407867, -0.259549081325531, -0.10918034613132477, -0.21481604874134064, -0.12303599715232849, -0.26924148201942444, 0.22156164050102234, 0.21148373186588287, 0.2634297311306, -0.12331382930278778, 0.02796166203916073, 0.09088058769702911, -0.11606831103563309, 0.40823686122894287, -0.22788962721824646, 0.1516525000333786, 0.10112813860177994, 0.21311010420322418, 0.4031713902950287, 0.03900176286697388, -0.05775674432516098, -0.08079162240028381, -0.3609130382537842, -0.029826372861862183, -0.08470618724822998, -0.2762126922607422, 0.27824071049690247, -0.24767917394638062, -0.27996498346328735, -0.1902085542678833, -0.11765531450510025, 0.43286266922950745, 0.04168462008237839, 0.5227159857749939, -0.0001285760081373155, -0.3842287063598633, 0.2686331272125244, 0.10168924927711487, 0.22517672181129456, 0.1034960001707077, -0.1696644127368927, -0.008082669228315353, -0.03672003000974655, -0.05866463854908943, -0.2172696888446808, 0.06693393737077713, -0.28964704275131226, -0.23677551746368408, 0.43004119396209717, 0.14965125918388367, -0.026995081454515457, -0.21864378452301025, -0.3358836770057678, 0.3563358187675476, 0.15257588028907776, 0.3359156847000122, 0.18690107762813568, -0.22612644731998444, 0.7080864906311035, -0.3562733232975006, 0.06964371353387833, 0.4721476435661316, -0.45605406165122986, -0.16154378652572632, 0.1487727016210556, -0.3453468680381775, 0.10968492925167084, -0.3132960796356201, 0.24094587564468384, 0.17692062258720398, 0.06566163897514343, -0.05710959434509277, -0.20081095397472382, -0.2538345158100128, -0.045438963919878006, -0.4103206396102905, 0.020263206213712692, 0.045601069927215576, -0.32424256205558777, -0.004244990646839142, -0.5788229703903198, -0.21891237795352936, 0.08762755990028381, 0.15838980674743652, -0.3853457570075989, 0.37354525923728943, 0.03218848258256912, 0.11352396011352539, 0.19936104118824005, -0.2155294120311737, 0.007501615211367607, -0.2545437812805176, 0.28324267268180847, 0.35545408725738525, -0.6740978956222534, -0.1508340835571289, -0.1581907868385315, 0.22031572461128235, 0.011063706129789352, 0.02571568638086319, -0.37365099787712097, 0.4627343416213989, 0.2508266568183899, -0.04021112620830536, -0.05831380560994148, 0.24619938433170319, 0.06419666111469269, 0.48180091381073, 0.2978987693786621, -0.21986085176467896, -0.298744797706604, 0.254726380109787, -0.050787024199962616, 0.06790529936552048, 0.08237475156784058, -0.05401543527841568, -0.5015361309051514, -0.170279860496521, -0.27279388904571533, -0.10285642743110657, -0.4168032109737396, -0.12034711241722107, 0.6683412194252014, 0.46834588050842285, -0.1007528081536293, -0.1219640001654625, -0.12643176317214966, -0.24157340824604034, -0.16461335122585297, 0.029838144779205322, 0.027909565716981888, -0.04454045370221138, -0.0681123360991478, 0.1991347372531891, 0.089943528175354, -0.2929747998714447, -0.17926549911499023, 0.0473017655313015, -0.18295423686504364, 0.12613603472709656, 0.23691639304161072, -0.38317885994911194, 0.13238143920898438, 0.2923038899898529, -0.28546684980392456, 0.30715084075927734, 0.0823027491569519, 0.102476567029953, -0.1182384341955185, 0.1186317503452301, -0.3777610659599304, -0.3367713689804077, 0.24112361669540405, 0.011438751593232155, -0.11205163598060608, 0.18166562914848328, -0.07396823912858963, 0.34425362944602966, 0.30698415637016296, -0.08808647096157074, -0.22140035033226013, -0.1915697455406189, -0.5816183090209961, -0.15875227749347687, 0.20083226263523102, 0.09218984842300415, -0.4657713770866394, 0.01868482679128647, -0.2798205316066742, 0.21053390204906464, 0.5880840420722961, 0.4387434124946594, -0.036940403282642365, 0.22498750686645508, -0.04308982938528061, 0.0483517050743103, 0.21814939379692078, -0.11225943267345428, -0.34538835287094116, 0.6233471035957336, -0.03950076922774315, 0.00773264653980732, 0.1885051131248474, 0.07854848355054855, 0.5663011074066162, -0.26328521966934204, 0.5140783786773682, 0.3756263852119446, -0.21532875299453735, 0.11783608049154282, -0.02184227481484413, -0.10364826768636703, 0.1589716672897339, 0.2371779829263687, -0.28163543343544006, -0.07334925979375839, -0.07037336379289627, -0.37584763765335083, 0.1747685819864273, 0.026058489456772804, 0.03090249001979828, 0.17097580432891846, 0.2361922711133957, 0.06273459643125534, 0.011159876361489296, -0.18206623196601868, 0.11841115355491638, -0.060821741819381714, -0.050430454313755035, -0.1652129888534546, -0.17544735968112946, -0.1815260499715805, -0.25944697856903076, -0.00908716768026352, 0.06414224207401276, 0.23321014642715454, -0.11634941399097443, -0.17108292877674103, 0.11995729804039001, -0.21288135647773743, 0.038998741656541824, 0.487057626247406, -0.06616105884313583, -0.046514131128787994, 0.1828290820121765, -0.04810488969087601, 0.328016459941864, -0.11434753984212875, 0.16947083175182343, 0.025843050330877304, 0.3714914321899414, 0.01423134095966816, 0.05710665136575699, 0.13866350054740906, 0.5027492642402649, -0.29915332794189453, -0.313746839761734, 0.17670461535453796, 0.15423618257045746, 0.3389374613761902, 0.10944795608520508, 0.016436126083135605, 0.13025973737239838, -0.11432348191738129, -0.14936426281929016, 0.531294584274292, -0.040482040494680405, 0.4238990247249603, 0.0877421647310257, -0.09935831278562546, 0.3138716220855713, 0.17381320893764496, -0.09243745356798172, -0.2166418731212616, 0.5034924149513245, 0.013821840286254883, 0.1286028027534485, 0.2449541985988617, -0.10351639240980148, 0.30220508575439453, -0.04749995842576027, -0.31353023648262024, -0.05920632183551788, 0.26802849769592285, 0.19066652655601501, 0.08497287333011627, 0.14193309843540192, -0.017456501722335815, 0.03900608420372009, 0.19786180555820465, -0.18833501636981964, -0.15478123724460602, 0.08239226788282394, -0.06213492900133133, 0.2587134838104248, 0.103495754301548, 0.2353142499923706, -0.2182338535785675, 0.2533360421657562, -0.12868019938468933, -0.09802019596099854, -0.28667816519737244, 0.22841233015060425, 0.32225629687309265, -0.22808678448200226, 0.014942696318030357, -0.3553003668785095, -0.5684859752655029, 0.2344619482755661, -0.10108763724565506, 0.20246951282024384, 0.04587288200855255, 0.15923108160495758, 0.049812689423561096, 0.2844613492488861, 0.11751404404640198, 0.1196422278881073, 0.20554319024085999, 0.22143159806728363, -0.46474897861480713, -0.10817766934633255, -0.132372185587883, -0.041707441210746765, -0.05712011083960533, 0.25840532779693604, 0.3142123520374298, 0.3845151960849762, 0.3064914345741272, -0.09748426824808121, -0.113129623234272, -0.5374437570571899, -0.14814898371696472, 0.010501230135560036, 0.1324184238910675, 0.12267015874385834, 0.14524485170841217, -0.31439435482025146, -0.10356999933719635, -0.02518749050796032, 0.019689762964844704, -0.16293209791183472, 0.06624136120080948, -0.199852854013443, 0.07678497582674026, 0.10989980399608612, 0.15672458708286285, -0.28868111968040466, -0.03236653283238411, -0.22017802298069, -0.07116270065307617, 0.27591389417648315, -0.3124835193157196, -0.11722473800182343, -0.2404734492301941, -0.2843365967273712, -0.06305815279483795, 0.02031504362821579, -0.1998869925737381, 0.2910325527191162, 0.2740526795387268, -0.01750672608613968, -0.12823843955993652, -0.08297601342201233, -0.3217391073703766, 0.540551483631134, -0.24135060608386993, 0.14246736466884613, -0.41743218898773193, -0.2339668571949005, 0.1934642195701599, -0.04337433725595474, 0.26077795028686523, -0.15838533639907837, 0.15180493891239166, 0.04610205441713333, -0.31720516085624695, -0.18608608841896057, -0.18725883960723877, 0.27647149562835693, 0.27397826313972473, 0.7350678443908691, 0.04790881648659706, 0.3134375810623169, 0.16140598058700562, 0.09781190752983093, 0.023463305085897446, 0.27426737546920776, -0.2951160669326782, -0.1754246950149536, -0.32339969277381897, -0.037485044449567795, 0.24710087478160858, 0.05076572299003601, 0.0771011933684349, 0.1735541820526123, -0.15512590110301971, -0.052191246300935745, -0.21329174935817719, -0.08722509443759918, -0.14212027192115784, 0.10171227902173996, -0.16483727097511292, 0.3068118989467621, 0.23450127243995667, -0.039152488112449646, -0.4587770998477936, -0.36367446184158325, -0.3014775812625885, 0.061355412006378174, 0.1693895161151886, -0.182786226272583, -0.50657719373703, -0.20592613518238068, -0.3918890655040741, 0.3594691753387451, 0.21593081951141357, 0.27983343601226807, 0.04623188450932503, 0.13006258010864258, 0.15299640595912933, -0.0007641841657459736, 0.8587450981140137, -0.19640293717384338, 0.02368350140750408, 0.07734355330467224, -0.5784469246864319, -0.2750440239906311, 0.10980843007564545, -0.04007228463888168, 0.06500580161809921, 0.4197517931461334, 0.3936813473701477, -0.30512914061546326, -0.34872013330459595, -0.0523088276386261, 0.1268811970949173, 0.007771924138069153, -0.37496432662010193, -0.15592575073242188, -0.1641947329044342, -0.3765985369682312, 0.30392810702323914, -0.023508820682764053, 0.3030175268650055, 0.3059746325016022, -0.40379640460014343, 0.027820345014333725, -0.2339783012866974, 0.32172879576683044, -0.027287278324365616, -0.045021869242191315, 0.1439339965581894, 0.2509564757347107, -0.0557614341378212, 0.14929726719856262, -0.0016951113939285278, -0.25908157229423523, -0.030204396694898605, 0.04404841735959053, 0.09726639837026596, 0.044482845813035965, 0.3970540165901184, 0.48277419805526733, -0.16124767065048218, 0.5882349014282227, 0.05050765722990036, 0.48860305547714233, 0.011629938147962093, 0.21734514832496643, -0.09170570969581604, 0.20796380937099457, -0.6904326677322388, -0.6199191808700562, 0.058521121740341187, 0.390572726726532, -0.3461592197418213, 0.34997275471687317, 0.020045623183250427, -0.08466541767120361, 0.4471518397331238, 0.06630099564790726, 0.9581959247589111, -0.41534167528152466, -0.2108304500579834, -0.08122185617685318, 0.2532031536102295, 0.44086596369743347, -0.15888634324073792, 0.11695514619350433, 0.06425581872463226, -0.35636088252067566, 0.03351510316133499, -0.16274729371070862, 0.03190453723073006, 0.11546247452497482, 0.059216905385255814, 0.35855910181999207, -0.09943489730358124, 0.04646929353475571, 0.022080201655626297, 0.332105815410614, 0.30331936478614807, -0.3577498197555542, -0.19866017997264862, -0.05484016612172127, 0.10664933174848557, -0.044585857540369034, 0.015125762671232224, 0.03256525844335556, 0.2558644711971283, -0.20824356377124786, -0.19698430597782135, -0.45525598526000977, -0.343282550573349, -0.040817148983478546, -0.1839430034160614, -0.17076754570007324, 0.21553169190883636, -0.14538531005382538, -0.14894342422485352, 0.4777185320854187, 0.039552655071020126, 0.2064715176820755, 0.231776624917984, 0.21532969176769257, -0.056847695261240005, -0.4187890589237213, 0.1855114996433258, -0.17867618799209595, -0.19589047133922577, 0.04478352516889572, -0.012955673038959503, -0.4329488277435303, -0.0632166713476181, 0.1401577889919281, 0.4846388101577759, -0.0020977240055799484, -0.24113699793815613, 0.0008222758769989014, -0.0012015216052532196, -0.17081677913665771, -0.032065365463495255, 0.14751262962818146, 0.061432626098394394, 0.7015860676765442, -0.03569876775145531, -0.2789462208747864, -0.13686341047286987, 0.12212801724672318, 0.29424864053726196, -0.27976784110069275, 0.30976152420043945, 0.2331237643957138, -0.4130250811576843, -0.10830096155405045, 0.017218634486198425, 0.1657753735780716, 0.34654781222343445, 0.07902271300554276, 0.008340626023709774, -0.27648425102233887, 0.46652334928512573, 0.04025886207818985, -0.1502176821231842, -0.006530478596687317, 0.02102203294634819, -0.608069658279419, -0.22224017977714539, 0.013388805091381073, -0.11929835379123688, -0.23514534533023834, 0.09381585568189621, 0.2466764748096466, -0.22699718177318573, 0.40473559498786926, -0.15529906749725342, -0.11915666610002518, -0.08961277455091476, 0.2054951786994934, -0.17515182495117188, 0.17326967418193817, -0.1048566997051239, 0.08447869122028351, -0.009260333143174648, 0.09759598225355148, 0.023488439619541168, -0.11873465031385422, 0.12993276119232178, 0.19042687118053436, -0.1591579020023346, -0.23459134995937347, 0.2908117175102234, -0.28871142864227295, -0.2566339075565338, -0.15979278087615967, 0.0984029620885849, -0.01792874187231064, 0.05771755427122116, -0.6547784209251404, 0.06948249787092209, -0.48614075779914856, -0.13204854726791382, 0.11350921541452408, -0.1249685138463974, -0.3016546964645386, 0.06511390209197998, 0.19551154971122742, 0.15588881075382233, -0.039699114859104156, 0.008310583420097828, -0.059449292719364166, 0.13631987571716309, -0.09816756099462509, 0.24463769793510437, 0.038585469126701355, -0.05466703325510025, 0.23823802173137665, 0.12019617855548859, 0.18422159552574158, 0.048912253230810165, -0.14128145575523376, 0.467106431722641, -0.07224221527576447, -0.2741684019565582, -0.16410264372825623, 0.19771616160869598, 0.1868244856595993, 0.15116092562675476, 0.1790214478969574, -0.24106161296367645, 0.36293235421180725, -0.18333809077739716, 0.09980671107769012, 0.43508589267730713, -0.05547860264778137, -0.22173696756362915, 0.31301113963127136, 0.4332220256328583, -0.2051403969526291, 0.44614458084106445, 0.36386996507644653, -0.21313828229904175, 0.5768561959266663, 0.1865542083978653, 0.33188608288764954, 0.3495141565799713, 0.5341726541519165, -0.2553034722805023, -0.38878583908081055, -0.1109635978937149, 0.7703386545181274, -0.24494093656539917, -0.21367311477661133, 0.033393897116184235, -0.20797353982925415, 0.3349081575870514, -0.3433472812175751, 0.11322300881147385, 0.4351330101490021, 0.14817893505096436, -0.04082396999001503, -0.35700488090515137, 0.02040150761604309, 0.24827298521995544, -0.03699810057878494, 0.003688797354698181, 0.018553804606199265, 0.16131243109703064, 0.17943322658538818, 0.27752527594566345, -0.28586238622665405, -0.2290666699409485, -0.1520700752735138, 0.1804330050945282, -0.05910816043615341, 0.1522858738899231, -0.2897806167602539, 0.2591444253921509, 0.32153984904289246, -0.356366902589798, 0.20936141908168793, 0.41544023156166077, -0.015353240072727203, 0.10739719867706299, -0.354291170835495, -0.15568386018276215, 0.028630368411540985, 0.4394167959690094, 0.2068329155445099, 0.21890079975128174, -0.037383660674095154, -0.0680973008275032, -0.0727638229727745, -0.07776546478271484, 0.2325563132762909, 0.0656387209892273, 0.15787582099437714, 0.26858872175216675, 0.2677963376045227, 0.05264755338430405, -0.13243475556373596, 0.06583709269762039, -0.17723308503627777, 0.3990631103515625, 0.18764738738536835, -0.2525111138820648, 0.24205008149147034, 0.23788729310035706, 0.00819370336830616, -0.24586701393127441, 0.012394532561302185, -0.08788512647151947, 0.4355200529098511, -0.296992689371109, -0.3003426492214203, -0.3489139974117279, -0.33652785420417786, -0.3431505560874939, -0.02514578029513359, 0.09699209034442902, 0.0010713785886764526, 0.21462994813919067, 0.020398834720253944, 0.008032828569412231, 0.11676819622516632, -0.24034886062145233, 0.04445895180106163, -0.13693232834339142, 0.37497639656066895, -0.02541372925043106, 0.3593272268772125, -0.08077681064605713, -0.30886512994766235, 0.4820462763309479, -0.2655582129955292, -0.04221520200371742, 0.05570092052221298, 0.08756363391876221, 0.1483188271522522, 0.040541306138038635, -0.10824260115623474, 0.03692403808236122, 0.4210778474807739, 0.12042508274316788, 0.5725921988487244, 0.05054629221558571, 0.14965921640396118, -0.22698678076267242, 0.18500885367393494, 0.32378777861595154, 0.12236404418945312, -0.032424312084913254, 0.07480847835540771, 0.08036857098340988, 0.22492922842502594, -0.1496291309595108, -0.27735668420791626, -0.09690260142087936, 0.07714765518903732, 0.15351825952529907, 0.2936277985572815, -0.24478226900100708, 0.13705430924892426, -0.036824487149715424, 0.020469216629862785, -0.24104559421539307, -0.12270795553922653, 0.5522252321243286, -0.5193554759025574, -0.2587073743343353, -0.36088332533836365, 0.2557355761528015, 0.2829853594303131, 0.20683248341083527, 0.14414340257644653, -0.04229277744889259, 0.14793168008327484, -0.12213972955942154, -0.2939147353172302, 0.3119495213031769, 0.008995541371405125, 0.009170517325401306, -0.2084154486656189, -0.2674073576927185, 0.095737025141716, -0.13765877485275269, -0.3251846134662628, -0.1448194682598114 ]
https://github.com/huggingface/datasets/issues/1796
Filter on dataset too much slowww
Sure @gchhablani feel free to start working on it, this would be very appreciated :) This feature is would be really awesome, especially since arrow allows to mask really quickly and without having to rewrite the dataset on disk
I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ```
39
Filter on dataset too much slowww I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ``` Sure @gchhablani feel free to start working on it, this would be very appreciated :) This feature is would be really awesome, especially since arrow allows to mask really quickly and without having to rewrite the dataset on disk
[ -0.25473999977111816, -0.2351188361644745, -0.10145196318626404, -0.22573493421077728, -0.14286421239376068, -0.28716841340065, 0.27946537733078003, 0.23597823083400726, 0.31276679039001465, -0.11907623708248138, 0.06210947036743164, 0.13041557371616364, -0.12634706497192383, 0.4224112629890442, -0.24737802147865295, 0.1691477745771408, 0.09485991299152374, 0.20991939306259155, 0.3651646077632904, 0.044634804129600525, -0.049446988850831985, -0.11382684111595154, -0.3327176570892334, -0.04424348473548889, -0.04049830138683319, -0.2961437702178955, 0.293048620223999, -0.2661842107772827, -0.259988009929657, -0.17891860008239746, -0.08933804929256439, 0.42528754472732544, 0.04377349466085434, 0.472421795129776, -0.0001284531899727881, -0.3640066385269165, 0.2625662088394165, 0.11318756639957428, 0.19096989929676056, 0.11359542608261108, -0.18486127257347107, -0.016356317326426506, -0.02185203693807125, -0.05934983864426613, -0.21387332677841187, 0.05300932750105858, -0.27317512035369873, -0.30239444971084595, 0.4287186861038208, 0.10061635076999664, -0.028960715979337692, -0.18324819207191467, -0.3738385736942291, 0.3723733425140381, 0.14585551619529724, 0.3561849594116211, 0.1437237411737442, -0.2502305805683136, 0.6577318906784058, -0.37378937005996704, 0.046121373772621155, 0.5352959036827087, -0.4705418050289154, -0.16817809641361237, 0.19685205817222595, -0.31847459077835083, 0.11250686645507812, -0.2822372019290924, 0.22915369272232056, 0.16906684637069702, 0.014993041753768921, -0.07770981639623642, -0.21435335278511047, -0.2915644943714142, -0.06155969202518463, -0.41391924023628235, 0.02528630569577217, 0.028611060231924057, -0.3154197335243225, 0.016422688961029053, -0.5580665469169617, -0.20373645424842834, 0.09655103087425232, 0.1403735876083374, -0.3547913432121277, 0.36110565066337585, 0.03461248427629471, 0.13136985898017883, 0.21422536671161652, -0.21309465169906616, 0.02269458770751953, -0.2870531976222992, 0.26484522223472595, 0.36231347918510437, -0.6492139101028442, -0.142345130443573, -0.17437776923179626, 0.17504668235778809, 0.006919685751199722, 0.0786336213350296, -0.35297146439552307, 0.46860113739967346, 0.2220180183649063, -0.025951139628887177, -0.06266394257545471, 0.23973537981510162, 0.07409790903329849, 0.45727676153182983, 0.2873613238334656, -0.21478021144866943, -0.23667947947978973, 0.25442302227020264, -0.06849423795938492, 0.07990004122257233, 0.08005809783935547, -0.03191345930099487, -0.4939534068107605, -0.13883823156356812, -0.26480698585510254, -0.1102304682135582, -0.395186185836792, -0.11923745274543762, 0.6373215913772583, 0.42580074071884155, -0.07958577573299408, -0.13445350527763367, -0.11968676000833511, -0.23805619776248932, -0.16519440710544586, 0.02851845696568489, 0.032438378781080246, -0.09632229804992676, -0.0695134699344635, 0.17841647565364838, 0.07810282707214355, -0.2720375061035156, -0.19776152074337006, 0.03262262046337128, -0.17777110636234283, 0.17301629483699799, 0.255194753408432, -0.34739840030670166, 0.15577678382396698, 0.30137917399406433, -0.3203010559082031, 0.3183276355266571, 0.13550595939159393, 0.09040285646915436, -0.12950044870376587, 0.14772629737854004, -0.3459278345108032, -0.3141591250896454, 0.213075652718544, -0.0019210027530789375, -0.1204017698764801, 0.16892027854919434, -0.12101661413908005, 0.34179407358169556, 0.2751408815383911, -0.10069450736045837, -0.20164501667022705, -0.1915019303560257, -0.5472350120544434, -0.16208061575889587, 0.20939850807189941, 0.11714476346969604, -0.4860534071922302, -0.011903468519449234, -0.27961790561676025, 0.22333203256130219, 0.6011428833007812, 0.4344092905521393, -0.046053048223257065, 0.14723964035511017, -0.029906775802373886, 0.056431353092193604, 0.23583431541919708, -0.12276650965213776, -0.3312916159629822, 0.62383633852005, -0.0638754665851593, 0.04009189456701279, 0.21264874935150146, 0.10533880442380905, 0.5331238508224487, -0.25568369030952454, 0.46278128027915955, 0.3944646120071411, -0.18781478703022003, 0.10910392552614212, 0.0033418796956539154, -0.1312587559223175, 0.19495126605033875, 0.21790653467178345, -0.33209526538848877, -0.07579459995031357, -0.06967148929834366, -0.44811078906059265, 0.19658437371253967, 0.023221973329782486, 0.03478915989398956, 0.11894795298576355, 0.24031002819538116, 0.016325563192367554, 0.02064981684088707, -0.13577669858932495, 0.0884329229593277, -0.051119133830070496, -0.014071602374315262, -0.16710342466831207, -0.24949197471141815, -0.19590356945991516, -0.20261040329933167, -0.022411637008190155, 0.06332888454198837, 0.20253309607505798, -0.12866079807281494, -0.17705872654914856, 0.08982735872268677, -0.22923104465007782, 0.008876044303178787, 0.4807584285736084, -0.04092678427696228, -0.02778501994907856, 0.17052127420902252, -0.07462872564792633, 0.3705916106700897, -0.07825043052434921, 0.14515052735805511, 0.016999147832393646, 0.3502368628978729, 0.018661942332983017, 0.04101034998893738, 0.1407470703125, 0.49624404311180115, -0.2891908884048462, -0.29197824001312256, 0.17777587473392487, 0.14519666135311127, 0.3355657756328583, 0.12326186895370483, 0.04533768072724342, 0.1189538836479187, -0.10184860974550247, -0.2242903709411621, 0.5475724935531616, -0.049496185034513474, 0.4638313949108124, 0.07080898433923721, -0.07536301761865616, 0.32802915573120117, 0.17197787761688232, -0.11582044512033463, -0.2379227727651596, 0.4602111577987671, -0.01434406265616417, 0.13402920961380005, 0.2429940551519394, -0.08891726285219193, 0.3365108370780945, -0.07567046582698822, -0.27299249172210693, -0.06271054595708847, 0.2376003861427307, 0.1726813018321991, 0.10395466536283493, 0.18994811177253723, 0.010950271040201187, 0.0056817904114723206, 0.21708768606185913, -0.19800791144371033, -0.16664369404315948, 0.051195383071899414, -0.043755799531936646, 0.2654489278793335, 0.08149461448192596, 0.25965258479118347, -0.24709734320640564, 0.25726813077926636, -0.13743223249912262, -0.11713094264268875, -0.3422018587589264, 0.20117931067943573, 0.2727067470550537, -0.20903506875038147, 0.03124893642961979, -0.34809282422065735, -0.5751768946647644, 0.2541060149669647, -0.08790759742259979, 0.22269248962402344, 0.07293931394815445, 0.16101786494255066, 0.04714471474289894, 0.2452375292778015, 0.1408628225326538, 0.0855318158864975, 0.22163476049900055, 0.2345060557126999, -0.5197233557701111, -0.11053159832954407, -0.1512378454208374, -0.039473071694374084, -0.05712401866912842, 0.24790601432323456, 0.3156694173812866, 0.37809568643569946, 0.34166401624679565, -0.06671039015054703, -0.11726760119199753, -0.5213434100151062, -0.15064769983291626, -0.012481298297643661, 0.11785433441400528, 0.10231480747461319, 0.14622002840042114, -0.335457444190979, -0.12293499708175659, -0.02982553467154503, 0.04915238916873932, -0.1772671639919281, 0.07266519218683243, -0.1669159233570099, 0.08297427743673325, 0.08006486296653748, 0.1700890064239502, -0.2357679158449173, -0.03817985951900482, -0.20738117396831512, -0.05656261369585991, 0.2702919542789459, -0.2656603455543518, -0.07305806130170822, -0.2781139612197876, -0.27124056220054626, -0.10318789631128311, 0.03646997734904289, -0.2044023722410202, 0.2926088571548462, 0.2826997637748718, 0.01965308003127575, -0.15174563229084015, -0.09834739565849304, -0.34920522570610046, 0.5780218243598938, -0.26968681812286377, 0.15842927992343903, -0.4038267731666565, -0.23135879635810852, 0.20193934440612793, -0.03344415873289108, 0.28658735752105713, -0.1034998893737793, 0.14019133150577545, 0.02750120311975479, -0.3251669108867645, -0.19499555230140686, -0.20941206812858582, 0.26776131987571716, 0.277513712644577, 0.7451361417770386, 0.0741664469242096, 0.34548866748809814, 0.18027229607105255, 0.1070338636636734, 0.016800519078969955, 0.2816304862499237, -0.25695914030075073, -0.16913673281669617, -0.31945109367370605, -0.062210116535425186, 0.2351972460746765, 0.08581522852182388, 0.025759257376194, 0.15538737177848816, -0.17712552845478058, -0.03890035301446915, -0.21135123074054718, -0.06669547408819199, -0.1591700315475464, 0.10715209692716599, -0.20322269201278687, 0.29082953929901123, 0.23693671822547913, -0.008952651172876358, -0.492089182138443, -0.35263460874557495, -0.24617546796798706, 0.03383299708366394, 0.22478270530700684, -0.1775357723236084, -0.5154924988746643, -0.15367119014263153, -0.3968793749809265, 0.35712283849716187, 0.21056371927261353, 0.24969065189361572, 0.07332958281040192, 0.09184014052152634, 0.13792911171913147, 0.004820098634809256, 0.8831466436386108, -0.19259057939052582, 0.047824010252952576, 0.08550727367401123, -0.5386550426483154, -0.32991623878479004, 0.12130320072174072, -0.026626545935869217, 0.06275339424610138, 0.36902108788490295, 0.4005446434020996, -0.3076559603214264, -0.33612513542175293, -0.05967019498348236, 0.1310085505247116, -0.007217105478048325, -0.35391077399253845, -0.1504344940185547, -0.12876009941101074, -0.39182907342910767, 0.3001624643802643, -0.0020009316504001617, 0.2927743196487427, 0.3270321488380432, -0.39386895298957825, 0.0023754145950078964, -0.25372734665870667, 0.31026774644851685, -0.01748563162982464, -0.03311260789632797, 0.15792390704154968, 0.2585357129573822, 0.009452378377318382, 0.17301777005195618, -0.036503300070762634, -0.2073553502559662, -0.022343970835208893, -0.0015393123030662537, 0.05652085691690445, 0.048267632722854614, 0.39987900853157043, 0.495108425617218, -0.14652138948440552, 0.5836418867111206, 0.06940298527479172, 0.49082618951797485, -0.011303194798529148, 0.22725126147270203, -0.11869841814041138, 0.18468786776065826, -0.6643238663673401, -0.6317513585090637, 0.08982842415571213, 0.361683189868927, -0.3592296838760376, 0.41494885087013245, 0.05390544980764389, -0.09255480021238327, 0.48463672399520874, 0.07964977622032166, 0.972208559513092, -0.4101477265357971, -0.15644359588623047, -0.10247612744569778, 0.23483945429325104, 0.4491516947746277, -0.14523108303546906, 0.11850250512361526, 0.05268791690468788, -0.31278204917907715, 0.018768424168229103, -0.17898473143577576, 0.01313558965921402, 0.10356847196817398, 0.10156716406345367, 0.35286155343055725, -0.1354784518480301, 0.05329279229044914, 0.017389744520187378, 0.3033018112182617, 0.2745908498764038, -0.3907102644443512, -0.1281687617301941, -0.06740562617778778, 0.14843574166297913, -0.0544951893389225, 0.041741352528333664, 0.023109305649995804, 0.25866812467575073, -0.21814949810504913, -0.1786288022994995, -0.4309237599372864, -0.3346198797225952, -0.029031679034233093, -0.18610915541648865, -0.21807006001472473, 0.18560823798179626, -0.1499718427658081, -0.1546516865491867, 0.4800974130630493, 0.0550311841070652, 0.18720851838588715, 0.25620052218437195, 0.26293718814849854, -0.07100868970155716, -0.43948814272880554, 0.19413192570209503, -0.1478511095046997, -0.1893979012966156, 0.03992756828665733, -0.020283620804548264, -0.46752482652664185, -0.028594106435775757, 0.16647997498512268, 0.47658300399780273, 0.016073176637291908, -0.22115160524845123, -0.009073376655578613, 0.013357076793909073, -0.18004973232746124, -0.039007384330034256, 0.16013562679290771, 0.08721102029085159, 0.6803513169288635, -0.011806052178144455, -0.27124807238578796, -0.11714629828929901, 0.13556960225105286, 0.27161291241645813, -0.2544378638267517, 0.3072369694709778, 0.20269502699375153, -0.4166206121444702, -0.11174856126308441, 0.00549277663230896, 0.22099453210830688, 0.3390144109725952, 0.1124831810593605, -0.017363395541906357, -0.2973783612251282, 0.4311404526233673, 0.03993214666843414, -0.1429939866065979, 0.022601213306188583, -0.0035555996000766754, -0.6040536165237427, -0.19784614443778992, 0.04456048831343651, -0.16242194175720215, -0.2262352555990219, 0.0922238752245903, 0.234744131565094, -0.256216824054718, 0.37024369835853577, -0.1560824066400528, -0.11458061635494232, -0.042253755033016205, 0.22498196363449097, -0.18700015544891357, 0.23972749710083008, -0.06963910907506943, 0.0781729519367218, -0.021561812609434128, 0.08467695116996765, 0.00550084188580513, -0.12498810887336731, 0.09385684132575989, 0.19143074750900269, -0.16927281022071838, -0.2661699652671814, 0.28544870018959045, -0.30408525466918945, -0.24805587530136108, -0.2004140019416809, 0.11811572313308716, -0.032911911606788635, 0.058170147240161896, -0.6831446886062622, 0.029404573142528534, -0.48439130187034607, -0.14652802050113678, 0.08450386673212051, -0.12794779241085052, -0.3025525212287903, 0.04460902139544487, 0.17621806263923645, 0.1422259509563446, -0.027261879295110703, 0.04841384291648865, -0.06535107642412186, 0.11468767374753952, -0.06263464689254761, 0.2472885549068451, 0.04314345493912697, -0.08274564146995544, 0.213344007730484, 0.12622718513011932, 0.17694252729415894, 0.05632578954100609, -0.15676845610141754, 0.4866523742675781, -0.06685570627450943, -0.28685739636421204, -0.19539302587509155, 0.16712993383407593, 0.20774821937084198, 0.17367298901081085, 0.1619260162115097, -0.24518989026546478, 0.35793742537498474, -0.1853935569524765, 0.08896937966346741, 0.40208274126052856, -0.08218072354793549, -0.23520836234092712, 0.3388041853904724, 0.4077506959438324, -0.22499702870845795, 0.4805639386177063, 0.34689363837242126, -0.19380035996437073, 0.6008087992668152, 0.19635295867919922, 0.3269643485546112, 0.42399340867996216, 0.527959942817688, -0.3396156132221222, -0.388489305973053, -0.11077949404716492, 0.7172061204910278, -0.20318365097045898, -0.18738308548927307, 0.07080568373203278, -0.2135530710220337, 0.3435966968536377, -0.32420486211776733, 0.13689468801021576, 0.39979249238967896, 0.16896158456802368, -0.06898676604032516, -0.3674277663230896, 0.015545763075351715, 0.26936399936676025, -0.025864776223897934, 0.0015568099915981293, 0.003990769386291504, 0.20683491230010986, 0.1559247374534607, 0.3189150094985962, -0.27651020884513855, -0.24059930443763733, -0.12860706448554993, 0.21349766850471497, -0.0510532408952713, 0.12598632276058197, -0.2663532495498657, 0.27943044900894165, 0.3113369345664978, -0.3693408966064453, 0.20652371644973755, 0.36977511644363403, -0.04008040204644203, 0.09776079654693604, -0.37421849370002747, -0.15692029893398285, 0.0034290850162506104, 0.4361082911491394, 0.2118591070175171, 0.19151975214481354, -0.034101828932762146, -0.07337986677885056, -0.05476643145084381, -0.0629170686006546, 0.23539046943187714, 0.04978696629405022, 0.16193319857120514, 0.2595258057117462, 0.2800491154193878, 0.034871906042099, -0.12281368672847748, 0.02691134810447693, -0.1231812983751297, 0.39831846952438354, 0.23545131087303162, -0.2709560990333557, 0.23632776737213135, 0.24292166531085968, 0.0075736623257398605, -0.23892852663993835, -0.013387326151132584, -0.08553525805473328, 0.41854017972946167, -0.28868019580841064, -0.2669925093650818, -0.34523022174835205, -0.3425407409667969, -0.3784070909023285, -0.041097018867731094, 0.09316318482160568, 0.012588683515787125, 0.2585787773132324, 0.04499002546072006, 0.0296730175614357, 0.1020231619477272, -0.19090737402439117, 0.028304997831583023, -0.1394941508769989, 0.39538535475730896, 0.009560279548168182, 0.3836015462875366, -0.0542449951171875, -0.34508809447288513, 0.4803273677825928, -0.2367372065782547, -0.042405251413583755, 0.08157488703727722, 0.08671511709690094, 0.16809502243995667, 0.028280042111873627, -0.05643150210380554, 0.03566833958029747, 0.3896332085132599, 0.14239272475242615, 0.5392435789108276, 0.02557723969221115, 0.1664275974035263, -0.23962320387363434, 0.17450836300849915, 0.3232298195362091, 0.1623244732618332, -0.05639422684907913, 0.06580288708209991, 0.06531964242458344, 0.23568259179592133, -0.1420142948627472, -0.25121572613716125, -0.10083100199699402, 0.12022724002599716, 0.11882594972848892, 0.28241539001464844, -0.30858832597732544, 0.1336144357919693, -0.0352308452129364, 0.03290608525276184, -0.22674717009067535, -0.14354954659938812, 0.5653975009918213, -0.5540585517883301, -0.30620869994163513, -0.3145027160644531, 0.24237190186977386, 0.33473753929138184, 0.1990552693605423, 0.11138509958982468, -0.05861525982618332, 0.11647063493728638, -0.13940519094467163, -0.30947044491767883, 0.2706579267978668, 0.026835478842258453, 0.020089607685804367, -0.20973153412342072, -0.2281593680381775, 0.08922453224658966, -0.13145066797733307, -0.3454654812812805, -0.17426881194114685 ]
https://github.com/huggingface/datasets/issues/1796
Filter on dataset too much slowww
No update so far, we haven't worked on this yet :/ Though PyArrow is much more stable than 3 years ago so it would be a good time to dive into this
I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ```
32
Filter on dataset too much slowww I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ``` No update so far, we haven't worked on this yet :/ Though PyArrow is much more stable than 3 years ago so it would be a good time to dive into this
[ -0.23869206011295319, -0.13633538782596588, -0.08516353368759155, -0.25257450342178345, -0.06032592058181763, -0.2871764898300171, 0.26554611325263977, 0.22684648633003235, 0.10224603116512299, -0.10796545445919037, -0.023406600579619408, 0.13732750713825226, -0.08909502625465393, 0.31491023302078247, -0.16668389737606049, 0.08920358121395111, 0.11467747390270233, 0.22679388523101807, 0.42639151215553284, 0.03974927216768265, -0.03580400347709656, -0.13483883440494537, -0.350739061832428, 0.03891049325466156, -0.08877746015787125, -0.26084476709365845, 0.22992709279060364, -0.20940369367599487, -0.300773561000824, -0.22128769755363464, -0.09493384510278702, 0.4262852370738983, 0.015940744429826736, 0.45833107829093933, -0.00013087180559523404, -0.3520311117172241, 0.29218849539756775, 0.13207733631134033, 0.21272438764572144, 0.13321857154369354, -0.0319744236767292, 0.01948723755776882, 0.03640815615653992, -0.04525000974535942, -0.15461012721061707, -0.07759902626276016, -0.22858400642871857, -0.07383938133716583, 0.3418334722518921, 0.09431852400302887, -0.044212911278009415, -0.13501879572868347, -0.2805034816265106, 0.4138791561126709, 0.319985568523407, 0.2800106406211853, 0.14423500001430511, -0.08585785329341888, 0.7062020301818848, -0.44401538372039795, -0.00796452909708023, 0.4007495045661926, -0.49926960468292236, -0.18750624358654022, 0.1874270737171173, -0.23343613743782043, 0.16052459180355072, -0.2622984051704407, 0.14634793996810913, 0.1526300013065338, 0.0635179802775383, -0.1621670126914978, -0.1961486041545868, -0.3007771670818329, -0.03711725398898125, -0.43884241580963135, 0.01112617552280426, 0.07028651982545853, -0.39163076877593994, 0.025444572791457176, -0.5583550333976746, -0.17333048582077026, 0.051333293318748474, 0.24543991684913635, -0.4063454568386078, 0.38796982169151306, 0.14749814569950104, 0.17818297445774078, 0.21058328449726105, -0.13979430496692657, 0.07686616480350494, -0.2490212321281433, 0.2885800302028656, 0.3289719223976135, -0.6241269707679749, -0.1313711404800415, -0.12956538796424866, 0.2987028658390045, 0.08061663061380386, 0.04957348853349686, -0.3722865879535675, 0.4195132255554199, 0.3197023272514343, -0.006495334208011627, -0.04735550656914711, 0.21489843726158142, 0.03624444454908371, 0.3917604088783264, 0.3316332697868347, -0.2633097171783447, -0.25670379400253296, 0.28228315711021423, -0.025255579501390457, 0.031704988330602646, 0.19955354928970337, -0.08594533801078796, -0.44326162338256836, -0.08922221511602402, -0.23096749186515808, -0.12165521830320358, -0.5127193927764893, -0.15211157500743866, 0.6046835780143738, 0.45888638496398926, -0.0922272652387619, -0.17815569043159485, -0.19119565188884735, -0.18886645138263702, -0.1975141167640686, 0.030524611473083496, 0.03553048521280289, -0.050536852329969406, -0.08219818770885468, 0.23052534461021423, 0.08527208864688873, -0.29701492190361023, -0.1657533198595047, 0.07071134448051453, -0.13761937618255615, 0.17659525573253632, 0.19327449798583984, -0.3357517719268799, 0.11451803892850876, 0.3294050991535187, -0.2735559046268463, 0.2690350413322449, 0.07912453263998032, 0.05750718712806702, -0.17579925060272217, 0.21979233622550964, -0.3368396461009979, -0.40098822116851807, 0.15280483663082123, -0.020687978714704514, -0.1986522674560547, 0.1653788983821869, -0.059320010244846344, 0.31376588344573975, 0.32678183913230896, -0.08121471107006073, -0.17524582147598267, -0.2231760174036026, -0.48835694789886475, -0.1967170685529709, 0.1818741410970688, 0.0514092892408371, -0.5497030019760132, 0.03462805598974228, -0.24546228349208832, 0.20010989904403687, 0.59864342212677, 0.48239222168922424, -0.10825489461421967, 0.26383206248283386, 0.0007780659943819046, 0.17591895163059235, 0.229234978556633, -0.12518544495105743, -0.4098820984363556, 0.5443590879440308, -0.05938423052430153, 0.014314768835902214, 0.17608390748500824, 0.1225719004869461, 0.5300936698913574, -0.23727460205554962, 0.4846179485321045, 0.3675193190574646, -0.22061361372470856, 0.1506456583738327, -0.03302432596683502, -0.12940159440040588, 0.21306590735912323, 0.27655109763145447, -0.30032414197921753, -0.11906001716852188, -0.07517547160387039, -0.4419495761394501, 0.2363881766796112, 0.0065050870180130005, -0.005919370800256729, 0.09909406304359436, 0.3123519718647003, 0.058696016669273376, 0.022890064865350723, -0.18048399686813354, 0.014661546796560287, -0.05365505442023277, -0.07947374880313873, -0.09771429002285004, -0.2935760021209717, -0.22197791934013367, -0.1942666471004486, 0.025581957772374153, 0.05961627885699272, 0.2340981364250183, -0.1402992606163025, -0.19708901643753052, 0.1466445028781891, -0.1677473932504654, 0.030158523470163345, 0.344475656747818, -0.0007431413978338242, 0.009574811905622482, 0.2418605089187622, 0.06316716969013214, 0.32112956047058105, -0.18956410884857178, 0.14993424713611603, -0.03498236835002899, 0.35040026903152466, 0.036341916769742966, 0.11921554058790207, 0.18325451016426086, 0.46719929575920105, -0.28624051809310913, -0.40380194783210754, 0.1869760900735855, 0.14092493057250977, 0.2975442111492157, 0.13337020576000214, -0.037558283656835556, 0.07591864466667175, -0.10715566575527191, -0.12367164343595505, 0.516899824142456, -0.027617212384939194, 0.38642042875289917, 0.06888291239738464, -0.131187304854393, 0.24888649582862854, 0.13119694590568542, -0.05088823288679123, -0.11309784650802612, 0.5179648995399475, 0.014203735627233982, 0.19054707884788513, 0.24836736917495728, -0.10387930274009705, 0.3544887602329254, 0.04210405796766281, -0.39604318141937256, -0.07557319849729538, 0.2557118535041809, 0.1654665768146515, 0.11016177386045456, 0.18940825760364532, -0.14376260340213776, 0.03245659917593002, 0.25477662682533264, -0.18595847487449646, -0.13510988652706146, 0.016001377254724503, -0.07358411699533463, 0.2238970547914505, 0.10703558474779129, 0.2724619507789612, -0.22689864039421082, 0.3207334578037262, -0.14106988906860352, -0.17939752340316772, -0.2872708737850189, 0.21061767637729645, 0.32384976744651794, -0.26557785272598267, 0.046928972005844116, -0.3263799250125885, -0.49954545497894287, 0.26413771510124207, -0.2052869349718094, 0.13513946533203125, 0.027548974379897118, 0.2510847747325897, 0.125169575214386, 0.2761301100254059, 0.13712121546268463, 0.17287804186344147, 0.10678378492593765, 0.2271466702222824, -0.6089707612991333, -0.16349411010742188, -0.1998656690120697, -0.0783107653260231, -0.07945556938648224, 0.26182588934898376, 0.27116551995277405, 0.3223358392715454, 0.27462905645370483, -0.1280202567577362, -0.11547211557626724, -0.5734853148460388, -0.11790059506893158, -0.07122728228569031, 0.2033538520336151, 0.14331382513046265, 0.1653129607439041, -0.30238670110702515, -0.13867872953414917, 0.027045175433158875, 0.034351035952568054, -0.20436130464076996, 0.11993533372879028, -0.22284702956676483, 0.07462850213050842, 0.08268195390701294, 0.19437959790229797, -0.25607815384864807, 0.014040924608707428, -0.16330765187740326, -0.09966982901096344, 0.28621309995651245, -0.2720777690410614, -0.023396819829940796, -0.25598445534706116, -0.325651079416275, -0.1375478059053421, 0.10962565243244171, -0.16556642949581146, 0.35360535979270935, 0.3119125962257385, -0.013372678309679031, -0.17006690800189972, -0.0975440964102745, -0.40563908219337463, 0.6054832935333252, -0.31125468015670776, 0.0709245577454567, -0.40240612626075745, -0.020040538161993027, 0.20580723881721497, -0.05589932203292847, 0.3069491386413574, -0.09236548840999603, 0.14975064992904663, 0.05772915482521057, -0.30521953105926514, -0.22062548995018005, -0.1550620198249817, 0.23827305436134338, 0.234977126121521, 0.6876285672187805, 0.06286811828613281, 0.4466072916984558, 0.040634702891111374, 0.09872876107692719, 0.019804608076810837, 0.18556705117225647, -0.30224525928497314, -0.13932117819786072, -0.2771049439907074, -0.04269462078809738, 0.18252785503864288, 0.020340383052825928, 0.08145090937614441, 0.14477908611297607, -0.23239095509052277, -0.009176097810268402, -0.2365296632051468, -0.12955424189567566, -0.1843433827161789, 0.13895785808563232, -0.03411814570426941, 0.2549523115158081, 0.24183180928230286, -0.0019230805337429047, -0.4364892244338989, -0.45803818106651306, -0.258277952671051, 0.003122948110103607, 0.1502833068370819, -0.16001829504966736, -0.4224836528301239, -0.21395088732242584, -0.443456768989563, 0.3225766718387604, 0.25952309370040894, 0.15138983726501465, 0.09740616381168365, 0.06851312518119812, 0.21702876687049866, -0.0385778546333313, 0.931427538394928, -0.06538227945566177, 0.07047796249389648, 0.07549919188022614, -0.49234628677368164, -0.3234817683696747, 0.03692163899540901, -0.05987982451915741, 0.03559389337897301, 0.3846704065799713, 0.3167870044708252, -0.38675862550735474, -0.3132219910621643, -0.06107373535633087, 0.1483333557844162, -0.008533254265785217, -0.37845686078071594, -0.20898909866809845, -0.2313111126422882, -0.3659319281578064, 0.3018374443054199, -0.03132294863462448, 0.312932550907135, 0.2500276267528534, -0.35224881768226624, 0.09488824009895325, -0.2230307161808014, 0.28210100531578064, 0.03796317055821419, -0.05062581226229668, 0.06648561358451843, 0.2060156762599945, -0.06704976409673691, 0.11071285605430603, 0.09139567613601685, -0.23020148277282715, 0.052608996629714966, 0.01276327669620514, 0.039899952709674835, 0.07324078679084778, 0.4160414934158325, 0.4891709089279175, -0.15335988998413086, 0.5428743958473206, 0.04876984655857086, 0.4953381419181824, 0.0665368065237999, 0.17730115354061127, -0.0436420738697052, 0.1404166966676712, -0.6422469019889832, -0.48825252056121826, 0.14233671128749847, 0.361574649810791, -0.3181919753551483, 0.34479400515556335, 0.06528191268444061, -0.04867328703403473, 0.46336841583251953, 0.07047075778245926, 1.008156657218933, -0.48887139558792114, -0.1267722249031067, 0.08543829619884491, 0.21336029469966888, 0.45140716433525085, -0.22770985960960388, 0.15553444623947144, 0.012226816266775131, -0.260670930147171, 0.030994204804301262, -0.19680796563625336, -0.02374769002199173, 0.11904766410589218, 0.06442463397979736, 0.28911834955215454, -0.145933136343956, 0.09688298404216766, 0.0744304358959198, 0.26014748215675354, 0.28868746757507324, -0.30040282011032104, -0.23205438256263733, -0.09730175137519836, 0.11507155746221542, -0.05222370848059654, -0.005188794806599617, 0.0004961732774972916, 0.19641348719596863, -0.22700750827789307, -0.18831177055835724, -0.4419633746147156, -0.35413140058517456, -0.0847569927573204, -0.14454172551631927, -0.24998970329761505, 0.07514961063861847, -0.1325410008430481, -0.27137720584869385, 0.3449104428291321, 0.05733475834131241, 0.20705381035804749, 0.2506946325302124, 0.20384760200977325, -0.013083142228424549, -0.4250003695487976, 0.18804143369197845, -0.1720307171344757, -0.2681777775287628, 0.08293068408966064, -0.013755972497165203, -0.49390965700149536, -0.09952515363693237, 0.18086488544940948, 0.47970855236053467, 0.005253095645457506, -0.11546765267848969, -0.05495481193065643, 0.03642524406313896, -0.1796761006116867, -0.05723310634493828, 0.0784669890999794, 0.11427916586399078, 0.6699032783508301, -0.08831271529197693, -0.27180105447769165, -0.15918496251106262, 0.1120925173163414, 0.2824295163154602, -0.13439762592315674, 0.3044874668121338, 0.2713031768798828, -0.4147968888282776, -0.05840342491865158, -0.030391182750463486, 0.1968890279531479, 0.2282027304172516, 0.06374577432870865, -0.0128233777359128, -0.1572558432817459, 0.3994710147380829, 0.05820879712700844, -0.12000519037246704, -0.003803834319114685, -0.007921077311038971, -0.5993624329566956, -0.19427457451820374, 0.08033198118209839, 0.0029342174530029297, -0.253828227519989, 0.14410310983657837, 0.4005672335624695, -0.18480616807937622, 0.3866705000400543, -0.13539913296699524, -0.11583410948514938, -0.06079337000846863, 0.2279502898454666, -0.26332011818885803, 0.1888847053050995, -0.07627073675394058, 0.08740915358066559, -0.016546199098229408, 0.038294531404972076, 0.02444244734942913, -0.11992049217224121, 0.11616082489490509, 0.21096672117710114, -0.17077761888504028, -0.2241874784231186, 0.3223530054092407, -0.2772889733314514, -0.18862229585647583, -0.16382107138633728, 0.16185644268989563, 0.0020361579954624176, 0.03954806551337242, -0.6340490579605103, 0.1676773726940155, -0.4657914936542511, -0.17253409326076508, 0.05069251358509064, -0.16393640637397766, -0.26094329357147217, 0.08649995923042297, 0.21820087730884552, 0.1045408770442009, 0.0012994036078453064, 0.08023335039615631, -0.05269668251276016, 0.1416112333536148, -0.11479230970144272, 0.25538524985313416, 0.01648314669728279, -0.1462034285068512, 0.056714147329330444, 0.185989111661911, 0.2325260490179062, 0.021193068474531174, -0.1664690226316452, 0.5113074779510498, -0.08974490314722061, -0.28604286909103394, -0.2095111906528473, 0.20518407225608826, 0.1747472733259201, 0.13156196475028992, 0.17157703638076782, -0.2731505036354065, 0.34126532077789307, -0.20539532601833344, 0.08072315156459808, 0.46925345063209534, 0.009516440331935883, -0.35594722628593445, 0.39364397525787354, 0.3701185882091522, -0.20907513797283173, 0.4999731779098511, 0.3630601763725281, -0.19994401931762695, 0.5115024447441101, 0.11861991137266159, 0.28729575872421265, 0.229702889919281, 0.48274049162864685, -0.26774862408638, -0.3148259222507477, -0.17326831817626953, 0.7708715200424194, -0.11176228523254395, -0.2996078133583069, 0.03236262500286102, -0.06208329647779465, 0.5124905109405518, -0.31062743067741394, 0.12229210883378983, 0.49056416749954224, 0.17261037230491638, -0.032224543392658234, -0.4079444110393524, 0.002048783004283905, 0.2814117670059204, 0.015316538512706757, -0.0607222281396389, -0.1136624813079834, 0.27426815032958984, 0.20906411111354828, 0.27531516551971436, -0.36122408509254456, -0.15842711925506592, -0.1504039764404297, 0.16918101906776428, -0.06417572498321533, 0.13421382009983063, -0.25102782249450684, 0.18020294606685638, 0.29283854365348816, -0.37860819697380066, 0.25774911046028137, 0.4265185594558716, -0.058280620723962784, 0.08731494098901749, -0.3965604901313782, -0.14500792324543, 0.004358489066362381, 0.3966694176197052, 0.2424519807100296, 0.27579599618911743, -0.038115598261356354, -0.08459542691707611, -0.0704847201704979, -0.0672336220741272, 0.2670861482620239, 0.026362748816609383, 0.17847810685634613, 0.19486510753631592, 0.2591850757598877, -0.03625974431633949, -0.06288420408964157, 0.011651940643787384, -0.12606263160705566, 0.43578028678894043, 0.19964799284934998, -0.18666638433933258, 0.21896004676818848, 0.22614818811416626, -0.005718128755688667, -0.21573926508426666, 0.03255104646086693, -0.024415772408246994, 0.5526121854782104, -0.29400506615638733, -0.2528267502784729, -0.381340891122818, -0.286662220954895, -0.4664041996002197, -0.06473599374294281, 0.14723274111747742, 0.03992228955030441, 0.20923015475273132, 0.13892710208892822, 0.022353395819664, 0.11968137323856354, -0.2897719144821167, 0.1341593861579895, -0.14346589148044586, 0.37094709277153015, -0.04846568405628204, 0.33653780817985535, -0.126321941614151, -0.308383047580719, 0.5212362408638, -0.34818920493125916, -0.06842654943466187, -0.018086858093738556, 0.05263473838567734, 0.2370881736278534, 0.13882465660572052, -0.038501568138599396, 0.018879380077123642, 0.42199522256851196, 0.1661837100982666, 0.5769244432449341, 0.044982828199863434, 0.18227618932724, -0.2507480978965759, 0.14334416389465332, 0.2769373059272766, 0.04595913738012314, -0.018744152039289474, 0.02463926561176777, 0.050634704530239105, 0.333686888217926, -0.1352931559085846, -0.21982908248901367, -0.019352952018380165, 0.045956507325172424, 0.16804006695747375, 0.2523946762084961, -0.3185683786869049, 0.0704512745141983, -0.06957706809043884, 0.03762675076723099, -0.2946803569793701, -0.14711184799671173, 0.6089051961898804, -0.6585707068443298, -0.2512059509754181, -0.30146753787994385, 0.18523359298706055, 0.3034476637840271, 0.18686963617801666, 0.1400924026966095, -0.03293482959270477, 0.1495678871870041, -0.08834880590438843, -0.3104857802391052, 0.3264732360839844, 0.05832342430949211, 0.014991674572229385, -0.2269892543554306, -0.24365049600601196, 0.08033204078674316, -0.1614598035812378, -0.39119115471839905, -0.23922288417816162 ]
https://github.com/huggingface/datasets/issues/1796
Filter on dataset too much slowww
Hi @lhoestq, thanks a lot for the update! I would like to work on this(if possible). Could you please give me some steps regarding how should I approach this? Also any references would be great!
I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ```
35
Filter on dataset too much slowww I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ``` Hi @lhoestq, thanks a lot for the update! I would like to work on this(if possible). Could you please give me some steps regarding how should I approach this? Also any references would be great!
[ -0.22325913608074188, -0.23717479407787323, -0.10137191414833069, -0.2212723046541214, -0.11815926432609558, -0.27109676599502563, 0.2170507162809372, 0.2010406255722046, 0.26321882009506226, -0.12426690757274628, 0.02594338171184063, 0.0924709215760231, -0.1344793140888214, 0.41543421149253845, -0.22422395646572113, 0.13812708854675293, 0.10219046473503113, 0.2136337161064148, 0.39496955275535583, 0.04041743278503418, -0.04992225021123886, -0.08927275240421295, -0.34927183389663696, -0.039659470319747925, -0.09973230212926865, -0.3025130331516266, 0.2710486948490143, -0.20713016390800476, -0.2747013568878174, -0.1798931062221527, -0.12780046463012695, 0.44452226161956787, 0.04438076913356781, 0.510503351688385, -0.0001285648177145049, -0.3911033868789673, 0.2504056990146637, 0.1001027375459671, 0.2429417073726654, 0.10342501103878021, -0.17044460773468018, -0.013869352638721466, -0.0422385036945343, -0.04300978407263756, -0.20512473583221436, 0.06354289501905441, -0.2969898283481598, -0.24568502604961395, 0.44177836179733276, 0.13073386251926422, -0.031530555337667465, -0.20893649756908417, -0.3342512845993042, 0.365607887506485, 0.15819880366325378, 0.3341163396835327, 0.2002263367176056, -0.23204238712787628, 0.7129985094070435, -0.380631685256958, 0.05728965625166893, 0.4687943458557129, -0.4612022042274475, -0.1642814576625824, 0.1663939207792282, -0.3422040343284607, 0.09705150127410889, -0.31695762276649475, 0.23497873544692993, 0.16160760819911957, 0.05489926040172577, -0.059573836624622345, -0.194155752658844, -0.2686745226383209, -0.05144336447119713, -0.41133421659469604, 0.024369753897190094, 0.02770237810909748, -0.3266727328300476, -0.005014993250370026, -0.5914181470870972, -0.22906900942325592, 0.07956273853778839, 0.15833880007266998, -0.3755084276199341, 0.3691454827785492, 0.04576675221323967, 0.1162504330277443, 0.21206004917621613, -0.22090201079845428, -0.008871306665241718, -0.2438488006591797, 0.2909943759441376, 0.3610014319419861, -0.6721881628036499, -0.14676202833652496, -0.15202251076698303, 0.22741836309432983, 0.02407895401120186, 0.030429009348154068, -0.3810238838195801, 0.46262747049331665, 0.22899208962917328, -0.03738661855459213, -0.04950534179806709, 0.25711843371391296, 0.04004262387752533, 0.4814760982990265, 0.29069024324417114, -0.21201340854167938, -0.2946799695491791, 0.26420652866363525, -0.05563530698418617, 0.05697975307703018, 0.08105851709842682, -0.05000024288892746, -0.5000758767127991, -0.18385356664657593, -0.25226572155952454, -0.09087936580181122, -0.4127238094806671, -0.1132926419377327, 0.6803498864173889, 0.4572692811489105, -0.10427598655223846, -0.11267343908548355, -0.11579117178916931, -0.2260235697031021, -0.17231111228466034, 0.017263852059841156, 0.030713174492120743, -0.04089893773198128, -0.07129667699337006, 0.2082015722990036, 0.10328634083271027, -0.2786391079425812, -0.19713130593299866, 0.05663608759641647, -0.17915596067905426, 0.12438727915287018, 0.23319128155708313, -0.36222735047340393, 0.12579715251922607, 0.29226335883140564, -0.2804124653339386, 0.3101101219654083, 0.0963219404220581, 0.10133226215839386, -0.1120300143957138, 0.12188772857189178, -0.35667309165000916, -0.35088568925857544, 0.22735168039798737, 0.0005410891026258469, -0.134097158908844, 0.18802858889102936, -0.061512865126132965, 0.3487720191478729, 0.31784725189208984, -0.07511845231056213, -0.22833377122879028, -0.19558203220367432, -0.5855920314788818, -0.17659945785999298, 0.20260292291641235, 0.10492411255836487, -0.4751119315624237, 0.0284838005900383, -0.27154335379600525, 0.22248227894306183, 0.5772445201873779, 0.42960140109062195, -0.03761032223701477, 0.2274302840232849, -0.011970218271017075, 0.04581634700298309, 0.1864725649356842, -0.10778985917568207, -0.3374803364276886, 0.6175448894500732, -0.056266605854034424, 0.01814836449921131, 0.18244227766990662, 0.07942773401737213, 0.5566095113754272, -0.2535971999168396, 0.5140504837036133, 0.3895155191421509, -0.22389236092567444, 0.1187872365117073, -0.02415555901825428, -0.10250955075025558, 0.14632144570350647, 0.2503083348274231, -0.28732138872146606, -0.07587648183107376, -0.0689183697104454, -0.3809666037559509, 0.16312193870544434, 0.012701857835054398, 0.042024753987789154, 0.17125359177589417, 0.22232459485530853, 0.07204083353281021, 0.006682425271719694, -0.17026257514953613, 0.10508598387241364, -0.04625820741057396, -0.05374942719936371, -0.1488959789276123, -0.20039202272891998, -0.17252172529697418, -0.2656645178794861, -0.02471347339451313, 0.07874301075935364, 0.24575145542621613, -0.11717236787080765, -0.18115296959877014, 0.12273286283016205, -0.22137153148651123, 0.03294922783970833, 0.4797143340110779, -0.06090284138917923, -0.043870292603969574, 0.16915813088417053, -0.05920770764350891, 0.3424619138240814, -0.10639255493879318, 0.17349757254123688, 0.025779344141483307, 0.38245365023612976, 0.02907928265631199, 0.056199878454208374, 0.15399879217147827, 0.5008611679077148, -0.29725581407546997, -0.31817135214805603, 0.1977280080318451, 0.15970081090927124, 0.3612355887889862, 0.1316302865743637, -0.00021623075008392334, 0.13546420633792877, -0.1236887127161026, -0.1549275815486908, 0.5454075932502747, -0.053555894643068314, 0.4203178882598877, 0.08233493566513062, -0.08754511922597885, 0.3095546364784241, 0.1718757599592209, -0.08621781319379807, -0.20819440484046936, 0.49907416105270386, 0.00994148850440979, 0.11851556599140167, 0.22848647832870483, -0.09181168675422668, 0.3100968301296234, -0.0800570398569107, -0.31861433386802673, -0.06417141109704971, 0.24825233221054077, 0.18123114109039307, 0.09844455868005753, 0.15864771604537964, 0.0020329318940639496, 0.03980514407157898, 0.19188819825649261, -0.18315517902374268, -0.1524600386619568, 0.057969290763139725, -0.0452517569065094, 0.24824324250221252, 0.10293256491422653, 0.23499298095703125, -0.24010208249092102, 0.2459307312965393, -0.12510240077972412, -0.09440590441226959, -0.2840256690979004, 0.21946240961551666, 0.32564210891723633, -0.24402834475040436, 0.02392025850713253, -0.3518039584159851, -0.5618377327919006, 0.2367311716079712, -0.11627652496099472, 0.19073230028152466, 0.046148136258125305, 0.17311057448387146, 0.05924372002482414, 0.2729848325252533, 0.10839246213436127, 0.12523441016674042, 0.20776055753231049, 0.21719622611999512, -0.4810006022453308, -0.08595295995473862, -0.12250255048274994, -0.04257214069366455, -0.05575688183307648, 0.2693714201450348, 0.3339887261390686, 0.38476699590682983, 0.3141936957836151, -0.08848355710506439, -0.10100774466991425, -0.537743866443634, -0.1589837521314621, -0.011544380336999893, 0.13840068876743317, 0.12581786513328552, 0.14135430753231049, -0.3182440400123596, -0.11008789390325546, -0.029523665085434914, 0.014933360740542412, -0.14765484631061554, 0.07105882465839386, -0.1946248710155487, 0.06870690733194351, 0.09519506990909576, 0.15885180234909058, -0.2754659950733185, -0.02164470963180065, -0.20914049446582794, -0.06342830508947372, 0.2852962613105774, -0.30942562222480774, -0.10390493273735046, -0.23306205868721008, -0.2694723308086395, -0.05918131768703461, 0.020296191796660423, -0.19948223233222961, 0.3012116253376007, 0.2786201238632202, -0.015241000801324844, -0.11886012554168701, -0.08239854872226715, -0.3379763066768646, 0.5511600375175476, -0.2442275583744049, 0.13223297894001007, -0.41375982761383057, -0.2447473406791687, 0.18385182321071625, -0.02070327289402485, 0.2712528109550476, -0.14468158781528473, 0.16340793669223785, 0.0291760191321373, -0.3048809766769409, -0.17421236634254456, -0.1849081814289093, 0.28057292103767395, 0.2826192080974579, 0.7241309285163879, 0.05956597998738289, 0.30931952595710754, 0.15209640562534332, 0.10171681642532349, 0.020020443946123123, 0.29099008440971375, -0.29602935910224915, -0.15415912866592407, -0.30723536014556885, -0.055512282997369766, 0.23002251982688904, 0.03846962749958038, 0.07366245239973068, 0.19577240943908691, -0.1439121961593628, -0.05057378485798836, -0.190556600689888, -0.08980794250965118, -0.15726491808891296, 0.12001726031303406, -0.1579788327217102, 0.3066352307796478, 0.2318648397922516, -0.04159669578075409, -0.47781258821487427, -0.3692713975906372, -0.2999548614025116, 0.05675988271832466, 0.16367599368095398, -0.17932729423046112, -0.5062665939331055, -0.1932203769683838, -0.3967067003250122, 0.3647087812423706, 0.22953522205352783, 0.2669987976551056, 0.05955683812499046, 0.11408106237649918, 0.15581221878528595, 0.0067114755511283875, 0.8524823188781738, -0.19201168417930603, 0.023332504555583, 0.08289019763469696, -0.5679080486297607, -0.26043474674224854, 0.10366259515285492, -0.05059399828314781, 0.07528562843799591, 0.4103423058986664, 0.37721356749534607, -0.31345266103744507, -0.34402161836624146, -0.07112191617488861, 0.11384941637516022, 0.001797690987586975, -0.3690674602985382, -0.14020459353923798, -0.1703852415084839, -0.39785337448120117, 0.304578572511673, -0.0218945425003767, 0.2939121425151825, 0.2943229079246521, -0.3785954415798187, 0.03548295423388481, -0.22475063800811768, 0.33013230562210083, -0.022129250690340996, -0.03954073786735535, 0.1572960913181305, 0.24578678607940674, -0.029370062053203583, 0.1350734829902649, -0.013534018769860268, -0.24455004930496216, -0.02182973548769951, 0.05948507785797119, 0.07438494265079498, 0.060403693467378616, 0.40147534012794495, 0.4984531104564667, -0.15186186134815216, 0.5802792310714722, 0.0605989545583725, 0.4708738923072815, -0.0006338953971862793, 0.22095727920532227, -0.10105743259191513, 0.1881774514913559, -0.6759746670722961, -0.6206128597259521, 0.07800963521003723, 0.3929727375507355, -0.3564072251319885, 0.35247090458869934, 0.01821289211511612, -0.0792151391506195, 0.45048004388809204, 0.07719114422798157, 0.9637712836265564, -0.4372290372848511, -0.19984346628189087, -0.06991669535636902, 0.2512454390525818, 0.45949506759643555, -0.16382017731666565, 0.10896272212266922, 0.059625525027513504, -0.35019972920417786, 0.031678587198257446, -0.1563795953989029, 0.02006058767437935, 0.12833456695079803, 0.05891328677535057, 0.3597763478755951, -0.10358018428087234, 0.031733304262161255, 0.026194004341959953, 0.319173663854599, 0.2932696044445038, -0.3782019317150116, -0.20348511636257172, -0.05861658230423927, 0.10965856164693832, -0.06137679144740105, 0.014826487749814987, 0.027500620111823082, 0.25581079721450806, -0.21309727430343628, -0.20444273948669434, -0.47727513313293457, -0.363892525434494, -0.04886717349290848, -0.1867700070142746, -0.14381256699562073, 0.21862980723381042, -0.1526259332895279, -0.16496725380420685, 0.480214923620224, 0.03897925838828087, 0.20178700983524323, 0.2481418251991272, 0.21521928906440735, -0.053440727293491364, -0.4122675955295563, 0.19807632267475128, -0.15808382630348206, -0.19725582003593445, 0.03468284383416176, -0.02307022362947464, -0.438770055770874, -0.07077229022979736, 0.1300196647644043, 0.5020983815193176, -0.013239802792668343, -0.23614676296710968, 0.016324244439601898, 0.01431293785572052, -0.16384415328502655, -0.0382704921066761, 0.1546008288860321, 0.06255263835191727, 0.7133424878120422, -0.0507526658475399, -0.25935208797454834, -0.13698044419288635, 0.10915549099445343, 0.28424105048179626, -0.29612213373184204, 0.2912367880344391, 0.25620341300964355, -0.40521329641342163, -0.0958549976348877, 0.0017620474100112915, 0.15058299899101257, 0.3448655307292938, 0.07075528055429459, 0.013375689275562763, -0.28650087118148804, 0.46179455518722534, 0.044070590287446976, -0.12935031950473785, 0.010185152292251587, 0.03205593302845955, -0.6088472604751587, -0.23428285121917725, 0.026758894324302673, -0.1145530641078949, -0.2240063101053238, 0.08854810148477554, 0.24160829186439514, -0.24067197740077972, 0.41817623376846313, -0.15261659026145935, -0.11680039018392563, -0.08881916850805283, 0.20306651294231415, -0.15777912735939026, 0.18535763025283813, -0.10404942184686661, 0.07843688130378723, -0.018810199573636055, 0.09550514072179794, 0.01526721753180027, -0.11423119157552719, 0.1285606026649475, 0.19383224844932556, -0.15487581491470337, -0.26065218448638916, 0.30265310406684875, -0.2994531989097595, -0.25195732712745667, -0.1618526577949524, 0.10723038017749786, -0.010806530714035034, 0.04211822897195816, -0.6664255261421204, 0.07690242677927017, -0.47226080298423767, -0.12893015146255493, 0.10475516319274902, -0.12171582877635956, -0.29347676038742065, 0.07197244465351105, 0.19842498004436493, 0.14541739225387573, -0.038679465651512146, 0.024516664445400238, -0.04943551868200302, 0.1481594741344452, -0.09426476806402206, 0.2428966462612152, 0.04605230316519737, -0.07410968840122223, 0.2221633642911911, 0.12829184532165527, 0.17908714711666107, 0.05104677379131317, -0.13734902441501617, 0.4848507344722748, -0.07222109287977219, -0.26333117485046387, -0.16311144828796387, 0.188816636800766, 0.1910991072654724, 0.14438854157924652, 0.19004574418067932, -0.22810839116573334, 0.35562339425086975, -0.20770196616649628, 0.10156229138374329, 0.42563021183013916, -0.043953314423561096, -0.23593656718730927, 0.30744388699531555, 0.4016706943511963, -0.2210455983877182, 0.4385538697242737, 0.35837697982788086, -0.21036264300346375, 0.569477379322052, 0.18778398633003235, 0.33173492550849915, 0.3427177667617798, 0.5315775871276855, -0.2716268301010132, -0.4087200164794922, -0.11573216319084167, 0.7702451944351196, -0.21437931060791016, -0.20233505964279175, 0.023453406989574432, -0.17921021580696106, 0.34024763107299805, -0.3415474593639374, 0.11711815744638443, 0.4425210952758789, 0.15986043214797974, -0.04638778045773506, -0.3591223657131195, 0.013179898262023926, 0.22818052768707275, -0.03510197997093201, -0.007809702306985855, -0.002396687865257263, 0.18590444326400757, 0.17835098505020142, 0.29478782415390015, -0.30256175994873047, -0.2355213463306427, -0.14437741041183472, 0.19003495573997498, -0.057670287787914276, 0.1548185795545578, -0.26527148485183716, 0.2569807171821594, 0.3399113416671753, -0.3875882625579834, 0.21728786826133728, 0.40522390604019165, -0.042587149888277054, 0.10670442879199982, -0.36312273144721985, -0.1419581174850464, 0.03621417284011841, 0.4347563683986664, 0.1995791494846344, 0.20689092576503754, -0.03380279242992401, -0.07828237861394882, -0.07121405005455017, -0.08117976784706116, 0.22535261511802673, 0.0657971203327179, 0.16575561463832855, 0.26832640171051025, 0.2842906415462494, 0.05914851278066635, -0.12832361459732056, 0.05114353448152542, -0.1705757975578308, 0.3852055072784424, 0.18347688019275665, -0.25592121481895447, 0.24722415208816528, 0.24674703180789948, 0.00768880732357502, -0.24888727068901062, 0.015453226864337921, -0.08182995021343231, 0.44007477164268494, -0.3028717339038849, -0.30425316095352173, -0.35082337260246277, -0.3383077383041382, -0.3466264009475708, -0.03246912360191345, 0.09991283714771271, -0.0025635678321123123, 0.21688824892044067, 0.02812253311276436, 0.008896157145500183, 0.10925114154815674, -0.2460719645023346, 0.050751328468322754, -0.13834929466247559, 0.371456503868103, -0.017539173364639282, 0.3514019846916199, -0.08003703504800797, -0.3021310269832611, 0.4744022786617279, -0.2545793652534485, -0.0477556511759758, 0.05381741747260094, 0.08246880769729614, 0.13599006831645966, 0.03716403245925903, -0.11615471541881561, 0.042288877069950104, 0.4236676096916199, 0.1289808750152588, 0.5541149377822876, 0.029975123703479767, 0.16747628152370453, -0.23478683829307556, 0.17208223044872284, 0.3191390335559845, 0.1437343955039978, -0.04285472631454468, 0.0912509560585022, 0.07905890792608261, 0.2254437506198883, -0.1339898407459259, -0.28027477860450745, -0.10511059314012527, 0.08574465662240982, 0.13730072975158691, 0.30073216557502747, -0.25849172472953796, 0.15119242668151855, -0.03683990240097046, 0.05017927289009094, -0.24065300822257996, -0.12170524150133133, 0.5517169237136841, -0.5196545720100403, -0.27072691917419434, -0.3539074957370758, 0.25054919719696045, 0.2827969789505005, 0.20325927436351776, 0.11905641108751297, -0.05112231895327568, 0.11351719498634338, -0.1275111734867096, -0.29638856649398804, 0.31600984930992126, 0.01048317365348339, -0.024407923221588135, -0.20603497326374054, -0.2654218375682831, 0.08935803174972534, -0.13348925113677979, -0.32160404324531555, -0.15052714943885803 ]
https://github.com/huggingface/datasets/issues/1796
Filter on dataset too much slowww
I just played a bit with it to make sure using `table.filter()` is fine, but actually it seems to create a new table **in memory** :/ This is an issue since it can quickly fill the RAM, and `datasets`'s role is to make sure you can load bigger-than-memory datasets. Therefore I don't think it's a good idea in the end to use `table.filter()` Anyway I just ran OP's code an it runs in 20ms now on my side thanks to the I/O optimizations we did. Another way to speed up `filter` is to add support pyarrow expressions though, using e.g. arrow formatting + dataset.filter (runs in 10ms on my side): ```python import pyarrow.dataset as pds import pyarrow.compute as pc expr = pc.field("flag") == True filtered = dataset.with_format("arrow").filter( lambda t: pds.dataset(t).to_table(columns={"mask": expr})[0].to_numpy(), batched=True, ).with_format(None) ```
I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ```
134
Filter on dataset too much slowww I have a dataset with 50M rows. For pre-processing, I need to tokenize this and filter rows with the large sequence. My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes. When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column. Below are the variants I tried. 1. filter() with batch size 1024, single process (takes roughly 3 hr) 2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯) 3. filter() with loading all data in memory, only a single boolean column (never ends). Can someone please help? Below is a sample code for small dataset. ``` from datasets import load_dataset dataset = load_dataset('glue', 'mrpc', split='train') dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1}) def _amplify(data): return data dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag']) ``` I just played a bit with it to make sure using `table.filter()` is fine, but actually it seems to create a new table **in memory** :/ This is an issue since it can quickly fill the RAM, and `datasets`'s role is to make sure you can load bigger-than-memory datasets. Therefore I don't think it's a good idea in the end to use `table.filter()` Anyway I just ran OP's code an it runs in 20ms now on my side thanks to the I/O optimizations we did. Another way to speed up `filter` is to add support pyarrow expressions though, using e.g. arrow formatting + dataset.filter (runs in 10ms on my side): ```python import pyarrow.dataset as pds import pyarrow.compute as pc expr = pc.field("flag") == True filtered = dataset.with_format("arrow").filter( lambda t: pds.dataset(t).to_table(columns={"mask": expr})[0].to_numpy(), batched=True, ).with_format(None) ```
[ -0.2673695981502533, -0.13105353713035583, -0.09514795243740082, -0.22679008543491364, -0.08441463112831116, -0.23327025771141052, 0.201918363571167, 0.25106438994407654, 0.21100401878356934, -0.16824956238269806, -0.047436922788619995, 0.23496004939079285, -0.049702927470207214, 0.3456457257270813, -0.2173582762479782, 0.1632256805896759, 0.09360591322183609, 0.21968983113765717, 0.420087069272995, 0.08421145379543304, -0.08659420907497406, -0.16477656364440918, -0.3132607936859131, 0.015203773975372314, -0.12129735946655273, -0.28945690393447876, 0.23680731654167175, -0.21521630883216858, -0.3018399775028229, -0.22839391231536865, -0.0763426348567009, 0.44351017475128174, 0.034050650894641876, 0.46199315786361694, -0.00012505035556387156, -0.3141569495201111, 0.2272423505783081, 0.12256665527820587, 0.11938542127609253, 0.1426483690738678, -0.0811072513461113, -0.00992916151881218, -0.03350725769996643, -0.06705929338932037, -0.13088032603263855, -0.015256288461387157, -0.28524067997932434, -0.18546786904335022, 0.350035697221756, 0.10380974411964417, 0.003985408693552017, -0.14524289965629578, -0.34336456656455994, 0.39937448501586914, 0.22762563824653625, 0.3174082934856415, 0.14935468137264252, -0.15656879544258118, 0.6654061079025269, -0.4506109058856964, -0.0340433344244957, 0.42752906680107117, -0.5438631176948547, -0.14410023391246796, 0.16699770092964172, -0.23927758634090424, 0.09190326929092407, -0.21146991848945618, 0.21911141276359558, 0.12024826556444168, 0.08428347110748291, -0.18822523951530457, -0.22394831478595734, -0.2923582196235657, -0.08132397383451462, -0.41691699624061584, 0.028572048991918564, 0.020151831209659576, -0.37208572030067444, 0.010203897953033447, -0.5675948858261108, -0.18655085563659668, 0.10539436340332031, 0.17053018510341644, -0.4005257189273834, 0.3257178068161011, 0.09884391725063324, 0.19008466601371765, 0.2211097776889801, -0.1979563981294632, 0.05369563028216362, -0.3202624022960663, 0.2858794331550598, 0.3426453173160553, -0.6249743103981018, -0.11254967004060745, -0.09011698514223099, 0.23044002056121826, 0.04743220657110214, 0.030818743631243706, -0.2981930375099182, 0.4493665099143982, 0.2766624689102173, -0.0200001522898674, -0.002579072490334511, 0.22374089062213898, 0.01201464980840683, 0.479282945394516, 0.3064260482788086, -0.19164924323558807, -0.23058398067951202, 0.25529998540878296, -0.020541086792945862, 0.06296484917402267, 0.14414861798286438, -0.13240256905555725, -0.44878798723220825, -0.11318694055080414, -0.28426215052604675, -0.10118953138589859, -0.41376790404319763, -0.08299200981855392, 0.6460815072059631, 0.48152750730514526, -0.10557567328214645, -0.1398545801639557, -0.08919325470924377, -0.2456205040216446, -0.18339025974273682, 0.026283420622348785, 0.00953374058008194, -0.10273018479347229, -0.08292484283447266, 0.2502753436565399, 0.14457106590270996, -0.26166993379592896, -0.2249569296836853, 0.04694944992661476, -0.1859518140554428, 0.22637933492660522, 0.15790025889873505, -0.3818837106227875, 0.16235728561878204, 0.32989615201950073, -0.2944331765174866, 0.2519751489162445, 0.1297493427991867, 0.034305721521377563, -0.14925436675548553, 0.22312995791435242, -0.2992092967033386, -0.33566442131996155, 0.24892009794712067, 0.0322817787528038, -0.19672057032585144, 0.14479517936706543, -0.13843077421188354, 0.38882026076316833, 0.3223252594470978, -0.14290893077850342, -0.21374231576919556, -0.22605349123477936, -0.5855768918991089, -0.2159876823425293, 0.26707348227500916, 0.10033781081438065, -0.5621735453605652, 0.0303773432970047, -0.2514854371547699, 0.21023592352867126, 0.5481117367744446, 0.4152083694934845, -0.0889846533536911, 0.30056414008140564, -0.03299422562122345, 0.07629138231277466, 0.19085431098937988, -0.06016530096530914, -0.4215404689311981, 0.6062893867492676, -0.014122109860181808, 0.09761330485343933, 0.13908439874649048, 0.11128941178321838, 0.5630820989608765, -0.23979632556438446, 0.5061318874359131, 0.3906733989715576, -0.24499419331550598, 0.15718507766723633, -0.06052983179688454, -0.10485105216503143, 0.25066661834716797, 0.26830583810806274, -0.28457891941070557, -0.08477369695901871, -0.052797310054302216, -0.3610105812549591, 0.20657089352607727, 0.038721732795238495, 0.033251285552978516, 0.11562775075435638, 0.26573407649993896, 0.06441456079483032, 0.027317669242620468, -0.22133809328079224, 0.04749974235892296, 0.0029993392527103424, -0.019031662493944168, -0.11512580513954163, -0.2548447847366333, -0.21147508919239044, -0.19490715861320496, 0.01211448572576046, 0.021025851368904114, 0.23688571155071259, -0.07085955142974854, -0.24441975355148315, 0.1407569944858551, -0.202321857213974, 0.05026884749531746, 0.4569087624549866, -0.10070756822824478, -0.05473366752266884, 0.18797120451927185, 0.037874191999435425, 0.33826199173927307, -0.1435876041650772, 0.12374645471572876, 0.00252581387758255, 0.29581040143966675, 0.09299776703119278, 0.08149155229330063, 0.17070552706718445, 0.5021114349365234, -0.31078535318374634, -0.35965225100517273, 0.18306337296962738, 0.14986030757427216, 0.3493472635746002, 0.15450012683868408, -0.04519198462367058, 0.16236619651317596, -0.1252673715353012, -0.18367531895637512, 0.4941033124923706, -0.06682789325714111, 0.4406777024269104, 0.09598143398761749, -0.09702654927968979, 0.2834034264087677, 0.20933830738067627, -0.041592344641685486, -0.13458925485610962, 0.4462980031967163, 0.052926670759916306, 0.13065165281295776, 0.3023645877838135, -0.05229587107896805, 0.29880642890930176, -0.04692729189991951, -0.34081509709358215, -0.06801163405179977, 0.2716045379638672, 0.17346873879432678, 0.03394487500190735, 0.19486412405967712, -0.07071546465158463, 0.10780130326747894, 0.2617996633052826, -0.18545040488243103, -0.13781073689460754, -0.02786044031381607, -0.03784456104040146, 0.29440873861312866, 0.1602082997560501, 0.2665880024433136, -0.2635217607021332, 0.2705846428871155, -0.1317445933818817, -0.1415356546640396, -0.27813735604286194, 0.2528950572013855, 0.35144293308258057, -0.3131694495677948, 0.06795506924390793, -0.3622576594352722, -0.5649917125701904, 0.28955939412117004, -0.09327571094036102, 0.14728674292564392, 0.023044930770993233, 0.21199136972427368, 0.08654019236564636, 0.22858339548110962, 0.1470118761062622, 0.13431555032730103, 0.18524298071861267, 0.17321807146072388, -0.5815252661705017, -0.1599767655134201, -0.2512102425098419, -0.10263156145811081, -0.025086572393774986, 0.294375479221344, 0.3152298033237457, 0.3613807260990143, 0.3105258047580719, -0.09953822940587997, -0.14932651817798615, -0.5072212219238281, -0.15547706186771393, -0.09807959198951721, 0.15755274891853333, 0.1441718488931656, 0.1418897658586502, -0.3449413776397705, -0.11238811910152435, 0.02550833486020565, -0.008682973682880402, -0.21712948381900787, 0.1215498298406601, -0.2103809118270874, 0.06157999485731125, 0.11830413341522217, 0.12470053136348724, -0.19929350912570953, -0.05238068103790283, -0.18230129778385162, -0.15325519442558289, 0.2658999562263489, -0.2250516414642334, -0.035896990448236465, -0.20634295046329498, -0.3108619749546051, -0.06868193298578262, 0.014717550948262215, -0.07845522463321686, 0.25502654910087585, 0.3319011628627777, -0.032992783933877945, -0.16712653636932373, -0.11456035822629929, -0.3480570614337921, 0.5932300090789795, -0.2784910202026367, 0.15279491245746613, -0.41292646527290344, -0.12897995114326477, 0.16908292472362518, -0.00820043496787548, 0.2884534001350403, -0.10442884266376495, 0.13087457418441772, 0.05140388011932373, -0.35306215286254883, -0.23709717392921448, -0.19719427824020386, 0.23729991912841797, 0.2691524028778076, 0.7437124848365784, 0.12315875291824341, 0.32494598627090454, 0.10986603796482086, 0.10538344085216522, 0.029165111482143402, 0.2250826507806778, -0.2102348953485489, -0.17191901803016663, -0.3299446403980255, -0.0805550143122673, 0.12135149538516998, 0.0310966819524765, 0.07419119030237198, 0.12820833921432495, -0.2277257740497589, -0.04887659475207329, -0.17656227946281433, -0.06352265179157257, -0.16150589287281036, 0.11605342477560043, -0.121450275182724, 0.2561799883842468, 0.26264524459838867, -0.08002597838640213, -0.49499794840812683, -0.4186917245388031, -0.2907724380493164, 0.00937245786190033, 0.11957422643899918, -0.2049635648727417, -0.5215651988983154, -0.17791080474853516, -0.4020521342754364, 0.3356677293777466, 0.25270864367485046, 0.24819815158843994, 0.08379939198493958, 0.05505333095788956, 0.14890164136886597, 0.018831506371498108, 0.8904684782028198, -0.13971295952796936, -0.010350681841373444, 0.12662509083747864, -0.5282155275344849, -0.4006894528865814, 0.0956786721944809, -0.08576110750436783, 0.10543295741081238, 0.3216360807418823, 0.37554338574409485, -0.328337699174881, -0.3031870126724243, -0.0560574010014534, 0.14894463121891022, -0.01631181687116623, -0.38062167167663574, -0.22443020343780518, -0.19964826107025146, -0.3823230266571045, 0.2773374617099762, -0.017264757305383682, 0.30029040575027466, 0.31349441409111023, -0.32584020495414734, 0.06920012831687927, -0.20228952169418335, 0.29098477959632874, 0.027666550129652023, 0.00022227875888347626, 0.15534619987010956, 0.31888243556022644, -0.09404979646205902, 0.14646844565868378, 0.05462392419576645, -0.16912159323692322, -0.025257732719182968, 0.03352770581841469, 0.05091436952352524, 0.12301181256771088, 0.39342424273490906, 0.45900827646255493, -0.13943524658679962, 0.5495845079421997, 0.008720831014215946, 0.4130415916442871, -0.016484640538692474, 0.18030285835266113, -0.1340445578098297, 0.12831804156303406, -0.6327052712440491, -0.5836957097053528, 0.13184309005737305, 0.38758137822151184, -0.3210221529006958, 0.4291946291923523, 0.041267260909080505, -0.06862860918045044, 0.44259166717529297, 0.07788696885108948, 0.8860132098197937, -0.4550670385360718, -0.13187867403030396, 0.013580386526882648, 0.19654355943202972, 0.4168006181716919, -0.18760032951831818, 0.13624636828899384, 0.0454995222389698, -0.3458169102668762, 0.08438942581415176, -0.15303528308868408, 0.00033143162727355957, 0.1098417341709137, 0.041595857590436935, 0.2904895544052124, -0.05347955971956253, 0.09652389585971832, 0.11547577381134033, 0.3170221447944641, 0.2430354356765747, -0.3615165948867798, -0.20591005682945251, -0.02578502520918846, 0.08385636657476425, -0.14756141602993011, 0.0284200981259346, 0.0968673899769783, 0.17811499536037445, -0.19723491370677948, -0.22472038865089417, -0.4527212679386139, -0.38127845525741577, 0.017043057829141617, -0.1946861743927002, -0.12824910879135132, 0.14582152664661407, -0.10897527635097504, -0.2975471019744873, 0.3944481909275055, 0.05983705818653107, 0.18788577616214752, 0.2313758134841919, 0.28529277443885803, 0.0124323396012187, -0.4340667426586151, 0.18807372450828552, -0.14253650605678558, -0.253178209066391, 0.05260951817035675, -0.02880089357495308, -0.4741482734680176, -0.05854272097349167, 0.1639276146888733, 0.4915916919708252, -0.013956362381577492, -0.1755019575357437, -0.06426189839839935, 0.04698440060019493, -0.1843586415052414, -0.0032822471112012863, 0.09662563353776932, 0.08976482599973679, 0.7228676676750183, -0.0693812221288681, -0.2967400550842285, -0.15498724579811096, 0.14968162775039673, 0.24273213744163513, -0.16606853902339935, 0.29190269112586975, 0.24871160089969635, -0.44531095027923584, -0.07857035100460052, 0.010097920894622803, 0.21874462068080902, 0.2993064820766449, 0.09417137503623962, -0.05255197361111641, -0.22517350316047668, 0.4331197738647461, 0.03279513865709305, -0.09725502133369446, -0.028846710920333862, 0.02307666465640068, -0.5408028364181519, -0.1952240914106369, 0.11671236157417297, -0.04944534972310066, -0.2001798301935196, 0.13380497694015503, 0.24999180436134338, -0.1986631155014038, 0.38815951347351074, -0.1870647668838501, -0.12370701879262924, -0.0477890744805336, 0.19673039019107819, -0.2923111021518707, 0.21004146337509155, -0.06466327607631683, 0.024249698966741562, 0.021227600052952766, 0.10611783713102341, 0.03931957110762596, -0.1712036430835724, 0.16041100025177002, 0.1817561388015747, -0.15519878268241882, -0.27049100399017334, 0.2470991611480713, -0.3150636553764343, -0.23273268342018127, -0.19181756675243378, 0.14783692359924316, 0.035180412232875824, 0.014971759170293808, -0.6456422209739685, 0.154351606965065, -0.4909718930721283, -0.0950133353471756, 0.11198174953460693, -0.19342344999313354, -0.29488587379455566, 0.09055852144956589, 0.20373383164405823, 0.16291427612304688, -0.0021348148584365845, 0.07087209075689316, -0.02231328934431076, 0.09218267351388931, -0.13050487637519836, 0.2599804699420929, 0.0018236637115478516, -0.09004692733287811, 0.17952431738376617, 0.1506570279598236, 0.2724940776824951, 0.06777483969926834, -0.20030513405799866, 0.4682445526123047, -0.03680139034986496, -0.27049189805984497, -0.20074953138828278, 0.2049725204706192, 0.14940078556537628, 0.16186873614788055, 0.17310389876365662, -0.23538631200790405, 0.3576614260673523, -0.20492099225521088, 0.10378331691026688, 0.4602569341659546, -0.002922791987657547, -0.28563669323921204, 0.3224039673805237, 0.40882816910743713, -0.18394605815410614, 0.4336753189563751, 0.367404967546463, -0.18421554565429688, 0.5177452564239502, 0.18657186627388, 0.28834834694862366, 0.2613758444786072, 0.5402333736419678, -0.25254496932029724, -0.3843666911125183, -0.12809006869792938, 0.699894368648529, -0.27306583523750305, -0.2591659128665924, 0.010639563202857971, -0.18518874049186707, 0.3854624032974243, -0.3282250761985779, 0.10389319807291031, 0.34173738956451416, 0.13211515545845032, -0.013749239966273308, -0.36763134598731995, -0.011058531701564789, 0.24017086625099182, -0.015470502898097038, -0.05634862557053566, -0.09357832372188568, 0.1855621635913849, 0.09849397093057632, 0.24548551440238953, -0.31152665615081787, -0.13802319765090942, -0.13443315029144287, 0.1416531354188919, -0.06440043449401855, 0.07483180612325668, -0.264650821685791, 0.2036229819059372, 0.31331896781921387, -0.352178156375885, 0.24817928671836853, 0.43393054604530334, -0.061296720057725906, 0.10441690683364868, -0.3679426908493042, -0.14938655495643616, -0.015971392393112183, 0.4172421395778656, 0.19644631445407867, 0.22471806406974792, -0.0022217361256480217, -0.024623066186904907, -0.08875015377998352, -0.17054666578769684, 0.2790001332759857, 0.07228395342826843, 0.1108568012714386, 0.26653021574020386, 0.2630123496055603, 0.01796317845582962, -0.03266894072294235, 0.04154951497912407, -0.14806684851646423, 0.3946837782859802, 0.27533844113349915, -0.2542095184326172, 0.2110861837863922, 0.26118505001068115, 0.027555957436561584, -0.20641307532787323, 0.04989636689424515, -0.004098210483789444, 0.42918679118156433, -0.33056020736694336, -0.24945275485515594, -0.3923063576221466, -0.32554617524147034, -0.44040361046791077, -0.038557738065719604, 0.2030990570783615, 0.050181202590465546, 0.2115694284439087, 0.1146230548620224, -0.007740303874015808, 0.11309394240379333, -0.27202603220939636, 0.02757815271615982, -0.13319316506385803, 0.28332775831222534, -0.04402134567499161, 0.3190276622772217, -0.12682583928108215, -0.3491595685482025, 0.4632296860218048, -0.23889198899269104, -0.007983949035406113, -0.0032420530915260315, 0.06629665195941925, 0.23143479228019714, 0.10558417439460754, -0.06679488718509674, 0.025653399527072906, 0.41219639778137207, 0.16265270113945007, 0.5851616859436035, 0.025377638638019562, 0.17697679996490479, -0.24608071148395538, 0.1993807554244995, 0.230902299284935, 0.06367502361536026, -0.050447821617126465, 0.014127904549241066, 0.0538187250494957, 0.2567679286003113, -0.12455014884471893, -0.19787456095218658, -0.09122182428836823, 0.0326119065284729, 0.19630774855613708, 0.29103973507881165, -0.3147174119949341, 0.09966889023780823, -0.06756915897130966, 0.11514687538146973, -0.2713523507118225, -0.12486553937196732, 0.5381885766983032, -0.6000987887382507, -0.26240167021751404, -0.2992067039012909, 0.2136402428150177, 0.2627859115600586, 0.19287683069705963, 0.10375779122114182, -0.09585830569267273, 0.18135330080986023, -0.15332373976707458, -0.32029929757118225, 0.30322712659835815, -0.017008520662784576, 0.027806777507066727, -0.2428797036409378, -0.24328303337097168, 0.016960956156253815, -0.1746283322572708, -0.32835066318511963, -0.1989007294178009 ]
https://github.com/huggingface/datasets/issues/1790
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
Hi ! Apache Beam is a framework used to define data transformation pipelines. These pipeline can then be run in many runtimes: DataFlow, Spark, Flink, etc. There also exist a local runner called the DirectRunner. Wikipedia is a dataset that requires some parsing, so to allow the processing to be run on this kind of runtime we're using Apache Beam. At Hugging Face we've already processed certain versions of wikipedia (the `20200501.en` one for example) so that users can directly download the processed version instead of using Apache Beam to process it. However for the japanese language we haven't processed it so you'll have to run the processing on your side. So you do need Apache Beam to process `20200501.ja`. You can install Apache Beam with ``` pip install apache-beam ``` I think we can probably improve the error message to let users know of this subtlety. What #498 implied is that Apache Beam is not needed when you process a dataset that doesn't use Apache Beam.
```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
167
ModuleNotFoundError: No module named 'apache_beam', when specific languages. ```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct? Hi ! Apache Beam is a framework used to define data transformation pipelines. These pipeline can then be run in many runtimes: DataFlow, Spark, Flink, etc. There also exist a local runner called the DirectRunner. Wikipedia is a dataset that requires some parsing, so to allow the processing to be run on this kind of runtime we're using Apache Beam. At Hugging Face we've already processed certain versions of wikipedia (the `20200501.en` one for example) so that users can directly download the processed version instead of using Apache Beam to process it. However for the japanese language we haven't processed it so you'll have to run the processing on your side. So you do need Apache Beam to process `20200501.ja`. You can install Apache Beam with ``` pip install apache-beam ``` I think we can probably improve the error message to let users know of this subtlety. What #498 implied is that Apache Beam is not needed when you process a dataset that doesn't use Apache Beam.
[ 0.19116747379302979, 0.001794174313545227, -0.004189051687717438, 0.1869833618402481, 0.2713821232318878, 0.13962045311927795, 0.4213479161262512, 0.39503633975982666, 0.22947999835014343, 0.17810600996017456, 0.1076996847987175, -0.09141673147678375, 0.05334886163473129, -0.10924605280160904, 0.10173619538545609, -0.4603557288646698, 0.3123893737792969, 0.07550092041492462, -0.10318264365196228, -0.18625809252262115, -0.34736964106559753, 0.08449618518352509, -0.33946049213409424, 0.20371706783771515, -0.22645092010498047, 0.17298154532909393, -0.12237975001335144, 0.07952448725700378, 0.07966959476470947, -0.31025978922843933, 0.06957671791315079, -0.25269442796707153, -0.0015346435829997063, 0.37892377376556396, -0.00011232009273953736, 0.1725938320159912, 0.49421197175979614, -0.18687522411346436, -0.352848082780838, -0.20018990337848663, -0.04407370835542679, -0.5268992185592651, 0.027045097202062607, -0.49956566095352173, -0.11857372522354126, -0.3200567960739136, 0.12484160810709, -0.33069688081741333, 0.6608894467353821, 0.20979981124401093, 0.18214568495750427, 0.35443007946014404, 0.04792057350277901, -0.08674654364585876, 0.42749452590942383, 0.0936124324798584, -0.14903470873832703, -0.041964467614889145, -0.08310627937316895, 0.011951999738812447, -0.0941680297255516, 0.5700818300247192, -0.32362982630729675, -0.039385292679071426, 0.22923845052719116, -0.22271586954593658, 0.05665772408246994, -0.6094751358032227, 0.17761671543121338, 0.3224819302558899, 0.786533534526825, -0.1351766586303711, -0.22218148410320282, -0.1530815064907074, -0.10984306782484055, 0.2351427525281906, 0.1595035046339035, 0.10914964228868484, -0.21486176550388336, 0.04631659388542175, 0.4381084740161896, -0.2706960439682007, -0.14768147468566895, 0.07335202395915985, 0.13023968040943146, 0.4315975606441498, 0.07065276056528091, 0.3176281452178955, -0.05453471466898918, -0.08605649322271347, -0.11913996189832687, -0.32268965244293213, 0.25256696343421936, 0.38740965723991394, -0.11371125280857086, 0.08482255041599274, 0.10179328173398972, 0.1508980691432953, -0.03670096397399902, -0.2810487151145935, -0.19214215874671936, 0.11588084697723389, 0.10534121096134186, 0.10820585489273071, 0.12434369325637817, 0.12745700776576996, 0.38802918791770935, -0.02576257660984993, 0.3348398208618164, -0.21627120673656464, 0.1098150908946991, 0.04427042603492737, 0.02997812256217003, -0.28030678629875183, -0.33387279510498047, 0.22260189056396484, 0.3565320372581482, -0.09053703397512436, -0.05768384039402008, 0.04825495183467865, -0.45678529143333435, -0.3259345591068268, -0.22219064831733704, 0.3378888964653015, 0.13258621096611023, 0.4152708351612091, 0.13528627157211304, 0.234564870595932, -0.2575582265853882, -0.45465216040611267, -0.03230150416493416, 0.3424353301525116, -0.4076472520828247, 0.19766373932361603, -0.04613266885280609, 0.014478405937552452, 0.21953672170639038, -0.15526354312896729, 0.13262735307216644, 0.18207871913909912, -0.09000471979379654, -0.08568254113197327, -0.04574621468782425, 0.4503147304058075, 0.06573352217674255, 0.4466490149497986, 0.29754701256752014, -0.12725019454956055, -0.21597886085510254, 0.22815340757369995, -0.2719880938529968, -0.2765989899635315, 0.18184275925159454, 0.059442345052957535, -0.35650795698165894, 0.20808517932891846, -0.010424338281154633, -0.07406753301620483, 0.048091333359479904, -0.08542251586914062, 0.20885780453681946, 0.051447369158267975, -0.02773362025618553, -0.2898872196674347, -0.02141081728041172, 0.7498967051506042, -0.22692471742630005, -0.0638563483953476, -0.009722942486405373, -0.14365828037261963, -0.13100826740264893, -0.004001796245574951, -0.15566186606884003, 0.28321385383605957, -0.23140259087085724, -0.021537691354751587, 0.5308305025100708, -0.5257608294487, 0.05843610316514969, 0.19441591203212738, -0.09820348769426346, 0.21029336750507355, 0.2612054944038391, 0.002673206152394414, -0.41929513216018677, -0.21953673660755157, -0.2881307601928711, 0.05064012482762337, 0.10254989564418793, -0.024672074243426323, -0.2568199336528778, -0.008170494809746742, 0.11579755693674088, 0.15370260179042816, 0.1938270479440689, 0.07872523367404938, 0.13286535441875458, 0.48238906264305115, 0.24451598525047302, -0.1990591287612915, 0.22638195753097534, 0.45654261112213135, -0.005169130861759186, 0.10912539064884186, 0.2236132174730301, 0.06444858014583588, -0.06298356503248215, 0.2775997221469879, -0.08557915687561035, 0.40199798345565796, -0.09050695598125458, -0.10033169388771057, -0.14799270033836365, -0.08852391690015793, -0.2833200991153717, -0.30085453391075134, 0.07806906849145889, 0.03529956936836243, -0.07239435613155365, 0.33164182305336, -0.2848322093486786, 0.4456299841403961, -0.12197217345237732, 0.05012856796383858, -0.5256503224372864, -0.027860058471560478, -0.23876501619815826, 0.14583764970302582, -0.033900417387485504, 0.07095451653003693, 0.2233172357082367, -0.19082896411418915, -0.04557284712791443, 0.1484088897705078, 0.10555718839168549, 0.11092324554920197, -0.07446394115686417, -0.062469691038131714, 0.14498379826545715, -0.39805513620376587, 0.3778224289417267, 0.13553600013256073, 0.12641142308712006, -0.03470742702484131, 0.11387667059898376, 0.2636615037918091, 0.15056155622005463, 0.5216038823127747, 0.02315036952495575, -0.010032057762145996, 0.04953715205192566, 0.03561180457472801, -0.34389635920524597, -0.1951044201850891, 0.2003544270992279, 0.23688320815563202, 0.2999700605869293, 0.04730053246021271, 0.1174454391002655, -0.36275726556777954, 0.5069276690483093, -0.05430052429437637, 0.175746887922287, -0.024270087480545044, -0.32469144463539124, 0.14750456809997559, 0.17114821076393127, -0.21947865188121796, 0.2410338819026947, 0.1912720948457718, -0.12601377069950104, 0.08837947249412537, 0.20260831713676453, -0.12479636073112488, 0.07009617984294891, 0.22439441084861755, 0.485219269990921, -0.035469360649585724, -0.23863673210144043, 0.048400674015283585, -0.17712247371673584, -0.07024993002414703, -0.22585465013980865, -0.032904647290706635, -0.2475072741508484, 0.16039550304412842, -0.19560469686985016, -0.6308534145355225, -0.31466805934906006, 0.04940684139728546, -0.5606012940406799, -0.28401637077331543, -0.05638524889945984, -0.20353251695632935, -0.2767913043498993, 0.22808818519115448, 0.11788421869277954, -0.04940353333950043, 0.030396843329072, -0.4305207133293152, -0.326307475566864, -0.32657089829444885, -0.30222266912460327, 0.01153174415230751, 0.24944408237934113, 0.08081476390361786, 0.186383917927742, -0.4000440239906311, 0.018786389380693436, -0.20995216071605682, -0.27236393094062805, 0.2021511048078537, -0.1723354011774063, -0.0010480638593435287, -0.01528649777173996, 0.5179563760757446, -0.056416936218738556, -0.047600679099559784, 0.4222888946533203, -0.13991649448871613, -0.19399501383304596, 0.12103050947189331, 0.141962468624115, 0.08176278322935104, 0.04713441804051399, -0.5049290657043457, -0.11541881412267685, -0.4123275876045227, -0.08730904757976532, 0.08327364921569824, 0.1298004537820816, 0.24180562794208527, 0.1741643100976944, 0.22126759588718414, 0.04403748735785484, 0.019462667405605316, 0.0029395048040896654, -0.007900748401880264, 0.2857334017753601, -0.13340222835540771, -0.3504650294780731, 0.3051894009113312, -0.15460261702537537, 0.11446218192577362, 0.11895234882831573, -0.20393238961696625, -0.14644497632980347, 0.24334947764873505, 0.07755059003829956, -0.053950101137161255, 0.3316071331501007, 0.42056456208229065, -0.13183936476707458, 0.00018197298049926758, -0.11900822073221207, -0.054321445524692535, -0.13995057344436646, -0.17691612243652344, 0.325775146484375, 0.28293174505233765, 0.3171047270298004, -0.018583515658974648, 0.8535459041595459, -0.027524612843990326, 0.46959203481674194, 0.4642806947231293, 0.14702002704143524, 0.3714670240879059, -0.4112055003643036, -0.1172698438167572, -0.09161010384559631, 0.06451142579317093, -0.1340080201625824, 0.1620408296585083, -0.07902061194181442, 0.05743725597858429, -0.6090332269668579, -0.39495036005973816, -0.34043896198272705, -0.22196714580059052, 0.15752892196178436, -0.17006345093250275, 0.23052170872688293, 0.026509832590818405, 0.04172088950872421, 0.12402358651161194, 0.10183227807283401, 0.2508084774017334, 0.38754868507385254, 0.17453134059906006, 0.08806764334440231, -0.08497145771980286, -0.08758276700973511, -0.2883143723011017, 0.3871924877166748, -0.008418820798397064, 0.1123480275273323, -0.06527838855981827, -0.3105091452598572, 0.08899836242198944, 0.07300648838281631, 0.47447627782821655, -0.2369825392961502, -0.21405641734600067, 0.24448290467262268, -0.003356747329235077, -0.6545327305793762, -0.05185818299651146, 0.05347539111971855, 0.03396494314074516, -0.09032721817493439, 0.146521657705307, -0.21055737137794495, -0.31322768330574036, 0.19918499886989594, 0.4235745668411255, -0.11904679238796234, -0.20928125083446503, -0.5875595808029175, -0.0709557980298996, -0.478713721036911, -0.09497954696416855, -0.07519491761922836, -0.054252538830041885, 0.07130251079797745, 0.36504361033439636, 0.1260061264038086, -0.05561193823814392, 0.040762729942798615, -0.02850981056690216, 0.0701579600572586, -0.198776975274086, -0.38432595133781433, 0.16298291087150574, 0.2838364541530609, -0.1293623447418213, 0.3129342794418335, -0.05458357557654381, -0.4171643853187561, -0.20309513807296753, -0.06462206691503525, 0.12951698899269104, 0.42195597290992737, 0.007473113015294075, -0.10248444229364395, 0.009375505149364471, -0.22136281430721283, 0.07714665681123734, -0.04078260809183121, 0.13671454787254333, -0.02554449811577797, -0.4656985402107239, -0.4260048568248749, 0.727545976638794, 0.057301539927721024, -0.11025220900774002, 0.21951520442962646, 0.38650673627853394, -0.09612013399600983, 0.41311854124069214, 0.12050527334213257, 1.0968133211135864, -0.04036566615104675, 0.20549911260604858, 0.15318667888641357, 0.11459460854530334, 0.7433245182037354, -0.6203222870826721, 0.11986086517572403, -0.18332649767398834, 0.1576322764158249, -0.13223111629486084, -0.010387837886810303, 0.6084550023078918, 0.07410456985235214, 0.03909405693411827, 0.5708761215209961, 0.163899764418602, 0.2875734269618988, -0.02958850748836994, 0.165696382522583, -0.2634519636631012, -0.0626116693019867, -0.4114670157432556, 0.036044009029865265, -0.1083327978849411, 0.7435286641120911, -0.13651296496391296, -0.17558877170085907, -0.30051326751708984, -0.489776074886322, -0.099577896296978, -0.011536642909049988, -0.23933909833431244, 0.11999686062335968, -0.26416900753974915, -0.32012367248535156, -0.0009482726454734802, 0.3039798140525818, 0.38449668884277344, -0.05678211525082588, -0.2318536341190338, 0.12346763908863068, -0.1061980202794075, -0.0880049541592598, -0.2654593884944916, -0.04032536596059799, 0.4411506652832031, -0.14804407954216003, -0.16794244945049286, 0.17145267128944397, -0.4244392216205597, -0.08795683830976486, -0.10845068097114563, 0.13575869798660278, 0.5168765783309937, 0.2983567714691162, -0.18300095200538635, 0.2779882550239563, 0.027804415673017502, 0.07895016670227051, 0.12270264327526093, -0.1928296536207199, -0.06975717842578888, -0.15839919447898865, -0.26075080037117004, -0.1299840211868286, -0.07657715678215027, 0.23895838856697083, 0.20757517218589783, -0.13656160235404968, 0.29658249020576477, 0.0048327818512916565, -0.21537795662879944, -0.19358572363853455, 0.26200705766677856, 0.19688090682029724, -0.14081361889839172, -0.24427823722362518, 0.11700857430696487, 0.008076503872871399, -0.20895615220069885, 0.06711861491203308, 0.06791578978300095, -0.10685130208730698, -0.03821241110563278, -0.2769321799278259, -0.23906178772449493, 0.32134848833084106, 0.010834068059921265, -0.20850248634815216, 0.037311851978302, 0.11675705015659332, 0.5416676998138428, -0.08543448895215988, -0.251243531703949, -0.23627154529094696, 0.13386431336402893, 0.21415260434150696, 0.5877952575683594, 0.3229283392429352, 0.0615968182682991, 0.02074054442346096, 0.035341426730155945, -0.007323648780584335, -0.3004598617553711, -0.11864431947469711, 0.040492814034223557, 0.204330712556839, 0.1712900698184967, 0.03793169558048248, 0.21535590291023254, -0.2638365924358368, 0.2780000865459442, -0.19148404896259308, 0.04859095439314842, 0.2978197932243347, -0.18653149902820587, 0.24970830976963043, 0.12989220023155212, 0.37483763694763184, -0.3129645586013794, 0.18268467485904694, -0.24934956431388855, 0.1914864480495453, 0.22971497476100922, -0.031040899455547333, 0.3727431893348694, 0.11469057202339172, -0.13606038689613342, -0.13348174095153809, -0.18407051265239716, -0.07476048171520233, -0.0018254034221172333, -0.1629541665315628, 0.050763729959726334, -0.04496416822075844, 0.12636515498161316, 0.1798335611820221, -0.24564647674560547, -0.05948536843061447, 0.2569033205509186, 0.1356157511472702, -0.3840177357196808, 0.11471855640411377, 0.4462437927722931, -0.2306535840034485, -0.14445973932743073, 0.3152909278869629, 0.2557353377342224, 0.06965216994285583, 0.28648850321769714, 0.0793633833527565, 0.10909213125705719, -0.08336558938026428, 0.3604848086833954, 0.35401153564453125, 0.13398140668869019, 0.1699276566505432, 0.11930983513593674, -0.039422210305929184, 0.12356090545654297, 0.6183957457542419, -0.359796404838562, 0.5293433666229248, 0.13832978904247284, 0.2234862744808197, -0.20956799387931824, -0.17198733985424042, 0.4043191969394684, 0.34918439388275146, 0.030741453170776367, -0.0637233778834343, -0.009811587631702423, -0.015165269374847412, -0.03834506869316101, -0.043984003365039825, -0.15588459372520447, 0.15264257788658142, -0.02381034940481186, 0.18406572937965393, 0.06069906800985336, -0.27567821741104126, -0.08986307680606842, -0.004263520240783691, 0.05837007239460945, -0.3857106566429138, 0.20083734393119812, 0.16577968001365662, -0.08248287439346313, -0.03357861936092377, 0.2867561876773834, -0.06102830916643143, 0.1891624629497528, -0.08924371749162674, -0.1562725156545639, 0.06129491701722145, -0.228897362947464, 0.07492518424987793, 0.07885851711034775, 0.24769708514213562, 0.2621338367462158, -0.12030225992202759, -0.021571658551692963, -0.013732519000768661, -0.038716819137334824, 0.1328176110982895, 0.1091328114271164, -0.09452246129512787, 0.23171047866344452, 0.22262950241565704, 0.06452932208776474, -0.17214956879615784, -0.0432608537375927, 0.13900963962078094, 0.003363143652677536, -0.4188861548900604, 0.044282931834459305, -0.42331188917160034, -0.14237356185913086, -0.45994529128074646, 0.1326027661561966, -0.4896374046802521, 0.06486307084560394, 0.14200617372989655, 0.21484607458114624, -0.13762131333351135, -0.36989858746528625, 0.03685412183403969, -0.15935418009757996, 0.256893515586853, 0.3579008877277374, 0.1144518330693245, -0.2953970432281494, -0.1813545525074005, -0.6622388362884521, 0.08937056362628937, -0.3208756148815155, 0.18054234981536865, -0.16690276563167572, -0.1049252301454544, 0.2438535988330841, 0.39687126874923706, -0.013599127531051636, 0.07209532707929611, -0.08048330992460251, 0.03215029090642929, -0.3542996644973755, -0.11914989352226257, -0.09470638632774353, 0.12538503110408783, -0.13264645636081696, -0.24550431966781616, 0.0859806090593338, 0.022790037095546722, -0.007009975612163544, -0.10176302492618561, -0.31878861784935, 0.4922682046890259, -0.05745791643857956, 0.5561673641204834, 0.03173556178808212, 0.331718385219574, 0.08109664171934128, -0.15967105329036713, 0.04839242249727249, 0.04617724567651749, -0.21012133359909058, 0.27674445509910583, 0.04032517969608307, 0.24431827664375305, -0.20232126116752625, -0.13894975185394287, -0.3106028139591217, 0.5070666670799255, -0.08943057060241699, 0.08411887288093567, -0.2534947097301483, -0.08174076676368713, -0.02574925869703293, 0.16671016812324524, -0.11382941901683807, 0.03136824443936348, -0.029689200222492218, -0.15304069221019745, -0.547957181930542, -0.05436050891876221, 0.40104246139526367, -0.6405128240585327, -0.35189342498779297, 0.0424928180873394, 0.27136456966400146, -0.006868474185466766, -0.07196536660194397, -0.4508553445339203, 0.05614160746335983, 0.28682440519332886, 0.2098805010318756, 0.09258589148521423, -0.056256260722875595, -0.23991349339485168, -0.13446106016635895, -0.039882414042949677, -0.4349633753299713, -0.12768292427062988, -0.08723212778568268, -0.0755799412727356, -0.3943336606025696 ]
https://github.com/huggingface/datasets/issues/1790
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
Thanks for your reply! I understood. I tried again with installing apache-beam, add ` beam_runner="DirectRunner"` and an anther `mwparserfromhell` is also required so I installed it. but, it also failed. It exited 1 without error message. ```py import datasets # BTW, 20200501.ja doesn't exist at wikipedia, so I specified date argument wiki = datasets.load_dataset("wikipedia", language="ja", date="20210120", cache_dir="./datasets", beam_runner="DirectRunner") print(wiki) ``` and its log is below ``` Using custom data configuration 20210120.ja Downloading and preparing dataset wikipedia/20210120.ja-date=20210120,language=ja (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to ./datasets/wikipedia/20210120.ja-date=20210120,language=ja/0.0.0/4021357e28509391eab2f8300d9b689e7e8f3a877ebb3d354b01577d497ebc63... Killed ``` I also tried on another machine because it may caused by insufficient resources. ``` $ python main.py Using custom data configuration 20210120.ja Downloading and preparing dataset wikipedia/20210120.ja-date=20210120,language=ja (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to ./datasets/wikipedia/20210120.ja-date=20210120,language=ja/0.0.0/4021357e28509391eab2f8300d9b689e7e8f3a877ebb3d354b01577d497ebc63... Traceback (most recent call last): File "main.py", line 3, in <module> wiki = datasets.load_dataset("wikipedia", language="ja", date="20210120", cache_dir="./datasets", beam_runner="DirectRunner") File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/datasets/load.py", line 609, in load_dataset builder_instance.download_and_prepare( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/datasets/builder.py", line 526, in download_and_prepare self._download_and_prepare( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/datasets/builder.py", line 1069, in _download_and_prepare pipeline_results = pipeline.run() File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/pipeline.py", line 561, in run return self.runner.run_pipeline(self, self._options) File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/direct/direct_runner.py", line 126, in run_pipeline return runner.run_pipeline(pipeline, options) File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 182, in run_pipeline self._latest_run_result = self.run_via_runner_api( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 193, in run_via_runner_api return self.run_stages(stage_context, stages) File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 358, in run_stages stage_results = self._run_stage( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 549, in _run_stage last_result, deferred_inputs, fired_timers = self._run_bundle( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 595, in _run_bundle result, splits = bundle_manager.process_bundle( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 888, in process_bundle self._send_input_to_worker(process_bundle_id, transform_id, elements) File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 765, in _send_input_to_worker data_out.write(byte_stream) File "apache_beam/coders/stream.pyx", line 42, in apache_beam.coders.stream.OutputStream.write File "apache_beam/coders/stream.pyx", line 47, in apache_beam.coders.stream.OutputStream.write File "apache_beam/coders/stream.pyx", line 109, in apache_beam.coders.stream.OutputStream.extend AssertionError: OutputStream realloc failed. ```
```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
279
ModuleNotFoundError: No module named 'apache_beam', when specific languages. ```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct? Thanks for your reply! I understood. I tried again with installing apache-beam, add ` beam_runner="DirectRunner"` and an anther `mwparserfromhell` is also required so I installed it. but, it also failed. It exited 1 without error message. ```py import datasets # BTW, 20200501.ja doesn't exist at wikipedia, so I specified date argument wiki = datasets.load_dataset("wikipedia", language="ja", date="20210120", cache_dir="./datasets", beam_runner="DirectRunner") print(wiki) ``` and its log is below ``` Using custom data configuration 20210120.ja Downloading and preparing dataset wikipedia/20210120.ja-date=20210120,language=ja (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to ./datasets/wikipedia/20210120.ja-date=20210120,language=ja/0.0.0/4021357e28509391eab2f8300d9b689e7e8f3a877ebb3d354b01577d497ebc63... Killed ``` I also tried on another machine because it may caused by insufficient resources. ``` $ python main.py Using custom data configuration 20210120.ja Downloading and preparing dataset wikipedia/20210120.ja-date=20210120,language=ja (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to ./datasets/wikipedia/20210120.ja-date=20210120,language=ja/0.0.0/4021357e28509391eab2f8300d9b689e7e8f3a877ebb3d354b01577d497ebc63... Traceback (most recent call last): File "main.py", line 3, in <module> wiki = datasets.load_dataset("wikipedia", language="ja", date="20210120", cache_dir="./datasets", beam_runner="DirectRunner") File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/datasets/load.py", line 609, in load_dataset builder_instance.download_and_prepare( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/datasets/builder.py", line 526, in download_and_prepare self._download_and_prepare( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/datasets/builder.py", line 1069, in _download_and_prepare pipeline_results = pipeline.run() File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/pipeline.py", line 561, in run return self.runner.run_pipeline(self, self._options) File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/direct/direct_runner.py", line 126, in run_pipeline return runner.run_pipeline(pipeline, options) File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 182, in run_pipeline self._latest_run_result = self.run_via_runner_api( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 193, in run_via_runner_api return self.run_stages(stage_context, stages) File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 358, in run_stages stage_results = self._run_stage( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 549, in _run_stage last_result, deferred_inputs, fired_timers = self._run_bundle( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 595, in _run_bundle result, splits = bundle_manager.process_bundle( File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 888, in process_bundle self._send_input_to_worker(process_bundle_id, transform_id, elements) File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 765, in _send_input_to_worker data_out.write(byte_stream) File "apache_beam/coders/stream.pyx", line 42, in apache_beam.coders.stream.OutputStream.write File "apache_beam/coders/stream.pyx", line 47, in apache_beam.coders.stream.OutputStream.write File "apache_beam/coders/stream.pyx", line 109, in apache_beam.coders.stream.OutputStream.extend AssertionError: OutputStream realloc failed. ```
[ 0.09179463982582092, 0.07459893822669983, 0.01958594098687172, 0.25184527039527893, 0.2570838928222656, 0.04090574383735657, 0.3200167119503021, 0.34807103872299194, 0.16672658920288086, 0.1959526389837265, 0.2174154371023178, 0.04889169707894325, -0.09746190905570984, -0.2695729732513428, 0.09727218747138977, -0.3023033142089844, 0.24641379714012146, 0.04087235778570175, -0.1644412726163864, -0.2330404669046402, -0.3931184709072113, 0.13409267365932465, -0.3705991506576538, 0.035090554505586624, -0.12962272763252258, 0.3397006690502167, -0.07808126509189606, 0.06381527334451675, 0.017325598746538162, -0.27000975608825684, 0.04535727947950363, -0.3246166706085205, 0.12151183187961578, 0.37393179535865784, -0.00011732041457435116, 0.13438114523887634, 0.49237674474716187, -0.26285916566848755, -0.38367173075675964, -0.2569679021835327, -0.1403350830078125, -0.4439765512943268, 0.04482896625995636, -0.44759345054626465, -0.18676087260246277, -0.26974916458129883, 0.05320122838020325, -0.35864776372909546, 0.39536261558532715, 0.267194926738739, 0.1607774943113327, 0.2647910416126251, 0.1899026334285736, -0.04180114343762398, 0.41822347044944763, 0.05589263141155243, -0.2807168960571289, 0.001108165830373764, -0.07787783443927765, 0.10426153242588043, 0.03288489207625389, 0.3811942934989929, -0.26524925231933594, 0.035182006657123566, 0.21960818767547607, -0.29890725016593933, 0.027576778084039688, -0.5322271585464478, 0.18910932540893555, 0.1666528582572937, 0.794233500957489, -0.31698670983314514, -0.13599452376365662, 0.013490244746208191, -0.03996683284640312, 0.08342349529266357, 0.2887856066226959, 0.1149212196469307, -0.1483091562986374, -0.03958280757069588, 0.4454573392868042, -0.27584341168403625, -0.12137950956821442, 0.31046053767204285, 0.0970902293920517, 0.48009243607521057, 0.028074249625205994, 0.2852405607700348, -0.22206752002239227, -0.16098256409168243, -0.01938387006521225, -0.33052974939346313, 0.22557179629802704, 0.3868531286716461, -0.271161824464798, 0.009110938757658005, 0.03039225935935974, 0.17015285789966583, 0.0020986199378967285, -0.20760612189769745, -0.26193538308143616, 0.10038091987371445, 0.16923965513706207, -0.012388698756694794, 0.0890527218580246, 0.15289999544620514, 0.37341687083244324, 0.11216705292463303, 0.2206745743751526, -0.17101138830184937, 0.005628567188978195, 0.03401228040456772, -0.052167799323797226, -0.3492518663406372, -0.32364583015441895, 0.18789508938789368, 0.3179505467414856, -0.16212905943393707, -0.08921069651842117, 0.06426477432250977, -0.6158862709999084, -0.28765660524368286, -0.22659341990947723, 0.35018330812454224, 0.09443477541208267, 0.32877078652381897, 0.15277135372161865, 0.29025137424468994, -0.20452597737312317, -0.3957129716873169, -0.05425833910703659, 0.4753563404083252, -0.3645498752593994, 0.24096271395683289, 0.08739355206489563, 0.13678386807441711, 0.15063467621803284, -0.14514346420764923, -0.04528231918811798, 0.03755251318216324, -0.03712780401110649, 0.0036606667563319206, -0.12303220480680466, 0.37357231974601746, 0.1352759450674057, 0.5192129611968994, 0.22128981351852417, -0.04273629188537598, -0.0936332568526268, 0.14303258061408997, -0.18217328190803528, -0.2547639012336731, 0.04098792374134064, 0.019826676696538925, -0.378545880317688, 0.16907291114330292, 0.0418640561401844, -0.15292130410671234, -0.019320912659168243, -0.01373881846666336, 0.17957176268100739, 0.06592170149087906, -0.07752731442451477, -0.24829326570034027, 0.19282208383083344, 0.763259768486023, -0.1837839037179947, -0.007170028984546661, -0.038687750697135925, -0.0945173054933548, -0.1337481439113617, -0.18517421185970306, -0.010763588361442089, 0.38754066824913025, -0.26449155807495117, -0.06522244215011597, 0.6910911202430725, -0.5287439227104187, -0.00483456626534462, 0.1956304907798767, -0.011186584830284119, 0.0338989794254303, 0.24928215146064758, -0.10676366090774536, -0.2923355996608734, -0.1760917603969574, -0.2596352994441986, 0.00502660870552063, 0.13042052090168, -0.03455406427383423, -0.33181697130203247, -0.07145863026380539, 0.08761608600616455, 0.27457618713378906, 0.3723238706588745, 0.029108788818120956, 0.28891924023628235, 0.682345449924469, 0.1276969611644745, -0.06684254109859467, 0.20654091238975525, 0.519342303276062, -0.08715271949768066, -0.022772908210754395, 0.1958385705947876, -0.00880497321486473, -0.23560237884521484, 0.25557154417037964, -0.18814882636070251, 0.2531146705150604, 0.007553167641162872, 0.08164428174495697, -0.1720115840435028, -0.1806827187538147, -0.3440953195095062, -0.21444793045520782, 0.0655369907617569, 0.016830801963806152, 0.08827079832553864, 0.3130512535572052, -0.31276512145996094, 0.43960437178611755, -0.19769270718097687, 0.013464029878377914, -0.4467655420303345, 0.08120100200176239, -0.13442403078079224, -0.040101684629917145, -0.006431784480810165, 0.09865721315145493, 0.3700563907623291, -0.22547781467437744, -0.12511098384857178, 0.1368413269519806, 0.0944710522890091, -0.01134277880191803, -0.050103701651096344, -0.1107393354177475, 0.12070146203041077, -0.3321649432182312, 0.4237886071205139, 0.1321917176246643, 0.13786639273166656, -0.10639479011297226, 0.1518629789352417, 0.08761849254369736, 0.30216071009635925, 0.4313710331916809, 0.012836247682571411, -0.035497311502695084, -0.08449757099151611, -0.002327580004930496, -0.20988579094409943, -0.23935361206531525, 0.28605180978775024, 0.3622858226299286, 0.2126559168100357, -0.015859274193644524, 0.16495175659656525, -0.35412082076072693, 0.4365089535713196, 0.0414416678249836, 0.2351134717464447, -0.060806579887866974, -0.45020437240600586, 0.27834826707839966, 0.09841904789209366, -0.10645721852779388, 0.36708927154541016, 0.13847465813159943, -0.23723813891410828, 0.1293945014476776, 0.22790102660655975, -0.05757998302578926, 0.092207171022892, 0.15654438734054565, 0.45232999324798584, 0.1082720085978508, -0.27133458852767944, 0.043403297662734985, -0.03823544457554817, -0.12308236956596375, -0.07804037630558014, 0.11596262454986572, -0.28225499391555786, -0.05891183018684387, -0.3727223873138428, -0.491452693939209, -0.3270522654056549, 0.07182444632053375, -0.40889108180999756, -0.23340581357479095, -0.16883458197116852, -0.12228311598300934, -0.13460658490657806, 0.39309510588645935, 0.2123803347349167, -0.22704245150089264, -0.06812019646167755, -0.39594846963882446, -0.20923319458961487, -0.20326770842075348, -0.2683122754096985, -0.03909798711538315, 0.29763683676719666, 0.18953631818294525, 0.19256974756717682, -0.2675950229167938, -0.09590352326631546, -0.20994366705417633, -0.10030192881822586, 0.19101746380329132, 0.008340688422322273, -0.09948320686817169, -0.05121779441833496, 0.4569111466407776, -0.036120690405368805, 0.04972769692540169, 0.3699609339237213, -0.008483817800879478, -0.14526525139808655, 0.17774036526679993, 0.005220746621489525, 0.15326854586601257, -0.027591269463300705, -0.5211428999900818, -0.24537347257137299, -0.3921807110309601, -0.28986573219299316, 0.22465215623378754, 0.052217163145542145, 0.013409547507762909, 0.15669168531894684, 0.15274250507354736, -0.042259301990270615, 0.06684403121471405, 0.08918511867523193, 0.09168514609336853, 0.4245995581150055, -0.14916378259658813, -0.2796569764614105, 0.3423870801925659, -0.19028575718402863, 0.028985632583498955, 0.09700722247362137, -0.1730143427848816, -0.01934438943862915, 0.3139028251171112, -0.11638417840003967, -0.06523343175649643, 0.28745201230049133, 0.5190109014511108, -0.1943499743938446, 0.09282466024160385, -0.06901878118515015, 0.008344832807779312, -0.14440008997917175, -0.24414879083633423, 0.42452114820480347, 0.2974082827568054, 0.30560755729675293, -0.04353133216500282, 0.7822389602661133, 0.01086045429110527, 0.255697101354599, 0.42609548568725586, 0.07629921287298203, 0.26928067207336426, -0.348682165145874, -0.04999428242444992, 0.010491285473108292, 0.25440600514411926, -0.03231724351644516, 0.11126520484685898, -0.05982542783021927, 0.07622647285461426, -0.6192234754562378, -0.36980870366096497, -0.2994990050792694, -0.21590623259544373, 0.10909894108772278, -0.274139940738678, 0.19104228913784027, -0.04870755597949028, 0.09501072019338608, 0.12376625835895538, 0.02070453017950058, 0.21883271634578705, 0.4647518992424011, 0.0035703852772712708, 0.06393483281135559, -0.023403668776154518, -0.0922178328037262, -0.2643970251083374, 0.3273768424987793, -0.04211874678730965, 0.1358175128698349, -0.0947873592376709, -0.23619303107261658, 0.08948051929473877, 0.06319887191057205, 0.3092835545539856, -0.4035586416721344, -0.16062217950820923, 0.3869549334049225, 0.07807476818561554, -0.6535659432411194, -0.17584921419620514, 0.06048710271716118, -0.015394244343042374, -0.01750418171286583, 0.010281682014465332, -0.19332361221313477, -0.2447003573179245, 0.29499995708465576, 0.42851758003234863, -0.14231811463832855, -0.37496525049209595, -0.4727919101715088, 0.028187215328216553, -0.4894358813762665, -0.18839368224143982, -0.13796016573905945, 0.07885361462831497, 0.24215255677700043, 0.21841751039028168, 0.06510450690984726, -0.09244267642498016, 0.02369501441717148, -0.1127033680677414, 0.11266399174928665, -0.1607254296541214, -0.16105446219444275, -0.025506794452667236, 0.3260904848575592, -0.11863219738006592, 0.06313896924257278, 0.10467098653316498, -0.25470322370529175, -0.04993918538093567, -0.016984211280941963, 0.07064328342676163, 0.22647596895694733, -0.015143460594117641, -0.019570626318454742, -0.14491677284240723, -0.19706158339977264, 0.10597784072160721, -0.12173612415790558, 0.0783257931470871, -0.2491559237241745, -0.3910136818885803, -0.34800443053245544, 0.7426958680152893, 0.02713964506983757, -0.015964239835739136, 0.342903733253479, 0.2017013132572174, -0.15146641433238983, 0.33976906538009644, 0.04742908850312233, 0.9796902537345886, 0.014183562248945236, 0.006400063633918762, 0.022396430373191833, 0.10224871337413788, 0.8341004252433777, -0.650705099105835, 0.06670387834310532, -0.20457693934440613, 0.22863233089447021, -0.05457737296819687, -0.08500204235315323, 0.571810781955719, 0.11323431134223938, 0.00788818672299385, 0.671285092830658, 0.14033687114715576, 0.4805468022823334, -0.08163917064666748, 0.20628255605697632, -0.16361568868160248, -0.03533923253417015, -0.35092636942863464, 0.018205836415290833, -0.1721028834581375, 0.8090723752975464, -0.16342884302139282, -0.09579654037952423, -0.25253191590309143, -0.32813453674316406, -0.25814032554626465, 0.11803670972585678, -0.2528878152370453, 0.13647699356079102, -0.3172072768211365, -0.3505348563194275, 0.07233726978302002, 0.35978448390960693, 0.42336344718933105, 0.016625910997390747, -0.16735772788524628, 0.18335524201393127, -0.07747108489274979, -0.1585695892572403, -0.21630726754665375, 0.10754190385341644, 0.22580420970916748, -0.13343290984630585, -0.1807708442211151, 0.16909804940223694, -0.3425920307636261, -0.11935611069202423, -0.011339083313941956, 0.022790320217609406, 0.6689750552177429, 0.2682593762874603, -0.27670833468437195, 0.35537636280059814, 0.12834377586841583, 0.06931090354919434, 0.11031614243984222, -0.21177829802036285, -0.026651615276932716, 0.027824286371469498, -0.3508478105068207, -0.03417094796895981, -0.12922224402427673, 0.38727349042892456, 0.2311328649520874, -0.11304165422916412, 0.33091089129447937, 0.12514357268810272, -0.12336758524179459, -0.23322030901908875, 0.2853125035762787, 0.1719542145729065, -0.20763638615608215, -0.2752785086631775, 0.21288368105888367, 0.17036716639995575, -0.09839700162410736, 0.038664162158966064, 0.03351978212594986, -0.0663086548447609, 0.039546359330415726, -0.26811105012893677, -0.13349005579948425, 0.2705457806587219, -0.038836803287267685, -0.18977583944797516, -0.0689273327589035, 0.21415026485919952, 0.4571790099143982, -0.28151336312294006, -0.1937304437160492, -0.25390908122062683, 0.03399468958377838, 0.12561379373073578, 0.4958910644054413, 0.3753300905227661, -0.005187715403735638, 0.06602583825588226, 0.03358732908964157, -0.0018730945885181427, -0.19467084109783173, -0.1027393713593483, 0.016138412058353424, 0.21424159407615662, 0.2061053216457367, 0.1632523387670517, 0.10957075655460358, -0.4472339153289795, 0.21731913089752197, -0.1595725268125534, -0.02231593430042267, 0.25470104813575745, -0.1646430790424347, 0.28653043508529663, 0.17364677786827087, 0.3211051821708679, -0.5296330451965332, 0.21429194509983063, -0.18174892663955688, 0.345317542552948, 0.19472624361515045, 0.017099659889936447, 0.4853270351886749, 0.13844124972820282, -0.4599800109863281, -0.17733556032180786, -0.3498990535736084, -0.03127990663051605, 0.03236527740955353, -0.1172962635755539, 0.04189222678542137, -0.0186134222894907, 0.05211967974901199, 0.18345758318901062, -0.2758881747722626, -0.059130579233169556, 0.2848196029663086, 0.10281016677618027, -0.2974638342857361, 0.1754073053598404, 0.4890991747379303, -0.09819366037845612, -0.1404959261417389, 0.23337611556053162, 0.1426936239004135, -0.09167107939720154, 0.34121036529541016, 0.15486863255500793, 0.16315142810344696, -0.17873120307922363, 0.20531027019023895, 0.18409711122512817, 0.2948671579360962, 0.1575995534658432, 0.047527946531772614, -0.05383799597620964, 0.088015116751194, 0.6539549231529236, -0.2858645021915436, 0.4924986958503723, 0.10118655115365982, 0.1677302122116089, -0.21162006258964539, -0.241617813706398, 0.3595823049545288, 0.4214579463005066, 0.05174931883811951, -0.14439305663108826, -0.1237960159778595, -0.07737147063016891, -0.014710669405758381, -0.01969202049076557, -0.23024164140224457, 0.12901772558689117, 0.02248072624206543, 0.2884572446346283, -0.12769421935081482, -0.2530803084373474, -0.055131494998931885, 0.02976343408226967, 0.05550280958414078, -0.3724520206451416, 0.15340113639831543, 0.2548287510871887, -0.11216607689857483, -0.03394132852554321, 0.3947486877441406, 0.0025752559304237366, 0.05063032731413841, -0.10417649149894714, -0.026668203994631767, -0.005141906440258026, -0.18535640835762024, -0.0603177584707737, 0.11110442876815796, 0.22661210596561432, 0.3590018153190613, -0.154721200466156, -0.07795153558254242, 0.12682068347930908, -0.02554757334291935, 0.18806971609592438, 0.060432493686676025, -0.15555055439472198, 0.2081422358751297, 0.2435006946325302, 0.04897121340036392, -0.15248513221740723, -0.04124568775296211, 0.2414976954460144, 0.07034818828105927, -0.2723357379436493, 0.06777756661176682, -0.35735538601875305, 0.038739122450351715, -0.4263153672218323, 0.25833529233932495, -0.5642679333686829, 0.06937011331319809, 0.012265602126717567, 0.3249207139015198, -0.13827989995479584, -0.31965357065200806, 0.011013967916369438, -0.2432871162891388, 0.13480721414089203, 0.22486591339111328, 0.11859534680843353, -0.42630672454833984, -0.3554021716117859, -0.4867430031299591, 0.042619191110134125, -0.3128662109375, 0.13087205588817596, -0.2051987648010254, 0.05024820566177368, 0.01467101275920868, 0.35528725385665894, 0.046178996562957764, 0.22698664665222168, -0.11860848218202591, 0.24339871108531952, -0.3425804078578949, -0.17019900679588318, -0.0914430022239685, 0.11009375751018524, -0.09119267761707306, -0.26949137449264526, -0.030606616288423538, -0.22600744664669037, -0.02429831773042679, -0.10804881155490875, -0.4202313721179962, 0.553715705871582, -0.09474775195121765, 0.5825887322425842, -0.14593403041362762, 0.30086207389831543, 0.07137661427259445, -0.13962021470069885, -0.004673641175031662, -0.01066591590642929, -0.069125235080719, 0.15443599224090576, -0.05374772474169731, 0.22529493272304535, -0.20206212997436523, -0.01790080964565277, -0.3485684394836426, 0.45144474506378174, -0.24993735551834106, 0.1921253502368927, -0.1374959498643875, 0.006345067173242569, 0.03509438782930374, 0.2750195264816284, -0.03530631586909294, -0.07540193945169449, -0.1648888736963272, 0.006583290174603462, -0.5357223153114319, -0.01806941255927086, 0.27226686477661133, -0.4996758699417114, -0.2172190397977829, -0.03324328362941742, 0.3454784154891968, -0.14042851328849792, -0.026226727291941643, -0.41893133521080017, 0.14732173085212708, 0.3714239299297333, 0.15801507234573364, 0.1390688568353653, -0.011535592377185822, -0.15837912261486053, -0.07849110662937164, 0.03561095520853996, -0.5600675344467163, -0.1644401252269745, -0.025776095688343048, -0.06941863894462585, -0.29953324794769287 ]
https://github.com/huggingface/datasets/issues/1790
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
Hi @miyamonz, I tried replicating this issue using the same snippet used by you. I am able to download the dataset without any issues, although I stopped it in the middle because the dataset is huge. Based on a similar issue [here](https://github.com/google-research/fixmatch/issues/23), it could be related to your environment setup, although I am just guessing here. Can you share these details?
```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
61
ModuleNotFoundError: No module named 'apache_beam', when specific languages. ```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct? Hi @miyamonz, I tried replicating this issue using the same snippet used by you. I am able to download the dataset without any issues, although I stopped it in the middle because the dataset is huge. Based on a similar issue [here](https://github.com/google-research/fixmatch/issues/23), it could be related to your environment setup, although I am just guessing here. Can you share these details?
[ -0.08689090609550476, 0.15441155433654785, 0.0349210649728775, 0.25117844343185425, 0.35333341360092163, 0.10837144404649734, 0.3212847411632538, 0.4499050974845886, 0.37346142530441284, 0.0088101327419281, 0.10232538729906082, 0.006332128308713436, -0.009907110594213009, -0.022559255361557007, -0.020792972296476364, -0.25478360056877136, 0.17211312055587769, 0.001215226948261261, -0.21304869651794434, -0.2989022731781006, -0.387227326631546, 0.08667473495006561, -0.3275977671146393, 0.015958301723003387, -0.05216556414961815, 0.15560214221477509, -0.027971483767032623, 0.15741200745105743, 0.040106773376464844, -0.17492608726024628, 0.2103828489780426, -0.12499448657035828, -0.05054514855146408, 0.30433768033981323, -0.00010792795364977792, 0.07012280821800232, 0.49346429109573364, -0.21940340101718903, -0.3645666837692261, -0.4068615436553955, -0.08876670897006989, -0.34729936718940735, 0.02147608809173107, -0.4108131527900696, -0.16098415851593018, -0.16923795640468597, 0.02758444845676422, -0.4244210124015808, 0.2876327335834503, 0.29713213443756104, 0.25581488013267517, 0.37658819556236267, 0.18530182540416718, -0.09023930877447128, 0.4627011716365814, -0.2508675456047058, -0.1734851598739624, 0.15227410197257996, 0.10261648893356323, -0.01338107418268919, 0.09269487112760544, 0.46475234627723694, -0.3321601450443268, 0.12292851507663727, 0.3978908658027649, -0.210409477353096, -0.10996655374765396, -0.5223602056503296, 0.19116824865341187, 0.28530144691467285, 0.8053061366081238, -0.3187531530857086, -0.21362437307834625, -0.06393467634916306, -0.046621646732091904, 0.09355006366968155, 0.16690686345100403, 0.19600453972816467, -0.13857103884220123, 0.013220805674791336, 0.25646713376045227, -0.27760741114616394, -0.11295057833194733, 0.25479692220687866, 0.02069912850856781, 0.43454304337501526, 0.11305122822523117, 0.29063791036605835, -0.1213330626487732, -0.1309853196144104, 0.06010895222425461, -0.30382049083709717, 0.17902924120426178, 0.4227379858493805, -0.3936530649662018, 0.0983676016330719, 0.07536566257476807, 0.03148755803704262, 0.20474779605865479, -0.009700622409582138, -0.17314861714839935, 0.27010995149612427, 0.17812888324260712, 0.055850207805633545, 0.18806728720664978, 0.2425357550382614, 0.20485657453536987, 0.21803045272827148, 0.379183292388916, -0.09181912243366241, -0.07152068614959717, 0.02139001339673996, 0.008791838772594929, -0.3030606210231781, -0.2551553547382355, 0.20652547478675842, 0.34168940782546997, -0.23936279118061066, -0.21134638786315918, 0.1680402159690857, -0.3932998478412628, -0.1952902376651764, -0.18903565406799316, 0.44647204875946045, 0.09038318693637848, 0.33862847089767456, 0.12707571685314178, 0.3620222210884094, -0.22779801487922668, -0.43409255146980286, -0.16982492804527283, 0.28328371047973633, -0.25186464190483093, 0.10067305713891983, 0.1977664977312088, 0.11700800061225891, 0.1428782194852829, -0.15129272639751434, 0.04985608160495758, 0.06723625212907791, 0.11983779072761536, 0.0282125361263752, -0.09782808274030685, 0.33946773409843445, 0.1440698355436325, 0.5026988387107849, 0.19716210663318634, -0.0773206502199173, -0.19796238839626312, 0.06902312487363815, -0.33564087748527527, -0.08760681748390198, 0.030021877959370613, 0.1454828977584839, -0.4106608033180237, 0.13924762606620789, 0.027699187397956848, -0.16095122694969177, -0.026057414710521698, -0.13074931502342224, 0.07028445601463318, -0.03363046795129776, -0.07188688963651657, -0.36416780948638916, 0.19075551629066467, 0.7568353414535522, -0.11717979609966278, -0.050788410007953644, 0.14922037720680237, -0.03269744664430618, -0.03467694669961929, 0.06212089583277702, -0.017994988709688187, 0.08975522965192795, -0.2658485770225525, 0.04939103126525879, 0.5301241278648376, -0.49715882539749146, -0.37459123134613037, 0.1492237150669098, -0.13037459552288055, 0.06741395592689514, 0.19346983730793, 0.09816581755876541, -0.22339199483394623, -0.04914337396621704, -0.07370702922344208, 0.32162147760391235, 0.1220703274011612, 0.11276926845312119, -0.38052865862846375, -0.085991270840168, 0.20657768845558167, 0.15556837618350983, 0.2180371731519699, 0.03789165988564491, 0.24626344442367554, 0.17644600570201874, 0.10074779391288757, -0.2408958375453949, 0.23001709580421448, 0.4026339650154114, 0.08224549144506454, -0.0768728256225586, 0.21855318546295166, -0.04728744924068451, -0.34275585412979126, 0.3855515122413635, -0.226289764046669, 0.2532649040222168, -0.12667906284332275, 0.032328180968761444, -0.24583005905151367, -0.08158490806818008, -0.39509662985801697, -0.3153590261936188, 0.1326071321964264, -0.08610452711582184, 0.17291034758090973, 0.41951102018356323, -0.09047406911849976, 0.547997236251831, -0.08068271726369858, 0.08697675913572311, -0.3802216649055481, 0.3531751036643982, -0.15686611831188202, -0.022320818156003952, 0.08999723196029663, 0.1627478301525116, 0.21668115258216858, -0.20490099489688873, -0.1471845805644989, 0.245387464761734, 0.03161244839429855, 0.17538151144981384, 0.0656091719865799, -0.13634802401065826, 0.19812631607055664, -0.4174293577671051, 0.28111734986305237, 0.30596309900283813, 0.20191891491413116, 0.0005687400698661804, -0.024859733879566193, 0.319413959980011, 0.2762657403945923, 0.3443271815776825, 0.10012227296829224, 0.14198154211044312, 0.17406637966632843, -0.11565323173999786, -0.11842462420463562, -0.20509840548038483, 0.382837176322937, 0.20414629578590393, 0.264769971370697, -0.0008266624063253403, 0.05272606015205383, -0.19290244579315186, 0.4928574562072754, -0.03285343572497368, 0.3465646505355835, -0.04349303990602493, -0.4553961157798767, 0.1410556435585022, 0.07285650074481964, 0.03468436375260353, 0.33308714628219604, 0.1398334950208664, -0.16547124087810516, 0.15239590406417847, 0.15279261767864227, -0.08113285899162292, 0.07035797089338303, 0.04019800201058388, 0.2829307019710541, 0.13092073798179626, -0.03618780896067619, 0.050257861614227295, -0.12527501583099365, -0.006771693006157875, -0.20787815749645233, 0.14579972624778748, -0.2919570803642273, 0.06633367389440536, -0.3126634955406189, -0.39191392064094543, -0.18842297792434692, 0.25041136145591736, -0.47329264879226685, -0.3105268180370331, -0.14530450105667114, -0.02801390364766121, -0.19862250983715057, 0.24723777174949646, -0.0033553000539541245, -0.19253204762935638, 0.16338585317134857, -0.45831868052482605, -0.16511699557304382, -0.37624406814575195, -0.3328978419303894, 0.017307039350271225, 0.33585435152053833, 0.13370591402053833, 0.2784571647644043, -0.2997748553752899, 0.05159515142440796, -0.41773682832717896, -0.2721669673919678, 0.15817499160766602, -0.0346398800611496, 0.03609132394194603, 0.0005485489964485168, 0.4427483081817627, -0.004896059632301331, 0.03651128336787224, 0.35163992643356323, -0.2354399561882019, -0.19292479753494263, 0.31196755170822144, 0.028266889974474907, -0.01337987557053566, 0.04112330451607704, -0.6374549269676208, -0.30700650811195374, -0.4252650737762451, -0.1391488015651703, 0.04893799498677254, -0.010833874344825745, 0.05165061727166176, 0.14160792529582977, -0.0006671072915196419, 0.03202221542596817, -0.00825529359281063, -0.014077892526984215, 0.13274987041950226, 0.5062481760978699, -0.14567284286022186, -0.5656462907791138, 0.3194143772125244, -0.1603345423936844, 0.06243125721812248, 0.19569344818592072, -0.19556507468223572, -0.06202620267868042, 0.13756614923477173, -0.03658474609255791, 0.025997407734394073, 0.29268085956573486, 0.393902450799942, -0.2571811378002167, 0.03821830451488495, -0.13654547929763794, 0.0062156058847904205, -0.04374491423368454, -0.01148979738354683, 0.295016348361969, 0.2645321190357208, 0.1776745319366455, -0.03647277131676674, 0.793672502040863, 0.007353525608778, 0.21002431213855743, 0.4813815951347351, 0.07731873542070389, 0.2936621904373169, -0.3421626091003418, -0.1942977011203766, 0.008329860866069794, -0.002758115530014038, 0.014970563352108002, 0.18731838464736938, -0.08184604346752167, -0.13556303083896637, -0.6442762613296509, -0.3588288426399231, -0.2766445577144623, -0.32262280583381653, 0.04532043635845184, -0.216021329164505, 0.1843610405921936, 0.202398881316185, 0.09386075288057327, 0.07389898598194122, -0.106548011302948, 0.23401637375354767, 0.26050716638565063, -0.17595389485359192, 0.09295491129159927, -0.1118326336145401, -0.17694760859012604, -0.32822731137275696, 0.4158118963241577, 0.02262396365404129, 0.2022852599620819, 0.0030381232500076294, -0.2317766547203064, 0.08566920459270477, 0.01894887164235115, 0.469215989112854, -0.31201085448265076, -0.04375839978456497, 0.12160365283489227, 0.2594098150730133, -0.5550557971000671, -0.1870957762002945, -0.03226659074425697, 0.03212974593043327, -0.04382879659533501, 0.18109264969825745, -0.255039244890213, -0.08022178709506989, 0.06686954945325851, 0.4545521140098572, -0.08288310468196869, -0.12743160128593445, -0.43679916858673096, -0.050220031291246414, -0.5733695030212402, -0.08286363631486893, -0.09778974205255508, 0.1422577202320099, 0.09729338437318802, 0.16235440969467163, 0.09610170125961304, -0.014274139888584614, -0.032080456614494324, -0.008572526276111603, 0.34041717648506165, -0.20439957082271576, -0.03545708209276199, 0.08536692708730698, 0.17483073472976685, 0.046012021601200104, 0.4567004144191742, 0.1034710556268692, -0.4493020176887512, -0.05290279537439346, -0.2239479422569275, -0.045778416097164154, 0.18973800539970398, -0.07515059411525726, -0.20411652326583862, -0.14395850896835327, -0.0854969471693039, 0.056391190737485886, -0.030514923855662346, 0.08761439472436905, -0.023654084652662277, -0.4352927803993225, -0.3729906678199768, 0.5270692110061646, -0.033039189875125885, -0.05701306462287903, 0.3110024929046631, 0.11276502907276154, -0.10708169639110565, 0.4222756028175354, 0.018740862607955933, 0.8645873069763184, -0.018870696425437927, 0.2101956158876419, 0.058288414031267166, -0.04008213058114052, 0.7248642444610596, -0.539927065372467, 0.0771637111902237, -0.27018406987190247, 0.0008102860301733017, -0.08790662884712219, -0.13712915778160095, 0.3018963932991028, 0.004613425582647324, -0.0912817195057869, 0.7011967897415161, 0.11363548040390015, 0.3072913587093353, -0.0284119825810194, 0.12683196365833282, -0.223179891705513, 0.024749990552663803, -0.2159256637096405, 0.0936155915260315, -0.25173693895339966, 0.7930031418800354, -0.11468281596899033, -0.1685597151517868, -0.3997265100479126, -0.4847641587257385, -0.2735733985900879, 0.20679718255996704, -0.3265915811061859, 0.10576488077640533, -0.13658079504966736, -0.2755325734615326, -0.01601354032754898, 0.16851110756397247, 0.33968615531921387, 0.08356168866157532, -0.35241129994392395, 0.1991567462682724, -0.04324984550476074, -0.06335422396659851, -0.045783352106809616, 0.003071487881243229, 0.2717384696006775, -0.09677042067050934, -0.23187384009361267, 0.14853356778621674, -0.2545038163661957, -0.10193781554698944, -0.1157306581735611, 0.061087846755981445, 0.33174556493759155, 0.22472433745861053, -0.27922049164772034, 0.2246251106262207, 0.1533651500940323, -0.06302890926599503, 0.1800224632024765, -0.04943390190601349, -0.03032994084060192, -0.003299310803413391, -0.18098169565200806, -0.24746811389923096, -0.12285307049751282, 0.5205881595611572, 0.18397367000579834, -0.2424345463514328, 0.4066537022590637, 0.17236164212226868, -0.21041758358478546, -0.24109983444213867, 0.1621384620666504, 0.19057071208953857, -0.26502230763435364, -0.14605189859867096, -0.03186202794313431, 0.09577111899852753, -0.138687863945961, 0.16773031651973724, -0.01134733110666275, -0.10962975770235062, 0.09533722698688507, -0.44425854086875916, -0.032641198486089706, 0.18523778021335602, -0.08543458580970764, -0.10106377303600311, 0.0033143796026706696, 0.005318061448633671, 0.4032241702079773, -0.297162801027298, -0.28889477252960205, -0.13765877485275269, -0.10590784251689911, 0.022461658343672752, 0.5605175495147705, 0.2935125231742859, 0.0023229464422911406, -0.058145854622125626, 0.09376481920480728, -0.12681791186332703, -0.19377988576889038, -0.2027931809425354, -0.014947463758289814, 0.13855303823947906, 0.04348055273294449, 0.1630501002073288, 0.07036571204662323, -0.48233044147491455, 0.20216014981269836, -0.1527930498123169, 0.056793149560689926, 0.2536279857158661, -0.1994745284318924, 0.17714062333106995, 0.10858989506959915, 0.1843014508485794, -0.35253018140792847, 0.26749953627586365, -0.364693284034729, 0.17219316959381104, 0.13047991693019867, 0.0686093270778656, 0.3867253065109253, 0.15165378153324127, -0.17355133593082428, -0.1742301881313324, -0.37437766790390015, -0.048257775604724884, 0.2108215093612671, -0.1414894461631775, -0.0068627819418907166, 0.1340985745191574, 0.10623352229595184, 0.2562636435031891, -0.3503272831439972, -0.1075853705406189, 0.183672696352005, 0.19692687690258026, -0.45551127195358276, -0.0751982107758522, 0.4037577211856842, -0.13587865233421326, -0.021496223285794258, 0.18435215950012207, 0.2636778950691223, -0.2410956770181656, 0.30597034096717834, 0.19165483117103577, 0.3945593237876892, -0.11702902615070343, 0.30119532346725464, 0.3527545630931854, 0.17799898982048035, 0.13961255550384521, -0.030413104221224785, 0.04745515435934067, 0.13538594543933868, 0.6484866142272949, -0.20916566252708435, 0.41147246956825256, 0.06740225851535797, 0.103004090487957, -0.2624187171459198, -0.30118313431739807, 0.299206018447876, 0.22040387988090515, -0.06951692700386047, 0.029288440942764282, -0.024016067385673523, -0.001998335123062134, 0.08604108542203903, -0.05657893791794777, -0.158549964427948, 0.16666734218597412, 0.001273464411497116, 0.22534576058387756, 0.017971210181713104, -0.35190096497535706, -0.07290785014629364, 0.13317246735095978, 0.031203463673591614, -0.23858879506587982, 0.22812750935554504, 0.1682942807674408, -0.12404097616672516, -0.12397290766239166, 0.3742435574531555, -0.11892008036375046, 0.013631805777549744, -0.1376556009054184, 0.025403622537851334, 0.046353768557310104, -0.1598242074251175, 0.006920967251062393, 0.16357500851154327, 0.2606297433376312, 0.34880247712135315, -0.28664714097976685, -0.0238141268491745, 0.17843367159366608, -0.06752500683069229, -0.015599377453327179, 0.09208426624536514, -0.06219765543937683, -0.0524858720600605, 0.28906068205833435, 0.11364781856536865, -0.17804662883281708, 0.09538222849369049, 0.0433129221200943, -0.036969829350709915, -0.2705109417438507, -0.05337370187044144, -0.3792496621608734, 0.08717908710241318, -0.34022560715675354, 0.038980882614851, -0.6098284721374512, -0.006096475757658482, 0.15129728615283966, 0.18959040939807892, -0.006375531665980816, -0.3605641722679138, 0.06054653227329254, -0.10734039545059204, 0.3097567558288574, 0.43190813064575195, 0.12030897289514542, -0.399726539850235, -0.2315177321434021, -0.7111354470252991, 0.2788398861885071, -0.41060465574264526, 0.145000621676445, -0.1495787799358368, 0.07072978466749191, 0.09841403365135193, 0.23376038670539856, 0.1786881536245346, 0.32773780822753906, -0.23661641776561737, 0.1039687842130661, -0.36990174651145935, -0.30214765667915344, -0.2403445988893509, -0.0011571235954761505, -0.10399769991636276, -0.32252904772758484, 0.15655452013015747, -0.13395190238952637, 0.0949152335524559, -0.1408350169658661, -0.30694711208343506, 0.3905300199985504, -0.022349119186401367, 0.5410960912704468, 0.015177425928413868, 0.4371800720691681, 0.08463086187839508, 0.012738524004817009, -0.08697579801082611, -0.08522415906190872, -0.1114194318652153, 0.16098323464393616, -0.0790187269449234, 0.05979076772928238, -0.13160018622875214, -0.16341303288936615, -0.256571501493454, 0.4323998987674713, 0.1219811886548996, 0.16965435445308685, -0.1993858516216278, 0.06679179519414902, 0.02947692573070526, 0.16403906047344208, -0.1357731819152832, -0.04471740126609802, -0.2038329541683197, -0.033054351806640625, -0.3078806400299072, -0.26464754343032837, 0.28916117548942566, -0.4281409978866577, -0.36054667830467224, -0.0024637856986373663, 0.19139951467514038, -0.22266942262649536, 0.011238615028560162, -0.3648001551628113, 0.21677124500274658, 0.3255021870136261, 0.10104568302631378, -0.12341667711734772, -0.012208769097924232, -0.14546872675418854, -0.08819033205509186, 0.00297633558511734, -0.3081105351448059, 0.08674159646034241, -0.12965679168701172, 0.008383411914110184, -0.22913475334644318 ]
https://github.com/huggingface/datasets/issues/1790
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
thanks for your reply and sorry for my late response. ## environment my local machine environment info - Ubuntu on WSL2 `lsb_release -a` ``` No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal ``` RTX 2070 super Inside WSL, there is no nvidia-msi command. I don't know why. But, `torch.cuda.is_available()` is true and when I start something ML training code GPU usage is growing up, so I think it works. From PowerShell, there is nvidia-smi.exe and result is below. ``` +-----------------------------------------------------------------------------+ | NVIDIA-SMI 470.05 Driver Version: 470.05 CUDA Version: 11.3 | |-------------------------------+----------------------+----------------------+ | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... WDDM | 00000000:09:00.0 On | N/A | | 0% 30C P8 19W / 175W | 523MiB / 8192MiB | 3% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1728 C+G Insufficient Permissions N/A | | 0 N/A N/A 3672 C+G ...ekyb3d8bbwe\YourPhone.exe N/A | | 0 N/A N/A 6304 C+G ...2txyewy\TextInputHost.exe N/A | | 0 N/A N/A 8648 C+G C:\Windows\explorer.exe N/A | | 0 N/A N/A 9536 C+G ...y\ShellExperienceHost.exe N/A | | 0 N/A N/A 10668 C+G ...5n1h2txyewy\SearchApp.exe N/A | | 0 N/A N/A 10948 C+G ...artMenuExperienceHost.exe N/A | | 0 N/A N/A 11988 C+G ...8wekyb3d8bbwe\Cortana.exe N/A | | 0 N/A N/A 12464 C+G ...cw5n1h2txyewy\LockApp.exe N/A | | 0 N/A N/A 13280 C+G ...upport\CEF\Max Helper.exe N/A | | 0 N/A N/A 15948 C+G ...t\GoogleIMEJaRenderer.exe N/A | | 0 N/A N/A 16128 C+G ...ram Files\Slack\Slack.exe N/A | | 0 N/A N/A 19096 C+G ...8bbwe\WindowsTerminal.exe N/A | +-----------------------------------------------------------------------------+ ``` I don't know what should I show in such a case. If it's not enough, please tell me some commands. --- ## what I did I surveyed more and I found 2 issues. About the first one, I wrote it as a new issue. https://github.com/huggingface/datasets/issues/2031 The error I mentioned in the previous comment above, which occurred on my local machine, is no longer occurring. But, it still failed. In the previous comment, I wrote `AssertionError: OutputStream realloc failed.` happen on another machine. It also happens on my local machine. Here's what I've tried. the wikipedia.py downloads these xml.bz2 files based on dumpstatus.json In Japanese Wikipedia dataset that I specified, it will download these 6 files. `https://dumps.wikimedia.org/jawiki/20210120/dumpstatus.json` and filtered json based on wikipedia.py is below. ```json { "jobs": { "articlesmultistreamdump": { "files": { "jawiki-20210120-pages-articles-multistream1.xml-p1p114794.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream1.xml-p1p114794.bz2" }, "jawiki-20210120-pages-articles-multistream2.xml-p114795p390428.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream2.xml-p114795p390428.bz2" }, "jawiki-20210120-pages-articles-multistream3.xml-p390429p902407.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream3.xml-p390429p902407.bz2" }, "jawiki-20210120-pages-articles-multistream4.xml-p902408p1721646.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream4.xml-p902408p1721646.bz2" }, "jawiki-20210120-pages-articles-multistream5.xml-p1721647p2807947.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream5.xml-p1721647p2807947.bz2" }, "jawiki-20210120-pages-articles-multistream6.xml-p2807948p4290013.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream6.xml-p2807948p4290013.bz2" } } } } } ``` So, I tried running with fewer resources by modifying this line. https://github.com/huggingface/datasets/blob/13a5b7db992ad5cf77895e4c0f76595314390418/datasets/wikipedia/wikipedia.py#L524 I changed it like this. just change filepaths list. ` | "Initialize" >> beam.Create(filepaths[:1])` and I added a print line inside for the loop of _extract_content. like this `if(i % 100000 == 0): print(i)` first, without modification, it always stops after all _extract_content is done. - `filepaths[:1]` then it succeeded. - `filepaths[:2]` then it failed. I don't try all patterns because each pattern takes a long time. ### my opinion It seems it's successful when the entire file size is small. so, at least it doesn't file-specific issue. I don't know it's true but I think when beam_writter writes into a file, it consumes memory depends on its entire file. but It's correct Apache Beam's behavior? I'm not familiar with this library.
```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
606
ModuleNotFoundError: No module named 'apache_beam', when specific languages. ```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct? thanks for your reply and sorry for my late response. ## environment my local machine environment info - Ubuntu on WSL2 `lsb_release -a` ``` No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal ``` RTX 2070 super Inside WSL, there is no nvidia-msi command. I don't know why. But, `torch.cuda.is_available()` is true and when I start something ML training code GPU usage is growing up, so I think it works. From PowerShell, there is nvidia-smi.exe and result is below. ``` +-----------------------------------------------------------------------------+ | NVIDIA-SMI 470.05 Driver Version: 470.05 CUDA Version: 11.3 | |-------------------------------+----------------------+----------------------+ | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... WDDM | 00000000:09:00.0 On | N/A | | 0% 30C P8 19W / 175W | 523MiB / 8192MiB | 3% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1728 C+G Insufficient Permissions N/A | | 0 N/A N/A 3672 C+G ...ekyb3d8bbwe\YourPhone.exe N/A | | 0 N/A N/A 6304 C+G ...2txyewy\TextInputHost.exe N/A | | 0 N/A N/A 8648 C+G C:\Windows\explorer.exe N/A | | 0 N/A N/A 9536 C+G ...y\ShellExperienceHost.exe N/A | | 0 N/A N/A 10668 C+G ...5n1h2txyewy\SearchApp.exe N/A | | 0 N/A N/A 10948 C+G ...artMenuExperienceHost.exe N/A | | 0 N/A N/A 11988 C+G ...8wekyb3d8bbwe\Cortana.exe N/A | | 0 N/A N/A 12464 C+G ...cw5n1h2txyewy\LockApp.exe N/A | | 0 N/A N/A 13280 C+G ...upport\CEF\Max Helper.exe N/A | | 0 N/A N/A 15948 C+G ...t\GoogleIMEJaRenderer.exe N/A | | 0 N/A N/A 16128 C+G ...ram Files\Slack\Slack.exe N/A | | 0 N/A N/A 19096 C+G ...8bbwe\WindowsTerminal.exe N/A | +-----------------------------------------------------------------------------+ ``` I don't know what should I show in such a case. If it's not enough, please tell me some commands. --- ## what I did I surveyed more and I found 2 issues. About the first one, I wrote it as a new issue. https://github.com/huggingface/datasets/issues/2031 The error I mentioned in the previous comment above, which occurred on my local machine, is no longer occurring. But, it still failed. In the previous comment, I wrote `AssertionError: OutputStream realloc failed.` happen on another machine. It also happens on my local machine. Here's what I've tried. the wikipedia.py downloads these xml.bz2 files based on dumpstatus.json In Japanese Wikipedia dataset that I specified, it will download these 6 files. `https://dumps.wikimedia.org/jawiki/20210120/dumpstatus.json` and filtered json based on wikipedia.py is below. ```json { "jobs": { "articlesmultistreamdump": { "files": { "jawiki-20210120-pages-articles-multistream1.xml-p1p114794.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream1.xml-p1p114794.bz2" }, "jawiki-20210120-pages-articles-multistream2.xml-p114795p390428.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream2.xml-p114795p390428.bz2" }, "jawiki-20210120-pages-articles-multistream3.xml-p390429p902407.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream3.xml-p390429p902407.bz2" }, "jawiki-20210120-pages-articles-multistream4.xml-p902408p1721646.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream4.xml-p902408p1721646.bz2" }, "jawiki-20210120-pages-articles-multistream5.xml-p1721647p2807947.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream5.xml-p1721647p2807947.bz2" }, "jawiki-20210120-pages-articles-multistream6.xml-p2807948p4290013.bz2": { "url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream6.xml-p2807948p4290013.bz2" } } } } } ``` So, I tried running with fewer resources by modifying this line. https://github.com/huggingface/datasets/blob/13a5b7db992ad5cf77895e4c0f76595314390418/datasets/wikipedia/wikipedia.py#L524 I changed it like this. just change filepaths list. ` | "Initialize" >> beam.Create(filepaths[:1])` and I added a print line inside for the loop of _extract_content. like this `if(i % 100000 == 0): print(i)` first, without modification, it always stops after all _extract_content is done. - `filepaths[:1]` then it succeeded. - `filepaths[:2]` then it failed. I don't try all patterns because each pattern takes a long time. ### my opinion It seems it's successful when the entire file size is small. so, at least it doesn't file-specific issue. I don't know it's true but I think when beam_writter writes into a file, it consumes memory depends on its entire file. but It's correct Apache Beam's behavior? I'm not familiar with this library.
[ -0.016461919993162155, -0.12084290385246277, -0.04492589458823204, 0.1289520412683487, 0.3602374792098999, 0.011790119111537933, 0.4635162949562073, 0.39907509088516235, 0.2657027840614319, 0.22124475240707397, 0.3692159950733185, -0.09264887124300003, 0.07885443419218063, -0.050380222499370575, 0.3171321749687195, -0.3475852310657501, 0.38933953642845154, -0.1023072898387909, -0.04461529850959778, -0.2853875160217285, -0.3970682919025421, 0.09727421402931213, -0.3274345099925995, 0.20433315634727478, -0.2763908803462982, 0.38344860076904297, 0.08559475094079971, 0.0011823661625385284, 0.2684023380279541, -0.0742645412683487, 0.048305444419384, -0.3112153708934784, 0.2795860469341278, 0.1183507964015007, -0.00011737956810975447, 0.15392933785915375, 0.27871137857437134, -0.37968453764915466, -0.25454145669937134, -0.3259492516517639, 0.11808241158723831, -0.5497902035713196, 0.05365772545337677, -0.4102141857147217, -0.30816102027893066, -0.3167406916618347, -0.016724297776818275, -0.3641589283943176, 0.23516422510147095, 0.2283259481191635, 0.1696380376815796, 0.21523696184158325, -0.05530482530593872, 0.0463571771979332, 0.4933217763900757, 0.060214683413505554, -0.30580997467041016, -0.01811867207288742, 0.06976098567247391, 0.07447952777147293, 0.14658410847187042, 0.6420863270759583, -0.23146015405654907, -0.015231616795063019, 0.06731374561786652, -0.016785938292741776, 0.16636432707309723, -0.32633933424949646, 0.19459590315818787, 0.08995438367128372, 0.4828101396560669, -0.26629218459129333, -0.016271833330392838, 0.04100792109966278, -0.1090237945318222, -0.14964257180690765, 0.28068968653678894, 0.23350360989570618, -0.21531623601913452, 0.02550092712044716, 0.44677606225013733, -0.07512180507183075, 0.019394077360630035, 0.15088187158107758, -0.04147867113351822, 0.6642956733703613, 0.0698075219988823, 0.3139587938785553, -0.1830178052186966, -0.03873729705810547, -0.20581108331680298, -0.17636197805404663, 0.2024047076702118, 0.18691781163215637, -0.412222295999527, 0.05783124268054962, 0.1730615496635437, -0.15398040413856506, -0.18829557299613953, 0.02963721752166748, -0.21980732679367065, 0.022954128682613373, 0.5886102318763733, 0.04372824355959892, -0.14924301207065582, 0.16410653293132782, 0.2641569972038269, -0.11192156374454498, 0.28921788930892944, -0.21165068447589874, -0.05294620990753174, -0.03757264465093613, -0.11767927557229996, -0.3208051323890686, -0.6114048957824707, 0.21613258123397827, 0.3799571990966797, -0.11072026938199997, -0.3758542239665985, 0.0015657758340239525, -0.7844838500022888, -0.1767553836107254, -0.0009918473660945892, 0.5293401479721069, 0.29284942150115967, 0.41866475343704224, 0.2891371250152588, 0.20366188883781433, -0.21728603541851044, -0.3478888273239136, -0.07937195152044296, 0.2945081293582916, -0.3448716104030609, 0.25232869386672974, 0.11701847612857819, 0.18596959114074707, 0.21217428147792816, -0.20139597356319427, -0.09950385987758636, 0.034345582127571106, 0.01772196777164936, -0.05446607246994972, 0.16901448369026184, 0.479957640171051, 0.04840169474482536, 0.40806373953819275, 0.2257782518863678, 0.011672116816043854, -0.11727657914161682, 0.2429511547088623, -0.15485885739326477, -0.39441224932670593, -0.1468822956085205, 0.05110607668757439, -0.01675625704228878, 0.1968868523836136, 0.36287397146224976, 0.04268214479088783, 0.12288488447666168, 0.01235753670334816, 0.2530311346054077, 0.017857592552900314, -0.10541635751724243, -0.2124258428812027, 0.25074103474617004, 0.5459204912185669, -0.3039047122001648, -0.11065639555454254, 0.39615917205810547, -0.10538363456726074, -0.07860556989908218, 0.11522430181503296, -0.09785665571689606, 0.16368167102336884, -0.22835706174373627, -0.09721904993057251, 0.4880371391773224, -0.5070930123329163, -0.011066794395446777, 0.08041931688785553, -0.16730046272277832, -0.1454683244228363, 0.41601672768592834, -0.015810173004865646, -0.21558663249015808, -0.13846072554588318, -0.21775028109550476, 0.017940033227205276, 0.09550334513187408, -0.042616307735443115, -0.29792749881744385, -0.08484332263469696, 0.2965357303619385, 0.21431636810302734, 0.23680560290813446, -0.18624573945999146, 0.10660097002983093, 0.7018895745277405, 0.18042370676994324, -0.14689162373542786, 0.12321826070547104, 0.12063466012477875, 0.2017996460199356, -0.03149421513080597, 0.205733522772789, 0.08167339861392975, -0.3195114731788635, 0.1778334379196167, -0.16116368770599365, 0.24503977596759796, -0.03915703296661377, 0.009676903486251831, 0.12223843485116959, -0.029620787128806114, -0.18993577361106873, -0.4091169238090515, 0.07648298144340515, 0.11828908324241638, 0.0033128373324871063, 0.22170723974704742, -0.3516422510147095, 0.24913406372070312, -0.665017306804657, 0.023083670064806938, -0.12288835644721985, 0.06531895697116852, -0.22485892474651337, -0.13932421803474426, -0.20835402607917786, 0.20416927337646484, 0.16317065060138702, -0.2657232880592346, -0.055011406540870667, -0.012419942766427994, 0.0863434299826622, -0.10194849967956543, -0.16889363527297974, 0.1001054048538208, 0.10838986933231354, -0.10808147490024567, 0.35006412863731384, 0.07593674957752228, 0.2190006524324417, 0.00023886561393737793, -0.046616218984127045, 0.1902189552783966, 0.3913539946079254, 0.4031088650226593, 0.0441160649061203, -0.08268828690052032, 0.16713477671146393, -0.06757484376430511, -0.23202437162399292, -0.216559037566185, 0.18965895473957062, 0.3165908455848694, 0.028863202780485153, -0.03922206908464432, 0.037877798080444336, -0.1052471175789833, 0.5922946929931641, 0.12466937303543091, 0.29724687337875366, -0.07103695720434189, -0.3637947142124176, 0.17171356081962585, 0.2669872045516968, -0.13619986176490784, 0.37652087211608887, 0.11187121272087097, -0.2514684200286865, 0.07408885657787323, 0.18322595953941345, -0.19751760363578796, 0.144684299826622, 0.0935385450720787, 0.16172635555267334, 0.10956871509552002, -0.15309172868728638, -0.004960077814757824, -0.17569798231124878, 0.011773116886615753, -0.0014163767918944359, -0.11093337833881378, -0.25943103432655334, 0.10291857272386551, -0.3478597402572632, -0.4859146773815155, -0.2813383936882019, 0.04041384533047676, -0.2785395681858063, -0.07324870675802231, -0.11603780090808868, -0.02943204715847969, -0.218706414103508, 0.43045490980148315, 0.2571207582950592, 0.021932512521743774, -0.041165173053741455, -0.3306409418582916, -0.10260548442602158, -0.20488132536411285, -0.24495989084243774, -0.0036245882511138916, 0.31054896116256714, 0.176178976893425, 0.2550484538078308, -0.34881430864334106, 0.08701840043067932, -0.10863401740789413, -0.33605557680130005, 0.14654511213302612, 0.04183643311262131, -0.23108452558517456, -0.10005445778369904, 0.18324105441570282, 0.06511788070201874, -0.023921756073832512, 0.426532119512558, -0.12539532780647278, -0.14272455871105194, -0.0013659857213497162, -0.04989994317293167, -0.09586955606937408, -0.10203193128108978, -0.4964430034160614, -0.2645767331123352, -0.4758715033531189, -0.42599236965179443, 0.24124707281589508, 0.08109699189662933, -0.12813210487365723, 0.16065320372581482, 0.2923525273799896, -0.17032122611999512, 0.03713597357273102, 0.03112102672457695, 0.20798122882843018, 0.23173153400421143, -0.009069817140698433, -0.36047014594078064, 0.4372166693210602, -0.08420424163341522, 0.038598932325839996, 0.11581765860319138, -0.26034361124038696, 0.013745791278779507, 0.2989228367805481, -0.03719811141490936, -0.0009436160326004028, 0.263243168592453, 0.7203304767608643, -0.2250908762216568, 0.012708941474556923, -0.01416313648223877, -0.3290921747684479, 0.051052652299404144, 0.00737694650888443, 0.5198996067047119, 0.1697768270969391, 0.4387984275817871, 0.08485361933708191, 0.8618528842926025, -0.08453595638275146, -0.07008402049541473, 0.3741456866264343, 0.09399038553237915, 0.2071835845708847, -0.31627222895622253, -0.03148549795150757, 0.21954835951328278, 0.08645521104335785, -0.010963317938148975, 0.18712565302848816, -0.08836086094379425, 0.17060312628746033, -0.5178009867668152, -0.289861798286438, -0.011129897087812424, -0.1790735125541687, 0.3663790225982666, -0.28543567657470703, 0.19870692491531372, 0.041036102920770645, 0.19379675388336182, 0.04690639302134514, 0.13927143812179565, 0.1639202982187271, 0.6295225024223328, -0.012656927108764648, 0.013924440369009972, -0.17792823910713196, -0.12026388198137283, -0.11998071521520615, 0.2195674031972885, 0.07252383232116699, 0.21894945204257965, -0.129030242562294, -0.4745141863822937, 0.18569888174533844, 0.034948281943798065, 0.3213564157485962, -0.03588581085205078, -0.2871360182762146, 0.33163684606552124, -0.2321506291627884, -0.3497004210948944, -0.3062479496002197, -0.018968168646097183, -0.14873246848583221, -0.05708639696240425, 0.0013776272535324097, -0.031717538833618164, -0.4585866928100586, 0.3761836886405945, 0.2340421974658966, -0.25240516662597656, -0.22748689353466034, -0.4287630021572113, -0.046967726200819016, -0.5095897316932678, 0.008490301668643951, -0.13240104913711548, -0.1292981654405594, 0.026441918686032295, 0.17643935978412628, -0.06907156109809875, -0.20177003741264343, -0.056206077337265015, -0.06299315392971039, 0.08512536436319351, -0.06997115910053253, -0.26363828778266907, -0.23264750838279724, 0.7186852693557739, -0.1507544219493866, -0.04024891555309296, 0.1925613433122635, -0.0018100440502166748, 0.11990828067064285, -0.10798384249210358, 0.21378915011882782, 0.4486495852470398, -0.17680364847183228, 0.15943118929862976, -0.2837938964366913, -0.12071137130260468, -0.10630128532648087, -0.18080413341522217, 0.30445539951324463, -0.05091313272714615, -0.04306069761514664, -0.3201405107975006, 0.6241835355758667, -0.10735596716403961, 0.004430599510669708, 0.14719003438949585, 0.13185477256774902, -0.1044125109910965, 0.33199596405029297, 0.23365765810012817, 1.0358113050460815, 0.16427332162857056, 0.13244596123695374, 0.17999526858329773, 0.10778580605983734, 0.8329394459724426, -0.5984463691711426, 0.21736212074756622, -0.08510695397853851, 0.1365099549293518, -0.10828697681427002, -0.08187395334243774, 0.5945870876312256, -0.0067093633115291595, 0.07052963972091675, 0.3790997564792633, 0.26646071672439575, 0.6037871837615967, 0.0037626009434461594, -0.10991482436656952, 0.03554821014404297, -0.14972594380378723, -0.5489432215690613, -0.016892585903406143, -0.07442879676818848, 0.7894800305366516, -0.20710140466690063, -0.11288101226091385, -0.22802568972110748, -0.36418235301971436, -0.0988958328962326, 0.04117606580257416, -0.29092469811439514, 0.18580543994903564, -0.38281822204589844, -0.326805055141449, -0.040257178246974945, 0.14378735423088074, 0.35496801137924194, -0.08684052526950836, -0.1235942542552948, 0.042694270610809326, 0.007606253027915955, 0.000014996941899880767, -0.20815974473953247, 0.03679303079843521, 0.3847233057022095, -0.24814888834953308, -0.2196933627128601, 0.16346660256385803, -0.1109331026673317, -0.04944414645433426, 0.016012564301490784, 0.06965664029121399, 0.7141796946525574, 0.292741596698761, -0.2967755198478699, 0.3870977461338043, 0.09807287156581879, 0.005247578024864197, 0.09515818953514099, -0.251420259475708, -0.1515531688928604, -0.07230236381292343, -0.21721036732196808, -0.10101276636123657, -0.2248368114233017, 0.3276061415672302, 0.19994154572486877, -0.09728224575519562, 0.271237313747406, 0.17326924204826355, -0.17410635948181152, -0.2119038999080658, 0.16236191987991333, 0.036879751831293106, -0.43698957562446594, -0.2890702784061432, 0.3023824989795685, -0.17091667652130127, -0.1562233865261078, 0.17831942439079285, 0.06816035509109497, -0.18612992763519287, -0.08539572358131409, -0.22218890488147736, -0.23401112854480743, 0.20988471806049347, -0.12331008911132812, -0.21502117812633514, -0.06318189203739166, 0.2806888818740845, 0.4156888723373413, -0.15370073914527893, -0.22615528106689453, -0.2628733813762665, -0.12300939112901688, 0.19280856847763062, 0.4427235722541809, 0.29655975103378296, -0.012770164757966995, 0.1895492523908615, 0.0074951425194740295, -0.03800155222415924, -0.2186240553855896, -0.131211519241333, -0.015004994347691536, 0.17656953632831573, 0.2285003960132599, 0.19599312543869019, 0.18808773159980774, -0.2676888704299927, 0.08651404827833176, -0.07258836925029755, 0.09926071763038635, 0.186497300863266, -0.08947944641113281, 0.3508026897907257, -0.030673962086439133, 0.331659734249115, -0.44771111011505127, 0.23727399110794067, -0.2499566376209259, 0.36880630254745483, 0.2676360011100769, -0.08039774000644684, 0.40921029448509216, 0.2389478087425232, -0.374615341424942, -0.15237119793891907, -0.36454343795776367, 0.010473310947418213, -0.05462814122438431, -0.07198101282119751, -0.10211751610040665, -0.18598009645938873, -0.02452116645872593, 0.16070958971977234, -0.3545149564743042, -0.03653103858232498, 0.23273274302482605, 0.12669646739959717, -0.45439037680625916, 0.3731452524662018, 0.2427682727575302, -0.2154420018196106, -0.07727193832397461, 0.30604320764541626, 0.423177033662796, -0.09236636757850647, 0.3880971074104309, 0.17819863557815552, 0.0841992050409317, -0.20301569998264313, 0.20668672025203705, 0.3618159294128418, 0.29635629057884216, 0.3598014712333679, 0.020272474735975266, 0.11203727126121521, 0.19501084089279175, 0.5736839175224304, -0.12655171751976013, 0.5901022553443909, 0.15742281079292297, 0.34954777359962463, -0.09694110602140427, -0.14905858039855957, 0.31204208731651306, 0.3322591185569763, -0.014695785939693451, -0.33035916090011597, -0.22643503546714783, -0.30427083373069763, 0.04543409124016762, -0.1949993073940277, -0.26281315088272095, 0.1808091402053833, -0.19720938801765442, 0.07938951253890991, -0.1102149486541748, -0.12406723201274872, -0.070407934486866, 0.015701521188020706, 0.05193404108285904, -0.19517882168293, -0.0949363261461258, 0.12150520831346512, -0.1331932246685028, 0.05338812619447708, 0.12816829979419708, -0.06435717642307281, 0.030802350491285324, -0.08600543439388275, 0.08693213760852814, 0.14459280669689178, -0.1378285139799118, -0.060060229152441025, 0.08444478362798691, 0.21976646780967712, 0.46210652589797974, -0.08286944031715393, -0.025800198316574097, 0.1449398398399353, 0.0030350331217050552, 0.054176777601242065, 0.1591966599225998, -0.061380818486213684, 0.27683666348457336, 0.27798882126808167, 0.05658281594514847, -0.15914998948574066, 0.12183193862438202, 0.15829584002494812, -0.08831028640270233, -0.2958941161632538, 0.23886412382125854, -0.4307890236377716, 0.05102086067199707, -0.5330102443695068, 0.22333335876464844, -0.34494784474372864, -0.07879296690225601, 0.015765996649861336, 0.10411673039197922, -0.0151450727134943, -0.28991252183914185, 0.017829030752182007, -0.2573354244232178, 0.2379446029663086, -0.06475254893302917, 0.03804592043161392, -0.25128135085105896, -0.23041921854019165, -0.3195030391216278, 0.10346807539463043, -0.25535231828689575, 0.29227331280708313, -0.2727172076702118, 0.12759900093078613, 0.17636361718177795, 0.23952354490756989, -0.04130391776561737, 0.19592340290546417, 0.07572894543409348, 0.04284905642271042, -0.3069571554660797, -0.2197023183107376, -0.340143084526062, 0.11602038890123367, -0.10838286578655243, -0.2545759677886963, -0.04245883598923683, -0.23321980237960815, -0.012937787920236588, -0.3310772776603699, -0.231615349650383, 0.47526729106903076, 0.08147336542606354, 0.5481074452400208, -0.027550281956791878, 0.2614421248435974, 0.1008111760020256, -0.06969699263572693, -0.040029432624578476, 0.039120011031627655, -0.20417676866054535, 0.19289445877075195, 0.04229782521724701, 0.019743483513593674, -0.09211189299821854, -0.10007382929325104, -0.24495449662208557, 0.3905464708805084, -0.015144027769565582, -0.0077194529585540295, -0.10536876320838928, 0.09471183270215988, -0.08854889124631882, 0.06877835839986801, 0.22806590795516968, -0.09097296744585037, -0.14017313718795776, -0.19013634324073792, -0.4491507411003113, 0.06038972735404968, 0.2830469608306885, -0.33109530806541443, -0.14125217497348785, -0.09223240613937378, 0.36147695779800415, -0.2765081226825714, 0.09676774591207504, -0.325551837682724, 0.06482776254415512, 0.20819266140460968, 0.09999748319387436, 0.04357282444834709, 0.15688683092594147, 0.007800346240401268, -0.2377977818250656, -0.08288344740867615, -0.7149182558059692, -0.10678675025701523, -0.0013866275548934937, -0.1434369832277298, -0.44230467081069946 ]
https://github.com/huggingface/datasets/issues/1790
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
I don't know if this is related, but there is this issue on the wikipedia processing that you reported at #2031 (open PR is at #2037 ) . Does the fix your proposed at #2037 helps in your case ? And for information, the DirectRunner of Apache Beam is not optimized for memory intensive tasks, so you must be right when you say that it uses the memory for the entire file.
```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
72
ModuleNotFoundError: No module named 'apache_beam', when specific languages. ```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct? I don't know if this is related, but there is this issue on the wikipedia processing that you reported at #2031 (open PR is at #2037 ) . Does the fix your proposed at #2037 helps in your case ? And for information, the DirectRunner of Apache Beam is not optimized for memory intensive tasks, so you must be right when you say that it uses the memory for the entire file.
[ 0.11173495650291443, -0.006440885365009308, 0.008771009743213654, 0.3851279616355896, 0.37669849395751953, 0.09046380966901779, 0.1866939812898636, 0.4343986213207245, 0.23802950978279114, 0.1273682564496994, 0.17051450908184052, 0.02249237522482872, -0.012138270772993565, -0.21757249534130096, 0.02937692403793335, -0.3352380096912384, 0.2749055325984955, -0.01937568187713623, -0.17039300501346588, -0.23357924818992615, -0.36291056871414185, 0.11334855109453201, -0.41487807035446167, -0.10945060849189758, -0.16017352044582367, 0.1928723007440567, -0.04803171753883362, 0.09546223282814026, 0.13949444890022278, -0.3413204848766327, -0.11715243756771088, -0.10673333704471588, -0.01804892159998417, 0.3060232102870941, -0.00010879553155973554, 0.09125636518001556, 0.5745624899864197, -0.18880577385425568, -0.284651517868042, 0.04064022749662399, -0.03717299923300743, -0.49544769525527954, -0.013974775560200214, -0.4732247292995453, -0.0351131409406662, -0.21193568408489227, 0.15260177850723267, -0.37778037786483765, 0.3918655514717102, 0.1425272822380066, 0.25095608830451965, 0.2651482820510864, 0.06630763411521912, -0.007842954248189926, 0.5856634378433228, -0.09682048857212067, -0.05107409134507179, -0.11220347881317139, -0.28884804248809814, -0.04989948868751526, -0.22353556752204895, 0.5995761752128601, -0.2624768018722534, 0.07026997208595276, 0.3599033057689667, -0.23007914423942566, -0.14920440316200256, -0.452115923166275, 0.32671114802360535, 0.1715230941772461, 0.8122544884681702, -0.29321181774139404, -0.17808718979358673, -0.11612572520971298, -0.18160486221313477, 0.05674898624420166, 0.21397101879119873, 0.3344727158546448, -0.18978071212768555, -0.06125042960047722, 0.4706633687019348, -0.22750599682331085, -0.04098266363143921, 0.06938467919826508, 0.020294129848480225, 0.30312150716781616, 0.09454905241727829, 0.19883140921592712, 0.10800780355930328, -0.059091418981552124, -0.0815240666270256, -0.2535690367221832, 0.05673149600625038, 0.28741732239723206, -0.32481029629707336, 0.11214891076087952, 0.11602701246738434, 0.06251738965511322, 0.12343629449605942, -0.2639254331588745, -0.2927090525627136, 0.2417600452899933, 0.26710331439971924, 0.03555283695459366, 0.2241148054599762, 0.1502586454153061, 0.028699755668640137, 0.13771873712539673, 0.5333329439163208, -0.19619905948638916, -0.18964260816574097, -0.015571799129247665, 0.02572537586092949, -0.23971478641033173, -0.08355757594108582, -0.07011476159095764, 0.14213553071022034, -0.1068674772977829, -0.0019679348915815353, 0.1800704300403595, -0.2986363172531128, -0.16593119502067566, -0.22923798859119415, 0.5317001342773438, 0.05753428488969803, 0.5937872529029846, 0.20139269530773163, 0.12621912360191345, -0.34332841634750366, -0.2992623448371887, -0.1430038958787918, 0.34053707122802734, -0.3400128185749054, 0.20809003710746765, 0.059862468391656876, 0.22097459435462952, 0.2671978175640106, -0.14406514167785645, 0.02793610841035843, -0.09875231981277466, 0.1566367894411087, -0.1712188720703125, -0.032267965376377106, 0.4470682740211487, 0.08759792149066925, 0.44869741797447205, 0.1538456827402115, -0.009893089532852173, -0.07206246256828308, 0.26323845982551575, -0.24329867959022522, -0.34934553503990173, 0.2551344037055969, 0.1173764169216156, -0.2879619598388672, 0.29029107093811035, 0.0025141090154647827, -0.02848290279507637, 0.1678849458694458, -0.0079851895570755, 0.046583905816078186, -0.018021579831838608, -0.22050170600414276, -0.3830631971359253, 0.2032206654548645, 0.7963464856147766, -0.06928949803113937, 0.04779072850942612, 0.050692204385995865, -0.06628796458244324, 0.15844285488128662, 0.19491735100746155, -0.07040054351091385, 0.2086959183216095, -0.16765670478343964, -0.03169291093945503, 0.5124145150184631, -0.585802435874939, -0.18748843669891357, 0.2188701182603836, 0.022370129823684692, 0.03302066773176193, 0.26648202538490295, 0.1075228825211525, -0.19009414315223694, -0.1260579377412796, -0.06537501513957977, 0.17626327276229858, 0.15192270278930664, 0.33025527000427246, -0.5582461953163147, 0.02295730449259281, 0.08134929835796356, 0.16523730754852295, 0.32619038224220276, -0.09236902743577957, -0.013221949338912964, 0.5644574165344238, 0.23600554466247559, -0.27735379338264465, 0.2775585949420929, 0.44969117641448975, -0.14570996165275574, -0.021472692489624023, 0.33412399888038635, -0.017070000991225243, 0.031477734446525574, 0.28328844904899597, -0.2546028196811676, 0.2395664006471634, 0.017152272164821625, -0.1440318375825882, -0.09357468783855438, -0.009036214090883732, -0.217204287648201, -0.3565833568572998, 0.18773163855075836, -0.03703847527503967, -0.025104856118559837, 0.29283830523490906, -0.0906110480427742, 0.3070310354232788, -0.19839024543762207, -0.04409832879900932, -0.3090106248855591, 0.05757422000169754, -0.21602974832057953, -0.009151202626526356, 0.07317237555980682, 0.09855073690414429, 0.155062735080719, -0.0391974039375782, -0.139749675989151, 0.20858553051948547, 0.2723044157028198, 0.001552589237689972, 0.06436660140752792, -0.03447557985782623, 0.15588535368442535, -0.21280169486999512, 0.3646452724933624, 0.20923875272274017, 0.250732421875, -0.13808858394622803, -0.011131390929222107, 0.12077099084854126, 0.24122251570224762, 0.3808268904685974, 0.135459765791893, -0.06676691770553589, 0.0642811581492424, 0.06133871152997017, -0.08797303587198257, -0.22833369672298431, 0.19641713798046112, 0.33567431569099426, 0.09885731339454651, 0.062462687492370605, 0.04359189420938492, -0.24468332529067993, 0.5019388794898987, 0.0910700261592865, 0.19941264390945435, 0.035118669271469116, -0.5036805868148804, -0.029586603865027428, 0.12203135341405869, -0.12322176247835159, 0.20443782210350037, 0.18944108486175537, -0.00854659453034401, -0.004706883803009987, 0.30416935682296753, -0.09652550518512726, 0.21947798132896423, 0.188198983669281, 0.37774378061294556, 0.02121446654200554, 0.005470007658004761, -0.06656930595636368, -0.10159903019666672, 0.05963951721787453, -0.1179070770740509, 0.18422244489192963, -0.19342723488807678, -0.025948984548449516, -0.28648069500923157, -0.47601965069770813, -0.19963645935058594, 0.3563889265060425, -0.36193907260894775, -0.29718881845474243, -0.0733862891793251, -0.09439845383167267, -0.25135236978530884, 0.20481805503368378, 0.17305925488471985, -0.00696505606174469, 0.07833382487297058, -0.2935422956943512, -0.15004855394363403, -0.5236814022064209, -0.23008018732070923, 0.00038154423236846924, 0.39284631609916687, 0.050526250153779984, 0.2879634201526642, -0.0820048600435257, -0.0886782631278038, -0.18842573463916779, -0.05573303997516632, 0.0971696525812149, 0.0015283189713954926, -0.0784614309668541, -0.14323338866233826, 0.4003283977508545, 0.01841101422905922, 0.08454863727092743, 0.3466523289680481, -0.114411860704422, -0.09975723922252655, 0.17980420589447021, 0.11478853970766068, 0.13617148995399475, 0.02012939751148224, -0.4075707197189331, -0.15684868395328522, -0.5240033864974976, -0.0364496186375618, 0.13532736897468567, 0.1469874382019043, -0.04097595065832138, 0.16971881687641144, 0.07809519022703171, 0.14288024604320526, 0.141445592045784, -0.04511353000998497, 0.10105966031551361, 0.3315563201904297, -0.19583778083324432, -0.4916898310184479, 0.26152732968330383, -0.11016390472650528, 0.07725793123245239, 0.2027609795331955, -0.3696202039718628, -0.13230445981025696, 0.045065589249134064, -0.047000668942928314, -0.021563440561294556, 0.36005741357803345, 0.40211614966392517, -0.1137850433588028, -0.09459000825881958, -0.05547526106238365, -0.05451025068759918, -0.18783998489379883, -0.3114803731441498, 0.12626859545707703, 0.17685872316360474, 0.2660347521305084, 0.12446379661560059, 0.8918665647506714, 0.06133531406521797, 0.5280163288116455, 0.4090196490287781, 0.10653701424598694, 0.23704560101032257, -0.3116825819015503, -0.01006817165762186, 0.08712250739336014, -0.02129359543323517, -0.11222314834594727, 0.2411683201789856, 0.069353386759758, -0.2553133964538574, -0.4276478886604309, -0.4160271883010864, -0.2520231306552887, -0.3027331829071045, 0.2996939718723297, -0.1315901279449463, 0.23879417777061462, 0.11501358449459076, 0.1127491369843483, -0.10543027520179749, -0.0923343226313591, 0.2437109351158142, 0.13621270656585693, 0.1016860157251358, -0.0783148854970932, 0.10506628453731537, -0.09679915010929108, -0.4224518835544586, 0.3081122636795044, -0.06701251119375229, 0.06078268215060234, 0.007972996681928635, -0.394171804189682, 0.13605912029743195, -0.15139614045619965, 0.5284689664840698, -0.1971026211977005, -0.14983704686164856, 0.21068060398101807, -0.05456774681806564, -0.6518246531486511, -0.08458717912435532, 0.02672548219561577, 0.009511705487966537, 0.06694748997688293, -0.05282518267631531, -0.31648170948028564, -0.19070366024971008, 0.15858809649944305, 0.44117772579193115, -0.19340549409389496, -0.1890028417110443, -0.5053490996360779, -0.02053608000278473, -0.5622543692588806, -0.05582874268293381, -0.10675009340047836, 0.05581533536314964, 0.15813873708248138, 0.2365366369485855, 0.12424623966217041, -0.047210369259119034, -0.04125404357910156, 0.005166985094547272, 0.32558751106262207, -0.23548825085163116, -0.10835300385951996, -0.06813469529151917, 0.12136036157608032, -0.1879371702671051, 0.2294457107782364, 0.04578901827335358, -0.18277359008789062, -0.09380202740430832, -0.07964105904102325, 0.027724996209144592, 0.3150026500225067, -0.04049227014183998, -0.040811024606227875, -0.1707972288131714, -0.1193852424621582, -0.12085065990686417, 0.01311265118420124, 0.10022442042827606, -0.1311953067779541, -0.2984960973262787, -0.48364415764808655, 0.6179901957511902, 0.09604595601558685, -0.09492912888526917, 0.4127900004386902, 0.09304629266262054, -0.2057652324438095, 0.5778888463973999, 0.1268903911113739, 0.9856184124946594, -0.0980035662651062, 0.2745046615600586, 0.07980876415967941, 0.054457128047943115, 0.6281548142433167, -0.7983608841896057, 0.24773181974887848, -0.29508110880851746, 0.0890980139374733, 0.09155108034610748, -0.023363126441836357, 0.24113258719444275, -0.09344495832920074, 0.06975843012332916, 0.48061150312423706, 0.18044431507587433, 0.2832389771938324, -0.18689276278018951, 0.23301205039024353, -0.17425796389579773, -0.199081689119339, -0.28565576672554016, 0.10444982349872589, -0.06556075811386108, 0.44406959414482117, -0.15353474020957947, -0.00710337795317173, -0.1861335188150406, -0.23928987979888916, -0.3046661615371704, -0.009919954463839531, -0.14776425063610077, 0.17591285705566406, -0.39438384771347046, -0.39732909202575684, -0.11621831357479095, 0.3625173568725586, 0.20089294016361237, 0.16399604082107544, -0.2189245969057083, 0.20823626220226288, -0.1592370569705963, -0.030605491250753403, -0.12270284444093704, 0.1668751835823059, 0.2763913571834564, -0.298098623752594, -0.19438880681991577, 0.06289991736412048, -0.3802570104598999, -0.1166153997182846, -0.13802051544189453, 0.1541886031627655, 0.44239312410354614, 0.21777881681919098, -0.30476394295692444, 0.24238239228725433, -0.14723804593086243, -0.05086734890937805, 0.1976381242275238, -0.08426778018474579, -0.14814016222953796, 0.12618735432624817, -0.18831157684326172, -0.1309753954410553, -0.01097773015499115, 0.39764732122421265, 0.34331798553466797, -0.004151158034801483, 0.4232972264289856, 0.05210476741194725, -0.3017270565032959, -0.2160414457321167, 0.18238884210586548, -0.010428993962705135, -0.11838294565677643, 0.026546332985162735, 0.12449325621128082, -0.030153855681419373, -0.20321640372276306, -0.03711197152733803, -0.07559026777744293, -0.14074337482452393, -0.082023486495018, -0.2634492814540863, -0.20336242020130157, 0.22705094516277313, -0.1080818921327591, -0.10152380168437958, -0.027417875826358795, 0.04696735367178917, 0.2720538377761841, -0.05088818818330765, -0.305616557598114, -0.17097261548042297, -0.09498009830713272, 0.2063300907611847, 0.34151166677474976, 0.23069238662719727, 0.04893522337079048, 0.10199461877346039, 0.07673744857311249, 0.11105865240097046, -0.20870311558246613, -0.2281426191329956, 0.051665645092725754, 0.15997803211212158, 0.03093964420258999, 0.01778523251414299, 0.19888024032115936, -0.391529381275177, 0.18255335092544556, -0.36390677094459534, 0.14214393496513367, 0.10928434878587723, -0.2722727656364441, 0.2204231470823288, 0.13617703318595886, 0.2705433666706085, -0.1716284602880478, 0.24884970486164093, -0.22883445024490356, 0.3137669265270233, 0.254361093044281, 0.037239644676446915, 0.4439239799976349, 0.009205803275108337, -0.36846932768821716, -0.12062609940767288, -0.26616978645324707, -0.06667094677686691, 0.11506110429763794, -0.10130055248737335, -0.1882530152797699, 0.0767025351524353, 0.0809454619884491, 0.27711373567581177, -0.18835169076919556, 0.0011661816388368607, 0.21101495623588562, 0.21676410734653473, -0.2984398901462555, 0.03784938529133797, 0.37298890948295593, -0.30676189064979553, -0.07391251623630524, 0.17837268114089966, 0.2772957980632782, -0.11618250608444214, 0.1965160220861435, 0.20129966735839844, 0.19178293645381927, -0.3311789035797119, 0.19139711558818817, 0.03335235267877579, 0.26250022649765015, 0.009125322103500366, -0.0425490140914917, -0.02670304849743843, 0.20355772972106934, 0.685083270072937, -0.10945051163434982, 0.5020674467086792, 0.20983603596687317, 0.11651363968849182, -0.3393755853176117, -0.30473366379737854, 0.36270391941070557, 0.3669021725654602, -0.02260400354862213, 0.03687985613942146, -0.08350406587123871, -0.07521349936723709, 0.22787003219127655, -0.10509130358695984, -0.18979033827781677, 0.24556821584701538, -0.08777984231710434, 0.006721764802932739, 0.049344539642333984, -0.24459880590438843, 0.08703453838825226, 0.20506824553012848, 0.10636976361274719, -0.2664584517478943, 0.19616499543190002, 0.2542010545730591, -0.13885153830051422, -0.0565979927778244, 0.447915256023407, -0.09611048549413681, 0.2970237731933594, -0.2762942612171173, -0.1655035763978958, 0.06546612083911896, -0.0799277126789093, -0.022202808409929276, 0.0861077606678009, 0.32776060700416565, 0.34828710556030273, -0.31593039631843567, -0.07674015313386917, 0.029719889163970947, -0.026904739439487457, -0.09785591810941696, 0.14721038937568665, -0.0032559484243392944, 0.3576391935348511, 0.1961807906627655, 0.09482062608003616, -0.2257528156042099, -0.1506105661392212, 0.21033509075641632, -0.10469375550746918, -0.2842313349246979, -0.038917385041713715, -0.18626630306243896, -0.21258041262626648, -0.32177695631980896, 0.056565895676612854, -0.4617810845375061, 0.16192886233329773, 0.08852450549602509, 0.13175641000270844, -0.11589907854795456, -0.2898361086845398, 0.0823645070195198, -0.15696276724338531, 0.3282446265220642, 0.11399030685424805, 0.12215638160705566, -0.3864791691303253, -0.23179905116558075, -0.5559620261192322, 0.1474357396364212, -0.45316049456596375, 0.10837829113006592, -0.1252705603837967, 0.28784313797950745, 0.005669191479682922, 0.19559961557388306, -0.017747104167938232, -0.03197894245386124, -0.060900166630744934, 0.2072954624891281, -0.4182613790035248, -0.10437178611755371, -0.22509990632534027, -0.016174746677279472, -0.06847628951072693, -0.3324563801288605, 0.08186439424753189, -0.18010753393173218, 0.08141119033098221, -0.09092721343040466, -0.32388782501220703, 0.4874145984649658, 0.07691751420497894, 0.6690855026245117, 0.032461971044540405, 0.25324344635009766, 0.03848962485790253, -0.1536330282688141, -0.1856965869665146, -0.046921201050281525, -0.1451811045408249, -0.07428129762411118, 0.027562785893678665, 0.2506353557109833, -0.2115621268749237, -0.20130237936973572, -0.29114076495170593, 0.594409167766571, -0.17310433089733124, 0.2295297533273697, 0.04831583797931671, -0.057490915060043335, 0.1654851734638214, 0.20907846093177795, -0.10062868148088455, 0.0978660061955452, -0.14231544733047485, -0.142838254570961, -0.5927691459655762, -0.2566542327404022, 0.318578839302063, -0.6523000597953796, -0.33540207147598267, 0.027040883898735046, 0.35866278409957886, -0.20102593302726746, -0.02477157674729824, -0.47749343514442444, 0.11348540335893631, 0.2376115769147873, 0.20942574739456177, -0.13714008033275604, -0.050002966076135635, -0.23368968069553375, -0.008302059024572372, -0.06358392536640167, -0.34901753067970276, -0.18454912304878235, -0.2370748221874237, -0.05940902605652809, -0.33103489875793457 ]
https://github.com/huggingface/datasets/issues/1790
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
the #2037 doesn't solve my problem directly, but I found the point! https://github.com/huggingface/datasets/blob/349ac4398a3bcae6356f14c5754483383a60e8a4/datasets/wikipedia/wikipedia.py#L523 this `beam.transforms.Reshuffle()` cause the memory error. it makes sense if I consider the shuffle means. Beam's reshuffle seems need put all data in memory. Previously I doubt that this line causes error, but at that time another bug showed in #2037 made error, so I can't found it. Anyway, I comment out this line, and run load_dataset, then it works! ```python wiki = datasets.load_dataset( "./wikipedia.py", cache_dir="./datasets", beam_runner="DirectRunner", language="ja", date="20210120", )["train"] ``` ![image](https://user-images.githubusercontent.com/6331508/112283369-6a9f3300-8ccb-11eb-82e5-827bf7fddfb9.png) Dataset has already shuffle function. https://github.com/huggingface/datasets/blob/349ac4398a3bcae6356f14c5754483383a60e8a4/src/datasets/arrow_dataset.py#L2069 So, though I don't know it's difference correctly, but I think Beam's reshuffle isn't be needed. How do you think?
```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
111
ModuleNotFoundError: No module named 'apache_beam', when specific languages. ```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct? the #2037 doesn't solve my problem directly, but I found the point! https://github.com/huggingface/datasets/blob/349ac4398a3bcae6356f14c5754483383a60e8a4/datasets/wikipedia/wikipedia.py#L523 this `beam.transforms.Reshuffle()` cause the memory error. it makes sense if I consider the shuffle means. Beam's reshuffle seems need put all data in memory. Previously I doubt that this line causes error, but at that time another bug showed in #2037 made error, so I can't found it. Anyway, I comment out this line, and run load_dataset, then it works! ```python wiki = datasets.load_dataset( "./wikipedia.py", cache_dir="./datasets", beam_runner="DirectRunner", language="ja", date="20210120", )["train"] ``` ![image](https://user-images.githubusercontent.com/6331508/112283369-6a9f3300-8ccb-11eb-82e5-827bf7fddfb9.png) Dataset has already shuffle function. https://github.com/huggingface/datasets/blob/349ac4398a3bcae6356f14c5754483383a60e8a4/src/datasets/arrow_dataset.py#L2069 So, though I don't know it's difference correctly, but I think Beam's reshuffle isn't be needed. How do you think?
[ 0.11943504214286804, 0.11088673770427704, 0.009472798556089401, 0.429506778717041, 0.5010874271392822, 0.05407484620809555, 0.18194730579853058, 0.40080198645591736, -0.05477727949619293, 0.31626200675964355, 0.11126898974180222, 0.0270881038159132, -0.1956252008676529, -0.30971559882164, 0.08737763017416, -0.34309688210487366, 0.26977503299713135, -0.09609562158584595, -0.24898767471313477, -0.23211278021335602, -0.3576427102088928, 0.042138807475566864, -0.4852917194366455, -0.19316385686397552, -0.2590045630931854, 0.3534105718135834, -0.19048793613910675, 0.24513038992881775, -0.011713661253452301, -0.1757083684206009, -0.08209234476089478, -0.10670426487922668, -0.11210814863443375, 0.3131391406059265, -0.00011333469592500478, 0.1047418862581253, 0.3758174180984497, -0.2779262661933899, -0.32590773701667786, -0.19894234836101532, -0.05530809238553047, -0.30001145601272583, -0.1625954806804657, -0.3917805850505829, -0.07171837240457535, -0.26757752895355225, 0.11966482549905777, -0.35489749908447266, 0.4223269820213318, 0.20121484994888306, 0.20539651811122894, 0.22588764131069183, 0.02812967076897621, -0.01647302322089672, 0.6700218915939331, 0.0871260017156601, -0.11163776367902756, 0.06833674013614655, -0.14884960651397705, 0.009839273989200592, -0.161500483751297, 0.5495010614395142, -0.20709578692913055, 0.07432956993579865, 0.23976680636405945, -0.2371824085712433, -0.23221388459205627, -0.3541303277015686, 0.22168955206871033, 0.17822912335395813, 0.6323608756065369, -0.34899410605430603, -0.12434733659029007, -0.16074880957603455, -0.05394689738750458, 0.14438554644584656, 0.25405851006507874, 0.18642514944076538, -0.12009178102016449, -0.12211635708808899, 0.13192656636238098, -0.1353093534708023, 0.012792527675628662, 0.20989151298999786, 0.23062211275100708, 0.4240312874317169, 0.027673661708831787, 0.29969215393066406, 0.1630721539258957, -0.1836213618516922, 0.15717236697673798, -0.24611729383468628, 0.076619453728199, 0.35729339718818665, -0.39374250173568726, 0.03479640930891037, 0.028133094310760498, 0.001492321491241455, 0.10850366204977036, -0.12328973412513733, -0.17551447451114655, 0.17446964979171753, 0.3144141137599945, -0.009459398686885834, 0.11996930837631226, 0.4047933518886566, 0.09894292801618576, 0.26471903920173645, 0.11857610940933228, -0.18729309737682343, -0.06395544111728668, -0.043525464832782745, -0.09049980342388153, -0.43364906311035156, -0.26203468441963196, 0.213177889585495, 0.13391800224781036, -0.030590565875172615, -0.15400980412960052, 0.05654611065983772, -0.42729851603507996, -0.16209372878074646, -0.061286527663469315, 0.48483806848526, 0.14397355914115906, 0.5003723502159119, 0.21227185428142548, 0.14866894483566284, -0.2858893573284149, -0.2623575031757355, -0.25689011812210083, 0.4522441327571869, -0.4812205135822296, 0.1976666897535324, 0.03834059461951256, 0.24817651510238647, 0.2800931930541992, -0.17244894802570343, 0.15919624269008636, 0.03342072665691376, 0.0613643079996109, -0.1664857566356659, 0.04875658079981804, 0.4103955924510956, 0.011913865804672241, 0.3502828776836395, 0.19280242919921875, 0.13934649527072906, -0.09286364167928696, 0.26793670654296875, -0.3535986542701721, -0.3601422905921936, 0.2299659252166748, 0.07138324528932571, -0.31137150526046753, 0.19205257296562195, -0.1264995038509369, -0.06472750008106232, 0.1432967633008957, 0.04464329406619072, 0.2136843055486679, -0.021093491464853287, -0.15411736071109772, -0.36666008830070496, 0.18561775982379913, 0.7775564789772034, -0.10789984464645386, -0.08556471019983292, 0.03305361419916153, -0.21807101368904114, 0.17708536982536316, 0.0684080570936203, -0.07541720569133759, 0.09663901478052139, -0.27167102694511414, 0.015153981745243073, 0.5695838332176208, -0.45804160833358765, -0.16687877476215363, -0.02214668318629265, -0.07899517565965652, 0.036523185670375824, 0.18951529264450073, 0.12573066353797913, -0.2894611954689026, -0.10471965372562408, 0.11730825901031494, 0.10430752485990524, 0.038379110395908356, 0.25669580698013306, -0.43438106775283813, -0.1676720827817917, 0.061606064438819885, 0.2503468692302704, 0.2828434705734253, -0.09250194579362869, 0.031144089996814728, 0.5866729617118835, 0.1889616847038269, -0.11026829481124878, 0.2881118655204773, 0.45247799158096313, -0.0726473480463028, 0.07783769071102142, 0.1638423204421997, -0.059828028082847595, -0.25770020484924316, 0.2902611196041107, -0.10854572802782059, 0.22229111194610596, 0.05075828731060028, -0.013520976528525352, -0.06831352412700653, -0.22907403111457825, -0.2977701425552368, -0.28296664357185364, 0.1336338371038437, 0.02857714146375656, 0.08801797032356262, 0.15432605147361755, -0.26262950897216797, 0.38146650791168213, -0.3416260778903961, 0.029517436400055885, -0.5024132132530212, 0.25086236000061035, -0.19546377658843994, -0.14621596038341522, 0.03085833042860031, 0.08732523769140244, 0.19175046682357788, -0.13716068863868713, -0.13816586136817932, 0.3913843035697937, 0.25229281187057495, -0.056374162435531616, -0.03764806687831879, -0.08958779275417328, 0.13251130282878876, -0.2032928764820099, 0.34077098965644836, 0.05847655236721039, 0.1820220649242401, -0.1298588514328003, 0.1848863959312439, 0.13257332146167755, 0.06252022087574005, 0.39703020453453064, 0.11564664542675018, -0.06933785229921341, -0.06774839013814926, 0.1494114100933075, -0.11360851675271988, -0.3245391547679901, 0.350978821516037, 0.3328653573989868, 0.1574704647064209, 0.08859309554100037, 0.037729568779468536, -0.29714009165763855, 0.6881403923034668, 0.14267171919345856, 0.11367618292570114, -0.05749419331550598, -0.4095005691051483, 0.06939863413572311, 0.15139511227607727, 0.03449568524956703, 0.4079180359840393, 0.1365346759557724, -0.11493973433971405, 0.14097477495670319, 0.2153792530298233, -0.0987563356757164, 0.13170269131660461, 0.2377413809299469, 0.4221459627151489, 0.052726007997989655, -0.08965769410133362, -0.011226675473153591, -0.19303590059280396, -0.1728312224149704, 0.06675289571285248, 0.1590050607919693, -0.25496938824653625, -0.12092076987028122, -0.41972196102142334, -0.5174443125724792, -0.27533602714538574, 0.14927464723587036, -0.397788405418396, -0.24530182778835297, -0.10704848170280457, -0.07266989350318909, -0.32242900133132935, 0.3194848597049713, 0.27901431918144226, -0.04906027019023895, 0.016862967982888222, -0.32352414727211, -0.1718970239162445, -0.2900444269180298, -0.2571319043636322, 0.02161414548754692, 0.3672420382499695, 0.060844603925943375, 0.23790773749351501, -0.26658326387405396, -0.16853046417236328, -0.10879602283239365, -0.15080568194389343, 0.15115374326705933, 0.02630077674984932, -0.14425154030323029, -0.11143703758716583, 0.35102856159210205, -0.18202567100524902, -0.10188523679971695, 0.47752001881599426, -0.05712617188692093, -0.2166934311389923, 0.2488495409488678, 0.18314716219902039, 0.0790502279996872, -0.1002005785703659, -0.44660088419914246, -0.1296709030866623, -0.5109665393829346, -0.07408389449119568, 0.08986331522464752, 0.09745027124881744, 0.1583661139011383, 0.26316893100738525, 0.1819608360528946, -0.12761828303337097, -0.030172916129231453, -0.11609642952680588, -0.05214126780629158, 0.27221521735191345, -0.14650578796863556, -0.3368285596370697, 0.2014802098274231, -0.10447927564382553, -0.0021725893020629883, 0.36334139108657837, -0.1813989281654358, -0.0972968265414238, 0.0007993467152118683, -0.2872745096683502, -0.05325137823820114, 0.352098673582077, 0.560491681098938, -0.1533246636390686, -0.031633395701646805, -0.03311222046613693, -0.08586149662733078, -0.12025434523820877, 0.0027140211313962936, 0.3534729778766632, 0.05900634825229645, 0.27311816811561584, 0.17359164357185364, 0.932515025138855, -0.02689899504184723, 0.46212121844291687, 0.4056241810321808, 0.049927160143852234, 0.3116858899593353, -0.39582425355911255, -0.04055068641901016, 0.24758374691009521, 0.14203830063343048, -0.07826046645641327, 0.19396328926086426, -0.011283274739980698, -0.03589797765016556, -0.515216588973999, -0.31678465008735657, -0.21988677978515625, -0.3144631087779999, 0.3542358875274658, -0.15140827000141144, 0.009882926940917969, -0.0006798151880502701, 0.047347597777843475, 0.027867190539836884, -0.06337593495845795, 0.03904227167367935, 0.2465267926454544, -0.034713469445705414, 0.04174879565834999, -0.22931841015815735, -0.1894802451133728, -0.3416494131088257, 0.29458892345428467, 0.02481929585337639, 0.17045025527477264, -0.05901714414358139, -0.3400985896587372, 0.1011069044470787, 0.07092434167861938, 0.6148951053619385, -0.22570538520812988, -0.24672649800777435, 0.2860552668571472, 0.027074553072452545, -0.6423118710517883, -0.19499492645263672, -0.02425052598118782, -0.10033953934907913, -0.18188421428203583, 0.08190157264471054, -0.2344074547290802, -0.19791339337825775, 0.17020338773727417, 0.3472844958305359, -0.046282246708869934, -0.1886782944202423, -0.45854249596595764, -0.03597996383905411, -0.5773242115974426, -0.13744992017745972, -0.03054787591099739, 0.030287647619843483, 0.08994866162538528, 0.31635773181915283, 0.18987493216991425, -0.1917281448841095, -0.02151539921760559, -0.11194297671318054, 0.341362863779068, -0.1046372577548027, -0.1710597425699234, 0.10902868211269379, 0.042470529675483704, 0.03034598007798195, 0.2900736629962921, 0.1259758025407791, -0.1707865595817566, 0.043414995074272156, 0.029468365013599396, 0.050878286361694336, 0.4066847264766693, -0.07217378914356232, -0.041155315935611725, -0.04372638463973999, -0.06931386888027191, -0.020820990204811096, 0.02988128550350666, 0.10852563381195068, -0.2762962579727173, -0.20657901465892792, -0.6122493743896484, 0.6164754033088684, 0.07793892920017242, -0.007047228515148163, 0.4423122704029083, 0.19353076815605164, -0.2312546819448471, 0.5099321007728577, 0.14726664125919342, 1.1177157163619995, -0.1503806859254837, 0.2815025746822357, 0.17894822359085083, 0.13420215249061584, 0.6970807909965515, -0.6101935505867004, 0.3381560444831848, -0.1902337521314621, 0.05938483029603958, 0.049827732145786285, -0.11474652588367462, 0.34214723110198975, 0.07422684133052826, 0.05207357928156853, 0.5547211766242981, 0.0944090187549591, 0.3872455656528473, -0.3301387131214142, -0.038231782615184784, -0.40874361991882324, -0.09955605864524841, -0.28628504276275635, 0.07730159163475037, -0.10735602676868439, 0.5356618165969849, -0.11050266027450562, 0.049226388335227966, -0.36787065863609314, -0.26974156498908997, -0.27129247784614563, 0.06763585656881332, -0.2752237319946289, 0.22534677386283875, -0.43885740637779236, -0.14119987189769745, -0.18352875113487244, 0.2323126643896103, 0.2649605870246887, -0.014641396701335907, -0.07793545722961426, 0.23453110456466675, 0.05452606454491615, 0.01444318052381277, -0.1612459421157837, 0.07046428322792053, 0.31992557644844055, -0.14932668209075928, -0.20230919122695923, -0.007220402359962463, -0.2528015375137329, -0.19984066486358643, -0.2708636224269867, 0.12441834807395935, 0.5775036215782166, 0.2529713213443756, -0.3201373815536499, 0.33925411105155945, -0.043723735958337784, 0.08532030880451202, 0.1442815512418747, -0.16201135516166687, -0.06899801641702652, 0.09584452956914902, -0.31660860776901245, -0.031889431178569794, -0.04099992290139198, 0.4114469885826111, 0.3425060212612152, -0.04512669891119003, 0.37431663274765015, 0.026803862303495407, -0.16993293166160583, -0.18924611806869507, 0.18157097697257996, 0.2453126758337021, -0.20644229650497437, 0.04059770330786705, 0.05300408601760864, -0.06568730622529984, -0.1135324239730835, -0.008221257477998734, -0.03169095516204834, 0.025729145854711533, 0.08614757657051086, -0.2623571753501892, -0.26887327432632446, 0.4009700417518616, 0.028568269684910774, 0.09624404460191727, -0.18380355834960938, 0.16825219988822937, 0.25813958048820496, -0.28045424818992615, -0.26366162300109863, -0.1664467453956604, -0.13792313635349274, 0.21317540109157562, 0.16112440824508667, 0.2940630316734314, 0.07114800810813904, 0.02606557309627533, 0.030884133651852608, 0.1700141429901123, -0.3656997084617615, -0.1506895124912262, 0.0269949808716774, 0.1648256480693817, 0.18374097347259521, 0.014964248053729534, 0.16293136775493622, -0.47429150342941284, 0.1331101357936859, -0.3103112578392029, 0.14515121281147003, 0.3282080888748169, -0.17410966753959656, 0.33300989866256714, 0.3119799792766571, 0.15289103984832764, -0.12636661529541016, 0.28100109100341797, -0.2080897092819214, 0.18110987544059753, 0.20600378513336182, -0.020251505076885223, 0.37472018599510193, 0.12968924641609192, -0.4093855321407318, -0.18147903680801392, -0.32652878761291504, -0.026721961796283722, -0.05405130982398987, -0.06796278059482574, -0.09414556622505188, -0.07206626981496811, 0.13910740613937378, 0.3085329532623291, -0.2720419764518738, -0.14310847222805023, 0.2774803340435028, 0.16242240369319916, -0.21921704709529877, 0.07506106048822403, 0.3696581721305847, -0.07326837629079819, -0.03153052181005478, 0.16244950890541077, 0.02747849002480507, -0.045558203011751175, 0.18034929037094116, 0.19162073731422424, 0.20425163209438324, -0.2743169665336609, 0.3263813257217407, 0.12305611371994019, 0.24870379269123077, -0.03684597089886665, 0.014304867945611477, -0.04071284458041191, 0.2321397066116333, 0.6695385575294495, -0.17908641695976257, 0.5875688791275024, 0.06214283034205437, 0.1620478481054306, -0.21893465518951416, -0.39870214462280273, 0.2998223602771759, 0.6812430024147034, -0.09850993752479553, 0.10046255588531494, -0.158005490899086, -0.05400768667459488, 0.1763889044523239, -0.020428288727998734, -0.09605013579130173, 0.11243833601474762, -0.0607525035738945, 0.14336955547332764, 0.02140452340245247, -0.2690525949001312, -0.18282338976860046, 0.1030612587928772, 0.08822014927864075, -0.38282549381256104, 0.37148046493530273, 0.19740137457847595, -0.1855776458978653, -0.08040953427553177, 0.34170371294021606, 0.15610958635807037, 0.07187093049287796, -0.24123354256153107, -0.10077507048845291, 0.1273665726184845, -0.1581708937883377, 0.17882011830806732, 0.11640527099370956, 0.26576802134513855, 0.41344839334487915, -0.06761686503887177, -0.08478282392024994, 0.1543544977903366, -0.01820087805390358, -0.018674593418836594, 0.1784266084432602, 0.05452974885702133, 0.136275053024292, 0.17429974675178528, 0.0870504155755043, -0.21070615947246552, -0.15943941473960876, 0.2782297134399414, 0.08922858536243439, -0.2767753005027771, -0.03335494548082352, -0.3387451171875, 0.023156628012657166, -0.2729216516017914, 0.09585645794868469, -0.6517597436904907, 0.004634092561900616, -0.09739048779010773, 0.15093107521533966, 0.023120928555727005, -0.1643294245004654, 0.04316546767950058, -0.1716599017381668, 0.25879743695259094, 0.14339451491832733, -0.13674545288085938, -0.3192216157913208, -0.39525920152664185, -0.5910947322845459, 0.011754468083381653, -0.31849902868270874, 0.33997324109077454, -0.144881010055542, 0.29000112414360046, 0.027066275477409363, 0.184090256690979, -0.09463411569595337, 0.065924733877182, -0.07287338376045227, 0.1686774343252182, -0.408397912979126, -0.18039968609809875, -0.18476207554340363, 0.08446263521909714, 0.08280099928379059, -0.38516631722450256, -0.030134979635477066, -0.09416794031858444, -0.032818183302879333, -0.09809903055429459, -0.26345115900039673, 0.4284462332725525, -0.11247941851615906, 0.5186238288879395, -0.10620759427547455, 0.23814770579338074, 0.08324610441923141, -0.14082375168800354, -0.26338228583335876, -0.1576010286808014, -0.07886184751987457, -0.09406537562608719, 0.03137708455324173, 0.4429897367954254, -0.29516711831092834, -0.06229036673903465, -0.32438817620277405, 0.4698706567287445, -0.21328853070735931, 0.23909834027290344, -0.1712668538093567, 0.15147200226783752, 0.14712750911712646, 0.35933399200439453, -0.16641169786453247, 0.00644606351852417, -0.07722213864326477, -0.06319215893745422, -0.5480507612228394, -0.21936538815498352, 0.5287930965423584, -0.4788554906845093, -0.2819336950778961, -0.06068594381213188, 0.2528172731399536, -0.17673349380493164, -0.06537531316280365, -0.5018327236175537, 0.19244128465652466, 0.24566462635993958, 0.19235268235206604, -0.0027939993888139725, 0.054875683039426804, -0.22971734404563904, -0.03282272070646286, -0.0410182811319828, -0.3641453981399536, -0.20552021265029907, -0.15347611904144287, 0.17434920370578766, -0.2991896867752075 ]
https://github.com/huggingface/datasets/issues/1790
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
The reshuffle is needed when you use parallelism. The objective is to redistribute the articles evenly on the workers, since the `_extract_content` step generated many articles per file. By using reshuffle, we can split the processing of the articles of one file into several workers. Without reshuffle, all the articles of one file would be processed on the same worker that read the file, making the whole process take a very long time.
```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
73
ModuleNotFoundError: No module named 'apache_beam', when specific languages. ```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct? The reshuffle is needed when you use parallelism. The objective is to redistribute the articles evenly on the workers, since the `_extract_content` step generated many articles per file. By using reshuffle, we can split the processing of the articles of one file into several workers. Without reshuffle, all the articles of one file would be processed on the same worker that read the file, making the whole process take a very long time.
[ 0.040164921432733536, 0.010120466351509094, -0.005872391164302826, 0.12934595346450806, -0.011949863284826279, 0.059671349823474884, 0.3661437928676605, 0.34800994396209717, 0.022974982857704163, 0.27976202964782715, 0.16045697033405304, 0.0736091360449791, 0.19807520508766174, -0.19536598026752472, -0.08456361293792725, -0.26484617590904236, 0.34238967299461365, -0.013063453137874603, -0.05664248764514923, -0.3558191657066345, -0.44790273904800415, 0.2000831961631775, -0.50338214635849, -0.17801405489444733, -0.16961242258548737, 0.27183422446250916, -0.14334708452224731, 0.38924235105514526, 0.18607942759990692, -0.04914780706167221, -0.04007177799940109, -0.08704984188079834, -0.08698584884405136, 0.25627005100250244, -0.00011818209895864129, 0.09909741580486298, 0.2742292582988739, -0.22646115720272064, -0.23540543019771576, -0.13553811609745026, -0.00016647204756736755, -0.5018975138664246, -0.09320244938135147, -0.42316994071006775, 0.023297403007745743, -0.040047403424978256, 0.03913653641939163, -0.20834986865520477, 0.5846297740936279, 0.10018092393875122, 0.10304604470729828, 0.266660213470459, 0.04769539460539818, -0.02511410228908062, 0.32002025842666626, -0.0474897101521492, -0.04051435738801956, 0.15229813754558563, -0.002084590494632721, 0.2132856398820877, -0.10750076919794083, 0.46072497963905334, -0.255842924118042, 0.1357320100069046, -0.05863645672798157, -0.1971605122089386, -0.1175447627902031, -0.4867194592952728, 0.3078398108482361, 0.26100027561187744, 0.44056230783462524, 0.01647084951400757, -0.17538441717624664, -0.25193193554878235, -0.13309212028980255, 0.11449091136455536, 0.12259668856859207, 0.19379079341888428, 0.11230340600013733, 0.09987139701843262, 0.5713425874710083, -0.3144807815551758, 0.05632629990577698, 0.05516904592514038, 0.2326827347278595, 0.5872224569320679, 0.11059847474098206, 0.4362630248069763, 0.044484056532382965, 0.15456029772758484, 0.206400528550148, -0.28615638613700867, 0.20104801654815674, 0.23654961585998535, -0.24309717118740082, -0.005230806767940521, -0.03738255053758621, -0.2237178385257721, -0.07317353039979935, -0.10040129721164703, -0.5007821321487427, 0.24644720554351807, 0.4761473834514618, 0.17040732502937317, 0.1579054892063141, 0.18186523020267487, 0.17939363420009613, 0.21940533816814423, 0.26437559723854065, -0.2684374451637268, -0.0538066029548645, -0.021268289536237717, 0.1332734227180481, -0.376322478055954, -0.47319552302360535, 0.2896764874458313, 0.033105622977018356, -0.11728007346391678, -0.11248309165239334, -0.23946139216423035, -0.25187957286834717, -0.34474220871925354, -0.28709203004837036, 0.27966395020484924, 0.3040520250797272, 0.5849858522415161, 0.030953891575336456, 0.28813523054122925, -0.5063950419425964, -0.19197574257850647, -0.14293073117733002, 0.19936583936214447, -0.26771843433380127, 0.16402262449264526, -0.07521209120750427, 0.14584404230117798, 0.15519270300865173, -0.15864518284797668, 0.22103595733642578, 0.032992877066135406, 0.09269171208143234, -0.02298668771982193, 0.02940579503774643, 0.4956111013889313, 0.12968114018440247, 0.33436861634254456, 0.3818507492542267, 0.04412159323692322, -0.3361367881298065, 0.27257221937179565, -0.5118628740310669, -0.49851194024086, 0.14367355406284332, 0.03109760954976082, -0.18916815519332886, 0.19585895538330078, -0.018779076635837555, -0.028651822358369827, 0.28618723154067993, -0.14592866599559784, 0.2613285481929779, -0.0038730762898921967, -0.0005570203065872192, -0.3166023790836334, -0.04288903996348381, 0.6379075050354004, -0.11724443733692169, 0.008237391710281372, -0.010736704804003239, -0.10415376722812653, 0.21277830004692078, 0.19396965205669403, -0.11018937826156616, 0.07632625102996826, -0.20478485524654388, 0.02101527899503708, 0.5991587042808533, -0.5733523368835449, -0.12032756209373474, 0.0884784460067749, -0.2460712045431137, 0.10729894787073135, 0.4706137180328369, -0.00970432534813881, -0.07953682541847229, -0.22630737721920013, 0.029220152646303177, 0.1647597998380661, 0.09461134672164917, 0.1012687012553215, -0.42084187269210815, 0.028259875252842903, 0.1501707285642624, 0.16668859124183655, 0.1931990087032318, 0.17976215481758118, 0.06124104559421539, 0.11919457465410233, 0.21796420216560364, -0.03080287203192711, 0.2628242075443268, 0.25639310479164124, -0.19556006789207458, 0.24265055358409882, 0.39249274134635925, 0.2315070629119873, -0.07328309863805771, 0.2811630964279175, -0.13746896386146545, 0.3438965976238251, 0.06797869503498077, -0.14755260944366455, -0.021342609077692032, -0.4191904664039612, -0.3652014136314392, -0.5023624300956726, -0.03909660130739212, -0.0010685175657272339, 0.2320949137210846, 0.28063759207725525, -0.41118645668029785, 0.3606015145778656, -0.3701222836971283, 0.05765974149107933, -0.5175858736038208, 0.2484356313943863, -0.1954277753829956, -0.015076247043907642, -0.09020904451608658, 0.11603790521621704, -0.006202027201652527, -0.2410620003938675, -0.027879953384399414, 0.3686266243457794, 0.2898939549922943, 0.14848506450653076, 0.18622076511383057, -0.22788222134113312, 0.10583002120256424, -0.29356542229652405, 0.36051031947135925, 0.2167859673500061, 0.11436575651168823, -0.18367940187454224, 0.2624618113040924, 0.33345216512680054, 0.03312310948967934, 0.42860522866249084, 0.09297358989715576, -0.05013708770275116, 0.15839733183383942, -0.0014176778495311737, -0.17415973544120789, -0.19647741317749023, 0.2689024806022644, 0.21680191159248352, 0.040073420852422714, -0.08406492322683334, 0.016317933797836304, -0.12168063968420029, 0.6155579090118408, 0.04002707824110985, 0.12034150213003159, -0.0023304782807826996, -0.2098284363746643, -0.007105730473995209, 0.03580433130264282, 0.04775113984942436, 0.4985297918319702, 0.16648617386817932, 0.028450854122638702, 0.09103173017501831, 0.31292030215263367, -0.22144190967082977, -0.021174602210521698, 0.14035028219223022, 0.3321326673030853, 0.22385388612747192, -0.24556148052215576, 0.030316859483718872, -0.301681786775589, -0.10415607690811157, -0.1987626552581787, 0.06371813267469406, -0.047432515770196915, -0.021309880539774895, -0.022949082776904106, -0.362495094537735, -0.4416368305683136, 0.0558633916079998, -0.3911740779876709, -0.3372015058994293, 0.078868567943573, -0.03772972896695137, -0.2612817585468292, 0.39614543318748474, 0.3479469418525696, -0.06494377553462982, -0.043428562581539154, -0.12671543657779694, -0.22744274139404297, -0.3022429943084717, -0.2869900166988373, -0.0414457730948925, 0.1613830178976059, 0.2441113293170929, 0.050085119903087616, -0.38578078150749207, -0.16244608163833618, -0.17297601699829102, -0.13533440232276917, 0.08652067929506302, -0.05827508121728897, -0.10216698050498962, -0.11368899047374725, 0.33741146326065063, -0.04351555556058884, -0.16038009524345398, 0.36283159255981445, -0.049733683466911316, -0.19898684322834015, 0.2759113907814026, 0.10074049979448318, 0.09265586733818054, 0.06121544912457466, -0.6890727877616882, -0.3914901614189148, -0.4526817798614502, 0.028304535895586014, 0.14885495603084564, -0.0023453645408153534, -0.112101711332798, 0.14570434391498566, -0.18621094524860382, 0.04373134672641754, -0.1842690110206604, -0.1412883847951889, -0.14822430908679962, 0.18394795060157776, -0.15875057876110077, -0.31718406081199646, 0.11668233573436737, -0.17493033409118652, -0.19349950551986694, 0.13525620102882385, -0.09558460861444473, -0.005590932443737984, 0.11830728501081467, -0.28163620829582214, -0.1481214016675949, 0.6191094517707825, 0.6890789270401001, -0.16618730127811432, 0.06010676175355911, -0.0240420401096344, 0.12239041924476624, -0.07017900794744492, 0.09908030927181244, 0.3527521789073944, -0.08788169175386429, 0.05694454908370972, 0.07998257875442505, 0.8017923831939697, 0.13501811027526855, 0.6213970184326172, 0.2583407759666443, 0.13999676704406738, 0.2320946753025055, -0.48854002356529236, -0.043336015194654465, 0.1662052720785141, 0.017542436718940735, -0.16707758605480194, 0.24522307515144348, 0.049352169036865234, 0.011237682774662971, -0.4611929655075073, -0.47457408905029297, -0.3980812430381775, -0.2800993323326111, 0.2716125547885895, -0.059054382145404816, 0.18067105114459991, 0.009842906147241592, -0.14355677366256714, 0.13084356486797333, 0.10814018547534943, 0.01836213283240795, 0.5039030909538269, 0.08182457834482193, 0.049827467650175095, -0.3906678855419159, -0.22060495615005493, -0.2547489106655121, 0.39040452241897583, 0.10388389229774475, 0.00716719776391983, 0.21924249827861786, -0.437681645154953, 0.17560037970542908, 0.03669818863272667, 0.7510884404182434, -0.2891372740268707, -0.24628348648548126, 0.1214049905538559, 0.07342535257339478, -0.4148052930831909, -0.24086284637451172, -0.013212189078330994, 0.001745073590427637, -0.07532091438770294, 0.12313169240951538, -0.30266842246055603, -0.08315613865852356, 0.11617843061685562, 0.28087520599365234, -0.2045968770980835, -0.28974130749702454, -0.6348302960395813, -0.19603890180587769, -0.7667279243469238, -0.10091819614171982, -0.22457456588745117, -0.026901893317699432, -0.04574199765920639, 0.24029897153377533, 0.26644644141197205, -0.1687159538269043, -0.13063830137252808, 0.04956768825650215, 0.04206887632608414, -0.2761186361312866, -0.3636622428894043, 0.1034521535038948, -0.19210407137870789, 0.23614124953746796, 0.2059914916753769, -0.025183312594890594, -0.1817454695701599, -0.06619857251644135, -0.15388323366641998, 0.25513985753059387, 0.3604370951652527, -0.003167639020830393, 0.06693825125694275, -0.021136675029993057, -0.0070204660296440125, -0.0431656613945961, -0.4192325174808502, -0.004598554223775864, -0.079582579433918, -0.27019229531288147, -0.5315524935722351, 0.4778115749359131, -0.10894259810447693, -0.009723201394081116, 0.2204699069261551, 0.16528058052062988, -0.07409828156232834, 0.5455197095870972, -0.03704065829515457, 1.1979786157608032, 0.06972850859165192, 0.26193201541900635, 0.020001396536827087, 0.06736743450164795, 0.8408936858177185, -0.7155610918998718, 0.385257363319397, -0.1788087636232376, 0.07535440474748611, -0.1027161031961441, -0.09643690288066864, 0.5330144762992859, 0.1523682177066803, -0.11154938489198685, 0.6340997219085693, 0.08979803323745728, 0.11076602339744568, -0.3829463720321655, 0.04914938658475876, -0.5872063636779785, -0.0020176339894533157, -0.09553749114274979, -0.10176333785057068, 0.10789183527231216, 0.5783390402793884, -0.15416860580444336, 0.14053581655025482, -0.4126496911048889, -0.4174627661705017, -0.043571580201387405, -0.0402047336101532, 0.15634682774543762, 0.3821917176246643, -0.2015429586172104, -0.2772364020347595, -0.22755342721939087, 0.03411895036697388, 0.3032436668872833, -0.24503861367702484, 0.11956262588500977, 0.07197672128677368, 0.1027844026684761, -0.13349339365959167, -0.08511868119239807, 0.026655342429876328, 0.3381585478782654, -0.1617870330810547, -0.2683912217617035, -0.14185243844985962, -0.2589021623134613, -0.2996102571487427, -0.17872285842895508, 0.2115916758775711, 0.3893193006515503, 0.15883930027484894, -0.3468776345252991, 0.6813214421272278, -0.15382157266139984, -0.07830344885587692, 0.05175009369850159, -0.07184046506881714, -0.33091092109680176, 0.2146330177783966, -0.46960338950157166, -0.051626235246658325, -0.14457108080387115, 0.28452229499816895, 0.559836208820343, -0.085277259349823, 0.2096584141254425, 0.048122573643922806, -0.15594741702079773, -0.14064544439315796, 0.20612922310829163, 0.06635667383670807, -0.11675521731376648, -0.008843899704515934, -0.00033657881431281567, -0.06027857959270477, -0.11833586543798447, 0.12238001823425293, 0.09609848260879517, 0.17564547061920166, -0.1687561571598053, -0.5080205798149109, 0.03600292652845383, 0.36831134557724, 0.08854912221431732, -0.12693558633327484, -0.02670443430542946, 0.23836831748485565, 0.3466285169124603, -0.044796235859394073, -0.19756931066513062, -0.044314995408058167, -0.0991518422961235, 0.3087215721607208, 0.19738517701625824, 0.1657436192035675, 0.020200582221150398, 0.09836703538894653, -0.05061100050806999, 0.08206132054328918, -0.2794937789440155, -0.08967077732086182, 0.10345664620399475, 0.21294966340065002, 0.13012854754924774, 0.08393936604261398, 0.10401693731546402, -0.28927767276763916, 0.13517408072948456, -0.10968875885009766, 0.03430089354515076, 0.15330645442008972, -0.28241533041000366, 0.4188384711742401, 0.324123352766037, 0.22746247053146362, -0.4157671332359314, 0.3026827871799469, -0.33775073289871216, 0.03738453611731529, 0.09537164866924286, 0.1226106733083725, 0.303629606962204, 0.15799738466739655, -0.221469447016716, -0.11254831403493881, -0.10136164724826813, 0.08598580211400986, 0.10198375582695007, -0.005394190549850464, 0.05094308778643608, -0.34378567337989807, 0.29986441135406494, 0.5285139083862305, -0.0004934855387546122, -0.19016732275485992, 0.16034400463104248, 0.053631916642189026, -0.3772275745868683, -0.0003574562433641404, 0.6144310235977173, -0.11603940278291702, -0.026205742731690407, 0.2547370493412018, 0.2971384525299072, -0.16336020827293396, 0.12144111096858978, 0.17179617285728455, 0.30755332112312317, -0.302223801612854, 0.3114132285118103, 0.21981704235076904, 0.20224802196025848, 0.10237684845924377, 0.04380044341087341, -0.059372056275606155, 0.23157311975955963, 0.46319013833999634, 0.05250634625554085, 0.721281111240387, 0.28529274463653564, 0.17261120676994324, -0.26434963941574097, -0.34241509437561035, 0.39937901496887207, 0.4465339481830597, 0.04467715322971344, -0.07830468565225601, 0.010071545839309692, -0.1394175887107849, 0.005877736955881119, 0.15160182118415833, 0.03434077650308609, 0.2824627161026001, -0.03212491422891617, 0.13385918736457825, 0.14111076295375824, -0.2624068558216095, 0.018719740211963654, -0.0741356760263443, 0.10884472727775574, -0.07341685891151428, 0.4331256151199341, 0.12274105846881866, -0.02670092135667801, 0.12844106554985046, 0.2447282373905182, -0.28242227435112, 0.14479053020477295, -0.07601899653673172, -0.290190190076828, 0.2440316528081894, 0.0011969581246376038, 0.16479797661304474, 0.22644399106502533, 0.2207714319229126, 0.1477453112602234, -0.18695881962776184, -0.01106607262045145, 0.11913518607616425, -0.07422331720590591, -0.04003046452999115, 0.21722425520420074, -0.08674724400043488, 0.18636423349380493, 0.04430321231484413, 0.06155127286911011, -0.1333114504814148, -0.04441161826252937, 0.18235239386558533, -0.15425768494606018, -0.1811797022819519, 0.011792130768299103, -0.14302247762680054, -0.15559422969818115, -0.195277139544487, 0.22171854972839355, -0.4802033305168152, -0.03146955370903015, -0.03264908492565155, -0.11435960233211517, -0.1712023913860321, -0.1373385339975357, 0.002443421632051468, -0.1196264773607254, 0.2270769476890564, 0.41512542963027954, 0.014298006892204285, -0.1361878514289856, -0.35540252923965454, -0.39978843927383423, 0.1810675859451294, -0.4627875089645386, 0.1659279316663742, -0.19516749680042267, 0.3386708199977875, 0.14673501253128052, 0.35044294595718384, -0.051254332065582275, 0.14343146979808807, -0.2581033408641815, 0.2402316927909851, -0.15194161236286163, -0.16506913304328918, -0.19288812577724457, -0.0824902206659317, -0.1049790307879448, -0.3492977023124695, -0.007160332053899765, 0.21734967827796936, -0.0368054024875164, 0.07352185249328613, -0.2756357192993164, 0.5410727858543396, -0.16765941679477692, 0.3580460250377655, 0.13309122622013092, 0.25966840982437134, 0.04704894870519638, -0.08775155991315842, 0.24617457389831543, -0.055687326937913895, -0.25595414638519287, 0.18279175460338593, -0.012111980468034744, 0.2132979929447174, -0.42192354798316956, -0.08119350671768188, -0.21494019031524658, 0.48991790413856506, -0.02494112402200699, 0.13348570466041565, -0.3324626386165619, 0.18766219913959503, 0.14719265699386597, 0.1325831413269043, -0.05285137519240379, 0.3269250690937042, 0.04152851924300194, -0.10884284973144531, -0.4738561511039734, -0.0035287048667669296, 0.21112529933452606, -0.4024796187877655, -0.44674018025398254, -0.08654715120792389, 0.2853614389896393, -0.14696812629699707, 0.027162296697497368, -0.40596991777420044, 0.008740998804569244, 0.2635793089866638, 0.18906950950622559, 0.0547969751060009, 0.004381369799375534, -0.16458936035633087, -0.36746928095817566, 0.032762881368398666, -0.46557894349098206, -0.13913363218307495, -0.1570223867893219, 0.0946325808763504, -0.4148329496383667 ]
https://github.com/huggingface/datasets/issues/1790
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
Maybe the reshuffle step can be added only if the runner is not a DirectRunner ?
```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
16
ModuleNotFoundError: No module named 'apache_beam', when specific languages. ```py import datasets wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets') ``` then `ModuleNotFoundError: No module named 'apache_beam'` happend. The error doesn't appear when it's '20200501.en'. I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct? Maybe the reshuffle step can be added only if the runner is not a DirectRunner ?
[ -0.03783006966114044, 0.051789313554763794, 0.04592253640294075, 0.16189469397068024, 0.22176925837993622, 0.049549393355846405, 0.2877703607082367, 0.3032410144805908, 0.02593294531106949, 0.17993402481079102, 0.29103562235832214, -0.019248930737376213, 0.10451462119817734, -0.02322741225361824, 0.11003207415342331, -0.37407565116882324, 0.30710315704345703, -0.03704969584941864, -0.09599131345748901, -0.28183016180992126, -0.44263553619384766, 0.10543953627347946, -0.3799924850463867, -0.15793544054031372, -0.0031889183446764946, 0.23314523696899414, -0.0568360835313797, 0.2654174864292145, 0.20037341117858887, -0.1437353938817978, -0.034540608525276184, -0.2057228535413742, -0.09999683499336243, 0.3504471182823181, -0.00012388899631332606, 0.22050385177135468, 0.3199233412742615, -0.2937648296356201, -0.2419775277376175, -0.1562594324350357, 0.02312132716178894, -0.3215475380420685, -0.13884691894054413, -0.3631035387516022, -0.10166574269533157, -0.025344830006361008, 0.06650416553020477, -0.38199058175086975, 0.6048770546913147, 0.19281473755836487, 0.10985937714576721, 0.4210022985935211, -0.02077256515622139, -0.014778479933738708, 0.37875717878341675, -0.08651874959468842, -0.1000090166926384, -0.07794629037380219, -0.20107460021972656, 0.22937312722206116, -0.1714307963848114, 0.3713359534740448, -0.23882701992988586, 0.008769644424319267, 0.003212232142686844, -0.27862244844436646, -0.08512984961271286, -0.4114529490470886, 0.18973591923713684, 0.2687951624393463, 0.4893789291381836, -0.27171674370765686, -0.2248743623495102, -0.2171139419078827, 0.0023348708637058735, -0.06651821732521057, 0.28096628189086914, 0.0015106042847037315, 0.06603874266147614, 0.008656706660985947, 0.5118035674095154, -0.3065730631351471, 0.10257141292095184, -0.01759517937898636, -0.10903535783290863, 0.6667245626449585, 0.21839943528175354, 0.3571632206439972, -0.09042586386203766, 0.19536474347114563, 0.33299630880355835, -0.20055264234542847, 0.06528924405574799, 0.12462364137172699, -0.34686288237571716, -0.054584141820669174, 0.03734472021460533, 0.1232202798128128, -0.16774573922157288, -0.009198341518640518, -0.24723322689533234, 0.16283300518989563, 0.30502745509147644, 0.06365278363227844, 0.040544476360082626, 0.23899607360363007, 0.1641889214515686, 0.3014988899230957, 0.26088112592697144, -0.3187679946422577, 0.13403964042663574, 0.01626153290271759, 0.12025941908359528, -0.5691347718238831, -0.515691339969635, 0.3740115165710449, 0.019027769565582275, -0.026121526956558228, -0.1588704138994217, -0.07682326436042786, -0.3505401313304901, -0.27408990263938904, -0.053322259336709976, 0.3207167685031891, 0.15931864082813263, 0.386225163936615, 0.13747304677963257, 0.30437225103378296, -0.2998507618904114, -0.1806766539812088, -0.09333741664886475, 0.10232537984848022, -0.2912921905517578, 0.0453905388712883, -0.08077935874462128, 0.0810585618019104, 0.17932850122451782, -0.1545541137456894, 0.197585329413414, 0.23244628310203552, -0.01618419773876667, 0.08080442249774933, -0.05131051689386368, 0.4848628640174866, 0.20389816164970398, 0.3424089252948761, 0.4302808940410614, 0.17340198159217834, -0.21731823682785034, 0.37051922082901, -0.454051673412323, -0.31095021963119507, 0.19284029304981232, -0.010566103272140026, -0.1869194358587265, 0.06782922893762589, -0.04087790101766586, -0.0447855181992054, 0.19605204463005066, -0.16273713111877441, 0.26737335324287415, -0.12607459723949432, -0.1356477439403534, -0.29886916279792786, 0.040259167551994324, 0.6308395862579346, -0.16947326064109802, -0.07109924405813217, 0.057862814515829086, -0.09613195061683655, 0.147475004196167, -0.07686126232147217, -0.03195406496524811, 0.20581430196762085, -0.29016929864883423, -0.03518208488821983, 0.9126728773117065, -0.5441179275512695, 0.0465969443321228, -0.0909169539809227, -0.30124157667160034, 0.0395173504948616, 0.5204706788063049, -0.0860053077340126, -0.26856207847595215, -0.2502496540546417, -0.06697946786880493, 0.2802211046218872, 0.07109422236680984, 0.10198541730642319, -0.2831757962703705, 0.1158963143825531, 0.19969400763511658, 0.20405331254005432, 0.3477715253829956, 0.13376803696155548, -0.026322312653064728, 0.30893030762672424, 0.13289964199066162, -0.04374217614531517, 0.21098989248275757, 0.3810603618621826, -0.31029394268989563, 0.09535083174705505, 0.32888704538345337, 0.13898831605911255, -0.036351583898067474, 0.27364081144332886, -0.2340332716703415, 0.12618428468704224, 0.22008588910102844, -0.08633279800415039, -0.04913453012704849, -0.35384461283683777, -0.44718918204307556, -0.17666660249233246, -0.017715830355882645, 0.04791374132037163, 0.10067401826381683, 0.2592095136642456, -0.43862679600715637, 0.3504117429256439, -0.23825913667678833, 0.13310788571834564, -0.33132800459861755, 0.3779861032962799, -0.12919051945209503, -0.009474609978497028, -0.03574638441205025, 0.15517310798168182, 0.10239435732364655, -0.2608759105205536, -0.011766564100980759, 0.3821974992752075, 0.18477874994277954, 0.0009455308318138123, 0.06612012535333633, -0.26478028297424316, 0.11083920300006866, -0.008817363530397415, 0.3106170892715454, 0.22227711975574493, -0.0423317588865757, -0.1995384395122528, 0.15823131799697876, 0.38154011964797974, -0.026355620473623276, 0.5533998608589172, 0.07675318419933319, 0.03884968161582947, 0.09333929419517517, 0.03271612897515297, -0.17534630000591278, -0.09972140192985535, 0.3674671947956085, 0.27493107318878174, 0.17826372385025024, -0.1733291894197464, -0.03878030925989151, -0.11638414114713669, 0.6952417492866516, 0.18309392035007477, 0.13380709290504456, 0.004836946725845337, -0.26904991269111633, 0.15149801969528198, -0.0059784334152936935, 0.0746217668056488, 0.336026132106781, 0.2021523416042328, 0.03812849521636963, 0.17662230134010315, 0.2083059400320053, -0.1654423326253891, 0.04272624850273132, 0.11874440312385559, 0.32860222458839417, 0.30476197600364685, -0.20406724512577057, -0.091436006128788, -0.3562946021556854, -0.0728422999382019, -0.0272831991314888, 0.07377807050943375, -0.19989952445030212, -0.01191454753279686, -0.25388142466545105, -0.48858699202537537, -0.46479037404060364, -0.022077500820159912, -0.5278826355934143, -0.3266163766384125, 0.18994180858135223, 0.017820114269852638, -0.15341274440288544, 0.5467299818992615, 0.3333818018436432, -0.14335335791110992, -0.006054647266864777, -0.41901305317878723, -0.2095361202955246, -0.261689156293869, -0.2897976338863373, 0.009899895638227463, 0.344201922416687, -0.015084989368915558, 0.06477445363998413, -0.3819512724876404, -0.09016909450292587, -0.16100259125232697, -0.2000037431716919, 0.05204218998551369, -0.035718291997909546, -0.3044557273387909, -0.04902704060077667, 0.3831198811531067, -0.16673356294631958, 0.026965942233800888, 0.38867929577827454, 0.125640869140625, -0.28553876280784607, 0.21236088871955872, 0.14142116904258728, 0.09060388058423996, 0.021754074841737747, -0.5343980193138123, -0.2619633078575134, -0.4425387680530548, -0.112743079662323, 0.33775994181632996, -0.017936594784259796, -0.2148832529783249, 0.2542979121208191, -0.17709411680698395, 0.014103619381785393, -0.21954776346683502, -0.04765649512410164, -0.018809206783771515, 0.21715998649597168, -0.0823238417506218, -0.2377471774816513, 0.1454089730978012, -0.14839458465576172, -0.049136560410261154, 0.16278353333473206, -0.19709646701812744, -0.20413701236248016, 0.23596397042274475, -0.2119004875421524, -0.1554115265607834, 0.6291611790657043, 0.7919961214065552, -0.058462899178266525, 0.05166957527399063, -0.052256714552640915, -0.045073918998241425, -0.12963688373565674, -0.0457172617316246, 0.4874376058578491, -0.044297218322753906, 0.3777841329574585, -0.0016312040388584137, 0.8330233097076416, -0.0795280784368515, 0.5151053071022034, 0.24860453605651855, 0.03145074471831322, 0.35766252875328064, -0.5895615816116333, 0.07509755343198776, 0.14008170366287231, 0.1810806393623352, -0.08090022951364517, 0.18262448906898499, 0.08488456159830093, 0.22796829044818878, -0.42523297667503357, -0.283206582069397, -0.15904894471168518, -0.3067365884780884, 0.2424541711807251, -0.201910138130188, 0.049200788140296936, -0.0209225881844759, -0.007636670023202896, -0.04596845060586929, 0.08376100659370422, 0.13039956986904144, 0.45887142419815063, -0.016246668994426727, 0.1149081215262413, -0.37140730023384094, -0.19826383888721466, -0.2697683572769165, 0.4062986969947815, -0.037549763917922974, 0.008986764587461948, -0.01097048819065094, -0.34402701258659363, 0.057789236307144165, 0.00957559421658516, 0.7247850298881531, -0.22237342596054077, -0.2159992903470993, 0.13618484139442444, 0.06583671271800995, -0.39695942401885986, -0.2671530246734619, 0.1685895025730133, 0.1104612872004509, -0.11297617852687836, -0.06032547354698181, -0.19907549023628235, 0.0028694539796561003, 0.20136293768882751, 0.35026082396507263, -0.18584373593330383, -0.25657179951667786, -0.6710654497146606, -0.12834317982196808, -0.6659097075462341, 0.03456949070096016, -0.023528967052698135, -0.03808237612247467, 0.1507725715637207, 0.19703245162963867, 0.13367639482021332, -0.41052061319351196, 0.006041519343852997, -0.033990371972322464, 0.10678467154502869, -0.19639404118061066, -0.3931010067462921, 0.08387207984924316, 0.14986518025398254, 0.011926783248782158, 0.1818656623363495, 0.04892130196094513, -0.19279539585113525, -0.022461552172899246, -0.09400007128715515, 0.3057219386100769, 0.3254757523536682, -0.12109211087226868, 0.20268484950065613, -0.09880296885967255, -0.13698318600654602, 0.05811164900660515, -0.2772010266780853, 0.08249969780445099, 0.021235883235931396, -0.2918604910373688, -0.5804405808448792, 0.595930814743042, 0.023830313235521317, -0.06114012375473976, 0.49125877022743225, 0.23905223608016968, -0.21070021390914917, 0.5178576707839966, -0.11791833490133286, 1.1283650398254395, -0.04163215309381485, 0.2160152941942215, 0.1365785300731659, -0.03060751035809517, 0.6529219746589661, -0.71528160572052, 0.33280545473098755, -0.2499714195728302, 0.1918947845697403, -0.10732139647006989, -0.1381453424692154, 0.45513442158699036, 0.023079097270965576, -0.00008567795157432556, 0.69194495677948, -0.06967156380414963, 0.22390517592430115, -0.2821066379547119, -0.11957567185163498, -0.22989590466022491, 0.014180519618093967, -0.2873310446739197, -0.10482916980981827, 0.049002062529325485, 0.575082540512085, -0.26095038652420044, 0.10151725262403488, -0.25264090299606323, -0.34399837255477905, -0.09647438675165176, -0.05389786511659622, -0.11340001970529556, 0.10038141906261444, -0.25067463517189026, -0.3562537431716919, -0.17331819236278534, 0.19025522470474243, 0.42157596349716187, -0.10462266206741333, 0.06312735378742218, 0.20588822662830353, 0.056837741285562515, 0.0017741343472152948, -0.11256250739097595, 0.10851766914129257, 0.21837636828422546, -0.17175379395484924, -0.14449428021907806, -0.06250295788049698, -0.2645857334136963, -0.3730089068412781, -0.11241737753152847, 0.092706598341465, 0.7888132333755493, 0.24367810785770416, -0.13666410744190216, 0.5964676737785339, 0.04477282986044884, -0.059737227857112885, 0.04021238535642624, -0.1973065286874771, -0.05209270864725113, 0.024471484124660492, -0.32027962803840637, -0.0879465788602829, -0.1904219090938568, 0.33820992708206177, 0.5054773092269897, -0.10900895297527313, 0.36842843890190125, 0.002097036689519882, -0.06416153162717819, -0.10227331519126892, 0.14131516218185425, 0.09337428212165833, -0.12114526331424713, 0.032134246081113815, 0.17559288442134857, -0.14907680451869965, -0.18306925892829895, -0.0648164302110672, 0.035975970327854156, 0.11657633632421494, -0.10929788649082184, -0.3471048176288605, 0.009777046740055084, 0.18672451376914978, 0.08180032670497894, -0.07499051094055176, -0.119283527135849, 0.41468021273612976, 0.3110109269618988, -0.28389158844947815, -0.15709136426448822, -0.1663307398557663, 0.05614027380943298, 0.1389809250831604, 0.04680849239230156, 0.3287312090396881, -0.06591275334358215, 0.21540039777755737, 0.0019713882356882095, -0.08598136901855469, -0.2071034163236618, -0.07546968758106232, 0.05074571445584297, 0.23608210682868958, 0.1155926063656807, 0.12254160642623901, 0.2319326549768448, -0.25298845767974854, 0.11900340020656586, -0.13330711424350739, -0.04716727137565613, 0.2049923837184906, -0.1743321269750595, 0.24794264137744904, 0.47222867608070374, 0.1558707356452942, -0.4540858864784241, 0.11519934237003326, -0.2590804398059845, -0.07211931049823761, 0.017685381695628166, 0.22428064048290253, 0.2557979226112366, 0.16424770653247833, -0.3291211426258087, -0.06615381687879562, -0.0070632994174957275, 0.05236209183931351, 0.017370138317346573, -0.1378450244665146, 0.010822728276252747, -0.20077945291996002, 0.25973838567733765, 0.4037545323371887, -0.11654143780469894, -0.19188141822814941, 0.23567676544189453, 0.009751852601766586, -0.6148347854614258, 0.12831833958625793, 0.5827645063400269, -0.04362863674759865, 0.03423139080405235, 0.29168710112571716, 0.21844878792762756, -0.24755193293094635, 0.3061932325363159, 0.19870290160179138, 0.12658284604549408, -0.3680983781814575, 0.39580732583999634, 0.2837424576282501, 0.19893451035022736, 0.1737140715122223, 0.34148043394088745, -0.1861775517463684, 0.16206452250480652, 0.6131905317306519, -0.07791144400835037, 0.5723170042037964, 0.21952283382415771, -0.052806515246629715, -0.3409295976161957, -0.34401434659957886, 0.3430023193359375, 0.47526028752326965, 0.22660884261131287, -0.20651620626449585, 0.15441091358661652, -0.1298753321170807, -0.030620984733104706, -0.02977193146944046, -0.19272056221961975, 0.08748126775026321, -0.10079876333475113, 0.08343382179737091, 0.02923201024532318, -0.3153873383998871, 0.00022361427545547485, -0.03262700140476227, 0.10684053599834442, -0.0736548900604248, 0.2326967716217041, -0.011954568326473236, -0.000003762543201446533, 0.03835426643490791, 0.2689739167690277, -0.250751793384552, 0.04485124349594116, -0.07444894313812256, -0.10200206190347672, 0.2303333580493927, -0.0982782393693924, 0.2454404979944229, 0.13946278393268585, 0.0990578681230545, 0.03198925778269768, -0.06423671543598175, -0.18911698460578918, 0.09956392645835876, 0.06980349123477936, -0.09102147817611694, 0.08977960795164108, -0.17946404218673706, 0.1652267426252365, 0.16638660430908203, 0.054142653942108154, -0.16335615515708923, 0.1356811821460724, 0.052621159702539444, -0.12101194262504578, -0.1623203009366989, 0.26070094108581543, -0.14488908648490906, -0.08553636074066162, -0.29996851086616516, 0.13233312964439392, -0.43913590908050537, -0.036180295050144196, 0.06920096278190613, 0.10969007760286331, -0.2089388370513916, -0.2250744104385376, -0.005009039305150509, 0.057738542556762695, 0.17658887803554535, 0.36860910058021545, -0.15028813481330872, -0.1989365816116333, -0.28754571080207825, -0.4894710183143616, 0.15399980545043945, -0.4054337739944458, 0.2183382362127304, -0.20659102499485016, 0.2182590812444687, 0.1433669477701187, 0.27934256196022034, 0.1631576120853424, -0.003790105227380991, -0.17840878665447235, 0.11139018833637238, -0.22460688650608063, -0.1581059843301773, -0.19966097176074982, 0.09844592958688736, -0.144167959690094, -0.3681927025318146, -0.030577857047319412, 0.04760103300213814, -0.015963401645421982, 0.02309487946331501, -0.283721387386322, 0.5991746187210083, -0.25033965706825256, 0.288305401802063, 0.00007270090281963348, 0.21580132842063904, 0.12502455711364746, -0.001714307814836502, 0.15068180859088898, -0.12119035422801971, -0.4373408555984497, 0.1146835908293724, -0.07576566934585571, 0.2590177059173584, -0.39169853925704956, -0.1559026837348938, -0.3126983344554901, 0.42464715242385864, 0.03341865539550781, 0.3534766435623169, -0.29414069652557373, 0.27386176586151123, 0.12482010573148727, 0.24212682247161865, -0.07829467207193375, 0.24047300219535828, 0.03721138834953308, -0.04177188128232956, -0.56014084815979, -0.09013468027114868, 0.20709876716136932, -0.48252761363983154, -0.358497679233551, -0.04748406633734703, 0.17908433079719543, -0.06801874190568924, 0.09585589170455933, -0.4054124653339386, 0.13500246405601501, 0.3061629831790924, 0.09240197390317917, 0.14012454450130463, 0.03719809651374817, -0.43643718957901, -0.18978451192378998, -0.018178818747401237, -0.6344162225723267, -0.15100517868995667, -0.19683034718036652, 0.10207775235176086, -0.352416455745697 ]
https://github.com/huggingface/datasets/issues/1786
How to use split dataset
By default, all 3 splits will be loaded if you run the following: ```python from datasets import load_dataset dataset = load_dataset("lambada") print(dataset["train"]) print(dataset["valid"]) ``` If you wanted to do load this manually, you could do this: ```python from datasets import load_dataset data_files = { "train": "data/lambada/train.txt", "valid": "data/lambada/valid.txt", "test": "data/lambada/test.txt", } ds = load_dataset("text", data_files=data_files) ```
![Capture1](https://user-images.githubusercontent.com/78090287/106057436-cb6a1f00-6111-11eb-8c9c-3658065b1fdf.PNG) Hey, I want to split the lambada dataset into corpus, test, train and valid txt files (like penn treebank) but I am not able to achieve this. What I am doing is, executing the lambada.py file in my project but its not giving desired results. Any help will be appreciated!
56
How to use split dataset ![Capture1](https://user-images.githubusercontent.com/78090287/106057436-cb6a1f00-6111-11eb-8c9c-3658065b1fdf.PNG) Hey, I want to split the lambada dataset into corpus, test, train and valid txt files (like penn treebank) but I am not able to achieve this. What I am doing is, executing the lambada.py file in my project but its not giving desired results. Any help will be appreciated! By default, all 3 splits will be loaded if you run the following: ```python from datasets import load_dataset dataset = load_dataset("lambada") print(dataset["train"]) print(dataset["valid"]) ``` If you wanted to do load this manually, you could do this: ```python from datasets import load_dataset data_files = { "train": "data/lambada/train.txt", "valid": "data/lambada/valid.txt", "test": "data/lambada/test.txt", } ds = load_dataset("text", data_files=data_files) ```
[ -0.3074781596660614, -0.04643082618713379, -0.06252644956111908, 0.465106725692749, 0.13057032227516174, 0.20379069447517395, 0.2765962481498718, 0.5807615518569946, -0.4295653700828552, 0.015046127140522003, -0.3925747275352478, 0.2540953755378723, 0.18384923040866852, 0.3340367078781128, -0.1944948434829712, -0.4850151240825653, 0.09063325077295303, 0.2447199821472168, 0.05136574059724808, -0.10601361095905304, -0.07859738916158676, 0.16368819773197174, -0.4311269521713257, -0.10090915858745575, -0.5181129574775696, -0.1812315732240677, -0.2913365066051483, 0.11261330544948578, -0.31646403670310974, 0.03343592956662178, 0.06434684991836548, 0.1915278285741806, 0.2770764231681824, 0.43183737993240356, -0.00012366003647912294, 0.026723146438598633, -0.05487021803855896, -0.25157594680786133, -0.14596694707870483, -0.09038671851158142, 0.04580143094062805, 0.09037726372480392, 0.19703005254268646, -0.33287858963012695, -0.1814207136631012, -0.41635116934776306, -0.06817127019166946, 0.00154867023229599, 0.6935948729515076, 0.4342884421348572, 0.00811082124710083, -0.4164193570613861, -0.005543790757656097, 0.1647205352783203, 0.3672725558280945, 0.34025830030441284, -0.02290894091129303, -0.06570923328399658, 0.19163449108600616, 0.0812227800488472, 0.08230459690093994, 0.08324390649795532, -0.015837645158171654, 0.34405070543289185, 0.0033666491508483887, 0.18528273701667786, -0.20759525895118713, -0.4350947141647339, 0.02014206349849701, 0.1973954141139984, 0.6681491732597351, -0.3729458749294281, -0.16183854639530182, -0.20380929112434387, -0.1345120370388031, -0.4180260896682739, -0.07789983600378036, 0.4423205256462097, -0.12057125568389893, 0.13781502842903137, -0.2383987456560135, 0.12562620639801025, -0.2445562481880188, 0.39509260654449463, -0.06539694219827652, 0.24460113048553467, -0.08519109338521957, 0.15800711512565613, 0.1469617784023285, 0.2207309901714325, 0.17953923344612122, -0.23895007371902466, -0.19696557521820068, 0.06093478575348854, -0.3390176296234131, -0.1809929460287094, -0.41946300864219666, -0.2334727942943573, 0.2693910598754883, 0.4270799160003662, -0.1869288831949234, -0.13056081533432007, -0.13680054247379303, -0.1355266273021698, 0.5117040276527405, 0.03014259785413742, 0.2042328417301178, 0.3433420956134796, 0.03895798325538635, -0.03473493829369545, -0.21853773295879364, -0.16800159215927124, -0.13788820803165436, -0.23954962193965912, -0.07266499102115631, 0.3465918302536011, 0.29151082038879395, -0.2763410806655884, -0.10295302420854568, -0.5062008500099182, -0.5687625408172607, -0.28313350677490234, 0.013206598348915577, 0.22617819905281067, 0.09553396701812744, -0.08740203082561493, -0.07268140465021133, 0.38774728775024414, -0.316263884305954, -0.1819906234741211, 0.023104490712285042, 0.07185675203800201, -0.2617373466491699, -0.0702705830335617, 0.31426215171813965, -0.44245314598083496, 0.12382260710000992, -0.07492915540933609, 0.045228809118270874, -0.33284199237823486, 0.16513854265213013, -0.39379239082336426, 0.05457889661192894, 0.2088657170534134, 0.21889656782150269, -0.06642845273017883, 0.12714245915412903, 0.14473973214626312, -0.23340469598770142, 0.1049005389213562, -0.18086671829223633, -0.08017619699239731, 0.15582695603370667, -0.019695930182933807, 0.06115289777517319, 0.135134756565094, -0.48661699891090393, 0.2976645827293396, 0.08968118578195572, 0.10102875530719757, 0.03677891939878464, 0.15949279069900513, -0.1407075673341751, -0.08473294973373413, 0.2250472754240036, 0.13439013063907623, -0.29256075620651245, 0.0847756564617157, 0.0228861216455698, -0.2819041907787323, 0.24531692266464233, 0.11086058616638184, -0.12382328510284424, 0.5956166386604309, -0.033051177859306335, 0.0815185010433197, 0.47773388028144836, -0.7511568665504456, -0.1438726782798767, 0.3750925064086914, 0.26847195625305176, -0.26788172125816345, 0.07328596711158752, -0.13706175982952118, 0.5824893712997437, -0.06007079407572746, -0.19124752283096313, 0.5537322163581848, -0.2710956335067749, 0.016522729769349098, 0.06682787835597992, -0.25302478671073914, -0.08882936835289001, 0.2614715099334717, 0.019068751484155655, -0.07781275361776352, 0.2262897789478302, 0.14657807350158691, 0.3665561378002167, -0.10428112745285034, 0.3087862432003021, -0.04346913844347, 0.24272942543029785, 0.007151700556278229, 0.17868728935718536, -0.3716315031051636, -0.23588624596595764, 0.09320812672376633, 0.006229735910892487, -0.014147356152534485, 0.07565859705209732, -0.22748416662216187, -0.20977208018302917, -0.35260745882987976, -0.3782561421394348, -0.15380696952342987, 0.004806820303201675, -0.19629111886024475, 0.2621349096298218, 0.010923940688371658, -0.2893616557121277, 0.03397178649902344, 0.0975753664970398, 0.43230879306793213, 0.04696470871567726, 0.4479079246520996, 0.12554948031902313, -0.08861954510211945, 0.029921412467956543, 0.05208868160843849, 0.06349022686481476, -0.19690671563148499, -0.13044670224189758, 0.42000922560691833, 0.38733968138694763, -0.08587530255317688, -0.027635201811790466, -0.2635812759399414, 0.27166569232940674, -0.23467998206615448, 0.036377809941768646, -0.013142470270395279, 0.06686218827962875, -0.23640495538711548, -0.393120139837265, 0.15132419764995575, -0.2954004108905792, 0.25075477361679077, -0.004537418484687805, 0.13673043251037598, 0.1403152048587799, -0.2662446200847626, 0.16034482419490814, 0.025353506207466125, -0.10902787744998932, -0.26272720098495483, 0.2647826671600342, -0.30215659737586975, 0.13179077208042145, -0.0627250149846077, 0.4427020847797394, -0.13448365032672882, -0.027101129293441772, 0.0019470974802970886, -0.014632776379585266, 0.3422629237174988, 0.1277848184108734, 0.43837055563926697, 0.3600810468196869, 0.14053712785243988, 0.11694587767124176, 0.11880633980035782, 0.2640932500362396, -0.033017951995134354, 0.1776479333639145, 0.14779609441757202, 0.21399806439876556, 0.15537206828594208, -0.24124084413051605, -0.19303308427333832, -0.03020486608147621, -0.0356372594833374, 0.29650557041168213, 0.30598902702331543, -0.0889391303062439, 0.12641607224941254, -0.23077167570590973, -0.4963017702102661, -0.3396852910518646, -0.32797878980636597, 0.12895852327346802, 0.02332768775522709, 0.03317277505993843, 0.04733077064156532, 0.29060739278793335, 0.12351161241531372, 0.18985119462013245, 0.036479607224464417, -0.07401226460933685, 0.06000097841024399, -0.06857842206954956, -0.1514948457479477, -0.13499954342842102, 0.06682690978050232, 0.37356486916542053, 0.791811466217041, 0.23712585866451263, -0.31885918974876404, 0.010652486234903336, -0.2567156255245209, 0.07967697829008102, 0.22328943014144897, -0.30986446142196655, 0.04982880502939224, 0.16744674742221832, -0.01845739036798477, 0.009667553007602692, -0.09925667196512222, 0.12964531779289246, 0.08141329884529114, -0.1913517266511917, 0.007976606488227844, -0.04987321048974991, 0.07597823441028595, -0.09455391764640808, -0.5739891529083252, -0.14706453680992126, -0.2587657868862152, 0.4122138023376465, 0.23811323940753937, 0.11858367919921875, -0.09718489646911621, 0.08230429887771606, 0.09102896600961685, 0.0020559788681566715, 0.03155722841620445, 0.18993587791919708, -0.1119547188282013, 0.11324568092823029, -0.2350587248802185, -0.2499634474515915, 0.3675476312637329, 0.1742355227470398, -0.057356011122465134, -0.07868219912052155, -0.212184876203537, 0.23354463279247284, -0.039301954209804535, -0.022711629047989845, 0.07120038568973541, 0.11508849263191223, 0.24292081594467163, -0.23191247880458832, 0.16886386275291443, -0.0902315229177475, 0.06545713543891907, 0.14910107851028442, -0.21398496627807617, 0.2626652717590332, -0.13420769572257996, 0.3909490704536438, 0.0201902836561203, 0.6240472197532654, 0.4335096776485443, -0.012047108262777328, 0.03627324104309082, -0.19097492098808289, -0.36497431993484497, -0.07887154072523117, -0.2182035744190216, 0.07005009055137634, -0.11861023306846619, 0.012259718030691147, 0.4296048879623413, 0.29381340742111206, -0.021073179319500923, -0.37323400378227234, -0.32439661026000977, -0.3882586359977722, -0.3626788258552551, 0.03442376106977463, -0.172573059797287, -0.015538610517978668, -0.28304076194763184, 0.03338214010000229, 0.2826637029647827, -0.1496884822845459, -0.3008393347263336, 0.28828877210617065, 0.06864532828330994, -0.026858147233724594, -0.4724099338054657, 0.07643616199493408, -0.2553851902484894, 0.3712054491043091, -0.0017331303097307682, -0.16475245356559753, -0.05018467456102371, 0.1439054012298584, 0.30477374792099, 0.05622339993715286, 0.6318734884262085, 0.012018446810543537, -0.017554208636283875, 0.053803686052560806, -0.03951185569167137, 0.12833625078201294, 0.032172638922929764, -0.30076152086257935, 0.18020068109035492, 0.21794666349887848, 0.06965425610542297, -0.4603879451751709, -0.3480936288833618, 0.3474247455596924, 0.09050846099853516, -0.10738272219896317, -0.05422278121113777, -0.22019042074680328, -0.13840273022651672, -0.4269976317882538, -0.03723142296075821, 0.23812152445316315, 0.04705565795302391, -0.16647085547447205, -0.20256519317626953, -0.05769199877977371, -0.17894738912582397, 0.29000553488731384, 0.08320462703704834, 0.26736417412757874, -0.15050332248210907, 0.16344954073429108, 0.03198619931936264, -0.025631733238697052, 0.5261563658714294, 0.5509869456291199, -0.23886334896087646, -0.6641387343406677, -0.08237281441688538, -0.2544228434562683, 0.4143172800540924, 0.01887752115726471, -0.19845889508724213, -0.057679302990436554, -0.047488272190093994, -0.049234867095947266, -0.04939762502908707, 0.050316568464040756, 0.27525725960731506, -0.07992671430110931, -0.42174509167671204, -0.32955220341682434, 0.297784686088562, -0.049042876809835434, 0.10137718915939331, 0.32223886251449585, -0.05350835621356964, -0.34482237696647644, 0.40466421842575073, 0.1755128800868988, 0.8032990097999573, -0.3154442310333252, -0.0005888044834136963, -0.016340967267751694, 0.022042743861675262, 0.40052467584609985, -0.6602153778076172, 0.08865430951118469, -0.23856769502162933, -0.11239409446716309, -0.13942724466323853, -0.09394292533397675, 0.22458416223526, 0.40197575092315674, -0.45665571093559265, 0.16639253497123718, 0.16984061896800995, -0.09225241839885712, -0.2540280222892761, 0.15800155699253082, -0.1684260368347168, -0.17707307636737823, -0.18916332721710205, -0.0005677137523889542, -0.1797829419374466, 0.12429775297641754, 0.08838360756635666, -0.032931409776210785, -0.18700209259986877, -0.019759003072977066, -0.0014659836888313293, 0.08085230737924576, -0.11257444322109222, -0.10865092277526855, -0.19987653195858002, -0.2284727543592453, 0.21893812716007233, 0.6059160828590393, 0.2206416130065918, -0.1742943972349167, -0.12183721363544464, 0.10383512079715729, -0.09084532409906387, -0.16312813758850098, -0.09841060638427734, -0.06590057909488678, 0.17421458661556244, -0.06483814865350723, -0.32667872309684753, 0.14321669936180115, 0.14728005230426788, -0.18520933389663696, 0.24267125129699707, 0.1704329550266266, 0.10301771014928818, -0.555435299873352, -0.009895166382193565, 0.06675389409065247, -0.09161696583032608, -0.11788171529769897, 0.012263098731637001, 0.007449731230735779, -0.22269363701343536, 0.36302223801612854, -0.3571644425392151, -0.25478118658065796, -0.09812512993812561, -0.015484549105167389, 0.08179588615894318, -0.04315519705414772, 0.25035202503204346, 0.4610133767127991, 0.08029721677303314, -0.21306073665618896, 0.3313153386116028, -0.0468946173787117, -0.565830409526825, 0.19250932335853577, -0.07153615355491638, 0.21219496428966522, 0.20294594764709473, 0.6457032561302185, -0.12375307083129883, -0.07733085006475449, -0.10403203964233398, -0.39822089672088623, -0.18004615604877472, 0.18810731172561646, 0.09796901047229767, 0.2443711757659912, 0.10313428193330765, 0.45722460746765137, 0.19461600482463837, 0.16446782648563385, -0.09129461646080017, 0.42080894112586975, 0.016017066314816475, 0.2344455122947693, -0.24411052465438843, 0.020230213180184364, 0.19394941627979279, 0.08314326405525208, -0.0726451501250267, 0.12580382823944092, -0.011014902964234352, -0.10457837581634521, -0.1326725035905838, 0.20935463905334473, 0.03924856707453728, -0.042921073734760284, -0.1682121753692627, -0.2046527862548828, -0.2691366374492645, -0.2062193602323532, 0.1293133795261383, -0.053673114627599716, 0.040461961179971695, 0.3889121413230896, 0.5246464610099792, 0.058892812579870224, -0.5523729920387268, -0.08314405381679535, -0.03149314224720001, 0.017872340977191925, 0.1262950748205185, 0.10040374845266342, -0.0244425218552351, 0.005022212862968445, -0.535182774066925, -0.043805308640003204, 0.488059401512146, -0.048544079065322876, 0.3229612112045288, 0.012444369494915009, 0.36698272824287415, -0.1774817854166031, 0.46262285113334656, 0.3782719671726227, -0.01794622279703617, 0.1993529200553894, 0.169798344373703, 0.05395165830850601, 0.01769784837961197, 0.18497341871261597, 0.22054575383663177, -0.0006583482027053833, 0.016036447137594223, 0.4903227388858795, -0.2690656781196594, 0.16662806272506714, -0.37175822257995605, -0.04214949533343315, 0.3210776150226593, 0.15426887571811676, 0.30331936478614807, 0.9101150631904602, -0.059588074684143066, 0.0866481363773346, 0.12546031177043915, 0.005780357867479324, 0.08390261232852936, 0.4529551863670349, -0.06340140849351883, 0.36246174573898315, -0.28183797001838684, 0.10661771893501282, 0.20833054184913635, -0.13506515324115753, 0.11799947917461395, 0.14697185158729553, -0.16051974892616272, -0.24243837594985962, -0.06348173320293427, 0.665105402469635, -0.0648374855518341, -0.1775449812412262, -0.2696157395839691, 0.3691827952861786, 0.2023305594921112, 0.08462628722190857, -0.32159584760665894, -0.08356332033872604, 0.2510620057582855, -0.10736389458179474, -0.1984584778547287, -0.22295106947422028, 0.06666315346956253, 0.24173468351364136, 0.021624043583869934, -0.055987969040870667, 0.05584527552127838, -0.0804673284292221, 0.18269574642181396, -0.04394792765378952, 0.0037154629826545715, 0.1432076394557953, -0.07180437445640564, 0.360077440738678, 0.16030848026275635, 0.09384158998727798, 0.0030687712132930756, -0.16674961149692535, 0.019492831081151962, -0.04232027009129524, -0.07010313868522644, 0.31846877932548523, 0.29827436804771423, 0.10525549948215485, 0.41705799102783203, 0.24473409354686737, 0.042132049798965454, -0.023673515766859055, -0.13603830337524414, -0.014391396194696426, -0.03992759436368942, -0.2733765244483948, 0.3864547312259674, 0.011979945003986359, -0.09348227083683014, -0.018207862973213196, -0.05598010867834091, -0.38870760798454285, -0.1473826915025711, 0.021849259734153748, -0.28041571378707886, 0.06265288591384888, -0.07459458708763123, -0.04146890342235565, -0.06446817517280579, 0.24261276423931122, -0.05617609992623329, 0.29433271288871765, -0.33160361647605896, -0.1498587727546692, -0.1963471919298172, -0.1389787495136261, -0.4514507055282593, -0.5549049973487854, -0.07209941744804382, 0.06732691079378128, 0.021478071808815002, 0.23266148567199707, 0.0926980972290039, -0.1600029617547989, 0.14979375898838043, 0.5700589418411255, -0.16297972202301025, -0.2597332298755646, -0.2790682911872864, 0.3490464389324188, -0.19561056792736053, -0.3895208239555359, 0.08401332795619965, 0.3195919394493103, -0.20473486185073853, 0.1459270864725113, -0.15143969655036926, 0.45450496673583984, 0.003188900649547577, -0.3598993420600891, 0.06291720271110535, 0.5531312227249146, 0.2346213161945343, 0.3608317971229553, 0.16408668458461761, 0.05731311812996864, -0.07045604288578033, 0.2012004852294922, 0.1174851655960083, 0.29133251309394836, -0.3149193823337555, 0.2003583163022995, -0.10853976756334305, 0.08946114778518677, -0.00033979862928390503, -0.014992358162999153, -0.356035441160202, 0.0652305856347084, -0.07072702050209045, 0.19268940389156342, 0.5887846946716309, 0.5346588492393494, -0.2799520194530487, -0.19009847939014435, -0.28880971670150757, -0.1398526132106781, 0.16229648888111115, -0.5503789782524109, -0.19008009135723114, 0.19415269792079926, 0.049757808446884155, 0.3609682619571686, -0.055429667234420776, -0.5752097368240356, -0.00256897509098053, 0.283944308757782, -0.1510564088821411, -0.1649816632270813, 0.25271567702293396, 0.3656669855117798, -0.1321684569120407, 0.05946702882647514, 0.05270252004265785, 0.13994047045707703, -0.2519499361515045, -0.014926038682460785, -0.23721198737621307 ]
https://github.com/huggingface/datasets/issues/1785
Not enough disk space (Needed: Unknown size) when caching on a cluster
Hi ! What do you mean by "disk_usage(".").free` can't compute on the cluster's shared disk" exactly ? Does it return 0 ?
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space?
22
Not enough disk space (Needed: Unknown size) when caching on a cluster I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space? Hi ! What do you mean by "disk_usage(".").free` can't compute on the cluster's shared disk" exactly ? Does it return 0 ?
[ -0.07774271070957184, -0.41871702671051025, -0.084621861577034, 0.2431602030992508, -0.09700989723205566, 0.15066057443618774, 0.07053462415933609, 0.3401210606098175, 0.3962354063987732, 0.39331597089767456, 0.4183928668498993, -0.13893157243728638, -0.09125030040740967, 0.003891667351126671, -0.1739584505558014, 0.24173220992088318, -0.008229836821556091, -0.06064525246620178, 0.34556707739830017, 0.1274869292974472, -0.40572863817214966, 0.013043487444519997, 0.09445026516914368, -0.3736138939857483, -0.5426243543624878, -0.1880916953086853, -0.16628047823905945, 0.15668568015098572, 0.2269616723060608, -0.22474358975887299, 0.3221062421798706, -0.005494996905326843, -0.10113952308893204, 0.5720781087875366, -0.00011594402167247608, 0.036312490701675415, 0.17152497172355652, -0.18090517818927765, -0.4399377405643463, -0.03869593143463135, 0.21730411052703857, -0.40692266821861267, -0.22335867583751678, -0.3619658052921295, -0.010309351608157158, 0.1603570431470871, -0.05118110775947571, -0.4436120092868805, 0.17652517557144165, -0.06918414682149887, 0.16796934604644775, 0.3530052602291107, -0.2203020304441452, -0.0926135927438736, -0.2659410834312439, 0.17672321200370789, -0.04691300168633461, 0.5180595517158508, 0.299263060092926, 0.075315460562706, -0.27873021364212036, 0.22080935537815094, -0.133325457572937, 0.16011619567871094, 0.4138149321079254, -0.1359979808330536, -0.07452750951051712, -0.18451358377933502, 0.1962379515171051, -0.02686726301908493, 0.4277343451976776, -0.1950325071811676, -0.5273442268371582, -0.5711027383804321, 0.050052523612976074, -0.15977191925048828, 0.4396585524082184, 0.03642542287707329, -0.4096872806549072, 0.12267166376113892, -0.301859587430954, -0.337260901927948, -0.20105183124542236, -0.20997731387615204, 0.053208932280540466, 0.16413024067878723, 0.001683688722550869, 0.08308522403240204, 0.32703298330307007, 0.01750127784907818, -0.025626003742218018, 0.02643648535013199, 0.17296092212200165, 0.25364184379577637, -0.28654634952545166, 0.015176162123680115, -0.09484115988016129, 0.2101237177848816, 0.10111940652132034, 0.21069864928722382, 0.06100566312670708, -0.1125408336520195, 0.07357309013605118, 0.25406673550605774, 0.013657990843057632, 0.24661196768283844, -0.2650676965713501, -0.09788823872804642, 0.2030569463968277, -0.0030459794215857983, 0.1735391467809677, -0.11331971734762192, 0.048171985894441605, -0.35080695152282715, 0.11620275676250458, -0.01808798313140869, 0.20401275157928467, -0.07148532569408417, -0.38218510150909424, 0.1272476613521576, 0.20500531792640686, 0.3049911856651306, 0.2122824490070343, 0.2848544418811798, 0.08105026185512543, 0.23997870087623596, 0.21884159743785858, 0.19945231080055237, -0.09023430198431015, -0.09682650864124298, -0.11598093062639236, -0.014706950634717941, 0.08853031694889069, 0.1693158596754074, 0.3448050618171692, 0.03677058219909668, 0.2115969955921173, -0.01790435053408146, 0.4590660333633423, -0.10544564574956894, -0.07217589020729065, -0.23526142537593842, -0.11916296929121017, 0.42335203289985657, 0.11977587640285492, 0.01175752840936184, 0.25198256969451904, 0.15005090832710266, -0.15103840827941895, 0.26779088377952576, -0.3836437463760376, -0.45535942912101746, 0.044019412249326706, 0.07246240973472595, -0.35284119844436646, 0.20111902058124542, -0.406609445810318, -0.03843996301293373, 0.3097243010997772, -0.18243928253650665, 0.10116452723741531, 0.09283821284770966, -0.38871026039123535, -0.24627067148685455, 0.13819460570812225, 0.3473316431045532, -0.11425130069255829, 0.003716699779033661, -0.31071728467941284, 0.16215555369853973, 0.05258791893720627, 0.41459566354751587, 0.13116253912448883, 0.13864412903785706, -0.4277251362800598, 0.13801047205924988, 0.11270679533481598, -0.3308422863483429, -0.541803240776062, 0.30612999200820923, -0.1718520224094391, 0.25160178542137146, 0.5377891063690186, 0.26144614815711975, -0.016332795843482018, -0.23369143903255463, 0.23278652131557465, 0.27145397663116455, -0.21969076991081238, 0.05634499341249466, -0.35332760214805603, -0.2634563446044922, 0.027872104197740555, 0.061429452151060104, 0.34540098905563354, 0.10856448113918304, 0.010947689414024353, -0.006002979353070259, 0.18187060952186584, 0.054979357868433, 0.20100553333759308, 0.31932348012924194, 0.3190515637397766, -0.3444594144821167, -0.07386574894189835, 0.021724484860897064, -0.5194780230522156, 0.3491624891757965, 0.19307182729244232, -0.21001490950584412, -0.06464970111846924, -0.4432949423789978, -0.28096306324005127, 0.06220823526382446, 0.2482939213514328, 0.3274293839931488, 0.0486467182636261, -0.037388384342193604, 0.24946674704551697, -0.30693548917770386, -0.05965017154812813, 0.16683034598827362, -0.2572433352470398, -0.057898327708244324, 0.10287646949291229, -0.037163566797971725, -0.04239146411418915, -0.14003950357437134, 0.049448393285274506, 0.06461072713136673, 0.06502678245306015, 0.1349683403968811, -0.014334900304675102, 0.41349127888679504, -0.10637472569942474, 0.22477206587791443, -0.09035142511129379, 0.13460005819797516, 0.15231342613697052, 0.35126134753227234, 0.0020519718527793884, 0.1752403825521469, 0.006946832872927189, -0.16976600885391235, -0.11104359477758408, 0.20959749817848206, -0.04556981846690178, 0.28535979986190796, -0.08265810459852219, 0.06405837833881378, 0.06243818998336792, 0.056038063019514084, 0.12377553433179855, -0.05928979441523552, 0.2901301681995392, -0.19665664434432983, 0.4879348874092102, 0.08131785690784454, 0.02284674346446991, -0.014420174062252045, 0.06943929195404053, 0.15922808647155762, 0.2913534641265869, 0.15650694072246552, 0.29709669947624207, -0.03452153876423836, -0.005879342555999756, 0.28174129128456116, 0.2664143443107605, 0.15600240230560303, 0.015309102833271027, -0.1753178834915161, 0.04518739506602287, -0.2055586874485016, 0.05281992256641388, -0.05030147731304169, 0.15801826119422913, 0.2922111451625824, 0.006730193737894297, -0.29641732573509216, 0.09604697674512863, -0.3090457618236542, 0.21551138162612915, 0.07729791849851608, -0.2874605655670166, -0.0579073503613472, 0.05577975511550903, 0.1828182339668274, 0.061594266444444656, 0.18895944952964783, -0.4589169919490814, -0.3148480951786041, 0.17463605105876923, 0.6444199681282043, -0.23739014565944672, -0.0952426940202713, -0.37296444177627563, 0.4732416272163391, 0.07805273681879044, -0.4257938861846924, -0.026563117280602455, -0.2685462534427643, -0.10555187612771988, 0.017070945352315903, 0.32546570897102356, -0.25782713294029236, 0.3435428738594055, 0.009413475170731544, 0.07134472578763962, -0.4250701665878296, 0.15812283754348755, -0.16978757083415985, 0.02674458920955658, 0.1604890376329422, -0.13076373934745789, 0.3355613946914673, -0.12210873514413834, -0.16110190749168396, 0.1600523144006729, -0.0386517271399498, -0.04174761101603508, 0.009187156334519386, 0.15706183016300201, 0.17532795667648315, -0.323263943195343, 0.03154074028134346, -0.17938263714313507, -0.5495164394378662, 0.17439031600952148, -0.18168389797210693, 0.271646648645401, 0.1036403700709343, 0.17338645458221436, -0.10494735091924667, 0.7099822759628296, -0.17317649722099304, -0.24961908161640167, -0.6116566061973572, 0.23829130828380585, -0.08035756647586823, -0.02955171838402748, -0.04717123880982399, 0.029628004878759384, 0.21220248937606812, 0.42421936988830566, -0.4782419800758362, -0.400262713432312, -0.16716623306274414, 0.22946718335151672, -0.2420353889465332, -0.032157257199287415, 0.17910374701023102, -0.14865458011627197, -0.07347260415554047, -0.14096394181251526, -0.028164424002170563, 0.052829064428806305, 0.009464403614401817, 0.2762107253074646, 0.292793869972229, 0.21926245093345642, 0.32078441977500916, 0.7062380313873291, -0.1594580113887787, 0.25005555152893066, 0.27551794052124023, 0.18174372613430023, 0.6162170767784119, 0.09052632004022598, -0.0536038801074028, 0.04009968787431717, 0.008074387907981873, -0.6150444149971008, 0.01897478848695755, -0.03327057883143425, 0.13807761669158936, -0.028210263699293137, -0.39497509598731995, 0.07973652333021164, -0.26900389790534973, 0.3064284026622772, -0.44076067209243774, 0.2631149888038635, -0.26249557733535767, 0.0036539360880851746, -0.36616992950439453, -0.08880208432674408, -0.027877965942025185, 0.09572452306747437, 0.5163894891738892, 0.19937045872211456, -0.25788187980651855, -0.26609110832214355, -0.5647938251495361, 0.3253157138824463, -0.006048521026968956, 0.12446128576993942, -0.31000816822052, 0.07452920824289322, -0.08088169991970062, 0.01012723334133625, 0.7869895696640015, -0.09053672850131989, 0.2198173701763153, 0.0822388082742691, 0.025765590369701385, -0.5359348058700562, -0.010849013924598694, 0.13685601949691772, 0.38045820593833923, -0.07196992635726929, 0.4385930597782135, -0.1767694354057312, 0.12497170269489288, -0.4394177794456482, 0.3606897294521332, -0.33069178462028503, -0.24158832430839539, -0.3854798972606659, -0.3814751207828522, -0.48330074548721313, 0.44739043712615967, 0.4565170407295227, 0.25278574228286743, -0.048352427780628204, 0.3299100697040558, -0.17026330530643463, -0.01496080495417118, 0.17365160584449768, -0.007580142468214035, 0.4432085454463959, -0.1366671472787857, 0.04138917848467827, 0.10192042589187622, -0.056578509509563446, 0.4277549982070923, 0.41325798630714417, 0.10969634354114532, 0.1532110869884491, 0.2755296230316162, 0.015611880458891392, 0.33395251631736755, 0.3349302113056183, -0.07208311557769775, 0.027241647243499756, 0.11594665795564651, 0.24569746851921082, -0.43921107053756714, -0.06493610143661499, -0.39375367760658264, -0.053410742431879044, -0.09026334434747696, -0.02069668099284172, 0.37267330288887024, 0.3526017665863037, 0.017791539430618286, 0.07021567970514297, 0.3179871439933777, -0.31271594762802124, 0.2607083320617676, -0.026027806103229523, 0.872586727142334, -0.08519591391086578, 0.0190444216132164, 0.0668715164065361, 0.3008270859718323, 0.3401432931423187, -0.4726657271385193, 0.3613077998161316, 0.04408494010567665, -0.2942006587982178, 0.032581523060798645, -0.012193415313959122, -0.021077431738376617, 0.2959337830543518, -0.16884513199329376, 0.401699423789978, -0.5068144798278809, 0.012194328010082245, -0.09541498869657516, 0.13655304908752441, -0.6846146583557129, -0.37429556250572205, -0.2389674186706543, 0.12068924307823181, -0.13779541850090027, 0.21029998362064362, -0.24510425329208374, 0.10865650326013565, 0.03371363505721092, -0.312885046005249, -0.36626607179641724, -0.17015394568443298, 0.026718057692050934, 0.3035687804222107, -0.17898529767990112, 0.02364327758550644, -0.08937288820743561, 0.13467729091644287, 0.21527770161628723, 0.3010424077510834, -0.1435466706752777, 0.10248011350631714, -0.15729209780693054, -0.05579762160778046, 0.06480653584003448, 0.07522264122962952, 0.11239749938249588, 0.001626182347536087, -0.3096863925457001, 0.15746495127677917, -0.25910359621047974, -0.4899292588233948, 0.029062524437904358, -0.043814174830913544, -0.29428917169570923, -0.03387326002120972, -0.2902984023094177, -0.456600546836853, -0.005463704466819763, -0.08768321573734283, 0.06650687009096146, 0.01917397603392601, -0.11894801259040833, 0.14763516187667847, 0.02352585643529892, -0.20440933108329773, 0.11642156541347504, 0.19072356820106506, 0.17154881358146667, -0.3462998569011688, 0.3859965205192566, -0.37319815158843994, -0.0873679667711258, -0.17369389533996582, -0.15040938556194305, -0.13429872691631317, 0.09508276730775833, 0.3430250883102417, -0.07940418273210526, -0.12857933342456818, -0.24275103211402893, -0.23101267218589783, 0.6502943634986877, 0.42623797059059143, -0.14408349990844727, -0.4783772826194763, -0.373183012008667, 0.26766467094421387, 0.08030042797327042, 0.23816049098968506, -0.06412079185247421, -0.09848767518997192, 0.030608290806412697, 0.11294644325971603, -0.25599098205566406, -0.05578719824552536, -0.4407341480255127, 0.007171453908085823, 0.21178580820560455, 0.12637656927108765, 0.21430258452892303, -0.09470637142658234, -0.08272820711135864, 0.1265946626663208, -0.05575760453939438, -0.11263579875230789, 0.044962022453546524, 0.15062780678272247, 0.046918757259845734, 0.19517195224761963, 0.17354387044906616, -0.45882362127304077, 0.2376367747783661, -0.26550623774528503, 0.17537608742713928, 0.4182690978050232, -0.045481324195861816, -0.34155726432800293, 0.07465758919715881, 0.49747514724731445, -0.17092390358448029, 0.1422317624092102, 0.12859423458576202, 0.1546492725610733, -0.22968026995658875, 0.18428702652454376, 0.12514764070510864, 0.1417403221130371, 0.23668622970581055, -0.11207864433526993, 0.22014395892620087, 0.038522038608789444, -0.15457120537757874, 0.0684717670083046, -0.0448022335767746, 0.24782316386699677, 0.26529592275619507, -0.07904449105262756, -0.029399584978818893, 0.033805303275585175, 0.06988371163606644, 0.21730965375900269, -0.2394903004169464, -0.11724893748760223, 0.2396283596754074, -0.029939375817775726, 0.11975628137588501, 0.501385509967804, 0.387614369392395, -0.37487393617630005, 0.0745420977473259, 0.0923808217048645, 0.5648558139801025, -0.26017630100250244, 0.04130970686674118, 0.13369520008563995, 0.05060681328177452, 0.0030419304966926575, 0.1490100771188736, -0.06330139935016632, 0.3891547620296478, 0.3070394992828369, -0.17135366797447205, 0.21597211062908173, 0.24081242084503174, -0.12086087465286255, -0.14976298809051514, -0.40510860085487366, 0.08635277301073074, 0.08172904700040817, 0.04258323833346367, 0.1304464340209961, -0.3192770183086395, -0.04760055989027023, -0.3641909658908844, -0.19654101133346558, -0.2249186635017395, -0.11324144899845123, -0.4139752686023712, -0.010649209842085838, -0.018116828054189682, -0.08793169260025024, -0.027367543429136276, -0.12374721467494965, 0.3569251596927643, -0.3851688504219055, 0.3071930706501007, 0.009147800505161285, 0.06227511912584305, 0.29900604486465454, -0.29941949248313904, 0.4684777557849884, 0.16412904858589172, -0.36845913529396057, 0.037796419113874435, 0.2732795476913452, -0.25389403104782104, 0.29971322417259216, 0.17128688097000122, 0.6783182621002197, 0.222746804356575, -0.0918964147567749, 0.06751569360494614, 0.03421475738286972, 0.07634919136762619, -0.3394200801849365, -0.023012835532426834, 0.06691811978816986, -0.133262038230896, 0.11456680297851562, 0.13749413192272186, -0.09449613094329834, 0.22364628314971924, 0.011741690337657928, 0.2606373727321625, -0.25720712542533875, -0.12003573030233383, -0.17192374169826508, -0.19954931735992432, -0.13376359641551971, 0.09174948930740356, -0.2527792751789093, -0.2110946625471115, 0.35246410965919495, -0.05091572925448418, 0.1831527054309845, 0.19918875396251678, 0.06721262633800507, -0.09606665372848511, 0.27137839794158936, 0.3381309509277344, -0.5006518959999084, -0.3073892295360565, 0.08907073736190796, -0.5300477743148804, 0.21790054440498352, -0.2879719138145447, -0.07918884605169296, -0.031629279255867004, 0.21626031398773193, -0.03532450646162033, -0.1100044995546341, 0.09238363057374954, -0.08695540577173233, -0.06845752894878387, -0.15444929897785187, -0.26337891817092896, -0.2788791358470917, -0.087815061211586, -0.2979597747325897, 0.27159151434898376, -0.5973243713378906, -0.04767138138413429, 0.10969887673854828, 0.06260467320680618, 0.08089611679315567, -0.0069348253309726715, 0.23120248317718506, 0.44211503863334656, 0.3236789107322693, -0.001400856301188469, 0.4533211290836334, 0.06917838007211685, -0.15781830251216888, -0.35559970140457153, -0.0512276366353035, -0.156731516122818, 0.05033527687191963, 0.12298177182674408, 0.23972415924072266, -0.6420228481292725, 0.08903671056032181, -0.23719558119773865, 0.24776995182037354, 0.06780725717544556, -0.07973416149616241, 0.09804759174585342, -0.023893317207694054, -0.3431893587112427, 0.19829495251178741, 0.23607483506202698, 0.2301774024963379, -0.06586264818906784, 0.3270435333251953, -0.19334697723388672, -0.15631496906280518, 0.4829874038696289, -0.13969314098358154, -0.3495694100856781, -0.22467701137065887, 0.4760475158691406, 0.05776984989643097, -0.04042286425828934, -0.19705072045326233, -0.08895687013864517, 0.18535330891609192, 0.07910521328449249, 0.06320065259933472, -0.1794750690460205, -0.2648894190788269, -0.24923738837242126, -0.013969497755169868, 0.20918026566505432, -0.31211450695991516, -0.31358838081359863, 0.03507344052195549, -0.20943908393383026 ]
https://github.com/huggingface/datasets/issues/1785
Not enough disk space (Needed: Unknown size) when caching on a cluster
Yes, that's right. It shows 0 free space even though there is. I suspect it might have to do with permissions on the shared disk. ```python >>> disk_usage(".") usage(total=999999, used=999999, free=0) ```
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space?
32
Not enough disk space (Needed: Unknown size) when caching on a cluster I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space? Yes, that's right. It shows 0 free space even though there is. I suspect it might have to do with permissions on the shared disk. ```python >>> disk_usage(".") usage(total=999999, used=999999, free=0) ```
[ -0.07774271070957184, -0.41871702671051025, -0.084621861577034, 0.2431602030992508, -0.09700989723205566, 0.15066057443618774, 0.07053462415933609, 0.3401210606098175, 0.3962354063987732, 0.39331597089767456, 0.4183928668498993, -0.13893157243728638, -0.09125030040740967, 0.003891667351126671, -0.1739584505558014, 0.24173220992088318, -0.008229836821556091, -0.06064525246620178, 0.34556707739830017, 0.1274869292974472, -0.40572863817214966, 0.013043487444519997, 0.09445026516914368, -0.3736138939857483, -0.5426243543624878, -0.1880916953086853, -0.16628047823905945, 0.15668568015098572, 0.2269616723060608, -0.22474358975887299, 0.3221062421798706, -0.005494996905326843, -0.10113952308893204, 0.5720781087875366, -0.00011594402167247608, 0.036312490701675415, 0.17152497172355652, -0.18090517818927765, -0.4399377405643463, -0.03869593143463135, 0.21730411052703857, -0.40692266821861267, -0.22335867583751678, -0.3619658052921295, -0.010309351608157158, 0.1603570431470871, -0.05118110775947571, -0.4436120092868805, 0.17652517557144165, -0.06918414682149887, 0.16796934604644775, 0.3530052602291107, -0.2203020304441452, -0.0926135927438736, -0.2659410834312439, 0.17672321200370789, -0.04691300168633461, 0.5180595517158508, 0.299263060092926, 0.075315460562706, -0.27873021364212036, 0.22080935537815094, -0.133325457572937, 0.16011619567871094, 0.4138149321079254, -0.1359979808330536, -0.07452750951051712, -0.18451358377933502, 0.1962379515171051, -0.02686726301908493, 0.4277343451976776, -0.1950325071811676, -0.5273442268371582, -0.5711027383804321, 0.050052523612976074, -0.15977191925048828, 0.4396585524082184, 0.03642542287707329, -0.4096872806549072, 0.12267166376113892, -0.301859587430954, -0.337260901927948, -0.20105183124542236, -0.20997731387615204, 0.053208932280540466, 0.16413024067878723, 0.001683688722550869, 0.08308522403240204, 0.32703298330307007, 0.01750127784907818, -0.025626003742218018, 0.02643648535013199, 0.17296092212200165, 0.25364184379577637, -0.28654634952545166, 0.015176162123680115, -0.09484115988016129, 0.2101237177848816, 0.10111940652132034, 0.21069864928722382, 0.06100566312670708, -0.1125408336520195, 0.07357309013605118, 0.25406673550605774, 0.013657990843057632, 0.24661196768283844, -0.2650676965713501, -0.09788823872804642, 0.2030569463968277, -0.0030459794215857983, 0.1735391467809677, -0.11331971734762192, 0.048171985894441605, -0.35080695152282715, 0.11620275676250458, -0.01808798313140869, 0.20401275157928467, -0.07148532569408417, -0.38218510150909424, 0.1272476613521576, 0.20500531792640686, 0.3049911856651306, 0.2122824490070343, 0.2848544418811798, 0.08105026185512543, 0.23997870087623596, 0.21884159743785858, 0.19945231080055237, -0.09023430198431015, -0.09682650864124298, -0.11598093062639236, -0.014706950634717941, 0.08853031694889069, 0.1693158596754074, 0.3448050618171692, 0.03677058219909668, 0.2115969955921173, -0.01790435053408146, 0.4590660333633423, -0.10544564574956894, -0.07217589020729065, -0.23526142537593842, -0.11916296929121017, 0.42335203289985657, 0.11977587640285492, 0.01175752840936184, 0.25198256969451904, 0.15005090832710266, -0.15103840827941895, 0.26779088377952576, -0.3836437463760376, -0.45535942912101746, 0.044019412249326706, 0.07246240973472595, -0.35284119844436646, 0.20111902058124542, -0.406609445810318, -0.03843996301293373, 0.3097243010997772, -0.18243928253650665, 0.10116452723741531, 0.09283821284770966, -0.38871026039123535, -0.24627067148685455, 0.13819460570812225, 0.3473316431045532, -0.11425130069255829, 0.003716699779033661, -0.31071728467941284, 0.16215555369853973, 0.05258791893720627, 0.41459566354751587, 0.13116253912448883, 0.13864412903785706, -0.4277251362800598, 0.13801047205924988, 0.11270679533481598, -0.3308422863483429, -0.541803240776062, 0.30612999200820923, -0.1718520224094391, 0.25160178542137146, 0.5377891063690186, 0.26144614815711975, -0.016332795843482018, -0.23369143903255463, 0.23278652131557465, 0.27145397663116455, -0.21969076991081238, 0.05634499341249466, -0.35332760214805603, -0.2634563446044922, 0.027872104197740555, 0.061429452151060104, 0.34540098905563354, 0.10856448113918304, 0.010947689414024353, -0.006002979353070259, 0.18187060952186584, 0.054979357868433, 0.20100553333759308, 0.31932348012924194, 0.3190515637397766, -0.3444594144821167, -0.07386574894189835, 0.021724484860897064, -0.5194780230522156, 0.3491624891757965, 0.19307182729244232, -0.21001490950584412, -0.06464970111846924, -0.4432949423789978, -0.28096306324005127, 0.06220823526382446, 0.2482939213514328, 0.3274293839931488, 0.0486467182636261, -0.037388384342193604, 0.24946674704551697, -0.30693548917770386, -0.05965017154812813, 0.16683034598827362, -0.2572433352470398, -0.057898327708244324, 0.10287646949291229, -0.037163566797971725, -0.04239146411418915, -0.14003950357437134, 0.049448393285274506, 0.06461072713136673, 0.06502678245306015, 0.1349683403968811, -0.014334900304675102, 0.41349127888679504, -0.10637472569942474, 0.22477206587791443, -0.09035142511129379, 0.13460005819797516, 0.15231342613697052, 0.35126134753227234, 0.0020519718527793884, 0.1752403825521469, 0.006946832872927189, -0.16976600885391235, -0.11104359477758408, 0.20959749817848206, -0.04556981846690178, 0.28535979986190796, -0.08265810459852219, 0.06405837833881378, 0.06243818998336792, 0.056038063019514084, 0.12377553433179855, -0.05928979441523552, 0.2901301681995392, -0.19665664434432983, 0.4879348874092102, 0.08131785690784454, 0.02284674346446991, -0.014420174062252045, 0.06943929195404053, 0.15922808647155762, 0.2913534641265869, 0.15650694072246552, 0.29709669947624207, -0.03452153876423836, -0.005879342555999756, 0.28174129128456116, 0.2664143443107605, 0.15600240230560303, 0.015309102833271027, -0.1753178834915161, 0.04518739506602287, -0.2055586874485016, 0.05281992256641388, -0.05030147731304169, 0.15801826119422913, 0.2922111451625824, 0.006730193737894297, -0.29641732573509216, 0.09604697674512863, -0.3090457618236542, 0.21551138162612915, 0.07729791849851608, -0.2874605655670166, -0.0579073503613472, 0.05577975511550903, 0.1828182339668274, 0.061594266444444656, 0.18895944952964783, -0.4589169919490814, -0.3148480951786041, 0.17463605105876923, 0.6444199681282043, -0.23739014565944672, -0.0952426940202713, -0.37296444177627563, 0.4732416272163391, 0.07805273681879044, -0.4257938861846924, -0.026563117280602455, -0.2685462534427643, -0.10555187612771988, 0.017070945352315903, 0.32546570897102356, -0.25782713294029236, 0.3435428738594055, 0.009413475170731544, 0.07134472578763962, -0.4250701665878296, 0.15812283754348755, -0.16978757083415985, 0.02674458920955658, 0.1604890376329422, -0.13076373934745789, 0.3355613946914673, -0.12210873514413834, -0.16110190749168396, 0.1600523144006729, -0.0386517271399498, -0.04174761101603508, 0.009187156334519386, 0.15706183016300201, 0.17532795667648315, -0.323263943195343, 0.03154074028134346, -0.17938263714313507, -0.5495164394378662, 0.17439031600952148, -0.18168389797210693, 0.271646648645401, 0.1036403700709343, 0.17338645458221436, -0.10494735091924667, 0.7099822759628296, -0.17317649722099304, -0.24961908161640167, -0.6116566061973572, 0.23829130828380585, -0.08035756647586823, -0.02955171838402748, -0.04717123880982399, 0.029628004878759384, 0.21220248937606812, 0.42421936988830566, -0.4782419800758362, -0.400262713432312, -0.16716623306274414, 0.22946718335151672, -0.2420353889465332, -0.032157257199287415, 0.17910374701023102, -0.14865458011627197, -0.07347260415554047, -0.14096394181251526, -0.028164424002170563, 0.052829064428806305, 0.009464403614401817, 0.2762107253074646, 0.292793869972229, 0.21926245093345642, 0.32078441977500916, 0.7062380313873291, -0.1594580113887787, 0.25005555152893066, 0.27551794052124023, 0.18174372613430023, 0.6162170767784119, 0.09052632004022598, -0.0536038801074028, 0.04009968787431717, 0.008074387907981873, -0.6150444149971008, 0.01897478848695755, -0.03327057883143425, 0.13807761669158936, -0.028210263699293137, -0.39497509598731995, 0.07973652333021164, -0.26900389790534973, 0.3064284026622772, -0.44076067209243774, 0.2631149888038635, -0.26249557733535767, 0.0036539360880851746, -0.36616992950439453, -0.08880208432674408, -0.027877965942025185, 0.09572452306747437, 0.5163894891738892, 0.19937045872211456, -0.25788187980651855, -0.26609110832214355, -0.5647938251495361, 0.3253157138824463, -0.006048521026968956, 0.12446128576993942, -0.31000816822052, 0.07452920824289322, -0.08088169991970062, 0.01012723334133625, 0.7869895696640015, -0.09053672850131989, 0.2198173701763153, 0.0822388082742691, 0.025765590369701385, -0.5359348058700562, -0.010849013924598694, 0.13685601949691772, 0.38045820593833923, -0.07196992635726929, 0.4385930597782135, -0.1767694354057312, 0.12497170269489288, -0.4394177794456482, 0.3606897294521332, -0.33069178462028503, -0.24158832430839539, -0.3854798972606659, -0.3814751207828522, -0.48330074548721313, 0.44739043712615967, 0.4565170407295227, 0.25278574228286743, -0.048352427780628204, 0.3299100697040558, -0.17026330530643463, -0.01496080495417118, 0.17365160584449768, -0.007580142468214035, 0.4432085454463959, -0.1366671472787857, 0.04138917848467827, 0.10192042589187622, -0.056578509509563446, 0.4277549982070923, 0.41325798630714417, 0.10969634354114532, 0.1532110869884491, 0.2755296230316162, 0.015611880458891392, 0.33395251631736755, 0.3349302113056183, -0.07208311557769775, 0.027241647243499756, 0.11594665795564651, 0.24569746851921082, -0.43921107053756714, -0.06493610143661499, -0.39375367760658264, -0.053410742431879044, -0.09026334434747696, -0.02069668099284172, 0.37267330288887024, 0.3526017665863037, 0.017791539430618286, 0.07021567970514297, 0.3179871439933777, -0.31271594762802124, 0.2607083320617676, -0.026027806103229523, 0.872586727142334, -0.08519591391086578, 0.0190444216132164, 0.0668715164065361, 0.3008270859718323, 0.3401432931423187, -0.4726657271385193, 0.3613077998161316, 0.04408494010567665, -0.2942006587982178, 0.032581523060798645, -0.012193415313959122, -0.021077431738376617, 0.2959337830543518, -0.16884513199329376, 0.401699423789978, -0.5068144798278809, 0.012194328010082245, -0.09541498869657516, 0.13655304908752441, -0.6846146583557129, -0.37429556250572205, -0.2389674186706543, 0.12068924307823181, -0.13779541850090027, 0.21029998362064362, -0.24510425329208374, 0.10865650326013565, 0.03371363505721092, -0.312885046005249, -0.36626607179641724, -0.17015394568443298, 0.026718057692050934, 0.3035687804222107, -0.17898529767990112, 0.02364327758550644, -0.08937288820743561, 0.13467729091644287, 0.21527770161628723, 0.3010424077510834, -0.1435466706752777, 0.10248011350631714, -0.15729209780693054, -0.05579762160778046, 0.06480653584003448, 0.07522264122962952, 0.11239749938249588, 0.001626182347536087, -0.3096863925457001, 0.15746495127677917, -0.25910359621047974, -0.4899292588233948, 0.029062524437904358, -0.043814174830913544, -0.29428917169570923, -0.03387326002120972, -0.2902984023094177, -0.456600546836853, -0.005463704466819763, -0.08768321573734283, 0.06650687009096146, 0.01917397603392601, -0.11894801259040833, 0.14763516187667847, 0.02352585643529892, -0.20440933108329773, 0.11642156541347504, 0.19072356820106506, 0.17154881358146667, -0.3462998569011688, 0.3859965205192566, -0.37319815158843994, -0.0873679667711258, -0.17369389533996582, -0.15040938556194305, -0.13429872691631317, 0.09508276730775833, 0.3430250883102417, -0.07940418273210526, -0.12857933342456818, -0.24275103211402893, -0.23101267218589783, 0.6502943634986877, 0.42623797059059143, -0.14408349990844727, -0.4783772826194763, -0.373183012008667, 0.26766467094421387, 0.08030042797327042, 0.23816049098968506, -0.06412079185247421, -0.09848767518997192, 0.030608290806412697, 0.11294644325971603, -0.25599098205566406, -0.05578719824552536, -0.4407341480255127, 0.007171453908085823, 0.21178580820560455, 0.12637656927108765, 0.21430258452892303, -0.09470637142658234, -0.08272820711135864, 0.1265946626663208, -0.05575760453939438, -0.11263579875230789, 0.044962022453546524, 0.15062780678272247, 0.046918757259845734, 0.19517195224761963, 0.17354387044906616, -0.45882362127304077, 0.2376367747783661, -0.26550623774528503, 0.17537608742713928, 0.4182690978050232, -0.045481324195861816, -0.34155726432800293, 0.07465758919715881, 0.49747514724731445, -0.17092390358448029, 0.1422317624092102, 0.12859423458576202, 0.1546492725610733, -0.22968026995658875, 0.18428702652454376, 0.12514764070510864, 0.1417403221130371, 0.23668622970581055, -0.11207864433526993, 0.22014395892620087, 0.038522038608789444, -0.15457120537757874, 0.0684717670083046, -0.0448022335767746, 0.24782316386699677, 0.26529592275619507, -0.07904449105262756, -0.029399584978818893, 0.033805303275585175, 0.06988371163606644, 0.21730965375900269, -0.2394903004169464, -0.11724893748760223, 0.2396283596754074, -0.029939375817775726, 0.11975628137588501, 0.501385509967804, 0.387614369392395, -0.37487393617630005, 0.0745420977473259, 0.0923808217048645, 0.5648558139801025, -0.26017630100250244, 0.04130970686674118, 0.13369520008563995, 0.05060681328177452, 0.0030419304966926575, 0.1490100771188736, -0.06330139935016632, 0.3891547620296478, 0.3070394992828369, -0.17135366797447205, 0.21597211062908173, 0.24081242084503174, -0.12086087465286255, -0.14976298809051514, -0.40510860085487366, 0.08635277301073074, 0.08172904700040817, 0.04258323833346367, 0.1304464340209961, -0.3192770183086395, -0.04760055989027023, -0.3641909658908844, -0.19654101133346558, -0.2249186635017395, -0.11324144899845123, -0.4139752686023712, -0.010649209842085838, -0.018116828054189682, -0.08793169260025024, -0.027367543429136276, -0.12374721467494965, 0.3569251596927643, -0.3851688504219055, 0.3071930706501007, 0.009147800505161285, 0.06227511912584305, 0.29900604486465454, -0.29941949248313904, 0.4684777557849884, 0.16412904858589172, -0.36845913529396057, 0.037796419113874435, 0.2732795476913452, -0.25389403104782104, 0.29971322417259216, 0.17128688097000122, 0.6783182621002197, 0.222746804356575, -0.0918964147567749, 0.06751569360494614, 0.03421475738286972, 0.07634919136762619, -0.3394200801849365, -0.023012835532426834, 0.06691811978816986, -0.133262038230896, 0.11456680297851562, 0.13749413192272186, -0.09449613094329834, 0.22364628314971924, 0.011741690337657928, 0.2606373727321625, -0.25720712542533875, -0.12003573030233383, -0.17192374169826508, -0.19954931735992432, -0.13376359641551971, 0.09174948930740356, -0.2527792751789093, -0.2110946625471115, 0.35246410965919495, -0.05091572925448418, 0.1831527054309845, 0.19918875396251678, 0.06721262633800507, -0.09606665372848511, 0.27137839794158936, 0.3381309509277344, -0.5006518959999084, -0.3073892295360565, 0.08907073736190796, -0.5300477743148804, 0.21790054440498352, -0.2879719138145447, -0.07918884605169296, -0.031629279255867004, 0.21626031398773193, -0.03532450646162033, -0.1100044995546341, 0.09238363057374954, -0.08695540577173233, -0.06845752894878387, -0.15444929897785187, -0.26337891817092896, -0.2788791358470917, -0.087815061211586, -0.2979597747325897, 0.27159151434898376, -0.5973243713378906, -0.04767138138413429, 0.10969887673854828, 0.06260467320680618, 0.08089611679315567, -0.0069348253309726715, 0.23120248317718506, 0.44211503863334656, 0.3236789107322693, -0.001400856301188469, 0.4533211290836334, 0.06917838007211685, -0.15781830251216888, -0.35559970140457153, -0.0512276366353035, -0.156731516122818, 0.05033527687191963, 0.12298177182674408, 0.23972415924072266, -0.6420228481292725, 0.08903671056032181, -0.23719558119773865, 0.24776995182037354, 0.06780725717544556, -0.07973416149616241, 0.09804759174585342, -0.023893317207694054, -0.3431893587112427, 0.19829495251178741, 0.23607483506202698, 0.2301774024963379, -0.06586264818906784, 0.3270435333251953, -0.19334697723388672, -0.15631496906280518, 0.4829874038696289, -0.13969314098358154, -0.3495694100856781, -0.22467701137065887, 0.4760475158691406, 0.05776984989643097, -0.04042286425828934, -0.19705072045326233, -0.08895687013864517, 0.18535330891609192, 0.07910521328449249, 0.06320065259933472, -0.1794750690460205, -0.2648894190788269, -0.24923738837242126, -0.013969497755169868, 0.20918026566505432, -0.31211450695991516, -0.31358838081359863, 0.03507344052195549, -0.20943908393383026 ]
https://github.com/huggingface/datasets/issues/1785
Not enough disk space (Needed: Unknown size) when caching on a cluster
That's an interesting behavior... Do you know any other way to get the free space that works in your case ? Also if it's a permission issue could you try fix the permissions and let mus know if that helped ?
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space?
41
Not enough disk space (Needed: Unknown size) when caching on a cluster I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space? That's an interesting behavior... Do you know any other way to get the free space that works in your case ? Also if it's a permission issue could you try fix the permissions and let mus know if that helped ?
[ -0.07774271070957184, -0.41871702671051025, -0.084621861577034, 0.2431602030992508, -0.09700989723205566, 0.15066057443618774, 0.07053462415933609, 0.3401210606098175, 0.3962354063987732, 0.39331597089767456, 0.4183928668498993, -0.13893157243728638, -0.09125030040740967, 0.003891667351126671, -0.1739584505558014, 0.24173220992088318, -0.008229836821556091, -0.06064525246620178, 0.34556707739830017, 0.1274869292974472, -0.40572863817214966, 0.013043487444519997, 0.09445026516914368, -0.3736138939857483, -0.5426243543624878, -0.1880916953086853, -0.16628047823905945, 0.15668568015098572, 0.2269616723060608, -0.22474358975887299, 0.3221062421798706, -0.005494996905326843, -0.10113952308893204, 0.5720781087875366, -0.00011594402167247608, 0.036312490701675415, 0.17152497172355652, -0.18090517818927765, -0.4399377405643463, -0.03869593143463135, 0.21730411052703857, -0.40692266821861267, -0.22335867583751678, -0.3619658052921295, -0.010309351608157158, 0.1603570431470871, -0.05118110775947571, -0.4436120092868805, 0.17652517557144165, -0.06918414682149887, 0.16796934604644775, 0.3530052602291107, -0.2203020304441452, -0.0926135927438736, -0.2659410834312439, 0.17672321200370789, -0.04691300168633461, 0.5180595517158508, 0.299263060092926, 0.075315460562706, -0.27873021364212036, 0.22080935537815094, -0.133325457572937, 0.16011619567871094, 0.4138149321079254, -0.1359979808330536, -0.07452750951051712, -0.18451358377933502, 0.1962379515171051, -0.02686726301908493, 0.4277343451976776, -0.1950325071811676, -0.5273442268371582, -0.5711027383804321, 0.050052523612976074, -0.15977191925048828, 0.4396585524082184, 0.03642542287707329, -0.4096872806549072, 0.12267166376113892, -0.301859587430954, -0.337260901927948, -0.20105183124542236, -0.20997731387615204, 0.053208932280540466, 0.16413024067878723, 0.001683688722550869, 0.08308522403240204, 0.32703298330307007, 0.01750127784907818, -0.025626003742218018, 0.02643648535013199, 0.17296092212200165, 0.25364184379577637, -0.28654634952545166, 0.015176162123680115, -0.09484115988016129, 0.2101237177848816, 0.10111940652132034, 0.21069864928722382, 0.06100566312670708, -0.1125408336520195, 0.07357309013605118, 0.25406673550605774, 0.013657990843057632, 0.24661196768283844, -0.2650676965713501, -0.09788823872804642, 0.2030569463968277, -0.0030459794215857983, 0.1735391467809677, -0.11331971734762192, 0.048171985894441605, -0.35080695152282715, 0.11620275676250458, -0.01808798313140869, 0.20401275157928467, -0.07148532569408417, -0.38218510150909424, 0.1272476613521576, 0.20500531792640686, 0.3049911856651306, 0.2122824490070343, 0.2848544418811798, 0.08105026185512543, 0.23997870087623596, 0.21884159743785858, 0.19945231080055237, -0.09023430198431015, -0.09682650864124298, -0.11598093062639236, -0.014706950634717941, 0.08853031694889069, 0.1693158596754074, 0.3448050618171692, 0.03677058219909668, 0.2115969955921173, -0.01790435053408146, 0.4590660333633423, -0.10544564574956894, -0.07217589020729065, -0.23526142537593842, -0.11916296929121017, 0.42335203289985657, 0.11977587640285492, 0.01175752840936184, 0.25198256969451904, 0.15005090832710266, -0.15103840827941895, 0.26779088377952576, -0.3836437463760376, -0.45535942912101746, 0.044019412249326706, 0.07246240973472595, -0.35284119844436646, 0.20111902058124542, -0.406609445810318, -0.03843996301293373, 0.3097243010997772, -0.18243928253650665, 0.10116452723741531, 0.09283821284770966, -0.38871026039123535, -0.24627067148685455, 0.13819460570812225, 0.3473316431045532, -0.11425130069255829, 0.003716699779033661, -0.31071728467941284, 0.16215555369853973, 0.05258791893720627, 0.41459566354751587, 0.13116253912448883, 0.13864412903785706, -0.4277251362800598, 0.13801047205924988, 0.11270679533481598, -0.3308422863483429, -0.541803240776062, 0.30612999200820923, -0.1718520224094391, 0.25160178542137146, 0.5377891063690186, 0.26144614815711975, -0.016332795843482018, -0.23369143903255463, 0.23278652131557465, 0.27145397663116455, -0.21969076991081238, 0.05634499341249466, -0.35332760214805603, -0.2634563446044922, 0.027872104197740555, 0.061429452151060104, 0.34540098905563354, 0.10856448113918304, 0.010947689414024353, -0.006002979353070259, 0.18187060952186584, 0.054979357868433, 0.20100553333759308, 0.31932348012924194, 0.3190515637397766, -0.3444594144821167, -0.07386574894189835, 0.021724484860897064, -0.5194780230522156, 0.3491624891757965, 0.19307182729244232, -0.21001490950584412, -0.06464970111846924, -0.4432949423789978, -0.28096306324005127, 0.06220823526382446, 0.2482939213514328, 0.3274293839931488, 0.0486467182636261, -0.037388384342193604, 0.24946674704551697, -0.30693548917770386, -0.05965017154812813, 0.16683034598827362, -0.2572433352470398, -0.057898327708244324, 0.10287646949291229, -0.037163566797971725, -0.04239146411418915, -0.14003950357437134, 0.049448393285274506, 0.06461072713136673, 0.06502678245306015, 0.1349683403968811, -0.014334900304675102, 0.41349127888679504, -0.10637472569942474, 0.22477206587791443, -0.09035142511129379, 0.13460005819797516, 0.15231342613697052, 0.35126134753227234, 0.0020519718527793884, 0.1752403825521469, 0.006946832872927189, -0.16976600885391235, -0.11104359477758408, 0.20959749817848206, -0.04556981846690178, 0.28535979986190796, -0.08265810459852219, 0.06405837833881378, 0.06243818998336792, 0.056038063019514084, 0.12377553433179855, -0.05928979441523552, 0.2901301681995392, -0.19665664434432983, 0.4879348874092102, 0.08131785690784454, 0.02284674346446991, -0.014420174062252045, 0.06943929195404053, 0.15922808647155762, 0.2913534641265869, 0.15650694072246552, 0.29709669947624207, -0.03452153876423836, -0.005879342555999756, 0.28174129128456116, 0.2664143443107605, 0.15600240230560303, 0.015309102833271027, -0.1753178834915161, 0.04518739506602287, -0.2055586874485016, 0.05281992256641388, -0.05030147731304169, 0.15801826119422913, 0.2922111451625824, 0.006730193737894297, -0.29641732573509216, 0.09604697674512863, -0.3090457618236542, 0.21551138162612915, 0.07729791849851608, -0.2874605655670166, -0.0579073503613472, 0.05577975511550903, 0.1828182339668274, 0.061594266444444656, 0.18895944952964783, -0.4589169919490814, -0.3148480951786041, 0.17463605105876923, 0.6444199681282043, -0.23739014565944672, -0.0952426940202713, -0.37296444177627563, 0.4732416272163391, 0.07805273681879044, -0.4257938861846924, -0.026563117280602455, -0.2685462534427643, -0.10555187612771988, 0.017070945352315903, 0.32546570897102356, -0.25782713294029236, 0.3435428738594055, 0.009413475170731544, 0.07134472578763962, -0.4250701665878296, 0.15812283754348755, -0.16978757083415985, 0.02674458920955658, 0.1604890376329422, -0.13076373934745789, 0.3355613946914673, -0.12210873514413834, -0.16110190749168396, 0.1600523144006729, -0.0386517271399498, -0.04174761101603508, 0.009187156334519386, 0.15706183016300201, 0.17532795667648315, -0.323263943195343, 0.03154074028134346, -0.17938263714313507, -0.5495164394378662, 0.17439031600952148, -0.18168389797210693, 0.271646648645401, 0.1036403700709343, 0.17338645458221436, -0.10494735091924667, 0.7099822759628296, -0.17317649722099304, -0.24961908161640167, -0.6116566061973572, 0.23829130828380585, -0.08035756647586823, -0.02955171838402748, -0.04717123880982399, 0.029628004878759384, 0.21220248937606812, 0.42421936988830566, -0.4782419800758362, -0.400262713432312, -0.16716623306274414, 0.22946718335151672, -0.2420353889465332, -0.032157257199287415, 0.17910374701023102, -0.14865458011627197, -0.07347260415554047, -0.14096394181251526, -0.028164424002170563, 0.052829064428806305, 0.009464403614401817, 0.2762107253074646, 0.292793869972229, 0.21926245093345642, 0.32078441977500916, 0.7062380313873291, -0.1594580113887787, 0.25005555152893066, 0.27551794052124023, 0.18174372613430023, 0.6162170767784119, 0.09052632004022598, -0.0536038801074028, 0.04009968787431717, 0.008074387907981873, -0.6150444149971008, 0.01897478848695755, -0.03327057883143425, 0.13807761669158936, -0.028210263699293137, -0.39497509598731995, 0.07973652333021164, -0.26900389790534973, 0.3064284026622772, -0.44076067209243774, 0.2631149888038635, -0.26249557733535767, 0.0036539360880851746, -0.36616992950439453, -0.08880208432674408, -0.027877965942025185, 0.09572452306747437, 0.5163894891738892, 0.19937045872211456, -0.25788187980651855, -0.26609110832214355, -0.5647938251495361, 0.3253157138824463, -0.006048521026968956, 0.12446128576993942, -0.31000816822052, 0.07452920824289322, -0.08088169991970062, 0.01012723334133625, 0.7869895696640015, -0.09053672850131989, 0.2198173701763153, 0.0822388082742691, 0.025765590369701385, -0.5359348058700562, -0.010849013924598694, 0.13685601949691772, 0.38045820593833923, -0.07196992635726929, 0.4385930597782135, -0.1767694354057312, 0.12497170269489288, -0.4394177794456482, 0.3606897294521332, -0.33069178462028503, -0.24158832430839539, -0.3854798972606659, -0.3814751207828522, -0.48330074548721313, 0.44739043712615967, 0.4565170407295227, 0.25278574228286743, -0.048352427780628204, 0.3299100697040558, -0.17026330530643463, -0.01496080495417118, 0.17365160584449768, -0.007580142468214035, 0.4432085454463959, -0.1366671472787857, 0.04138917848467827, 0.10192042589187622, -0.056578509509563446, 0.4277549982070923, 0.41325798630714417, 0.10969634354114532, 0.1532110869884491, 0.2755296230316162, 0.015611880458891392, 0.33395251631736755, 0.3349302113056183, -0.07208311557769775, 0.027241647243499756, 0.11594665795564651, 0.24569746851921082, -0.43921107053756714, -0.06493610143661499, -0.39375367760658264, -0.053410742431879044, -0.09026334434747696, -0.02069668099284172, 0.37267330288887024, 0.3526017665863037, 0.017791539430618286, 0.07021567970514297, 0.3179871439933777, -0.31271594762802124, 0.2607083320617676, -0.026027806103229523, 0.872586727142334, -0.08519591391086578, 0.0190444216132164, 0.0668715164065361, 0.3008270859718323, 0.3401432931423187, -0.4726657271385193, 0.3613077998161316, 0.04408494010567665, -0.2942006587982178, 0.032581523060798645, -0.012193415313959122, -0.021077431738376617, 0.2959337830543518, -0.16884513199329376, 0.401699423789978, -0.5068144798278809, 0.012194328010082245, -0.09541498869657516, 0.13655304908752441, -0.6846146583557129, -0.37429556250572205, -0.2389674186706543, 0.12068924307823181, -0.13779541850090027, 0.21029998362064362, -0.24510425329208374, 0.10865650326013565, 0.03371363505721092, -0.312885046005249, -0.36626607179641724, -0.17015394568443298, 0.026718057692050934, 0.3035687804222107, -0.17898529767990112, 0.02364327758550644, -0.08937288820743561, 0.13467729091644287, 0.21527770161628723, 0.3010424077510834, -0.1435466706752777, 0.10248011350631714, -0.15729209780693054, -0.05579762160778046, 0.06480653584003448, 0.07522264122962952, 0.11239749938249588, 0.001626182347536087, -0.3096863925457001, 0.15746495127677917, -0.25910359621047974, -0.4899292588233948, 0.029062524437904358, -0.043814174830913544, -0.29428917169570923, -0.03387326002120972, -0.2902984023094177, -0.456600546836853, -0.005463704466819763, -0.08768321573734283, 0.06650687009096146, 0.01917397603392601, -0.11894801259040833, 0.14763516187667847, 0.02352585643529892, -0.20440933108329773, 0.11642156541347504, 0.19072356820106506, 0.17154881358146667, -0.3462998569011688, 0.3859965205192566, -0.37319815158843994, -0.0873679667711258, -0.17369389533996582, -0.15040938556194305, -0.13429872691631317, 0.09508276730775833, 0.3430250883102417, -0.07940418273210526, -0.12857933342456818, -0.24275103211402893, -0.23101267218589783, 0.6502943634986877, 0.42623797059059143, -0.14408349990844727, -0.4783772826194763, -0.373183012008667, 0.26766467094421387, 0.08030042797327042, 0.23816049098968506, -0.06412079185247421, -0.09848767518997192, 0.030608290806412697, 0.11294644325971603, -0.25599098205566406, -0.05578719824552536, -0.4407341480255127, 0.007171453908085823, 0.21178580820560455, 0.12637656927108765, 0.21430258452892303, -0.09470637142658234, -0.08272820711135864, 0.1265946626663208, -0.05575760453939438, -0.11263579875230789, 0.044962022453546524, 0.15062780678272247, 0.046918757259845734, 0.19517195224761963, 0.17354387044906616, -0.45882362127304077, 0.2376367747783661, -0.26550623774528503, 0.17537608742713928, 0.4182690978050232, -0.045481324195861816, -0.34155726432800293, 0.07465758919715881, 0.49747514724731445, -0.17092390358448029, 0.1422317624092102, 0.12859423458576202, 0.1546492725610733, -0.22968026995658875, 0.18428702652454376, 0.12514764070510864, 0.1417403221130371, 0.23668622970581055, -0.11207864433526993, 0.22014395892620087, 0.038522038608789444, -0.15457120537757874, 0.0684717670083046, -0.0448022335767746, 0.24782316386699677, 0.26529592275619507, -0.07904449105262756, -0.029399584978818893, 0.033805303275585175, 0.06988371163606644, 0.21730965375900269, -0.2394903004169464, -0.11724893748760223, 0.2396283596754074, -0.029939375817775726, 0.11975628137588501, 0.501385509967804, 0.387614369392395, -0.37487393617630005, 0.0745420977473259, 0.0923808217048645, 0.5648558139801025, -0.26017630100250244, 0.04130970686674118, 0.13369520008563995, 0.05060681328177452, 0.0030419304966926575, 0.1490100771188736, -0.06330139935016632, 0.3891547620296478, 0.3070394992828369, -0.17135366797447205, 0.21597211062908173, 0.24081242084503174, -0.12086087465286255, -0.14976298809051514, -0.40510860085487366, 0.08635277301073074, 0.08172904700040817, 0.04258323833346367, 0.1304464340209961, -0.3192770183086395, -0.04760055989027023, -0.3641909658908844, -0.19654101133346558, -0.2249186635017395, -0.11324144899845123, -0.4139752686023712, -0.010649209842085838, -0.018116828054189682, -0.08793169260025024, -0.027367543429136276, -0.12374721467494965, 0.3569251596927643, -0.3851688504219055, 0.3071930706501007, 0.009147800505161285, 0.06227511912584305, 0.29900604486465454, -0.29941949248313904, 0.4684777557849884, 0.16412904858589172, -0.36845913529396057, 0.037796419113874435, 0.2732795476913452, -0.25389403104782104, 0.29971322417259216, 0.17128688097000122, 0.6783182621002197, 0.222746804356575, -0.0918964147567749, 0.06751569360494614, 0.03421475738286972, 0.07634919136762619, -0.3394200801849365, -0.023012835532426834, 0.06691811978816986, -0.133262038230896, 0.11456680297851562, 0.13749413192272186, -0.09449613094329834, 0.22364628314971924, 0.011741690337657928, 0.2606373727321625, -0.25720712542533875, -0.12003573030233383, -0.17192374169826508, -0.19954931735992432, -0.13376359641551971, 0.09174948930740356, -0.2527792751789093, -0.2110946625471115, 0.35246410965919495, -0.05091572925448418, 0.1831527054309845, 0.19918875396251678, 0.06721262633800507, -0.09606665372848511, 0.27137839794158936, 0.3381309509277344, -0.5006518959999084, -0.3073892295360565, 0.08907073736190796, -0.5300477743148804, 0.21790054440498352, -0.2879719138145447, -0.07918884605169296, -0.031629279255867004, 0.21626031398773193, -0.03532450646162033, -0.1100044995546341, 0.09238363057374954, -0.08695540577173233, -0.06845752894878387, -0.15444929897785187, -0.26337891817092896, -0.2788791358470917, -0.087815061211586, -0.2979597747325897, 0.27159151434898376, -0.5973243713378906, -0.04767138138413429, 0.10969887673854828, 0.06260467320680618, 0.08089611679315567, -0.0069348253309726715, 0.23120248317718506, 0.44211503863334656, 0.3236789107322693, -0.001400856301188469, 0.4533211290836334, 0.06917838007211685, -0.15781830251216888, -0.35559970140457153, -0.0512276366353035, -0.156731516122818, 0.05033527687191963, 0.12298177182674408, 0.23972415924072266, -0.6420228481292725, 0.08903671056032181, -0.23719558119773865, 0.24776995182037354, 0.06780725717544556, -0.07973416149616241, 0.09804759174585342, -0.023893317207694054, -0.3431893587112427, 0.19829495251178741, 0.23607483506202698, 0.2301774024963379, -0.06586264818906784, 0.3270435333251953, -0.19334697723388672, -0.15631496906280518, 0.4829874038696289, -0.13969314098358154, -0.3495694100856781, -0.22467701137065887, 0.4760475158691406, 0.05776984989643097, -0.04042286425828934, -0.19705072045326233, -0.08895687013864517, 0.18535330891609192, 0.07910521328449249, 0.06320065259933472, -0.1794750690460205, -0.2648894190788269, -0.24923738837242126, -0.013969497755169868, 0.20918026566505432, -0.31211450695991516, -0.31358838081359863, 0.03507344052195549, -0.20943908393383026 ]
https://github.com/huggingface/datasets/issues/1785
Not enough disk space (Needed: Unknown size) when caching on a cluster
I think its an issue on the clusters end (unclear exactly why -- maybe something with docker containers?), will close the issue
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space?
22
Not enough disk space (Needed: Unknown size) when caching on a cluster I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space? I think its an issue on the clusters end (unclear exactly why -- maybe something with docker containers?), will close the issue
[ -0.07774271070957184, -0.41871702671051025, -0.084621861577034, 0.2431602030992508, -0.09700989723205566, 0.15066057443618774, 0.07053462415933609, 0.3401210606098175, 0.3962354063987732, 0.39331597089767456, 0.4183928668498993, -0.13893157243728638, -0.09125030040740967, 0.003891667351126671, -0.1739584505558014, 0.24173220992088318, -0.008229836821556091, -0.06064525246620178, 0.34556707739830017, 0.1274869292974472, -0.40572863817214966, 0.013043487444519997, 0.09445026516914368, -0.3736138939857483, -0.5426243543624878, -0.1880916953086853, -0.16628047823905945, 0.15668568015098572, 0.2269616723060608, -0.22474358975887299, 0.3221062421798706, -0.005494996905326843, -0.10113952308893204, 0.5720781087875366, -0.00011594402167247608, 0.036312490701675415, 0.17152497172355652, -0.18090517818927765, -0.4399377405643463, -0.03869593143463135, 0.21730411052703857, -0.40692266821861267, -0.22335867583751678, -0.3619658052921295, -0.010309351608157158, 0.1603570431470871, -0.05118110775947571, -0.4436120092868805, 0.17652517557144165, -0.06918414682149887, 0.16796934604644775, 0.3530052602291107, -0.2203020304441452, -0.0926135927438736, -0.2659410834312439, 0.17672321200370789, -0.04691300168633461, 0.5180595517158508, 0.299263060092926, 0.075315460562706, -0.27873021364212036, 0.22080935537815094, -0.133325457572937, 0.16011619567871094, 0.4138149321079254, -0.1359979808330536, -0.07452750951051712, -0.18451358377933502, 0.1962379515171051, -0.02686726301908493, 0.4277343451976776, -0.1950325071811676, -0.5273442268371582, -0.5711027383804321, 0.050052523612976074, -0.15977191925048828, 0.4396585524082184, 0.03642542287707329, -0.4096872806549072, 0.12267166376113892, -0.301859587430954, -0.337260901927948, -0.20105183124542236, -0.20997731387615204, 0.053208932280540466, 0.16413024067878723, 0.001683688722550869, 0.08308522403240204, 0.32703298330307007, 0.01750127784907818, -0.025626003742218018, 0.02643648535013199, 0.17296092212200165, 0.25364184379577637, -0.28654634952545166, 0.015176162123680115, -0.09484115988016129, 0.2101237177848816, 0.10111940652132034, 0.21069864928722382, 0.06100566312670708, -0.1125408336520195, 0.07357309013605118, 0.25406673550605774, 0.013657990843057632, 0.24661196768283844, -0.2650676965713501, -0.09788823872804642, 0.2030569463968277, -0.0030459794215857983, 0.1735391467809677, -0.11331971734762192, 0.048171985894441605, -0.35080695152282715, 0.11620275676250458, -0.01808798313140869, 0.20401275157928467, -0.07148532569408417, -0.38218510150909424, 0.1272476613521576, 0.20500531792640686, 0.3049911856651306, 0.2122824490070343, 0.2848544418811798, 0.08105026185512543, 0.23997870087623596, 0.21884159743785858, 0.19945231080055237, -0.09023430198431015, -0.09682650864124298, -0.11598093062639236, -0.014706950634717941, 0.08853031694889069, 0.1693158596754074, 0.3448050618171692, 0.03677058219909668, 0.2115969955921173, -0.01790435053408146, 0.4590660333633423, -0.10544564574956894, -0.07217589020729065, -0.23526142537593842, -0.11916296929121017, 0.42335203289985657, 0.11977587640285492, 0.01175752840936184, 0.25198256969451904, 0.15005090832710266, -0.15103840827941895, 0.26779088377952576, -0.3836437463760376, -0.45535942912101746, 0.044019412249326706, 0.07246240973472595, -0.35284119844436646, 0.20111902058124542, -0.406609445810318, -0.03843996301293373, 0.3097243010997772, -0.18243928253650665, 0.10116452723741531, 0.09283821284770966, -0.38871026039123535, -0.24627067148685455, 0.13819460570812225, 0.3473316431045532, -0.11425130069255829, 0.003716699779033661, -0.31071728467941284, 0.16215555369853973, 0.05258791893720627, 0.41459566354751587, 0.13116253912448883, 0.13864412903785706, -0.4277251362800598, 0.13801047205924988, 0.11270679533481598, -0.3308422863483429, -0.541803240776062, 0.30612999200820923, -0.1718520224094391, 0.25160178542137146, 0.5377891063690186, 0.26144614815711975, -0.016332795843482018, -0.23369143903255463, 0.23278652131557465, 0.27145397663116455, -0.21969076991081238, 0.05634499341249466, -0.35332760214805603, -0.2634563446044922, 0.027872104197740555, 0.061429452151060104, 0.34540098905563354, 0.10856448113918304, 0.010947689414024353, -0.006002979353070259, 0.18187060952186584, 0.054979357868433, 0.20100553333759308, 0.31932348012924194, 0.3190515637397766, -0.3444594144821167, -0.07386574894189835, 0.021724484860897064, -0.5194780230522156, 0.3491624891757965, 0.19307182729244232, -0.21001490950584412, -0.06464970111846924, -0.4432949423789978, -0.28096306324005127, 0.06220823526382446, 0.2482939213514328, 0.3274293839931488, 0.0486467182636261, -0.037388384342193604, 0.24946674704551697, -0.30693548917770386, -0.05965017154812813, 0.16683034598827362, -0.2572433352470398, -0.057898327708244324, 0.10287646949291229, -0.037163566797971725, -0.04239146411418915, -0.14003950357437134, 0.049448393285274506, 0.06461072713136673, 0.06502678245306015, 0.1349683403968811, -0.014334900304675102, 0.41349127888679504, -0.10637472569942474, 0.22477206587791443, -0.09035142511129379, 0.13460005819797516, 0.15231342613697052, 0.35126134753227234, 0.0020519718527793884, 0.1752403825521469, 0.006946832872927189, -0.16976600885391235, -0.11104359477758408, 0.20959749817848206, -0.04556981846690178, 0.28535979986190796, -0.08265810459852219, 0.06405837833881378, 0.06243818998336792, 0.056038063019514084, 0.12377553433179855, -0.05928979441523552, 0.2901301681995392, -0.19665664434432983, 0.4879348874092102, 0.08131785690784454, 0.02284674346446991, -0.014420174062252045, 0.06943929195404053, 0.15922808647155762, 0.2913534641265869, 0.15650694072246552, 0.29709669947624207, -0.03452153876423836, -0.005879342555999756, 0.28174129128456116, 0.2664143443107605, 0.15600240230560303, 0.015309102833271027, -0.1753178834915161, 0.04518739506602287, -0.2055586874485016, 0.05281992256641388, -0.05030147731304169, 0.15801826119422913, 0.2922111451625824, 0.006730193737894297, -0.29641732573509216, 0.09604697674512863, -0.3090457618236542, 0.21551138162612915, 0.07729791849851608, -0.2874605655670166, -0.0579073503613472, 0.05577975511550903, 0.1828182339668274, 0.061594266444444656, 0.18895944952964783, -0.4589169919490814, -0.3148480951786041, 0.17463605105876923, 0.6444199681282043, -0.23739014565944672, -0.0952426940202713, -0.37296444177627563, 0.4732416272163391, 0.07805273681879044, -0.4257938861846924, -0.026563117280602455, -0.2685462534427643, -0.10555187612771988, 0.017070945352315903, 0.32546570897102356, -0.25782713294029236, 0.3435428738594055, 0.009413475170731544, 0.07134472578763962, -0.4250701665878296, 0.15812283754348755, -0.16978757083415985, 0.02674458920955658, 0.1604890376329422, -0.13076373934745789, 0.3355613946914673, -0.12210873514413834, -0.16110190749168396, 0.1600523144006729, -0.0386517271399498, -0.04174761101603508, 0.009187156334519386, 0.15706183016300201, 0.17532795667648315, -0.323263943195343, 0.03154074028134346, -0.17938263714313507, -0.5495164394378662, 0.17439031600952148, -0.18168389797210693, 0.271646648645401, 0.1036403700709343, 0.17338645458221436, -0.10494735091924667, 0.7099822759628296, -0.17317649722099304, -0.24961908161640167, -0.6116566061973572, 0.23829130828380585, -0.08035756647586823, -0.02955171838402748, -0.04717123880982399, 0.029628004878759384, 0.21220248937606812, 0.42421936988830566, -0.4782419800758362, -0.400262713432312, -0.16716623306274414, 0.22946718335151672, -0.2420353889465332, -0.032157257199287415, 0.17910374701023102, -0.14865458011627197, -0.07347260415554047, -0.14096394181251526, -0.028164424002170563, 0.052829064428806305, 0.009464403614401817, 0.2762107253074646, 0.292793869972229, 0.21926245093345642, 0.32078441977500916, 0.7062380313873291, -0.1594580113887787, 0.25005555152893066, 0.27551794052124023, 0.18174372613430023, 0.6162170767784119, 0.09052632004022598, -0.0536038801074028, 0.04009968787431717, 0.008074387907981873, -0.6150444149971008, 0.01897478848695755, -0.03327057883143425, 0.13807761669158936, -0.028210263699293137, -0.39497509598731995, 0.07973652333021164, -0.26900389790534973, 0.3064284026622772, -0.44076067209243774, 0.2631149888038635, -0.26249557733535767, 0.0036539360880851746, -0.36616992950439453, -0.08880208432674408, -0.027877965942025185, 0.09572452306747437, 0.5163894891738892, 0.19937045872211456, -0.25788187980651855, -0.26609110832214355, -0.5647938251495361, 0.3253157138824463, -0.006048521026968956, 0.12446128576993942, -0.31000816822052, 0.07452920824289322, -0.08088169991970062, 0.01012723334133625, 0.7869895696640015, -0.09053672850131989, 0.2198173701763153, 0.0822388082742691, 0.025765590369701385, -0.5359348058700562, -0.010849013924598694, 0.13685601949691772, 0.38045820593833923, -0.07196992635726929, 0.4385930597782135, -0.1767694354057312, 0.12497170269489288, -0.4394177794456482, 0.3606897294521332, -0.33069178462028503, -0.24158832430839539, -0.3854798972606659, -0.3814751207828522, -0.48330074548721313, 0.44739043712615967, 0.4565170407295227, 0.25278574228286743, -0.048352427780628204, 0.3299100697040558, -0.17026330530643463, -0.01496080495417118, 0.17365160584449768, -0.007580142468214035, 0.4432085454463959, -0.1366671472787857, 0.04138917848467827, 0.10192042589187622, -0.056578509509563446, 0.4277549982070923, 0.41325798630714417, 0.10969634354114532, 0.1532110869884491, 0.2755296230316162, 0.015611880458891392, 0.33395251631736755, 0.3349302113056183, -0.07208311557769775, 0.027241647243499756, 0.11594665795564651, 0.24569746851921082, -0.43921107053756714, -0.06493610143661499, -0.39375367760658264, -0.053410742431879044, -0.09026334434747696, -0.02069668099284172, 0.37267330288887024, 0.3526017665863037, 0.017791539430618286, 0.07021567970514297, 0.3179871439933777, -0.31271594762802124, 0.2607083320617676, -0.026027806103229523, 0.872586727142334, -0.08519591391086578, 0.0190444216132164, 0.0668715164065361, 0.3008270859718323, 0.3401432931423187, -0.4726657271385193, 0.3613077998161316, 0.04408494010567665, -0.2942006587982178, 0.032581523060798645, -0.012193415313959122, -0.021077431738376617, 0.2959337830543518, -0.16884513199329376, 0.401699423789978, -0.5068144798278809, 0.012194328010082245, -0.09541498869657516, 0.13655304908752441, -0.6846146583557129, -0.37429556250572205, -0.2389674186706543, 0.12068924307823181, -0.13779541850090027, 0.21029998362064362, -0.24510425329208374, 0.10865650326013565, 0.03371363505721092, -0.312885046005249, -0.36626607179641724, -0.17015394568443298, 0.026718057692050934, 0.3035687804222107, -0.17898529767990112, 0.02364327758550644, -0.08937288820743561, 0.13467729091644287, 0.21527770161628723, 0.3010424077510834, -0.1435466706752777, 0.10248011350631714, -0.15729209780693054, -0.05579762160778046, 0.06480653584003448, 0.07522264122962952, 0.11239749938249588, 0.001626182347536087, -0.3096863925457001, 0.15746495127677917, -0.25910359621047974, -0.4899292588233948, 0.029062524437904358, -0.043814174830913544, -0.29428917169570923, -0.03387326002120972, -0.2902984023094177, -0.456600546836853, -0.005463704466819763, -0.08768321573734283, 0.06650687009096146, 0.01917397603392601, -0.11894801259040833, 0.14763516187667847, 0.02352585643529892, -0.20440933108329773, 0.11642156541347504, 0.19072356820106506, 0.17154881358146667, -0.3462998569011688, 0.3859965205192566, -0.37319815158843994, -0.0873679667711258, -0.17369389533996582, -0.15040938556194305, -0.13429872691631317, 0.09508276730775833, 0.3430250883102417, -0.07940418273210526, -0.12857933342456818, -0.24275103211402893, -0.23101267218589783, 0.6502943634986877, 0.42623797059059143, -0.14408349990844727, -0.4783772826194763, -0.373183012008667, 0.26766467094421387, 0.08030042797327042, 0.23816049098968506, -0.06412079185247421, -0.09848767518997192, 0.030608290806412697, 0.11294644325971603, -0.25599098205566406, -0.05578719824552536, -0.4407341480255127, 0.007171453908085823, 0.21178580820560455, 0.12637656927108765, 0.21430258452892303, -0.09470637142658234, -0.08272820711135864, 0.1265946626663208, -0.05575760453939438, -0.11263579875230789, 0.044962022453546524, 0.15062780678272247, 0.046918757259845734, 0.19517195224761963, 0.17354387044906616, -0.45882362127304077, 0.2376367747783661, -0.26550623774528503, 0.17537608742713928, 0.4182690978050232, -0.045481324195861816, -0.34155726432800293, 0.07465758919715881, 0.49747514724731445, -0.17092390358448029, 0.1422317624092102, 0.12859423458576202, 0.1546492725610733, -0.22968026995658875, 0.18428702652454376, 0.12514764070510864, 0.1417403221130371, 0.23668622970581055, -0.11207864433526993, 0.22014395892620087, 0.038522038608789444, -0.15457120537757874, 0.0684717670083046, -0.0448022335767746, 0.24782316386699677, 0.26529592275619507, -0.07904449105262756, -0.029399584978818893, 0.033805303275585175, 0.06988371163606644, 0.21730965375900269, -0.2394903004169464, -0.11724893748760223, 0.2396283596754074, -0.029939375817775726, 0.11975628137588501, 0.501385509967804, 0.387614369392395, -0.37487393617630005, 0.0745420977473259, 0.0923808217048645, 0.5648558139801025, -0.26017630100250244, 0.04130970686674118, 0.13369520008563995, 0.05060681328177452, 0.0030419304966926575, 0.1490100771188736, -0.06330139935016632, 0.3891547620296478, 0.3070394992828369, -0.17135366797447205, 0.21597211062908173, 0.24081242084503174, -0.12086087465286255, -0.14976298809051514, -0.40510860085487366, 0.08635277301073074, 0.08172904700040817, 0.04258323833346367, 0.1304464340209961, -0.3192770183086395, -0.04760055989027023, -0.3641909658908844, -0.19654101133346558, -0.2249186635017395, -0.11324144899845123, -0.4139752686023712, -0.010649209842085838, -0.018116828054189682, -0.08793169260025024, -0.027367543429136276, -0.12374721467494965, 0.3569251596927643, -0.3851688504219055, 0.3071930706501007, 0.009147800505161285, 0.06227511912584305, 0.29900604486465454, -0.29941949248313904, 0.4684777557849884, 0.16412904858589172, -0.36845913529396057, 0.037796419113874435, 0.2732795476913452, -0.25389403104782104, 0.29971322417259216, 0.17128688097000122, 0.6783182621002197, 0.222746804356575, -0.0918964147567749, 0.06751569360494614, 0.03421475738286972, 0.07634919136762619, -0.3394200801849365, -0.023012835532426834, 0.06691811978816986, -0.133262038230896, 0.11456680297851562, 0.13749413192272186, -0.09449613094329834, 0.22364628314971924, 0.011741690337657928, 0.2606373727321625, -0.25720712542533875, -0.12003573030233383, -0.17192374169826508, -0.19954931735992432, -0.13376359641551971, 0.09174948930740356, -0.2527792751789093, -0.2110946625471115, 0.35246410965919495, -0.05091572925448418, 0.1831527054309845, 0.19918875396251678, 0.06721262633800507, -0.09606665372848511, 0.27137839794158936, 0.3381309509277344, -0.5006518959999084, -0.3073892295360565, 0.08907073736190796, -0.5300477743148804, 0.21790054440498352, -0.2879719138145447, -0.07918884605169296, -0.031629279255867004, 0.21626031398773193, -0.03532450646162033, -0.1100044995546341, 0.09238363057374954, -0.08695540577173233, -0.06845752894878387, -0.15444929897785187, -0.26337891817092896, -0.2788791358470917, -0.087815061211586, -0.2979597747325897, 0.27159151434898376, -0.5973243713378906, -0.04767138138413429, 0.10969887673854828, 0.06260467320680618, 0.08089611679315567, -0.0069348253309726715, 0.23120248317718506, 0.44211503863334656, 0.3236789107322693, -0.001400856301188469, 0.4533211290836334, 0.06917838007211685, -0.15781830251216888, -0.35559970140457153, -0.0512276366353035, -0.156731516122818, 0.05033527687191963, 0.12298177182674408, 0.23972415924072266, -0.6420228481292725, 0.08903671056032181, -0.23719558119773865, 0.24776995182037354, 0.06780725717544556, -0.07973416149616241, 0.09804759174585342, -0.023893317207694054, -0.3431893587112427, 0.19829495251178741, 0.23607483506202698, 0.2301774024963379, -0.06586264818906784, 0.3270435333251953, -0.19334697723388672, -0.15631496906280518, 0.4829874038696289, -0.13969314098358154, -0.3495694100856781, -0.22467701137065887, 0.4760475158691406, 0.05776984989643097, -0.04042286425828934, -0.19705072045326233, -0.08895687013864517, 0.18535330891609192, 0.07910521328449249, 0.06320065259933472, -0.1794750690460205, -0.2648894190788269, -0.24923738837242126, -0.013969497755169868, 0.20918026566505432, -0.31211450695991516, -0.31358838081359863, 0.03507344052195549, -0.20943908393383026 ]
https://github.com/huggingface/datasets/issues/1785
Not enough disk space (Needed: Unknown size) when caching on a cluster
@philippnoah I had fixed it with a small hack where I patched `has_sufficient_disk_space` to always return `True`. you can do that with an import without having to modify the `datasets` package
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space?
31
Not enough disk space (Needed: Unknown size) when caching on a cluster I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space? @philippnoah I had fixed it with a small hack where I patched `has_sufficient_disk_space` to always return `True`. you can do that with an import without having to modify the `datasets` package
[ -0.07774271070957184, -0.41871702671051025, -0.084621861577034, 0.2431602030992508, -0.09700989723205566, 0.15066057443618774, 0.07053462415933609, 0.3401210606098175, 0.3962354063987732, 0.39331597089767456, 0.4183928668498993, -0.13893157243728638, -0.09125030040740967, 0.003891667351126671, -0.1739584505558014, 0.24173220992088318, -0.008229836821556091, -0.06064525246620178, 0.34556707739830017, 0.1274869292974472, -0.40572863817214966, 0.013043487444519997, 0.09445026516914368, -0.3736138939857483, -0.5426243543624878, -0.1880916953086853, -0.16628047823905945, 0.15668568015098572, 0.2269616723060608, -0.22474358975887299, 0.3221062421798706, -0.005494996905326843, -0.10113952308893204, 0.5720781087875366, -0.00011594402167247608, 0.036312490701675415, 0.17152497172355652, -0.18090517818927765, -0.4399377405643463, -0.03869593143463135, 0.21730411052703857, -0.40692266821861267, -0.22335867583751678, -0.3619658052921295, -0.010309351608157158, 0.1603570431470871, -0.05118110775947571, -0.4436120092868805, 0.17652517557144165, -0.06918414682149887, 0.16796934604644775, 0.3530052602291107, -0.2203020304441452, -0.0926135927438736, -0.2659410834312439, 0.17672321200370789, -0.04691300168633461, 0.5180595517158508, 0.299263060092926, 0.075315460562706, -0.27873021364212036, 0.22080935537815094, -0.133325457572937, 0.16011619567871094, 0.4138149321079254, -0.1359979808330536, -0.07452750951051712, -0.18451358377933502, 0.1962379515171051, -0.02686726301908493, 0.4277343451976776, -0.1950325071811676, -0.5273442268371582, -0.5711027383804321, 0.050052523612976074, -0.15977191925048828, 0.4396585524082184, 0.03642542287707329, -0.4096872806549072, 0.12267166376113892, -0.301859587430954, -0.337260901927948, -0.20105183124542236, -0.20997731387615204, 0.053208932280540466, 0.16413024067878723, 0.001683688722550869, 0.08308522403240204, 0.32703298330307007, 0.01750127784907818, -0.025626003742218018, 0.02643648535013199, 0.17296092212200165, 0.25364184379577637, -0.28654634952545166, 0.015176162123680115, -0.09484115988016129, 0.2101237177848816, 0.10111940652132034, 0.21069864928722382, 0.06100566312670708, -0.1125408336520195, 0.07357309013605118, 0.25406673550605774, 0.013657990843057632, 0.24661196768283844, -0.2650676965713501, -0.09788823872804642, 0.2030569463968277, -0.0030459794215857983, 0.1735391467809677, -0.11331971734762192, 0.048171985894441605, -0.35080695152282715, 0.11620275676250458, -0.01808798313140869, 0.20401275157928467, -0.07148532569408417, -0.38218510150909424, 0.1272476613521576, 0.20500531792640686, 0.3049911856651306, 0.2122824490070343, 0.2848544418811798, 0.08105026185512543, 0.23997870087623596, 0.21884159743785858, 0.19945231080055237, -0.09023430198431015, -0.09682650864124298, -0.11598093062639236, -0.014706950634717941, 0.08853031694889069, 0.1693158596754074, 0.3448050618171692, 0.03677058219909668, 0.2115969955921173, -0.01790435053408146, 0.4590660333633423, -0.10544564574956894, -0.07217589020729065, -0.23526142537593842, -0.11916296929121017, 0.42335203289985657, 0.11977587640285492, 0.01175752840936184, 0.25198256969451904, 0.15005090832710266, -0.15103840827941895, 0.26779088377952576, -0.3836437463760376, -0.45535942912101746, 0.044019412249326706, 0.07246240973472595, -0.35284119844436646, 0.20111902058124542, -0.406609445810318, -0.03843996301293373, 0.3097243010997772, -0.18243928253650665, 0.10116452723741531, 0.09283821284770966, -0.38871026039123535, -0.24627067148685455, 0.13819460570812225, 0.3473316431045532, -0.11425130069255829, 0.003716699779033661, -0.31071728467941284, 0.16215555369853973, 0.05258791893720627, 0.41459566354751587, 0.13116253912448883, 0.13864412903785706, -0.4277251362800598, 0.13801047205924988, 0.11270679533481598, -0.3308422863483429, -0.541803240776062, 0.30612999200820923, -0.1718520224094391, 0.25160178542137146, 0.5377891063690186, 0.26144614815711975, -0.016332795843482018, -0.23369143903255463, 0.23278652131557465, 0.27145397663116455, -0.21969076991081238, 0.05634499341249466, -0.35332760214805603, -0.2634563446044922, 0.027872104197740555, 0.061429452151060104, 0.34540098905563354, 0.10856448113918304, 0.010947689414024353, -0.006002979353070259, 0.18187060952186584, 0.054979357868433, 0.20100553333759308, 0.31932348012924194, 0.3190515637397766, -0.3444594144821167, -0.07386574894189835, 0.021724484860897064, -0.5194780230522156, 0.3491624891757965, 0.19307182729244232, -0.21001490950584412, -0.06464970111846924, -0.4432949423789978, -0.28096306324005127, 0.06220823526382446, 0.2482939213514328, 0.3274293839931488, 0.0486467182636261, -0.037388384342193604, 0.24946674704551697, -0.30693548917770386, -0.05965017154812813, 0.16683034598827362, -0.2572433352470398, -0.057898327708244324, 0.10287646949291229, -0.037163566797971725, -0.04239146411418915, -0.14003950357437134, 0.049448393285274506, 0.06461072713136673, 0.06502678245306015, 0.1349683403968811, -0.014334900304675102, 0.41349127888679504, -0.10637472569942474, 0.22477206587791443, -0.09035142511129379, 0.13460005819797516, 0.15231342613697052, 0.35126134753227234, 0.0020519718527793884, 0.1752403825521469, 0.006946832872927189, -0.16976600885391235, -0.11104359477758408, 0.20959749817848206, -0.04556981846690178, 0.28535979986190796, -0.08265810459852219, 0.06405837833881378, 0.06243818998336792, 0.056038063019514084, 0.12377553433179855, -0.05928979441523552, 0.2901301681995392, -0.19665664434432983, 0.4879348874092102, 0.08131785690784454, 0.02284674346446991, -0.014420174062252045, 0.06943929195404053, 0.15922808647155762, 0.2913534641265869, 0.15650694072246552, 0.29709669947624207, -0.03452153876423836, -0.005879342555999756, 0.28174129128456116, 0.2664143443107605, 0.15600240230560303, 0.015309102833271027, -0.1753178834915161, 0.04518739506602287, -0.2055586874485016, 0.05281992256641388, -0.05030147731304169, 0.15801826119422913, 0.2922111451625824, 0.006730193737894297, -0.29641732573509216, 0.09604697674512863, -0.3090457618236542, 0.21551138162612915, 0.07729791849851608, -0.2874605655670166, -0.0579073503613472, 0.05577975511550903, 0.1828182339668274, 0.061594266444444656, 0.18895944952964783, -0.4589169919490814, -0.3148480951786041, 0.17463605105876923, 0.6444199681282043, -0.23739014565944672, -0.0952426940202713, -0.37296444177627563, 0.4732416272163391, 0.07805273681879044, -0.4257938861846924, -0.026563117280602455, -0.2685462534427643, -0.10555187612771988, 0.017070945352315903, 0.32546570897102356, -0.25782713294029236, 0.3435428738594055, 0.009413475170731544, 0.07134472578763962, -0.4250701665878296, 0.15812283754348755, -0.16978757083415985, 0.02674458920955658, 0.1604890376329422, -0.13076373934745789, 0.3355613946914673, -0.12210873514413834, -0.16110190749168396, 0.1600523144006729, -0.0386517271399498, -0.04174761101603508, 0.009187156334519386, 0.15706183016300201, 0.17532795667648315, -0.323263943195343, 0.03154074028134346, -0.17938263714313507, -0.5495164394378662, 0.17439031600952148, -0.18168389797210693, 0.271646648645401, 0.1036403700709343, 0.17338645458221436, -0.10494735091924667, 0.7099822759628296, -0.17317649722099304, -0.24961908161640167, -0.6116566061973572, 0.23829130828380585, -0.08035756647586823, -0.02955171838402748, -0.04717123880982399, 0.029628004878759384, 0.21220248937606812, 0.42421936988830566, -0.4782419800758362, -0.400262713432312, -0.16716623306274414, 0.22946718335151672, -0.2420353889465332, -0.032157257199287415, 0.17910374701023102, -0.14865458011627197, -0.07347260415554047, -0.14096394181251526, -0.028164424002170563, 0.052829064428806305, 0.009464403614401817, 0.2762107253074646, 0.292793869972229, 0.21926245093345642, 0.32078441977500916, 0.7062380313873291, -0.1594580113887787, 0.25005555152893066, 0.27551794052124023, 0.18174372613430023, 0.6162170767784119, 0.09052632004022598, -0.0536038801074028, 0.04009968787431717, 0.008074387907981873, -0.6150444149971008, 0.01897478848695755, -0.03327057883143425, 0.13807761669158936, -0.028210263699293137, -0.39497509598731995, 0.07973652333021164, -0.26900389790534973, 0.3064284026622772, -0.44076067209243774, 0.2631149888038635, -0.26249557733535767, 0.0036539360880851746, -0.36616992950439453, -0.08880208432674408, -0.027877965942025185, 0.09572452306747437, 0.5163894891738892, 0.19937045872211456, -0.25788187980651855, -0.26609110832214355, -0.5647938251495361, 0.3253157138824463, -0.006048521026968956, 0.12446128576993942, -0.31000816822052, 0.07452920824289322, -0.08088169991970062, 0.01012723334133625, 0.7869895696640015, -0.09053672850131989, 0.2198173701763153, 0.0822388082742691, 0.025765590369701385, -0.5359348058700562, -0.010849013924598694, 0.13685601949691772, 0.38045820593833923, -0.07196992635726929, 0.4385930597782135, -0.1767694354057312, 0.12497170269489288, -0.4394177794456482, 0.3606897294521332, -0.33069178462028503, -0.24158832430839539, -0.3854798972606659, -0.3814751207828522, -0.48330074548721313, 0.44739043712615967, 0.4565170407295227, 0.25278574228286743, -0.048352427780628204, 0.3299100697040558, -0.17026330530643463, -0.01496080495417118, 0.17365160584449768, -0.007580142468214035, 0.4432085454463959, -0.1366671472787857, 0.04138917848467827, 0.10192042589187622, -0.056578509509563446, 0.4277549982070923, 0.41325798630714417, 0.10969634354114532, 0.1532110869884491, 0.2755296230316162, 0.015611880458891392, 0.33395251631736755, 0.3349302113056183, -0.07208311557769775, 0.027241647243499756, 0.11594665795564651, 0.24569746851921082, -0.43921107053756714, -0.06493610143661499, -0.39375367760658264, -0.053410742431879044, -0.09026334434747696, -0.02069668099284172, 0.37267330288887024, 0.3526017665863037, 0.017791539430618286, 0.07021567970514297, 0.3179871439933777, -0.31271594762802124, 0.2607083320617676, -0.026027806103229523, 0.872586727142334, -0.08519591391086578, 0.0190444216132164, 0.0668715164065361, 0.3008270859718323, 0.3401432931423187, -0.4726657271385193, 0.3613077998161316, 0.04408494010567665, -0.2942006587982178, 0.032581523060798645, -0.012193415313959122, -0.021077431738376617, 0.2959337830543518, -0.16884513199329376, 0.401699423789978, -0.5068144798278809, 0.012194328010082245, -0.09541498869657516, 0.13655304908752441, -0.6846146583557129, -0.37429556250572205, -0.2389674186706543, 0.12068924307823181, -0.13779541850090027, 0.21029998362064362, -0.24510425329208374, 0.10865650326013565, 0.03371363505721092, -0.312885046005249, -0.36626607179641724, -0.17015394568443298, 0.026718057692050934, 0.3035687804222107, -0.17898529767990112, 0.02364327758550644, -0.08937288820743561, 0.13467729091644287, 0.21527770161628723, 0.3010424077510834, -0.1435466706752777, 0.10248011350631714, -0.15729209780693054, -0.05579762160778046, 0.06480653584003448, 0.07522264122962952, 0.11239749938249588, 0.001626182347536087, -0.3096863925457001, 0.15746495127677917, -0.25910359621047974, -0.4899292588233948, 0.029062524437904358, -0.043814174830913544, -0.29428917169570923, -0.03387326002120972, -0.2902984023094177, -0.456600546836853, -0.005463704466819763, -0.08768321573734283, 0.06650687009096146, 0.01917397603392601, -0.11894801259040833, 0.14763516187667847, 0.02352585643529892, -0.20440933108329773, 0.11642156541347504, 0.19072356820106506, 0.17154881358146667, -0.3462998569011688, 0.3859965205192566, -0.37319815158843994, -0.0873679667711258, -0.17369389533996582, -0.15040938556194305, -0.13429872691631317, 0.09508276730775833, 0.3430250883102417, -0.07940418273210526, -0.12857933342456818, -0.24275103211402893, -0.23101267218589783, 0.6502943634986877, 0.42623797059059143, -0.14408349990844727, -0.4783772826194763, -0.373183012008667, 0.26766467094421387, 0.08030042797327042, 0.23816049098968506, -0.06412079185247421, -0.09848767518997192, 0.030608290806412697, 0.11294644325971603, -0.25599098205566406, -0.05578719824552536, -0.4407341480255127, 0.007171453908085823, 0.21178580820560455, 0.12637656927108765, 0.21430258452892303, -0.09470637142658234, -0.08272820711135864, 0.1265946626663208, -0.05575760453939438, -0.11263579875230789, 0.044962022453546524, 0.15062780678272247, 0.046918757259845734, 0.19517195224761963, 0.17354387044906616, -0.45882362127304077, 0.2376367747783661, -0.26550623774528503, 0.17537608742713928, 0.4182690978050232, -0.045481324195861816, -0.34155726432800293, 0.07465758919715881, 0.49747514724731445, -0.17092390358448029, 0.1422317624092102, 0.12859423458576202, 0.1546492725610733, -0.22968026995658875, 0.18428702652454376, 0.12514764070510864, 0.1417403221130371, 0.23668622970581055, -0.11207864433526993, 0.22014395892620087, 0.038522038608789444, -0.15457120537757874, 0.0684717670083046, -0.0448022335767746, 0.24782316386699677, 0.26529592275619507, -0.07904449105262756, -0.029399584978818893, 0.033805303275585175, 0.06988371163606644, 0.21730965375900269, -0.2394903004169464, -0.11724893748760223, 0.2396283596754074, -0.029939375817775726, 0.11975628137588501, 0.501385509967804, 0.387614369392395, -0.37487393617630005, 0.0745420977473259, 0.0923808217048645, 0.5648558139801025, -0.26017630100250244, 0.04130970686674118, 0.13369520008563995, 0.05060681328177452, 0.0030419304966926575, 0.1490100771188736, -0.06330139935016632, 0.3891547620296478, 0.3070394992828369, -0.17135366797447205, 0.21597211062908173, 0.24081242084503174, -0.12086087465286255, -0.14976298809051514, -0.40510860085487366, 0.08635277301073074, 0.08172904700040817, 0.04258323833346367, 0.1304464340209961, -0.3192770183086395, -0.04760055989027023, -0.3641909658908844, -0.19654101133346558, -0.2249186635017395, -0.11324144899845123, -0.4139752686023712, -0.010649209842085838, -0.018116828054189682, -0.08793169260025024, -0.027367543429136276, -0.12374721467494965, 0.3569251596927643, -0.3851688504219055, 0.3071930706501007, 0.009147800505161285, 0.06227511912584305, 0.29900604486465454, -0.29941949248313904, 0.4684777557849884, 0.16412904858589172, -0.36845913529396057, 0.037796419113874435, 0.2732795476913452, -0.25389403104782104, 0.29971322417259216, 0.17128688097000122, 0.6783182621002197, 0.222746804356575, -0.0918964147567749, 0.06751569360494614, 0.03421475738286972, 0.07634919136762619, -0.3394200801849365, -0.023012835532426834, 0.06691811978816986, -0.133262038230896, 0.11456680297851562, 0.13749413192272186, -0.09449613094329834, 0.22364628314971924, 0.011741690337657928, 0.2606373727321625, -0.25720712542533875, -0.12003573030233383, -0.17192374169826508, -0.19954931735992432, -0.13376359641551971, 0.09174948930740356, -0.2527792751789093, -0.2110946625471115, 0.35246410965919495, -0.05091572925448418, 0.1831527054309845, 0.19918875396251678, 0.06721262633800507, -0.09606665372848511, 0.27137839794158936, 0.3381309509277344, -0.5006518959999084, -0.3073892295360565, 0.08907073736190796, -0.5300477743148804, 0.21790054440498352, -0.2879719138145447, -0.07918884605169296, -0.031629279255867004, 0.21626031398773193, -0.03532450646162033, -0.1100044995546341, 0.09238363057374954, -0.08695540577173233, -0.06845752894878387, -0.15444929897785187, -0.26337891817092896, -0.2788791358470917, -0.087815061211586, -0.2979597747325897, 0.27159151434898376, -0.5973243713378906, -0.04767138138413429, 0.10969887673854828, 0.06260467320680618, 0.08089611679315567, -0.0069348253309726715, 0.23120248317718506, 0.44211503863334656, 0.3236789107322693, -0.001400856301188469, 0.4533211290836334, 0.06917838007211685, -0.15781830251216888, -0.35559970140457153, -0.0512276366353035, -0.156731516122818, 0.05033527687191963, 0.12298177182674408, 0.23972415924072266, -0.6420228481292725, 0.08903671056032181, -0.23719558119773865, 0.24776995182037354, 0.06780725717544556, -0.07973416149616241, 0.09804759174585342, -0.023893317207694054, -0.3431893587112427, 0.19829495251178741, 0.23607483506202698, 0.2301774024963379, -0.06586264818906784, 0.3270435333251953, -0.19334697723388672, -0.15631496906280518, 0.4829874038696289, -0.13969314098358154, -0.3495694100856781, -0.22467701137065887, 0.4760475158691406, 0.05776984989643097, -0.04042286425828934, -0.19705072045326233, -0.08895687013864517, 0.18535330891609192, 0.07910521328449249, 0.06320065259933472, -0.1794750690460205, -0.2648894190788269, -0.24923738837242126, -0.013969497755169868, 0.20918026566505432, -0.31211450695991516, -0.31358838081359863, 0.03507344052195549, -0.20943908393383026 ]
https://github.com/huggingface/datasets/issues/1785
Not enough disk space (Needed: Unknown size) when caching on a cluster
@olinguyen Thanks for the suggestion, it works but I had to to edit builder.py in the installed package. Can you please explain how were you able to do this using import?
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space?
31
Not enough disk space (Needed: Unknown size) when caching on a cluster I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space? @olinguyen Thanks for the suggestion, it works but I had to to edit builder.py in the installed package. Can you please explain how were you able to do this using import?
[ -0.07774271070957184, -0.41871702671051025, -0.084621861577034, 0.2431602030992508, -0.09700989723205566, 0.15066057443618774, 0.07053462415933609, 0.3401210606098175, 0.3962354063987732, 0.39331597089767456, 0.4183928668498993, -0.13893157243728638, -0.09125030040740967, 0.003891667351126671, -0.1739584505558014, 0.24173220992088318, -0.008229836821556091, -0.06064525246620178, 0.34556707739830017, 0.1274869292974472, -0.40572863817214966, 0.013043487444519997, 0.09445026516914368, -0.3736138939857483, -0.5426243543624878, -0.1880916953086853, -0.16628047823905945, 0.15668568015098572, 0.2269616723060608, -0.22474358975887299, 0.3221062421798706, -0.005494996905326843, -0.10113952308893204, 0.5720781087875366, -0.00011594402167247608, 0.036312490701675415, 0.17152497172355652, -0.18090517818927765, -0.4399377405643463, -0.03869593143463135, 0.21730411052703857, -0.40692266821861267, -0.22335867583751678, -0.3619658052921295, -0.010309351608157158, 0.1603570431470871, -0.05118110775947571, -0.4436120092868805, 0.17652517557144165, -0.06918414682149887, 0.16796934604644775, 0.3530052602291107, -0.2203020304441452, -0.0926135927438736, -0.2659410834312439, 0.17672321200370789, -0.04691300168633461, 0.5180595517158508, 0.299263060092926, 0.075315460562706, -0.27873021364212036, 0.22080935537815094, -0.133325457572937, 0.16011619567871094, 0.4138149321079254, -0.1359979808330536, -0.07452750951051712, -0.18451358377933502, 0.1962379515171051, -0.02686726301908493, 0.4277343451976776, -0.1950325071811676, -0.5273442268371582, -0.5711027383804321, 0.050052523612976074, -0.15977191925048828, 0.4396585524082184, 0.03642542287707329, -0.4096872806549072, 0.12267166376113892, -0.301859587430954, -0.337260901927948, -0.20105183124542236, -0.20997731387615204, 0.053208932280540466, 0.16413024067878723, 0.001683688722550869, 0.08308522403240204, 0.32703298330307007, 0.01750127784907818, -0.025626003742218018, 0.02643648535013199, 0.17296092212200165, 0.25364184379577637, -0.28654634952545166, 0.015176162123680115, -0.09484115988016129, 0.2101237177848816, 0.10111940652132034, 0.21069864928722382, 0.06100566312670708, -0.1125408336520195, 0.07357309013605118, 0.25406673550605774, 0.013657990843057632, 0.24661196768283844, -0.2650676965713501, -0.09788823872804642, 0.2030569463968277, -0.0030459794215857983, 0.1735391467809677, -0.11331971734762192, 0.048171985894441605, -0.35080695152282715, 0.11620275676250458, -0.01808798313140869, 0.20401275157928467, -0.07148532569408417, -0.38218510150909424, 0.1272476613521576, 0.20500531792640686, 0.3049911856651306, 0.2122824490070343, 0.2848544418811798, 0.08105026185512543, 0.23997870087623596, 0.21884159743785858, 0.19945231080055237, -0.09023430198431015, -0.09682650864124298, -0.11598093062639236, -0.014706950634717941, 0.08853031694889069, 0.1693158596754074, 0.3448050618171692, 0.03677058219909668, 0.2115969955921173, -0.01790435053408146, 0.4590660333633423, -0.10544564574956894, -0.07217589020729065, -0.23526142537593842, -0.11916296929121017, 0.42335203289985657, 0.11977587640285492, 0.01175752840936184, 0.25198256969451904, 0.15005090832710266, -0.15103840827941895, 0.26779088377952576, -0.3836437463760376, -0.45535942912101746, 0.044019412249326706, 0.07246240973472595, -0.35284119844436646, 0.20111902058124542, -0.406609445810318, -0.03843996301293373, 0.3097243010997772, -0.18243928253650665, 0.10116452723741531, 0.09283821284770966, -0.38871026039123535, -0.24627067148685455, 0.13819460570812225, 0.3473316431045532, -0.11425130069255829, 0.003716699779033661, -0.31071728467941284, 0.16215555369853973, 0.05258791893720627, 0.41459566354751587, 0.13116253912448883, 0.13864412903785706, -0.4277251362800598, 0.13801047205924988, 0.11270679533481598, -0.3308422863483429, -0.541803240776062, 0.30612999200820923, -0.1718520224094391, 0.25160178542137146, 0.5377891063690186, 0.26144614815711975, -0.016332795843482018, -0.23369143903255463, 0.23278652131557465, 0.27145397663116455, -0.21969076991081238, 0.05634499341249466, -0.35332760214805603, -0.2634563446044922, 0.027872104197740555, 0.061429452151060104, 0.34540098905563354, 0.10856448113918304, 0.010947689414024353, -0.006002979353070259, 0.18187060952186584, 0.054979357868433, 0.20100553333759308, 0.31932348012924194, 0.3190515637397766, -0.3444594144821167, -0.07386574894189835, 0.021724484860897064, -0.5194780230522156, 0.3491624891757965, 0.19307182729244232, -0.21001490950584412, -0.06464970111846924, -0.4432949423789978, -0.28096306324005127, 0.06220823526382446, 0.2482939213514328, 0.3274293839931488, 0.0486467182636261, -0.037388384342193604, 0.24946674704551697, -0.30693548917770386, -0.05965017154812813, 0.16683034598827362, -0.2572433352470398, -0.057898327708244324, 0.10287646949291229, -0.037163566797971725, -0.04239146411418915, -0.14003950357437134, 0.049448393285274506, 0.06461072713136673, 0.06502678245306015, 0.1349683403968811, -0.014334900304675102, 0.41349127888679504, -0.10637472569942474, 0.22477206587791443, -0.09035142511129379, 0.13460005819797516, 0.15231342613697052, 0.35126134753227234, 0.0020519718527793884, 0.1752403825521469, 0.006946832872927189, -0.16976600885391235, -0.11104359477758408, 0.20959749817848206, -0.04556981846690178, 0.28535979986190796, -0.08265810459852219, 0.06405837833881378, 0.06243818998336792, 0.056038063019514084, 0.12377553433179855, -0.05928979441523552, 0.2901301681995392, -0.19665664434432983, 0.4879348874092102, 0.08131785690784454, 0.02284674346446991, -0.014420174062252045, 0.06943929195404053, 0.15922808647155762, 0.2913534641265869, 0.15650694072246552, 0.29709669947624207, -0.03452153876423836, -0.005879342555999756, 0.28174129128456116, 0.2664143443107605, 0.15600240230560303, 0.015309102833271027, -0.1753178834915161, 0.04518739506602287, -0.2055586874485016, 0.05281992256641388, -0.05030147731304169, 0.15801826119422913, 0.2922111451625824, 0.006730193737894297, -0.29641732573509216, 0.09604697674512863, -0.3090457618236542, 0.21551138162612915, 0.07729791849851608, -0.2874605655670166, -0.0579073503613472, 0.05577975511550903, 0.1828182339668274, 0.061594266444444656, 0.18895944952964783, -0.4589169919490814, -0.3148480951786041, 0.17463605105876923, 0.6444199681282043, -0.23739014565944672, -0.0952426940202713, -0.37296444177627563, 0.4732416272163391, 0.07805273681879044, -0.4257938861846924, -0.026563117280602455, -0.2685462534427643, -0.10555187612771988, 0.017070945352315903, 0.32546570897102356, -0.25782713294029236, 0.3435428738594055, 0.009413475170731544, 0.07134472578763962, -0.4250701665878296, 0.15812283754348755, -0.16978757083415985, 0.02674458920955658, 0.1604890376329422, -0.13076373934745789, 0.3355613946914673, -0.12210873514413834, -0.16110190749168396, 0.1600523144006729, -0.0386517271399498, -0.04174761101603508, 0.009187156334519386, 0.15706183016300201, 0.17532795667648315, -0.323263943195343, 0.03154074028134346, -0.17938263714313507, -0.5495164394378662, 0.17439031600952148, -0.18168389797210693, 0.271646648645401, 0.1036403700709343, 0.17338645458221436, -0.10494735091924667, 0.7099822759628296, -0.17317649722099304, -0.24961908161640167, -0.6116566061973572, 0.23829130828380585, -0.08035756647586823, -0.02955171838402748, -0.04717123880982399, 0.029628004878759384, 0.21220248937606812, 0.42421936988830566, -0.4782419800758362, -0.400262713432312, -0.16716623306274414, 0.22946718335151672, -0.2420353889465332, -0.032157257199287415, 0.17910374701023102, -0.14865458011627197, -0.07347260415554047, -0.14096394181251526, -0.028164424002170563, 0.052829064428806305, 0.009464403614401817, 0.2762107253074646, 0.292793869972229, 0.21926245093345642, 0.32078441977500916, 0.7062380313873291, -0.1594580113887787, 0.25005555152893066, 0.27551794052124023, 0.18174372613430023, 0.6162170767784119, 0.09052632004022598, -0.0536038801074028, 0.04009968787431717, 0.008074387907981873, -0.6150444149971008, 0.01897478848695755, -0.03327057883143425, 0.13807761669158936, -0.028210263699293137, -0.39497509598731995, 0.07973652333021164, -0.26900389790534973, 0.3064284026622772, -0.44076067209243774, 0.2631149888038635, -0.26249557733535767, 0.0036539360880851746, -0.36616992950439453, -0.08880208432674408, -0.027877965942025185, 0.09572452306747437, 0.5163894891738892, 0.19937045872211456, -0.25788187980651855, -0.26609110832214355, -0.5647938251495361, 0.3253157138824463, -0.006048521026968956, 0.12446128576993942, -0.31000816822052, 0.07452920824289322, -0.08088169991970062, 0.01012723334133625, 0.7869895696640015, -0.09053672850131989, 0.2198173701763153, 0.0822388082742691, 0.025765590369701385, -0.5359348058700562, -0.010849013924598694, 0.13685601949691772, 0.38045820593833923, -0.07196992635726929, 0.4385930597782135, -0.1767694354057312, 0.12497170269489288, -0.4394177794456482, 0.3606897294521332, -0.33069178462028503, -0.24158832430839539, -0.3854798972606659, -0.3814751207828522, -0.48330074548721313, 0.44739043712615967, 0.4565170407295227, 0.25278574228286743, -0.048352427780628204, 0.3299100697040558, -0.17026330530643463, -0.01496080495417118, 0.17365160584449768, -0.007580142468214035, 0.4432085454463959, -0.1366671472787857, 0.04138917848467827, 0.10192042589187622, -0.056578509509563446, 0.4277549982070923, 0.41325798630714417, 0.10969634354114532, 0.1532110869884491, 0.2755296230316162, 0.015611880458891392, 0.33395251631736755, 0.3349302113056183, -0.07208311557769775, 0.027241647243499756, 0.11594665795564651, 0.24569746851921082, -0.43921107053756714, -0.06493610143661499, -0.39375367760658264, -0.053410742431879044, -0.09026334434747696, -0.02069668099284172, 0.37267330288887024, 0.3526017665863037, 0.017791539430618286, 0.07021567970514297, 0.3179871439933777, -0.31271594762802124, 0.2607083320617676, -0.026027806103229523, 0.872586727142334, -0.08519591391086578, 0.0190444216132164, 0.0668715164065361, 0.3008270859718323, 0.3401432931423187, -0.4726657271385193, 0.3613077998161316, 0.04408494010567665, -0.2942006587982178, 0.032581523060798645, -0.012193415313959122, -0.021077431738376617, 0.2959337830543518, -0.16884513199329376, 0.401699423789978, -0.5068144798278809, 0.012194328010082245, -0.09541498869657516, 0.13655304908752441, -0.6846146583557129, -0.37429556250572205, -0.2389674186706543, 0.12068924307823181, -0.13779541850090027, 0.21029998362064362, -0.24510425329208374, 0.10865650326013565, 0.03371363505721092, -0.312885046005249, -0.36626607179641724, -0.17015394568443298, 0.026718057692050934, 0.3035687804222107, -0.17898529767990112, 0.02364327758550644, -0.08937288820743561, 0.13467729091644287, 0.21527770161628723, 0.3010424077510834, -0.1435466706752777, 0.10248011350631714, -0.15729209780693054, -0.05579762160778046, 0.06480653584003448, 0.07522264122962952, 0.11239749938249588, 0.001626182347536087, -0.3096863925457001, 0.15746495127677917, -0.25910359621047974, -0.4899292588233948, 0.029062524437904358, -0.043814174830913544, -0.29428917169570923, -0.03387326002120972, -0.2902984023094177, -0.456600546836853, -0.005463704466819763, -0.08768321573734283, 0.06650687009096146, 0.01917397603392601, -0.11894801259040833, 0.14763516187667847, 0.02352585643529892, -0.20440933108329773, 0.11642156541347504, 0.19072356820106506, 0.17154881358146667, -0.3462998569011688, 0.3859965205192566, -0.37319815158843994, -0.0873679667711258, -0.17369389533996582, -0.15040938556194305, -0.13429872691631317, 0.09508276730775833, 0.3430250883102417, -0.07940418273210526, -0.12857933342456818, -0.24275103211402893, -0.23101267218589783, 0.6502943634986877, 0.42623797059059143, -0.14408349990844727, -0.4783772826194763, -0.373183012008667, 0.26766467094421387, 0.08030042797327042, 0.23816049098968506, -0.06412079185247421, -0.09848767518997192, 0.030608290806412697, 0.11294644325971603, -0.25599098205566406, -0.05578719824552536, -0.4407341480255127, 0.007171453908085823, 0.21178580820560455, 0.12637656927108765, 0.21430258452892303, -0.09470637142658234, -0.08272820711135864, 0.1265946626663208, -0.05575760453939438, -0.11263579875230789, 0.044962022453546524, 0.15062780678272247, 0.046918757259845734, 0.19517195224761963, 0.17354387044906616, -0.45882362127304077, 0.2376367747783661, -0.26550623774528503, 0.17537608742713928, 0.4182690978050232, -0.045481324195861816, -0.34155726432800293, 0.07465758919715881, 0.49747514724731445, -0.17092390358448029, 0.1422317624092102, 0.12859423458576202, 0.1546492725610733, -0.22968026995658875, 0.18428702652454376, 0.12514764070510864, 0.1417403221130371, 0.23668622970581055, -0.11207864433526993, 0.22014395892620087, 0.038522038608789444, -0.15457120537757874, 0.0684717670083046, -0.0448022335767746, 0.24782316386699677, 0.26529592275619507, -0.07904449105262756, -0.029399584978818893, 0.033805303275585175, 0.06988371163606644, 0.21730965375900269, -0.2394903004169464, -0.11724893748760223, 0.2396283596754074, -0.029939375817775726, 0.11975628137588501, 0.501385509967804, 0.387614369392395, -0.37487393617630005, 0.0745420977473259, 0.0923808217048645, 0.5648558139801025, -0.26017630100250244, 0.04130970686674118, 0.13369520008563995, 0.05060681328177452, 0.0030419304966926575, 0.1490100771188736, -0.06330139935016632, 0.3891547620296478, 0.3070394992828369, -0.17135366797447205, 0.21597211062908173, 0.24081242084503174, -0.12086087465286255, -0.14976298809051514, -0.40510860085487366, 0.08635277301073074, 0.08172904700040817, 0.04258323833346367, 0.1304464340209961, -0.3192770183086395, -0.04760055989027023, -0.3641909658908844, -0.19654101133346558, -0.2249186635017395, -0.11324144899845123, -0.4139752686023712, -0.010649209842085838, -0.018116828054189682, -0.08793169260025024, -0.027367543429136276, -0.12374721467494965, 0.3569251596927643, -0.3851688504219055, 0.3071930706501007, 0.009147800505161285, 0.06227511912584305, 0.29900604486465454, -0.29941949248313904, 0.4684777557849884, 0.16412904858589172, -0.36845913529396057, 0.037796419113874435, 0.2732795476913452, -0.25389403104782104, 0.29971322417259216, 0.17128688097000122, 0.6783182621002197, 0.222746804356575, -0.0918964147567749, 0.06751569360494614, 0.03421475738286972, 0.07634919136762619, -0.3394200801849365, -0.023012835532426834, 0.06691811978816986, -0.133262038230896, 0.11456680297851562, 0.13749413192272186, -0.09449613094329834, 0.22364628314971924, 0.011741690337657928, 0.2606373727321625, -0.25720712542533875, -0.12003573030233383, -0.17192374169826508, -0.19954931735992432, -0.13376359641551971, 0.09174948930740356, -0.2527792751789093, -0.2110946625471115, 0.35246410965919495, -0.05091572925448418, 0.1831527054309845, 0.19918875396251678, 0.06721262633800507, -0.09606665372848511, 0.27137839794158936, 0.3381309509277344, -0.5006518959999084, -0.3073892295360565, 0.08907073736190796, -0.5300477743148804, 0.21790054440498352, -0.2879719138145447, -0.07918884605169296, -0.031629279255867004, 0.21626031398773193, -0.03532450646162033, -0.1100044995546341, 0.09238363057374954, -0.08695540577173233, -0.06845752894878387, -0.15444929897785187, -0.26337891817092896, -0.2788791358470917, -0.087815061211586, -0.2979597747325897, 0.27159151434898376, -0.5973243713378906, -0.04767138138413429, 0.10969887673854828, 0.06260467320680618, 0.08089611679315567, -0.0069348253309726715, 0.23120248317718506, 0.44211503863334656, 0.3236789107322693, -0.001400856301188469, 0.4533211290836334, 0.06917838007211685, -0.15781830251216888, -0.35559970140457153, -0.0512276366353035, -0.156731516122818, 0.05033527687191963, 0.12298177182674408, 0.23972415924072266, -0.6420228481292725, 0.08903671056032181, -0.23719558119773865, 0.24776995182037354, 0.06780725717544556, -0.07973416149616241, 0.09804759174585342, -0.023893317207694054, -0.3431893587112427, 0.19829495251178741, 0.23607483506202698, 0.2301774024963379, -0.06586264818906784, 0.3270435333251953, -0.19334697723388672, -0.15631496906280518, 0.4829874038696289, -0.13969314098358154, -0.3495694100856781, -0.22467701137065887, 0.4760475158691406, 0.05776984989643097, -0.04042286425828934, -0.19705072045326233, -0.08895687013864517, 0.18535330891609192, 0.07910521328449249, 0.06320065259933472, -0.1794750690460205, -0.2648894190788269, -0.24923738837242126, -0.013969497755169868, 0.20918026566505432, -0.31211450695991516, -0.31358838081359863, 0.03507344052195549, -0.20943908393383026 ]
https://github.com/huggingface/datasets/issues/1785
Not enough disk space (Needed: Unknown size) when caching on a cluster
I was able to patch the builder code in my notebook before the load data call and it works. ``` import datasets datasets.builder.has_sufficient_disk_space = lambda needed_bytes, directory='.': True ```
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space?
29
Not enough disk space (Needed: Unknown size) when caching on a cluster I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk. The exact error thrown: ```bash >>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path") OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size) ``` [`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk). This is exactly where the error gets thrown: https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502 ```python if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root): raise IOError( "Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format( utils.size_str(self.info.size_in_bytes or 0), utils.size_str(self.info.download_size or 0), utils.size_str(self.info.dataset_size or 0), utils.size_str(self.info.post_processing_size or 0), ) ) ``` What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal. Would it be possible to pass a flag to skip this check on disk space? I was able to patch the builder code in my notebook before the load data call and it works. ``` import datasets datasets.builder.has_sufficient_disk_space = lambda needed_bytes, directory='.': True ```
[ -0.07774271070957184, -0.41871702671051025, -0.084621861577034, 0.2431602030992508, -0.09700989723205566, 0.15066057443618774, 0.07053462415933609, 0.3401210606098175, 0.3962354063987732, 0.39331597089767456, 0.4183928668498993, -0.13893157243728638, -0.09125030040740967, 0.003891667351126671, -0.1739584505558014, 0.24173220992088318, -0.008229836821556091, -0.06064525246620178, 0.34556707739830017, 0.1274869292974472, -0.40572863817214966, 0.013043487444519997, 0.09445026516914368, -0.3736138939857483, -0.5426243543624878, -0.1880916953086853, -0.16628047823905945, 0.15668568015098572, 0.2269616723060608, -0.22474358975887299, 0.3221062421798706, -0.005494996905326843, -0.10113952308893204, 0.5720781087875366, -0.00011594402167247608, 0.036312490701675415, 0.17152497172355652, -0.18090517818927765, -0.4399377405643463, -0.03869593143463135, 0.21730411052703857, -0.40692266821861267, -0.22335867583751678, -0.3619658052921295, -0.010309351608157158, 0.1603570431470871, -0.05118110775947571, -0.4436120092868805, 0.17652517557144165, -0.06918414682149887, 0.16796934604644775, 0.3530052602291107, -0.2203020304441452, -0.0926135927438736, -0.2659410834312439, 0.17672321200370789, -0.04691300168633461, 0.5180595517158508, 0.299263060092926, 0.075315460562706, -0.27873021364212036, 0.22080935537815094, -0.133325457572937, 0.16011619567871094, 0.4138149321079254, -0.1359979808330536, -0.07452750951051712, -0.18451358377933502, 0.1962379515171051, -0.02686726301908493, 0.4277343451976776, -0.1950325071811676, -0.5273442268371582, -0.5711027383804321, 0.050052523612976074, -0.15977191925048828, 0.4396585524082184, 0.03642542287707329, -0.4096872806549072, 0.12267166376113892, -0.301859587430954, -0.337260901927948, -0.20105183124542236, -0.20997731387615204, 0.053208932280540466, 0.16413024067878723, 0.001683688722550869, 0.08308522403240204, 0.32703298330307007, 0.01750127784907818, -0.025626003742218018, 0.02643648535013199, 0.17296092212200165, 0.25364184379577637, -0.28654634952545166, 0.015176162123680115, -0.09484115988016129, 0.2101237177848816, 0.10111940652132034, 0.21069864928722382, 0.06100566312670708, -0.1125408336520195, 0.07357309013605118, 0.25406673550605774, 0.013657990843057632, 0.24661196768283844, -0.2650676965713501, -0.09788823872804642, 0.2030569463968277, -0.0030459794215857983, 0.1735391467809677, -0.11331971734762192, 0.048171985894441605, -0.35080695152282715, 0.11620275676250458, -0.01808798313140869, 0.20401275157928467, -0.07148532569408417, -0.38218510150909424, 0.1272476613521576, 0.20500531792640686, 0.3049911856651306, 0.2122824490070343, 0.2848544418811798, 0.08105026185512543, 0.23997870087623596, 0.21884159743785858, 0.19945231080055237, -0.09023430198431015, -0.09682650864124298, -0.11598093062639236, -0.014706950634717941, 0.08853031694889069, 0.1693158596754074, 0.3448050618171692, 0.03677058219909668, 0.2115969955921173, -0.01790435053408146, 0.4590660333633423, -0.10544564574956894, -0.07217589020729065, -0.23526142537593842, -0.11916296929121017, 0.42335203289985657, 0.11977587640285492, 0.01175752840936184, 0.25198256969451904, 0.15005090832710266, -0.15103840827941895, 0.26779088377952576, -0.3836437463760376, -0.45535942912101746, 0.044019412249326706, 0.07246240973472595, -0.35284119844436646, 0.20111902058124542, -0.406609445810318, -0.03843996301293373, 0.3097243010997772, -0.18243928253650665, 0.10116452723741531, 0.09283821284770966, -0.38871026039123535, -0.24627067148685455, 0.13819460570812225, 0.3473316431045532, -0.11425130069255829, 0.003716699779033661, -0.31071728467941284, 0.16215555369853973, 0.05258791893720627, 0.41459566354751587, 0.13116253912448883, 0.13864412903785706, -0.4277251362800598, 0.13801047205924988, 0.11270679533481598, -0.3308422863483429, -0.541803240776062, 0.30612999200820923, -0.1718520224094391, 0.25160178542137146, 0.5377891063690186, 0.26144614815711975, -0.016332795843482018, -0.23369143903255463, 0.23278652131557465, 0.27145397663116455, -0.21969076991081238, 0.05634499341249466, -0.35332760214805603, -0.2634563446044922, 0.027872104197740555, 0.061429452151060104, 0.34540098905563354, 0.10856448113918304, 0.010947689414024353, -0.006002979353070259, 0.18187060952186584, 0.054979357868433, 0.20100553333759308, 0.31932348012924194, 0.3190515637397766, -0.3444594144821167, -0.07386574894189835, 0.021724484860897064, -0.5194780230522156, 0.3491624891757965, 0.19307182729244232, -0.21001490950584412, -0.06464970111846924, -0.4432949423789978, -0.28096306324005127, 0.06220823526382446, 0.2482939213514328, 0.3274293839931488, 0.0486467182636261, -0.037388384342193604, 0.24946674704551697, -0.30693548917770386, -0.05965017154812813, 0.16683034598827362, -0.2572433352470398, -0.057898327708244324, 0.10287646949291229, -0.037163566797971725, -0.04239146411418915, -0.14003950357437134, 0.049448393285274506, 0.06461072713136673, 0.06502678245306015, 0.1349683403968811, -0.014334900304675102, 0.41349127888679504, -0.10637472569942474, 0.22477206587791443, -0.09035142511129379, 0.13460005819797516, 0.15231342613697052, 0.35126134753227234, 0.0020519718527793884, 0.1752403825521469, 0.006946832872927189, -0.16976600885391235, -0.11104359477758408, 0.20959749817848206, -0.04556981846690178, 0.28535979986190796, -0.08265810459852219, 0.06405837833881378, 0.06243818998336792, 0.056038063019514084, 0.12377553433179855, -0.05928979441523552, 0.2901301681995392, -0.19665664434432983, 0.4879348874092102, 0.08131785690784454, 0.02284674346446991, -0.014420174062252045, 0.06943929195404053, 0.15922808647155762, 0.2913534641265869, 0.15650694072246552, 0.29709669947624207, -0.03452153876423836, -0.005879342555999756, 0.28174129128456116, 0.2664143443107605, 0.15600240230560303, 0.015309102833271027, -0.1753178834915161, 0.04518739506602287, -0.2055586874485016, 0.05281992256641388, -0.05030147731304169, 0.15801826119422913, 0.2922111451625824, 0.006730193737894297, -0.29641732573509216, 0.09604697674512863, -0.3090457618236542, 0.21551138162612915, 0.07729791849851608, -0.2874605655670166, -0.0579073503613472, 0.05577975511550903, 0.1828182339668274, 0.061594266444444656, 0.18895944952964783, -0.4589169919490814, -0.3148480951786041, 0.17463605105876923, 0.6444199681282043, -0.23739014565944672, -0.0952426940202713, -0.37296444177627563, 0.4732416272163391, 0.07805273681879044, -0.4257938861846924, -0.026563117280602455, -0.2685462534427643, -0.10555187612771988, 0.017070945352315903, 0.32546570897102356, -0.25782713294029236, 0.3435428738594055, 0.009413475170731544, 0.07134472578763962, -0.4250701665878296, 0.15812283754348755, -0.16978757083415985, 0.02674458920955658, 0.1604890376329422, -0.13076373934745789, 0.3355613946914673, -0.12210873514413834, -0.16110190749168396, 0.1600523144006729, -0.0386517271399498, -0.04174761101603508, 0.009187156334519386, 0.15706183016300201, 0.17532795667648315, -0.323263943195343, 0.03154074028134346, -0.17938263714313507, -0.5495164394378662, 0.17439031600952148, -0.18168389797210693, 0.271646648645401, 0.1036403700709343, 0.17338645458221436, -0.10494735091924667, 0.7099822759628296, -0.17317649722099304, -0.24961908161640167, -0.6116566061973572, 0.23829130828380585, -0.08035756647586823, -0.02955171838402748, -0.04717123880982399, 0.029628004878759384, 0.21220248937606812, 0.42421936988830566, -0.4782419800758362, -0.400262713432312, -0.16716623306274414, 0.22946718335151672, -0.2420353889465332, -0.032157257199287415, 0.17910374701023102, -0.14865458011627197, -0.07347260415554047, -0.14096394181251526, -0.028164424002170563, 0.052829064428806305, 0.009464403614401817, 0.2762107253074646, 0.292793869972229, 0.21926245093345642, 0.32078441977500916, 0.7062380313873291, -0.1594580113887787, 0.25005555152893066, 0.27551794052124023, 0.18174372613430023, 0.6162170767784119, 0.09052632004022598, -0.0536038801074028, 0.04009968787431717, 0.008074387907981873, -0.6150444149971008, 0.01897478848695755, -0.03327057883143425, 0.13807761669158936, -0.028210263699293137, -0.39497509598731995, 0.07973652333021164, -0.26900389790534973, 0.3064284026622772, -0.44076067209243774, 0.2631149888038635, -0.26249557733535767, 0.0036539360880851746, -0.36616992950439453, -0.08880208432674408, -0.027877965942025185, 0.09572452306747437, 0.5163894891738892, 0.19937045872211456, -0.25788187980651855, -0.26609110832214355, -0.5647938251495361, 0.3253157138824463, -0.006048521026968956, 0.12446128576993942, -0.31000816822052, 0.07452920824289322, -0.08088169991970062, 0.01012723334133625, 0.7869895696640015, -0.09053672850131989, 0.2198173701763153, 0.0822388082742691, 0.025765590369701385, -0.5359348058700562, -0.010849013924598694, 0.13685601949691772, 0.38045820593833923, -0.07196992635726929, 0.4385930597782135, -0.1767694354057312, 0.12497170269489288, -0.4394177794456482, 0.3606897294521332, -0.33069178462028503, -0.24158832430839539, -0.3854798972606659, -0.3814751207828522, -0.48330074548721313, 0.44739043712615967, 0.4565170407295227, 0.25278574228286743, -0.048352427780628204, 0.3299100697040558, -0.17026330530643463, -0.01496080495417118, 0.17365160584449768, -0.007580142468214035, 0.4432085454463959, -0.1366671472787857, 0.04138917848467827, 0.10192042589187622, -0.056578509509563446, 0.4277549982070923, 0.41325798630714417, 0.10969634354114532, 0.1532110869884491, 0.2755296230316162, 0.015611880458891392, 0.33395251631736755, 0.3349302113056183, -0.07208311557769775, 0.027241647243499756, 0.11594665795564651, 0.24569746851921082, -0.43921107053756714, -0.06493610143661499, -0.39375367760658264, -0.053410742431879044, -0.09026334434747696, -0.02069668099284172, 0.37267330288887024, 0.3526017665863037, 0.017791539430618286, 0.07021567970514297, 0.3179871439933777, -0.31271594762802124, 0.2607083320617676, -0.026027806103229523, 0.872586727142334, -0.08519591391086578, 0.0190444216132164, 0.0668715164065361, 0.3008270859718323, 0.3401432931423187, -0.4726657271385193, 0.3613077998161316, 0.04408494010567665, -0.2942006587982178, 0.032581523060798645, -0.012193415313959122, -0.021077431738376617, 0.2959337830543518, -0.16884513199329376, 0.401699423789978, -0.5068144798278809, 0.012194328010082245, -0.09541498869657516, 0.13655304908752441, -0.6846146583557129, -0.37429556250572205, -0.2389674186706543, 0.12068924307823181, -0.13779541850090027, 0.21029998362064362, -0.24510425329208374, 0.10865650326013565, 0.03371363505721092, -0.312885046005249, -0.36626607179641724, -0.17015394568443298, 0.026718057692050934, 0.3035687804222107, -0.17898529767990112, 0.02364327758550644, -0.08937288820743561, 0.13467729091644287, 0.21527770161628723, 0.3010424077510834, -0.1435466706752777, 0.10248011350631714, -0.15729209780693054, -0.05579762160778046, 0.06480653584003448, 0.07522264122962952, 0.11239749938249588, 0.001626182347536087, -0.3096863925457001, 0.15746495127677917, -0.25910359621047974, -0.4899292588233948, 0.029062524437904358, -0.043814174830913544, -0.29428917169570923, -0.03387326002120972, -0.2902984023094177, -0.456600546836853, -0.005463704466819763, -0.08768321573734283, 0.06650687009096146, 0.01917397603392601, -0.11894801259040833, 0.14763516187667847, 0.02352585643529892, -0.20440933108329773, 0.11642156541347504, 0.19072356820106506, 0.17154881358146667, -0.3462998569011688, 0.3859965205192566, -0.37319815158843994, -0.0873679667711258, -0.17369389533996582, -0.15040938556194305, -0.13429872691631317, 0.09508276730775833, 0.3430250883102417, -0.07940418273210526, -0.12857933342456818, -0.24275103211402893, -0.23101267218589783, 0.6502943634986877, 0.42623797059059143, -0.14408349990844727, -0.4783772826194763, -0.373183012008667, 0.26766467094421387, 0.08030042797327042, 0.23816049098968506, -0.06412079185247421, -0.09848767518997192, 0.030608290806412697, 0.11294644325971603, -0.25599098205566406, -0.05578719824552536, -0.4407341480255127, 0.007171453908085823, 0.21178580820560455, 0.12637656927108765, 0.21430258452892303, -0.09470637142658234, -0.08272820711135864, 0.1265946626663208, -0.05575760453939438, -0.11263579875230789, 0.044962022453546524, 0.15062780678272247, 0.046918757259845734, 0.19517195224761963, 0.17354387044906616, -0.45882362127304077, 0.2376367747783661, -0.26550623774528503, 0.17537608742713928, 0.4182690978050232, -0.045481324195861816, -0.34155726432800293, 0.07465758919715881, 0.49747514724731445, -0.17092390358448029, 0.1422317624092102, 0.12859423458576202, 0.1546492725610733, -0.22968026995658875, 0.18428702652454376, 0.12514764070510864, 0.1417403221130371, 0.23668622970581055, -0.11207864433526993, 0.22014395892620087, 0.038522038608789444, -0.15457120537757874, 0.0684717670083046, -0.0448022335767746, 0.24782316386699677, 0.26529592275619507, -0.07904449105262756, -0.029399584978818893, 0.033805303275585175, 0.06988371163606644, 0.21730965375900269, -0.2394903004169464, -0.11724893748760223, 0.2396283596754074, -0.029939375817775726, 0.11975628137588501, 0.501385509967804, 0.387614369392395, -0.37487393617630005, 0.0745420977473259, 0.0923808217048645, 0.5648558139801025, -0.26017630100250244, 0.04130970686674118, 0.13369520008563995, 0.05060681328177452, 0.0030419304966926575, 0.1490100771188736, -0.06330139935016632, 0.3891547620296478, 0.3070394992828369, -0.17135366797447205, 0.21597211062908173, 0.24081242084503174, -0.12086087465286255, -0.14976298809051514, -0.40510860085487366, 0.08635277301073074, 0.08172904700040817, 0.04258323833346367, 0.1304464340209961, -0.3192770183086395, -0.04760055989027023, -0.3641909658908844, -0.19654101133346558, -0.2249186635017395, -0.11324144899845123, -0.4139752686023712, -0.010649209842085838, -0.018116828054189682, -0.08793169260025024, -0.027367543429136276, -0.12374721467494965, 0.3569251596927643, -0.3851688504219055, 0.3071930706501007, 0.009147800505161285, 0.06227511912584305, 0.29900604486465454, -0.29941949248313904, 0.4684777557849884, 0.16412904858589172, -0.36845913529396057, 0.037796419113874435, 0.2732795476913452, -0.25389403104782104, 0.29971322417259216, 0.17128688097000122, 0.6783182621002197, 0.222746804356575, -0.0918964147567749, 0.06751569360494614, 0.03421475738286972, 0.07634919136762619, -0.3394200801849365, -0.023012835532426834, 0.06691811978816986, -0.133262038230896, 0.11456680297851562, 0.13749413192272186, -0.09449613094329834, 0.22364628314971924, 0.011741690337657928, 0.2606373727321625, -0.25720712542533875, -0.12003573030233383, -0.17192374169826508, -0.19954931735992432, -0.13376359641551971, 0.09174948930740356, -0.2527792751789093, -0.2110946625471115, 0.35246410965919495, -0.05091572925448418, 0.1831527054309845, 0.19918875396251678, 0.06721262633800507, -0.09606665372848511, 0.27137839794158936, 0.3381309509277344, -0.5006518959999084, -0.3073892295360565, 0.08907073736190796, -0.5300477743148804, 0.21790054440498352, -0.2879719138145447, -0.07918884605169296, -0.031629279255867004, 0.21626031398773193, -0.03532450646162033, -0.1100044995546341, 0.09238363057374954, -0.08695540577173233, -0.06845752894878387, -0.15444929897785187, -0.26337891817092896, -0.2788791358470917, -0.087815061211586, -0.2979597747325897, 0.27159151434898376, -0.5973243713378906, -0.04767138138413429, 0.10969887673854828, 0.06260467320680618, 0.08089611679315567, -0.0069348253309726715, 0.23120248317718506, 0.44211503863334656, 0.3236789107322693, -0.001400856301188469, 0.4533211290836334, 0.06917838007211685, -0.15781830251216888, -0.35559970140457153, -0.0512276366353035, -0.156731516122818, 0.05033527687191963, 0.12298177182674408, 0.23972415924072266, -0.6420228481292725, 0.08903671056032181, -0.23719558119773865, 0.24776995182037354, 0.06780725717544556, -0.07973416149616241, 0.09804759174585342, -0.023893317207694054, -0.3431893587112427, 0.19829495251178741, 0.23607483506202698, 0.2301774024963379, -0.06586264818906784, 0.3270435333251953, -0.19334697723388672, -0.15631496906280518, 0.4829874038696289, -0.13969314098358154, -0.3495694100856781, -0.22467701137065887, 0.4760475158691406, 0.05776984989643097, -0.04042286425828934, -0.19705072045326233, -0.08895687013864517, 0.18535330891609192, 0.07910521328449249, 0.06320065259933472, -0.1794750690460205, -0.2648894190788269, -0.24923738837242126, -0.013969497755169868, 0.20918026566505432, -0.31211450695991516, -0.31358838081359863, 0.03507344052195549, -0.20943908393383026 ]
https://github.com/huggingface/datasets/issues/1784
JSONDecodeError on JSON with multiple lines
Hi ! The `json` dataset script does support this format. For example loading a dataset with this format works on my side: ```json {"key1":11, "key2":12, "key3":13} {"key1":21, "key2":22, "key3":23} ``` Can you show the full stacktrace please ? Also which version of datasets and pyarrow are you using ?
Hello :), I have been trying to load data using a JSON file. Based on the [docs](https://huggingface.co/docs/datasets/loading_datasets.html#json-files), the following format is supported: ```json {"key1":11, "key2":12, "key3":13} {"key1":21, "key2":22, "key3":23} ``` But, when I try loading a dataset with the same format, I get a JSONDecodeError : `JSONDecodeError: Extra data: line 2 column 1 (char 7142)`. Now, this is expected when using `json` to load a JSON file. But I was wondering if there are any special arguments to pass when using `load_dataset` as the docs suggest that this format is supported. When I convert the JSON file to a list of dictionaries format, I get AttributeError: `AttributeError: 'list' object has no attribute 'keys'`. So, I can't convert them to list of dictionaries either. Please let me know :) Thanks, Gunjan
49
JSONDecodeError on JSON with multiple lines Hello :), I have been trying to load data using a JSON file. Based on the [docs](https://huggingface.co/docs/datasets/loading_datasets.html#json-files), the following format is supported: ```json {"key1":11, "key2":12, "key3":13} {"key1":21, "key2":22, "key3":23} ``` But, when I try loading a dataset with the same format, I get a JSONDecodeError : `JSONDecodeError: Extra data: line 2 column 1 (char 7142)`. Now, this is expected when using `json` to load a JSON file. But I was wondering if there are any special arguments to pass when using `load_dataset` as the docs suggest that this format is supported. When I convert the JSON file to a list of dictionaries format, I get AttributeError: `AttributeError: 'list' object has no attribute 'keys'`. So, I can't convert them to list of dictionaries either. Please let me know :) Thanks, Gunjan Hi ! The `json` dataset script does support this format. For example loading a dataset with this format works on my side: ```json {"key1":11, "key2":12, "key3":13} {"key1":21, "key2":22, "key3":23} ``` Can you show the full stacktrace please ? Also which version of datasets and pyarrow are you using ?
[ 0.0756988525390625, -0.004834532737731934, -0.029282748699188232, 0.4874005913734436, 0.35478317737579346, 0.14951956272125244, 0.46156570315361023, 0.06345704197883606, 0.15875303745269775, 0.018791377544403076, 0.16414304077625275, 0.28063252568244934, -0.046472497284412384, 0.21310175955295563, 0.0773414820432663, -0.2579200267791748, 0.054529108107089996, 0.25397419929504395, 0.2304695099592209, 0.09392322599887848, -0.17535659670829773, 0.28218331933021545, -0.15588389337062836, -0.08597780764102936, -0.11649332195520401, 0.18214422464370728, -0.14781922101974487, 0.22306621074676514, 0.11521979421377182, -0.6116783022880554, 0.1991683393716812, 0.10720174014568329, 0.1027606874704361, 0.4384290277957916, -0.00012228269770275801, 0.1784515082836151, 0.2798021137714386, -0.2406274378299713, -0.4377518892288208, -0.24159221351146698, -0.32004567980766296, -0.21467098593711853, 0.39414820075035095, -0.21646609902381897, -0.0171034038066864, -0.55222487449646, -0.107155442237854, -0.223170667886734, 0.8473545908927917, 0.3154251277446747, 0.07369731366634369, -0.03705722838640213, 0.1545831263065338, 0.09377589076757431, 0.13827946782112122, 0.39767909049987793, 0.10401993244886398, 0.39032962918281555, 0.15727292001247406, 0.38307663798332214, 0.0803719088435173, -0.19407449662685394, -0.07914047688245773, 0.11259068548679352, 0.28579920530319214, 0.10976553708314896, -0.07170558720827103, -0.08075400441884995, 0.015109898522496223, 0.4550841450691223, 0.6541769504547119, -0.10462983697652817, -0.4009036123752594, -0.4307037889957428, -0.12883707880973816, -0.13735222816467285, 0.26104065775871277, 0.15445202589035034, -0.10682666301727295, 0.17553843557834625, -0.2287270724773407, -0.18900853395462036, -0.2531898617744446, 0.2583877742290497, -0.09283463656902313, -0.3173472583293915, -0.21603848040103912, 0.21463322639465332, 0.1909274160861969, -0.1639515906572342, -0.14760389924049377, -0.2164839506149292, -0.31349751353263855, 0.16101674735546112, -0.015815507620573044, 0.024427048861980438, -0.16926446557044983, -0.29961007833480835, 0.3776485323905945, 0.06064599007368088, 0.2912251353263855, 0.00905735231935978, -0.305120587348938, 0.13202092051506042, 0.4233742952346802, -0.041297245770692825, 0.46792444586753845, -0.2059042602777481, 0.022830117493867874, -0.050950028002262115, 0.23771867156028748, -0.2316977083683014, -0.17453041672706604, -0.024660643190145493, 0.0667581558227539, -0.23374316096305847, 0.13676679134368896, -0.19315679371356964, 0.0409570187330246, -0.11414596438407898, -0.3299008011817932, -0.23795536160469055, -0.07785692065954208, 0.2825758755207062, 0.3413723111152649, 0.13055336475372314, 0.008519012480974197, 0.43883389234542847, 0.15124164521694183, -0.17791441082954407, 0.06126505509018898, 0.033614374697208405, 0.10911539196968079, 0.12032338231801987, 0.2002602368593216, -0.1847381442785263, 0.1546734720468521, 0.16733258962631226, -0.03120294213294983, -0.18029850721359253, -0.2248149812221527, 0.0954531580209732, 0.00533989816904068, 0.20346546173095703, 0.15148770809173584, 0.038172490894794464, 0.04654594510793686, -0.3754885196685791, -0.12297877669334412, 0.261493057012558, -0.3664223849773407, -0.10861176997423172, -0.21589599549770355, 0.004594418685883284, -0.21653775870800018, -0.042754240334033966, -0.7504178881645203, 0.24296452105045319, -0.058194421231746674, -0.3593730628490448, 0.027887672185897827, -0.1414283812046051, 0.14017096161842346, -0.2898022532463074, 0.0539407804608345, 0.48435890674591064, -0.5632107853889465, -0.31266435980796814, 0.2905026078224182, -0.19059666991233826, -0.10553587228059769, 0.3626503646373749, -0.41072574257850647, 0.21883434057235718, -0.20733079314231873, 0.30101728439331055, 0.36872056126594543, -0.3092292547225952, -0.2301798015832901, 0.5485824346542358, 0.1091068834066391, 0.337136447429657, 0.22942134737968445, -0.16624727845191956, 0.25835660099983215, -0.008867220021784306, 0.23588988184928894, 0.11114582419395447, 0.1393965184688568, 0.04512404650449753, 0.10173018276691437, -0.020823823288083076, 0.3151668906211853, 0.269021600484848, -0.383822500705719, 0.03421613201498985, 0.03197905793786049, 0.07702569663524628, 0.3040088713169098, -0.28658825159072876, -0.12449807673692703, 0.30021679401397705, -0.22689862549304962, 0.04455044865608215, 0.031766392290592194, 0.17405354976654053, -0.7827904224395752, 0.03183484822511673, 0.15112055838108063, -0.1864999383687973, -0.3102794289588928, -0.05987236276268959, -0.00964011624455452, 0.018045244738459587, -0.4591429531574249, -0.05200474336743355, -0.043289970606565475, 0.05290568619966507, 0.18616893887519836, 0.06983083486557007, -0.15121090412139893, 0.26028183102607727, 0.08439290523529053, 0.12722913920879364, -0.2944527268409729, 0.32754358649253845, 0.11300349235534668, -0.1274394989013672, 0.08214784413576126, -0.014780007302761078, 0.17438995838165283, -0.36223533749580383, -0.023796774446964264, 0.3017582893371582, 0.43651872873306274, -0.2380351573228836, -0.17483395338058472, 0.08556509763002396, 0.2663768529891968, 0.2200503647327423, -0.07445308566093445, 0.25053852796554565, 0.22371673583984375, -0.29067420959472656, -0.3921758830547333, 0.2784978747367859, -0.08864562213420868, 0.4363923668861389, 0.03884344547986984, -0.15010754764080048, 0.423945814371109, 0.10457532107830048, -0.2950928211212158, -0.10241790860891342, 0.15727682411670685, 0.19994217157363892, 0.025098595768213272, 0.037161245942115784, -0.30325448513031006, -0.1938171684741974, 0.5734389424324036, -0.19821617007255554, 0.13668709993362427, 0.31013861298561096, -0.1643853485584259, -0.12241345643997192, 0.013279212638735771, -0.023327793926000595, 0.3320552706718445, 0.14988292753696442, -0.3159903883934021, 0.03760262206196785, 0.2749466300010681, -0.21849411725997925, 0.12457253783941269, -0.10848231613636017, 0.23809243738651276, 0.04019658640027046, 0.17833910882472992, -0.07973435521125793, -0.33051222562789917, -0.4385950267314911, 0.10775290429592133, 0.07040873169898987, -0.5264185667037964, 0.11375025659799576, -0.42918458580970764, -0.09219200909137726, -0.06609296798706055, -0.2417520433664322, -0.1805998831987381, -0.20908336341381073, -0.14594358205795288, 0.06892281770706177, 0.024318821728229523, -0.09220842272043228, 0.09433919191360474, 0.1706511527299881, 0.14148809015750885, -0.19986560940742493, -0.14685556292533875, -0.14687463641166687, -0.23797303438186646, -0.06916266679763794, 0.24377675354480743, -0.009923731908202171, 0.00707579031586647, -0.326299250125885, -0.1477709710597992, -0.15860693156719208, -0.06615708768367767, 0.1092127114534378, -0.10674086213111877, 0.15868230164051056, 0.14632180333137512, 0.4827868342399597, -0.08614525198936462, -0.03338125720620155, 0.3210746645927429, 0.25862812995910645, -0.21110303699970245, 0.24270319938659668, 0.12396254390478134, -0.030350828543305397, -0.06385215371847153, -0.07269833236932755, 0.04861683398485184, -0.16639679670333862, 0.6842477917671204, -0.04522084444761276, 0.19388610124588013, -0.05414453148841858, 0.12998349964618683, 0.09720895439386368, -0.20450858771800995, 0.09399089217185974, -0.11794847995042801, -0.21615971624851227, 0.27485525608062744, -0.15783971548080444, -0.45644235610961914, 0.08667217195034027, 0.1376074254512787, -0.11018845438957214, -0.06610532850027084, -0.42925721406936646, -0.19517581164836884, -0.05048392713069916, 0.1136903166770935, -0.12069530785083771, -0.047441594302654266, 0.23184338212013245, -0.0019966745749115944, 0.0809706598520279, -0.055832087993621826, -0.30872130393981934, 0.12147185206413269, 0.018698938190937042, 0.08409906923770905, 0.2554665505886078, 0.7511208057403564, -0.16437490284442902, 0.10482391715049744, 0.40959417819976807, -0.09083220362663269, 0.335814505815506, -0.23180249333381653, 0.2796763777732849, -0.2613421082496643, -0.05585777014493942, -0.1485668569803238, -0.10086935758590698, 0.05539662390947342, 0.2300320565700531, -0.004468230530619621, 0.10114412009716034, -0.15489447116851807, 0.04144493117928505, -0.43941545486450195, -0.11429807543754578, 0.11587771773338318, -0.08370070159435272, -0.23464754223823547, -0.2505987584590912, 0.08272019773721695, 0.0823536217212677, 0.12979543209075928, -0.22380055487155914, 0.40124285221099854, 0.29091009497642517, 0.010878946632146835, -0.48233190178871155, -0.1782713085412979, -0.2993755638599396, 0.3115851879119873, 0.07247266918420792, 0.39876753091812134, -0.052559155970811844, 0.3056706488132477, 0.15134215354919434, -0.16403312981128693, 0.8771929740905762, -0.07201938331127167, -0.1486295610666275, 0.13510951399803162, 0.07906945049762726, -0.49903830885887146, 0.023158755153417587, -0.08321531116962433, 0.3365107774734497, 0.11281931400299072, 0.18892395496368408, -0.5262199640274048, -0.14117656648159027, -0.15029937028884888, 0.121952123939991, -0.13064904510974884, -0.31310349702835083, -0.11053481698036194, -0.40949398279190063, -0.5487588047981262, -0.27880868315696716, 0.05039007216691971, 0.24961401522159576, 0.05474527180194855, -0.11734609305858612, 0.0764080062508583, -0.2830382287502289, 0.026488661766052246, 0.10062389075756073, 0.1723233461380005, 0.10501737147569656, -0.06772160530090332, 0.11604411154985428, 0.08107868582010269, 0.6050025224685669, 0.6168928742408752, 0.22004087269306183, -0.572524905204773, -0.15155914425849915, -0.37791377305984497, 0.338691383600235, 0.12363667786121368, 0.008989432826638222, 0.0958794504404068, -0.10696904361248016, -0.028135493397712708, 0.03811416029930115, -0.21263933181762695, 0.44858378171920776, -0.15234877169132233, -0.38946542143821716, -0.4445134699344635, 0.5677691698074341, 0.02230464667081833, -0.015119709074497223, 0.031126847490668297, 0.28638410568237305, -0.4327484965324402, 0.3331761956214905, -0.2572876811027527, 0.5948885679244995, -0.06705917418003082, 0.3598080277442932, 0.4278510510921478, -0.280269056558609, 0.5248780250549316, -0.08578687161207199, -0.053143784403800964, -0.1445719599723816, 0.16771221160888672, -0.13337373733520508, -0.13183681666851044, 0.299058198928833, 0.4635648727416992, -0.21110408008098602, 0.19945701956748962, -0.3796827793121338, -0.02578147128224373, 0.02192261442542076, 0.3363605737686157, -0.04475923627614975, -0.24031203985214233, -0.6766847968101501, 0.014287281781435013, -0.07315495610237122, -0.21988385915756226, -0.05547889694571495, -0.1762811541557312, 0.09182074666023254, -0.37645649909973145, -0.36434364318847656, -0.02364722639322281, 0.018088767305016518, -0.08522360026836395, 0.2905057370662689, -0.2800571918487549, 0.304017037153244, 0.29469361901283264, 0.003028169274330139, -0.13776306807994843, -0.17656685411930084, 0.0029853545129299164, -0.3240697681903839, -0.150029718875885, -0.33931639790534973, -0.06139039248228073, 0.1898660957813263, -0.016322167590260506, -0.23272964358329773, 0.1667877584695816, -0.16385599970817566, -0.4918404221534729, -0.05937332659959793, 0.25066453218460083, -0.5110681056976318, -0.47450119256973267, -0.3947392404079437, -0.11684371531009674, 0.05195145681500435, -0.044252995401620865, -0.007220050320029259, 0.2400052547454834, -0.049796655774116516, -0.10487689822912216, 0.06299135088920593, -0.03844466432929039, -0.01958836242556572, 0.18532627820968628, 0.02240559831261635, -0.1815967559814453, 0.6452674865722656, 0.4009435772895813, 0.03330551087856293, -0.12798407673835754, 0.3129695951938629, 0.6787835955619812, -0.14608889818191528, 0.3107438385486603, 0.1308353841304779, 0.42958754301071167, -0.0704205259680748, 0.3472557067871094, -0.07499953359365463, 0.18015120923519135, 0.3063793480396271, -0.6065922975540161, -0.09713776409626007, 0.25983670353889465, 0.0545562319457531, 0.10404561460018158, 0.23661020398139954, -0.028383053839206696, 0.02362690307199955, -0.012239644303917885, -0.12460772693157196, 0.3266865909099579, 0.07753562927246094, 0.07314229011535645, 0.1894129365682602, 0.12071016430854797, 0.28739121556282043, -0.08576710522174835, -0.011272285133600235, 0.08615776896476746, 0.005568548571318388, -0.0671929121017456, -0.011652246117591858, 0.19085755944252014, 0.24496331810951233, -0.10651517659425735, -0.2095552682876587, -0.1429026573896408, -0.031324829906225204, -0.1739066243171692, 0.32439905405044556, 0.06444308161735535, -0.12879011034965515, 0.21009932458400726, 0.31575578451156616, 0.1497424691915512, -0.30557167530059814, 0.10474509745836258, -0.1872400939464569, 0.572140634059906, -0.021530963480472565, 0.05845227092504501, -0.11454258859157562, 0.07333195209503174, -0.24764983355998993, 0.39738354086875916, 0.12670013308525085, 0.06468169391155243, 0.27379271388053894, -0.47801899909973145, 0.24614575505256653, 0.05447034537792206, 0.1764318346977234, 0.5079083442687988, -0.46329155564308167, 0.2767200171947479, -0.08715138584375381, -0.0323948860168457, 0.07467959076166153, -0.17128725349903107, 0.3691151738166809, 0.13500601053237915, -0.1295897513628006, 0.18431149423122406, -0.05731925368309021, -0.13457512855529785, -0.028041504323482513, -0.10975433140993118, 0.29228007793426514, 0.1591731756925583, -0.03710675239562988, 0.4146480858325958, -0.1724986881017685, -0.07843832671642303, 0.08979837596416473, 0.33311009407043457, 0.25350531935691833, 0.31896036863327026, -0.2833828330039978, -0.009992385283112526, 0.2608397305011749, 0.12588760256767273, -0.07239576429128647, -0.3877486288547516, -0.055084798485040665, 0.3519827723503113, 0.0916912704706192, 0.12110354006290436, 0.16130568087100983, 0.1335015594959259, 0.054761458188295364, 0.13951407372951508, -0.19049067795276642, 0.08334589749574661, 0.010280558839440346, -0.2840883731842041, -0.09987442940473557, -0.1132306307554245, -0.1254788041114807, 0.02888650819659233, -0.29288777709007263, -0.2805138826370239, 0.13533830642700195, 0.08194157481193542, 0.0951075628399849, -0.435018926858902, 0.31319791078567505, -0.040578439831733704, -0.015383996069431305, -0.20484361052513123, 0.29467082023620605, 0.3339354395866394, -0.15962502360343933, 0.5769931077957153, 0.00908687338232994, 0.5483862161636353, 0.21246959269046783, 0.11569517850875854, 0.013270983472466469, -0.4909028708934784, -0.09465701133012772, 0.20714665949344635, 0.3553983271121979, 0.050853047519922256, 0.004682663828134537, 0.20904749631881714, 0.05589398741722107, 0.08697579056024551, 0.3290420174598694, 0.032511476427316666, 0.15686775743961334, -0.31560778617858887, 0.030232682824134827, -0.3788298964500427, -0.08736293762922287, -0.12112869322299957, -0.10118051618337631, -0.13445018231868744, -0.4340043067932129, 0.13307005167007446, 0.17070144414901733, 0.07933340221643448, 0.07149164378643036, -0.002835305407643318, -0.13108853995800018, 0.46659183502197266, 0.3894784450531006, 0.2655850052833557, 0.023738812655210495, -0.03359179198741913, -0.16562864184379578, -0.20368289947509766, -0.2785918414592743, -0.13707271218299866, 0.2476901113986969, 0.06283935159444809, 0.2403697371482849, 0.25771456956863403, -0.005891010165214539, 0.2844989001750946, -0.33557185530662537, 0.0001503676176071167, -0.23614190518856049, -0.20200616121292114, 0.35896801948547363, 0.24504773318767548, -0.19219568371772766, 0.08154711872339249, 0.3909066319465637, -0.0826660618185997, -0.08574804663658142, -0.21826647222042084, 0.3969537615776062, -0.20628130435943604, -0.17639684677124023, 0.23746483027935028, 0.23027367889881134, 0.5443309545516968, 0.16059988737106323, -0.08691754937171936, -0.040468718856573105, -0.16708126664161682, 0.013556092046201229, 0.6156161427497864, -0.037002649158239365, 0.40685999393463135, -0.295159250497818, 0.059250399470329285, -0.12426434457302094, 0.02512550540268421, -0.4160115718841553, -0.012706710025668144, -0.3439687490463257, 0.2034490704536438, -0.00155644491314888, -0.18287350237369537, 0.05424923822283745, 0.08630165457725525, -0.15408863127231598, 0.081134133040905, -0.014294467866420746, -0.109211765229702, 0.23558326065540314, -0.364929735660553, -0.18550002574920654, 0.134000763297081, -0.04535892605781555, -0.1485259234905243, -0.08985345810651779, -0.5390955209732056, 0.17146089673042297, 0.4368411898612976, -0.026989437639713287, -0.5867698192596436, 0.10049673914909363, -0.05331670865416527, -0.17557892203330994, -0.1529477834701538, 0.32306939363479614, 0.0704885944724083, -0.20006468892097473, -0.19112525880336761, -0.308666467666626 ]
https://github.com/huggingface/datasets/issues/1784
JSONDecodeError on JSON with multiple lines
Hi Quentin! I apologize for bothering you. There was some issue with my pyarrow version as far as I understand. I don't remember the exact version I was using as I didn't check it. I repeated it with `datasets 1.2.1` and `pyarrow 2.0.0` and it worked. Closing this issue. Again, sorry for the bother. Thanks, Gunjan
Hello :), I have been trying to load data using a JSON file. Based on the [docs](https://huggingface.co/docs/datasets/loading_datasets.html#json-files), the following format is supported: ```json {"key1":11, "key2":12, "key3":13} {"key1":21, "key2":22, "key3":23} ``` But, when I try loading a dataset with the same format, I get a JSONDecodeError : `JSONDecodeError: Extra data: line 2 column 1 (char 7142)`. Now, this is expected when using `json` to load a JSON file. But I was wondering if there are any special arguments to pass when using `load_dataset` as the docs suggest that this format is supported. When I convert the JSON file to a list of dictionaries format, I get AttributeError: `AttributeError: 'list' object has no attribute 'keys'`. So, I can't convert them to list of dictionaries either. Please let me know :) Thanks, Gunjan
56
JSONDecodeError on JSON with multiple lines Hello :), I have been trying to load data using a JSON file. Based on the [docs](https://huggingface.co/docs/datasets/loading_datasets.html#json-files), the following format is supported: ```json {"key1":11, "key2":12, "key3":13} {"key1":21, "key2":22, "key3":23} ``` But, when I try loading a dataset with the same format, I get a JSONDecodeError : `JSONDecodeError: Extra data: line 2 column 1 (char 7142)`. Now, this is expected when using `json` to load a JSON file. But I was wondering if there are any special arguments to pass when using `load_dataset` as the docs suggest that this format is supported. When I convert the JSON file to a list of dictionaries format, I get AttributeError: `AttributeError: 'list' object has no attribute 'keys'`. So, I can't convert them to list of dictionaries either. Please let me know :) Thanks, Gunjan Hi Quentin! I apologize for bothering you. There was some issue with my pyarrow version as far as I understand. I don't remember the exact version I was using as I didn't check it. I repeated it with `datasets 1.2.1` and `pyarrow 2.0.0` and it worked. Closing this issue. Again, sorry for the bother. Thanks, Gunjan
[ 0.11187943816184998, -0.0649547353386879, -0.012783522717654705, 0.5094955563545227, 0.36685121059417725, 0.14520785212516785, 0.4116663932800293, 0.069785475730896, 0.11648829281330109, 0.07758276164531708, 0.12275230139493942, 0.3139995038509369, -0.01331270020455122, 0.17431649565696716, 0.10525341331958771, -0.3321562707424164, 0.05630546808242798, 0.24222062528133392, 0.28122401237487793, 0.04483131319284439, -0.18832620978355408, 0.32222723960876465, -0.12115250527858734, -0.021524950861930847, -0.10035865008831024, 0.2009463608264923, -0.1490635722875595, 0.20983976125717163, 0.09833811223506927, -0.5983388423919678, 0.1811593621969223, 0.07874884456396103, 0.08965204656124115, 0.4094793200492859, -0.00012443921878002584, 0.17136545479297638, 0.23355691134929657, -0.23850981891155243, -0.41930049657821655, -0.2048569768667221, -0.23441356420516968, -0.18376564979553223, 0.40744152665138245, -0.21534988284111023, -0.04344990849494934, -0.6132311820983887, -0.11714032292366028, -0.05721563473343849, 0.8382027745246887, 0.28990066051483154, 0.055700547993183136, 0.02217365801334381, 0.24379868805408478, 0.09813065826892853, 0.19294187426567078, 0.31847360730171204, 0.11450720578432083, 0.44309893250465393, 0.20873209834098816, 0.3381677269935608, 0.06790947169065475, -0.15863898396492004, -0.07118729501962662, 0.08355706930160522, 0.28095743060112, 0.11956822127103806, -0.02197815477848053, -0.11461640894412994, -0.010624423623085022, 0.4550395905971527, 0.6182895302772522, -0.12444385141134262, -0.35400646924972534, -0.43970319628715515, -0.1298501342535019, -0.2184528261423111, 0.2876078188419342, 0.17721565067768097, -0.15192817151546478, 0.17794959247112274, -0.15952454507350922, -0.1754685491323471, -0.30752265453338623, 0.3047269582748413, -0.04709353297948837, -0.2925514578819275, -0.14459587633609772, 0.24236434698104858, 0.2514728307723999, -0.15743577480316162, -0.17315079271793365, -0.17070719599723816, -0.3005770444869995, 0.19423633813858032, -0.037458401173353195, 0.03326161950826645, -0.1622176170349121, -0.26028332114219666, 0.35938650369644165, 0.021999705582857132, 0.27777066826820374, -0.015607867389917374, -0.2210022211074829, 0.17509698867797852, 0.3867211639881134, -0.03107096068561077, 0.3983151912689209, -0.21183566749095917, 0.03573870286345482, -0.08876995742321014, 0.19910626113414764, -0.19576871395111084, -0.15752889215946198, -0.003041361691430211, 0.06268323957920074, -0.252776175737381, 0.14243879914283752, -0.2047821283340454, 0.09411679208278656, -0.12809576094150543, -0.38721832633018494, -0.25713878870010376, -0.10429926216602325, 0.3170131742954254, 0.33083370327949524, 0.03274526819586754, 0.021384023129940033, 0.43481558561325073, 0.11620543152093887, -0.2527851462364197, 0.0686018094420433, 0.026087263599038124, 0.10681521892547607, 0.12474367022514343, 0.17683251202106476, -0.21313513815402985, 0.15774933993816376, 0.1446985900402069, -0.020176582038402557, -0.14012199640274048, -0.23651254177093506, 0.10405108332633972, -0.031431928277015686, 0.21746356785297394, 0.09335291385650635, 0.005128815770149231, 0.06568509340286255, -0.3857874274253845, -0.13718734681606293, 0.26503267884254456, -0.3571530878543854, -0.1853625774383545, -0.2478068619966507, -0.013029406778514385, -0.21017961204051971, -0.048498235642910004, -0.7054868936538696, 0.2720552086830139, -0.049714721739292145, -0.3916546702384949, 0.04228127747774124, -0.11513234674930573, 0.20016750693321228, -0.2836831510066986, 0.03938235342502594, 0.42652493715286255, -0.5727184414863586, -0.3258419930934906, 0.30228903889656067, -0.20163080096244812, -0.06203698366880417, 0.3925490081310272, -0.46344512701034546, 0.2692917287349701, -0.17631152272224426, 0.33461683988571167, 0.36252832412719727, -0.30546191334724426, -0.2864096164703369, 0.47605156898498535, 0.060811519622802734, 0.33083611726760864, 0.25558266043663025, -0.15106920897960663, 0.2409438043832779, 0.039310287684202194, 0.2559547424316406, 0.09360870718955994, 0.15793399512767792, 0.03327620029449463, 0.02089817449450493, -0.04012725502252579, 0.3830367922782898, 0.2622576653957367, -0.34673264622688293, 0.03362509608268738, 0.02983875572681427, 0.021078340709209442, 0.31980687379837036, -0.3416236340999603, -0.14861397445201874, 0.3134539723396301, -0.17750777304172516, 0.07253468036651611, 0.041867710649967194, 0.193100243806839, -0.7275487184524536, 0.04684625566005707, 0.06163378059864044, -0.0923420786857605, -0.3281354308128357, -0.045859046280384064, -0.014527719467878342, 0.03760325163602829, -0.4042334258556366, -0.09697318077087402, -0.063784658908844, 0.04273626208305359, 0.21813905239105225, 0.10928589105606079, -0.15388037264347076, 0.23077960312366486, 0.031264275312423706, 0.1312132328748703, -0.3026619851589203, 0.372982919216156, 0.0696924477815628, -0.18850015103816986, 0.021298080682754517, -0.0272982195019722, 0.20606479048728943, -0.3279632329940796, -0.02485746517777443, 0.2660459578037262, 0.36685851216316223, -0.2670184373855591, -0.19896596670150757, 0.06529843062162399, 0.25878584384918213, 0.09627051651477814, -0.08288506418466568, 0.29871681332588196, 0.21308909356594086, -0.23206639289855957, -0.3045406937599182, 0.30627989768981934, 0.006998896598815918, 0.42057332396507263, 0.02653197944164276, -0.18264541029930115, 0.38329148292541504, 0.10583870112895966, -0.23328429460525513, -0.006008457392454147, 0.21031203866004944, 0.20888330042362213, 0.03129879757761955, 0.06150926649570465, -0.3478977382183075, -0.1770053505897522, 0.567830502986908, -0.20460736751556396, 0.1121404618024826, 0.3307667672634125, -0.15699157118797302, -0.08266875892877579, 0.05037621408700943, -0.12668365240097046, 0.32110780477523804, 0.167021706700325, -0.3652741611003876, 0.03719020262360573, 0.23474301397800446, -0.20119227468967438, 0.11603961884975433, -0.09745047986507416, 0.21820533275604248, 0.053189195692539215, 0.22915959358215332, -0.07880599051713943, -0.41703179478645325, -0.42038047313690186, 0.1339423805475235, 0.11083071678876877, -0.5512767434120178, 0.12520553171634674, -0.3722784221172333, -0.0822071060538292, -0.04054887592792511, -0.3005824089050293, -0.27533361315727234, -0.19562789797782898, -0.08342840522527695, 0.0990593284368515, 0.031261492520570755, -0.05185258388519287, 0.17124512791633606, 0.17002733051776886, 0.11198888719081879, -0.24576012790203094, -0.20710457861423492, -0.2123640775680542, -0.2687695622444153, -0.09051482379436493, 0.21571609377861023, -0.049005478620529175, -0.025157524272799492, -0.3031787872314453, -0.2045312374830246, -0.1507425606250763, -0.13728466629981995, 0.08084876090288162, -0.1706145703792572, 0.21222244203090668, 0.08487852662801743, 0.4887610077857971, -0.0839301198720932, -0.12838074564933777, 0.3590870499610901, 0.23639503121376038, -0.2614619731903076, 0.24705418944358826, 0.08315897732973099, 0.018430419266223907, -0.04640815779566765, -0.06907486170530319, 0.005278252996504307, -0.15442512929439545, 0.7430193424224854, -0.08334377408027649, 0.2016303539276123, -0.041560523211956024, 0.16453900933265686, 0.1299038976430893, -0.26627835631370544, 0.10005294531583786, -0.12102850526571274, -0.21393431723117828, 0.2681325078010559, -0.1243896409869194, -0.44021686911582947, 0.07219891250133514, 0.14692294597625732, -0.070494145154953, -0.059918202459812164, -0.45269066095352173, -0.24723787605762482, -0.03885363042354584, 0.22869634628295898, -0.13735686242580414, -0.05757276713848114, 0.2596033215522766, -0.010124020278453827, 0.0912240594625473, -0.02658446505665779, -0.33423909544944763, 0.1173289492726326, 0.05513275787234306, 0.11636132001876831, 0.16430917382240295, 0.663331925868988, -0.21803779900074005, 0.235945925116539, 0.305279940366745, -0.0470106340944767, 0.36742326617240906, -0.24260756373405457, 0.2596154510974884, -0.24327722191810608, -0.09130293130874634, -0.1268058568239212, -0.1253753900527954, 0.013044804334640503, 0.18456211686134338, -0.02019316703081131, 0.05075407028198242, -0.17365840077400208, -0.045229509472846985, -0.4609678089618683, -0.10127781331539154, 0.14024929702281952, 0.08566370606422424, -0.22870051860809326, -0.2212105542421341, 0.08660183101892471, 0.03374117240309715, 0.11507334560155869, -0.1839328110218048, 0.4028846025466919, 0.30397769808769226, 0.00906312745064497, -0.45902469754219055, -0.24910762906074524, -0.2739677131175995, 0.3141449987888336, 0.08093661814928055, 0.30020004510879517, -0.062087543308734894, 0.2909623980522156, 0.21643799543380737, -0.19767579436302185, 0.9261077642440796, 0.0026832707226276398, -0.16595740616321564, 0.14307372272014618, 0.08667455613613129, -0.4900355339050293, 0.0012996681034564972, -0.05144020542502403, 0.2541288137435913, 0.12772881984710693, 0.20146304368972778, -0.6062143445014954, -0.14659330248832703, -0.1256859302520752, 0.16961736977100372, -0.1325751096010208, -0.3024122714996338, -0.17022718489170074, -0.46665939688682556, -0.5862986445426941, -0.2181214690208435, 0.028596306219697, 0.2952231168746948, 0.08153507113456726, -0.03595241159200668, 0.09512072801589966, -0.26563629508018494, 0.002454891800880432, 0.12680894136428833, 0.18540352582931519, 0.08044031262397766, -0.0903359204530716, 0.0820385292172432, 0.05426694080233574, 0.588819146156311, 0.610823392868042, 0.21062429249286652, -0.6033204197883606, -0.16986587643623352, -0.31875601410865784, 0.4119631350040436, 0.19179239869117737, -0.0333699956536293, 0.17532214522361755, -0.10570886731147766, -0.007426850497722626, 0.0734499916434288, -0.21390630304813385, 0.4310309588909149, -0.1350053995847702, -0.33125486969947815, -0.36079707741737366, 0.5874241590499878, 0.003359515219926834, -0.01274004578590393, 0.07070185989141464, 0.31626349687576294, -0.3953837454319, 0.3670031428337097, -0.2552438974380493, 0.7166483402252197, -0.09822149574756622, 0.3945840895175934, 0.46536996960639954, -0.2684083580970764, 0.5387393832206726, -0.13183897733688354, 0.025685004889965057, -0.15678922832012177, 0.15080127120018005, -0.11459726095199585, -0.10219956934452057, 0.2868122458457947, 0.42035526037216187, -0.19007909297943115, 0.15300169587135315, -0.3553854823112488, -0.005155943334102631, 0.04495375603437424, 0.29308977723121643, 0.002941845916211605, -0.22361814975738525, -0.8049342036247253, -0.007304782047867775, -0.09068673849105835, -0.16723152995109558, -0.04863907769322395, -0.24824105203151703, 0.03775878623127937, -0.4397955536842346, -0.30088740587234497, -0.02895381674170494, -0.041747353971004486, -0.0845261886715889, 0.3456767201423645, -0.3072960376739502, 0.22219720482826233, 0.3093555271625519, -0.06342822313308716, -0.16974739730358124, -0.20680101215839386, 0.033938366919755936, -0.2961462438106537, -0.20270967483520508, -0.3475341796875, -0.04426535964012146, 0.16436399519443512, -0.05648215860128403, -0.27335456013679504, 0.2610815167427063, -0.2105812281370163, -0.5443147420883179, -0.07014162838459015, 0.23328101634979248, -0.49670737981796265, -0.4386489689350128, -0.31273436546325684, -0.14158111810684204, 0.03508355841040611, -0.0848483294248581, -0.019085094332695007, 0.19890379905700684, -0.10749726742506027, -0.12806230783462524, 0.055445242673158646, -0.07897593080997467, -0.051130373030900955, 0.22316688299179077, 0.02873576432466507, -0.1254393458366394, 0.6856863498687744, 0.383262038230896, 0.058215633034706116, -0.10363564640283585, 0.20327028632164001, 0.6720958352088928, -0.24891364574432373, 0.3087470829486847, 0.18287082016468048, 0.43184053897857666, -0.13283568620681763, 0.42366260290145874, 0.021997716277837753, 0.12739893794059753, 0.3115241527557373, -0.5580523014068604, -0.15350323915481567, 0.3016927242279053, 0.08157099783420563, 0.07769996672868729, 0.26585254073143005, 0.06335620582103729, 0.06527150422334671, 0.05799610912799835, -0.12720943987369537, 0.33537784218788147, 0.041544489562511444, 0.07795678824186325, 0.2087293565273285, 0.0826461911201477, 0.3267768919467926, -0.04257114231586456, -0.01935434900224209, 0.10769741982221603, -0.0010707024484872818, -0.05588604509830475, -0.049149032682180405, 0.2018558531999588, 0.24198320508003235, -0.09602516889572144, -0.19493873417377472, -0.15391257405281067, 0.011955752968788147, -0.13377481698989868, 0.3213220238685608, 0.03842834383249283, -0.08735953271389008, 0.19552263617515564, 0.37148186564445496, 0.16433876752853394, -0.32513654232025146, 0.11411569267511368, -0.16384589672088623, 0.6059882044792175, 0.04699689894914627, -0.011901672929525375, -0.17915746569633484, 0.08036455512046814, -0.2306513488292694, 0.33748191595077515, 0.09882770478725433, 0.00015439093112945557, 0.27056437730789185, -0.4505710005760193, 0.1796679049730301, -0.052417006343603134, 0.2017093002796173, 0.4938376545906067, -0.45852571725845337, 0.31388476490974426, -0.028484661132097244, -0.05705869197845459, 0.003463994711637497, -0.1709432303905487, 0.4224451780319214, 0.08758305758237839, -0.16381187736988068, 0.17009784281253815, 0.0028251297771930695, -0.13369543850421906, 0.01711193472146988, -0.10545536130666733, 0.28738516569137573, 0.2006530612707138, -0.0894223302602768, 0.4312497675418854, -0.18346239626407623, -0.05698655918240547, 0.1248563677072525, 0.36176958680152893, 0.24121078848838806, 0.21411147713661194, -0.36092182993888855, -0.03558758646249771, 0.14238889515399933, 0.16335855424404144, -0.1051957830786705, -0.3548906743526459, -0.027986478060483932, 0.3401581346988678, 0.20293793082237244, 0.06162698194384575, 0.11941519379615784, 0.23623836040496826, 0.1331353783607483, 0.12933529913425446, -0.18330685794353485, 0.22703595459461212, 0.030860470607876778, -0.30048105120658875, -0.07113812863826752, -0.11581100523471832, -0.09180372953414917, 0.050039153546094894, -0.257274866104126, -0.3297423720359802, 0.18845611810684204, 0.11049619317054749, 0.07637670636177063, -0.49726027250289917, 0.19576022028923035, 0.019455093890428543, -0.0014933347702026367, -0.21021488308906555, 0.31314846873283386, 0.3145589530467987, -0.22115567326545715, 0.5350205898284912, 0.025642158463597298, 0.5477102994918823, 0.21802665293216705, 0.0665232390165329, 0.018238810822367668, -0.5012835264205933, -0.044291313737630844, 0.19246706366539001, 0.3591535687446594, 0.11764278262853622, 0.08100395649671555, 0.21094347536563873, 0.02748134545981884, 0.057717472314834595, 0.2730032503604889, 0.06551440060138702, 0.18632325530052185, -0.3028699457645416, -0.03693313151597977, -0.3501703143119812, -0.10014566779136658, -0.15121009945869446, -0.11708732694387436, -0.1513700932264328, -0.33339229226112366, 0.09444992244243622, 0.20905189216136932, 0.06792758405208588, 0.1047089546918869, -0.014600777067244053, -0.1393783986568451, 0.5112259387969971, 0.4039311110973358, 0.3075302541255951, -0.09578355401754379, -0.02801300585269928, -0.20479638874530792, -0.13633993268013, -0.3467083275318146, -0.11907532811164856, 0.27235954999923706, 0.08675479143857956, 0.2639313340187073, 0.2851455509662628, -0.01077502965927124, 0.2542974054813385, -0.32006892561912537, 0.029256772249937057, -0.30257511138916016, -0.1702689528465271, 0.3497331738471985, 0.23152031004428864, -0.165998175740242, 0.1436174511909485, 0.40265601873397827, -0.07104586809873581, -0.09640167653560638, -0.21880564093589783, 0.36414340138435364, -0.1985045075416565, -0.09477029740810394, 0.31047022342681885, 0.17038045823574066, 0.5703425407409668, 0.16124796867370605, -0.10282203555107117, 0.03256545960903168, -0.1898341327905655, -0.01790415123105049, 0.5546194911003113, 0.010795658454298973, 0.3781960606575012, -0.2969706058502197, 0.030874542891979218, -0.18003885447978973, 0.07732906192541122, -0.34767699241638184, -0.06990089267492294, -0.2934136390686035, 0.20213377475738525, 0.05248526483774185, -0.1814599335193634, 0.01467518787831068, 0.08939434587955475, -0.13100388646125793, 0.06495224684476852, -0.10941924154758453, -0.10195722430944443, 0.3342759609222412, -0.43525663018226624, -0.15526796877384186, 0.1767791211605072, -0.03176361322402954, -0.10273977369070053, -0.11415166407823563, -0.5677463412284851, 0.16827815771102905, 0.44634684920310974, -0.014063786715269089, -0.5691124200820923, 0.11022612452507019, -0.06185320392251015, -0.15924905240535736, -0.1474105268716812, 0.2672371566295624, 0.07385880500078201, -0.1737384796142578, -0.22265803813934326, -0.31864333152770996 ]
https://github.com/huggingface/datasets/issues/1783
Dataset Examples Explorer
Hi @ChewKokWah, We're working on it! In the meantime, you can still find the dataset explorer at the following URL: https://huggingface.co/datasets/viewer/
In the Older version of the Dataset, there are a useful Dataset Explorer that allow user to visualize the examples (training, test and validation) of a particular dataset, it is no longer there in current version. Hope HuggingFace can re-enable the feature that at least allow viewing of the first 20 examples of a particular dataset, or alternatively can extract 20 examples for each datasets and make those part of the Dataset Card Documentation.
21
Dataset Examples Explorer In the Older version of the Dataset, there are a useful Dataset Explorer that allow user to visualize the examples (training, test and validation) of a particular dataset, it is no longer there in current version. Hope HuggingFace can re-enable the feature that at least allow viewing of the first 20 examples of a particular dataset, or alternatively can extract 20 examples for each datasets and make those part of the Dataset Card Documentation. Hi @ChewKokWah, We're working on it! In the meantime, you can still find the dataset explorer at the following URL: https://huggingface.co/datasets/viewer/
[ -0.38613682985305786, -0.387398362159729, -0.06188441440463066, 0.29741260409355164, 0.15671545267105103, 0.29894739389419556, 0.08448348939418793, 0.35528385639190674, -0.06431125849485397, 0.376342236995697, 0.0037853431422263384, 0.29944196343421936, -0.2900574207305908, 0.5288342237472534, 0.39265716075897217, -0.2897700071334839, 0.011550761759281158, 0.208353191614151, -0.10081733763217926, 0.1148865818977356, 0.07922589778900146, 0.0855686143040657, -0.17432813346385956, 0.15143442153930664, -0.4029158055782318, -0.1880389302968979, -0.30377185344696045, -0.07465510815382004, -0.2611445188522339, -0.5259742140769958, 0.09752781689167023, -0.09698057174682617, 0.32576003670692444, 0.08752447366714478, -0.00010945141548290849, -0.13720659911632538, 0.2247062474489212, 0.07966817170381546, -0.48928776383399963, -0.05925266444683075, -0.3846614360809326, -0.015157897025346756, 0.30656856298446655, -0.1603699028491974, -0.2138926088809967, -0.4064328372478485, 0.2569763660430908, 0.06076639145612717, 0.32770848274230957, -0.05740375071763992, 0.18620777130126953, 0.46647387742996216, -0.10119956731796265, -0.3095894157886505, -0.05777999013662338, 0.5932620167732239, -0.377603679895401, 0.1418805718421936, 0.40566539764404297, 0.17192070186138153, -0.05587329715490341, 0.39424821734428406, 0.44340184330940247, 0.10746204853057861, 0.06668338179588318, 0.12247253209352493, -0.014031082391738892, -0.14125999808311462, 0.035226549953222275, 0.6123385429382324, 0.4841234087944031, 0.10828456282615662, -0.3699077367782593, -0.4363875091075897, -0.027957238256931305, -0.16586537659168243, -0.11217077821493149, 0.38243988156318665, 0.07018263638019562, 0.2538602352142334, -0.37502434849739075, 0.11346559226512909, -0.18307939171791077, -0.03669743239879608, -0.09141305834054947, -0.01985076814889908, -0.34800177812576294, -0.07120808213949203, 0.4680238664150238, -0.04322104901075363, 0.094293512403965, 0.23417066037654877, -0.0011735260486602783, 0.1652163416147232, -0.026317130774259567, -0.2085908204317093, 0.18608054518699646, 0.17611190676689148, 0.12910783290863037, 0.22926956415176392, 0.11673721671104431, 0.32466769218444824, -0.031227853149175644, 0.17557969689369202, 0.21165308356285095, -0.10557402670383453, 0.4409829378128052, 0.21196995675563812, 0.1845700442790985, 0.31491968035697937, 0.04762289300560951, -0.04267122596502304, -0.38104885816574097, 0.1570369154214859, -0.3530600070953369, -0.23613816499710083, -0.010428305715322495, -0.16971758008003235, -0.08771282434463501, -0.11541890352964401, -0.23919856548309326, -0.06368568539619446, 0.10946273803710938, 0.40938279032707214, -0.09473301470279694, -0.3719480335712433, -0.32138216495513916, -0.1324312537908554, 0.06606210023164749, -0.3266576826572418, -0.17459337413311005, 0.0009162314236164093, -0.28273341059684753, 0.030079420655965805, 0.14481087028980255, -0.5260007977485657, 0.4474385976791382, -0.07013067603111267, -0.06892131268978119, 0.0031335726380348206, 0.3343261778354645, 0.15536567568778992, 0.340813547372818, 0.1037808358669281, -0.004832420498132706, -0.22386285662651062, 0.1557134985923767, 0.07394184172153473, -0.20176097750663757, -0.02924482524394989, -0.10531020909547806, -0.3409499526023865, -0.3423970341682434, 0.1137072816491127, -0.2802441120147705, 0.05969180166721344, -0.3804876506328583, 0.47807154059410095, -0.4661560356616974, -0.20106685161590576, -0.050174079835414886, 0.11695204675197601, -0.2553434371948242, 0.06000679358839989, 0.371867299079895, 0.2557034194469452, -0.3894900679588318, -0.3772592842578888, 0.018270453438162804, -0.2124766707420349, -0.3901626467704773, -0.037462834268808365, -0.34428414702415466, 0.3350663483142853, -0.5363283157348633, 0.23522864282131195, 0.3367292284965515, -0.22281000018119812, -0.051880352199077606, 0.09366312623023987, 0.15739236772060394, -0.054947491735219955, 0.0014536604285240173, -0.14815890789031982, 0.445900559425354, -0.030554110184311867, -0.3026449680328369, -0.07905923575162888, 0.0599406361579895, -0.036874767392873764, 0.0009242407977581024, -0.171929731965065, -0.012910146266222, 0.0563330315053463, -0.14861498773097992, 0.10105329751968384, 0.1191326305270195, 0.0383443720638752, 0.4723878800868988, -0.2317599058151245, -0.11254128068685532, 0.14847207069396973, 0.21926939487457275, 0.24320390820503235, 0.011154530569911003, -0.40206676721572876, -0.15833184123039246, 0.09494020789861679, 0.003821413964033127, -0.18073999881744385, 0.3076317310333252, -0.3185964822769165, -0.11311044543981552, -0.03415472060441971, -0.259644478559494, -0.26212623715400696, 0.15849792957305908, -0.13656601309776306, 0.16118177771568298, 0.12514327466487885, -0.18924342095851898, 0.08859004825353622, -0.39873576164245605, 0.18700522184371948, -0.39014124870300293, 0.20903252065181732, 0.11055924743413925, 0.05360647290945053, 0.0102648064494133, 0.026726186275482178, -0.04083431512117386, -0.2687216103076935, 0.06860297918319702, 0.22171497344970703, 0.16415219008922577, -0.10901302099227905, 0.1630973517894745, 0.436235249042511, 0.2089856117963791, -0.3917675018310547, -0.010467888787388802, -0.13317789137363434, -0.1332426816225052, 0.2064635157585144, -0.7598803043365479, 0.32166504859924316, 0.25213679671287537, 0.15780504047870636, 0.3173382878303528, 0.11525111645460129, 0.023176921531558037, 0.11108790338039398, -0.2549540400505066, -0.2837452292442322, 0.13085013628005981, 0.07693125307559967, 0.17484039068222046, -0.052869707345962524, -0.6406165361404419, 0.14786942303180695, 0.26482468843460083, -0.09427449107170105, -0.03801853209733963, 0.09634846448898315, -0.32717323303222656, -0.020158415660262108, 0.421953946352005, 0.05240466818213463, 0.022104181349277496, 0.26869678497314453, 0.24397338926792145, 0.08576830476522446, -0.13445207476615906, 0.11467508971691132, 0.1895124614238739, 0.06847086548805237, 0.00042329425923526287, -0.357930451631546, -0.17320843040943146, 0.0783768892288208, -0.2876158058643341, -0.060378365218639374, 0.11064974218606949, 0.1175418347120285, -0.2738902270793915, 0.09055878967046738, -0.36303749680519104, -0.4837632477283478, -0.06979438662528992, 0.07046490907669067, 0.15524664521217346, -0.39965343475341797, 0.08036723732948303, 0.21613027155399323, -0.11437506973743439, 0.05831873416900635, -0.16257421672344208, 0.32235878705978394, -0.29754024744033813, 0.7413786053657532, -0.11731860041618347, 0.11610134690999985, -0.1537313163280487, 0.13649652898311615, 0.22915224730968475, 0.32485684752464294, 0.3808384835720062, -0.223133847117424, 0.1128324568271637, -0.5781581997871399, -0.5961933135986328, 0.4128216803073883, 0.09461907297372818, 0.27269724011421204, 0.37131035327911377, 0.10631754994392395, -0.443118691444397, -0.08089825510978699, 0.014268036931753159, -0.33063384890556335, -0.22475764155387878, -0.15593111515045166, -0.06451097875833511, 0.14424268901348114, -0.04471740126609802, -0.18040362000465393, -0.16939939558506012, -0.19827109575271606, 0.37523573637008667, -0.08493826538324356, 0.19986549019813538, 0.1477508544921875, 0.04122799262404442, 0.3752748370170593, -0.5501067638397217, -0.015457745641469955, -0.11899477243423462, -0.40808922052383423, 0.037752583622932434, -0.6036462187767029, -0.34498128294944763, 0.13046516478061676, -0.14814493060112, -0.03673521801829338, -0.11814948916435242, -0.24378927052021027, -0.24893568456172943, -0.28174325823783875, -0.04644640162587166, -0.04387883096933365, 0.05821218341588974, 0.3366229832172394, -0.07223546504974365, -0.09184436500072479, 0.06534924358129501, -0.1439100056886673, -0.06273817270994186, -0.0116688571870327, 0.11499080061912537, -0.17817634344100952, -0.03433710336685181, 0.18687152862548828, 0.3779292702674866, 0.21884170174598694, -0.12480933964252472, 0.02705422043800354, -0.451598584651947, 0.29744961857795715, -0.045494310557842255, -0.07074089348316193, 0.10050732642412186, -0.11440876126289368, 0.14883658289909363, 0.15863318741321564, 0.22254598140716553, 0.3080057203769684, 0.30261534452438354, 0.28153476119041443, -0.31625625491142273, -0.1943415105342865, 0.05452857166528702, -0.17329147458076477, 0.22605785727500916, -0.13560710847377777, 0.13303345441818237, -0.05133135989308357, 0.10636909306049347, 0.004578985273838043, 0.03694295138120651, 0.23842039704322815, 0.025827009230852127, -0.3806377947330475, 0.039896395057439804, 0.052067313343286514, -0.044480204582214355, -0.008907120674848557, -0.11647462844848633, -0.28676047921180725, -0.1160019114613533, 0.06739157438278198, 0.23168990015983582, 0.6677555441856384, -0.04129399359226227, -0.005149994045495987, 0.04732083901762962, -0.4719277322292328, -0.397247850894928, -0.034990619868040085, -0.2830820083618164, 0.09841520339250565, 0.15776169300079346, 0.44984519481658936, 0.11156638711690903, -0.2531615197658539, 0.6400967836380005, 0.14723484218120575, -0.19241830706596375, 0.10994526743888855, 0.10657966136932373, 0.10875274986028671, -0.16042591631412506, 0.003371022641658783, 0.12669149041175842, -0.06001274660229683, -0.07145383954048157, -0.23310093581676483, -0.35493677854537964, 0.0225643590092659, 0.013848453760147095, 0.4331592917442322, 0.38156116008758545, 0.09091007709503174, 0.2579393982887268, 0.5203464031219482, 0.3753034174442291, 0.30564239621162415, 0.3549169600009918, 0.10441368818283081, -0.12096822261810303, 0.30640530586242676, -0.061756979674100876, 0.3310107886791229, 0.15650516748428345, 0.03893859684467316, 0.1024666354060173, -0.04212415963411331, 0.1390385627746582, -0.3317560851573944, 0.3228486180305481, 0.29740220308303833, 0.08945722132921219, -0.3194742798805237, -0.23417314887046814, 0.5605676770210266, 0.2237863540649414, -0.18513858318328857, 0.46205535531044006, 0.47656798362731934, 0.14221742749214172, -0.23735760152339935, 0.0535312220454216, 0.6876662373542786, 0.03652339428663254, 0.0843450129032135, 0.24557602405548096, -0.1716538667678833, 0.5021944046020508, 0.12092886865139008, -0.11255741119384766, -0.2956690490245819, -0.4778720438480377, -0.1147816926240921, -0.22168965637683868, 0.28212952613830566, 0.18164986371994019, -0.19886085391044617, -0.024685045704245567, -0.010078608989715576, 0.18244445323944092, -0.0426989421248436, 0.06374534219503403, 0.01578056626021862, -0.07267148792743683, -0.3819888234138489, 0.12379936873912811, 0.18786393105983734, -0.0032548531889915466, 0.009337950497865677, -0.10062212496995926, 0.005843155086040497, -0.06039975583553314, -0.46392500400543213, -0.215630441904068, -0.13437829911708832, 0.001683047041296959, 0.27925679087638855, -0.26894479990005493, 0.309663325548172, 0.31478068232536316, 0.03121669590473175, 0.03956060856580734, -0.2702924609184265, 0.016941267997026443, -0.46603256464004517, -0.04583301395177841, -0.15623360872268677, -0.0017328537069261074, 0.2650192677974701, -0.12445999681949615, -0.20572254061698914, 0.27330511808395386, -0.014413940720260143, 0.017663992941379547, -0.08189457654953003, 0.16029593348503113, -0.2555714249610901, -0.1735800951719284, -0.06685684621334076, -0.10348141193389893, 0.02987971529364586, -0.2667164206504822, 0.12279190123081207, 0.21543750166893005, -0.134974405169487, -0.013182371854782104, 0.38662126660346985, 0.18081948161125183, 0.004753369837999344, 0.19999006390571594, -0.14869359135627747, -0.0018690265715122223, 0.2752649784088135, 0.19029584527015686, 0.04271792620420456, -0.21427711844444275, 0.2983703911304474, 0.48794981837272644, -0.21869215369224548, -0.005225362256169319, -0.1280592679977417, 0.06266826391220093, 0.19733859598636627, 0.3569820821285248, 0.19948846101760864, -0.1900319755077362, -0.291474848985672, -0.05818101763725281, -0.380281925201416, 0.2114996761083603, -0.11834833025932312, 0.49878138303756714, -0.17976614832878113, 0.01553733367472887, 0.05406750738620758, 0.12390604615211487, -0.31960728764533997, 0.2481546252965927, -0.3238677382469177, 0.06385061144828796, -0.0027058906853199005, 0.29910486936569214, 0.11340340226888657, -0.32903623580932617, -0.03589252755045891, 0.12018077075481415, -0.1838931143283844, -0.23190462589263916, -0.3390772342681885, 0.1232621818780899, 0.04798954352736473, -0.0015719970688223839, 0.28105440735816956, 0.35645216703414917, -0.004740025848150253, -0.2098502367734909, 0.16434156894683838, 0.038174763321876526, 0.23744867742061615, 0.23117558658123016, 0.043419331312179565, -0.1417311131954193, 0.20415537059307098, -0.050108253955841064, 0.2943195104598999, 0.18335741758346558, 0.31431862711906433, -0.0947323590517044, -0.1675238013267517, -0.07263274490833282, -0.039961036294698715, 0.1879500448703766, -0.04448845982551575, -0.34537273645401, 0.05059606209397316, 0.024674445390701294, 0.1378042995929718, -0.02454300969839096, 0.35334157943725586, 0.08927664160728455, 0.025667736306786537, 0.15037426352500916, 0.30592575669288635, 0.20607177913188934, -0.17182423174381256, -0.18203334510326385, 0.09415356814861298, -0.08178982138633728, 0.23998910188674927, -0.028304241597652435, 0.18823841214179993, 0.32001861929893494, 0.14300373196601868, -0.14567866921424866, -0.01934877038002014, -0.027893025428056717, 0.4929862916469574, 0.3488088846206665, -0.258378803730011, 0.07632290571928024, 0.11675278097391129, 0.06997772306203842, 0.3328181505203247, -0.08697538077831268, -0.03735604137182236, 0.36321741342544556, -0.23299872875213623, 0.08221489936113358, 0.5594727396965027, -0.2854762673377991, -0.0367400087416172, 0.0957808792591095, -0.1388898491859436, 0.0861751139163971, -0.20342570543289185, 0.5114114284515381, -0.1582646667957306, -0.3456505835056305, -0.2892789840698242, -0.06359891593456268, 0.0663788914680481, -0.09882193803787231, -0.09523183107376099, -0.224695086479187, 0.07751630246639252, 0.10034637153148651, 0.10745346546173096, -0.4275769591331482, 0.15210244059562683, -0.33202409744262695, -0.06720152497291565, -0.4065210223197937, -0.007738903164863586, 0.2845519185066223, 0.24093914031982422, 0.0388466976583004, -0.05671415477991104, -0.13501735031604767, 0.03450291231274605, 0.006947547197341919, 0.6226804256439209, 0.19371837377548218, -0.27195316553115845, 0.44941818714141846, -0.0038368357345461845, -0.2786705791950226, -0.00973641499876976, 0.0881032645702362, -0.09380677342414856, 0.09639129042625427, -0.3321148157119751, 0.24601216614246368, 0.1230233907699585, -0.13961772620677948, 0.1429746448993683, -0.16742339730262756, 0.2251497209072113, -0.420490562915802, -0.14190763235092163, -0.16621680557727814, -0.22157952189445496, 0.13824409246444702, -0.23807722330093384, -0.24364474415779114, 0.14908505976200104, 0.3808838129043579, 0.007307796739041805, -0.018475767225027084, 0.10627977550029755, 0.07049915194511414, 0.017670881003141403, 0.3879519999027252, 0.5070175528526306, 0.09120096266269684, 0.015564823523163795, -0.43380051851272583, -0.4961235821247101, -0.04777025431394577, -0.20837238430976868, -0.07556916773319244, 0.26718688011169434, 0.05149812996387482, 0.07923713326454163, 0.12025027722120285, 0.19340617954730988, -0.17290419340133667, 0.11228496581315994, 0.14889326691627502, -0.37478870153427124, -0.2444618195295334, 0.13332775235176086, 0.16476908326148987, -0.11152205616235733, 0.09730163961648941, 0.18336622416973114, -0.2671874761581421, -0.06053483113646507, -0.05396576225757599, 0.44090116024017334, -0.3858109414577484, -0.21345439553260803, 0.2742445170879364, -0.08931992202997208, 0.2211432158946991, -0.054289139807224274, -0.05792643874883652, -0.11337962746620178, 0.10592228174209595, 0.05678383633494377, 0.3305470645427704, 0.11929810047149658, 0.31754982471466064, -0.036603353917598724, -0.27145346999168396, -0.0694231167435646, -0.15288305282592773, 0.41361910104751587, 0.11769028753042221, -0.2102361023426056, 0.026282047852873802, 0.031072169542312622, -0.0865950658917427, 0.5606867671012878, 0.3495241403579712, -0.18189814686775208, -0.2859416902065277, -0.04567795991897583, -0.07513566315174103, 0.20338484644889832, -0.424296498298645, 0.020381338894367218, -0.007201461121439934, 0.073097825050354, 0.2851404547691345, -0.139703631401062, -0.5321119427680969, -0.07793181389570236, 0.3862553834915161, -0.25375956296920776, 0.08177225291728973, 0.42357978224754333, 0.0683879554271698, 0.024975959211587906, -0.06161919981241226, 0.7284913063049316, 0.26010146737098694, -0.12554772198200226, 0.07814939320087433, -0.223843514919281 ]
https://github.com/huggingface/datasets/issues/1783
Dataset Examples Explorer
Glad to see that it still exist, this existing one is more than good enough for me, it is feature rich, simple to use and concise. Hope similar feature can be retain in the future version.
In the Older version of the Dataset, there are a useful Dataset Explorer that allow user to visualize the examples (training, test and validation) of a particular dataset, it is no longer there in current version. Hope HuggingFace can re-enable the feature that at least allow viewing of the first 20 examples of a particular dataset, or alternatively can extract 20 examples for each datasets and make those part of the Dataset Card Documentation.
36
Dataset Examples Explorer In the Older version of the Dataset, there are a useful Dataset Explorer that allow user to visualize the examples (training, test and validation) of a particular dataset, it is no longer there in current version. Hope HuggingFace can re-enable the feature that at least allow viewing of the first 20 examples of a particular dataset, or alternatively can extract 20 examples for each datasets and make those part of the Dataset Card Documentation. Glad to see that it still exist, this existing one is more than good enough for me, it is feature rich, simple to use and concise. Hope similar feature can be retain in the future version.
[ -0.3628716468811035, -0.42387425899505615, -0.04691258817911148, 0.3083791732788086, 0.12723499536514282, 0.23467382788658142, 0.1710147261619568, 0.37074339389801025, -0.046005889773368835, 0.3754510283470154, 0.03735990822315216, 0.24077284336090088, -0.31069350242614746, 0.586772620677948, 0.4250445067882538, -0.37111109495162964, 0.017620742321014404, 0.18140748143196106, -0.08537518978118896, 0.0868423730134964, 0.05588091164827347, 0.07995843887329102, -0.18064291775226593, 0.19461625814437866, -0.4375639259815216, -0.20320959389209747, -0.29067930579185486, -0.018111824989318848, -0.22345271706581116, -0.5350553393363953, 0.09335079044103622, -0.11315938830375671, 0.3181231915950775, 0.09953145682811737, -0.00011166134208906442, -0.19113926589488983, 0.24279893934726715, 0.11751504242420197, -0.537482500076294, -0.017024189233779907, -0.3509195148944855, -0.06324776262044907, 0.32067570090293884, -0.18441535532474518, -0.18592804670333862, -0.3335360884666443, 0.2009565234184265, 0.08714324235916138, 0.362575888633728, -0.1000136062502861, 0.15401506423950195, 0.4514331817626953, -0.1147693619132042, -0.27463188767433167, 0.021525830030441284, 0.6503052711486816, -0.4158150255680084, 0.10277369618415833, 0.4872652292251587, 0.12204408645629883, -0.06283146888017654, 0.43643397092819214, 0.38492080569267273, 0.10844139754772186, 0.0827866643667221, 0.13598182797431946, 0.03674016892910004, -0.12854552268981934, -0.002676088362932205, 0.6877962946891785, 0.43814700841903687, 0.09319885820150375, -0.36321380734443665, -0.5371532440185547, -0.09443045407533646, -0.20775514841079712, -0.12356666475534439, 0.3460615575313568, 0.04566199332475662, 0.2922641932964325, -0.3274420499801636, 0.12380848824977875, -0.20140650868415833, -0.0435199961066246, -0.0316091850399971, -0.041952505707740784, -0.3505464792251587, -0.03885740041732788, 0.4434104263782501, -0.04545503109693527, 0.032144077122211456, 0.16507916152477264, 0.027494531124830246, 0.16763688623905182, -0.03626428171992302, -0.17897476255893707, 0.21439436078071594, 0.17905312776565552, 0.20067429542541504, 0.18325652182102203, 0.043674539774656296, 0.2886770963668823, -0.005131276324391365, 0.18752583861351013, 0.21003827452659607, -0.1485780030488968, 0.44558799266815186, 0.15799185633659363, 0.19875727593898773, 0.29058384895324707, 0.11119517683982849, -0.02473372220993042, -0.3412184417247772, 0.19070349633693695, -0.3514387607574463, -0.2364153265953064, 0.04807807505130768, -0.15703672170639038, -0.07454603910446167, -0.11041393876075745, -0.19669851660728455, -0.10011116415262222, 0.09877188503742218, 0.3787335455417633, -0.08206497877836227, -0.36993473768234253, -0.3043925166130066, -0.13231465220451355, 0.0953298881649971, -0.3404926657676697, -0.1633528172969818, 0.013424266129732132, -0.2573072612285614, 0.0765167623758316, 0.14089396595954895, -0.4891146421432495, 0.4031631648540497, -0.06372029334306717, -0.08232055604457855, 0.01820547878742218, 0.3176814615726471, 0.1376451700925827, 0.32319673895835876, 0.08467722684144974, -0.06982126832008362, -0.2001843899488449, 0.1453598439693451, 0.04668091982603073, -0.24021989107131958, -0.03320419043302536, -0.11505406349897385, -0.40292811393737793, -0.3197682797908783, 0.09049741923809052, -0.1786220222711563, 0.10104798525571823, -0.509185791015625, 0.5675256848335266, -0.4719490706920624, -0.14239586889743805, -0.05228758603334427, 0.16882775723934174, -0.2888944745063782, 0.08082086592912674, 0.3657822012901306, 0.3202442526817322, -0.3815149664878845, -0.40230265259742737, 0.0040489244274795055, -0.20244960486888885, -0.3541722893714905, -0.010266058146953583, -0.37488678097724915, 0.38426387310028076, -0.506060779094696, 0.19321168959140778, 0.34828799962997437, -0.2705029845237732, -0.026890194043517113, 0.0732422024011612, 0.1342189610004425, -0.01530049741268158, 0.05472072586417198, -0.16564027965068817, 0.5171093940734863, -0.058082811534404755, -0.3266589641571045, -0.005884099751710892, 0.05005259066820145, 0.004567960277199745, -0.005781069397926331, -0.14363358914852142, -0.012643009424209595, 0.09874139726161957, -0.1880904883146286, 0.08297556638717651, 0.10468690097332001, -0.029137935489416122, 0.5324888229370117, -0.2547031342983246, -0.062381334602832794, 0.12401614338159561, 0.24472297728061676, 0.18672668933868408, 0.03328990563750267, -0.39072471857070923, -0.26631641387939453, 0.08742699772119522, 0.017391104251146317, -0.17043685913085938, 0.3375401198863983, -0.3268713355064392, -0.10811837762594223, -0.030137887224555016, -0.26415255665779114, -0.24581173062324524, 0.11566278338432312, -0.16326652467250824, 0.11296777427196503, 0.1194048523902893, -0.23012825846672058, 0.10286282002925873, -0.48769083619117737, 0.19369973242282867, -0.3489358425140381, 0.19252249598503113, 0.11545912176370621, 0.08967657387256622, -0.0020304135978221893, 0.08054888248443604, -0.023296810686588287, -0.2826877534389496, 0.05232386291027069, 0.18061110377311707, 0.1651826798915863, -0.12753236293792725, 0.20217961072921753, 0.4183845520019531, 0.25019407272338867, -0.33302512764930725, -0.004209825769066811, -0.2055594027042389, -0.0718846246600151, 0.18679261207580566, -0.7351930141448975, 0.3116649091243744, 0.28925958275794983, 0.1737940013408661, 0.2762284278869629, 0.055966779589653015, 0.02721860073506832, 0.08492918312549591, -0.2509568929672241, -0.23386944830417633, 0.16243405640125275, 0.08342450857162476, 0.1351514607667923, 0.011841494590044022, -0.6773615479469299, 0.17999552190303802, 0.3371836841106415, -0.1255379617214203, -0.06369215995073318, 0.15971583127975464, -0.28300508856773376, -0.07185094058513641, 0.42287060618400574, 0.05802692845463753, 0.007861927151679993, 0.22130149602890015, 0.17576809227466583, 0.06113571673631668, -0.10282494127750397, 0.1389879435300827, 0.23111394047737122, 0.05953601002693176, -0.021347258239984512, -0.3625931143760681, -0.1599091738462448, 0.12347937375307083, -0.26913613080978394, -0.08518487215042114, 0.1261221021413803, 0.067501500248909, -0.24929772317409515, 0.08822319656610489, -0.3124130964279175, -0.46994903683662415, -0.05582790821790695, 0.05367039144039154, 0.10643592476844788, -0.3449406921863556, 0.09614860266447067, 0.1833513230085373, -0.13050180673599243, 0.08080143481492996, -0.0739755928516388, 0.4409167766571045, -0.26264336705207825, 0.6817626953125, -0.15893474221229553, 0.12168215215206146, -0.14660486578941345, 0.09290510416030884, 0.1964099407196045, 0.29978325963020325, 0.3955376446247101, -0.19229444861412048, 0.12537510693073273, -0.6362917423248291, -0.5710227489471436, 0.4147365987300873, 0.11405154317617416, 0.2819749414920807, 0.3237914741039276, 0.12125863879919052, -0.48097193241119385, -0.09206144511699677, 0.02389804646372795, -0.310850590467453, -0.19529560208320618, -0.16065265238285065, -0.06964987516403198, 0.08661580830812454, -0.0036351345479488373, -0.1760459542274475, -0.2337188571691513, -0.19288864731788635, 0.3730759024620056, -0.13502909243106842, 0.21569719910621643, 0.18019160628318787, 0.022220399230718613, 0.3586764931678772, -0.577390730381012, 0.06568779796361923, -0.12300512939691544, -0.41967901587486267, -0.034191008657217026, -0.5392011404037476, -0.35999614000320435, 0.04881077632308006, -0.18133854866027832, -0.12221403419971466, -0.08613047748804092, -0.22494053840637207, -0.2832895517349243, -0.28889200091362, -0.012711839750409126, -0.055016808211803436, 0.1428118348121643, 0.36446627974510193, -0.012961456552147865, -0.04805240407586098, 0.08233869820833206, -0.2271728813648224, -0.041186146438121796, -0.01952298730611801, 0.1034802794456482, -0.1157059445977211, 0.011371636763215065, 0.14244072139263153, 0.4282979965209961, 0.1344202756881714, -0.07861047983169556, 0.047712791711091995, -0.4147193729877472, 0.25432562828063965, -0.08435840159654617, -0.10630307346582413, 0.1534174382686615, -0.09898421168327332, 0.17140263319015503, 0.13085395097732544, 0.21026960015296936, 0.34521225094795227, 0.28850382566452026, 0.26340606808662415, -0.29600659012794495, -0.23340724408626556, 0.025863736867904663, -0.06856591254472733, 0.27100542187690735, -0.058105919510126114, 0.0561365932226181, -0.05029357969760895, 0.11480208486318588, 0.0017156237736344337, 0.1360841691493988, 0.2629622519016266, 0.042691536247730255, -0.4515693783760071, 0.048892952501773834, 0.0635928064584732, -0.06515754759311676, 0.042395345866680145, -0.14878752827644348, -0.27443432807922363, -0.10302486270666122, 0.013310559093952179, 0.2753252387046814, 0.6601607799530029, 0.022746797651052475, -0.021091654896736145, 0.0015430320054292679, -0.5326402187347412, -0.3859303593635559, -0.023572228848934174, -0.24939382076263428, 0.0746176689863205, 0.1191318929195404, 0.4595211446285248, 0.06351179629564285, -0.3181054890155792, 0.6373788118362427, 0.21319741010665894, -0.1942307949066162, 0.12622733414173126, 0.11924605071544647, 0.10609360784292221, -0.20075340569019318, 0.015885472297668457, 0.16773468255996704, -0.07218673080205917, -0.06926442682743073, -0.2534738779067993, -0.3691614866256714, 0.062305763363838196, -0.016083240509033203, 0.445326566696167, 0.38878533244132996, 0.07389447093009949, 0.32723701000213623, 0.4302352964878082, 0.4262763559818268, 0.3560321033000946, 0.2934800088405609, 0.01790124736726284, -0.14675137400627136, 0.25957581400871277, -0.10832319408655167, 0.4040627181529999, 0.20718616247177124, -0.04026724770665169, 0.1380898654460907, -0.10564883053302765, 0.15932253003120422, -0.33524090051651, 0.29041287302970886, 0.3205353915691376, 0.14101235568523407, -0.3666873276233673, -0.22207607328891754, 0.564984917640686, 0.2509385049343109, -0.19642668962478638, 0.48540011048316956, 0.5616512298583984, 0.1654270440340042, -0.23376357555389404, -0.01348394900560379, 0.748855471611023, 0.011356491595506668, 0.1794237494468689, 0.2811603546142578, -0.08629000186920166, 0.5181324481964111, 0.21363945305347443, -0.07859890162944794, -0.3509385287761688, -0.4129318594932556, -0.10723777860403061, -0.23593726754188538, 0.25145602226257324, 0.21314305067062378, -0.1995890736579895, -0.030932942405343056, 0.03396119177341461, 0.1847023218870163, -0.08068078011274338, 0.08582648634910583, 0.06718708574771881, -0.19965171813964844, -0.4594392776489258, 0.06681524217128754, 0.18641339242458344, -0.03131747618317604, -0.0020040590316057205, -0.14549341797828674, 0.03372635319828987, -0.07695139944553375, -0.41617703437805176, -0.24802765250205994, -0.12536746263504028, -0.027866628021001816, 0.37327247858047485, -0.3237704932689667, 0.324667364358902, 0.2412862926721573, -0.023240916430950165, 0.06661144644021988, -0.20861290395259857, -0.03162137791514397, -0.5383192300796509, 0.011953151784837246, -0.22888626158237457, -0.049735236912965775, 0.2615383565425873, -0.1323259174823761, -0.2374708354473114, 0.1870981752872467, -0.06151930242776871, 0.016133368015289307, -0.07066484540700912, 0.17416155338287354, -0.1979464739561081, -0.17898230254650116, -0.07287639379501343, -0.11469753086566925, 0.00568438321352005, -0.26685526967048645, 0.09958074986934662, 0.20716220140457153, -0.11864690482616425, -0.011444814503192902, 0.39657753705978394, 0.1650596261024475, 0.023877430707216263, 0.11083199083805084, -0.17631393671035767, -0.016129210591316223, 0.2718542814254761, 0.1713455766439438, 0.04965673387050629, -0.19897747039794922, 0.2984880805015564, 0.5128172636032104, -0.2056119740009308, 0.04053337499499321, -0.0790150836110115, -0.004781261086463928, 0.14209923148155212, 0.4264121949672699, 0.23346146941184998, -0.18816909193992615, -0.21816526353359222, -0.04268879070878029, -0.37369972467422485, 0.2281520515680313, -0.17073819041252136, 0.45157843828201294, -0.12383228540420532, -0.008598271757364273, 0.06441043317317963, 0.10720386356115341, -0.29792308807373047, 0.23733095824718475, -0.2675721347332001, 0.06758662313222885, 0.10665380954742432, 0.2853391170501709, 0.14868725836277008, -0.29662710428237915, -0.05603738874197006, 0.08989875763654709, -0.1692584902048111, -0.22352170944213867, -0.3569561839103699, 0.1449780911207199, 0.06432634592056274, -0.03981636464595795, 0.29318058490753174, 0.3415265679359436, -0.031243447214365005, -0.21596629917621613, 0.21449066698551178, 0.05331122875213623, 0.26253199577331543, 0.26503220200538635, 0.011876888573169708, -0.1454114019870758, 0.2332727164030075, 0.026836778968572617, 0.2896950840950012, 0.19864612817764282, 0.30816659331321716, -0.11801609396934509, -0.1354849487543106, -0.0996299684047699, 0.013954815454781055, 0.19519193470478058, -0.04865005612373352, -0.31194576621055603, 0.013578034937381744, 0.0048813968896865845, 0.07423268258571625, 0.0398385114967823, 0.35516810417175293, 0.11483092606067657, 0.016518956050276756, 0.17273078858852386, 0.297367662191391, 0.18092668056488037, -0.19038310647010803, -0.20953209698200226, 0.17146368324756622, -0.11087032407522202, 0.2763524651527405, 0.01868802309036255, 0.21209388971328735, 0.3231056034564972, 0.160031259059906, -0.1867731809616089, 0.036665745079517365, -0.017879318445920944, 0.4736909568309784, 0.28182777762413025, -0.25115901231765747, 0.0975116640329361, 0.1115468218922615, 0.16977083683013916, 0.367265522480011, -0.12093149125576019, -0.02342131733894348, 0.307620108127594, -0.1960166096687317, 0.08618547767400742, 0.5580363869667053, -0.32684817910194397, 0.033643245697021484, 0.08667613565921783, -0.16847485303878784, 0.04430173709988594, -0.20905384421348572, 0.5345993638038635, -0.12784110009670258, -0.4057990312576294, -0.25142666697502136, -0.06181742623448372, 0.05484195798635483, -0.11274257302284241, -0.03930937871336937, -0.21569043397903442, 0.08804231882095337, 0.09321852028369904, 0.10742868483066559, -0.3729962706565857, 0.2144722044467926, -0.3236887454986572, -0.008396163582801819, -0.425433486700058, 0.005701487883925438, 0.34779128432273865, 0.2657501697540283, 0.09099066257476807, -0.09729976207017899, -0.09930165112018585, 0.032881930470466614, -0.03462764248251915, 0.6206561923027039, 0.1180766373872757, -0.2262895405292511, 0.43332332372665405, 0.04067254066467285, -0.3129931688308716, 0.0022460967302322388, 0.07346964627504349, -0.12079444527626038, 0.10678770393133163, -0.3400857746601105, 0.23280750215053558, 0.07468317449092865, -0.10751111805438995, 0.15737636387348175, -0.14546148478984833, 0.09124647080898285, -0.43712708353996277, -0.17302986979484558, -0.18892322480678558, -0.22340872883796692, 0.03945797681808472, -0.23092585802078247, -0.21440118551254272, 0.09474855661392212, 0.5052253603935242, 0.03361675515770912, 0.010373754426836967, 0.07255563884973526, 0.05579075962305069, 0.007100770249962807, 0.3296579122543335, 0.5122726559638977, 0.10035829246044159, 0.030793849378824234, -0.3707306385040283, -0.4566684067249298, -0.05536315590143204, -0.27261409163475037, -0.11334744840860367, 0.3075873553752899, 0.05955592542886734, 0.020858213305473328, 0.14123153686523438, 0.23263174295425415, -0.19262799620628357, 0.14967454969882965, 0.09020061790943146, -0.4039149582386017, -0.24681855738162994, 0.16586647927761078, 0.14313800632953644, -0.11398705840110779, 0.019761718809604645, 0.19754932820796967, -0.21652808785438538, -0.08191696554422379, -0.0905742198228836, 0.44369518756866455, -0.390744149684906, -0.12347573041915894, 0.23003540933132172, -0.05083315074443817, 0.17910397052764893, -0.05477707460522652, -0.1305193156003952, -0.10952691733837128, 0.13215425610542297, 0.06013765558600426, 0.321605384349823, 0.13709025084972382, 0.2485485076904297, -0.04044150188565254, -0.28201308846473694, -0.10846082121133804, -0.10370373725891113, 0.4561384916305542, 0.061592526733875275, -0.24578474462032318, 0.07840342819690704, 0.06845808774232864, -0.0974803939461708, 0.5709721446037292, 0.3588673770427704, -0.20809799432754517, -0.24776457250118256, -0.10207526385784149, -0.10125734657049179, 0.2366829514503479, -0.38342249393463135, -0.025716204196214676, -0.03234437108039856, 0.0827091783285141, 0.27582287788391113, -0.10746478289365768, -0.530341625213623, -0.10593995451927185, 0.3487038314342499, -0.2784736156463623, 0.07355110347270966, 0.40933579206466675, 0.0977710634469986, -0.00544675812125206, -0.06865878403186798, 0.6830692291259766, 0.2762746512889862, -0.11772136390209198, 0.0996517688035965, -0.23936961591243744 ]
https://github.com/huggingface/datasets/issues/1781
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
Hi ! I'm not able to reproduce the issue. Can you try restarting your runtime ? The PyExtensionType is available in pyarrow starting 0.17.1 iirc. If restarting your runtime doesn't fix this, can you try updating pyarrow ? ``` pip install pyarrow --upgrade ```
I'm using Colab. And suddenly this morning, there is this error. Have a look below! ![screenshot-colab research google com-2021 01 26-08-15-36](https://user-images.githubusercontent.com/45964869/105799890-fdaf3b80-5fae-11eb-8f06-11b65cdccc30.png)
44
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import I'm using Colab. And suddenly this morning, there is this error. Have a look below! ![screenshot-colab research google com-2021 01 26-08-15-36](https://user-images.githubusercontent.com/45964869/105799890-fdaf3b80-5fae-11eb-8f06-11b65cdccc30.png) Hi ! I'm not able to reproduce the issue. Can you try restarting your runtime ? The PyExtensionType is available in pyarrow starting 0.17.1 iirc. If restarting your runtime doesn't fix this, can you try updating pyarrow ? ``` pip install pyarrow --upgrade ```
[ -0.179066002368927, -0.15857669711112976, -0.04439398646354675, 0.22058507800102234, 0.18019738793373108, -0.06392686814069748, 0.17997929453849792, 0.2682419419288635, -0.3114221692085266, 0.1932339370250702, -0.03610464185476303, 0.43298813700675964, -0.16673269867897034, -0.11185581982135773, 0.08164150267839432, -0.0672643631696701, 0.25074946880340576, 0.3972361981868744, 0.2283160537481308, 0.015299126505851746, -0.19879676401615143, 0.22143307328224182, -0.3317904472351074, 0.2289101630449295, -0.3630692958831787, 0.25725165009498596, 0.0558956116437912, -0.1920560896396637, -0.23017433285713196, -0.5764157772064209, 0.4622824490070343, -0.457690566778183, 0.1837867796421051, 0.01981905847787857, -0.00011443189578130841, -0.008583556860685349, 0.34698522090911865, 0.03693266957998276, -0.07819998264312744, -0.1799272745847702, 0.014669045805931091, -0.07960128039121628, 0.3153553605079651, -0.06888265907764435, 0.1376841962337494, -0.04909825697541237, -0.045562565326690674, 0.36711785197257996, -0.05168716609477997, 0.2796536684036255, 0.2375449240207672, -0.025175437331199646, 0.5402343273162842, 0.016723304986953735, 0.5226998925209045, -0.160902202129364, -0.22563759982585907, 0.6437641978263855, 0.3970012664794922, -0.33972710371017456, 0.33035194873809814, -0.06238802894949913, -0.31614866852760315, 0.14672787487506866, 0.34133756160736084, 0.009386362507939339, 0.4785269796848297, -0.2968401610851288, -0.03492124378681183, 0.06390508264303207, 0.1993097960948944, -0.10613257437944412, -0.053623609244823456, 0.1321716010570526, 0.2737749516963959, -0.4418092668056488, 0.17805412411689758, 0.37442347407341003, -0.0651029497385025, 0.16741809248924255, 0.34469401836395264, -0.02827387861907482, -0.15471677482128143, 0.11217723041772842, -0.3299473822116852, 0.4400119483470917, -0.06089147925376892, -0.012678653001785278, 0.16065989434719086, -0.014353696256875992, 0.4384034276008606, 0.17201927304267883, -0.14645689725875854, 0.1746092587709427, -0.1346682757139206, 0.1695788949728012, 0.0346125029027462, 0.3614486753940582, -0.01689755916595459, -0.30393409729003906, -0.16464047133922577, -0.2202560305595398, 0.18523795902729034, 0.45858800411224365, -0.15472418069839478, 0.2969103455543518, 0.04259827360510826, -0.1898493617773056, 0.19396474957466125, 0.043113961815834045, -0.10442915558815002, 0.1421607881784439, -0.14134030044078827, -0.37775135040283203, 0.23813529312610626, -0.08613263070583344, 0.4219924807548523, -0.15249411761760712, -0.45514002442359924, -0.3460395038127899, -0.5161126852035522, 0.07154242694377899, -0.08191058784723282, 0.2317310869693756, -0.1786215603351593, 0.13982254266738892, 0.013510208576917648, 0.22793515026569366, -0.12977533042430878, -0.2341379076242447, -0.04157037287950516, 0.3183738589286804, -0.1867557168006897, -0.2240164428949356, -0.060583509504795074, -0.19775378704071045, -0.03448711335659027, 0.06472138315439224, 0.002957269549369812, -0.17286501824855804, -0.36389830708503723, -0.23140329122543335, -0.2383745014667511, 0.32501932978630066, -0.12411992251873016, -0.01445235125720501, 0.17097792029380798, -0.5575416684150696, -0.14249421656131744, 0.31947511434555054, -0.5617523193359375, -0.40438851714134216, -0.2904805839061737, 0.16599972546100616, -0.17232652008533478, -0.15489722788333893, -0.306509405374527, -0.1803504228591919, -0.03396586328744888, -0.27121901512145996, -0.1344480812549591, -0.4794246554374695, -0.01606028527021408, -0.40122392773628235, -0.07799451053142548, 0.02371269464492798, -0.4536845088005066, -0.1713840663433075, -0.06733489036560059, -0.05933510139584541, 0.34551572799682617, 0.03483595699071884, -0.17410361766815186, 0.05995357781648636, -0.08434509485960007, 0.19870083034038544, 0.08481444418430328, -0.11367368698120117, -0.2233840674161911, -0.23622453212738037, -0.07850753515958786, -0.038603365421295166, -0.002075985074043274, -0.2877237796783447, -0.01976911909878254, -0.043131206184625626, 0.4431331753730774, 0.2906014323234558, -0.10933427512645721, 0.21798579394817352, -0.3110335171222687, -0.1981666386127472, 0.35804516077041626, 0.1255994439125061, 0.09553574025630951, -0.16782402992248535, 0.08927814662456512, -0.28284797072410583, 0.09090261906385422, -0.14410437643527985, -0.03334258496761322, -0.024779025465250015, 0.5660246014595032, 0.09152363240718842, -0.11757370084524155, -0.055566854774951935, 0.06030184403061867, 0.17707327008247375, -0.16718553006649017, 0.15225592255592346, -0.3447423577308655, -0.03800133243203163, -0.3247756063938141, 0.3926257789134979, -0.24539212882518768, -0.07465989887714386, 0.08875132352113724, -0.10591746866703033, -0.17910774052143097, 0.4000239372253418, -0.07048528641462326, 0.05814771354198456, 0.17782457172870636, 0.18562844395637512, 0.07449126243591309, 0.4301856458187103, -0.2708318829536438, -0.49790701270103455, -0.10840482264757156, 0.0034130066633224487, 0.23242297768592834, 0.00945682730525732, -0.10768033564090729, -0.06700023263692856, -0.02965463139116764, 0.1820957362651825, -0.27383244037628174, 0.1543230414390564, 0.09934838116168976, -0.46785157918930054, -0.009804422035813332, -0.22348208725452423, 0.06927631050348282, -0.018745433539152145, 0.8860568404197693, 0.1675926148891449, 0.2548609673976898, 0.13226419687271118, -0.26078662276268005, 0.168657124042511, 0.00463487021625042, 0.0924634337425232, 0.20963874459266663, 0.13990472257137299, 0.06811711937189102, 0.24119506776332855, -0.18112125992774963, -0.11707527935504913, -0.025532066822052002, 0.054254475980997086, 0.2834241986274719, 0.2026449590921402, 0.19769561290740967, 0.001947883516550064, -0.47568488121032715, 0.09324344992637634, 0.23659227788448334, -0.17329399287700653, 0.32500773668289185, 0.06680099666118622, -0.35975638031959534, 0.07572034001350403, 0.07933549582958221, -0.0889662504196167, 0.24296340346336365, 0.1491227149963379, 0.5926094055175781, -0.0030886568129062653, 0.26508793234825134, 0.08025014400482178, -0.16853897273540497, -0.2275591790676117, -0.08665158599615097, 0.2750096023082733, -0.2485770434141159, 0.2147493064403534, -0.3447982668876648, -0.023402489721775055, -0.16416124999523163, -0.5490456819534302, -0.10364356637001038, -0.12645727396011353, -0.1215846836566925, 0.28564348816871643, 0.19152548909187317, 0.05217289179563522, 0.2701267600059509, -0.09636636078357697, 0.07072865962982178, -0.45801568031311035, -0.07695148140192032, -0.22039812803268433, -0.3743087351322174, 0.02628912776708603, 0.12517771124839783, -0.05907200649380684, -0.03042467124760151, -0.36019331216812134, 0.1301649659872055, 0.07015792280435562, -0.36974987387657166, 0.10273679345846176, -0.2174154669046402, 0.3510775566101074, 0.12888458371162415, 0.13893570005893707, -0.22834308445453644, -0.22659358382225037, 0.34102752804756165, -0.22795650362968445, -0.23165807127952576, 0.17297138273715973, -0.25300338864326477, -0.14666648209095, -0.03882410749793053, -0.0024363771080970764, -0.40874674916267395, -0.13567502796649933, -0.0016155242919921875, 0.061780910938978195, 0.06477624922990799, 0.2473362684249878, 0.30244195461273193, 0.23006118834018707, 0.02466370351612568, -0.005518341436982155, 0.1005854606628418, 0.16626065969467163, 0.4291495084762573, -0.12838494777679443, -0.1799861490726471, 0.3432486355304718, -0.25965434312820435, -0.04546649381518364, -0.1025901511311531, -0.2102576494216919, -0.4968864619731903, -0.020850250497460365, 0.4942532777786255, -0.11824743449687958, -0.049484699964523315, 0.19532060623168945, 0.13268837332725525, 0.0062995608896017075, 0.09638757258653641, -0.029869992285966873, -0.44026273488998413, 0.3675147593021393, 0.23365983366966248, 0.059736255556344986, 0.038474373519420624, -0.13283522427082062, 0.5266127586364746, -0.31501781940460205, -0.03493945673108101, 0.3293401300907135, -0.2715456783771515, -0.06168583407998085, 0.02730552852153778, -0.3756975829601288, -0.02809549868106842, -0.15550270676612854, -0.2060227394104004, 0.17613351345062256, -0.2777554392814636, -0.16405221819877625, -0.16386252641677856, -0.07748456299304962, -0.23830166459083557, -0.21181178092956543, 0.1579081267118454, 0.3201145827770233, 0.22258377075195312, -0.1609208881855011, -0.17919453978538513, -0.013211393728852272, -0.14283734560012817, 0.12385009229183197, 0.20512808859348297, -0.271638423204422, 0.07009869068861008, 0.438311368227005, -0.6262348294258118, -0.05963931232690811, 0.29815223813056946, 0.3296099901199341, -0.04521605744957924, 0.1585371345281601, 0.06533285975456238, 0.04404796287417412, -0.01634994149208069, 0.35187315940856934, 0.2703380286693573, -0.07552319020032883, 0.14120782911777496, 0.07662786543369293, -0.149099200963974, -0.4287261962890625, -0.11910136044025421, -0.26810377836227417, 0.024327175691723824, -0.46824830770492554, -0.12966519594192505, 0.21631290018558502, 0.3303779065608978, 0.4147622585296631, -0.10042466223239899, 0.29330310225486755, -0.3792906403541565, -0.4569356441497803, -0.18292351067066193, -0.14716944098472595, 0.11072305589914322, 0.5425565838813782, 0.04420921951532364, 0.23260338604450226, -0.11236950755119324, -0.11950143426656723, 0.04818686842918396, 0.28083088994026184, 0.08009438216686249, -0.0887424573302269, -0.0581209734082222, -0.24516382813453674, -0.14979210495948792, 0.4851497411727905, 0.3575555682182312, 0.3432016372680664, -0.5243745446205139, -0.27358072996139526, 0.1761348396539688, 0.28267738223075867, -0.08507266640663147, -0.3356335163116455, 0.14720487594604492, -0.6066709756851196, -0.10709892213344574, 0.2576449513435364, -0.055998221039772034, 0.24302124977111816, 0.12221366912126541, -0.031008103862404823, 0.15050943195819855, 0.5593100190162659, 0.052468765527009964, 0.08376158773899078, -0.16321055591106415, 0.44748711585998535, -0.10408207029104233, 0.19984494149684906, 0.03314706310629845, 0.8620255589485168, 0.09621718525886536, -0.10626755654811859, 0.518458366394043, -0.08812826871871948, 0.18789632618427277, -0.008163534104824066, 0.1899983137845993, -0.304516464471817, -0.079903744161129, -0.08129177987575531, -0.23750457167625427, 0.30075639486312866, -0.3801078796386719, -0.1855715662240982, 0.03217501565814018, -0.10736636817455292, 0.041266340762376785, 0.2691590487957001, -0.32443076372146606, 0.10202840715646744, -0.02709486335515976, -0.18156085908412933, 0.12792029976844788, -0.3390735387802124, 0.3881623148918152, -0.23317554593086243, 0.08971408009529114, -0.23838168382644653, -0.034517668187618256, -0.35650885105133057, 0.15947529673576355, -0.47472986578941345, 0.09533769637346268, 0.4025703966617584, -0.2607308626174927, 0.21801520884037018, 0.25448235869407654, -0.08817142248153687, -0.20516051352024078, -0.11909683048725128, 0.1531812697649002, 0.21048933267593384, -0.29329895973205566, -0.1400909572839737, -0.014819738455116749, 0.3789055049419403, -0.26633572578430176, -0.2053689956665039, 0.3243809938430786, -0.12005529552698135, 0.01901249587535858, 0.20792412757873535, 0.2172120064496994, 0.21742261946201324, -0.13976897299289703, -0.11597082018852234, -0.15482014417648315, 0.4396524429321289, -0.1793830394744873, 0.09745441377162933, 0.10228678584098816, -0.1480678766965866, 0.23891469836235046, 0.05979292467236519, -0.12154389172792435, -0.06766597926616669, 0.03428736701607704, 0.05308378115296364, 0.12569260597229004, 0.43789055943489075, 0.036009375005960464, -0.1338089555501938, -0.0892588347196579, 0.08357780426740646, -0.2452509105205536, -0.39239293336868286, 0.16142317652702332, 0.041318997740745544, 0.09458674490451813, 0.15416939556598663, 0.6016365885734558, 0.22009119391441345, 0.19594278931617737, -0.002978019416332245, -0.3935840129852295, 0.015397442504763603, 0.1952129602432251, 0.22340556979179382, -0.18293771147727966, 0.14827576279640198, 0.4871101379394531, 0.231021910905838, -0.2154347449541092, -0.23554517328739166, 0.1699388325214386, -0.020215636119246483, 0.1654951125383377, -0.2081308364868164, -0.023761406540870667, 0.1376888006925583, -0.025588231161236763, 0.17065313458442688, 0.13605031371116638, 0.07900439202785492, -0.241306871175766, -0.20383679866790771, 0.15674355626106262, 0.04734967276453972, 0.10876408964395523, 0.14443162083625793, 0.03239097818732262, 0.13638952374458313, 0.10756276547908783, -0.014493142254650593, -0.011574728414416313, -0.26641952991485596, 0.020628008991479874, 0.5048084259033203, 0.011671774089336395, -0.10324139147996902, 0.1398867964744568, -0.1736040711402893, 0.45919692516326904, 0.172991082072258, 0.08511421084403992, 0.055666618049144745, 0.12225876748561859, 0.006754401605576277, -0.15250858664512634, -0.3688291311264038, -0.08225320279598236, 0.25275352597236633, -0.5157039761543274, -0.010296959429979324, -0.3664901852607727, -0.08044442534446716, 0.3681677579879761, -0.28237757086753845, 0.15502206981182098, 0.3580297529697418, 0.14871478080749512, -0.2343890517950058, 0.08023460954427719, 0.1561584621667862, 0.01210432592779398, -0.06572771072387695, 0.2085701823234558, 0.09627185761928558, 0.13251712918281555, 0.013520799577236176, 0.19413724541664124, 0.11257439851760864, 0.33379125595092773, 0.07331247627735138, 0.19916698336601257, -0.1907486617565155, 0.31112369894981384, 0.30128034949302673, -0.04472718760371208, 0.0997254028916359, 0.10714629292488098, -0.28487157821655273, 0.19150148332118988, -0.12234572321176529, -0.036642950028181076, 0.3447069823741913, -0.2727978527545929, 0.05454454943537712, -0.04998129606246948, 0.20501220226287842, -0.186661034822464, 0.22294868528842926, 0.49960747361183167, -0.038126811385154724, -0.08524609357118607, 0.045039862394332886, 0.47153306007385254, -0.09092093259096146, 0.21895970404148102, 0.21218876540660858, 0.04001975059509277, -0.1102890819311142, 0.061559874564409256, 0.08992946147918701, -0.16476723551750183, 0.1405574083328247, 0.3287213444709778, -0.2781497836112976, -0.16833467781543732, 0.13419601321220398, 0.15515103936195374, 0.24463880062103271, -0.1510166972875595, -0.029192553833127022, -0.012602478265762329, -0.2535861134529114, -0.34251847863197327, 0.33090949058532715, 0.5272141098976135, 0.3617963492870331, -0.22287090122699738, -0.3505690395832062, -0.26277655363082886, -0.08631542325019836, 0.11957180500030518, -0.16436517238616943, 0.19719991087913513, 0.5600981712341309, 0.07675668597221375, 0.19424186646938324, -0.17044949531555176, 0.13970449566841125, -0.09166513383388519, -0.04318961501121521, -0.04912309721112251, 0.1625780165195465, -0.008292954415082932, -0.25678667426109314, -0.5138967037200928, 0.0966707244515419, -0.050402767956256866, 0.350034236907959, 0.11257313191890717, 0.11481555551290512, -0.18550223112106323, 0.044288646429777145, 0.06090007722377777, 0.16654278337955475, 0.30519720911979675, 0.3875775635242462, 0.4755403697490692, -0.21389414370059967, -0.18143443763256073, -0.2916368842124939, 0.3696191906929016, -0.23896583914756775, 0.04145943373441696, 0.11052791029214859, -0.00628900621086359, -0.19997277855873108, 0.37022876739501953, -0.011493965983390808, 0.17657172679901123, 0.07348854094743729, 0.029802493751049042, -0.32098376750946045, -0.2221905142068863, 0.14447441697120667, -0.32794222235679626, 0.07144899666309357, -0.12310612946748734, 0.23197518289089203, -0.639985203742981, 0.1101718470454216, -0.35003089904785156, -0.27464666962623596, 0.0027534551918506622, -0.0029042549431324005, 0.659469485282898, -0.0845690593123436, 0.4161302447319031, 0.1328030228614807, 0.09509284794330597, 0.03782246261835098, -0.3472764790058136, -0.05209454894065857, 0.2472887635231018, -0.0002780631184577942, 0.22365136444568634, 0.11498802155256271, 0.007558055222034454, -0.3633068799972534, 0.36915329098701477, 0.010459054261446, -0.10326405614614487, -0.10034015029668808, 0.08077184855937958, 0.018232882022857666, 0.16123934090137482, -0.16696970164775848, 0.01774870976805687, -0.10940349102020264, 0.04703831672668457, -0.36118030548095703, -0.5371567606925964, 0.4243585467338562, -0.31465789675712585, -0.3414466083049774, 0.06733914464712143, 0.21002796292304993, -0.1327819526195526, -0.14682923257350922, -0.4087653160095215, 0.033232562243938446, 0.2969633638858795, 0.13313990831375122, -0.27543747425079346, 0.20855768024921417, 0.03382707014679909, 0.055705856531858444, -0.0335557647049427, 0.38381490111351013, -0.09978800266981125, 0.13471569120883942, -0.25185343623161316, -0.06294296681880951 ]
https://github.com/huggingface/datasets/issues/1781
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
Yes indeed. Also it looks like Pyarrow 3.0.0 got released on pypi 10 hours ago. This might be related to the bug, I'll investigate EDIT: looks like the 3.0.0 release doesn't have unexpected breaking changes for us, so I don't think the issue comes from that
I'm using Colab. And suddenly this morning, there is this error. Have a look below! ![screenshot-colab research google com-2021 01 26-08-15-36](https://user-images.githubusercontent.com/45964869/105799890-fdaf3b80-5fae-11eb-8f06-11b65cdccc30.png)
46
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import I'm using Colab. And suddenly this morning, there is this error. Have a look below! ![screenshot-colab research google com-2021 01 26-08-15-36](https://user-images.githubusercontent.com/45964869/105799890-fdaf3b80-5fae-11eb-8f06-11b65cdccc30.png) Yes indeed. Also it looks like Pyarrow 3.0.0 got released on pypi 10 hours ago. This might be related to the bug, I'll investigate EDIT: looks like the 3.0.0 release doesn't have unexpected breaking changes for us, so I don't think the issue comes from that
[ -0.013139113783836365, -0.06683285534381866, -0.033118851482868195, 0.14838828146457672, 0.1552635282278061, -0.1366586983203888, 0.29721206426620483, 0.3255242705345154, -0.39373573660850525, 0.1865735948085785, -0.017268963158130646, 0.30171290040016174, -0.09787227213382721, -0.13595294952392578, 0.15709733963012695, -0.07664674520492554, 0.3692229092121124, 0.3322659134864807, 0.21011176705360413, 0.03413212299346924, -0.20479005575180054, 0.24357427656650543, -0.36056429147720337, 0.2816299796104431, -0.3349715769290924, 0.29646557569503784, -0.05019453912973404, -0.211492121219635, -0.17204886674880981, -0.55152428150177, 0.4652974307537079, -0.37165728211402893, 0.17180286347866058, 0.08620789647102356, -0.00011528708273544908, 0.04787617176771164, 0.3382730484008789, 0.010899191722273827, -0.06026396527886391, -0.09714432060718536, 0.005682986229658127, -0.04947934299707413, 0.24770964682102203, -0.01704583317041397, 0.17995375394821167, -0.04658542573451996, -0.1243838369846344, 0.3421863317489624, -0.09060172736644745, 0.30164965987205505, 0.23600538074970245, 0.082858145236969, 0.4873177409172058, 0.03093213587999344, 0.6077613830566406, -0.0773162841796875, -0.2693597674369812, 0.5535904765129089, 0.3471966087818146, -0.3623817265033722, 0.3086407482624054, -0.03970615938305855, -0.2690623104572296, 0.11965301632881165, 0.28641200065612793, 0.029936853796243668, 0.42403608560562134, -0.26885896921157837, -0.09927459806203842, 0.1516016125679016, 0.16770613193511963, -0.17284420132637024, -0.1481737345457077, 0.057955302298069, 0.2575570046901703, -0.4599105417728424, 0.2317679226398468, 0.31120190024375916, -0.11514848470687866, 0.15627172589302063, 0.384308397769928, 0.0039481064304709435, -0.212108314037323, 0.05668799206614494, -0.3574643135070801, 0.43640074133872986, 0.00009575346484780312, -0.03212384879589081, 0.18041591346263885, -0.0024624839425086975, 0.4826473891735077, 0.21764430403709412, -0.22505974769592285, 0.18745838105678558, -0.12645190954208374, 0.12052595615386963, 0.09698395431041718, 0.21317380666732788, 0.032653406262397766, -0.24343304336071014, -0.17189384996891022, -0.27317672967910767, 0.2743750512599945, 0.34536421298980713, -0.17472249269485474, 0.24055860936641693, 0.051155783236026764, -0.09853827208280563, 0.21413572132587433, -0.017026888206601143, 0.0022328458726406097, 0.1582271307706833, -0.13248850405216217, -0.3309861123561859, 0.15951193869113922, -0.1174669936299324, 0.3887006640434265, -0.10719740390777588, -0.40329185128211975, -0.36724385619163513, -0.47721660137176514, 0.042582955211400986, -0.2066439837217331, 0.16537833213806152, -0.09996519237756729, 0.17632165551185608, -0.05194421112537384, 0.24944496154785156, -0.20047806203365326, -0.1350608915090561, -0.01542728953063488, 0.306982159614563, -0.13814039528369904, -0.11662740260362625, -0.15019550919532776, -0.11737293004989624, -0.12035509943962097, -0.028893016278743744, 0.0037055090069770813, -0.09388630837202072, -0.3903518319129944, -0.22690850496292114, -0.192728191614151, 0.4000966250896454, -0.20944738388061523, 0.010631630197167397, 0.036166317760944366, -0.4328800439834595, -0.17511148750782013, 0.30840906500816345, -0.5105229616165161, -0.41895440220832825, -0.338699072599411, 0.16220466792583466, -0.23925568163394928, -0.15903311967849731, -0.21014603972434998, -0.15391750633716583, -0.02578253298997879, -0.2977166175842285, -0.06793690472841263, -0.45933955907821655, 0.06612333655357361, -0.3761543035507202, -0.08899462968111038, 0.11719983071088791, -0.46005699038505554, -0.20829392969608307, -0.03967466577887535, -0.1002497673034668, 0.21234041452407837, 0.03345280885696411, -0.1382896602153778, 0.04763438552618027, -0.13627736270427704, 0.2307429164648056, -0.024285249412059784, -0.059462204575538635, -0.2722768187522888, -0.23208343982696533, -0.04425130784511566, -0.038859494030475616, 0.09284978359937668, -0.31695085763931274, 0.03434407711029053, -0.0749509185552597, 0.40464335680007935, 0.23132486641407013, -0.11846943199634552, 0.25285932421684265, -0.21519051492214203, -0.22505803406238556, 0.408880352973938, 0.06684201955795288, 0.09730346500873566, -0.23978015780448914, 0.06920175999403, -0.21931007504463196, 0.1449560970067978, -0.1628500372171402, -0.01612803526222706, -0.004173826426267624, 0.5557934641838074, 0.011431761085987091, -0.08562876284122467, -0.05057188868522644, 0.018957067281007767, 0.2229176163673401, -0.18532051146030426, 0.19592657685279846, -0.37701737880706787, 0.05082065612077713, -0.2732279300689697, 0.4390938878059387, -0.23996995389461517, -0.22913721203804016, 0.06914353370666504, -0.0709550678730011, -0.16861414909362793, 0.45759132504463196, -0.12533001601696014, 0.08456648886203766, 0.2847537398338318, 0.14485719799995422, 0.1470870077610016, 0.49994438886642456, -0.2506093680858612, -0.45304781198501587, -0.158419668674469, 0.009718380868434906, 0.18617752194404602, -0.03563063219189644, -0.08804550021886826, -0.05687359720468521, 0.010895384475588799, 0.2653045058250427, -0.2652033269405365, 0.12354980409145355, 0.17384271323680878, -0.3929583430290222, -0.01811387576162815, -0.1742798089981079, 0.08774369955062866, -0.03356049209833145, 0.8921661376953125, 0.1687951236963272, 0.4038027822971344, 0.16025689244270325, -0.15179699659347534, 0.13157056272029877, -0.013512803241610527, 0.1269463747739792, 0.17199639976024628, 0.1579272449016571, 0.035810381174087524, 0.30806297063827515, -0.16347172856330872, -0.08712586760520935, 0.004098586738109589, 0.08150841295719147, 0.3480774164199829, 0.09090116620063782, 0.13216833770275116, 0.09513211995363235, -0.4533499479293823, 0.10858374089002609, 0.28759071230888367, -0.20442548394203186, 0.30062538385391235, -0.002722680103033781, -0.34787416458129883, 0.0968063622713089, 0.06877963989973068, -0.10363321006298065, 0.2312449812889099, 0.1464689075946808, 0.6274521946907043, -0.053961917757987976, 0.26004645228385925, 0.12081463634967804, -0.17547300457954407, -0.17357736825942993, -0.034508757293224335, 0.1754898577928543, -0.3216809928417206, 0.24726884067058563, -0.28657329082489014, -0.033084530383348465, -0.1837986409664154, -0.617289125919342, -0.24672889709472656, -0.09722479432821274, -0.0863637626171112, 0.23979467153549194, 0.14394842088222504, 0.04948198050260544, 0.19442617893218994, -0.1363154500722885, 0.1318316012620926, -0.3939235806465149, -0.06596300005912781, -0.16600094735622406, -0.4110148251056671, 0.03423358127474785, 0.078910693526268, -0.12802380323410034, -0.08261910080909729, -0.3824837803840637, 0.09803891181945801, 0.023292530328035355, -0.4178723692893982, 0.1835727095603943, -0.23670591413974762, 0.25174716114997864, 0.15669915080070496, 0.0464334636926651, -0.13016526401042938, -0.18292683362960815, 0.28201159834861755, -0.2733275294303894, -0.31711074709892273, 0.24813073873519897, -0.19685086607933044, -0.025536032393574715, -0.04235421493649483, 0.0016373395919799805, -0.4315139949321747, -0.12709644436836243, 0.006396085023880005, 0.0411541573703289, 0.08137278258800507, 0.40089479088783264, 0.30151018500328064, 0.25641930103302, -0.06941280514001846, -0.05168689787387848, 0.20515099167823792, 0.17295949161052704, 0.4019711911678314, -0.045333683490753174, -0.24625013768672943, 0.19888347387313843, -0.21107257902622223, -0.1946016252040863, -0.04317750409245491, -0.25077319145202637, -0.4114254415035248, 0.006034886464476585, 0.5550534129142761, -0.04975312203168869, -0.06974127143621445, 0.34150466322898865, 0.06409693509340286, 0.020394375547766685, 0.10280109196901321, -0.05755051225423813, -0.42462897300720215, 0.3636843264102936, 0.195074200630188, 0.020997196435928345, -0.047095075249671936, -0.09102967381477356, 0.5344070792198181, -0.30501657724380493, 0.019694577902555466, 0.38063231110572815, -0.3165947496891022, 0.008518509566783905, -0.007504165172576904, -0.35083186626434326, 0.0020640434231609106, -0.21640586853027344, -0.20690765976905823, 0.11515316367149353, -0.2021021842956543, -0.19994699954986572, -0.23242537677288055, -0.008179422467947006, -0.14882612228393555, -0.24503089487552643, 0.16059283912181854, 0.17233775556087494, 0.20589080452919006, -0.14720988273620605, -0.035969484597444534, -0.08034902811050415, -0.13512271642684937, 0.14141204953193665, 0.09918244928121567, -0.23918110132217407, 0.02217063121497631, 0.3737476170063019, -0.47153520584106445, -0.18653389811515808, 0.20907679200172424, 0.391167551279068, -0.0005611022934317589, 0.21551115810871124, -0.10193808376789093, 0.03022334724664688, -0.059764791280031204, 0.4634603261947632, 0.3329997658729553, -0.07641333341598511, 0.24970537424087524, 0.10639496147632599, -0.19253355264663696, -0.46607229113578796, -0.1530638039112091, -0.3820139467716217, 0.0467139333486557, -0.39567503333091736, -0.09915712475776672, 0.19174256920814514, 0.3078092932701111, 0.35427895188331604, -0.05241626128554344, 0.23269280791282654, -0.3907874524593353, -0.5037894248962402, -0.1083223894238472, -0.18566161394119263, 0.07354152947664261, 0.4067327678203583, -0.051160551607608795, 0.20219895243644714, -0.05224967002868652, -0.17192310094833374, -0.05511835217475891, 0.2742961645126343, -0.026355810463428497, -0.11140350997447968, -0.04322157800197601, -0.2032582312822342, -0.12010660767555237, 0.49741485714912415, 0.3016120195388794, 0.4307505786418915, -0.5198168754577637, -0.23466438055038452, 0.15395453572273254, 0.27330541610717773, 0.028220705687999725, -0.2632870376110077, 0.16595163941383362, -0.5596693754196167, -0.17249111831188202, 0.24116124212741852, -0.1367810219526291, 0.35887637734413147, 0.09730635583400726, -0.05963510274887085, 0.2025464028120041, 0.5289084911346436, 0.024894777685403824, 0.0749858021736145, -0.24590662121772766, 0.453762412071228, -0.09831435978412628, 0.06993433833122253, 0.04367354139685631, 0.8350269794464111, 0.12485070526599884, 0.0305071622133255, 0.6416877508163452, -0.21586009860038757, 0.25376543402671814, 0.09450384974479675, 0.17313827574253082, -0.2961379587650299, -0.10710655897855759, -0.10754770785570145, -0.2412974238395691, 0.3092472553253174, -0.5395004153251648, -0.12651926279067993, -0.01607486605644226, -0.06288272887468338, 0.13114434480667114, 0.34686148166656494, -0.4278763234615326, 0.0938200056552887, -0.03303326666355133, -0.2038724720478058, 0.11214406788349152, -0.21382103860378265, 0.396659255027771, -0.20330801606178284, 0.06484274566173553, -0.20752181112766266, -0.09532395005226135, -0.325408399105072, 0.2572110593318939, -0.3843841850757599, 0.07236475497484207, 0.43094882369041443, -0.31361958384513855, 0.08975982666015625, 0.14767448604106903, -0.10389688611030579, -0.330849289894104, -0.13816481828689575, 0.13799592852592468, 0.28117552399635315, -0.16024896502494812, -0.03305751830339432, -0.07589474320411682, 0.4511496126651764, -0.25675591826438904, -0.24070414900779724, 0.3248727023601532, -0.1724441647529602, -0.025204386562108994, 0.16898787021636963, 0.21269793808460236, 0.31295448541641235, -0.06340562552213669, 0.04744889214634895, -0.19498100876808167, 0.4568574130535126, -0.18302017450332642, 0.0838969349861145, 0.0512908473610878, -0.15371759235858917, 0.13181157410144806, -0.06724046170711517, -0.08206115663051605, -0.09339375793933868, 0.14226451516151428, 0.10500384867191315, 0.1677749752998352, 0.47029682993888855, 0.09164342284202576, -0.0756586343050003, -0.060848355293273926, 0.1444074511528015, -0.18362978100776672, -0.4542887508869171, 0.09266813844442368, -0.05914154276251793, 0.0339042991399765, 0.07915851473808289, 0.5761156678199768, 0.21809430420398712, 0.09877312183380127, -0.018340598791837692, -0.33461424708366394, -0.004028951749205589, 0.1269533783197403, 0.1444270759820938, -0.2800024747848511, 0.15899956226348877, 0.4735192358493805, 0.30882498621940613, -0.29217207431793213, -0.20726138353347778, 0.13440749049186707, 0.013931864872574806, 0.11143762618303299, -0.19843555986881256, -0.03447981923818588, 0.16419155895709991, -0.05301607400178909, 0.18027670681476593, 0.17622250318527222, 0.02990342490375042, -0.1960485875606537, -0.2763873338699341, 0.16464242339134216, 0.02624550834298134, 0.08284502476453781, 0.22776472568511963, -0.014227584935724735, 0.12884771823883057, 0.14008918404579163, -0.03355776518583298, -0.023217810317873955, -0.31327497959136963, 0.07495005428791046, 0.468621164560318, -0.003545016050338745, -0.038327768445014954, 0.1672215461730957, -0.18216553330421448, 0.46136194467544556, 0.12798219919204712, 0.19625048339366913, -0.004873797297477722, 0.14136666059494019, -0.0738830715417862, -0.05002062767744064, -0.5202835202217102, -0.0969451442360878, 0.3002704083919525, -0.5328297019004822, 0.0007334351539611816, -0.43180668354034424, -0.00645560584962368, 0.4072602689266205, -0.3208840489387512, 0.08987902104854584, 0.40286001563072205, 0.13453900814056396, -0.2542095184326172, 0.06818421930074692, 0.050243400037288666, -0.0042674243450164795, -0.11726610362529755, 0.20478233695030212, 0.10543879866600037, 0.0983833521604538, 0.11259937286376953, 0.21779367327690125, 0.09511840343475342, 0.40876632928848267, 0.07844606041908264, 0.31083303689956665, -0.2199387401342392, 0.32161200046539307, 0.3078155219554901, -0.08268266916275024, 0.07007526606321335, 0.049184806644916534, -0.24887681007385254, 0.19715581834316254, -0.14394226670265198, -0.013207223266363144, 0.31239786744117737, -0.23278596997261047, 0.09402049332857132, -0.09648671746253967, 0.17341655492782593, -0.20892110466957092, 0.30621838569641113, 0.49252504110336304, -0.059741515666246414, -0.09543176740407944, -0.07269503176212311, 0.4616527855396271, -0.09854511171579361, 0.21102778613567352, 0.270174115896225, -0.004065506160259247, -0.03814774379134178, 0.023346956819295883, 0.03644499555230141, -0.18816794455051422, 0.2913277745246887, 0.27027562260627747, -0.2566879987716675, -0.25349631905555725, 0.13037356734275818, 0.0896567702293396, 0.25839364528656006, -0.18121792376041412, 0.033764034509658813, -0.06949952244758606, -0.2266218662261963, -0.3217247426509857, 0.3388970196247101, 0.5313583016395569, 0.3796488642692566, -0.19520303606987, -0.3217881917953491, -0.18601542711257935, -0.07299149036407471, 0.11963152885437012, -0.1308956742286682, 0.2220325618982315, 0.660336971282959, 0.11936742067337036, 0.16981396079063416, -0.12563355267047882, 0.18396128714084625, -0.030759166926145554, 0.056301139295101166, -0.1492142677307129, 0.22866052389144897, -0.146794393658638, -0.24530619382858276, -0.4656851291656494, 0.12320536375045776, -0.055509958416223526, 0.3984946310520172, 0.07432334125041962, 0.08254687488079071, -0.10172319412231445, 0.03005039319396019, 0.05634824186563492, 0.18427325785160065, 0.34459590911865234, 0.40531542897224426, 0.39790427684783936, -0.11088967323303223, -0.10444333404302597, -0.2590639591217041, 0.44234609603881836, -0.24954238533973694, 0.08958127349615097, 0.13166046142578125, -0.008886713534593582, -0.1571730375289917, 0.3125438690185547, -0.015456020832061768, 0.24764220416545868, -0.07971395552158356, -0.08511926233768463, -0.39250198006629944, -0.24600274860858917, 0.10715162754058838, -0.20532776415348053, -0.01829765923321247, -0.14190571010112762, 0.30421972274780273, -0.6519697904586792, 0.12240023165941238, -0.2782094478607178, -0.25642651319503784, 0.0777498334646225, 0.0453961156308651, 0.6552144885063171, -0.021903352811932564, 0.3961556553840637, 0.17052426934242249, -0.0270980317145586, -0.07992707192897797, -0.3554825782775879, -0.08622807264328003, 0.20466667413711548, -0.0640852153301239, 0.12381362915039062, 0.1020914614200592, -0.09471480548381805, -0.3230879604816437, 0.43256768584251404, 0.051791757345199585, -0.03719508275389671, -0.13372190296649933, 0.13919810950756073, 0.06386548280715942, 0.08631172776222229, -0.11778466403484344, -0.046327143907547, -0.16436035931110382, -0.037895191460847855, -0.3274340033531189, -0.5092478394508362, 0.30030882358551025, -0.4232929050922394, -0.33630022406578064, 0.0668107122182846, 0.18471911549568176, -0.22125154733657837, -0.1529460847377777, -0.3810844123363495, 0.09958719462156296, 0.3112213909626007, 0.13132593035697937, -0.30762648582458496, 0.2013767659664154, -0.02417808771133423, 0.0009542889893054962, -0.012242212891578674, 0.4474138915538788, -0.146101176738739, 0.05423465371131897, -0.12151813507080078, -0.04455246776342392 ]
https://github.com/huggingface/datasets/issues/1781
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
Installing datasets installs pyarrow>=0.17.1 so in theory it doesn't matter which version of pyarrow colab has by default (which is currently pyarrow 0.14.1). Also now the colab runtime refresh the pyarrow version automatically after the update from pip (previously you needed to restart your runtime). I guess what happened is that Colab didn't refresh pyarrow for some reason, and the AttributeError was raised *before* the pyarrow version check from `datasets` at https://github.com/huggingface/datasets/blob/master/src/datasets/__init__.py#L60
I'm using Colab. And suddenly this morning, there is this error. Have a look below! ![screenshot-colab research google com-2021 01 26-08-15-36](https://user-images.githubusercontent.com/45964869/105799890-fdaf3b80-5fae-11eb-8f06-11b65cdccc30.png)
72
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import I'm using Colab. And suddenly this morning, there is this error. Have a look below! ![screenshot-colab research google com-2021 01 26-08-15-36](https://user-images.githubusercontent.com/45964869/105799890-fdaf3b80-5fae-11eb-8f06-11b65cdccc30.png) Installing datasets installs pyarrow>=0.17.1 so in theory it doesn't matter which version of pyarrow colab has by default (which is currently pyarrow 0.14.1). Also now the colab runtime refresh the pyarrow version automatically after the update from pip (previously you needed to restart your runtime). I guess what happened is that Colab didn't refresh pyarrow for some reason, and the AttributeError was raised *before* the pyarrow version check from `datasets` at https://github.com/huggingface/datasets/blob/master/src/datasets/__init__.py#L60
[ -0.41816338896751404, 0.15043899416923523, -0.019076403230428696, 0.15334820747375488, 0.13422739505767822, -0.023693084716796875, 0.25424647331237793, 0.24548885226249695, -0.32417160272598267, 0.1116398498415947, 0.03812099248170853, 0.3774307668209076, -0.08131327480077744, -0.04786330461502075, -0.01188556756824255, 0.04188723862171173, 0.30278050899505615, 0.3409290313720703, 0.20719014108181, 0.025910526514053345, -0.2342766672372818, 0.09097187221050262, -0.32104623317718506, 0.20351728796958923, -0.41183462738990784, 0.22036901116371155, -0.01748167909681797, -0.17000219225883484, -0.31729692220687866, -0.6792120337486267, 0.5830787420272827, -0.23232215642929077, 0.2768802046775818, 0.1425853967666626, -0.00012093279656255618, -0.020916353911161423, 0.3580552935600281, 0.10246513783931732, -0.28933706879615784, -0.14015506207942963, -0.15110495686531067, -0.18668164312839508, 0.3294045031070709, 0.013839423656463623, 0.20986151695251465, -0.25613027811050415, -0.013452088460326195, 0.2181423306465149, -0.0807277113199234, 0.2746797800064087, 0.16976578533649445, 0.05678559094667435, 0.4970564842224121, 0.04246405139565468, 0.3831527531147003, -0.0710187703371048, -0.12620000541210175, 0.5384051203727722, 0.25737595558166504, -0.3175983428955078, 0.32736214995384216, 0.09556914865970612, -0.3002932369709015, 0.24530863761901855, 0.33841797709465027, 0.026111053302884102, 0.31563735008239746, -0.19505594670772552, -0.008002456277608871, 0.2326880693435669, 0.4724454879760742, -0.2055782675743103, -0.3742721974849701, -0.14508721232414246, 0.24624359607696533, -0.350483238697052, 0.29556354880332947, 0.18235772848129272, 0.013467969372868538, 0.14899547398090363, 0.14975418150424957, -0.018453089520335197, -0.06698118150234222, 0.07979822158813477, -0.3698370158672333, 0.4304916262626648, -0.11515753716230392, 0.09487272799015045, 0.11713124811649323, -0.06679286062717438, 0.5531336665153503, -0.03533129766583443, -0.21782603859901428, 0.24894174933433533, -0.23379166424274445, 0.10790489614009857, 0.08493905514478683, 0.38369491696357727, 0.01914399489760399, -0.16348066926002502, -0.27991238236427307, -0.3150511682033539, 0.043429888784885406, 0.3021688759326935, -0.03142065554857254, 0.2702072858810425, 0.07229631394147873, -0.04556749761104584, 0.23698098957538605, 0.013028662651777267, -0.03439734876155853, 0.11623691767454147, -0.10014235228300095, -0.3603297472000122, 0.25204116106033325, -0.05745069682598114, 0.6233629584312439, -0.23488721251487732, -0.420815110206604, -0.2791058421134949, -0.4959391951560974, -0.12938766181468964, -0.14017143845558167, 0.1667960286140442, -0.2977568805217743, 0.2598460614681244, -0.14327466487884521, 0.10833533108234406, -0.2539903521537781, -0.1861823946237564, -0.06465117633342743, 0.1568896770477295, -0.14106334745883942, -0.1038215309381485, -0.07832160592079163, -0.1958211213350296, -0.0039001775439828634, 0.06011559069156647, -0.12462309002876282, -0.06847627460956573, -0.26990336179733276, -0.31821197271347046, -0.16368737816810608, 0.430707722902298, -0.2343379706144333, 0.16126596927642822, 0.11761483550071716, -0.5139937996864319, -0.168796107172966, 0.2821596562862396, -0.5118221640586853, -0.44347187876701355, -0.20829251408576965, 0.09986791759729385, -0.3005484342575073, -0.19365131855010986, -0.42571887373924255, -0.09903505444526672, 0.08824768662452698, -0.4811261296272278, -0.024284623563289642, -0.5677357316017151, 0.00944444164633751, -0.37484127283096313, -0.03117576614022255, 0.29547834396362305, -0.603542149066925, -0.1913350373506546, -0.11963095515966415, -0.14386974275112152, 0.14222358167171478, -0.032060179859399796, -0.13555003702640533, 0.0877712070941925, -0.0691845640540123, 0.005296811461448669, 0.09780509769916534, -0.2019418179988861, -0.42897823452949524, -0.1281321942806244, 0.039155274629592896, 0.0890587791800499, 0.06298962235450745, -0.17877422273159027, 0.07338263839483261, -0.07386445254087448, 0.3456246852874756, 0.21203450858592987, -0.1600935161113739, 0.0766816958785057, -0.0946311503648758, -0.19602146744728088, 0.3323124647140503, 0.1353759914636612, 0.07914695143699646, -0.09637115150690079, 0.1051182895898819, -0.1528167426586151, 0.10424864292144775, -0.08243240416049957, -0.0228678360581398, 0.015180077403783798, 0.5127729773521423, 0.012978434562683105, -0.11648569256067276, -0.16115394234657288, -0.18592894077301025, 0.22426223754882812, 0.08500297367572784, -0.0598825141787529, -0.4205753207206726, -0.1836571842432022, -0.2416517436504364, 0.2941115200519562, -0.1884557008743286, -0.2594417929649353, -0.005725370720028877, 0.12021605670452118, -0.1577472686767578, 0.3912125527858734, -0.1406082957983017, 0.3141976296901703, 0.06999421864748001, 0.24493540823459625, -0.07930251955986023, 0.3649936616420746, -0.16731294989585876, -0.3892546594142914, -0.15349817276000977, 0.04619458317756653, 0.13880950212478638, -0.044994056224823, -0.11339759081602097, 0.1098344475030899, -0.009378081187605858, 0.29660680890083313, -0.22146153450012207, 0.15785722434520721, 0.1264437735080719, -0.18219147622585297, 0.03108161874115467, -0.3086499273777008, -0.004707865417003632, 0.0026353299617767334, 0.6934741139411926, 0.1561754047870636, 0.2425142377614975, 0.1873309314250946, -0.193978950381279, 0.07101727277040482, 0.04523830860853195, 0.1769442856311798, 0.03382541984319687, 0.08479981124401093, -0.02667905017733574, 0.2097434401512146, 0.024180322885513306, 0.015294485725462437, -0.12462848424911499, 0.1560421586036682, 0.3652099072933197, 0.14918865263462067, 0.15325042605400085, -0.01867004483938217, -0.4601624011993408, 0.06894917041063309, 0.3831287920475006, 0.13045166432857513, 0.4296896457672119, 0.03335925564169884, -0.305747389793396, 0.04278634488582611, -0.07289865612983704, 0.0013501029461622238, 0.06720495969057083, 0.1850845068693161, 0.5060129761695862, -0.020159035921096802, 0.21835918724536896, 0.20898205041885376, -0.15881489217281342, -0.31020042300224304, 0.04113030433654785, 0.37398022413253784, -0.3386671245098114, 0.29432231187820435, -0.36556461453437805, -0.11178126931190491, -0.1900109201669693, -0.6143973469734192, -0.2298162579536438, -0.13976562023162842, -0.18371137976646423, 0.32033705711364746, 0.2036803662776947, 0.14847077429294586, 0.06238150969147682, -0.1352197676897049, 0.041902363300323486, -0.43031132221221924, 0.06903597712516785, -0.17850962281227112, -0.26351356506347656, -0.000469353049993515, 0.08003830164670944, -0.14336897432804108, 0.01081123948097229, -0.4225104749202728, 0.08281528204679489, -0.015294509008526802, -0.3495779037475586, 0.08563646674156189, -0.3275427222251892, 0.44314295053482056, 0.2561700940132141, 0.15181513130664825, -0.24411968886852264, -0.1336628943681717, 0.3365139365196228, -0.21758484840393066, -0.280558317899704, -0.08042673766613007, -0.18133625388145447, -0.08587734401226044, 0.09600690007209778, -0.08899333328008652, -0.43243443965911865, -0.114784374833107, 0.02393527328968048, 0.11663059890270233, 0.03848067671060562, 0.3249642550945282, 0.2670058310031891, 0.12280900776386261, -0.038151729851961136, 0.02722335234284401, 0.06040357053279877, 0.014573726803064346, 0.34323176741600037, -0.04396707937121391, -0.09172117710113525, 0.2418818473815918, -0.18619580566883087, -0.15789176523685455, 0.09884142130613327, -0.3921028971672058, -0.6064204573631287, -0.10588228702545166, 0.44938305020332336, -0.0804876834154129, 0.028576014563441277, 0.3183553218841553, 0.21039894223213196, 0.05888216197490692, -0.001432761549949646, -0.13036391139030457, -0.5016966462135315, 0.2687036097049713, 0.19512403011322021, 0.039283327758312225, 0.15928488969802856, -0.11933191120624542, 0.5885623693466187, -0.1180834174156189, -0.1307072937488556, 0.1967374086380005, -0.2780769169330597, 0.2577848434448242, 0.0037797167897224426, -0.39995983242988586, 0.00010875426232814789, -0.1838216483592987, -0.17223656177520752, 0.056154314428567886, -0.08897382020950317, 0.020605966448783875, -0.177656888961792, -0.10408689081668854, -0.20457863807678223, -0.16499198973178864, 0.04859922453761101, 0.14846271276474, 0.25446653366088867, 0.012420743703842163, 0.014622047543525696, -0.1989300698041916, -0.12703382968902588, -0.01331121101975441, 0.3179434537887573, -0.10335711389780045, 0.09752114117145538, 0.21118326485157013, -0.38012972474098206, -0.1920146942138672, 0.3192766606807709, 0.3189557194709778, 0.07806939631700516, 0.2148052304983139, 0.01150752604007721, 0.011719509959220886, -0.013602843508124352, 0.37730008363723755, 0.12151655554771423, -0.08888925611972809, 0.14946135878562927, 0.030708789825439453, -0.29404354095458984, -0.327679306268692, -0.07797076553106308, -0.19993168115615845, -0.03219171613454819, -0.2915962338447571, -0.1149149090051651, 0.08003730326890945, 0.47817471623420715, 0.4865283668041229, 0.000778544694185257, 0.2729393541812897, -0.26637598872184753, -0.42038992047309875, -0.10458488762378693, -0.13712087273597717, -0.08413271605968475, 0.24716459214687347, -0.009054629132151604, 0.3496675193309784, -0.2689823806285858, -0.1279774159193039, 0.0009084716439247131, 0.28371143341064453, 0.10026584565639496, -0.014521022327244282, 0.03288482502102852, -0.06777375191450119, -0.09914183616638184, 0.6560025215148926, 0.5683664083480835, 0.22286707162857056, -0.5871347188949585, -0.3114328980445862, 0.26154544949531555, 0.3081311881542206, 0.03854130953550339, -0.3654317259788513, 0.15981298685073853, -0.4349408745765686, -0.20393593609333038, 0.1181141659617424, -0.0032236664555966854, 0.36117956042289734, 0.25685781240463257, -0.2989952564239502, -0.17090646922588348, 0.6227719783782959, 0.18703772127628326, -0.04978296905755997, -0.012042820453643799, 0.49893999099731445, -0.10867971181869507, 0.086768239736557, -0.07086317986249924, 0.7722874879837036, 0.21616235375404358, -0.016465801745653152, 0.5215467214584351, -0.037514135241508484, 0.3984508812427521, 0.09631568193435669, 0.20345871150493622, -0.30842429399490356, -0.22514690458774567, -0.1771802008152008, -0.23831363022327423, 0.4370368719100952, -0.39252495765686035, -0.12048105895519257, 0.12570247054100037, 0.10995501279830933, 0.1674300730228424, 0.29346024990081787, -0.23572345077991486, -0.09708471596240997, 0.040784791111946106, -0.2799026072025299, 0.0703096091747284, -0.20626504719257355, 0.45210230350494385, -0.23941859602928162, 0.19165486097335815, -0.17444001138210297, -0.11812786757946014, -0.32690292596817017, 0.027202099561691284, -0.4223390817642212, 0.04698530584573746, 0.3487403094768524, -0.3465304970741272, 0.1412333995103836, 0.30826258659362793, 0.1490022838115692, -0.11056125164031982, -0.14299669861793518, 0.1925395429134369, 0.12035731226205826, -0.08307299017906189, -0.08768683671951294, -0.14316046237945557, 0.4585092067718506, -0.08696971833705902, -0.2914058268070221, 0.1181495264172554, -0.1757519394159317, -0.11699695140123367, 0.1927834451198578, 0.17803892493247986, 0.18034696578979492, -0.16066138446331024, -0.008434701710939407, -0.20925462245941162, 0.4160999357700348, -0.2062872052192688, 0.03373519331216812, 0.029154930263757706, -0.03081849403679371, 0.25892922282218933, -0.04156426712870598, -0.20234309136867523, -0.23836247622966766, 0.22516906261444092, 0.0538899227976799, 0.22073063254356384, 0.5160391330718994, 0.004514031112194061, -0.14240671694278717, -0.025994006544351578, 0.03684307634830475, -0.20405051112174988, -0.419303834438324, 0.09430908411741257, -0.04726294055581093, 0.17374862730503082, 0.14844773709774017, 0.557946503162384, 0.18876157701015472, 0.073982834815979, -0.012035083025693893, -0.49983298778533936, -0.017501305788755417, 0.2965071499347687, 0.1705467402935028, -0.14023157954216003, 0.2619214653968811, 0.31618228554725647, 0.14629949629306793, -0.20808996260166168, -0.16210000216960907, 0.11141268908977509, 0.08754966408014297, 0.21873751282691956, -0.10144297778606415, 0.1857636272907257, 0.27125856280326843, -0.11868062615394592, 0.08826321363449097, 0.1107567623257637, 0.023238176479935646, -0.1679694652557373, -0.1551797091960907, 0.19523094594478607, 0.07908111810684204, -0.030984999611973763, 0.14436693489551544, -0.05068402737379074, 0.051410824060440063, -0.016652362421154976, 0.1229136735200882, 0.14353546500205994, -0.2517281174659729, 0.020463384687900543, 0.34471404552459717, 0.10181412100791931, -0.1064436212182045, 0.2578161358833313, -0.1646614670753479, 0.31787699460983276, 0.1187175065279007, 0.21428120136260986, 0.04412386193871498, 0.16591128706932068, -0.04937426373362541, -0.03691151738166809, -0.3980926275253296, -0.09095921367406845, 0.202574223279953, -0.5558550953865051, 0.06940670311450958, -0.2835442125797272, 0.23896324634552002, 0.4619528651237488, -0.20674747228622437, 0.03618535399436951, 0.48774492740631104, 0.07472237199544907, -0.27188146114349365, 0.11394255608320236, 0.27185219526290894, 0.10405099391937256, 0.00845654308795929, 0.3226696848869324, 0.1910165250301361, 0.23183447122573853, 0.005049675703048706, 0.2871256470680237, 0.25346407294273376, 0.3062470555305481, 0.22371922433376312, 0.34085628390312195, -0.11838623881340027, 0.3203248679637909, 0.4664035439491272, 0.10852871835231781, -0.022392116487026215, 0.25671231746673584, -0.2122325897216797, 0.21282827854156494, 0.02457336336374283, -0.08170033991336823, 0.19816625118255615, -0.4361225366592407, 0.3141307830810547, -0.06389002501964569, 0.14637057483196259, -0.2770727276802063, 0.3593442440032959, 0.42061740159988403, -0.17486360669136047, -0.09724965691566467, -0.10612942278385162, 0.4280218482017517, -0.1015811488032341, 0.03804219514131546, 0.22548121213912964, -0.07109245657920837, 0.07657772302627563, 0.031018991023302078, -0.009999983012676239, -0.2566753029823303, 0.31533604860305786, 0.1951398402452469, -0.3157762885093689, -0.4515143632888794, 0.16600286960601807, 0.1537613868713379, 0.2545732855796814, -0.08003834635019302, 0.06878126412630081, -0.05596552789211273, -0.15406882762908936, -0.13222600519657135, 0.5119330883026123, 0.6078236103057861, 0.3323934078216553, -0.07309356331825256, -0.23134547472000122, -0.3119509816169739, -0.028572000563144684, 0.09801897406578064, -0.07540589570999146, -0.06352339684963226, 0.3634941279888153, 0.18493270874023438, 0.17776663601398468, -0.10573985427618027, 0.2683844566345215, -0.11546120047569275, -0.0876861959695816, -0.32776737213134766, 0.33782902359962463, -0.07719218730926514, -0.15047822892665863, -0.29737502336502075, 0.26664891839027405, 0.006382837891578674, 0.2759134769439697, 0.24822303652763367, 0.0690191462635994, -0.1253393143415451, -0.025637131184339523, 0.00888083502650261, 0.11342215538024902, 0.30148306488990784, 0.5731635093688965, 0.3423217236995697, -0.04886256903409958, -0.032264579087495804, -0.5246583819389343, 0.2737055718898773, -0.37996166944503784, -0.012691773474216461, 0.12210819870233536, -0.11020994931459427, -0.1972218155860901, 0.40665364265441895, 0.1094074547290802, 0.14864559471607208, 0.04487650468945503, -0.055034711956977844, -0.32515230774879456, -0.3328721523284912, -0.05180545896291733, -0.27361464500427246, -0.0470762699842453, -0.28487706184387207, 0.26998722553253174, -0.6724927425384521, -0.009838085621595383, -0.16482150554656982, -0.19485220313072205, 0.13395218551158905, -0.23294523358345032, 0.6932849884033203, -0.006090467795729637, 0.5324742794036865, 0.15390026569366455, 0.0189522635191679, -0.23979681730270386, -0.3865702748298645, -0.2289653867483139, 0.36948344111442566, -0.1253311038017273, 0.3657648265361786, -0.12084202468395233, -0.009807068854570389, -0.2979018986225128, 0.42303037643432617, 0.04621099680662155, 0.05184807628393173, -0.18548935651779175, 0.18323607742786407, -0.06718512624502182, 0.07735513895750046, -0.11239858716726303, 0.03363364562392235, -0.09602169692516327, 0.20616930723190308, -0.3234831690788269, -0.5417072772979736, 0.40713709592819214, -0.4472002685070038, -0.26112809777259827, -0.13826854526996613, 0.157576322555542, -0.020177073776721954, -0.2910698354244232, -0.5523150563240051, 0.17134931683540344, 0.3971262276172638, 0.08703455328941345, -0.31334027647972107, 0.173868790268898, -0.010651964694261551, 0.06553709506988525, -0.07474935054779053, 0.5040866136550903, -0.31820839643478394, -0.015099374577403069, -0.07190048694610596, -0.01078891009092331 ]
https://github.com/huggingface/datasets/issues/1781
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
Yes colab doesn’t reload preloaded library unless you restart the instance. Maybe we should move the check on top of the init
I'm using Colab. And suddenly this morning, there is this error. Have a look below! ![screenshot-colab research google com-2021 01 26-08-15-36](https://user-images.githubusercontent.com/45964869/105799890-fdaf3b80-5fae-11eb-8f06-11b65cdccc30.png)
22
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import I'm using Colab. And suddenly this morning, there is this error. Have a look below! ![screenshot-colab research google com-2021 01 26-08-15-36](https://user-images.githubusercontent.com/45964869/105799890-fdaf3b80-5fae-11eb-8f06-11b65cdccc30.png) Yes colab doesn’t reload preloaded library unless you restart the instance. Maybe we should move the check on top of the init
[ -0.14016737043857574, -0.1440015435218811, -0.03869438171386719, 0.28774452209472656, 0.20868802070617676, -0.1575327217578888, 0.13346359133720398, 0.1926025003194809, -0.274762898683548, 0.1211349219083786, -0.0618402436375618, 0.41798698902130127, -0.14915874600410461, 0.03732877969741821, 0.1723472774028778, 0.22850431501865387, 0.20476767420768738, 0.4507710635662079, 0.19331613183021545, -0.035872966051101685, -0.056333769112825394, 0.09113460034132004, -0.4517782926559448, -0.02276923507452011, -0.37407687306404114, 0.1728891283273697, 0.016811253502964973, -0.03859969973564148, -0.14388175308704376, -0.5761184096336365, 0.5109918713569641, -0.2018958032131195, 0.11765284836292267, 0.04562937468290329, -0.00011695976718328893, -0.02156192809343338, 0.2957281470298767, -0.08152775466442108, -0.18286819756031036, -0.030447974801063538, 0.10400009900331497, 0.08590862154960632, 0.45246338844299316, -0.0387611985206604, 0.13772672414779663, 0.062097951769828796, -0.14287152886390686, 0.22681480646133423, 0.04267151653766632, 0.2654355466365814, 0.21627750992774963, -0.02455028146505356, 0.27854278683662415, 0.2467484325170517, 0.33304136991500854, -0.03385000675916672, -0.10992581397294998, 0.5772960186004639, 0.34822410345077515, -0.31170356273651123, 0.2219969630241394, 0.0770803689956665, -0.34726154804229736, 0.12990012764930725, 0.5009504556655884, -0.15333671867847443, 0.25119733810424805, -0.136910080909729, -0.0713903158903122, 0.08516538143157959, 0.13084650039672852, -0.1807100772857666, -0.03854890912771225, -0.022683020681142807, 0.3367499113082886, -0.43579718470573425, 0.2943401038646698, 0.15365470945835114, 0.04828565940260887, 0.14068108797073364, 0.40383267402648926, -0.11592745780944824, -0.04920823872089386, 0.05617011338472366, -0.2977423071861267, 0.5725084543228149, -0.09904387593269348, 0.029804296791553497, 0.21478262543678284, 0.0776146799325943, 0.5299273133277893, 0.13525718450546265, -0.3125361502170563, 0.21308746933937073, -0.18099717795848846, 0.05727490782737732, 0.1509379744529724, 0.35586291551589966, -0.20097988843917847, -0.06052793562412262, 0.049505654722452164, -0.1632779836654663, 0.13001422584056854, 0.36768457293510437, -0.14249642193317413, 0.3776364028453827, 0.15488280355930328, -0.09596606343984604, 0.359474778175354, 0.16587227582931519, -0.2740061283111572, 0.15895411372184753, -0.23490209877490997, -0.3367801904678345, 0.4507611095905304, -0.08249371498823166, 0.377491295337677, -0.24826766550540924, -0.3130383789539337, -0.2947343587875366, -0.5301506519317627, -0.13430334627628326, 0.1129380315542221, 0.23567211627960205, -0.2533462941646576, 0.26334863901138306, 0.02087007462978363, 0.062007561326026917, -0.33243077993392944, 0.014146941713988781, -0.04263848811388016, 0.3480691611766815, -0.2938278317451477, -0.013567177578806877, 0.03257761523127556, -0.25841018557548523, 0.16641388833522797, -0.15954767167568207, 0.257412314414978, -0.39065757393836975, -0.243710458278656, -0.23000112175941467, -0.13250333070755005, 0.4801093339920044, -0.26563698053359985, -0.11749079078435898, 0.2300436645746231, -0.5545183420181274, -0.20621523261070251, 0.34209030866622925, -0.48357027769088745, -0.44804278016090393, -0.06921315938234329, 0.1318640559911728, -0.27760303020477295, -0.14352785050868988, -0.1711694598197937, -0.3030308187007904, 0.07459984719753265, -0.43765702843666077, -0.05815088003873825, -0.4439563751220703, 0.028481531888246536, -0.39855867624282837, 0.02379160188138485, 0.1919601708650589, -0.4507100284099579, -0.18075820803642273, -0.061237990856170654, 0.027893083170056343, 0.17319944500923157, -0.030778858810663223, -0.2933194637298584, 0.013953514397144318, -0.2074745148420334, -0.0857497900724411, 0.08225667476654053, -0.10669703781604767, -0.2593957185745239, -0.27761879563331604, -0.050349242985248566, -0.0017580781131982803, 0.07501935213804245, -0.20231297612190247, -0.037299517542123795, -0.12829579412937164, 0.39374229311943054, 0.2658711075782776, -0.09607667475938797, 0.1671169400215149, -0.30553796887397766, -0.1047840416431427, 0.23575155436992645, -0.02433912828564644, 0.17188265919685364, -0.00988539308309555, 0.2645914554595947, -0.058047667145729065, 0.07032711058855057, -0.07379594445228577, -0.2017793357372284, -0.038466423749923706, 0.5287052989006042, -0.0025243908166885376, -0.04618508741259575, 0.02310241013765335, 0.09095449000597, 0.195245623588562, -0.09398692846298218, 0.014921940863132477, -0.39157044887542725, -0.012315066531300545, -0.35879242420196533, 0.39298495650291443, -0.20137427747249603, -0.22698882222175598, 0.06559687107801437, 0.0814308300614357, -0.18327614665031433, 0.45192790031433105, -0.13343147933483124, 0.10857722908258438, -0.009922852739691734, 0.05542782321572304, 0.02716657891869545, 0.4176926612854004, -0.1555546671152115, -0.44237709045410156, -0.2066219449043274, 0.01646577939391136, 0.07049048691987991, -0.02767978049814701, -0.23742783069610596, 0.011732999235391617, 0.061147455126047134, 0.3287149667739868, -0.22979527711868286, 0.1134171411395073, 0.22551196813583374, -0.3239574432373047, -0.013035634532570839, -0.30539360642433167, 0.20599079132080078, -0.09753824770450592, 0.8549453616142273, 0.2274990677833557, 0.1324661821126938, 0.1277950257062912, -0.167280912399292, -0.05128276348114014, 0.01740790717303753, 0.03392934426665306, 0.04381792992353439, 0.1433742195367813, 0.009996883571147919, 0.3170182704925537, 0.015632417052984238, 0.05756932124495506, -0.010498221963644028, -0.05327453464269638, 0.2539074718952179, 0.18520350754261017, 0.1830993890762329, -0.03928378224372864, -0.3725682497024536, 0.01531226933002472, 0.39278632402420044, -0.10422206670045853, 0.35374826192855835, -0.0030459107365459204, -0.41142183542251587, 0.0008035451173782349, 0.10207227617502213, -0.10020846873521805, 0.14564433693885803, 0.17369815707206726, 0.8331612944602966, 0.09139914065599442, 0.2913970947265625, 0.09904344379901886, -0.3745925724506378, -0.22923599183559418, 0.08480995148420334, 0.14128679037094116, -0.30069494247436523, 0.19623279571533203, -0.2893138825893402, 0.021410096436738968, -0.16278564929962158, -0.5309428572654724, -0.07382594048976898, -0.10349607467651367, -0.12438611686229706, 0.4379895031452179, 0.25601160526275635, 0.10481559485197067, 0.2743666470050812, -0.06797029078006744, -0.009114060550928116, -0.6351595520973206, -0.030366260558366776, -0.21951180696487427, -0.3502953052520752, -0.003425953909754753, 0.24062024056911469, 0.025364460423588753, 0.08855289965867996, -0.2230241298675537, 0.11527842283248901, 0.19694893062114716, -0.46307826042175293, 0.09642639756202698, -0.10847301781177521, 0.366842657327652, 0.03406151756644249, 0.10449099540710449, -0.1882028579711914, -0.23834168910980225, 0.2162090390920639, -0.2671552300453186, -0.20334899425506592, 0.05906806141138077, -0.07983569800853729, 0.005218205973505974, -0.04404795169830322, -0.11365101486444473, -0.28475692868232727, -0.1694563627243042, -0.1283540278673172, 0.1254846304655075, 0.03388402238488197, 0.39864516258239746, 0.32494670152664185, 0.2000759094953537, 0.17353084683418274, 0.07666873931884766, 0.12223846465349197, -0.09271468222141266, 0.32315054535865784, -0.03469336777925491, 0.023161685094237328, 0.29900187253952026, -0.30585938692092896, 0.02860274165868759, -0.12585292756557465, -0.4488913416862488, -0.585891842842102, 0.01462150365114212, 0.2705056071281433, -0.04498211294412613, 0.022895660251379013, 0.3292984366416931, 0.1701289713382721, -0.009939508512616158, 0.1031593307852745, -0.18173278868198395, -0.39345917105674744, 0.28438037633895874, 0.24906215071678162, -0.04373820871114731, -0.0391659215092659, -0.22072041034698486, 0.5412876009941101, -0.473060667514801, -0.034415069967508316, 0.3007108271121979, -0.04631233215332031, 0.12206816673278809, -0.09383771568536758, -0.3473145067691803, 0.002616028068587184, -0.17703458666801453, -0.3872641324996948, 0.1603216826915741, -0.19219547510147095, -0.1894460767507553, -0.2503654360771179, 0.027952253818511963, -0.2932751178741455, -0.21870571374893188, 0.13106027245521545, 0.010511040687561035, 0.02526971325278282, -0.09204380214214325, -0.06902887672185898, -0.04322003573179245, -0.1032591462135315, 0.010746760293841362, 0.29595911502838135, -0.22205421328544617, 0.02048448473215103, 0.3319786787033081, -0.6371978521347046, 0.01143362745642662, 0.07856926321983337, 0.2924875319004059, 0.016109492629766464, 0.2801790237426758, -0.12389933317899704, 0.058136843144893646, -0.11540082842111588, 0.25882893800735474, 0.26699110865592957, -0.12227259576320648, 0.18794167041778564, -0.15699627995491028, 0.08723411709070206, -0.46831974387168884, 0.0024574361741542816, -0.3910142779350281, -0.037196043878793716, -0.5108360648155212, -0.0007463172078132629, 0.3016480803489685, 0.3158556818962097, 0.28305473923683167, -0.07469958066940308, 0.18456195294857025, -0.47730982303619385, -0.4928889274597168, -0.42380741238594055, -0.14489257335662842, -0.034027811139822006, 0.27920258045196533, 0.013778233900666237, 0.157470703125, -0.11678655445575714, -0.24214351177215576, 0.07629998028278351, 0.36078575253486633, 0.12091393023729324, 0.12577003240585327, -0.049344681203365326, -0.25958389043807983, -0.13504056632518768, 0.48706457018852234, 0.44266125559806824, 0.29380500316619873, -0.335753470659256, -0.308000773191452, 0.2927730977535248, 0.3107408583164215, 0.04349975287914276, -0.3941926658153534, 0.19877204298973083, -0.493476539850235, -0.19119568169116974, 0.17311088740825653, 0.044008273631334305, 0.11279924213886261, 0.20550218224525452, -0.25964343547821045, -0.05055887624621391, 0.5910870432853699, 0.003446994349360466, 0.03583601117134094, 0.06175313517451286, 0.31987881660461426, -0.1341247707605362, 0.2430291622877121, 0.2231680452823639, 0.9656526446342468, 0.012014970183372498, -0.05465339496731758, 0.4602908790111542, 0.03271791338920593, 0.27139797806739807, -0.051492512226104736, 0.304948091506958, -0.3573492467403412, -0.2458048015832901, -0.061177290976047516, -0.26532575488090515, 0.35605669021606445, -0.6037136912345886, -0.2224779725074768, -0.030063096433877945, 0.015170037746429443, -0.05678991600871086, 0.1870257556438446, -0.26154470443725586, -0.05751150846481323, -0.06943449378013611, -0.2246149778366089, 0.04610804468393326, -0.23754192888736725, 0.5531845092773438, -0.3224279284477234, 0.2120824009180069, -0.015627186745405197, -0.10247624665498734, -0.2567563056945801, 0.10741574317216873, -0.3843138515949249, 0.08194926381111145, 0.18266484141349792, -0.19060388207435608, -0.0020575542002916336, 0.20885832607746124, -0.04809732735157013, 0.02589518576860428, -0.0038115009665489197, 0.20533549785614014, 0.28753462433815, -0.25091078877449036, -0.24063199758529663, -0.041231002658605576, 0.4544912874698639, -0.07396210730075836, -0.22320032119750977, 0.16329842805862427, -0.14869637787342072, -0.120309978723526, 0.20793402194976807, 0.24919405579566956, 0.24046237766742706, -0.06668081879615784, -0.11946415901184082, 0.050387296825647354, 0.1910235434770584, -0.23495736718177795, 0.06670454144477844, 0.05199628323316574, -0.1581680327653885, 0.19815519452095032, 0.15114116668701172, -0.30121052265167236, -0.140492781996727, 0.09682297706604004, 0.19549080729484558, 0.12711045145988464, 0.47861719131469727, 0.004655413329601288, -0.034361619502305984, -0.1182938888669014, 0.10163522511720657, -0.4566185474395752, -0.2994999289512634, 0.27557289600372314, 0.18542838096618652, -0.06284481287002563, 0.20358531177043915, 0.5781244039535522, 0.14842335879802704, 0.28338804841041565, 0.0016784481704235077, -0.4137296974658966, -0.06858669966459274, 0.14479312300682068, 0.11125384271144867, -0.060670558363199234, 0.2027844488620758, 0.5849720239639282, 0.14151714742183685, -0.020887086167931557, -0.2094154953956604, 0.0760338082909584, -0.07956960797309875, 0.11311398446559906, -0.3074967563152313, 0.1867477297782898, 0.04309329390525818, -0.007371246814727783, 0.11489111185073853, 0.22193589806556702, 0.0825924351811409, -0.20040073990821838, -0.09694765508174896, 0.19310733675956726, 0.03972920402884483, 0.3005504608154297, 0.23248983919620514, -0.08332380652427673, 0.0887918770313263, 0.043191954493522644, 0.07074695825576782, -0.0454782210290432, -0.2720468044281006, 0.004417561925947666, 0.5248972773551941, -0.029315724968910217, -0.1394842267036438, 0.21387962996959686, -0.2634386718273163, 0.3821102976799011, 0.03887850046157837, -0.0040827058255672455, -0.021580209955573082, 0.10260279476642609, 0.03954422473907471, -0.0718551054596901, -0.444314181804657, 0.002552531659603119, 0.13753776252269745, -0.42701590061187744, -0.008080955594778061, -0.456827312707901, -0.08802822232246399, 0.4660221040248871, -0.11645602434873581, 0.12306442856788635, 0.33738893270492554, 0.09097933024168015, -0.30881205201148987, 0.1949314922094345, -0.046089183539152145, -0.05826050043106079, 0.03891289606690407, 0.4427158832550049, 0.05950567498803139, 0.10744671523571014, 0.22941944003105164, 0.2066301703453064, -0.023166246712207794, 0.2925184369087219, 0.12752743065357208, 0.16816610097885132, -0.2863565981388092, 0.22102925181388855, 0.3486670255661011, -0.08687163889408112, 0.011701352894306183, -0.05568966269493103, -0.1806059181690216, 0.41934433579444885, -0.11662808805704117, 0.16210900247097015, 0.08197634667158127, -0.5037820935249329, 0.3588397204875946, 0.09322525560855865, 0.18933308124542236, -0.11080973595380783, 0.3356679379940033, 0.4114008843898773, 0.017560625448822975, -0.11495915800333023, 0.0365133136510849, 0.38739636540412903, -0.19418296217918396, 0.20691260695457458, 0.2968499958515167, -0.010450050234794617, -0.09879424422979355, 0.1528918743133545, 0.26356858015060425, -0.11211517453193665, 0.14242370426654816, 0.2765941917896271, -0.3965964913368225, -0.34449413418769836, -0.0058119408786296844, 0.07519920915365219, 0.18850255012512207, -0.15580344200134277, 0.08973626792430878, -0.09081989526748657, -0.12866432964801788, -0.24321335554122925, 0.3294363021850586, 0.4504806697368622, 0.4281195402145386, -0.07950447499752045, -0.3229372799396515, -0.16045315563678741, 0.07464619725942612, 0.10478301346302032, -0.1451227366924286, 0.27691617608070374, 0.6709738969802856, 0.052296508103609085, 0.1748085469007492, -0.19528216123580933, 0.3402731120586395, -0.09679186344146729, -0.305983304977417, -0.18565233051776886, 0.1936621367931366, 0.2526378631591797, -0.10949650406837463, -0.46305549144744873, 0.2653678059577942, -0.06217082217335701, 0.37482792139053345, 0.06471975147724152, -0.0029487016145139933, -0.1486266553401947, 0.021403897553682327, 0.038571663200855255, 0.2800288796424866, 0.3117564618587494, 0.5116198658943176, 0.31697744131088257, -0.13986168801784515, -0.11575090885162354, -0.5177513360977173, 0.40107473731040955, -0.178664892911911, 0.18421153724193573, 0.022036481648683548, -0.02678852528333664, -0.09976574033498764, 0.31252723932266235, -0.02837376296520233, 0.11945606768131256, 0.07424383610486984, -0.10696277022361755, -0.2954263687133789, -0.3318924307823181, -0.09638634324073792, -0.31951048970222473, -0.00007238984107971191, -0.27879855036735535, 0.16298192739486694, -0.6408562660217285, 0.0828796997666359, -0.18022115528583527, -0.32848602533340454, 0.10355038940906525, -0.06898444890975952, 0.7786419987678528, -0.1724223643541336, 0.37212294340133667, 0.10728774219751358, 0.08926233649253845, 0.15090960264205933, -0.4144454896450043, -0.144709050655365, 0.09109827131032944, 0.1098468005657196, 0.30654534697532654, 0.023136133328080177, -0.019930168986320496, -0.34859660267829895, 0.352478951215744, 0.13072729110717773, -0.08243459463119507, -0.2510976791381836, -0.006151983514428139, 0.033511340618133545, 0.19831930100917816, -0.15382952988147736, 0.31510090827941895, -0.11763711273670197, 0.055994436144828796, -0.28645843267440796, -0.46104028820991516, 0.4683492183685303, -0.2231801450252533, -0.26986873149871826, 0.005784179084002972, 0.1729331612586975, -0.24871349334716797, -0.21862497925758362, -0.5525953769683838, 0.07796772569417953, 0.2595116198062897, 0.10685846209526062, -0.21708732843399048, 0.24912604689598083, 0.05127495899796486, 0.09375894069671631, -0.13074561953544617, 0.22707073390483856, -0.13032883405685425, 0.11386674642562866, -0.19326947629451752, -0.061311013996601105 ]
https://github.com/huggingface/datasets/issues/1776
[Question & Bug Report] Can we preprocess a dataset on the fly?
We are very actively working on this. How does your dataset look like in practice (number/size/type of files)?
I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache? BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code: https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532
18
[Question & Bug Report] Can we preprocess a dataset on the fly? I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache? BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code: https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532 We are very actively working on this. How does your dataset look like in practice (number/size/type of files)?
[ -0.39039596915245056, -0.19714781641960144, -0.07739084959030151, -0.003824278712272644, 0.39777421951293945, 0.3356426954269409, 0.26100412011146545, 0.2968965172767639, -0.08464117348194122, 0.13276687264442444, 0.06934843957424164, 0.1286533772945404, -0.13560092449188232, 0.22886554896831512, 0.2126399129629135, 0.1509196162223816, 0.21284231543540955, 0.06642666459083557, 0.03567256033420563, 0.20651046931743622, -0.2539820075035095, -0.15314197540283203, -0.1100585088133812, -0.21289153397083282, -0.4570019245147705, -0.2720252275466919, -0.1605054885149002, 0.020596671849489212, -0.2341962307691574, -0.1767745167016983, 0.31466424465179443, 0.3214796781539917, 0.08660155534744263, 0.5502456426620483, -0.00011173377424711362, 0.008892863988876343, 0.40191394090652466, -0.09342499822378159, -0.10763014853000641, -0.1060747355222702, 0.12850013375282288, -0.264304518699646, -0.1480511873960495, -0.24707841873168945, -0.156715527176857, -0.050447605550289154, 0.11968287080526352, -0.6373550295829773, 0.38560158014297485, 0.12543357908725739, 0.2115146666765213, 0.12865705788135529, -0.08107110857963562, 0.13829576969146729, 0.3179633915424347, 0.3585822582244873, -0.3582459092140198, -0.07893666625022888, 0.25965428352355957, -0.07955946028232574, 0.04806734621524811, 0.12024302780628204, -0.3685801029205322, -0.011184308677911758, 0.33914515376091003, 0.11310470849275589, -0.20823970437049866, -0.6446152925491333, 0.10363080352544785, 0.276486337184906, 0.4921412169933319, -0.5251830220222473, -0.6757847666740417, -0.23487403988838196, 0.11644268780946732, -0.3433661460876465, 0.04457293078303337, 0.4104189872741699, -0.15067538619041443, 0.04625342786312103, -0.4445933997631073, -0.3685855269432068, 0.007384069263935089, -0.33614158630371094, 0.2708496153354645, -0.1538698673248291, -0.23515143990516663, 0.002327505499124527, 0.06213311105966568, 0.14664334058761597, 0.37945446372032166, -0.24089348316192627, -0.3575361371040344, 0.5096221566200256, -0.2625167965888977, -0.24318447709083557, -0.29344677925109863, 0.10316163301467896, 0.2890481650829315, 0.12902949750423431, 0.03221769258379936, -0.13476470112800598, -0.04534833878278732, -0.0331241637468338, 0.18082819879055023, 0.04792149364948273, -0.059368737041950226, -0.19617711007595062, 0.3188607096672058, -0.21965034306049347, 0.07543337345123291, -0.07937983423471451, 0.05986296385526657, -0.3965127766132355, 0.32711032032966614, 0.037709519267082214, 0.3040318489074707, -0.32267335057258606, 0.4087907075881958, -0.01807880401611328, 0.09222865849733353, -0.01351451687514782, -0.4056243598461151, 0.10217709839344025, -0.1372479796409607, -0.01785392314195633, 0.12948937714099884, 0.08078862726688385, 0.028771383687853813, -0.17341665923595428, -0.10402528196573257, 0.015377689152956009, 0.014040406793355942, 0.2762531042098999, 0.12915655970573425, -0.22555695474147797, 0.059806182980537415, 0.19257107377052307, -0.08667996525764465, -0.16472604870796204, 0.19882461428642273, -0.45647576451301575, 0.10301805287599564, 0.3438341021537781, 0.03279298171401024, 0.05407065898180008, -0.06752178072929382, 0.33003491163253784, -0.19483670592308044, 0.4849700331687927, -0.20168456435203552, -0.27767235040664673, 0.036252520978450775, 0.10428887605667114, -0.019973022863268852, 0.05561418831348419, -0.6019010543823242, 0.17124706506729126, 0.5740997791290283, 0.22622892260551453, 0.2237464189529419, 0.23392841219902039, -0.2646636664867401, -0.16799844801425934, 0.11934754997491837, 0.4449642300605774, -0.18989510834217072, 0.2122204601764679, 0.27368709444999695, 0.0231912974268198, 0.15235865116119385, 0.10423716902732849, 0.027538960799574852, 0.2540638744831085, -0.06300767511129379, -0.15037518739700317, 0.30980831384658813, -0.10666052997112274, 0.11570148915052414, 0.40088170766830444, -0.0550093911588192, -0.26823920011520386, 0.07420983165502548, 0.18553507328033447, -0.036489248275756836, -0.1308400183916092, 0.000057600438594818115, 0.39760738611221313, 0.005013085901737213, 0.19509655237197876, -0.18479108810424805, -0.4482400119304657, -0.3217775225639343, 0.005811143666505814, -0.03782002255320549, 0.10627837479114532, -0.18560650944709778, -0.30141058564186096, 0.08773032575845718, -0.19781318306922913, 0.19497568905353546, 0.3726009130477905, -0.044387686997652054, 0.06906689703464508, 0.05051916837692261, -0.15925192832946777, -0.36613619327545166, 0.21455118060112, -0.123058021068573, 0.01630285009741783, 0.1816824972629547, -0.4576364755630493, 0.18197646737098694, 0.06517882645130157, 0.08001033961772919, 0.11326029896736145, 0.0453958734869957, -0.34079626202583313, 0.30327555537223816, -0.011489493772387505, -0.4556632936000824, 0.2294510155916214, -0.1917678862810135, 0.10522156208753586, -0.3946021795272827, -0.08141020685434341, 0.14803537726402283, -0.060474880039691925, -0.035598933696746826, -0.16785234212875366, -0.2173677682876587, -0.008643331937491894, -0.0828094333410263, 0.30092257261276245, -0.09612476080656052, 0.17689737677574158, -0.013427101075649261, 0.16867569088935852, -0.14742816984653473, -0.14760591089725494, -0.02059072069823742, -0.13210497796535492, 0.1468915343284607, -0.1920766532421112, -0.2768491208553314, 0.23780690133571625, -0.15263837575912476, 0.4071860611438751, -0.05655939131975174, -0.17049120366573334, 0.20153898000717163, -0.06269291788339615, -0.04672057181596756, 0.1874060332775116, 0.011347312480211258, -0.01846962794661522, 0.7148052453994751, -0.12358863651752472, -0.08700573444366455, -0.17254367470741272, -0.011409047991037369, -0.026526588946580887, -0.04482848197221756, 0.2636301517486572, -0.09863146394491196, -0.11397381871938705, -0.22894304990768433, 0.09293891489505768, 0.21436189115047455, 0.14235521852970123, 0.04843214526772499, 0.17999859154224396, 0.09540659934282303, -0.09617839008569717, 0.29479721188545227, 0.010229416191577911, 0.40941619873046875, -0.03066191077232361, 0.21737495064735413, 0.11281808465719223, -0.18894124031066895, 0.17108669877052307, 0.06416420638561249, 0.06640775501728058, -0.13523344695568085, 0.11678909510374069, 0.1735372394323349, -0.14630019664764404, 0.14437589049339294, 0.03463172912597656, -0.22365307807922363, 0.10553275793790817, -0.12475669384002686, 0.006526537239551544, 0.06844957172870636, -0.0014729760587215424, -0.4324001967906952, 0.4077482223510742, 0.07149638235569, -0.16072052717208862, -0.1685139387845993, -0.1798393726348877, 0.2189037799835205, 0.0133904330432415, 0.26487094163894653, -0.16334736347198486, 0.46535852551460266, -0.05185692757368088, 0.04782262444496155, -0.31065067648887634, 0.18899407982826233, 0.09808720648288727, 0.036841023713350296, 0.3631496727466583, -0.02288004755973816, 0.057312920689582825, 0.2028733640909195, 0.1895761340856552, -0.00037136964965611696, -0.13383610546588898, -0.16119985282421112, -0.24652206897735596, -0.03307922184467316, 0.0012592205312103033, -0.20421133935451508, 0.04679591953754425, -0.11168461292982101, -0.2437697798013687, 0.14599516987800598, -0.00019108131527900696, 0.03415415436029434, 0.24361538887023926, 0.02265496551990509, -0.14873984456062317, -0.14558440446853638, 0.07987404614686966, -0.022601798176765442, -0.7236912250518799, 0.28883156180381775, -0.016414303332567215, -0.3574146032333374, 0.021651972085237503, 0.00531410239636898, -0.03623224422335625, 0.341147243976593, -0.6054070591926575, 0.012870908714830875, -0.37438836693763733, 0.03555455431342125, -0.17137223482131958, 0.16432051360607147, 0.2667720913887024, 0.07436741888523102, -0.07150711864233017, 0.022015973925590515, -0.10485482215881348, 0.0018191710114479065, -0.19011223316192627, 0.015230052173137665, 0.2821197509765625, 0.4061172902584076, 0.010955262929201126, 0.6870181560516357, 0.17412695288658142, 0.013203833252191544, 0.34611693024635315, 0.044266797602176666, 0.553939163684845, -0.2773266136646271, -0.09586918354034424, -0.17710880935192108, -0.24282684922218323, -0.17665162682533264, 0.12360185384750366, 0.27350667119026184, -0.3021138906478882, -0.19381818175315857, 0.025362182408571243, -0.07952136546373367, -0.09929773211479187, 0.1347559541463852, -0.28842592239379883, 0.28872889280319214, -0.005578519776463509, 0.03221692144870758, -0.2510031461715698, -0.4088843762874603, 0.10398942232131958, 0.0649314820766449, 0.6988076567649841, -0.1419110745191574, -0.19133226573467255, 0.21819359064102173, -0.6576187014579773, 0.2069142609834671, -0.003327441168949008, 0.2896781861782074, 0.1281386911869049, 0.06716250628232956, 0.0759674534201622, -0.3018742501735687, 0.5862100720405579, -0.2058389037847519, 0.030228668823838234, 0.40097203850746155, -0.007555108517408371, -0.2386103719472885, 0.12600597739219666, 0.07730376720428467, 0.5740277767181396, -0.19258126616477966, 0.3010318875312805, -0.030721161514520645, -0.1716298609972, 0.08728981018066406, 0.37776684761047363, -0.21517212688922882, -0.5332979559898376, -0.17039798200130463, -0.1797482967376709, -0.17500226199626923, 0.15046775341033936, 0.05490410327911377, -0.1973290741443634, -0.13214080035686493, -0.10620193183422089, -0.384479820728302, 0.3052116632461548, -0.02115766704082489, -0.19301943480968475, 0.11602111905813217, -0.03376287221908569, 0.4853581190109253, 0.03943445906043053, -0.1699630171060562, -0.07287224382162094, 0.523240327835083, -0.25951138138771057, -0.18938857316970825, -0.14749860763549805, -0.03636184707283974, 0.38643786311149597, 0.24375270307064056, 0.048353563994169235, 0.20937985181808472, -0.014934025704860687, 0.08610126376152039, -0.5349298715591431, 0.10915973782539368, 0.1268615424633026, -0.0836402177810669, -0.6452924013137817, -0.6370642185211182, 0.6103531122207642, 0.4527731239795685, 0.05477328598499298, 0.44094085693359375, 0.054721616208553314, -0.15754711627960205, 0.2837332487106323, 0.21445253491401672, 0.8360589742660522, -0.34749335050582886, 0.25231555104255676, -0.36380666494369507, 0.1622583568096161, 0.2669762969017029, -0.31136971712112427, 0.01509944163262844, -0.30760303139686584, -0.40025874972343445, 0.04246850311756134, -0.14556020498275757, 0.10536866635084152, 0.3223261833190918, 0.05807137116789818, 0.29822251200675964, -0.05111486837267876, -0.09217369556427002, -0.11887075006961823, -0.07433845102787018, -0.07843901216983795, -0.5844621062278748, -0.16226685047149658, 0.17473050951957703, -0.0435514897108078, 0.12001107633113861, -0.14097926020622253, 0.20368576049804688, 0.256159245967865, -0.1187514215707779, -0.3911295533180237, -0.016768623143434525, -0.21204127371311188, -0.2802054286003113, -0.16740930080413818, -0.1748960018157959, -0.10337907075881958, 0.07241018116474152, 0.4791935086250305, 0.5132243633270264, -0.05463864654302597, -0.08497031033039093, 0.10395295917987823, 0.11524134129285812, -0.09866337478160858, 0.11216816306114197, 0.11118359118700027, -0.07542359083890915, 0.07227212935686111, -0.028608568012714386, -0.3929862678050995, -0.13952282071113586, 0.17684441804885864, -0.08542105555534363, 0.08600901067256927, 0.02703089639544487, -0.29945170879364014, 0.06948878616094589, 0.22139820456504822, -0.05795740336179733, 0.1077321469783783, 0.3272392749786377, 0.018335973843932152, 0.3171113133430481, -0.15064047276973724, -0.3271244764328003, 0.012523068115115166, 0.25314319133758545, 0.14493277668952942, -0.31793564558029175, 0.2900611162185669, 0.19926469027996063, -0.2374035269021988, -0.1379886269569397, 0.20612162351608276, -0.01793557219207287, -0.3303302824497223, 0.21500200033187866, 0.13200929760932922, 0.23305301368236542, -0.06949030607938766, 0.16270165145397186, 0.08220285922288895, -0.262251615524292, 0.13883839547634125, -0.1855165958404541, -0.5902353525161743, -0.09658589959144592, 0.14280997216701508, 0.22331033647060394, 0.5382516384124756, -0.3736322820186615, 0.14909628033638, 0.31630846858024597, -0.25338149070739746, -0.010181582532823086, 0.04271155595779419, 0.11362971365451813, 0.11112706363201141, 0.2753557562828064, 0.02982555888593197, -0.17892004549503326, -0.005251077935099602, 0.05391426384449005, 0.033292897045612335, -0.27945560216903687, -0.047746315598487854, 0.16699570417404175, -0.1420471966266632, -0.08743593841791153, 0.22336088120937347, -0.21281707286834717, -0.2577117383480072, -0.38180798292160034, 0.09338949620723724, 0.34128338098526, -0.07002674043178558, -0.2541678249835968, 0.30460047721862793, 0.14502441883087158, -0.3586769700050354, 0.3340472877025604, 0.07001912593841553, 0.14352576434612274, -0.12325750291347504, 0.12375880032777786, 0.1664769947528839, -0.05559753254055977, 0.11188443005084991, -0.1866806149482727, 0.24646635353565216, -0.02382580190896988, 0.1362108290195465, -0.17018219828605652, 0.06103064492344856, 0.27663320302963257, 0.28681814670562744, 0.17736724019050598, -0.09330209344625473, 0.1268342137336731, 0.2990509867668152, 0.17725269496440887, -0.21631236374378204, -0.2040122002363205, 0.12936599552631378, -0.059113480150699615, 0.10350197553634644, 0.25954675674438477, 0.2191544771194458, 0.1358407884836197, -0.15562094748020172, 0.2655942738056183, 0.24337279796600342, -0.4232634902000427, 0.04237237572669983, 0.21772347390651703, 0.1372022181749344, 0.1452837586402893, 0.26779577136039734, 0.30366846919059753, 0.16234827041625977, 0.35976940393447876, 0.2897259593009949, 0.5725321769714355, 0.3371695876121521, 0.05475851893424988, -0.27530306577682495, -0.6611914038658142, 0.3065607249736786, 0.08542190492153168, 0.31033486127853394, 0.3788241744041443, -0.013584651052951813, 0.24900099635124207, 0.025653697550296783, -0.17853081226348877, -0.21634343266487122, 0.10903823375701904, -0.11405254155397415, -0.17851731181144714, 0.3778687119483948, 0.02018871158361435, 0.32965871691703796, 0.12270018458366394, -0.047256629914045334, -0.1081705093383789, 0.2652044892311096, 0.04492415860295296, 0.16075964272022247, 0.16782881319522858, 0.17482921481132507, 0.056354328989982605, 0.3255891799926758, -0.1390039622783661, 0.1670774668455124, 0.033800847828388214, 0.05201040208339691, -0.0451623909175396, 0.5297791957855225, 0.27729320526123047, 0.37808459997177124, -0.09875495731830597, 0.14681215584278107, -0.05560484901070595, 0.0012175124138593674, -0.029947709292173386, 0.2641471028327942, -0.11505717039108276, -0.1527373343706131, 0.16343502700328827, 0.06948987394571304, -0.08180651813745499, 0.2432890683412552, -0.15491846203804016, 0.34007027745246887, -0.1396975964307785, 0.25302520394325256, 0.09329192340373993, -0.3390543460845947, -0.21987026929855347, 0.17487400770187378, -0.22939708828926086, 0.1370789259672165, 0.6883220672607422, -0.35233595967292786, -0.0466700904071331, -0.05499918386340141, 0.0778949037194252, 0.18930095434188843, 0.47199997305870056, 0.3703412711620331, 0.06909354776144028, -0.1510738581418991, 0.07635258138179779, -0.4328632950782776, -0.15379375219345093, -0.1426941603422165, 0.25030237436294556, -0.20729301869869232, -0.11279061436653137, 0.15921629965305328, 0.2857864499092102, -0.021907851099967957, -0.35983532667160034, 0.07390454411506653, 0.4348348081111908, -0.3127688467502594, -0.18816684186458588, -0.18507380783557892, 0.07514934986829758, 0.055716127157211304, -0.5030344128608704, 0.12375862896442413, 0.12578532099723816, -0.0742688775062561, 0.044349268078804016, 0.09412117302417755, 0.15373972058296204, -0.011131227016448975, 0.40495234727859497, 0.004367997869849205, 0.17260392010211945, -0.16560915112495422, -0.014558173716068268, -0.3031444549560547, -0.043684251606464386, -0.22673431038856506, 0.12965168058872223, 0.07701347023248672, -0.060691338032484055, -0.5568870902061462, -0.27053549885749817, -0.07294546812772751, -0.24071016907691956, -0.23688286542892456, 0.06005175784230232, -0.35546234250068665, -0.2455929070711136, -0.11674894392490387, -0.05975641682744026, 0.18818773329257965, 0.20106643438339233, -0.02005723863840103, 0.08956611156463623, -0.30764082074165344, -0.2897493541240692, 0.5246585607528687, -0.17344501614570618, -0.29831749200820923, -0.24424158036708832, 0.06164323911070824, 0.06141219288110733, -0.16060896217823029, -0.37959739565849304, 0.2405107617378235, 0.27419909834861755, -0.11917320638895035, 0.15512023866176605, 0.3109648823738098, -0.35164496302604675, 0.06469669938087463, -0.2036038637161255, 0.6356158256530762, -0.19219771027565002, 0.00021691620349884033, -0.4029254615306854, -0.3338172435760498 ]
https://github.com/huggingface/datasets/issues/1776
[Question & Bug Report] Can we preprocess a dataset on the fly?
It's a text file with many lines (about 1B) of Chinese sentences. I use it to train language model using https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py
I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache? BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code: https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532
21
[Question & Bug Report] Can we preprocess a dataset on the fly? I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache? BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code: https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532 It's a text file with many lines (about 1B) of Chinese sentences. I use it to train language model using https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py
[ -0.37494978308677673, -0.3105451464653015, -0.025356058031320572, 0.07814659178256989, 0.4190763235092163, 0.3276048004627228, 0.25238728523254395, 0.24938960373401642, -0.11202441155910492, 0.06025940552353859, -0.042174749076366425, 0.08074948936700821, -0.11859817057847977, 0.1677815318107605, 0.3189418613910675, 0.08421249687671661, 0.20637297630310059, 0.03349293768405914, -0.002536885440349579, 0.1758536845445633, -0.22771763801574707, -0.16506391763687134, -0.060174502432346344, -0.11336369812488556, -0.5667707920074463, -0.27683010697364807, -0.24533291161060333, -0.04908578842878342, -0.1583475023508072, -0.22841893136501312, 0.2756986916065216, 0.23408213257789612, 0.08938370645046234, 0.5178627967834473, -0.00011839768558274955, 0.051398202776908875, 0.3754432797431946, -0.08065912127494812, -0.12657946348190308, -0.100674107670784, 0.13752081990242004, -0.2211700826883316, -0.1770973950624466, -0.19191113114356995, -0.17634201049804688, -0.001200311817228794, 0.15393036603927612, -0.4922320544719696, 0.5047302842140198, 0.19468340277671814, 0.14486294984817505, 0.2098596692085266, -0.05177036300301552, 0.22196026146411896, 0.21852269768714905, 0.3186280131340027, -0.2461317479610443, 0.14449787139892578, 0.2155943512916565, -0.016662277281284332, -0.037608422338962555, 0.1634666472673416, -0.316607266664505, -0.01518615335226059, 0.26948606967926025, 0.1486748307943344, -0.15378597378730774, -0.5454906225204468, 0.12963378429412842, 0.3487482964992523, 0.39437147974967957, -0.5621160864830017, -0.674554705619812, -0.27403420209884644, 0.18087975680828094, -0.33323371410369873, 0.09328636527061462, 0.45481300354003906, -0.14097672700881958, 0.20200206339359283, -0.4392783045768738, -0.4125904142856598, 0.07816171646118164, -0.3117176294326782, 0.29732316732406616, -0.04748149216175079, -0.2603069841861725, 0.03278288245201111, 0.05133878067135811, 0.13210847973823547, 0.3066864609718323, -0.2835433781147003, -0.31234675645828247, 0.5733699798583984, -0.2480728179216385, -0.24157465994358063, -0.3126249611377716, 0.17123344540596008, 0.20139968395233154, -0.06655824184417725, 0.06826155632734299, -0.12892329692840576, 0.004190468229353428, -0.05027175694704056, 0.1260247677564621, 0.03929375857114792, -0.08337671309709549, -0.21175682544708252, 0.29361584782600403, -0.1786150485277176, 0.020048227161169052, -0.022956524044275284, 0.022384941577911377, -0.32569971680641174, 0.23055101931095123, 0.08852303773164749, 0.2718845009803772, -0.14175641536712646, 0.3139846622943878, -0.013668646104633808, -0.018977295607328415, -0.03112809918820858, -0.3354019224643707, 0.1593686044216156, -0.19146423041820526, -0.043944478034973145, 0.14451059699058533, 0.10419648885726929, -0.030840560793876648, -0.26271864771842957, -0.0954936072230339, 0.08992739021778107, -0.05539049953222275, 0.3115379512310028, 0.11606332659721375, -0.16808955371379852, 0.09530015289783478, 0.18655310571193695, -0.12426680326461792, -0.26495862007141113, 0.08114085346460342, -0.43657201528549194, 0.014830037951469421, 0.25061410665512085, -0.019714990630745888, 0.07208842039108276, -0.036793503910303116, 0.3380574584007263, -0.17790424823760986, 0.44929417967796326, -0.20433813333511353, -0.2573891878128052, 0.16425412893295288, 0.05348546430468559, -0.008352844975888729, 0.05551387742161751, -0.47023579478263855, 0.32738780975341797, 0.6150686144828796, 0.2876584231853485, 0.28035467863082886, 0.32474303245544434, -0.3547723889350891, -0.0543346181511879, 0.11124441772699356, 0.5088640451431274, -0.282439261674881, 0.04452822357416153, 0.39103180170059204, -0.037899721413850784, 0.12273094058036804, 0.20045088231563568, -0.0386204868555069, 0.3778630495071411, -0.0348488986492157, -0.13771113753318787, 0.2549000084400177, -0.027956439182162285, -0.004930688068270683, 0.4297845661640167, -0.13296422362327576, -0.24088279902935028, 0.0994626134634018, 0.22738419473171234, -0.19229795038700104, -0.05346843972802162, 0.06413675844669342, 0.39434903860092163, 0.05072670429944992, 0.1347922682762146, -0.18895410001277924, -0.5016103386878967, -0.24051503837108612, -0.025490066036581993, -0.0514843575656414, 0.11337888240814209, -0.19852188229560852, -0.07845091074705124, 0.1419786512851715, -0.1865408718585968, 0.17620980739593506, 0.3741006851196289, -0.17765633761882782, 0.1049659475684166, -0.024602122604846954, -0.23914834856987, -0.35650062561035156, 0.23780426383018494, -0.18518319725990295, 0.07278809696435928, 0.1977110058069229, -0.44128668308258057, 0.2564166188240051, 0.09285907447338104, 0.021197650581598282, 0.09672246873378754, -0.004148432984948158, -0.38171038031578064, 0.32776209712028503, 0.022081978619098663, -0.44436928629875183, 0.2501782774925232, -0.3590974509716034, 0.07382893562316895, -0.4026620388031006, -0.11434973031282425, 0.10624817758798599, 0.009500274434685707, -0.10033142566680908, -0.09452829509973526, -0.26047444343566895, 0.0071635739877820015, -0.10087741166353226, 0.2901647984981537, -0.16169600188732147, 0.22722245752811432, -0.12036208063364029, 0.09918820112943649, -0.07375672459602356, -0.22343038022518158, -0.010772844776511192, -0.1301417052745819, 0.10444312542676926, -0.2295476496219635, -0.2490978240966797, 0.26698392629623413, -0.029423978179693222, 0.403381884098053, 0.025611616671085358, -0.24891142547130585, 0.221779465675354, -0.04112546518445015, -0.08578881621360779, 0.08462715148925781, 0.10302819311618805, -0.04956072196364403, 0.7756677865982056, -0.028904633596539497, -0.13238975405693054, -0.2946956753730774, 0.1223665326833725, -0.032211750745773315, 0.05094274878501892, 0.2729349732398987, -0.1622237265110016, -0.1328100562095642, -0.24352151155471802, 0.013894300907850266, 0.23289628326892853, 0.09664507210254669, 0.08826927095651627, 0.3098803460597992, 0.05116863176226616, -0.1263473927974701, 0.28501027822494507, 0.018753986805677414, 0.4396485388278961, -0.025051169097423553, 0.1615845412015915, 0.13248310983181, -0.27926498651504517, 0.2479458749294281, 0.09712585061788559, 0.06976213306188583, -0.2154579907655716, 0.1413436084985733, 0.09908613562583923, -0.17934450507164001, 0.031004030257463455, 0.036050233989953995, -0.26454758644104004, 0.18055620789527893, -0.20561742782592773, -0.1350846290588379, 0.11206687986850739, 0.02250436507165432, -0.3421095311641693, 0.3792152404785156, 0.10379558801651001, -0.05517829954624176, -0.06458741426467896, -0.17644183337688446, 0.14158445596694946, -0.059053655713796616, 0.30998092889785767, -0.21320055425167084, 0.3635675013065338, -0.09602200239896774, -0.0447244793176651, -0.23097854852676392, 0.18583032488822937, 0.18363817036151886, 0.05759843438863754, 0.3153475821018219, 0.01500365138053894, 0.061276987195014954, 0.14588232338428497, 0.17308905720710754, 0.031509511172771454, -0.1268610805273056, -0.22935503721237183, -0.25120145082473755, 0.00782602746039629, -0.0029188976623117924, -0.1471860259771347, 0.09293598681688309, -0.18531490862369537, -0.1976003497838974, 0.21957474946975708, -0.06614948809146881, 0.05941131338477135, 0.33342450857162476, -0.018125373870134354, 0.004022737964987755, -0.17716333270072937, 0.06466516852378845, -0.0010532450396567583, -0.7291200160980225, 0.3107971251010895, 0.055692147463560104, -0.3598349988460541, -0.009533978998661041, -0.08333230018615723, 0.0246739499270916, 0.30751729011535645, -0.6023693680763245, 0.059027496725320816, -0.36415261030197144, 0.02229217067360878, -0.17506277561187744, 0.1446501910686493, 0.16941821575164795, -0.006835488136857748, 0.0020277295261621475, 0.033519551157951355, -0.032902512699365616, 0.07124751806259155, -0.18925583362579346, 0.044854383915662766, 0.29058223962783813, 0.6020950078964233, 0.0019185058772563934, 0.6774531602859497, 0.23822736740112305, -0.010103151202201843, 0.323452889919281, 0.11356399953365326, 0.5247788429260254, -0.21542716026306152, -0.092653788626194, -0.1671072542667389, -0.21629515290260315, -0.10277151316404343, 0.25829556584358215, 0.21519911289215088, -0.2334212213754654, -0.1804964244365692, -0.044366978108882904, -0.0072845593094825745, -0.09354861080646515, 0.19710351526737213, -0.3860434293746948, 0.35247552394866943, 0.0431220643222332, 0.040477171540260315, -0.22450387477874756, -0.3934688866138458, 0.10247471928596497, 0.02656630426645279, 0.6047850847244263, -0.06171516701579094, -0.2506677210330963, 0.1356467306613922, -0.7349545359611511, 0.15759111940860748, 0.06089239567518234, 0.39994016289711, 0.11611850559711456, 0.14234399795532227, 0.1530470997095108, -0.26714926958084106, 0.6611440181732178, -0.1820889711380005, 0.023695487529039383, 0.28408145904541016, -0.07003127038478851, -0.22585320472717285, 0.169051393866539, 0.004905983805656433, 0.5148672461509705, 0.01922498643398285, 0.3401060998439789, -0.008586563169956207, -0.20248062908649445, 0.09084857255220413, 0.3764362037181854, -0.27705273032188416, -0.5819289088249207, -0.21866410970687866, -0.12760697305202484, -0.2294224500656128, 0.1933106780052185, 0.1035647764801979, -0.19818128645420074, -0.061746999621391296, -0.06767682731151581, -0.3200579881668091, 0.29008689522743225, 0.05109306424856186, -0.18663693964481354, 0.0040525938384234905, 0.08376751840114594, 0.4016824960708618, 0.051875047385692596, -0.07886119186878204, -0.1687556654214859, 0.5229564905166626, -0.25973254442214966, -0.2651680111885071, -0.18190091848373413, -0.08117885142564774, 0.3944946229457855, 0.32237550616264343, 0.09412088990211487, 0.2992993891239166, 0.17868256568908691, 0.11385315656661987, -0.512009859085083, 0.18926917016506195, 0.15498071908950806, 0.07199490815401077, -0.7229229211807251, -0.6222506165504456, 0.6525928378105164, 0.35198289155960083, 0.12593887746334076, 0.25376757979393005, 0.12205314636230469, -0.2655966579914093, 0.2247302234172821, 0.23361966013908386, 0.8952517509460449, -0.31944769620895386, 0.2945692837238312, -0.297717422246933, 0.1884460300207138, 0.44127583503723145, -0.3313085436820984, 0.08702439814805984, -0.18642374873161316, -0.31488344073295593, -0.0036828313022851944, -0.11617681384086609, 0.17164182662963867, 0.3708030581474304, 0.09521342813968658, 0.3008531332015991, -0.017983756959438324, -0.051608648151159286, -0.01661025919020176, 0.02930254489183426, -0.08204739540815353, -0.585824728012085, -0.21833482384681702, 0.10132832825183868, -0.08557422459125519, 0.14533552527427673, -0.19209980964660645, 0.18407636880874634, 0.2510240375995636, -0.09934806078672409, -0.4174710512161255, -0.036644790321588516, -0.346786230802536, -0.1779518723487854, -0.19798879325389862, -0.16223305463790894, 0.05260208621621132, 0.08650749921798706, 0.5049943327903748, 0.5158253312110901, -0.07509281486272812, -0.09953857958316803, 0.01928555965423584, 0.097604900598526, -0.1561746895313263, 0.08644259721040726, 0.18892358243465424, -0.05735855549573898, 0.054486386477947235, -0.029299207031726837, -0.38471344113349915, -0.12600597739219666, 0.10874027013778687, -0.12949728965759277, 0.08528482913970947, 0.13325606286525726, -0.4105953872203827, 0.043044183403253555, 0.1881161779165268, -0.08036215603351593, 0.04602886736392975, 0.2664836645126343, -0.08431089669466019, 0.17668193578720093, -0.10035693645477295, -0.39247381687164307, -0.017077840864658356, 0.3325718641281128, 0.15091320872306824, -0.2541082203388214, 0.4268798530101776, 0.30139482021331787, -0.27817481756210327, -0.0730166882276535, 0.1619437336921692, 0.0966816246509552, -0.4329402446746826, 0.10427890717983246, 0.1879654824733734, 0.24597899615764618, -0.2142016589641571, 0.05482997000217438, 0.12209541350603104, -0.21561139822006226, 0.12158307433128357, -0.20273934304714203, -0.6988821625709534, -0.11574634909629822, 0.1937435269355774, 0.09633060544729233, 0.5451956391334534, -0.09530051052570343, 0.18980520963668823, 0.4475332498550415, -0.1852531135082245, -0.034150488674640656, -0.005107119679450989, 0.09385016560554504, 0.15894801914691925, 0.2476891279220581, 0.02462071366608143, -0.13508374989032745, -0.04577185586094856, 0.08445031940937042, 0.06267865002155304, -0.2373906970024109, -0.0988684594631195, 0.20002587139606476, -0.057025425136089325, -0.12075155228376389, 0.21253512799739838, -0.1871805489063263, -0.16794204711914062, -0.4030841588973999, 0.033922046422958374, 0.3511112332344055, -0.006971396505832672, -0.20972853899002075, 0.26765263080596924, 0.20404857397079468, -0.3131278157234192, 0.27796798944473267, 0.07485946267843246, 0.10649265348911285, -0.06868503987789154, 0.09694520384073257, 0.2907647490501404, 0.0461495965719223, 0.06582271307706833, -0.15295374393463135, 0.28154945373535156, -0.1276479959487915, 0.0869903638958931, -0.2359275072813034, 0.08804234862327576, 0.2308560311794281, 0.22293813526630402, 0.18890833854675293, -0.11966601014137268, 0.054084114730358124, 0.345278799533844, 0.09658680856227875, -0.3158838152885437, -0.13738061487674713, 0.22070783376693726, -0.12793594598770142, 0.10543438792228699, 0.27108919620513916, 0.20831060409545898, 0.21082830429077148, -0.1556239128112793, 0.22138431668281555, 0.15548153221607208, -0.3679102063179016, -0.02557547204196453, 0.31434357166290283, 0.21947325766086578, 0.2891559600830078, 0.3471427261829376, 0.39374983310699463, 0.19323793053627014, 0.36047041416168213, 0.2966647446155548, 0.5566428899765015, 0.1156122162938118, 0.14604511857032776, -0.2761043310165405, -0.6948469877243042, 0.16864632070064545, 0.1119161993265152, 0.14376550912857056, 0.34306415915489197, -0.1404849886894226, 0.24998152256011963, 0.013436319306492805, -0.21597041189670563, -0.18701009452342987, 0.17248466610908508, -0.20667573809623718, -0.2646561563014984, 0.3597434163093567, 0.029995538294315338, 0.30805906653404236, 0.17558759450912476, -0.006224449723958969, -0.17585304379463196, 0.11991208791732788, 0.036268122494220734, 0.1059836745262146, 0.029143720865249634, 0.12097382545471191, 0.07656154036521912, 0.18712136149406433, -0.20975445210933685, 0.15742401778697968, 0.01889295130968094, 0.131953164935112, -0.16348035633563995, 0.42892032861709595, 0.18740659952163696, 0.3955983519554138, -0.07572871446609497, 0.19279752671718597, -0.05692862346768379, 0.02335173822939396, -0.05762922391295433, 0.19939860701560974, 0.0023046135902404785, -0.07401542365550995, 0.17862197756767273, 0.005361191928386688, -0.058253053575754166, 0.18534067273139954, -0.07937538623809814, 0.3324708640575409, -0.22972236573696136, 0.2897544205188751, -0.03810585290193558, -0.3007810413837433, -0.23211327195167542, 0.2577091455459595, -0.3346063792705536, 0.33399730920791626, 0.7271053194999695, -0.4429166615009308, -0.040211908519268036, -0.06234793737530708, 0.035139475017786026, 0.1675347536802292, 0.5127866864204407, 0.3862246572971344, 0.1302075982093811, -0.2132241427898407, 0.10550631582736969, -0.5249499678611755, -0.1979752779006958, -0.1035250872373581, 0.36073213815689087, -0.2679540812969208, -0.13626328110694885, 0.16284333169460297, 0.21418939530849457, -0.12371930480003357, -0.2999054193496704, -0.05591525882482529, 0.33104750514030457, -0.2579766809940338, -0.20189739763736725, -0.3481373190879822, 0.1867283433675766, 0.017171908169984818, -0.4353330731391907, 0.15845322608947754, 0.2004406899213791, -0.17389455437660217, -0.08892835676670074, 0.16387900710105896, 0.030490346252918243, -0.01802099496126175, 0.34601715207099915, 0.07346715033054352, 0.2587003707885742, -0.19418329000473022, 0.009610200300812721, -0.30587393045425415, 0.023203900083899498, -0.2586739659309387, 0.20876508951187134, 0.05141440033912659, 0.007905110716819763, -0.5748571157455444, -0.31726446747779846, -0.10321417450904846, -0.21648535132408142, -0.1374962329864502, -0.058722928166389465, -0.33312100172042847, -0.23010848462581635, -0.1784721314907074, 0.0029494562186300755, 0.3238133490085602, 0.27668100595474243, -0.008544325828552246, 0.10117592662572861, -0.23281151056289673, -0.18171848356723785, 0.4950384795665741, -0.3164904713630676, -0.30398234724998474, -0.24054916203022003, 0.05648542568087578, 0.12380008399486542, -0.2566738724708557, -0.4457370638847351, 0.15041214227676392, 0.28647902607917786, -0.13946068286895752, 0.058870185166597366, 0.36481156945228577, -0.3023816645145416, 0.09236621856689453, -0.2112695574760437, 0.6263196468353271, -0.18212559819221497, -0.09965228289365768, -0.36726677417755127, -0.4044739007949829 ]
https://github.com/huggingface/datasets/issues/1776
[Question & Bug Report] Can we preprocess a dataset on the fly?
Indeed I will submit a PR in a fez days to enable processing on-the-fly :) This can be useful in language modeling for tokenization, padding etc.
I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache? BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code: https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532
26
[Question & Bug Report] Can we preprocess a dataset on the fly? I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache? BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code: https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532 Indeed I will submit a PR in a fez days to enable processing on-the-fly :) This can be useful in language modeling for tokenization, padding etc.
[ -0.38063016533851624, -0.1969687044620514, -0.07462398707866669, -0.006864205002784729, 0.40077728033065796, 0.3399398922920227, 0.2778780460357666, 0.26342716813087463, -0.09953585267066956, 0.1461998075246811, 0.13427719473838806, 0.18493719398975372, -0.1421179622411728, 0.2875473201274872, 0.2689658999443054, 0.14315328001976013, 0.19679799675941467, 0.03322164714336395, 0.07253334671258926, 0.23776601254940033, -0.28207746148109436, -0.15956147015094757, -0.12986202538013458, -0.17965947091579437, -0.40866023302078247, -0.3066294193267822, -0.15479989349842072, -0.09391786903142929, -0.27369406819343567, -0.20015335083007812, 0.2956170439720154, 0.29631489515304565, 0.06532524526119232, 0.4654723107814789, -0.00011540271952981129, 0.010521911084651947, 0.4278811812400818, -0.054712384939193726, -0.09954608976840973, -0.14353443682193756, 0.13768413662910461, -0.24834676086902618, -0.13861174881458282, -0.2409491240978241, -0.1121576726436615, -0.033816635608673096, 0.07843051850795746, -0.6800127029418945, 0.3494403660297394, 0.11581527441740036, 0.18762309849262238, 0.11962717771530151, -0.08414150774478912, 0.15587642788887024, 0.284335732460022, 0.3790516257286072, -0.34934553503990173, -0.13078436255455017, 0.19725969433784485, -0.0772145465016365, 0.08154481649398804, 0.0771731436252594, -0.35989910364151, -0.04842636361718178, 0.28948256373405457, 0.08926977962255478, -0.21458306908607483, -0.6604300737380981, 0.1388302743434906, 0.27469971776008606, 0.4689074754714966, -0.5630958676338196, -0.7029761075973511, -0.21934807300567627, 0.14027421176433563, -0.3208349347114563, 0.03829054906964302, 0.4482020139694214, -0.17156405746936798, 0.07312432676553726, -0.4151315689086914, -0.4202467203140259, 0.041366688907146454, -0.3086305260658264, 0.2753443121910095, -0.07209821045398712, -0.21196073293685913, 0.025201790034770966, 0.03420155867934227, 0.18109925091266632, 0.46656471490859985, -0.2718546390533447, -0.30903756618499756, 0.48357483744621277, -0.25777754187583923, -0.19700907170772552, -0.264556348323822, 0.06774819642305374, 0.26920968294143677, 0.059396933764219284, 0.031287781894207, -0.12087660282850266, -0.059394653886556625, -0.060343317687511444, 0.18576303124427795, 0.04672357067465782, -0.02059667557477951, -0.1888609677553177, 0.28854793310165405, -0.2618696093559265, 0.10948362946510315, -0.0513223260641098, 0.02047351747751236, -0.33831027150154114, 0.3059312403202057, 0.09551955759525299, 0.24374164640903473, -0.27114683389663696, 0.38853543996810913, -0.02722165733575821, 0.07651275396347046, -0.023570405319333076, -0.4008274972438812, 0.08768114447593689, -0.11595229059457779, -0.004716470837593079, 0.15468528866767883, 0.09619628638029099, 0.06724321097135544, -0.22885951399803162, -0.07707895338535309, 0.014027167111635208, 0.004148740321397781, 0.23254980146884918, 0.07277140021324158, -0.19737255573272705, 0.03116575814783573, 0.21053269505500793, -0.09173376858234406, -0.20584779977798462, 0.17513425648212433, -0.44167542457580566, 0.09071100503206253, 0.298226535320282, 0.03513592854142189, 0.046814121305942535, -0.02991728112101555, 0.35252881050109863, -0.23667296767234802, 0.558014452457428, -0.15719273686408997, -0.2958837151527405, 0.04677727445960045, 0.07422870397567749, -0.020416634157299995, 0.0069830939173698425, -0.5607439279556274, 0.23428426682949066, 0.6066605448722839, 0.21604269742965698, 0.26053786277770996, 0.23207391798496246, -0.30536726117134094, -0.15470123291015625, 0.1365787386894226, 0.43688684701919556, -0.2761690020561218, 0.18238571286201477, 0.2781619131565094, 0.03970164805650711, 0.22470176219940186, 0.028513465076684952, -0.02424231357872486, 0.2706720530986786, -0.04757564514875412, -0.1463966965675354, 0.321170449256897, -0.0999133288860321, 0.13672035932540894, 0.39963534474372864, -0.05905010923743248, -0.2813989520072937, 0.08106813579797745, 0.1655159741640091, -0.06320751458406448, -0.056583452969789505, -0.0004900544881820679, 0.4461778998374939, 0.023889601230621338, 0.158946692943573, -0.18043732643127441, -0.4752102494239807, -0.22435300052165985, -0.013599414378404617, 0.011864028871059418, 0.12632986903190613, -0.12866050004959106, -0.2577134072780609, 0.08103630691766739, -0.2028317153453827, 0.19902929663658142, 0.33933907747268677, -0.04003332927823067, 0.07005037367343903, 0.050167012959718704, -0.21940672397613525, -0.32555362582206726, 0.23923233151435852, -0.12903976440429688, 0.07254030555486679, 0.1684773564338684, -0.44149982929229736, 0.20578047633171082, 0.11762569099664688, 0.0929604321718216, 0.16509020328521729, 0.01848851889371872, -0.3471727967262268, 0.25718313455581665, 0.008034419268369675, -0.48882579803466797, 0.284756600856781, -0.28182390332221985, 0.06055546551942825, -0.31922447681427, -0.08911245316267014, 0.15444546937942505, -0.0264187753200531, -0.0729772299528122, -0.11705740541219711, -0.23852062225341797, 0.03209453076124191, -0.10211261361837387, 0.2757897973060608, -0.0663905143737793, 0.16827332973480225, -0.08663468807935715, 0.12564176321029663, -0.14474505186080933, -0.12906992435455322, -0.007608579471707344, -0.17177961766719818, 0.14997053146362305, -0.19085901975631714, -0.18799185752868652, 0.24413707852363586, -0.0906541645526886, 0.4551093876361847, -0.01866854354739189, -0.17646338045597076, 0.18051257729530334, 0.006529718637466431, -0.055236347019672394, 0.12505468726158142, 0.015582039952278137, -0.08828048408031464, 0.7388348579406738, -0.1510334312915802, -0.09796901047229767, -0.11662786453962326, 0.026518691331148148, 0.0043679773807525635, -0.01170320063829422, 0.2582092583179474, -0.1133447214961052, -0.14054861664772034, -0.22059385478496552, 0.08562670648097992, 0.2107991874217987, 0.1212836429476738, 0.039546623826026917, 0.2407393753528595, 0.07095715403556824, -0.06431826204061508, 0.3207207918167114, 0.02273472025990486, 0.45631301403045654, -0.04685311019420624, 0.23022422194480896, 0.15752607583999634, -0.21216222643852234, 0.1479542851448059, 0.061192989349365234, 0.06468434631824493, -0.1386880874633789, 0.1182626411318779, 0.13235251605510712, -0.15800203382968903, 0.13924680650234222, -0.028587479144334793, -0.27574610710144043, 0.09569783508777618, -0.13782383501529694, -0.11890178918838501, 0.14351950585842133, -0.027889499440789223, -0.44743385910987854, 0.46890705823898315, 0.05117158591747284, -0.1783304065465927, -0.172049880027771, -0.25060582160949707, 0.2144927978515625, -0.008766161277890205, 0.23328469693660736, -0.1438090056180954, 0.4303092658519745, -0.018049800768494606, 0.058952443301677704, -0.2585681974887848, 0.13747739791870117, 0.10435211658477783, 0.03097529709339142, 0.38307124376296997, -0.006109297275543213, 0.0010169893503189087, 0.20853757858276367, 0.20509108901023865, -0.0019421593751758337, -0.14475661516189575, -0.20030024647712708, -0.2609395384788513, -0.023616936057806015, -0.005871995817869902, -0.2088479995727539, 0.09288545697927475, -0.1521233171224594, -0.23904834687709808, 0.13619142770767212, -0.002510957419872284, 0.052035853266716, 0.19139154255390167, -0.03416278958320618, -0.09710907191038132, -0.16018971800804138, 0.06803178042173386, -0.02492241933941841, -0.6827618479728699, 0.2437421679496765, 0.017617221921682358, -0.3386533260345459, -0.02387204021215439, 0.008868809789419174, 0.043736256659030914, 0.3255074620246887, -0.5940137505531311, 0.06406852602958679, -0.4057151675224304, 0.07097190618515015, -0.22092396020889282, 0.16153322160243988, 0.3194848895072937, 0.10002706199884415, -0.021657992154359818, 0.03393665701150894, -0.16035576164722443, -0.020117081701755524, -0.1682429313659668, -0.023550309240818024, 0.34330230951309204, 0.45358508825302124, 0.031481269747018814, 0.6971468925476074, 0.13546471297740936, -0.007267843931913376, 0.3471176028251648, 0.03752008080482483, 0.4989183843135834, -0.3026139438152313, -0.11541145294904709, -0.19299304485321045, -0.2688210904598236, -0.17421624064445496, 0.07811406999826431, 0.20364785194396973, -0.28886184096336365, -0.21735334396362305, 0.05150524899363518, -0.11613540351390839, -0.0403539277613163, 0.08608666807413101, -0.34709087014198303, 0.35492825508117676, 0.02755548059940338, 0.027591899037361145, -0.29215556383132935, -0.38152754306793213, 0.11333660781383514, 0.0050599947571754456, 0.7152580618858337, -0.14129100739955902, -0.19823229312896729, 0.18184003233909607, -0.6152511239051819, 0.181292325258255, 0.02404063194990158, 0.3918982446193695, 0.13090157508850098, 0.0447121262550354, 0.13155901432037354, -0.293667197227478, 0.5625486969947815, -0.2596140503883362, 0.021820450201630592, 0.3942940831184387, -0.04889468103647232, -0.24840055406093597, 0.15034668147563934, 0.08036558330059052, 0.5243752002716064, -0.19547060132026672, 0.2850288152694702, -0.02036680281162262, -0.13412708044052124, 0.047423671931028366, 0.3616248071193695, -0.2078997790813446, -0.5691263675689697, -0.21006843447685242, -0.13691368699073792, -0.1960625946521759, 0.1672901213169098, 0.05068608373403549, -0.14847800135612488, -0.09898430854082108, -0.07939809560775757, -0.4353754222393036, 0.3044627606868744, -0.04921606183052063, -0.20592902600765228, 0.03091251105070114, -0.05216856300830841, 0.4565045237541199, 0.010705109685659409, -0.2476540207862854, -0.16799059510231018, 0.48793870210647583, -0.18821515142917633, -0.24560114741325378, -0.15806657075881958, -0.005101482383906841, 0.44879239797592163, 0.22745804488658905, 0.04680686816573143, 0.2421494424343109, 0.02881167270243168, 0.06787220388650894, -0.5434039831161499, 0.058066096156835556, 0.12932243943214417, -0.07685290277004242, -0.6611815690994263, -0.679652988910675, 0.5924068093299866, 0.4728294909000397, 0.06901271641254425, 0.46790608763694763, 0.03738313913345337, -0.18621620535850525, 0.3434482216835022, 0.2481505572795868, 0.8985002636909485, -0.37078291177749634, 0.2124948352575302, -0.376099556684494, 0.1162080317735672, 0.29984915256500244, -0.3049745559692383, 0.0756966769695282, -0.30925413966178894, -0.3410371243953705, 0.03169745206832886, -0.16260306537151337, 0.17449617385864258, 0.3247883915901184, 0.07135993242263794, 0.2498452514410019, -0.049953892827034, -0.08416227996349335, -0.022854046896100044, -0.10554137825965881, -0.0549490824341774, -0.5814416408538818, -0.13644976913928986, 0.13799169659614563, -0.068412184715271, 0.13581417500972748, -0.13968172669410706, 0.20950858294963837, 0.2830488383769989, -0.13001666963100433, -0.43888288736343384, -0.0014405753463506699, -0.23892879486083984, -0.2830256223678589, -0.19298477470874786, -0.14825861155986786, -0.020519951358437538, 0.02898447774350643, 0.5220217108726501, 0.5669858455657959, 0.015147723257541656, -0.1017065942287445, 0.14498695731163025, 0.10290676355361938, -0.05491571128368378, 0.1144184023141861, 0.09506624191999435, -0.08765717595815659, 0.06441942602396011, -0.001864023506641388, -0.38938575983047485, -0.1696491539478302, 0.1456434428691864, -0.04975396394729614, 0.12668678164482117, 0.05350463092327118, -0.33079567551612854, 0.12411586940288544, 0.27437666058540344, -0.08970776200294495, 0.0835440456867218, 0.3032916486263275, -0.0005667756777256727, 0.2926296591758728, -0.19849245250225067, -0.33644452691078186, 0.0016809627413749695, 0.23420163989067078, 0.17709946632385254, -0.27525594830513, 0.22372254729270935, 0.233878031373024, -0.25757575035095215, -0.10630445182323456, 0.17240026593208313, -0.07631311565637589, -0.3368684947490692, 0.1599050760269165, 0.12803326547145844, 0.25585252046585083, -0.12171391397714615, 0.1438896358013153, 0.03125280886888504, -0.1869906485080719, 0.09780122339725494, -0.21967799961566925, -0.5614843368530273, -0.08400261402130127, 0.0762472003698349, 0.15192443132400513, 0.5885528922080994, -0.3070674240589142, 0.12644527852535248, 0.37019917368888855, -0.21794331073760986, -0.010918262414634228, 0.08404707908630371, 0.09072968363761902, 0.10649707168340683, 0.2765709161758423, -0.026167497038841248, -0.14701524376869202, -0.023552564904093742, 0.08015080541372299, 0.0814550518989563, -0.25118905305862427, -0.021066784858703613, 0.18893614411354065, -0.10974287241697311, -0.027819542214274406, 0.2378377765417099, -0.19925948977470398, -0.32053279876708984, -0.35031184554100037, 0.07541801035404205, 0.355634868144989, -0.12502488493919373, -0.2205466330051422, 0.30596596002578735, 0.19243407249450684, -0.3947244882583618, 0.3645469546318054, 0.11251605302095413, 0.13034474849700928, -0.106144979596138, 0.17551222443580627, 0.20992951095104218, -0.01458895206451416, 0.12232259660959244, -0.1652100682258606, 0.23440423607826233, -0.021419279277324677, 0.15161865949630737, -0.20994533598423004, 0.10741518437862396, 0.19616518914699554, 0.27123939990997314, 0.1962302178144455, -0.06289797276258469, 0.09379984438419342, 0.31838443875312805, 0.127335786819458, -0.2558271884918213, -0.18132559955120087, 0.16107705235481262, -0.02210065722465515, 0.10443159937858582, 0.29581013321876526, 0.2726113796234131, 0.19736948609352112, -0.16814638674259186, 0.25173938274383545, 0.22230035066604614, -0.446555495262146, 0.04788852855563164, 0.22981880605220795, 0.16019359230995178, 0.16910013556480408, 0.26858556270599365, 0.3256412744522095, 0.09999726712703705, 0.3341900706291199, 0.33404919505119324, 0.5820025205612183, 0.39889901876449585, 0.0812576413154602, -0.26379847526550293, -0.630876898765564, 0.31626179814338684, 0.06252533942461014, 0.2412298321723938, 0.3569070100784302, -0.05552650988101959, 0.2297915816307068, 0.035386163741350174, -0.17069219052791595, -0.19887271523475647, 0.12122870981693268, -0.13756436109542847, -0.16653750836849213, 0.37725919485092163, 0.016535162925720215, 0.3176463842391968, 0.10492143034934998, -0.04185669496655464, -0.09927234053611755, 0.2685156464576721, 0.0013305097818374634, 0.1823672205209732, 0.11839189380407333, 0.16524481773376465, 0.06009728088974953, 0.28577151894569397, -0.18342383205890656, 0.1760759800672531, -0.04369419813156128, 0.04718444496393204, -0.13340739905834198, 0.5387237668037415, 0.26724332571029663, 0.3809128999710083, -0.12416452169418335, 0.16159114241600037, -0.1029651015996933, 0.010156216099858284, -0.01248331367969513, 0.29421329498291016, -0.043090060353279114, -0.07433634996414185, 0.17864583432674408, 0.045570679008960724, -0.0442042276263237, 0.23257826268672943, -0.13035574555397034, 0.385547935962677, -0.1641395390033722, 0.3359886705875397, 0.09041473269462585, -0.2982099950313568, -0.18754306435585022, 0.20612382888793945, -0.24364271759986877, 0.1571836769580841, 0.7409976720809937, -0.3596806228160858, -0.1059647798538208, -0.08483921736478806, 0.05386984348297119, 0.1989264339208603, 0.44216078519821167, 0.3787406086921692, 0.09707637876272202, -0.12981517612934113, 0.06909157335758209, -0.37576255202293396, -0.1561976671218872, -0.10441139340400696, 0.2584381103515625, -0.20273853838443756, -0.14423759281635284, 0.19736206531524658, 0.30045419931411743, -0.032004907727241516, -0.2971871495246887, -0.0014056405052542686, 0.4319020211696625, -0.2911928594112396, -0.13247399032115936, -0.23003636300563812, 0.06531868129968643, 0.0283208005130291, -0.47672605514526367, 0.11694259941577911, 0.19173644483089447, -0.110686756670475, 0.03524269163608551, 0.07042445242404938, 0.16646729409694672, -0.06037460267543793, 0.4525506794452667, 0.03399625048041344, 0.1825508177280426, -0.12791778147220612, 0.00586533360183239, -0.3119243085384369, -0.07593869417905807, -0.22876930236816406, 0.23962286114692688, 0.051136452704668045, -0.12845000624656677, -0.5494624376296997, -0.3066652715206146, -0.10700322687625885, -0.2587789297103882, -0.2332359254360199, 0.03912113606929779, -0.3262364864349365, -0.2682565748691559, -0.16888710856437683, -0.056906137615442276, 0.22410033643245697, 0.1854242980480194, 0.0212511345744133, 0.09826988726854324, -0.2764483690261841, -0.27640771865844727, 0.445054829120636, -0.11665625870227814, -0.32419055700302124, -0.23451215028762817, 0.05785706266760826, 0.08003596216440201, -0.21779973804950714, -0.3854016661643982, 0.15555298328399658, 0.2995452284812927, -0.13096070289611816, 0.21521954238414764, 0.3185413181781769, -0.3890830874443054, 0.10243454575538635, -0.2206641137599945, 0.6346169710159302, -0.2192080318927765, 0.033623531460762024, -0.40681007504463196, -0.3738471269607544 ]
https://github.com/huggingface/datasets/issues/1776
[Question & Bug Report] Can we preprocess a dataset on the fly?
Hi @acul3, Please look at the discussion on a related Issue #1825. I think using `set_transform` after building from source should do.
I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache? BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code: https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532
22
[Question & Bug Report] Can we preprocess a dataset on the fly? I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache? BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code: https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532 Hi @acul3, Please look at the discussion on a related Issue #1825. I think using `set_transform` after building from source should do.
[ -0.4329627752304077, -0.14976249635219574, -0.021089907735586166, 0.011729221791028976, 0.4850177764892578, 0.27308812737464905, 0.30650410056114197, 0.276275098323822, -0.17471306025981903, 0.10266134142875671, 0.09820565581321716, 0.1963544338941574, -0.08684200048446655, 0.24604521691799164, 0.2638711929321289, 0.14228421449661255, 0.20810467004776, 0.08987978100776672, -0.09663011133670807, 0.18759694695472717, -0.29598692059516907, -0.14257480204105377, -0.06332728266716003, -0.18397657573223114, -0.46941739320755005, -0.24277231097221375, -0.12922313809394836, 0.0019163675606250763, -0.18162192404270172, -0.2031061351299286, 0.29272347688674927, 0.23240581154823303, -0.014858679845929146, 0.4824580252170563, -0.00011419361544540152, 0.048818983137607574, 0.412786066532135, -0.10139621049165726, -0.14203037321567535, -0.1252632886171341, 0.10220155864953995, -0.30306074023246765, -0.1348370462656021, -0.25863003730773926, -0.15554463863372803, -0.10205137729644775, 0.03970080986618996, -0.6355343461036682, 0.43213534355163574, 0.14660969376564026, 0.22004814445972443, 0.14741426706314087, -0.04512320086359978, 0.12456943094730377, 0.2610999345779419, 0.3140590786933899, -0.3821600377559662, -0.10725577175617218, 0.18083712458610535, 0.03866717964410782, 0.037809889763593674, 0.15192994475364685, -0.3269191086292267, 0.005300456658005714, 0.35915711522102356, 0.11015108227729797, -0.23634222149848938, -0.5635488033294678, 0.14775308966636658, 0.2872588634490967, 0.47847843170166016, -0.5608304142951965, -0.7194268703460693, -0.26612716913223267, 0.14518287777900696, -0.3385508954524994, 0.10055816173553467, 0.4154745042324066, -0.17051571607589722, 0.06584510207176208, -0.45236897468566895, -0.43096232414245605, 0.025211967527866364, -0.3683652877807617, 0.24051401019096375, -0.1445683091878891, -0.23352809250354767, 0.020499762147665024, 0.0057089924812316895, 0.18992917239665985, 0.410708487033844, -0.21884356439113617, -0.33816081285476685, 0.43553465604782104, -0.21855540573596954, -0.21876369416713715, -0.26613056659698486, 0.08142546564340591, 0.245732843875885, 0.13982971012592316, 0.015508261509239674, -0.11616549640893936, -0.0325910747051239, -0.08937158435583115, 0.13607601821422577, 0.12032406032085419, -0.0844903513789177, -0.14083033800125122, 0.28963595628738403, -0.2251358926296234, 0.09499992430210114, -0.09808176010847092, 0.08256117254495621, -0.4091346263885498, 0.3306640684604645, 0.10457776486873627, 0.3203132748603821, -0.3002017140388489, 0.3989454507827759, 0.01400851458311081, 0.1325962245464325, 0.015017922967672348, -0.3814520835876465, 0.14573436975479126, -0.11045229434967041, 0.051231712102890015, 0.1466379314661026, 0.14227284491062164, 0.06133429706096649, -0.1713286191225052, -0.12158609926700592, -0.057974305003881454, -0.01765778288245201, 0.30376434326171875, 0.10175861418247223, -0.20350632071495056, 0.09603285789489746, 0.196831613779068, -0.06930580735206604, -0.14747780561447144, 0.15935657918453217, -0.4074440896511078, 0.17736905813217163, 0.34921547770500183, -0.025846485048532486, 0.08957961201667786, -0.0435275100171566, 0.35301482677459717, -0.19980444014072418, 0.5373977422714233, -0.13544046878814697, -0.31220245361328125, 0.035628799349069595, 0.0945882499217987, -0.053179994225502014, 0.03737373650074005, -0.561977744102478, 0.14266104996204376, 0.6161592602729797, 0.2149137556552887, 0.2612338960170746, 0.18447695672512054, -0.24947300553321838, -0.16102074086666107, 0.13912388682365417, 0.4578090310096741, -0.2424228936433792, 0.15425094962120056, 0.3046620488166809, 0.05118178203701973, 0.13853506743907928, 0.09610189497470856, -0.028949929401278496, 0.20645150542259216, -0.038737472146749496, -0.19975221157073975, 0.3259776532649994, -0.07219588756561279, 0.04675338417291641, 0.3394373655319214, -0.09082116931676865, -0.2645251154899597, 0.08235339820384979, 0.13847118616104126, -0.02766033262014389, -0.09626731276512146, -0.05483624339103699, 0.4266059994697571, -0.01957077719271183, 0.23604318499565125, -0.18107111752033234, -0.4425278604030609, -0.2827939987182617, -0.07466979324817657, 0.017609097063541412, 0.13785214722156525, -0.1969926357269287, -0.27384933829307556, 0.05709024518728256, -0.18213453888893127, 0.2325853705406189, 0.348699152469635, -0.04560578987002373, 0.04651282727718353, 0.05859515443444252, -0.14478498697280884, -0.3847303092479706, 0.22109252214431763, -0.1042703315615654, 0.04221171513199806, 0.11362700909376144, -0.43162113428115845, 0.1256345510482788, 0.10942166298627853, 0.07254658639431, 0.10652628540992737, 0.039617642760276794, -0.30190309882164, 0.29474955797195435, -0.041090916842222214, -0.4444381594657898, 0.24860525131225586, -0.169412299990654, 0.11282353103160858, -0.4200754165649414, -0.07612603157758713, 0.15064221620559692, -0.06473775953054428, -0.061865225434303284, -0.12362360209226608, -0.18797451257705688, -0.007472614757716656, -0.15522858500480652, 0.31024226546287537, -0.15093983709812164, 0.23765523731708527, -0.08336622267961502, 0.14791467785835266, -0.10315084457397461, -0.2216743379831314, 0.013471430167555809, -0.1461162120103836, 0.12049753963947296, -0.18983504176139832, -0.23742961883544922, 0.2405589520931244, -0.12544134259223938, 0.45281341671943665, -0.02444714494049549, -0.10674019902944565, 0.1965590864419937, -0.05742703378200531, -0.06503515690565109, 0.09893961250782013, -0.04699486121535301, -0.04357730969786644, 0.7283751964569092, -0.08934192359447479, -0.06463805586099625, -0.08555378764867783, 0.07168813794851303, 0.014610707759857178, -0.045050181448459625, 0.2503601014614105, -0.14300528168678284, -0.12394487857818604, -0.2058187574148178, 0.11238975822925568, 0.22712305188179016, 0.1460501104593277, 0.028183069080114365, 0.20946215093135834, 0.05400760471820831, -0.10658888518810272, 0.3312433362007141, 0.019544698297977448, 0.46029984951019287, -0.028526954352855682, 0.24615027010440826, 0.10565144568681717, -0.21524393558502197, 0.2044365406036377, 0.08516615629196167, 0.05613422393798828, -0.1728527992963791, 0.11263041943311691, 0.15506131947040558, -0.0694647803902626, 0.03615681454539299, 0.000529714860022068, -0.22459912300109863, 0.08335912227630615, -0.12078440189361572, -0.0309186689555645, 0.024062633514404297, 0.058393292129039764, -0.4411792755126953, 0.3388667404651642, 0.05310336500406265, -0.18555228412151337, -0.1853673756122589, -0.21004755795001984, 0.20908617973327637, 0.00308937206864357, 0.19118213653564453, -0.17026293277740479, 0.4499087333679199, -0.06540609896183014, 0.02909081056714058, -0.29617249965667725, 0.1470840573310852, 0.0948987752199173, -0.005277626216411591, 0.3585241138935089, 0.01486525684595108, 0.02739432454109192, 0.20911391079425812, 0.19989921152591705, 0.05959424376487732, -0.16880843043327332, -0.18062806129455566, -0.20808060467243195, -0.056434936821460724, 0.01799083687365055, -0.15132933855056763, -0.006899550557136536, -0.029732955619692802, -0.2902204990386963, 0.13177600502967834, -0.027169913053512573, 0.022542886435985565, 0.23140424489974976, 0.04084163159132004, -0.15084423124790192, -0.0609036348760128, 0.06513451784849167, -0.041166700422763824, -0.6186643838882446, 0.3016769289970398, -0.05878111720085144, -0.34654301404953003, -0.0441339910030365, -0.02790563553571701, 0.017873741686344147, 0.3690829277038574, -0.6034704446792603, 0.07595375180244446, -0.43368810415267944, 0.07875864207744598, -0.15461966395378113, 0.19420582056045532, 0.3209504187107086, 0.1343020796775818, -0.09562025964260101, -0.03472581133246422, -0.17358775436878204, 0.014820985496044159, -0.1583307683467865, -0.008743368089199066, 0.25834712386131287, 0.42548200488090515, -0.014115259051322937, 0.7667747139930725, 0.156337708234787, -0.04082193598151207, 0.3145267963409424, 0.017723802477121353, 0.5878832936286926, -0.35641908645629883, -0.12584969401359558, -0.18135133385658264, -0.21664375066757202, -0.14913751184940338, 0.07184362411499023, 0.25375983119010925, -0.2575013041496277, -0.20455655455589294, 0.07010997831821442, -0.11129377782344818, -0.11720417439937592, 0.15797726809978485, -0.3516559600830078, 0.29937082529067993, 0.04676328971982002, 0.1009601280093193, -0.2630338668823242, -0.35495707392692566, 0.12592345476150513, -0.0599195659160614, 0.6850700378417969, -0.15390048921108246, -0.1800370216369629, 0.13758277893066406, -0.691207230091095, 0.22517645359039307, 0.010991528630256653, 0.27518901228904724, 0.16949203610420227, 0.012462034821510315, 0.06761956959962845, -0.3236370086669922, 0.5596719980239868, -0.20986369252204895, -0.018578067421913147, 0.39164915680885315, -0.04108032211661339, -0.3185814917087555, 0.14383792877197266, 0.08320340514183044, 0.5215531587600708, -0.17038863897323608, 0.2730239927768707, -0.07997244596481323, -0.16309982538223267, 0.13640820980072021, 0.40824243426322937, -0.22051633894443512, -0.4579716920852661, -0.20556455850601196, -0.21043670177459717, -0.22330458462238312, 0.16255363821983337, -0.0004978794604539871, -0.1777331382036209, -0.16164027154445648, -0.11082226037979126, -0.38799262046813965, 0.24192842841148376, -0.10167096555233002, -0.18166854977607727, 0.15948021411895752, -0.007023112382739782, 0.5028970241546631, 0.09145434200763702, -0.1354881078004837, -0.046701580286026, 0.6026403903961182, -0.16953210532665253, -0.16210433840751648, -0.16363558173179626, 0.005474293604493141, 0.3667348027229309, 0.3100368082523346, 0.028797484934329987, 0.1405538022518158, 0.0074562327936291695, 0.10563632845878601, -0.5073131918907166, 0.06009865179657936, 0.13150617480278015, -0.08067504316568375, -0.5603205561637878, -0.6287384629249573, 0.6531302332878113, 0.38279837369918823, 0.031117290258407593, 0.4319264888763428, 0.11654067039489746, -0.16844066977500916, 0.3139212727546692, 0.2665287256240845, 0.8644784092903137, -0.34680360555648804, 0.24904218316078186, -0.2838614284992218, 0.09723363816738129, 0.30668970942497253, -0.21822719275951385, 0.03435670956969261, -0.33034631609916687, -0.3620760440826416, 0.06883738189935684, -0.19250012934207916, 0.11415152996778488, 0.26704666018486023, 0.05115223303437233, 0.23594224452972412, -0.09587745368480682, -0.12192331254482269, -0.11976228654384613, -0.08171460032463074, -0.13603751361370087, -0.600802481174469, -0.17836233973503113, 0.15159854292869568, -0.04680268466472626, 0.13191191852092743, -0.11451997607946396, 0.20925290882587433, 0.1811387538909912, -0.1507108062505722, -0.4558624029159546, 0.02701564133167267, -0.2561565041542053, -0.246982142329216, -0.1386922299861908, -0.22689232230186462, -0.06806589663028717, 0.04060203582048416, 0.5350571274757385, 0.4937669336795807, -0.04535811394453049, -0.05543513223528862, 0.14985153079032898, 0.1393456906080246, -0.0006823719013482332, 0.10400550812482834, 0.13615232706069946, -0.055303752422332764, 0.06262225657701492, 0.005233824253082275, -0.36329612135887146, -0.1164650022983551, 0.18806356191635132, -0.16447396576404572, 0.07541116327047348, -0.05574566125869751, -0.2545492649078369, 0.07337839901447296, 0.24664422869682312, -0.1198306679725647, 0.09575606882572174, 0.2751668393611908, 0.003511825343593955, 0.29702433943748474, -0.15720239281654358, -0.36419034004211426, -0.022430408746004105, 0.25222763419151306, 0.1832289695739746, -0.2786252498626709, 0.35426825284957886, 0.19727681577205658, -0.22243429720401764, -0.13412639498710632, 0.18423563241958618, 0.018240049481391907, -0.4513956904411316, 0.24806176126003265, 0.12629684805870056, 0.18291185796260834, -0.11392178386449814, 0.17164702713489532, 0.020669087767601013, -0.1863153576850891, 0.10575820505619049, -0.16074886918067932, -0.5908617377281189, -0.0775446891784668, 0.1379883736371994, 0.21361346542835236, 0.4876234829425812, -0.3452974557876587, 0.11471813917160034, 0.3632792830467224, -0.2515029311180115, -0.0527469664812088, 0.07163817435503006, 0.1376984864473343, 0.0814589112997055, 0.2629789113998413, 0.03636232390999794, -0.1899963617324829, -0.006793739274144173, 0.041363779455423355, 0.005094799678772688, -0.25640183687210083, -0.06515943259000778, 0.1668858826160431, -0.1567247211933136, -0.08775223791599274, 0.1447250247001648, -0.19975149631500244, -0.2308960258960724, -0.41381338238716125, 0.16140377521514893, 0.36096104979515076, -0.10768502950668335, -0.22224409878253937, 0.28471922874450684, 0.12515567243099213, -0.3574778437614441, 0.29585495591163635, 0.057633981108665466, 0.14309091866016388, -0.14669369161128998, 0.17992909252643585, 0.18287400901317596, -0.07039407640695572, 0.06894763559103012, -0.17544493079185486, 0.21208477020263672, 0.05600489303469658, 0.16812744736671448, -0.22200192511081696, 0.05520125851035118, 0.26481059193611145, 0.3314080536365509, 0.19100414216518402, -0.07495610415935516, 0.0767027959227562, 0.29166802763938904, 0.17311102151870728, -0.26039445400238037, -0.1648772954940796, 0.07268144935369492, -0.08233793079853058, 0.11578021943569183, 0.2786785960197449, 0.2320004105567932, 0.10149212181568146, -0.10814864933490753, 0.2868589460849762, 0.1727774292230606, -0.40577125549316406, 0.08975957334041595, 0.2512679100036621, 0.1278180480003357, 0.1547180861234665, 0.3263251483440399, 0.310688316822052, 0.18802963197231293, 0.359375536441803, 0.29826030135154724, 0.5835418701171875, 0.337589830160141, 0.08546386659145355, -0.24754351377487183, -0.6166614294052124, 0.29195481538772583, 0.012683525681495667, 0.25370633602142334, 0.34170377254486084, 0.0011654272675514221, 0.2255641520023346, 0.04103034362196922, -0.25576502084732056, -0.24898651242256165, 0.14458703994750977, -0.15774422883987427, -0.17408190667629242, 0.354208379983902, 0.034988462924957275, 0.3517553508281708, 0.13457520306110382, -0.06842775642871857, -0.08994057774543762, 0.32068198919296265, 0.043011151254177094, 0.170348659157753, 0.10470359027385712, 0.22470727562904358, 0.007458530366420746, 0.3076196610927582, -0.1570519655942917, 0.19433271884918213, -0.0012041926383972168, 0.03919363021850586, -0.0729844868183136, 0.5906714200973511, 0.31275585293769836, 0.3928542733192444, -0.10747580230236053, 0.1859055757522583, -0.01503768190741539, -0.019771091639995575, -0.03287259116768837, 0.2742157578468323, -0.08664126694202423, -0.13490408658981323, 0.19345052540302277, 0.06458836793899536, -0.09403587877750397, 0.18811236321926117, -0.15717650949954987, 0.35709652304649353, -0.10758563876152039, 0.32263627648353577, 0.09698523581027985, -0.3717992603778839, -0.21902942657470703, 0.18612951040267944, -0.18532419204711914, 0.12986935675144196, 0.7191511988639832, -0.382975697517395, -0.06614232808351517, -0.11639720946550369, 0.0697057768702507, 0.2253585159778595, 0.5203012228012085, 0.3859867453575134, 0.0675293356180191, -0.1704457551240921, 0.07980510592460632, -0.39668306708335876, -0.1173795536160469, -0.10928972065448761, 0.2891935706138611, -0.15930110216140747, -0.09396257996559143, 0.179419606924057, 0.2901896834373474, -0.002313777804374695, -0.3146267831325531, 0.048203133046627045, 0.43114569783210754, -0.266226202249527, -0.20243263244628906, -0.19070802628993988, 0.05741316080093384, 0.023413587361574173, -0.5342944264411926, 0.13799282908439636, 0.1352621614933014, -0.07911594212055206, 0.07260984927415848, 0.10563892126083374, 0.17288371920585632, -0.009929962456226349, 0.42564570903778076, 0.07138720899820328, 0.16450604796409607, -0.13748176395893097, -0.010516747832298279, -0.3001009225845337, -0.16406868398189545, -0.24274198710918427, 0.19304940104484558, 0.05396340787410736, -0.037185002118349075, -0.49609553813934326, -0.26997047662734985, -0.14967046678066254, -0.2413807511329651, -0.1611335575580597, 0.10257016122341156, -0.343353807926178, -0.17692610621452332, -0.18703001737594604, -0.043050624430179596, 0.19830211997032166, 0.21290767192840576, -0.01825340837240219, 0.12539416551589966, -0.3085351884365082, -0.387248158454895, 0.5898017883300781, -0.1565360575914383, -0.36828047037124634, -0.21121689677238464, 0.11108874529600143, 0.09121086448431015, -0.22580279409885406, -0.394216388463974, 0.23387742042541504, 0.261178582906723, -0.12217775732278824, 0.12152612209320068, 0.27105772495269775, -0.3783172070980072, 0.08232244849205017, -0.22738581895828247, 0.6979737281799316, -0.22542023658752441, -0.017110861837863922, -0.4264150857925415, -0.29898983240127563 ]
https://github.com/huggingface/datasets/issues/1775
Efficient ways to iterate the dataset
It seems that selecting a subset of colums directly from the dataset, i.e., dataset["column"], is slow.
For a large dataset that does not fits the memory, how can I select only a subset of features from each example? If I iterate over the dataset and then select the subset of features one by one, the resulted memory usage will be huge. Any ways to solve this? Thanks
16
Efficient ways to iterate the dataset For a large dataset that does not fits the memory, how can I select only a subset of features from each example? If I iterate over the dataset and then select the subset of features one by one, the resulted memory usage will be huge. Any ways to solve this? Thanks It seems that selecting a subset of colums directly from the dataset, i.e., dataset["column"], is slow.
[ -0.27262091636657715, -0.38424253463745117, -0.09381939470767975, 0.3328412175178528, -0.06488332897424698, 0.06871715933084488, -0.08692619204521179, 0.27658820152282715, 0.15681470930576324, 0.18535202741622925, 0.10415756702423096, 0.0968724936246872, 0.07577315717935562, 0.17130129039287567, 0.05944943428039551, 0.02440941333770752, -0.11798342317342758, 0.2368059754371643, -0.19384393095970154, -0.09436435997486115, -0.32353976368904114, -0.3371293544769287, -0.34141021966934204, -0.4139214754104614, -0.044821325689554214, -0.27635034918785095, -0.0030551403760910034, -0.07011660188436508, -0.100495845079422, -0.20227307081222534, 0.06490978598594666, -0.10592021048069, 0.1723707765340805, 0.13137763738632202, -0.00011107685713795945, -0.3096604645252228, -0.006172120571136475, -0.01679716631770134, -0.21811789274215698, 0.21278999745845795, -0.43240079283714294, -0.15368790924549103, -0.20967315137386322, -0.45742014050483704, 0.07893640547990799, -0.19354429841041565, 0.041851796209812164, -0.3434136211872101, -0.39452701807022095, 0.0019653495401144028, 0.17221909761428833, 0.3632740080356598, -0.4281517267227173, -0.21938186883926392, 0.16364753246307373, 0.20206677913665771, -0.18606457114219666, -0.16880933940410614, 0.3972517251968384, -0.03171810880303383, 0.11051060259342194, 0.19868186116218567, 0.002740969881415367, 0.06433314085006714, 0.4581536054611206, -0.09333740919828415, -0.2695290148258209, -0.09125296771526337, 0.2907189130783081, 0.3570753335952759, 0.7055127620697021, 0.014239542186260223, -0.020416129380464554, -0.25482892990112305, -0.11469122022390366, -0.48216545581817627, -0.05547245591878891, 0.20977571606636047, -0.18124057352542877, 0.17940731346607208, -0.37548547983169556, -0.2821713387966156, -0.12141156196594238, 0.10099427402019501, 0.225180983543396, -0.15105830132961273, 0.07024716585874557, 0.009548235684633255, 0.5192238688468933, -0.22286070883274078, 0.2806360721588135, -0.1883520781993866, 0.04239568114280701, 0.12819384038448334, -0.5794633626937866, -0.3097938597202301, -0.11188334971666336, -0.06249181181192398, 0.3452710807323456, 0.10768444836139679, 0.08151252567768097, 0.0904841274023056, 0.23070374131202698, 0.06436433643102646, 0.384084016084671, -0.13383054733276367, -0.18832513689994812, 0.13455797731876373, 0.14564451575279236, -0.16066257655620575, -0.0020949430763721466, -0.09078123420476913, -0.2182658314704895, 0.09379248321056366, 0.2085404098033905, -0.4199841022491455, -0.15693283081054688, -0.12900258600711823, -0.1494206190109253, -0.12614350020885468, -0.13786152005195618, -0.016250506043434143, -0.024644408375024796, 0.42025378346443176, 0.061946529895067215, -0.18893083930015564, -0.42650657892227173, -0.011111076921224594, -0.2233893871307373, -0.26405760645866394, -0.29864898324012756, 0.28442326188087463, -0.049871526658535004, 0.018967289477586746, 0.06520804762840271, 0.19942224025726318, 0.15405534207820892, -0.1386214941740036, -0.15471763908863068, -0.139239102602005, 0.05473349243402481, -0.3360627591609955, 0.2683524787425995, -0.00828295573592186, -0.13584399223327637, -0.007702759467065334, -0.059772443026304245, 0.33612489700317383, -0.3245052695274353, 0.21917018294334412, 0.1463291347026825, -0.5682108402252197, 0.18341241776943207, 0.07107245922088623, 0.0017378684133291245, -0.0667315348982811, -0.3420161306858063, 0.42012345790863037, -0.09898894280195236, 0.42577916383743286, -0.09953366965055466, 0.07064761221408844, -0.30745336413383484, -0.15262097120285034, 0.37237435579299927, 0.4698699116706848, -0.3293994665145874, 0.05108717083930969, 0.12026489526033401, 0.13932010531425476, 0.3856440782546997, 0.419301301240921, -0.22039568424224854, 0.15258504450321198, -0.12243949621915817, 0.0959465354681015, 0.19025485217571259, 0.18200388550758362, -0.502598762512207, 0.3416080176830292, 0.10806797444820404, 0.07228972017765045, 0.2504357695579529, 0.5023416876792908, 0.07303471863269806, 0.06381183862686157, -0.12981028854846954, 0.3935360312461853, -0.27757957577705383, 0.18688935041427612, -0.0036718882620334625, -0.3479524254798889, 0.2195587009191513, 0.03966998681426048, 0.2890775799751282, 0.2412095069885254, -0.008328646421432495, 0.04432699456810951, 0.2857303023338318, -0.30430448055267334, -0.15061143040657043, 0.1334230601787567, 0.5146897435188293, -0.00393279641866684, -0.04092656821012497, -0.30393707752227783, -0.37445563077926636, 0.2273036539554596, 0.45749542117118835, -0.52651047706604, 0.3239095211029053, -0.13402900099754333, 0.10735896229743958, 0.01880498416721821, 0.1776629388332367, 0.14124813675880432, 0.01753617450594902, -0.044485874474048615, 0.29479077458381653, -0.49134424328804016, -0.23103587329387665, 0.09060001373291016, -0.3048671782016754, -0.10073455423116684, -0.2995920181274414, -0.016309581696987152, 0.5265930891036987, 0.0019101575016975403, 0.21377596259117126, -0.028679773211479187, -0.03288368135690689, -0.2907182276248932, 0.14983361959457397, 0.1483505219221115, 0.37718749046325684, -0.06583109498023987, 0.11691271513700485, 0.35292884707450867, 0.08801832050085068, -0.1726693958044052, 0.047459736466407776, -0.3250950574874878, 0.21334035694599152, 0.031035467982292175, -0.21053922176361084, 0.15715554356575012, 0.09874743223190308, 0.5199266076087952, 0.29630422592163086, -0.0036351941525936127, 0.027997078374028206, -0.030929064378142357, 0.2764965295791626, 0.07144275307655334, 0.1936667263507843, 0.17368601262569427, 0.13501054048538208, 0.3530488610267639, -0.6447688341140747, 0.045497529208660126, 0.19942615926265717, 0.08865444362163544, -0.0918913409113884, 0.025197971612215042, -0.12207845598459244, 0.09395737200975418, 0.12174820154905319, -0.3537808954715729, -0.029660463333129883, 0.08779355883598328, 0.0354815348982811, -0.13502512872219086, 0.08790682256221771, 0.10482878237962723, 0.12757307291030884, 0.2802186608314514, 0.3064310550689697, -0.3647535741329193, -0.04244820028543472, -0.2706398665904999, -0.10032764077186584, 0.06712378561496735, 0.04948877543210983, 0.11458414793014526, 0.0018401890993118286, 0.07246962189674377, -0.3552101254463196, -0.11684785038232803, 0.20576049387454987, 0.3313174843788147, 0.2393418550491333, -0.1104750856757164, -0.11246524751186371, 0.5158165097236633, -0.0581076517701149, -0.10628677159547806, -0.13233113288879395, 0.5061992406845093, -0.012050766497850418, 0.016813885420560837, 0.11033757030963898, -0.06034243479371071, -0.06999940425157547, 0.004581227898597717, 0.3546583950519562, 0.1378185749053955, 0.3736896514892578, 0.12142383307218552, -0.16788311302661896, -0.4728027582168579, 0.1906890571117401, 0.12772196531295776, 0.21625261008739471, 0.08356909453868866, -0.1990763545036316, 0.1286507546901703, -0.3519135117530823, 0.10471861809492111, -0.16720640659332275, 0.19804933667182922, -0.027887828648090363, 0.08539975434541702, -0.03434082865715027, -0.019680388271808624, 0.3902209401130676, -0.3208622932434082, -0.22281646728515625, -0.29233503341674805, 0.3292638659477234, 0.024635251611471176, 0.24423334002494812, -0.011664674617350101, 0.05370383337140083, -0.26100829243659973, -0.06643927097320557, 0.023643292486667633, 0.05866711214184761, -0.16736632585525513, 0.2899850308895111, -0.07205770909786224, -0.19385023415088654, -0.07575727254152298, 0.06667140126228333, -0.028664138168096542, 0.514180064201355, -0.4075915217399597, 0.06451630592346191, -0.5274326801300049, -0.04677129164338112, -0.18022370338439941, 0.03471910580992699, -0.05636557936668396, -0.20879264175891876, -0.03641844913363457, 0.05832903832197189, -0.027386659756302834, 0.20153763890266418, 0.17719966173171997, 0.05472714826464653, 0.36817052960395813, 0.17765548825263977, 0.22605276107788086, 0.2913784980773926, 0.30493876338005066, 0.2829526364803314, 0.23410890996456146, -0.09187359362840652, -0.13262858986854553, 0.07554955780506134, -0.042837753891944885, 0.2239384949207306, -0.11861836910247803, -0.24476441740989685, 0.27434736490249634, -0.10573217272758484, -0.22450588643550873, -0.004137720912694931, -0.06180538982152939, 0.08590038865804672, -0.1929444968700409, 0.2523662745952606, 0.010164663195610046, 0.26695194840431213, 0.15922760963439941, -0.05740147456526756, -0.3361462950706482, 0.04132142663002014, 0.07890170812606812, -0.38244789838790894, 0.3009423017501831, 0.00979331973940134, -0.6226499676704407, -0.14968982338905334, -0.3150053024291992, -0.004921995103359222, -0.14701272547245026, 0.3232963979244232, 0.14056281745433807, -0.3313436508178711, 0.03582654893398285, 0.27140262722969055, 0.5188843011856079, 0.2771602272987366, -0.19719213247299194, -0.09966352581977844, -0.6063252091407776, -0.004659553989768028, 0.198552668094635, -0.3383185863494873, 0.4118955135345459, -0.08648532629013062, 0.1271383911371231, -0.13116155564785004, -0.3343244791030884, 0.3492302894592285, 0.5830078721046448, -0.187855526804924, -0.18906788527965546, 0.2267918735742569, -0.23298609256744385, -0.060349948704242706, 0.2388964593410492, 0.28084835410118103, 0.05247817561030388, 0.26561808586120605, -0.05321573466062546, -0.39002057909965515, -0.06995610892772675, 0.41866278648376465, 0.15853279829025269, 0.09488434344530106, -0.09744357317686081, 0.3590678572654724, 0.04239119589328766, -0.008367590606212616, 0.4233686029911041, 0.5041766166687012, 0.24585776031017303, -0.41548407077789307, 0.04524530470371246, -0.10063847154378891, 0.7665141820907593, 0.26952773332595825, 0.0186782069504261, 0.21867361664772034, -0.2198275774717331, 0.1789374053478241, -0.38785743713378906, -0.1302851140499115, 0.02503281645476818, -0.15455247461795807, -0.25649315118789673, -0.3809868097305298, 0.4144178330898285, 0.01534058153629303, -0.002217136323451996, 0.2992090582847595, -0.04441140592098236, 0.10379283130168915, 0.0025703376159071922, 0.2479047179222107, 0.7095935940742493, -0.13360711932182312, -0.15034548938274384, -0.10700716823339462, 0.3820200562477112, 0.21217681467533112, -0.03533204644918442, 0.30615586042404175, -0.18318641185760498, -0.8363993763923645, 0.044694915413856506, -0.11120469868183136, -0.01822608709335327, 0.23773689568042755, 0.19377008080482483, 0.454547256231308, -0.07200353592634201, 0.10756894946098328, 0.0659201443195343, -0.146853506565094, -0.074196457862854, -0.21595758199691772, 0.048766545951366425, 0.07831544429063797, 0.18018166720867157, -0.023088496178388596, 0.09461116045713425, 0.1520494967699051, 0.14820154011249542, -0.014676369726657867, -0.2205897718667984, -0.04446776956319809, -0.3808138966560364, 0.04302557557821274, 0.024388866499066353, -0.3118440806865692, 0.059127386659383774, -0.02491084858775139, 0.0035381093621253967, 0.2777450382709503, 0.10991198569536209, 0.035224560648202896, 0.2503727972507477, 0.10686878114938736, -0.12626193463802338, 0.07853434234857559, -0.04595046490430832, 0.03179945796728134, -0.18421873450279236, 0.11450043320655823, -0.0049381982535123825, 0.052903033792972565, -0.09107190370559692, -0.0822482705116272, 0.21729309856891632, 0.054858122020959854, -0.40144649147987366, 0.11690232157707214, -0.12054751813411713, -0.11103712022304535, 0.11514770984649658, 0.08136610686779022, -0.06540454924106598, 0.463663786649704, 0.09197913110256195, -0.14152763783931732, -0.12867392599582672, -0.14422065019607544, 0.22529301047325134, 0.09657140076160431, 0.3756389617919922, 0.18701264262199402, -0.2087515890598297, -0.2521999180316925, 0.16316166520118713, 0.3087829053401947, 0.171421080827713, -0.022755049169063568, -0.3325638473033905, 0.13360770046710968, -0.01845603436231613, 0.16590610146522522, 0.06216965615749359, -0.20948898792266846, -0.23502005636692047, -0.022191055119037628, -0.030750911682844162, 0.340442419052124, 0.23040108382701874, 0.29852768778800964, -0.2309798300266266, -0.3417855203151703, -0.4882925748825073, 0.43654724955558777, -0.23480966687202454, -0.05076262354850769, -0.31533440947532654, 0.2696288228034973, 0.15662632882595062, 0.3287501037120819, -0.19834023714065552, -0.0383743941783905, 0.13484548032283783, 0.1753709316253662, 0.040010109543800354, -0.19483715295791626, -0.08217918127775192, 0.10318876057863235, 0.026835061609745026, -0.22454360127449036, 0.033773791044950485, -0.2329857349395752, -0.3304446041584015, -0.46210601925849915, 0.24279451370239258, -0.029616249725222588, 0.1497240662574768, -0.028252102434635162, 0.25597015023231506, -0.48354777693748474, -0.23180735111236572, 0.37301570177078247, 0.10596252977848053, 0.1376316249370575, 0.13280808925628662, 0.23427562415599823, 0.305788516998291, -0.15166665613651276, -0.150067538022995, 0.012536264955997467, 0.06229637563228607, -0.19018828868865967, -0.1272413432598114, 0.17842714488506317, 0.07797165215015411, 0.3225127160549164, -0.13249045610427856, 0.616122841835022, 0.20120590925216675, 0.17323072254657745, 0.3271646499633789, 0.2236049920320511, -0.1429854929447174, -0.44846829771995544, 0.013640828430652618, -0.2504258453845978, 0.18734362721443176, 0.5648922920227051, 0.22236350178718567, 0.27217039465904236, -0.13083985447883606, -0.3672896921634674, 0.10985047370195389, -0.05405450612306595, 0.02327154390513897, 0.2495567798614502, 0.211669459939003, -0.4596955180168152, 0.01725064218044281, 0.5931335091590881, 0.47601616382598877, 0.5107021331787109, -0.08483073860406876, 0.324348121881485, 0.22218221426010132, 0.13531827926635742, -0.1216241791844368, -0.6607640385627747, -0.08439378440380096, 0.4037325084209442, -0.03185771405696869, 0.01559789851307869, -0.18821588158607483, -0.42648041248321533, 0.021230265498161316, -0.10185295343399048, -0.2572137117385864, -0.0009441301226615906, 0.07716420292854309, -0.1222020834684372, -0.024195224046707153, -0.24904346466064453, -0.14891327917575836, 0.20847056806087494, 0.0189623162150383, -0.4960002303123474, 0.3610440492630005, 0.006726808845996857, 0.36903589963912964, -0.20162709057331085, 0.5517863035202026, -0.010426070541143417, 0.22097671031951904, -0.39736488461494446, 0.04905220866203308, -0.21844081580638885, 0.0851999968290329, -0.0450374074280262, 0.09113223850727081, -0.23293036222457886, 0.11487993597984314, -0.015088263899087906, -0.02660880610346794, -0.17860588431358337, -0.23138007521629333, -0.13451850414276123, -0.2221693992614746, -0.2319943904876709, 0.1745181679725647, 0.33622002601623535, -0.021949242800474167, 0.018803272396326065, 0.12200823426246643, 0.06443284451961517, -0.23888501524925232, -0.6822426915168762, -0.21424180269241333, 0.1744692027568817, -0.29107967019081116, 0.1559344232082367, 0.022110961377620697, 0.06554917246103287, -0.28236624598503113, 0.42073753476142883, -0.46604132652282715, 0.19194230437278748, 0.5151320695877075, 0.09268283098936081, -0.5289086699485779, 0.47050201892852783, 0.01616077497601509, 0.030972864478826523, -0.2906498610973358, -0.23197370767593384, -0.08498780429363251, -0.06963994354009628, -0.4132067561149597, -0.13491570949554443, 0.5719473361968994, 0.4682939946651459, 0.00967380404472351, 0.12520775198936462, -0.0798151046037674, 0.04344089329242706, -0.05456159636378288, 0.42974740266799927, -0.24003346264362335, -0.4153182804584503, 0.06120849400758743, 0.21969212591648102, 0.04983491450548172, -0.3647937476634979, 0.40844324231147766, -0.21422262489795685, 0.02820289134979248, -0.1376088410615921, 0.06829299032688141, 0.24236741662025452, 0.1012120172381401, 0.20611853897571564, -0.1186031848192215, -0.05028541386127472, 0.06608594208955765, -0.04802262783050537, 0.03221842646598816, -0.07950970530509949, 0.007277262397110462, 0.1419922411441803, -0.03713541850447655, 0.08332285284996033, -0.21905414760112762, 0.39156898856163025, 0.0881103128194809, 0.14828205108642578, -0.06998592615127563, -0.14480414986610413, 0.07046791166067123, 0.0794517770409584, -0.14188948273658752, 0.33474040031433105, 0.2606513500213623, 0.10037536919116974, -0.24800840020179749, -0.045748110860586166, -0.030071593821048737, 0.012101652100682259, 0.19462637603282928, 0.07481347024440765, -0.3734349310398102, -0.27004191279411316, 0.16322295367717743, 0.29705503582954407, -0.016515014693140984, -0.11672063171863556, -0.08522693812847137, 0.31822097301483154, -0.2520098090171814, -0.012192072346806526, 0.20005308091640472, 0.012672333978116512, -0.2384374737739563, -0.019535699859261513, 0.42328640818595886, -0.3153417408466339, -0.26995670795440674, -0.2308865338563919, -0.3392125368118286 ]
https://github.com/huggingface/datasets/issues/1774
is it possible to make slice to be more compatible like python list and numpy?
Hi ! Thanks for reporting. I am working on changes in the way data are sliced from arrow. I can probably fix your issue with the changes I'm doing. If you have some code to reproduce the issue it would be nice so I can make sure that this case will be supported :) I'll make a PR in a few days
Hi, see below error: ``` AssertionError: Requested slice [:10000000000000000] incompatible with 20 examples. ```
62
is it possible to make slice to be more compatible like python list and numpy? Hi, see below error: ``` AssertionError: Requested slice [:10000000000000000] incompatible with 20 examples. ``` Hi ! Thanks for reporting. I am working on changes in the way data are sliced from arrow. I can probably fix your issue with the changes I'm doing. If you have some code to reproduce the issue it would be nice so I can make sure that this case will be supported :) I'll make a PR in a few days
[ 0.0045197494328022, -0.06874551624059677, -0.24153336882591248, 0.05697151646018028, 0.42894625663757324, -0.3012436032295227, 0.12670302391052246, 0.37132683396339417, -0.13171708583831787, 0.43240392208099365, -0.014954449608922005, 0.7657303810119629, -0.07993371039628983, 0.28570953011512756, -0.37632426619529724, -0.4880160987377167, -0.021063871681690216, 0.10648194700479507, 0.2514832615852356, 0.12021085619926453, 0.0552421435713768, 0.09966649860143661, -0.3396672010421753, 0.11706718057394028, -0.18887747824192047, -0.17909350991249084, 0.2490348219871521, -0.021579615771770477, -0.005637608468532562, -0.26915252208709717, -0.12614169716835022, -0.4162085950374603, 0.03541648015379906, 0.19070571660995483, -0.00010930779535556212, 0.11382931470870972, 0.5290848016738892, 0.04269641637802124, -0.2076610028743744, -0.05074635148048401, 0.28704777359962463, -0.4879581332206726, 0.24213014543056488, -0.2416447103023529, 0.044430218636989594, 0.055497974157333374, -0.3735232353210449, 0.0107540562748909, 0.46776819229125977, -0.02646566927433014, 0.2545255124568939, 0.006298871710896492, 0.3490654528141022, 0.045964449644088745, 0.07097962498664856, 0.31026095151901245, -0.2072950303554535, -0.13724735379219055, 0.5058748126029968, 0.402947336435318, 0.2683992385864258, 0.10324226319789886, -0.07793969660997391, 0.04054383933544159, -0.4270552694797516, 0.004429039545357227, -0.06847967952489853, -0.37396925687789917, -0.11772755533456802, 0.5738004446029663, 0.17283564805984497, 0.1928461790084839, -0.21517620980739594, -0.010672256350517273, -0.30153709650039673, -0.2650512456893921, -0.15549513697624207, 0.10122881829738617, -0.09724120795726776, 0.1049899309873581, 0.06905687600374222, 0.005789655260741711, -0.13160595297813416, 0.3030082583427429, 0.28462740778923035, 0.4896728992462158, -0.0355270616710186, 0.10823561996221542, 0.16356466710567474, -0.3503348231315613, 0.2268580198287964, 0.12437192350625992, -0.07456131279468536, -0.09666217863559723, -0.15927726030349731, -0.005347918719053268, -0.580107569694519, 0.1688661426305771, 0.14843451976776123, -0.006306350231170654, 0.32387250661849976, 0.42338019609451294, -0.15026342868804932, 0.15022006630897522, 0.23468655347824097, -0.06387791037559509, -0.0861097052693367, 0.004874496720731258, 0.13109669089317322, -0.13692288100719452, 0.10436297953128815, -0.028942137956619263, 0.26197153329849243, -0.3201717436313629, -0.23995427787303925, 0.0034461356699466705, -0.02589215338230133, -0.07905927300453186, -0.07336762547492981, -0.26546627283096313, -0.3296073079109192, -0.0969410389661789, 0.3133118748664856, 0.12846237421035767, -0.021201319992542267, 0.09652998298406601, -0.17791372537612915, 0.24308647215366364, -0.19942577183246613, -0.12514327466487885, 0.008212758228182793, 0.03852327913045883, 0.168966606259346, -0.4833792746067047, -0.033137571066617966, -0.24857401847839355, -0.005878539755940437, -0.0048194872215390205, 0.33141404390335083, 0.08670352399349213, -0.14928393065929413, -0.014887596480548382, 0.06281937658786774, 0.019860897213220596, 0.0747855007648468, -0.21424512565135956, 0.17393621802330017, 0.06720954924821854, -0.0024390146136283875, 0.4090493321418762, -0.5157782435417175, -0.16852502524852753, -0.14786408841609955, 0.13076524436473846, 0.4457743167877197, 0.273114413022995, 0.22074376046657562, -0.15394674241542816, 0.005732588469982147, -0.32267555594444275, -0.08110585063695908, -0.1813516765832901, 0.24512848258018494, -0.30954304337501526, 0.22089990973472595, -0.3931460976600647, -0.3490617573261261, 0.08533789217472076, -0.4180668294429779, 0.2275342047214508, 0.29324960708618164, 0.7705191969871521, -0.18120414018630981, -0.29300445318222046, -0.03071269392967224, 0.33704620599746704, 0.41824764013290405, 0.10503245890140533, -0.24538493156433105, 0.20372526347637177, 0.05093897134065628, -0.17191056907176971, -0.32833966612815857, 0.2673071622848511, 0.15334436297416687, -0.20945648849010468, -0.020971886813640594, 0.16960199177265167, 0.046162769198417664, -0.035162635147571564, -0.2500964403152466, -0.40866905450820923, 0.2898615598678589, -0.08881519734859467, -0.06981393694877625, -0.14063650369644165, 0.20504862070083618, -0.3768809139728546, 0.2609752118587494, -0.09199798107147217, 0.024756338447332382, 0.01107640191912651, 0.43001556396484375, -0.4044117331504822, 0.10269025713205338, -0.0949774831533432, 0.16022448241710663, -0.19233539700508118, -0.18116998672485352, -0.04226149618625641, -0.17419104278087616, 0.014171179383993149, 0.1139550432562828, 0.27237921953201294, 0.2118365615606308, 0.17267778515815735, 0.14381784200668335, -0.4210802912712097, 0.3586549162864685, -0.19222034513950348, 0.033508796244859695, -0.03311188519001007, -0.1949819028377533, 0.052764903753995895, -0.1643979549407959, 0.33956271409988403, -0.30220460891723633, -0.3105171024799347, -0.1181158572435379, 0.16783422231674194, 0.23984456062316895, -0.18904127180576324, -0.23283255100250244, 0.274893194437027, 0.10147613286972046, -0.18204019963741302, -0.2686273455619812, 0.05321629345417023, 0.16151686012744904, -0.46485206484794617, 0.23352855443954468, 0.22809557616710663, 0.013751509599387646, -0.021645352244377136, 0.008042007684707642, 0.2652308940887451, -0.5424763560295105, 0.3630339205265045, 0.09047171473503113, 0.28364914655685425, 0.19754235446453094, 0.1266448050737381, 0.06523660570383072, -0.031609658151865005, 0.33383017778396606, 0.12314745783805847, -0.1631329506635666, -0.19904573261737823, -0.1483728289604187, 0.012621015310287476, -0.0037903711199760437, -0.075433149933815, 0.25894859433174133, 0.2821459174156189, 0.03974398225545883, 0.11764390021562576, -0.015470976009964943, -0.42510831356048584, 0.13605904579162598, 0.2354194074869156, -0.0837445855140686, -0.1584736555814743, 0.23018141090869904, -0.33596324920654297, 0.23322796821594238, 0.4529044032096863, 0.02889740839600563, -0.1256343424320221, 0.0725976899266243, -0.0046531083062291145, 0.05299575626850128, 0.22063487768173218, -0.29652875661849976, 0.01650349237024784, -0.06173515319824219, 0.1354551911354065, -0.32681116461753845, 0.2384217381477356, 0.04654679447412491, -0.8412549495697021, -0.19151557981967926, -0.3362051844596863, 0.06752042472362518, 0.037061531096696854, -0.21092136204242706, 0.3076387345790863, 0.13308387994766235, 0.10196322947740555, -0.027136342599987984, 0.3244500160217285, -0.10163891315460205, -0.17115840315818787, -0.30021247267723083, 0.16423171758651733, 0.10312667489051819, 0.348845511674881, -0.0832880437374115, 0.18779312074184418, 0.022753901779651642, 0.029558051377534866, -0.4092305302619934, 0.00015383586287498474, -0.03464781492948532, 0.5563629865646362, 0.10881616920232773, -0.0025661885738372803, -0.1718282252550125, -0.3161523640155792, 0.18275965750217438, -0.412550687789917, -0.05620653182268143, 0.31780806183815, 0.03687083348631859, -0.23726116120815277, 0.010753285139799118, 0.016001850366592407, -0.6098572015762329, -0.3351958096027374, 0.32203859090805054, 0.23634697496891022, 0.15858685970306396, -0.1259808987379074, 0.19177328050136566, -0.15303276479244232, 0.2735917568206787, -0.07464077323675156, -0.03180995211005211, 0.06878975033760071, 0.12471908330917358, -0.15668301284313202, -0.19345639646053314, -0.13489194214344025, -0.17708174884319305, -0.11678378283977509, -0.07655995339155197, 0.04151613265275955, 0.1929938942193985, -0.30297788977622986, -0.05050969496369362, -0.1226353794336319, 0.13210178911685944, 0.39674797654151917, 0.15604044497013092, -0.10275189578533173, -0.05668797343969345, -0.18042156100273132, 0.10745803266763687, 0.023255199193954468, -0.13322818279266357, 0.481173038482666, 0.34658166766166687, 0.1279286891222, 0.3688398599624634, 0.24778681993484497, -0.11961689591407776, 0.2847774028778076, 0.279713898897171, 0.039090845733881, -0.10420837253332138, -0.277611643075943, 0.22766423225402832, -0.0037568211555480957, -0.2275746911764145, 0.012245066463947296, 0.01410457119345665, 0.041860051453113556, 0.037719957530498505, -0.21821218729019165, -0.4395804703235626, -0.1761205494403839, 0.21338434517383575, 0.09213259816169739, -0.04866462200880051, -0.11010575294494629, -0.12056995928287506, -0.27221187949180603, -0.22614604234695435, 0.10582740604877472, -0.12370343506336212, 0.44760411977767944, -0.24463482201099396, -0.35689887404441833, -0.545269250869751, 0.04417084529995918, 0.564782440662384, 0.33216044306755066, 0.24900077283382416, -0.02784670516848564, -0.1814686357975006, 0.059804387390613556, 0.05941775441169739, 0.6105976700782776, -0.2074556052684784, -0.3850250244140625, -0.10524848103523254, 0.09172694385051727, -0.15676945447921753, 0.228867307305336, -0.15902124345302582, 0.3620493412017822, 0.2798970937728882, -0.1927829086780548, -0.08452357351779938, 0.07354260236024857, 0.283246248960495, 0.2585216760635376, -0.050709616392850876, -0.04524868726730347, 0.22437609732151031, 0.2511664927005768, -0.19117239117622375, -0.06400234252214432, -0.08683658391237259, 0.09991598129272461, -0.11302309483289719, -0.23518407344818115, -0.44493886828422546, -0.48312076926231384, -0.1476331651210785, -0.2586734890937805, 0.38863974809646606, -0.27428102493286133, -0.01847362145781517, -0.32520681619644165, 0.28516438603401184, 0.21689781546592712, 0.2599506080150604, -0.10637420415878296, 0.1940310001373291, -0.26885730028152466, 0.07684505730867386, 0.2581608295440674, 0.08476277440786362, 0.04057132452726364, 0.13072948157787323, 0.04827546328306198, 0.1561044454574585, 0.11980949342250824, -0.5726235508918762, -0.03145274519920349, -0.11100707203149796, -0.21290983259677887, 0.36976882815361023, 0.4043017029762268, 0.3005579710006714, -0.03258783370256424, 0.44407108426094055, -0.19861431419849396, 0.078954316675663, 0.19986410439014435, 0.4521448314189911, 0.9886347651481628, 0.10133001208305359, -0.15300841629505157, -0.015924319624900818, -0.05971986800432205, 0.426694393157959, 0.10081945359706879, 0.16639724373817444, -0.3995169401168823, -0.15024785697460175, -0.03193945810198784, -0.2249177098274231, -0.11852660030126572, 0.0561288520693779, -0.31102967262268066, -0.056396763771772385, -0.5337851047515869, -0.04039623960852623, -0.25722643733024597, 0.06481026858091354, 0.0796506330370903, -0.19687563180923462, -0.3503139913082123, 0.13155429065227509, -0.15240782499313354, -0.3069133460521698, -0.01834077760577202, -0.30181896686553955, -0.2096473127603531, -0.2561691999435425, -0.12400158494710922, 0.08773604035377502, -0.30598944425582886, 0.4181002378463745, 0.2314322590827942, -0.458601713180542, 0.21116074919700623, 0.051543548703193665, 0.22252051532268524, 0.097838394343853, -0.15630407631397247, -0.036019887775182724, 0.13183031976222992, -0.04934403672814369, 0.06609779596328735, 0.20491880178451538, 0.1444842517375946, 0.002169240266084671, -0.11256327480077744, 0.149508535861969, 0.07046160846948624, -0.5966777801513672, -0.2847776412963867, 0.14023105800151825, 0.1145455464720726, -0.2185789942741394, -0.22295889258384705, -0.26255205273628235, -0.4028535783290863, -0.16191035509109497, 0.1460350751876831, 0.25624316930770874, -0.03795779123902321, 0.3883272111415863, 0.5429602265357971, 0.17845550179481506, -0.0404919795691967, -0.03274308890104294, 0.14418748021125793, 0.06966467201709747, 0.1716313511133194, 0.32126131653785706, -0.24902847409248352, -0.18906864523887634, 0.18010097742080688, -0.1816728711128235, -0.054124895483255386, 0.025687944144010544, -0.08075357973575592, 0.015501871705055237, 0.06344235688447952, 0.324616402387619, 0.1424080729484558, 0.48621684312820435, -0.46752673387527466, -0.3633795380592346, -0.24187268316745758, 0.3637576103210449, 0.050729673355817795, 0.13703586161136627, -0.2009008824825287, -0.08107304573059082, -0.2109219878911972, 0.29389986395835876, -0.2792302668094635, 0.20672886073589325, 0.060309670865535736, 0.1292986124753952, -0.38331338763237, -0.10930002480745316, -0.06500382721424103, 0.016927842050790787, 0.07199592143297195, 0.2888396382331848, -0.24905773997306824, -0.2088910937309265, 0.12142103910446167, 0.09576866030693054, 0.036980241537094116, -0.5805712938308716, -0.3033238351345062, -0.15845774114131927, 0.0030397437512874603, -0.15955926477909088, -0.43197014927864075, -0.2644384503364563, -0.03369271755218506, -0.1819983273744583, 0.4959423542022705, -0.008694440126419067, 0.1645432859659195, 0.27077192068099976, -0.17684116959571838, 0.3435399532318115, 0.11441606283187866, -0.016884535551071167, 0.3338824510574341, -0.0011246129870414734, -0.005052266642451286, 0.07243696600198746, 0.20278260111808777, 0.05388785898685455, 0.07775425910949707, -0.2313012331724167, -0.30538803339004517, -0.05282045528292656, 0.46250808238983154, 0.24558232724666595, 0.14430727064609528, 0.1524995118379593, 0.22448155283927917, 0.19977417588233948, -0.05483294278383255, -0.291903555393219, 0.23201842606067657, 0.20117314159870148, 0.030321229249238968, 0.3115660548210144, 0.019221458584070206, 0.16553153097629547, 0.3544030785560608, -0.007189370691776276, 0.17104779183864594, -0.6634291410446167, 0.07695639133453369, 0.36333462595939636, 0.08607272803783417, -0.13535800576210022, -0.25201931595802307, -0.3793853223323822, 0.27997657656669617, -0.016505636274814606, -0.29891765117645264, 0.12963129580020905, 0.16967526078224182, -0.0758233368396759, 0.3128223717212677, 0.054895106703042984, -0.12942497432231903, 0.04048784822225571, -0.009098820388317108, 0.05402365326881409, 0.3673408627510071, 0.35646340250968933, -0.017252285033464432, -0.19250525534152985, -0.22613975405693054, 0.19922882318496704, 0.015993434935808182, -0.12834137678146362, -0.16420793533325195, -0.11440753191709518, 0.04769826680421829, -0.3337893784046173, 0.028141390532255173, 0.26628434658050537, 0.4338025152683258, 0.23560412228107452, 0.012193389236927032, -0.26883336901664734, 0.0040643662214279175, 0.24079033732414246, 0.15261775255203247, -0.2270524799823761, -0.0184957142919302, 0.06788109987974167, -0.046525828540325165, -0.15678080916404724, -0.00968644954264164, 0.5891760587692261, 0.21412231028079987, -0.40627941489219666, -0.16577264666557312, -0.11191427707672119, -0.16720490157604218, 0.030475333333015442, 0.16761872172355652, 0.19388845562934875, 0.11158093810081482, 0.1253650188446045, 0.23483166098594666, -0.1369701623916626, 0.0620134212076664, 0.13146236538887024, 0.2517555058002472, -0.2453315705060959, 0.36725345253944397, 0.12143435329198837, -0.26794958114624023, -0.30274415016174316, -0.3604242503643036, -0.18305057287216187, 0.17410114407539368, -0.26029735803604126, -0.3829795718193054, -0.016671577468514442, 0.26257458329200745, 0.09170074015855789, -0.21186994016170502, 0.37280523777008057, 0.1517222821712494, 0.15527747571468353, -0.22086134552955627, 0.0982096940279007, 0.10397808253765106, 0.021862544119358063, -0.2331649363040924, 0.1711067259311676, 0.2647583484649658, -0.09548503160476685, 0.380543053150177, 0.42747563123703003, 0.21289867162704468, 0.04718681797385216, 0.03230642154812813, 0.10431206971406937, -0.5206044912338257, 0.16698817908763885, 0.35938000679016113, -0.19799372553825378, 0.08482833951711655, -0.03237808868288994, 0.08649183809757233, 0.08439645171165466, 0.03885321319103241, -0.21932654082775116, 0.01826285570859909, 0.02089124172925949, 0.17538520693778992, 0.15762737393379211, 0.45359036326408386, -0.01177128404378891, -0.16800469160079956, -0.07726506888866425, 0.1454778015613556, -0.051457472145557404, -0.0009287996217608452, 0.6229223012924194, 0.23276004195213318, 0.2851267158985138, -0.25863754749298096, -0.4273088872432709, -0.3670194447040558, -0.2845759987831116, -0.3651995062828064, 0.33577629923820496, 0.16691498458385468, 0.1830333173274994, -0.09474779665470123, 0.031184934079647064, 0.1386934220790863, -0.03412861377000809, 0.14672186970710754, 0.22781023383140564, -0.03130427002906799, -0.28333812952041626, 0.22536700963974, -0.005203913431614637, -0.08357731997966766, -0.015467232093214989, -0.014850348234176636, 0.09440936893224716, -0.12636935710906982, -0.07042371481657028, -0.2874099314212799, 0.24880921840667725, -0.11695241183042526, 0.35755860805511475, 0.06945979595184326, 0.3240206241607666, -0.10327348113059998, -0.020429318770766258, 0.21135880053043365, 0.30537354946136475, 0.056112609803676605, -0.18076948821544647, -0.08017867058515549 ]
https://github.com/huggingface/datasets/issues/1773
bug in loading datasets
Looks like an issue with your csv file. Did you use the right delimiter ? Apparently at line 37 the CSV reader from pandas reads 2 fields instead of 1.
Hi, I need to load a dataset, I use these commands: ``` from datasets import load_dataset dataset = load_dataset('csv', data_files={'train': 'sick/train.csv', 'test': 'sick/test.csv', 'validation': 'sick/validation.csv'}) print(dataset['validation']) ``` the dataset in sick/train.csv are simple csv files representing the data. I am getting this error, do you have an idea how I can solve this? thank you @lhoestq ``` Using custom data configuration default Downloading and preparing dataset csv/default-61468fc71a743ec1 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2... Traceback (most recent call last): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 485, in incomplete_dir yield tmp_dir File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 604, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 959, in _prepare_split for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/tqdm-4.49.0-py3.7.egg/tqdm/std.py", line 1133, in __iter__ for obj in iterable: File "/julia/cache_home_2/modules/datasets_modules/datasets/csv/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2/csv.py", line 129, in _generate_tables for batch_idx, df in enumerate(csv_file_reader): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1029, in __next__ return self.get_chunk() File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1079, in get_chunk return self.read(nrows=size) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1052, in read index, columns, col_dict = self._engine.read(nrows) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 2056, in read data = self._reader.read(nrows) File "pandas/_libs/parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read File "pandas/_libs/parsers.pyx", line 783, in pandas._libs.parsers.TextReader._read_low_memory File "pandas/_libs/parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows File "pandas/_libs/parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows File "pandas/_libs/parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 37, saw 2 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "write_sick.py", line 19, in <module> 'validation': 'sick/validation.csv'}) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/load.py", line 612, in load_dataset ignore_verifications=ignore_verifications, File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 534, in download_and_prepare self._save_info() File "/julia/libs/anaconda3/envs/success/lib/python3.7/contextlib.py", line 130, in __exit__ self.gen.throw(type, value, traceback) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 491, in incomplete_dir shutil.rmtree(tmp_dir) File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 498, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 496, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2.incomplete' ```
30
bug in loading datasets Hi, I need to load a dataset, I use these commands: ``` from datasets import load_dataset dataset = load_dataset('csv', data_files={'train': 'sick/train.csv', 'test': 'sick/test.csv', 'validation': 'sick/validation.csv'}) print(dataset['validation']) ``` the dataset in sick/train.csv are simple csv files representing the data. I am getting this error, do you have an idea how I can solve this? thank you @lhoestq ``` Using custom data configuration default Downloading and preparing dataset csv/default-61468fc71a743ec1 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2... Traceback (most recent call last): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 485, in incomplete_dir yield tmp_dir File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 604, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 959, in _prepare_split for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/tqdm-4.49.0-py3.7.egg/tqdm/std.py", line 1133, in __iter__ for obj in iterable: File "/julia/cache_home_2/modules/datasets_modules/datasets/csv/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2/csv.py", line 129, in _generate_tables for batch_idx, df in enumerate(csv_file_reader): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1029, in __next__ return self.get_chunk() File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1079, in get_chunk return self.read(nrows=size) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1052, in read index, columns, col_dict = self._engine.read(nrows) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 2056, in read data = self._reader.read(nrows) File "pandas/_libs/parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read File "pandas/_libs/parsers.pyx", line 783, in pandas._libs.parsers.TextReader._read_low_memory File "pandas/_libs/parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows File "pandas/_libs/parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows File "pandas/_libs/parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 37, saw 2 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "write_sick.py", line 19, in <module> 'validation': 'sick/validation.csv'}) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/load.py", line 612, in load_dataset ignore_verifications=ignore_verifications, File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 534, in download_and_prepare self._save_info() File "/julia/libs/anaconda3/envs/success/lib/python3.7/contextlib.py", line 130, in __exit__ self.gen.throw(type, value, traceback) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 491, in incomplete_dir shutil.rmtree(tmp_dir) File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 498, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 496, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2.incomplete' ``` Looks like an issue with your csv file. Did you use the right delimiter ? Apparently at line 37 the CSV reader from pandas reads 2 fields instead of 1.
[ -0.28426676988601685, -0.2714773416519165, -0.14631587266921997, 0.4608480930328369, 0.3019687533378601, 0.24083682894706726, 0.08345676213502884, 0.5121127367019653, 0.07644961774349213, 0.05858154967427254, -0.00045389612205326557, -0.2665962278842926, -0.10810229927301407, 0.2536356449127197, -0.033702749758958817, 0.03520511835813522, -0.0331646129488945, 0.1680264174938202, -0.0946207195520401, 0.019386455416679382, -0.2684038281440735, 0.2590360939502716, -0.09573845565319061, 0.08945976197719574, -0.0035115156788378954, -0.1219344362616539, 0.09926402568817139, 0.260385125875473, -0.29758119583129883, -0.36872637271881104, 0.3527500033378601, -0.17652219533920288, 0.367129385471344, 0.20565156638622284, -0.00011003286635968834, 0.10972239077091217, 0.4414516091346741, -0.2222377508878708, -0.2273046225309372, -0.27828389406204224, -0.3186444044113159, -0.5255686044692993, -0.04241660237312317, -0.25191983580589294, -0.07208985090255737, -0.19860999286174774, -0.11861741542816162, -0.3585057854652405, 0.19687554240226746, 0.4839043617248535, 0.3277643918991089, -0.20243670046329498, -0.07729710638523102, -0.21825993061065674, 0.17366749048233032, 0.08253614604473114, 0.017782220616936684, 0.09850047528743744, 0.03832154721021652, 0.1259889006614685, 0.5457248687744141, 0.22481507062911987, -0.08710277825593948, 0.06227666884660721, 0.13281872868537903, -0.06502930819988251, 0.22017967700958252, -0.3268524706363678, 0.18521234393119812, 0.1893908679485321, 0.8423667550086975, -0.12720081210136414, -0.16206054389476776, -0.141718327999115, 0.1230335533618927, -0.3095788359642029, 0.003567039966583252, 0.3891043961048126, -0.15926241874694824, 0.15572823584079742, -0.19616153836250305, 0.022635038942098618, -0.05632735416293144, 0.1439458429813385, 0.19916632771492004, -0.12764416635036469, -0.2566348910331726, 0.2265537679195404, -0.06645025312900543, -0.09688036143779755, 0.001983686350286007, -0.0634833350777626, -0.1318114846944809, 0.22007718682289124, -0.306193470954895, -0.005989372730255127, -0.08652666956186295, -0.04749809205532074, 0.13054880499839783, 0.019128315150737762, 0.20573146641254425, -0.3622545301914215, 0.14165553450584412, 0.10292817652225494, 0.30852171778678894, 0.3533763289451599, -0.09663528949022293, 0.018619351089000702, 0.04687632620334625, 0.1750156730413437, 0.054410990327596664, -0.22432640194892883, -0.14580969512462616, -0.4689766764640808, 0.2325948029756546, 0.24888643622398376, 0.331773042678833, -0.1506781280040741, -0.2495947927236557, 0.13419577479362488, -0.055104516446590424, 0.2364848256111145, 0.12058322131633759, 0.5153103470802307, -0.30711793899536133, 0.1684071123600006, -0.06295695900917053, 0.025600804015994072, -0.0268063023686409, -0.22164399921894073, -0.29560917615890503, 0.024008983746170998, -0.18466205894947052, -0.13959453999996185, 0.20676380395889282, -0.21105076372623444, 0.24458187818527222, 0.07953562587499619, 0.040837932378053665, -0.3071087598800659, 0.0538247749209404, -0.3537349998950958, -0.023229748010635376, 0.4643995463848114, 0.09005220234394073, 0.13243527710437775, 0.25970980525016785, -0.08393102139234543, -0.2189939320087433, 0.17716851830482483, -0.35902994871139526, -0.5951443910598755, -0.011071151122450829, 0.2614988684654236, -0.11406531929969788, 0.1193493977189064, -0.42464688420295715, 0.07000182569026947, 0.16095440089702606, -0.09549984335899353, -0.05181596428155899, -0.17874956130981445, -0.2614169120788574, -0.34765276312828064, 0.1499706506729126, 0.3107526898384094, -0.5323681235313416, 0.16871865093708038, -0.3266540467739105, -0.27322837710380554, 0.2976889908313751, 0.21203529834747314, -0.12096703052520752, 0.3310961127281189, -0.2531272768974304, 0.0592159777879715, 0.3152393400669098, -0.30059003829956055, -0.39999762177467346, 0.3908528685569763, 0.01631768047809601, 0.13098759949207306, 0.0034010037779808044, 0.009810580871999264, 0.3307879567146301, 0.00786952581256628, 0.11023488640785217, 0.2126961499452591, -0.14865601062774658, -0.031486786901950836, -0.2620568573474884, -0.16417765617370605, -0.05091371387243271, 0.15648281574249268, 0.1396571397781372, 0.11094620078802109, 0.1691531538963318, -0.3006534278392792, -0.05188281834125519, -0.06556792557239532, 0.2696266770362854, 0.3614271879196167, 0.21166308224201202, 0.1624414622783661, 0.17079058289527893, 0.08129441738128662, -0.5355846285820007, 0.32568123936653137, 0.011593881994485855, -0.19988182187080383, -0.09194342792034149, -0.12410440295934677, -0.5685519576072693, -0.016445400193333626, -0.12866851687431335, -0.0026955492794513702, 0.109413743019104, -0.10544650256633759, -0.024304166436195374, -0.09215427935123444, -0.03021831624209881, 0.5924557447433472, -0.1262020766735077, -0.1524438112974167, -0.13710805773735046, 0.2782704532146454, 0.012459278106689453, 0.05533168464899063, 0.021213367581367493, 0.0994582325220108, 0.18134774267673492, -0.10147379338741302, -0.3069879710674286, 0.30993786454200745, 0.06691981852054596, -0.059799954295158386, -0.039099909365177155, -0.08811850845813751, -0.12910544872283936, -0.14014095067977905, -0.013777794316411018, 0.15735849738121033, 0.2477232813835144, -0.04693002626299858, 0.11266455054283142, 0.14883418381214142, -0.29803237318992615, 0.003697425127029419, -0.11846106499433517, 0.06277883052825928, 0.5067974925041199, 0.040096465498209, 0.07035820931196213, -0.36937788128852844, 0.22321413457393646, -0.1662299484014511, 0.3108948767185211, -0.022393422201275826, -0.21733950078487396, -0.351418673992157, 0.14502780139446259, 0.07821604609489441, -0.09746912866830826, 0.43131721019744873, -0.09091313928365707, -0.10653737187385559, -0.08405382931232452, 0.3009825050830841, 0.525425374507904, 0.08345618844032288, -0.1675482541322708, 0.20547673106193542, 0.2845362722873688, -0.006182629615068436, 0.2890947163105011, -0.10242407023906708, 0.32829686999320984, 0.2726709246635437, -0.09580320119857788, -0.1561962515115738, -0.10693790763616562, -0.15120141208171844, 0.18098996579647064, 0.48027628660202026, -0.2961615324020386, 0.007689883932471275, -0.039297353476285934, -0.1293671429157257, -0.026326343417167664, -0.12599846720695496, 0.048574529588222504, -0.058026134967803955, -0.10105419158935547, 0.1505691111087799, 0.041041579097509384, -0.13404056429862976, -0.17710669338703156, 0.28782498836517334, 0.1359102725982666, -0.23670919239521027, -0.1092018187046051, -0.15593650937080383, -0.2683490514755249, 0.11954805254936218, 0.03503136336803436, 0.019676392897963524, 0.2585451602935791, -0.19974039494991302, 0.0914037674665451, -0.1030229851603508, -0.04985961318016052, -0.044715672731399536, -0.0019548796117305756, 0.3377040922641754, 0.19620877504348755, 0.24009019136428833, 0.08995918929576874, 0.051665522158145905, 0.22368767857551575, -0.05026838555932045, -0.05306347459554672, 0.3498874008655548, -0.14861255884170532, -0.09878423810005188, -0.06121544539928436, -0.43781253695487976, -0.5983160138130188, -0.35915061831474304, 0.001271277666091919, 0.04373784735798836, 0.045235566794872284, 0.21582669019699097, 0.22802184522151947, -0.1275927722454071, 0.3982062339782715, -0.07740341871976852, -0.3031054437160492, -0.5205017328262329, 0.23767594993114471, -0.350307434797287, -0.16793137788772583, 0.008150432258844376, -0.0291731096804142, 0.1761377453804016, 0.06755637377500534, -0.5610888600349426, 0.35672852396965027, -0.2383802980184555, 0.06498950719833374, -0.23086145520210266, -0.3174830973148346, 0.22042003273963928, -0.1381315290927887, -0.0619109645485878, -0.24801772832870483, -0.15417194366455078, -0.030451692640781403, 0.061127327382564545, 0.1230325996875763, -0.06772275269031525, 0.5385026931762695, 0.05026634410023689, 0.5127761960029602, 0.32991430163383484, -0.0016038157045841217, 0.4850442409515381, 0.06830359250307083, 0.3586149513721466, -0.23225408792495728, -0.3839130997657776, -0.044841326773166656, -0.09056171774864197, -0.2724587023258209, 0.16396623849868774, -0.06622233986854553, -0.10019590705633163, -0.1565476357936859, -0.04777860641479492, -0.333280086517334, 0.053939711302518845, 0.10474283993244171, -0.16281084716320038, 0.31257855892181396, 0.0887053906917572, -0.12076319754123688, -0.38754332065582275, -0.14753004908561707, -0.21140331029891968, 0.3583054542541504, -0.031243182718753815, 0.21290545165538788, -0.3576202988624573, 0.08544144034385681, -0.37564802169799805, 0.42008495330810547, 0.10934736579656601, 0.4523642659187317, -0.12905079126358032, 0.21277090907096863, 0.037885405123233795, 0.05347926542162895, 0.7103980779647827, -0.4645592272281647, 0.035882070660591125, 0.16599494218826294, 0.027568034827709198, -0.3042500913143158, -0.28518709540367126, -0.008479971438646317, 0.31785252690315247, 0.314132422208786, 0.5803301930427551, -0.03612123057246208, 0.0007450543344020844, -0.046496592462062836, 0.19860346615314484, -0.27857881784439087, -0.37961792945861816, -0.3453674018383026, -0.2140880525112152, -0.24124881625175476, -0.06281589716672897, 0.10356160253286362, 0.46642377972602844, -0.05241307616233826, -0.11790649592876434, -0.15775004029273987, 0.015348505228757858, 0.14270371198654175, 0.08803695440292358, 0.36294862627983093, -0.014423171058297157, 0.364949107170105, 0.07446929812431335, 0.08856116235256195, 0.19705072045326233, 0.699954092502594, 0.12739843130111694, -0.5392555594444275, -0.1261572539806366, 0.06966844946146011, 0.09543729573488235, -0.08110174536705017, -0.29504674673080444, -0.1615707278251648, -0.03610885143280029, 0.2540144920349121, -0.16863615810871124, 0.28428179025650024, 0.27416202425956726, -0.09369388967752457, -0.5076525807380676, -0.48670876026153564, 0.2544362545013428, 0.07475355267524719, -0.04898660257458687, 0.27865883708000183, -0.21352629363536835, -0.2284800410270691, 0.04306677356362343, 0.03763715922832489, 0.6544904708862305, -0.0589199960231781, -0.10743896663188934, 0.16741758584976196, -0.2733140289783478, 0.24323104321956635, -0.4013941287994385, 0.08022446930408478, -0.3252430260181427, -0.4311290979385376, -0.01898401975631714, -0.22216542065143585, 0.09237480163574219, 0.1845078468322754, -0.13606557250022888, 0.3313300609588623, -0.24764364957809448, 0.3380993902683258, -0.04327277094125748, 0.05705428868532181, 0.013291679322719574, -0.16167035698890686, -0.112772136926651, 0.20041072368621826, -0.22134263813495636, 0.2725205421447754, -0.23051238059997559, -0.007064135745167732, 0.034944500774145126, -0.21167488396167755, -0.358095645904541, 0.08955834805965424, -0.0012527373619377613, 0.33205878734588623, -0.13376572728157043, -0.21419435739517212, 0.026465319097042084, 0.38205718994140625, 0.2773965001106262, 0.27476179599761963, -0.16808204352855682, 0.1762903481721878, 0.00789003074169159, -0.02277962863445282, -0.06779292970895767, 0.15924032032489777, 0.05743289738893509, -0.07007495313882828, -0.26953941583633423, 0.17292962968349457, -0.1512601673603058, -0.1990174502134323, 0.07428251206874847, -0.05520045757293701, -0.04397520422935486, -0.37888503074645996, -0.49444255232810974, -0.20809417963027954, 0.18062768876552582, -0.06996357440948486, 0.1461118906736374, -0.011700615286827087, -0.056295525282621384, 0.2779732644557953, 0.00987711176276207, -0.4934690594673157, -0.09345777332782745, 0.2358597218990326, 0.15044517815113068, 0.042307741940021515, 0.5770385265350342, -0.022746078670024872, -0.12676455080509186, -0.20606505870819092, 0.15691423416137695, 0.1524965614080429, -0.4153023958206177, 0.2984958291053772, 0.006565272342413664, 0.2282923012971878, -0.05643376335501671, 0.10670514404773712, 0.2867482900619507, -0.013791501522064209, 0.26963526010513306, -0.6932896971702576, -0.24386483430862427, 0.052033960819244385, -0.22527258098125458, 0.18040290474891663, 0.16515418887138367, 0.04282662272453308, -0.08825026452541351, -0.04950098693370819, -0.3103482723236084, 0.19515617191791534, -0.24363957345485687, -0.01277187466621399, 0.11711447685956955, 0.024686727672815323, 0.1024995893239975, -0.05076663941144943, 0.1229807436466217, 0.05686904489994049, -0.2471606731414795, -0.29580166935920715, -0.11205986142158508, 0.129828542470932, -0.014499492943286896, -0.12319760769605637, 0.05956884101033211, -0.22218820452690125, -0.26360270380973816, -0.07550879567861557, 0.06330087780952454, 0.22922813892364502, 0.05964340642094612, 0.150957852602005, -0.1756058633327484, 0.07458458840847015, -0.30018842220306396, 0.3205675780773163, 0.06790895760059357, 0.208236962556839, -0.007541307248175144, 0.23153972625732422, 0.13621780276298523, -0.08701260387897491, -0.495744913816452, -0.11654306203126907, 0.14861711859703064, 0.031106356531381607, 0.33451664447784424, -0.2841584086418152, 0.4677671492099762, 0.18599450588226318, 0.1772853136062622, 0.2053658664226532, -0.18433703482151031, 0.13665671646595, 0.27926596999168396, 0.24595624208450317, -0.3412807583808899, -0.0360049344599247, -0.027183789759874344, 0.264536052942276, -0.15160994231700897, 0.01927442103624344, 0.3053026795387268, -0.033590082079172134, -0.023905672132968903, 0.08172032982110977, 0.36084508895874023, 0.14038847386837006, 0.19851340353488922, 0.47880005836486816, 0.05508873984217644, 0.10434412211179733, 0.14739342033863068, 0.152968168258667, 0.14865383505821228, 0.8432773351669312, -0.08708500117063522, 0.04750562459230423, 0.2190113663673401, 0.1941460222005844, -0.2537888288497925, -0.725945234298706, 0.2099427431821823, 0.23180150985717773, -0.12920543551445007, 0.06368754059076309, 0.05159008875489235, 0.015476398169994354, -0.05689307674765587, 0.028710518032312393, -0.3996514678001404, -0.11233878135681152, -0.1974148154258728, -0.043904248625040054, -0.11456555128097534, -0.09350915998220444, -0.09504757076501846, 0.09067709743976593, -0.10258416831493378, -0.05176343023777008, -0.05326929688453674, 0.08045662939548492, -0.2873501777648926, -0.3159596025943756, 0.1776086390018463, 0.46478238701820374, -0.06347665935754776, -0.31968066096305847, 0.23130662739276886, 0.19589543342590332, 0.05701335892081261, 0.1599380373954773, 0.11801252514123917, 0.5215351581573486, 0.5515782833099365, -0.030607059597969055, 0.10694622248411179, 0.1577189564704895, -0.11335014551877975, -0.040896348655223846, 0.19733837246894836, 0.3230091631412506, 0.3432396650314331, 0.20135051012039185, 0.23229098320007324, -0.12374616414308548, 0.3629770874977112, 0.13532805442810059, 0.23862002789974213, -0.15822623670101166, 0.06278035044670105, -0.13218869268894196, 0.08538766950368881, -0.29603737592697144, 0.16927504539489746, -0.23226988315582275, 0.07238446176052094, 0.5374067425727844, 0.17379134893417358, 0.18438121676445007, 0.028195735067129135, 0.08190508186817169, -0.17947235703468323, 0.3207799196243286, 0.18729901313781738, -0.004604402929544449, -0.447346955537796, -0.14204998314380646, -0.49079981446266174, 0.1574256718158722, -0.3643202781677246, -0.1044759750366211, 0.14511127769947052, 0.11769986152648926, -0.07114625722169876, 0.01156868040561676, 0.0331624373793602, -0.039099786430597305, -0.10488743335008621, 0.2687344551086426, -0.15997494757175446, -0.39865610003471375, -0.05761551856994629, 0.10793124884366989, 0.11563150584697723, -0.5605538487434387, -0.015596147626638412, -0.11823571473360062, 0.10908892005681992, -0.2412690669298172, -0.15598666667938232, 0.07161815464496613, -0.05986354500055313, 0.4797486364841461, 0.0273875929415226, 0.45274800062179565, -0.029472053050994873, 0.14985445141792297, -0.34438666701316833, -0.30396828055381775, -0.046884432435035706, 0.32532110810279846, 0.19390542805194855, 0.27107003331184387, -0.28286901116371155, 0.11237485706806183, -0.16498465836048126, -0.002180041279643774, 0.05963841825723648, 0.1852111518383026, -0.09659507870674133, -0.08174614608287811, -0.13646407425403595, 0.1857873946428299, 0.1331341713666916, 0.2467500865459442, -0.19122789800167084, 0.07239538431167603, -0.00532841682434082, -0.3337085247039795, 0.5975281000137329, -0.07901124656200409, -0.27329525351524353, 0.0007337136194109917, 0.0964825302362442, 0.27577024698257446, -0.1867079883813858, -0.2042182981967926, 0.19913801550865173, 0.478746622800827, -0.13322383165359497, -0.04885892570018768, 0.17193132638931274, 0.08619289100170135, 0.11117717623710632, -0.00599699467420578, 0.1856500804424286, 0.016313720494508743, -0.1944560557603836, 0.10227932035923004, -0.3659282922744751 ]
https://github.com/huggingface/datasets/issues/1773
bug in loading datasets
Note that you can pass any argument you would pass to `pandas.read_csv` as kwargs to `load_dataset`. For example you can do ```python from datasets import load_dataset dataset = load_dataset('csv', data_files=data_files, sep="\t") ``` for example to use a tab separator. You can see the full list of arguments here: https://github.com/huggingface/datasets/blob/master/src/datasets/packaged_modules/csv/csv.py (I've not found the list in the documentation though, we definitely must add them !)
Hi, I need to load a dataset, I use these commands: ``` from datasets import load_dataset dataset = load_dataset('csv', data_files={'train': 'sick/train.csv', 'test': 'sick/test.csv', 'validation': 'sick/validation.csv'}) print(dataset['validation']) ``` the dataset in sick/train.csv are simple csv files representing the data. I am getting this error, do you have an idea how I can solve this? thank you @lhoestq ``` Using custom data configuration default Downloading and preparing dataset csv/default-61468fc71a743ec1 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2... Traceback (most recent call last): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 485, in incomplete_dir yield tmp_dir File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 604, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 959, in _prepare_split for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/tqdm-4.49.0-py3.7.egg/tqdm/std.py", line 1133, in __iter__ for obj in iterable: File "/julia/cache_home_2/modules/datasets_modules/datasets/csv/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2/csv.py", line 129, in _generate_tables for batch_idx, df in enumerate(csv_file_reader): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1029, in __next__ return self.get_chunk() File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1079, in get_chunk return self.read(nrows=size) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1052, in read index, columns, col_dict = self._engine.read(nrows) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 2056, in read data = self._reader.read(nrows) File "pandas/_libs/parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read File "pandas/_libs/parsers.pyx", line 783, in pandas._libs.parsers.TextReader._read_low_memory File "pandas/_libs/parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows File "pandas/_libs/parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows File "pandas/_libs/parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 37, saw 2 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "write_sick.py", line 19, in <module> 'validation': 'sick/validation.csv'}) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/load.py", line 612, in load_dataset ignore_verifications=ignore_verifications, File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 534, in download_and_prepare self._save_info() File "/julia/libs/anaconda3/envs/success/lib/python3.7/contextlib.py", line 130, in __exit__ self.gen.throw(type, value, traceback) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 491, in incomplete_dir shutil.rmtree(tmp_dir) File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 498, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 496, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2.incomplete' ```
64
bug in loading datasets Hi, I need to load a dataset, I use these commands: ``` from datasets import load_dataset dataset = load_dataset('csv', data_files={'train': 'sick/train.csv', 'test': 'sick/test.csv', 'validation': 'sick/validation.csv'}) print(dataset['validation']) ``` the dataset in sick/train.csv are simple csv files representing the data. I am getting this error, do you have an idea how I can solve this? thank you @lhoestq ``` Using custom data configuration default Downloading and preparing dataset csv/default-61468fc71a743ec1 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2... Traceback (most recent call last): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 485, in incomplete_dir yield tmp_dir File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 604, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 959, in _prepare_split for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/tqdm-4.49.0-py3.7.egg/tqdm/std.py", line 1133, in __iter__ for obj in iterable: File "/julia/cache_home_2/modules/datasets_modules/datasets/csv/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2/csv.py", line 129, in _generate_tables for batch_idx, df in enumerate(csv_file_reader): File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1029, in __next__ return self.get_chunk() File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1079, in get_chunk return self.read(nrows=size) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1052, in read index, columns, col_dict = self._engine.read(nrows) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 2056, in read data = self._reader.read(nrows) File "pandas/_libs/parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read File "pandas/_libs/parsers.pyx", line 783, in pandas._libs.parsers.TextReader._read_low_memory File "pandas/_libs/parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows File "pandas/_libs/parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows File "pandas/_libs/parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 37, saw 2 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "write_sick.py", line 19, in <module> 'validation': 'sick/validation.csv'}) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/load.py", line 612, in load_dataset ignore_verifications=ignore_verifications, File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 534, in download_and_prepare self._save_info() File "/julia/libs/anaconda3/envs/success/lib/python3.7/contextlib.py", line 130, in __exit__ self.gen.throw(type, value, traceback) File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 491, in incomplete_dir shutil.rmtree(tmp_dir) File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 498, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 496, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2.incomplete' ``` Note that you can pass any argument you would pass to `pandas.read_csv` as kwargs to `load_dataset`. For example you can do ```python from datasets import load_dataset dataset = load_dataset('csv', data_files=data_files, sep="\t") ``` for example to use a tab separator. You can see the full list of arguments here: https://github.com/huggingface/datasets/blob/master/src/datasets/packaged_modules/csv/csv.py (I've not found the list in the documentation though, we definitely must add them !)
[ -0.28426676988601685, -0.2714773416519165, -0.14631587266921997, 0.4608480930328369, 0.3019687533378601, 0.24083682894706726, 0.08345676213502884, 0.5121127367019653, 0.07644961774349213, 0.05858154967427254, -0.00045389612205326557, -0.2665962278842926, -0.10810229927301407, 0.2536356449127197, -0.033702749758958817, 0.03520511835813522, -0.0331646129488945, 0.1680264174938202, -0.0946207195520401, 0.019386455416679382, -0.2684038281440735, 0.2590360939502716, -0.09573845565319061, 0.08945976197719574, -0.0035115156788378954, -0.1219344362616539, 0.09926402568817139, 0.260385125875473, -0.29758119583129883, -0.36872637271881104, 0.3527500033378601, -0.17652219533920288, 0.367129385471344, 0.20565156638622284, -0.00011003286635968834, 0.10972239077091217, 0.4414516091346741, -0.2222377508878708, -0.2273046225309372, -0.27828389406204224, -0.3186444044113159, -0.5255686044692993, -0.04241660237312317, -0.25191983580589294, -0.07208985090255737, -0.19860999286174774, -0.11861741542816162, -0.3585057854652405, 0.19687554240226746, 0.4839043617248535, 0.3277643918991089, -0.20243670046329498, -0.07729710638523102, -0.21825993061065674, 0.17366749048233032, 0.08253614604473114, 0.017782220616936684, 0.09850047528743744, 0.03832154721021652, 0.1259889006614685, 0.5457248687744141, 0.22481507062911987, -0.08710277825593948, 0.06227666884660721, 0.13281872868537903, -0.06502930819988251, 0.22017967700958252, -0.3268524706363678, 0.18521234393119812, 0.1893908679485321, 0.8423667550086975, -0.12720081210136414, -0.16206054389476776, -0.141718327999115, 0.1230335533618927, -0.3095788359642029, 0.003567039966583252, 0.3891043961048126, -0.15926241874694824, 0.15572823584079742, -0.19616153836250305, 0.022635038942098618, -0.05632735416293144, 0.1439458429813385, 0.19916632771492004, -0.12764416635036469, -0.2566348910331726, 0.2265537679195404, -0.06645025312900543, -0.09688036143779755, 0.001983686350286007, -0.0634833350777626, -0.1318114846944809, 0.22007718682289124, -0.306193470954895, -0.005989372730255127, -0.08652666956186295, -0.04749809205532074, 0.13054880499839783, 0.019128315150737762, 0.20573146641254425, -0.3622545301914215, 0.14165553450584412, 0.10292817652225494, 0.30852171778678894, 0.3533763289451599, -0.09663528949022293, 0.018619351089000702, 0.04687632620334625, 0.1750156730413437, 0.054410990327596664, -0.22432640194892883, -0.14580969512462616, -0.4689766764640808, 0.2325948029756546, 0.24888643622398376, 0.331773042678833, -0.1506781280040741, -0.2495947927236557, 0.13419577479362488, -0.055104516446590424, 0.2364848256111145, 0.12058322131633759, 0.5153103470802307, -0.30711793899536133, 0.1684071123600006, -0.06295695900917053, 0.025600804015994072, -0.0268063023686409, -0.22164399921894073, -0.29560917615890503, 0.024008983746170998, -0.18466205894947052, -0.13959453999996185, 0.20676380395889282, -0.21105076372623444, 0.24458187818527222, 0.07953562587499619, 0.040837932378053665, -0.3071087598800659, 0.0538247749209404, -0.3537349998950958, -0.023229748010635376, 0.4643995463848114, 0.09005220234394073, 0.13243527710437775, 0.25970980525016785, -0.08393102139234543, -0.2189939320087433, 0.17716851830482483, -0.35902994871139526, -0.5951443910598755, -0.011071151122450829, 0.2614988684654236, -0.11406531929969788, 0.1193493977189064, -0.42464688420295715, 0.07000182569026947, 0.16095440089702606, -0.09549984335899353, -0.05181596428155899, -0.17874956130981445, -0.2614169120788574, -0.34765276312828064, 0.1499706506729126, 0.3107526898384094, -0.5323681235313416, 0.16871865093708038, -0.3266540467739105, -0.27322837710380554, 0.2976889908313751, 0.21203529834747314, -0.12096703052520752, 0.3310961127281189, -0.2531272768974304, 0.0592159777879715, 0.3152393400669098, -0.30059003829956055, -0.39999762177467346, 0.3908528685569763, 0.01631768047809601, 0.13098759949207306, 0.0034010037779808044, 0.009810580871999264, 0.3307879567146301, 0.00786952581256628, 0.11023488640785217, 0.2126961499452591, -0.14865601062774658, -0.031486786901950836, -0.2620568573474884, -0.16417765617370605, -0.05091371387243271, 0.15648281574249268, 0.1396571397781372, 0.11094620078802109, 0.1691531538963318, -0.3006534278392792, -0.05188281834125519, -0.06556792557239532, 0.2696266770362854, 0.3614271879196167, 0.21166308224201202, 0.1624414622783661, 0.17079058289527893, 0.08129441738128662, -0.5355846285820007, 0.32568123936653137, 0.011593881994485855, -0.19988182187080383, -0.09194342792034149, -0.12410440295934677, -0.5685519576072693, -0.016445400193333626, -0.12866851687431335, -0.0026955492794513702, 0.109413743019104, -0.10544650256633759, -0.024304166436195374, -0.09215427935123444, -0.03021831624209881, 0.5924557447433472, -0.1262020766735077, -0.1524438112974167, -0.13710805773735046, 0.2782704532146454, 0.012459278106689453, 0.05533168464899063, 0.021213367581367493, 0.0994582325220108, 0.18134774267673492, -0.10147379338741302, -0.3069879710674286, 0.30993786454200745, 0.06691981852054596, -0.059799954295158386, -0.039099909365177155, -0.08811850845813751, -0.12910544872283936, -0.14014095067977905, -0.013777794316411018, 0.15735849738121033, 0.2477232813835144, -0.04693002626299858, 0.11266455054283142, 0.14883418381214142, -0.29803237318992615, 0.003697425127029419, -0.11846106499433517, 0.06277883052825928, 0.5067974925041199, 0.040096465498209, 0.07035820931196213, -0.36937788128852844, 0.22321413457393646, -0.1662299484014511, 0.3108948767185211, -0.022393422201275826, -0.21733950078487396, -0.351418673992157, 0.14502780139446259, 0.07821604609489441, -0.09746912866830826, 0.43131721019744873, -0.09091313928365707, -0.10653737187385559, -0.08405382931232452, 0.3009825050830841, 0.525425374507904, 0.08345618844032288, -0.1675482541322708, 0.20547673106193542, 0.2845362722873688, -0.006182629615068436, 0.2890947163105011, -0.10242407023906708, 0.32829686999320984, 0.2726709246635437, -0.09580320119857788, -0.1561962515115738, -0.10693790763616562, -0.15120141208171844, 0.18098996579647064, 0.48027628660202026, -0.2961615324020386, 0.007689883932471275, -0.039297353476285934, -0.1293671429157257, -0.026326343417167664, -0.12599846720695496, 0.048574529588222504, -0.058026134967803955, -0.10105419158935547, 0.1505691111087799, 0.041041579097509384, -0.13404056429862976, -0.17710669338703156, 0.28782498836517334, 0.1359102725982666, -0.23670919239521027, -0.1092018187046051, -0.15593650937080383, -0.2683490514755249, 0.11954805254936218, 0.03503136336803436, 0.019676392897963524, 0.2585451602935791, -0.19974039494991302, 0.0914037674665451, -0.1030229851603508, -0.04985961318016052, -0.044715672731399536, -0.0019548796117305756, 0.3377040922641754, 0.19620877504348755, 0.24009019136428833, 0.08995918929576874, 0.051665522158145905, 0.22368767857551575, -0.05026838555932045, -0.05306347459554672, 0.3498874008655548, -0.14861255884170532, -0.09878423810005188, -0.06121544539928436, -0.43781253695487976, -0.5983160138130188, -0.35915061831474304, 0.001271277666091919, 0.04373784735798836, 0.045235566794872284, 0.21582669019699097, 0.22802184522151947, -0.1275927722454071, 0.3982062339782715, -0.07740341871976852, -0.3031054437160492, -0.5205017328262329, 0.23767594993114471, -0.350307434797287, -0.16793137788772583, 0.008150432258844376, -0.0291731096804142, 0.1761377453804016, 0.06755637377500534, -0.5610888600349426, 0.35672852396965027, -0.2383802980184555, 0.06498950719833374, -0.23086145520210266, -0.3174830973148346, 0.22042003273963928, -0.1381315290927887, -0.0619109645485878, -0.24801772832870483, -0.15417194366455078, -0.030451692640781403, 0.061127327382564545, 0.1230325996875763, -0.06772275269031525, 0.5385026931762695, 0.05026634410023689, 0.5127761960029602, 0.32991430163383484, -0.0016038157045841217, 0.4850442409515381, 0.06830359250307083, 0.3586149513721466, -0.23225408792495728, -0.3839130997657776, -0.044841326773166656, -0.09056171774864197, -0.2724587023258209, 0.16396623849868774, -0.06622233986854553, -0.10019590705633163, -0.1565476357936859, -0.04777860641479492, -0.333280086517334, 0.053939711302518845, 0.10474283993244171, -0.16281084716320038, 0.31257855892181396, 0.0887053906917572, -0.12076319754123688, -0.38754332065582275, -0.14753004908561707, -0.21140331029891968, 0.3583054542541504, -0.031243182718753815, 0.21290545165538788, -0.3576202988624573, 0.08544144034385681, -0.37564802169799805, 0.42008495330810547, 0.10934736579656601, 0.4523642659187317, -0.12905079126358032, 0.21277090907096863, 0.037885405123233795, 0.05347926542162895, 0.7103980779647827, -0.4645592272281647, 0.035882070660591125, 0.16599494218826294, 0.027568034827709198, -0.3042500913143158, -0.28518709540367126, -0.008479971438646317, 0.31785252690315247, 0.314132422208786, 0.5803301930427551, -0.03612123057246208, 0.0007450543344020844, -0.046496592462062836, 0.19860346615314484, -0.27857881784439087, -0.37961792945861816, -0.3453674018383026, -0.2140880525112152, -0.24124881625175476, -0.06281589716672897, 0.10356160253286362, 0.46642377972602844, -0.05241307616233826, -0.11790649592876434, -0.15775004029273987, 0.015348505228757858, 0.14270371198654175, 0.08803695440292358, 0.36294862627983093, -0.014423171058297157, 0.364949107170105, 0.07446929812431335, 0.08856116235256195, 0.19705072045326233, 0.699954092502594, 0.12739843130111694, -0.5392555594444275, -0.1261572539806366, 0.06966844946146011, 0.09543729573488235, -0.08110174536705017, -0.29504674673080444, -0.1615707278251648, -0.03610885143280029, 0.2540144920349121, -0.16863615810871124, 0.28428179025650024, 0.27416202425956726, -0.09369388967752457, -0.5076525807380676, -0.48670876026153564, 0.2544362545013428, 0.07475355267524719, -0.04898660257458687, 0.27865883708000183, -0.21352629363536835, -0.2284800410270691, 0.04306677356362343, 0.03763715922832489, 0.6544904708862305, -0.0589199960231781, -0.10743896663188934, 0.16741758584976196, -0.2733140289783478, 0.24323104321956635, -0.4013941287994385, 0.08022446930408478, -0.3252430260181427, -0.4311290979385376, -0.01898401975631714, -0.22216542065143585, 0.09237480163574219, 0.1845078468322754, -0.13606557250022888, 0.3313300609588623, -0.24764364957809448, 0.3380993902683258, -0.04327277094125748, 0.05705428868532181, 0.013291679322719574, -0.16167035698890686, -0.112772136926651, 0.20041072368621826, -0.22134263813495636, 0.2725205421447754, -0.23051238059997559, -0.007064135745167732, 0.034944500774145126, -0.21167488396167755, -0.358095645904541, 0.08955834805965424, -0.0012527373619377613, 0.33205878734588623, -0.13376572728157043, -0.21419435739517212, 0.026465319097042084, 0.38205718994140625, 0.2773965001106262, 0.27476179599761963, -0.16808204352855682, 0.1762903481721878, 0.00789003074169159, -0.02277962863445282, -0.06779292970895767, 0.15924032032489777, 0.05743289738893509, -0.07007495313882828, -0.26953941583633423, 0.17292962968349457, -0.1512601673603058, -0.1990174502134323, 0.07428251206874847, -0.05520045757293701, -0.04397520422935486, -0.37888503074645996, -0.49444255232810974, -0.20809417963027954, 0.18062768876552582, -0.06996357440948486, 0.1461118906736374, -0.011700615286827087, -0.056295525282621384, 0.2779732644557953, 0.00987711176276207, -0.4934690594673157, -0.09345777332782745, 0.2358597218990326, 0.15044517815113068, 0.042307741940021515, 0.5770385265350342, -0.022746078670024872, -0.12676455080509186, -0.20606505870819092, 0.15691423416137695, 0.1524965614080429, -0.4153023958206177, 0.2984958291053772, 0.006565272342413664, 0.2282923012971878, -0.05643376335501671, 0.10670514404773712, 0.2867482900619507, -0.013791501522064209, 0.26963526010513306, -0.6932896971702576, -0.24386483430862427, 0.052033960819244385, -0.22527258098125458, 0.18040290474891663, 0.16515418887138367, 0.04282662272453308, -0.08825026452541351, -0.04950098693370819, -0.3103482723236084, 0.19515617191791534, -0.24363957345485687, -0.01277187466621399, 0.11711447685956955, 0.024686727672815323, 0.1024995893239975, -0.05076663941144943, 0.1229807436466217, 0.05686904489994049, -0.2471606731414795, -0.29580166935920715, -0.11205986142158508, 0.129828542470932, -0.014499492943286896, -0.12319760769605637, 0.05956884101033211, -0.22218820452690125, -0.26360270380973816, -0.07550879567861557, 0.06330087780952454, 0.22922813892364502, 0.05964340642094612, 0.150957852602005, -0.1756058633327484, 0.07458458840847015, -0.30018842220306396, 0.3205675780773163, 0.06790895760059357, 0.208236962556839, -0.007541307248175144, 0.23153972625732422, 0.13621780276298523, -0.08701260387897491, -0.495744913816452, -0.11654306203126907, 0.14861711859703064, 0.031106356531381607, 0.33451664447784424, -0.2841584086418152, 0.4677671492099762, 0.18599450588226318, 0.1772853136062622, 0.2053658664226532, -0.18433703482151031, 0.13665671646595, 0.27926596999168396, 0.24595624208450317, -0.3412807583808899, -0.0360049344599247, -0.027183789759874344, 0.264536052942276, -0.15160994231700897, 0.01927442103624344, 0.3053026795387268, -0.033590082079172134, -0.023905672132968903, 0.08172032982110977, 0.36084508895874023, 0.14038847386837006, 0.19851340353488922, 0.47880005836486816, 0.05508873984217644, 0.10434412211179733, 0.14739342033863068, 0.152968168258667, 0.14865383505821228, 0.8432773351669312, -0.08708500117063522, 0.04750562459230423, 0.2190113663673401, 0.1941460222005844, -0.2537888288497925, -0.725945234298706, 0.2099427431821823, 0.23180150985717773, -0.12920543551445007, 0.06368754059076309, 0.05159008875489235, 0.015476398169994354, -0.05689307674765587, 0.028710518032312393, -0.3996514678001404, -0.11233878135681152, -0.1974148154258728, -0.043904248625040054, -0.11456555128097534, -0.09350915998220444, -0.09504757076501846, 0.09067709743976593, -0.10258416831493378, -0.05176343023777008, -0.05326929688453674, 0.08045662939548492, -0.2873501777648926, -0.3159596025943756, 0.1776086390018463, 0.46478238701820374, -0.06347665935754776, -0.31968066096305847, 0.23130662739276886, 0.19589543342590332, 0.05701335892081261, 0.1599380373954773, 0.11801252514123917, 0.5215351581573486, 0.5515782833099365, -0.030607059597969055, 0.10694622248411179, 0.1577189564704895, -0.11335014551877975, -0.040896348655223846, 0.19733837246894836, 0.3230091631412506, 0.3432396650314331, 0.20135051012039185, 0.23229098320007324, -0.12374616414308548, 0.3629770874977112, 0.13532805442810059, 0.23862002789974213, -0.15822623670101166, 0.06278035044670105, -0.13218869268894196, 0.08538766950368881, -0.29603737592697144, 0.16927504539489746, -0.23226988315582275, 0.07238446176052094, 0.5374067425727844, 0.17379134893417358, 0.18438121676445007, 0.028195735067129135, 0.08190508186817169, -0.17947235703468323, 0.3207799196243286, 0.18729901313781738, -0.004604402929544449, -0.447346955537796, -0.14204998314380646, -0.49079981446266174, 0.1574256718158722, -0.3643202781677246, -0.1044759750366211, 0.14511127769947052, 0.11769986152648926, -0.07114625722169876, 0.01156868040561676, 0.0331624373793602, -0.039099786430597305, -0.10488743335008621, 0.2687344551086426, -0.15997494757175446, -0.39865610003471375, -0.05761551856994629, 0.10793124884366989, 0.11563150584697723, -0.5605538487434387, -0.015596147626638412, -0.11823571473360062, 0.10908892005681992, -0.2412690669298172, -0.15598666667938232, 0.07161815464496613, -0.05986354500055313, 0.4797486364841461, 0.0273875929415226, 0.45274800062179565, -0.029472053050994873, 0.14985445141792297, -0.34438666701316833, -0.30396828055381775, -0.046884432435035706, 0.32532110810279846, 0.19390542805194855, 0.27107003331184387, -0.28286901116371155, 0.11237485706806183, -0.16498465836048126, -0.002180041279643774, 0.05963841825723648, 0.1852111518383026, -0.09659507870674133, -0.08174614608287811, -0.13646407425403595, 0.1857873946428299, 0.1331341713666916, 0.2467500865459442, -0.19122789800167084, 0.07239538431167603, -0.00532841682434082, -0.3337085247039795, 0.5975281000137329, -0.07901124656200409, -0.27329525351524353, 0.0007337136194109917, 0.0964825302362442, 0.27577024698257446, -0.1867079883813858, -0.2042182981967926, 0.19913801550865173, 0.478746622800827, -0.13322383165359497, -0.04885892570018768, 0.17193132638931274, 0.08619289100170135, 0.11117717623710632, -0.00599699467420578, 0.1856500804424286, 0.016313720494508743, -0.1944560557603836, 0.10227932035923004, -0.3659282922744751 ]
https://github.com/huggingface/datasets/issues/1771
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.2.1/datasets/csv/csv.py
Indeed in 1.2.1 the script to process csv file is downloaded. Starting from the next release though we include the csv processing directly in the library. See PR #1726 We'll do a new release soon :)
Hi, When I load_dataset from local csv files, below error happened, looks raw.githubusercontent.com was blocked by the chinese government. But why it need to download csv.py? should it include when pip install the dataset? ``` Traceback (most recent call last): File "/home/tom/pyenv/pystory/lib/python3.6/site-packages/datasets/load.py", line 267, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/tom/pyenv/pystory/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 343, in cached_path max_retries=download_config.max_retries, File "/home/tom/pyenv/pystory/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 617, in get_from_cache raise ConnectionError("Couldn't reach {}".format(url)) ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.2.1/datasets/csv/csv.py ```
36
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.2.1/datasets/csv/csv.py Hi, When I load_dataset from local csv files, below error happened, looks raw.githubusercontent.com was blocked by the chinese government. But why it need to download csv.py? should it include when pip install the dataset? ``` Traceback (most recent call last): File "/home/tom/pyenv/pystory/lib/python3.6/site-packages/datasets/load.py", line 267, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/tom/pyenv/pystory/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 343, in cached_path max_retries=download_config.max_retries, File "/home/tom/pyenv/pystory/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 617, in get_from_cache raise ConnectionError("Couldn't reach {}".format(url)) ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.2.1/datasets/csv/csv.py ``` Indeed in 1.2.1 the script to process csv file is downloaded. Starting from the next release though we include the csv processing directly in the library. See PR #1726 We'll do a new release soon :)
[ -0.09555341303348541, -0.20197570323944092, -0.18235303461551666, 0.09957460314035416, 0.1923653483390808, -0.011418551206588745, 0.2810024917125702, 0.1859908103942871, 0.2537339925765991, 0.2542535960674286, 0.08921913057565689, -0.196747824549675, 0.23854659497737885, 0.09402406215667725, 0.28485366702079773, 0.005462635308504105, 0.06139356270432472, 0.1827709674835205, -0.05480116605758667, 0.07383525371551514, -0.22190426290035248, 0.1612166166305542, -0.07704637199640274, 0.24066852033138275, 0.18300876021385193, -0.04382454603910446, -0.018339212983846664, 0.2499675452709198, -0.15533043444156647, -0.6863774657249451, 0.5335737466812134, -0.0877208262681961, 0.0872388705611229, 0.3809684216976166, -0.00012196242460049689, 0.17848724126815796, 0.22665177285671234, 0.06009034067392349, -0.3041377365589142, -0.4303002953529358, -0.20436379313468933, -0.4646516442298889, 0.2093786895275116, -0.08814728260040283, -0.11163055896759033, 0.08465157449245453, 0.09860549867153168, -0.06798876076936722, 0.5056248307228088, 0.25710952281951904, 0.1253383755683899, 0.4090684652328491, 0.16111193597316742, -0.02371073141694069, 0.07973042875528336, -0.2780304551124573, 0.03831028193235397, 0.6396934390068054, 0.2506093382835388, 0.07917822152376175, 0.1863253116607666, 0.06411895155906677, 0.021892564371228218, 0.03690085560083389, 0.04729928448796272, -0.18821406364440918, -0.12584415078163147, -0.4115513265132904, 0.15860724449157715, 0.18412894010543823, 0.41877251863479614, -0.03934065252542496, -0.44624266028404236, -0.1533690094947815, -0.10582898557186127, -0.25368452072143555, 0.23975616693496704, 0.2356257140636444, -0.18766924738883972, 0.38941752910614014, -0.37824660539627075, -0.4112768769264221, -0.25390416383743286, 0.07960158586502075, 0.15027111768722534, -0.12256850302219391, -0.2733919620513916, 0.2718202769756317, -0.053409021347761154, 0.25797760486602783, -0.12415961176156998, -0.2064065784215927, 0.2385280579328537, 0.25582364201545715, -0.1334981918334961, 0.07678908109664917, 0.0650765597820282, 0.17736473679542542, 0.07278349995613098, 0.020290907472372055, -0.157266303896904, -0.068401999771595, 0.08706516772508621, 0.21113499999046326, 0.28217342495918274, 0.033491212874650955, -0.21210387349128723, 0.20134080946445465, 0.45502930879592896, 0.06910102814435959, 0.2622928023338318, -0.010266903787851334, -0.10291753709316254, -0.21077923476696014, -0.270386278629303, 0.0307912714779377, 0.3211873173713684, -0.2815461754798889, -0.3093494474887848, 0.06590133905410767, 0.03904831409454346, -0.010402340441942215, -0.1799646019935608, 0.2581599950790405, -0.2859198749065399, -0.06789299100637436, -0.2721948027610779, 0.20002660155296326, 0.02141130156815052, 0.2753880023956299, -0.1119690090417862, -0.00046462006866931915, 0.0060166046023368835, -0.0009938189759850502, 0.03407667204737663, -0.437274694442749, 0.39148661494255066, 0.09344007074832916, 0.04807767644524574, -0.09877420961856842, 0.11283516883850098, -0.06410583108663559, -0.04306616634130478, 0.6849482655525208, 0.17444419860839844, 0.1752893328666687, 0.21683788299560547, -0.18099012970924377, -0.1927257478237152, -0.09094972163438797, -0.38173413276672363, -0.5966463685035706, 0.1252201348543167, 0.09144670516252518, -0.21696513891220093, 0.08713661134243011, -0.298427939414978, -0.22513701021671295, 0.1321948617696762, -0.1171601414680481, 0.028683409094810486, -0.09015633165836334, 0.10952357947826385, -0.2676122486591339, 0.19173714518547058, 0.37402355670928955, -0.31533104181289673, 0.04944843053817749, -0.07342616468667984, -0.2135498970746994, 0.17627453804016113, 0.3705996572971344, -0.3056226372718811, 0.05918460339307785, -0.3774469196796417, -0.13621333241462708, 0.23829451203346252, -0.5621119141578674, -0.42150425910949707, 0.5992714762687683, -0.5369258522987366, 0.12850047647953033, 0.3748979866504669, -0.09433946013450623, 0.0501166395843029, -0.16421166062355042, -0.0010969191789627075, 0.2005167007446289, -0.17671126127243042, -0.08590841293334961, -0.06470005214214325, -0.23050609230995178, 0.14962230622768402, 0.05122397467494011, 0.147054061293602, 0.24752262234687805, 0.4015806317329407, -0.343752920627594, 0.22497886419296265, 0.07983866333961487, 0.05933760106563568, 0.30313289165496826, 0.11270306259393692, 0.18748632073402405, 0.05764733627438545, -0.06780912727117538, -0.018061205744743347, 0.14332279562950134, 0.09691634774208069, 0.13317352533340454, -0.45442986488342285, -0.28270143270492554, -0.38516056537628174, 0.05970741808414459, -0.2557532489299774, -0.19764630496501923, -0.07292231917381287, 0.16202452778816223, 0.19894209504127502, 0.06297029554843903, -0.1394387036561966, 0.2614647448062897, -0.2417072057723999, 0.13466469943523407, -0.3927442729473114, -0.005287574604153633, -0.3166235685348511, 0.2521173357963562, 0.06287389248609543, 0.2250801920890808, 0.10262537002563477, -0.3936481475830078, 0.03887854143977165, 0.34714871644973755, -0.16367536783218384, 0.2459467500448227, 0.4471331536769867, -0.07682956755161285, 0.14811915159225464, -0.2535530626773834, -0.0019222814589738846, 0.020738210529088974, 0.16529273986816406, 0.09957892447710037, 0.2445022463798523, 0.41896891593933105, -0.1381775140762329, 0.35343387722969055, 0.2430637925863266, 0.10181520879268646, 0.4970535337924957, 0.18469059467315674, -0.16382794082164764, -0.05491090938448906, 0.16274695098400116, 0.2569488286972046, 0.24402429163455963, 0.05105813220143318, -0.3063218295574188, 0.03586066514253616, 0.37141016125679016, -0.20613737404346466, -0.10453671962022781, 0.21989768743515015, -0.037545524537563324, -0.15411245822906494, 0.26895609498023987, 0.32543352246284485, 0.23970665037631989, 0.12873511016368866, 0.007377199828624725, 0.008486734703183174, 0.02452169917523861, -0.2758021950721741, 0.21783503890037537, 0.02252482995390892, -0.08485996723175049, -0.09973128885030746, -0.15779292583465576, 0.02390453778207302, -0.24623432755470276, -0.2599891126155853, -0.0818863958120346, 0.10035266727209091, -0.29512879252433777, 0.09568335115909576, -0.17913883924484253, -0.21060651540756226, 0.03055085614323616, -0.12782539427280426, -0.07087798416614532, -0.02446603775024414, -0.25416362285614014, -0.07687737047672272, 0.0034973472356796265, 0.05434047430753708, -0.11770831048488617, 0.08089086413383484, -0.00008088164031505585, -0.2572304904460907, 0.014919355511665344, -0.18221881985664368, -0.11670354753732681, 0.08023424446582794, 0.07353456318378448, -0.24600455164909363, 0.3860691785812378, -0.31605175137519836, -0.13747744262218475, -0.2647014558315277, -0.2660468816757202, -0.00253286212682724, -0.29278457164764404, 0.19168594479560852, 0.1971205174922943, 0.570370614528656, -0.07276389002799988, 0.1112000122666359, 0.10098782181739807, 0.15870149433612823, -0.09271952509880066, 0.09472399950027466, -0.17937807738780975, -0.3052486479282379, -0.029363276436924934, -0.41126975417137146, -0.6069234609603882, -0.24141672253608704, 0.5490334033966064, 0.05945500358939171, 0.1699182093143463, 0.12893755733966827, 0.12875081598758698, 0.20010878145694733, -0.09497720003128052, 0.18969157338142395, -0.10985006392002106, -0.7366932034492493, 0.18653972446918488, -0.2187228500843048, -0.42083898186683655, 0.0948561280965805, 0.17421220242977142, 0.15250012278556824, 0.11454503983259201, -0.48243242502212524, -0.04354139789938927, -0.2732468843460083, 0.5928384065628052, 0.22868366539478302, 0.2681694030761719, 0.2591041922569275, -0.10834027081727982, -0.019077569246292114, 0.058181099593639374, -0.1092536598443985, -0.12054041773080826, -0.03300456702709198, 0.0799577385187149, 0.23737847805023193, 0.6281411051750183, 0.0022581927478313446, 0.8966237902641296, 0.14333897829055786, 0.2809498906135559, 0.33665671944618225, -0.1672469824552536, 0.678781270980835, -0.11222683638334274, -0.3695983290672302, 0.18284861743450165, -0.1843002736568451, -0.034174785017967224, -0.03495305776596069, 0.011392874643206596, 0.1826460063457489, -0.35423707962036133, -0.21724313497543335, -0.4547279477119446, -0.013186680153012276, -0.2512989640235901, -0.0439465194940567, 0.3033425807952881, 0.32130423188209534, -0.25429603457450867, -0.04454603046178818, -0.04657268151640892, -0.13929778337478638, 0.5175515413284302, 0.3043709099292755, 0.10670730471611023, -0.19374129176139832, -0.41475731134414673, -0.4655107855796814, 0.18503892421722412, 0.16523905098438263, 0.3033654987812042, -0.20392297208309174, 0.14960217475891113, 0.14518354833126068, -0.02649354189634323, 0.46340835094451904, -0.08555547147989273, 0.26087042689323425, -0.25030091404914856, -0.2143213152885437, -0.24217751622200012, 0.08599108457565308, 0.1358068287372589, 0.39316192269325256, 0.4021690785884857, 0.3111835718154907, -0.25175657868385315, -0.0634317547082901, 0.2403291016817093, 0.4169411063194275, 0.036083195358514786, 0.032294731587171555, -0.43898865580558777, -0.4671418070793152, -0.30438104271888733, 0.044347524642944336, 0.07504831999540329, -0.032741766422986984, -0.0796365812420845, -0.3801334798336029, 0.13979019224643707, 0.04957573115825653, -0.08493146300315857, 0.010867772623896599, -0.17567208409309387, -0.1639825850725174, -0.08814208209514618, 0.029292400926351547, -0.011989958584308624, 0.23368041217327118, 0.8473034501075745, -0.054331328719854355, -0.4416351914405823, 0.10694074630737305, -0.08734171092510223, 0.24262437224388123, 0.42874816060066223, -0.3434513211250305, 0.22481396794319153, 0.29386594891548157, 0.1941405087709427, 0.027872342616319656, -0.08899880945682526, 0.22786037623882294, 0.2560950219631195, -0.26863959431648254, -0.5812897086143494, 0.23685169219970703, -0.19235247373580933, -0.07980635017156601, 0.16165408492088318, 0.3225770592689514, -0.02315286360681057, 0.08875711262226105, -0.32660916447639465, 0.9755815863609314, -0.061897777020931244, 0.15997107326984406, 0.2736925184726715, -0.204905167222023, 0.6905869841575623, -0.07529260963201523, -0.026011481881141663, -0.031232822686433792, 0.012163102626800537, -0.21386659145355225, -0.18364611268043518, 0.3075834810733795, -0.10755784809589386, 0.1308748871088028, 0.5412433743476868, 0.10515715181827545, 0.27938178181648254, 0.2818588614463806, 0.4345100522041321, -0.13703083992004395, 0.15180769562721252, -0.25238779187202454, 0.011293396353721619, 0.08900459110736847, 0.34920936822891235, -0.09679824858903885, -0.18124285340309143, -0.21695826947689056, -0.46354907751083374, -0.31590986251831055, 0.0770949199795723, -0.17001701891422272, 0.2835494875907898, -0.26185643672943115, -0.381908655166626, 0.039476703852415085, 0.21562354266643524, 0.36616724729537964, 0.12716688215732574, -0.3483724296092987, 0.10416950285434723, -0.032581627368927, -0.2253561168909073, 0.11939919739961624, 0.21962608397006989, 0.05851025506854057, -0.26766905188560486, -0.1631454974412918, 0.0912330225110054, -0.38370561599731445, -0.4753275513648987, 0.11651703715324402, 0.16068339347839355, -0.08863429725170135, 0.02855784259736538, -0.25947123765945435, -0.3641316294670105, -0.13531756401062012, -0.2234559953212738, 0.022192154079675674, 0.03325740247964859, 0.0855412557721138, -0.15956836938858032, 0.10008587688207626, -0.479257732629776, -0.30833175778388977, 0.296195924282074, 0.10111111402511597, 0.008664742112159729, 0.3008595108985901, -0.025484059005975723, -0.29784148931503296, -0.0730055645108223, -0.10705430805683136, 0.11287340521812439, -0.3831179738044739, -0.05543830618262291, 0.009305674582719803, 0.19030366837978363, -0.29047226905822754, 0.12139923870563507, 0.34540998935699463, -0.12917295098304749, -0.14018720388412476, -0.7301219701766968, -0.25746485590934753, -0.044068969786167145, -0.08601954579353333, -0.046787891536951065, 0.2605699598789215, 0.18841193616390228, 0.219100683927536, -0.1121385395526886, -0.1931420862674713, -0.035206906497478485, -0.11890634894371033, 0.18934404850006104, 0.3981720805168152, 0.12806758284568787, 0.40426376461982727, -0.04181011766195297, 0.09633534401655197, -0.23983247578144073, -0.2778918147087097, -0.09380041807889938, 0.12725381553173065, 0.19371967017650604, -0.01598624512553215, -0.21133387088775635, -0.1374364197254181, -0.18943822383880615, -0.030295126140117645, 0.13731494545936584, 0.19108766317367554, 0.08851467818021774, 0.07684595882892609, -0.2128361612558365, -0.3246438801288605, 0.03265371546149254, -0.15140202641487122, 0.25067341327667236, -0.4052930176258087, 0.2931371331214905, 0.04198802262544632, 0.1846662014722824, -0.054700352251529694, -0.06284721195697784, -0.17902995645999908, -0.1747976839542389, -0.001029185950756073, -0.015644043684005737, 0.4725158214569092, -0.30572038888931274, 0.1217365562915802, 0.12381906807422638, 0.3870140612125397, 0.31760671734809875, -0.07647179067134857, 0.16365551948547363, 0.0920117199420929, 0.05285986512899399, -0.2982034981250763, 0.17631879448890686, 0.01985655166208744, -0.012495852075517178, -0.0869373232126236, 0.08370009064674377, 0.3969007730484009, -0.05113979056477547, 0.24067997932434082, -0.007404466159641743, 0.7359580993652344, -0.03519972041249275, 0.0986526757478714, 0.31166306138038635, 0.20281894505023956, 0.29018327593803406, -0.007415400817990303, 0.39181485772132874, -0.0961788073182106, 0.283831387758255, -0.2792787253856659, -0.06495269387960434, -0.006628014147281647, 0.25201818346977234, -0.21608567237854004, -0.49893349409103394, 0.5282216668128967, 0.14050590991973877, -0.41288983821868896, -0.22270405292510986, 0.2649855613708496, 0.4716646075248718, -0.3868049681186676, 0.16174237430095673, 0.0028840675950050354, 0.13966204226016998, 0.000856839120388031, 0.05485681816935539, 0.08676496148109436, -0.052874818444252014, 0.053650081157684326, -0.013852907344698906, 0.04971715807914734, -0.14998792111873627, 0.07322626560926437, 0.08297622203826904, -0.16601045429706573, -0.49014735221862793, 0.09852051734924316, -0.0611775740981102, 0.06406030058860779, -0.10503979027271271, 0.24381788074970245, 0.044135283678770065, -0.11993467807769775, -0.05645858123898506, 0.2529461085796356, 0.6069973111152649, 0.28394779562950134, 0.11963678896427155, 0.04389086365699768, 0.11748823523521423, -0.24319207668304443, -0.03095543198287487, 0.23853985965251923, -0.022695213556289673, 0.38103199005126953, 0.22823534905910492, 0.1363200694322586, -0.03332455828785896, 0.29874739050865173, 0.032363906502723694, -0.007972603663802147, -0.2900751829147339, 0.25972476601600647, -0.2596825063228607, -0.3766293525695801, -0.11755630373954773, 0.1649688184261322, -0.5120318531990051, 0.13949419558048248, 0.2924078404903412, -0.19793474674224854, 0.015730328857898712, -0.42595309019088745, 0.03493961691856384, 0.027818508446216583, 0.2674630880355835, 0.7155255079269409, 0.4606134593486786, -0.33487582206726074, -0.10985159873962402, -0.5381643772125244, 0.17058852314949036, -0.22217097878456116, -0.19827456772327423, 0.051196690648794174, 0.011433230713009834, -0.10574018210172653, 0.32575559616088867, -0.04629667103290558, 0.10873616486787796, 0.07592441141605377, 0.05742195248603821, 0.1789705753326416, -0.020821012556552887, -0.1078760176897049, 0.1753508746623993, -0.19968366622924805, -0.3156132102012634, 0.42496898770332336, -0.39578986167907715, -0.04796433448791504, -0.111215740442276, 0.23410245776176453, 0.17206287384033203, -0.34055596590042114, 0.4727346897125244, 0.0987478718161583, 0.492342084646225, -0.15602338314056396, -0.11785992980003357, -0.15192659199237823, -0.09380503743886948, -0.16159607470035553, 0.24554437398910522, -0.01679057627916336, 0.006898008286952972, -0.18592789769172668, -0.23192782700061798, -0.2419969141483307, 0.31041932106018066, 0.017211582511663437, 0.05640764907002449, 0.288219153881073, -0.16374371945858002, -0.09385379403829575, 0.014068453572690487, 0.22508946061134338, 0.013341456651687622, 0.06279900670051575, -0.03550088033080101, -0.21819674968719482, -0.3019968867301941, 0.40214449167251587, -0.4057478606700897, -0.03964352235198021, 0.13205762207508087, 0.3493551015853882, 0.17191250622272491, -0.26416337490081787, -0.20590829849243164, 0.1802513599395752, 0.3741886019706726, 0.11971285194158554, -0.35470885038375854, 0.2156616449356079, -0.2529555559158325, 0.187966451048851, -0.044561076909303665, 0.30031582713127136, -0.17059579491615295, -0.32273879647254944, 0.005978245288133621, -0.2893486022949219 ]
https://github.com/huggingface/datasets/issues/1770
how can I combine 2 dataset with different/same features?
Hi ! Currently we don't have a way to `zip` datasets but we plan to add this soon :) For now you'll need to use `map` to add the fields from one dataset to the other. See the comment here for more info : https://github.com/huggingface/datasets/issues/853#issuecomment-727872188
to combine 2 dataset by one-one map like ds = zip(ds1, ds2): ds1: {'text'}, ds2: {'text'}, combine ds:{'src', 'tgt'} or different feature: ds1: {'src'}, ds2: {'tgt'}, combine ds:{'src', 'tgt'}
45
how can I combine 2 dataset with different/same features? to combine 2 dataset by one-one map like ds = zip(ds1, ds2): ds1: {'text'}, ds2: {'text'}, combine ds:{'src', 'tgt'} or different feature: ds1: {'src'}, ds2: {'tgt'}, combine ds:{'src', 'tgt'} Hi ! Currently we don't have a way to `zip` datasets but we plan to add this soon :) For now you'll need to use `map` to add the fields from one dataset to the other. See the comment here for more info : https://github.com/huggingface/datasets/issues/853#issuecomment-727872188
[ -0.36180874705314636, -0.4964471459388733, -0.06872184574604034, 0.12175989151000977, 0.06972867250442505, 0.35811108350753784, -0.09224571287631989, 0.2210625261068344, -0.03528505563735962, 0.01387026160955429, -0.32467448711395264, 0.4096486568450928, 0.06939146667718887, 0.7398912310600281, 0.16132870316505432, -0.24788179993629456, 0.07894925028085709, 0.12945620715618134, -0.47169527411460876, 0.1984136551618576, 0.012884974479675293, 0.0042594000697135925, -0.02468283101916313, -0.08492638170719147, -0.09843859821557999, 0.26732245087623596, -0.23301087319850922, -0.1992991864681244, -0.15733468532562256, 0.023566514253616333, 0.3827168047428131, 0.2693840265274048, -0.05311591550707817, 0.20278093218803406, -0.00011157681001350284, 0.07223156094551086, -0.04602300375699997, -0.12087607383728027, 0.10778236389160156, -0.4201931357383728, -0.03929184004664421, -0.5601704120635986, -0.10746598243713379, -0.018125325441360474, -0.1781560182571411, -0.2882145345211029, -0.2893856465816498, -0.21740831434726715, 0.3418448865413666, -0.16900420188903809, 0.10799635946750641, 0.10246638208627701, 0.16391944885253906, -0.06358129531145096, 0.29322192072868347, 0.44405972957611084, -0.08761963248252869, -0.06964845955371857, 0.4562331736087799, 0.0492846742272377, 0.5520346760749817, 0.19697029888629913, -0.01978985220193863, 0.0005702134221792221, 0.282297283411026, 0.15903271734714508, -0.22059893608093262, -0.2002963125705719, -0.012147605419158936, 0.39406928420066833, 0.4385497272014618, -0.28571850061416626, -0.3185838460922241, -0.1896539032459259, 0.14208529889583588, -0.17152191698551178, -0.17008301615715027, 0.3175990581512451, 0.02113517001271248, 0.023208901286125183, -0.4666416645050049, -0.39880701899528503, 0.07614929974079132, 0.15480953454971313, -0.08895768225193024, 0.10690517723560333, -0.08454772084951401, 0.1540902853012085, -0.05781123414635658, -0.24932362139225006, 0.11128154397010803, -0.41025546193122864, -0.08917300403118134, 0.27163752913475037, -0.2897031903266907, -0.35406309366226196, -0.2580054700374603, -0.20534157752990723, 0.7211526036262512, 0.1921922117471695, -0.1244392842054367, -0.13140323758125305, -0.4426645040512085, 0.20145156979560852, 0.2647921144962311, 0.28561931848526, 0.23403745889663696, 0.01858857274055481, 0.042790818959474564, -0.22738230228424072, -0.1311994343996048, -0.058362141251564026, 0.4423025846481323, -0.13620173931121826, -0.18928711116313934, -0.2544168531894684, 0.47796326875686646, -0.2223193198442459, 0.14823730289936066, -0.4064997732639313, 0.05267170071601868, -0.21322357654571533, -0.17341457307338715, -0.05093138664960861, 0.06986246258020401, -0.008011307567358017, -0.20465724170207977, 0.2878878712654114, 0.27491167187690735, -0.29548653960227966, -0.10598699003458023, -0.07378968596458435, 0.12062801420688629, 0.19112558662891388, -0.012507792562246323, -0.3862591087818146, 0.14507125318050385, 0.6239697933197021, -0.14066705107688904, 0.2539290487766266, 0.3124406635761261, -0.14262337982654572, -0.13763156533241272, -0.19376716017723083, 0.3240773677825928, 0.15430831909179688, 0.09615831077098846, 0.14415042102336884, -0.21334174275398254, -0.0007750540971755981, -0.3544183671474457, -0.1190916895866394, 0.0511288195848465, 0.17202605307102203, -0.13382649421691895, -0.11853252351284027, -0.36628860235214233, 0.6697061657905579, -0.04503994435071945, -0.196385458111763, -0.16011515259742737, 0.48251765966415405, -0.34605830907821655, -0.17293088138103485, 0.12489072233438492, 0.046694301068782806, -0.23567970097064972, -0.4060328006744385, 0.11284103989601135, -0.04086693748831749, -0.27360090613365173, 0.4258357584476471, -0.2547852098941803, 0.014846622943878174, -0.29205310344696045, 0.025438964366912842, 0.444881409406662, -0.07069484889507294, -0.23938396573066711, 0.41663768887519836, -0.033870354294776917, -0.026285506784915924, -0.07960567623376846, 0.1589781939983368, 0.1578691005706787, 0.1973281055688858, 0.05282127484679222, 0.5103899836540222, -0.24518409371376038, -0.21011406183242798, 0.017105605453252792, -0.4156889021396637, 0.4063562750816345, -0.07693126797676086, -0.08200804889202118, 0.02156020700931549, 0.027716293931007385, -0.4218939244747162, 0.14452162384986877, -0.15991143882274628, 0.23353251814842224, 0.11525728553533554, 0.03429228067398071, 0.050497088581323624, -0.08905479311943054, -0.4413537383079529, -0.4822227358818054, -0.016451135277748108, -0.1436120569705963, -0.19107753038406372, 0.16157709062099457, -0.42832618951797485, -0.008051197975873947, -0.36663612723350525, -0.0625191479921341, -0.11863201856613159, 0.03430773317813873, 0.01875704526901245, 0.1252596378326416, -0.1757802665233612, -0.2722328007221222, 0.22418643534183502, 0.5275181531906128, 0.0491102859377861, -0.3530471622943878, 0.5951492190361023, 0.2401287853717804, 0.012692682445049286, -0.047019779682159424, 0.11354011297225952, 0.08244217932224274, -0.015471460297703743, 0.10046813637018204, 0.012580528855323792, -0.5362690091133118, 0.33040741086006165, 0.44514286518096924, -0.1900833696126938, 0.26597860455513, -0.24250301718711853, 0.1363276243209839, -0.02520172670483589, 0.016454193741083145, -0.24923324584960938, -0.3427090644836426, 0.3071552515029907, 0.036262571811676025, 0.255485475063324, 0.11608961224555969, 0.08266030997037888, 0.1574556827545166, -0.13646873831748962, 0.047816939651966095, 0.006343565881252289, -0.011840220540761948, 0.012124139815568924, 0.3719063401222229, 0.2906227707862854, -0.18913733959197998, 0.16354569792747498, 0.2540834844112396, 0.0006375722587108612, 0.023400258272886276, 0.003306083381175995, -0.3710801303386688, 0.048701055347919464, 0.07334595173597336, -0.04579261317849159, 0.5803028345108032, 0.31189316511154175, -0.01384660229086876, 0.16549700498580933, 0.10072515159845352, 0.16088345646858215, -0.010885342955589294, -0.020466573536396027, -0.08091359585523605, 0.1754920482635498, 0.30737659335136414, 0.12035875022411346, -0.041876934468746185, 0.21539002656936646, 0.13845130801200867, -0.19830526411533356, -0.03390968590974808, -0.20776158571243286, -0.23050335049629211, -0.2206583321094513, -0.3354869782924652, -0.1023767739534378, -0.40554240345954895, 0.005889741703867912, -0.09672380983829498, 0.1889788657426834, 0.06752589344978333, 0.0023473696783185005, 0.2830422818660736, 0.24024583399295807, -0.1767151653766632, -0.12945656478405, -0.0370180644094944, 0.2874005138874054, 0.20327043533325195, 0.14468061923980713, 0.15421681106090546, 0.10148073732852936, 0.3842552602291107, -0.027663037180900574, -0.055593181401491165, -0.6561790108680725, -0.3905450403690338, 0.1056409552693367, -0.1866333931684494, 0.1626511663198471, -0.013268940150737762, 0.06125633791089058, 0.03171698749065399, -0.2150370478630066, 0.29022452235221863, 0.36806973814964294, -0.14537489414215088, -0.15255846083164215, -0.07114188373088837, 0.042422614991664886, -0.15349264442920685, -0.2626846134662628, -0.2550150454044342, -0.13076898455619812, 0.4938806891441345, -0.21221309900283813, 0.025391127914190292, -0.338888019323349, 0.05905838683247566, -0.1455031782388687, -0.038139622658491135, -0.03733525425195694, -0.2105335146188736, -0.441738486289978, 0.3633476793766022, -0.10190636664628983, -0.1232513040304184, -0.06221912056207657, -0.11851959675550461, 0.012973703444004059, 0.0582183375954628, -0.08506878465414047, -0.11139462143182755, -0.3798119127750397, 0.29918408393859863, -0.05814461410045624, 0.3092562258243561, 0.28409600257873535, 0.06220698356628418, 0.11545450985431671, 0.028177715837955475, -0.4375106692314148, 0.023682691156864166, 0.07762572169303894, 0.2953588366508484, 0.08617175370454788, 0.09521558880805969, -0.18478356301784515, 0.5392619967460632, 0.48551374673843384, 0.2069985270500183, 0.31480997800827026, -0.020761294290423393, 0.2014727145433426, -0.11382978409528732, -0.33594197034835815, -0.15461714565753937, 0.0052296072244644165, 0.25370723009109497, 0.07745213806629181, 0.1430765986442566, 0.11399069428443909, -0.3639833927154541, -0.3012896180152893, -0.019032372161746025, -0.10521776974201202, -0.09616510570049286, 0.07649634778499603, 0.023400403559207916, -0.10477761924266815, -0.4167274534702301, -0.22125418484210968, 0.07018891721963882, 0.11137031018733978, 0.306846022605896, -0.030122190713882446, 0.07630730420351028, -0.4565531611442566, -0.19594262540340424, -0.21962958574295044, 0.24354341626167297, 0.11353590339422226, -0.3452664017677307, 0.14352118968963623, 0.08393163233995438, -0.28910207748413086, -0.046175386756658554, 0.4688136577606201, 0.004426656290888786, -0.1657567322254181, -0.24155183136463165, -0.3337167203426361, -0.15962034463882446, -0.15413948893547058, 0.21018275618553162, -0.1223800852894783, -0.042810600250959396, 0.7450360655784607, -0.41503599286079407, -0.10631132125854492, 0.21444755792617798, 0.30936938524246216, -0.03402069956064224, -0.2858569324016571, 0.22487635910511017, -0.12651970982551575, -0.20387497544288635, -0.37363913655281067, -0.09187742322683334, -0.09465999156236649, -0.0005783108063042164, -0.3123132586479187, -0.2255399227142334, -0.11069323122501373, 0.41224241256713867, 0.09313301742076874, 0.1979769468307495, 0.0016139651415869594, 0.3067936599254608, 0.10920823365449905, 0.10543734580278397, -0.1184782087802887, 0.714466392993927, 0.09237350523471832, -0.5906252861022949, -0.3595563471317291, -0.14147435128688812, 0.44584521651268005, -0.1541202962398529, -0.03301423043012619, 0.4973277747631073, -0.3980504274368286, -0.03128812462091446, -0.15360160171985626, 0.04432009160518646, 0.2229006290435791, 0.33782118558883667, -0.35145264863967896, -0.20781143009662628, 0.6163512468338013, 0.41502517461776733, -0.08536387234926224, 0.27412840723991394, -0.15440219640731812, -0.08531226962804794, -0.06103487312793732, -0.4421533942222595, 0.7151227593421936, 0.0019198432564735413, 0.22351622581481934, -0.1618155539035797, 0.05170033872127533, 0.4223563075065613, -0.014193885028362274, -0.14071418344974518, 0.044534895569086075, -0.4924362599849701, -0.13454470038414001, -0.03608335182070732, -0.012755423784255981, 0.2731689214706421, -0.36484548449516296, 0.3875422775745392, 0.0279475599527359, 0.3813571631908417, -0.18128201365470886, 0.19140437245368958, 0.03567890822887421, 0.001929144375026226, -0.29230567812919617, 0.07740296423435211, -0.30820024013519287, 0.20188084244728088, 0.03185686841607094, -0.18157774209976196, -0.03937762230634689, -0.21105565130710602, -0.17164726555347443, 0.11502095311880112, 0.02151278592646122, 0.18499338626861572, 0.21588847041130066, -0.13073468208312988, 0.08616143465042114, 0.12181296944618225, 0.17738263309001923, 0.14797556400299072, -0.15744654834270477, -0.1854996234178543, -0.0523376539349556, 0.10658733546733856, -0.3663007616996765, -0.11259181052446365, -0.04789844900369644, 0.018520250916481018, -0.10673167556524277, 0.23904791474342346, 0.2548413574695587, 0.004304412752389908, -0.14859504997730255, -0.02037544548511505, -0.07571862637996674, -0.3721718192100525, -0.30676600337028503, 0.41046619415283203, 0.2765323221683502, -0.17222300171852112, 0.014911293052136898, 0.12024615705013275, -0.15590369701385498, 0.14473193883895874, 0.05854569375514984, -0.11853049695491791, -0.10873624682426453, 0.09665946662425995, 0.21150735020637512, 0.007775422185659409, 0.1847672462463379, -0.06562626361846924, 0.23680467903614044, 0.03243887424468994, 0.10787021368741989, 0.1853034943342209, -0.08266084641218185, 0.09414729475975037, -0.052857253700494766, 0.086488276720047, -0.04873207211494446, 0.20200984179973602, 0.1860230416059494, 0.31308236718177795, 0.24210985004901886, -0.16591721773147583, -0.3828413188457489, 0.1942700743675232, 0.1468084156513214, 0.2859950065612793, 0.052492059767246246, 0.2371540665626526, -0.07722941786050797, 0.5865793824195862, -0.24350939691066742, 0.12179659307003021, 0.293893426656723, 0.16963782906532288, 0.4679049253463745, 0.09200303256511688, -0.14098380506038666, -0.05143224075436592, 0.07163988798856735, -0.11168763041496277, -0.023784659802913666, -0.20983433723449707, -0.19934658706188202, 0.0840245857834816, 0.13052181899547577, -0.03602217882871628, -0.004290752578526735, -0.048514075577259064, 0.33714988827705383, -0.18928512930870056, 0.408326119184494, 0.03165293484926224, 0.0519721582531929, 0.044109780341386795, 0.13563643395900726, -0.16001984477043152, -0.4557378888130188, 0.3019760251045227, 0.0825200006365776, -0.08558996021747589, 0.03405819088220596, -0.042730867862701416, -0.11791352182626724, -0.13733528554439545, -0.22328194975852966, -0.19552621245384216, 0.42753171920776367, -0.06266945600509644, 0.004800397902727127, 0.20373313128948212, -0.040690287947654724, 0.15619084239006042, 0.1611376851797104, -0.007436104118824005, -0.1330079734325409, 0.43123653531074524, 0.019196856766939163, 0.1314156949520111, -0.281047523021698, -0.17228317260742188, 0.21215255558490753, 0.00018408894538879395, 0.11629368364810944, 0.044554203748703, -0.016911976039409637, 0.3816167712211609, -0.1187455803155899, -0.024992531165480614, 0.06805473566055298, 0.20024965703487396, 0.18515242636203766, 0.4368991255760193, 0.11967183649539948, -0.0775461345911026, 0.08550263196229935, 0.3447015583515167, 0.15283529460430145, -0.0628436803817749, -0.22311469912528992, 0.09509214013814926, -0.03555621951818466, 0.00956309586763382, 0.622567892074585, -0.18610112369060516, 0.006754186004400253, 0.16684764623641968, 0.02660509943962097, -0.015904612839221954, 0.17131680250167847, 0.3761460483074188, 0.021211473271250725, -0.43073734641075134, 0.10321318358182907, 0.5190809965133667, 0.14202766120433807, -0.21558503806591034, 0.12408633530139923, -0.23458582162857056, -0.12587785720825195, 0.14488407969474792, 0.11144895851612091, -0.5025014281272888, 0.727030873298645, -0.08557823300361633, 0.0586722269654274, 0.020524926483631134, 0.36267584562301636, 0.34232059121131897, 0.06831502169370651, 0.031900469213724136, 0.12349232286214828, 0.2584228813648224, -0.3591668903827667, -0.012800667434930801, 0.4288051426410675, 0.1311597377061844, 0.06507652252912521, 0.115610271692276, 0.36479687690734863, -0.03929753229022026, -0.11338269710540771, 0.15241694450378418, -0.1405670940876007, -0.14834481477737427, -0.2890024483203888, 0.16102370619773865, 0.1670106202363968, -0.07028141617774963, 0.05207668989896774, -0.517976701259613, 0.1358426958322525, -0.6229068040847778, 0.22714099287986755, 0.005120893940329552, -0.26636263728141785, -0.12378409504890442, -0.1238270029425621, -0.26156073808670044, -0.4799644351005554, 0.5373878479003906, 0.12918990850448608, -0.03137931600213051, -0.08031012117862701, 0.09652023017406464, -0.06292000412940979, 0.07929281145334244, 0.36909040808677673, -0.07242342084646225, -0.24623841047286987, -0.12022177875041962, -0.404154509305954, -0.020199470221996307, 0.05932554602622986, -0.05659263953566551, -0.2689473032951355, 0.07491888105869293, 0.10753503441810608, 0.09452050924301147, 0.14191634953022003, 0.05934862047433853, 0.36132505536079407, 0.01939370110630989, -0.30749818682670593, -0.1817614883184433, 0.08813100308179855, 0.07710553705692291, 0.24353709816932678, -0.1472335010766983, 0.31430646777153015, 0.1537708193063736, -0.055865123867988586, -0.1373119354248047, 0.24518051743507385, 0.06641003489494324, -0.3503929078578949, 0.16852006316184998, 0.12776251137256622, 0.37542039155960083, -0.3541482090950012, 0.1319275051355362, 0.4446251690387726, 0.03218032792210579, -0.32054394483566284, 0.24907487630844116, 0.1502968966960907, 0.08395111560821533, -0.43840673565864563, 0.13903914391994476, 0.13228069245815277, -0.07076011598110199, -0.046398695558309555, -0.44956541061401367, -0.23353567719459534, 0.1850862205028534, 0.024340815842151642, -0.05965302512049675, 0.16904260218143463, 0.5240692496299744, -0.07948864996433258, -0.028158601373434067, 0.14598852396011353, -0.1959228664636612, 0.43568024039268494, 0.06277242302894592, -0.18139511346817017, -0.1825106143951416, -0.28071898221969604, 0.20144815742969513, -0.14357292652130127, -0.4898815453052521, -0.16365066170692444, 0.29296591877937317, -0.004985880106687546, 0.30407246947288513, 0.301169753074646, 0.027485806494951248, -0.11438223719596863, -0.2004227340221405, 0.35415807366371155, 0.2150263786315918, -0.23493577539920807, 0.04300803318619728, -0.20748870074748993 ]
https://github.com/huggingface/datasets/issues/1770
how can I combine 2 dataset with different/same features?
Good to hear. Currently I did not use map , just fetch src and tgt from the 2 dataset and merge them. It will be a release if you can deal with it at the backend. Thanks.
to combine 2 dataset by one-one map like ds = zip(ds1, ds2): ds1: {'text'}, ds2: {'text'}, combine ds:{'src', 'tgt'} or different feature: ds1: {'src'}, ds2: {'tgt'}, combine ds:{'src', 'tgt'}
37
how can I combine 2 dataset with different/same features? to combine 2 dataset by one-one map like ds = zip(ds1, ds2): ds1: {'text'}, ds2: {'text'}, combine ds:{'src', 'tgt'} or different feature: ds1: {'src'}, ds2: {'tgt'}, combine ds:{'src', 'tgt'} Good to hear. Currently I did not use map , just fetch src and tgt from the 2 dataset and merge them. It will be a release if you can deal with it at the backend. Thanks.
[ -0.38856568932533264, -0.4940949082374573, -0.14069342613220215, 0.018540631979703903, -0.022465504705905914, 0.2798509895801544, -0.17467914521694183, 0.32268819212913513, -0.05108882114291191, 0.008893348276615143, -0.1925194412469864, 0.6096791625022888, 0.09996679425239563, 0.5465125441551208, 0.06980183720588684, -0.11272194981575012, 0.07456526160240173, 0.16883525252342224, -0.45527175068855286, 0.1778494119644165, 0.06204531341791153, -0.0594894215464592, -0.03345810994505882, -0.0982745885848999, -0.07985373586416245, 0.2818126976490021, -0.1274135708808899, -0.296735554933548, -0.23587803542613983, 0.014507942833006382, 0.2774324119091034, 0.23459985852241516, -0.1273667812347412, 0.25235515832901, -0.00010824969649547711, 0.11773297190666199, 0.05137709900736809, -0.15310588479042053, 0.2523333430290222, -0.4381466507911682, -0.19703322649002075, -0.4797203242778778, -0.16011369228363037, -0.1272793859243393, -0.10807539522647858, -0.1871519535779953, -0.29890426993370056, -0.3243277370929718, 0.25031858682632446, -0.12710437178611755, 0.13258500397205353, -0.08802055567502975, 0.12239289283752441, -0.013714335858821869, 0.29997503757476807, 0.3637714982032776, -0.06021598353981972, -0.10290329158306122, 0.5676074028015137, 0.009275779128074646, 0.44514206051826477, 0.21750490367412567, -0.12305092066526413, -0.007324989885091782, 0.31241610646247864, 0.048622049391269684, -0.03804139792919159, -0.26310646533966064, 0.07100027799606323, 0.24786335229873657, 0.5259121060371399, -0.15864211320877075, -0.09918217360973358, 0.06219228357076645, 0.031651221215724945, -0.005968185141682625, -0.1653367578983307, 0.2786552309989929, 0.041057784110307693, 0.044623974710702896, -0.5148202180862427, -0.44294825196266174, 0.0948953926563263, 0.16568465530872345, -0.07675687223672867, 0.2319709211587906, 0.03222654014825821, 0.18492227792739868, -0.21627701818943024, -0.24057935178279877, 0.26700782775878906, -0.4301856458187103, -0.057195354253053665, 0.33269572257995605, -0.21232549846172333, -0.35012516379356384, -0.25114893913269043, -0.443924218416214, 0.6490114331245422, -0.020098503679037094, 0.09902273863554001, -0.034040242433547974, -0.38059502840042114, 0.28048253059387207, 0.23750165104866028, 0.2917185127735138, 0.31732696294784546, 0.18986280262470245, -0.008711107075214386, -0.4177418351173401, -0.3030487596988678, 0.03295886516571045, 0.42091113328933716, -0.238207146525383, -0.15695106983184814, -0.17174413800239563, 0.44474589824676514, -0.3677550256252289, 0.21030819416046143, -0.5202792286872864, -0.08816413581371307, -0.14208082854747772, -0.22620531916618347, -0.09582232683897018, 0.175053671002388, 0.048922665417194366, -0.24050526320934296, 0.16767099499702454, 0.3340083956718445, -0.2938680946826935, -0.037017740309238434, -0.04225185886025429, 0.16030246019363403, 0.047182805836200714, -0.0015432871878147125, -0.17712391912937164, 0.09493783861398697, 0.5621640086174011, -0.30588436126708984, 0.18299193680286407, 0.3147561550140381, -0.1040007472038269, -0.019523806869983673, -0.2901397943496704, 0.3635194003582001, 0.08827008306980133, 0.034552380442619324, 0.27110815048217773, -0.2068244218826294, 0.12996980547904968, -0.4372507929801941, -0.1448739469051361, 0.13343799114227295, 0.2379768341779709, 0.01917947083711624, -0.06719298660755157, -0.2039434015750885, 0.5709995031356812, 0.04681837558746338, -0.2714459002017975, -0.1705266535282135, 0.5460530519485474, -0.23745489120483398, -0.24886639416217804, -0.09487156569957733, -0.03438429534435272, -0.3212692141532898, -0.33359000086784363, 0.06428544223308563, -0.02740807831287384, -0.2287088930606842, 0.3375684916973114, -0.36245331168174744, 0.05712860822677612, -0.1392396092414856, 0.04103907197713852, 0.5528929233551025, -0.09430938959121704, -0.3914397060871124, 0.5118293166160583, -0.007198277860879898, -0.146579310297966, -0.11569898575544357, 0.26437637209892273, 0.2004472315311432, 0.1718616783618927, 0.10766545683145523, 0.5094722509384155, -0.2747674584388733, -0.09660939872264862, -0.018907837569713593, -0.4181538224220276, 0.423963725566864, -0.13488921523094177, -0.057522181421518326, -0.047415755689144135, 0.15437358617782593, -0.48668813705444336, 0.1541965752840042, -0.10801945626735687, 0.26453229784965515, 0.10894652456045151, 0.017614614218473434, -0.17334164679050446, -0.07625514268875122, -0.35903623700141907, -0.39846161007881165, -0.1078946515917778, -0.3227746784687042, -0.1823045015335083, 0.08472678065299988, -0.36869627237319946, -0.011086970567703247, -0.4826444983482361, -0.04005769267678261, 0.008872944861650467, 0.09025651961565018, -0.02633725106716156, 0.005043637007474899, -0.23659127950668335, -0.15609204769134521, 0.1332932561635971, 0.5647351741790771, -0.04983094707131386, -0.20557978749275208, 0.5626955628395081, 0.21064569056034088, 0.033660728484392166, 0.022573143243789673, -0.047238826751708984, 0.13554340600967407, -0.02246694080531597, -0.0492444783449173, 0.059230465441942215, -0.45450761914253235, 0.3014397621154785, 0.3840031027793884, -0.20357753336429596, 0.26490655541419983, -0.3029325604438782, 0.14293821156024933, 0.06987854838371277, 0.06611121445894241, -0.2787417471408844, -0.2938680648803711, 0.23005366325378418, 0.11717219650745392, 0.20257093012332916, 0.08605580031871796, 0.08408953249454498, 0.11745868623256683, -0.17694436013698578, 0.06895387917757034, -0.047431811690330505, -0.11712908744812012, -0.030280429869890213, 0.23709623515605927, 0.4099990725517273, 0.02552255243062973, 0.2372208535671234, 0.24713541567325592, 0.03812633082270622, 0.13965904712677002, -0.07458357512950897, -0.3314553499221802, -0.034624435007572174, -0.01875198818743229, -0.06867588311433792, 0.5103157162666321, 0.25409382581710815, -0.163612499833107, 0.1103900820016861, 0.24925559759140015, 0.23758834600448608, -0.014033369719982147, -0.10935339331626892, 0.09522377699613571, 0.13630399107933044, 0.3759463131427765, 0.16348834335803986, 0.10283573716878891, 0.11592143774032593, 0.285581111907959, -0.1664954423904419, 0.11353376507759094, -0.35731378197669983, -0.2230839878320694, -0.1297074258327484, -0.29903462529182434, -0.01989591121673584, -0.2856922745704651, -0.017875948920845985, -0.042325831949710846, 0.0760572999715805, 0.08207999169826508, 0.053287409245967865, 0.3012825548648834, 0.09082643687725067, -0.12701116502285004, -0.18230287730693817, 0.04544304311275482, 0.12710168957710266, 0.1881297528743744, 0.1879553645849228, 0.14355576038360596, 0.15824873745441437, 0.3156914710998535, 0.044580914080142975, -0.018411139026284218, -0.4888226389884949, -0.39234480261802673, 0.12438143789768219, -0.000013865530490875244, -0.02143421210348606, -0.05143462121486664, -0.06979571282863617, 0.04031156003475189, -0.1614389270544052, 0.1152886152267456, 0.26960763335227966, -0.1647184193134308, -0.2373158484697342, -0.15650713443756104, -0.011466721072793007, -0.11034075915813446, -0.31047770380973816, -0.24592052400112152, -0.20527780055999756, 0.18221446871757507, -0.21876363456249237, 0.08298391103744507, -0.5726174712181091, 0.0895797610282898, -0.2523792088031769, 0.04196251928806305, -0.07522217929363251, -0.1315324902534485, -0.36839526891708374, 0.38467833399772644, -0.1310068964958191, -0.1836593896150589, -0.06396371126174927, -0.07959283143281937, 0.1381898671388626, 0.13391509652137756, -0.02335113286972046, 0.015227803029119968, -0.28390803933143616, 0.239676833152771, -0.10257361829280853, 0.12693443894386292, 0.2458896040916443, 0.22177518904209137, 0.05325676500797272, 0.019534893333911896, -0.3257353901863098, -0.01017102599143982, 0.12430521845817566, 0.2586684226989746, 0.16491451859474182, -0.0023149140179157257, -0.12664169073104858, 0.4759712219238281, 0.4102107286453247, 0.0864425003528595, 0.24614308774471283, 0.06902716308832169, -0.031046364456415176, -0.0720849260687828, -0.26508042216300964, -0.19327972829341888, -0.02706223726272583, 0.2228747308254242, 0.007795274257659912, -0.02002226561307907, -0.2028658390045166, -0.4187779724597931, -0.38878780603408813, -0.10321752727031708, -0.09018294513225555, -0.024836042895913124, 0.022597704082727432, 0.1172930970788002, -0.08445551991462708, -0.4240664541721344, -0.268120676279068, 0.06432899087667465, 0.17871874570846558, 0.11857971549034119, -0.016862787306308746, 0.03714538365602493, -0.4187377989292145, -0.16159731149673462, -0.037583544850349426, 0.2943127155303955, 0.20559296011924744, -0.34507644176483154, 0.18807649612426758, 0.09888177365064621, -0.3641400933265686, -0.07528823614120483, 0.36394599080085754, -0.006733683869242668, -0.0272204652428627, -0.2934647500514984, -0.15505674481391907, -0.018193548545241356, -0.11624543368816376, 0.2589888572692871, 0.01216065138578415, -0.0418916679918766, 0.6412336230278015, -0.31571197509765625, -0.03949686512351036, 0.1368408352136612, 0.1856141835451126, -0.08506275713443756, -0.2468770295381546, 0.2709832787513733, -0.07775846123695374, -0.24210961163043976, -0.46572816371917725, -0.06929390877485275, -0.1497349590063095, 0.06149236112833023, -0.4079432487487793, -0.21143122017383575, -0.04600811004638672, 0.3354441225528717, 0.12442320585250854, 0.17652538418769836, -0.16366121172904968, 0.16902963817119598, -0.04566001892089844, 0.10655583441257477, -0.14330461621284485, 0.6272718906402588, 0.26702913641929626, -0.4620841145515442, -0.24230501055717468, -0.2583223283290863, 0.4511786997318268, -0.12596097588539124, 0.05802037566900253, 0.4277217388153076, -0.4641076922416687, -0.15434283018112183, 0.051297206431627274, -0.09327011555433273, 0.09504454582929611, 0.2546093165874481, -0.4261370301246643, -0.15742696821689606, 0.5728214383125305, 0.3493753671646118, -0.1567675620317459, 0.3115527629852295, -0.44692039489746094, -0.08284886926412582, 0.14408518373966217, -0.30160051584243774, 0.8176680207252502, 0.039167799055576324, 0.06796573102474213, -0.3305319845676422, 0.10541525483131409, 0.18367543816566467, -0.10539771616458893, -0.04400593787431717, 0.05273828282952309, -0.31613850593566895, -0.137440487742424, 0.026580173522233963, -0.055686354637145996, 0.4730744957923889, -0.4407373368740082, 0.3485809564590454, 0.04691693186759949, 0.3959118127822876, -0.12656757235527039, 0.23346900939941406, 0.19052954018115997, 0.12814375758171082, -0.15017634630203247, 0.0895574614405632, -0.34990304708480835, 0.09662587940692902, 0.060488998889923096, -0.30201590061187744, -0.0989624634385109, -0.12326458841562271, -0.08569683134555817, 0.12039191275835037, 0.04271546006202698, 0.3616160750389099, 0.029958516359329224, -0.06614343822002411, 0.04789451137185097, 0.09816053509712219, -0.10541605949401855, 0.1261378675699234, -0.08190583437681198, -0.1535654067993164, 0.19321967661380768, 0.13972598314285278, -0.24613343179225922, -0.05195489898324013, -0.07115525007247925, -0.08343539386987686, -0.19910775125026703, 0.34624263644218445, 0.1320006251335144, -0.08131980895996094, -0.15922436118125916, -0.05245840549468994, 0.07709725946187973, -0.29198959469795227, -0.29797840118408203, 0.5363787412643433, 0.08958879113197327, -0.07240262627601624, 0.05676335468888283, 0.04461570456624031, -0.10539330542087555, 0.23490294814109802, 0.09379613399505615, -0.20180821418762207, -0.054494064301252365, 0.11763713508844376, 0.4531313180923462, 0.046837449073791504, 0.08286586403846741, -0.16549009084701538, 0.2697144150733948, -0.022248292341828346, 0.10739243775606155, 0.05328918993473053, -0.05764885991811752, 0.05454288050532341, -0.23324967920780182, 0.06948192417621613, 0.09103073179721832, 0.12022794783115387, 0.16066879034042358, 0.5604796409606934, 0.13232703506946564, -0.11575891077518463, -0.3453596830368042, 0.12372764945030212, 0.2395762801170349, 0.24707134068012238, -0.036574654281139374, 0.19851882755756378, -0.07935552299022675, 0.6873177886009216, -0.29691487550735474, 0.13182954490184784, 0.3975137770175934, 0.34264272451400757, 0.3198753297328949, 0.17962509393692017, -0.3751252293586731, -0.07419514656066895, 0.1279970109462738, -0.06545993685722351, -0.02951778471469879, -0.24207338690757751, -0.06778368353843689, 0.08260214328765869, 0.09089525789022446, 0.0578959658741951, -0.11341346055269241, -0.2265946865081787, 0.2689424157142639, -0.08601889759302139, 0.337649405002594, 0.010786440223455429, 0.05912527069449425, 0.04666919261217117, 0.14435343444347382, -0.2734318971633911, -0.43161678314208984, 0.34972599148750305, -0.020721249282360077, -0.08650091290473938, -0.03906206786632538, -0.010906394571065903, -0.02804102748632431, -0.125349223613739, -0.16890908777713776, -0.28587913513183594, 0.37225037813186646, 0.07131339609622955, 0.05683903768658638, 0.16907355189323425, 0.0196760855615139, 0.18266338109970093, -0.06164774298667908, -0.09133554995059967, -0.23691852390766144, 0.3942174017429352, -0.12189700454473495, 0.20069988071918488, -0.2924504578113556, -0.2348066121339798, 0.29317769408226013, -0.025979895144701004, 0.1450144499540329, -0.0636131539940834, 0.010319512337446213, 0.36020395159721375, -0.08894611895084381, 0.06619379669427872, 0.1304406225681305, 0.09126246720552444, 0.18414077162742615, 0.46650072932243347, 0.17803382873535156, -0.055087294429540634, 0.013652952387928963, 0.20357613265514374, 0.18642565608024597, -0.004827439785003662, -0.17009428143501282, 0.16117066144943237, 0.17105337977409363, -0.051001373678445816, 0.7275789976119995, -0.011687273159623146, -0.005789704620838165, 0.24974441528320312, -0.09122788906097412, 0.06941259652376175, 0.44474348425865173, 0.13906171917915344, 0.09929842501878738, -0.4390280544757843, 0.13377892971038818, 0.4352564215660095, 0.1393812596797943, -0.06998154520988464, -0.04233309626579285, -0.23992657661437988, -0.1427200436592102, 0.13668958842754364, 0.06974772363901138, -0.2833138108253479, 0.8152464628219604, 0.04318530112504959, 0.10117463767528534, 0.20259936153888702, 0.44243744015693665, 0.3067195415496826, 0.2169557362794876, 0.0006866827607154846, 0.007976923137903214, 0.20208914577960968, -0.42030957341194153, -0.06748397648334503, 0.34938615560531616, 0.026832785457372665, 0.18260274827480316, 0.004116781987249851, 0.31645867228507996, 0.06586955487728119, -0.18194235861301422, 0.11067087948322296, -0.15675652027130127, -0.0701434314250946, -0.34885019063949585, 0.0923333615064621, 0.21508212387561798, -0.07967440783977509, 0.04801630601286888, -0.3853045403957367, 0.14494967460632324, -0.36667177081108093, 0.1461026966571808, 0.08953768014907837, -0.3051273226737976, -0.04725930839776993, -0.13268119096755981, -0.17274750769138336, -0.64333575963974, 0.5588122606277466, 0.11138695478439331, -0.03298649936914444, -0.1104857549071312, 0.11036157608032227, -0.15955331921577454, 0.09113107621669769, 0.27933794260025024, -0.12911823391914368, -0.22310614585876465, -0.12688180804252625, -0.3720630705356598, 0.11552184075117111, 0.04549204558134079, -0.022808095440268517, -0.22744634747505188, 0.1429171860218048, 0.21882614493370056, 0.18879130482673645, 0.11715367436408997, -0.026593701913952827, 0.32924842834472656, 0.12654033303260803, -0.3300284445285797, -0.09876479208469391, 0.11611559242010117, 0.09715545177459717, 0.27599483728408813, -0.24988657236099243, 0.33985546231269836, 0.025644857436418533, 0.025994502007961273, -0.25971823930740356, 0.044050976634025574, 0.2548986077308655, -0.20906326174736023, 0.23958134651184082, 0.07023711502552032, 0.2490379363298416, -0.45707666873931885, 0.1363011598587036, 0.5659576058387756, 0.10625356435775757, -0.24467021226882935, 0.28060999512672424, 0.3050480782985687, -0.03165019303560257, -0.41824591159820557, 0.3034990727901459, 0.19393359124660492, -0.11936510354280472, -0.2073642760515213, -0.35726794600486755, -0.20853100717067719, 0.03877711296081543, -0.0009313039481639862, -0.010253372602164745, 0.033277347683906555, 0.3955826461315155, -0.015533871948719025, -0.051919132471084595, 0.1367720067501068, -0.13027150928974152, 0.35347962379455566, 0.13211964070796967, -0.23963245749473572, -0.13218803703784943, -0.288208931684494, 0.13608647882938385, -0.03683050721883774, -0.34843960404396057, -0.24284309148788452, 0.3459313213825226, -0.011685710400342941, 0.315153032541275, 0.2930341064929962, 0.023112177848815918, -0.09141983091831207, -0.20506241917610168, 0.19213008880615234, 0.13763344287872314, -0.21243205666542053, -0.12465780973434448, -0.2591709494590759 ]
https://github.com/huggingface/datasets/issues/1770
how can I combine 2 dataset with different/same features?
Hi! You can rename the columns and concatenate the datasets along `axis=1` to get the desired result as follows: ```python ds1 = ds1.rename_column("text", "src") ds2 = ds2.rename_column("text", "tgt") ds = datasets.concatenate_datasets(["ds1", "ds2"], axis=1) ```
to combine 2 dataset by one-one map like ds = zip(ds1, ds2): ds1: {'text'}, ds2: {'text'}, combine ds:{'src', 'tgt'} or different feature: ds1: {'src'}, ds2: {'tgt'}, combine ds:{'src', 'tgt'}
34
how can I combine 2 dataset with different/same features? to combine 2 dataset by one-one map like ds = zip(ds1, ds2): ds1: {'text'}, ds2: {'text'}, combine ds:{'src', 'tgt'} or different feature: ds1: {'src'}, ds2: {'tgt'}, combine ds:{'src', 'tgt'} Hi! You can rename the columns and concatenate the datasets along `axis=1` to get the desired result as follows: ```python ds1 = ds1.rename_column("text", "src") ds2 = ds2.rename_column("text", "tgt") ds = datasets.concatenate_datasets(["ds1", "ds2"], axis=1) ```
[ -0.24798782169818878, -0.36750876903533936, -0.07628348469734192, 0.053400926291942596, 0.13948461413383484, 0.4335918128490448, 0.1435433030128479, 0.2733103930950165, -0.0585884153842926, 0.001968696713447571, -0.28868046402931213, 0.5887385606765747, 0.05143192782998085, 0.6056705117225647, -0.04636882245540619, -0.26885923743247986, 0.09392524510622025, 0.19228288531303406, -0.5676836967468262, 0.17078375816345215, -0.04054349660873413, -0.07806556671857834, -0.1643228530883789, -0.10130506753921509, -0.05692581459879875, 0.3596765100955963, -0.25368884205818176, -0.33217230439186096, -0.09281982481479645, -0.05636058375239372, 0.27538245916366577, 0.22857938706874847, -0.05002059414982796, 0.17706188559532166, -0.0001096747801057063, 0.1502656191587448, 0.0008641667664051056, -0.07672052830457687, 0.14888688921928406, -0.43694138526916504, -0.11928913742303848, -0.69939124584198, -0.13417504727840424, -0.20683518052101135, -0.11715055257081985, -0.4107218384742737, -0.3374423384666443, -0.30683889985084534, 0.17472420632839203, -0.16232241690158844, 0.15572543442249298, -0.03221656754612923, 0.12862835824489594, -0.03774840384721756, 0.14788630604743958, 0.25882792472839355, -0.12430757284164429, -0.23128701746463776, 0.36688360571861267, -0.08094774931669235, 0.4902770221233368, 0.282783567905426, -0.0660114511847496, 0.013027847744524479, 0.21467015147209167, 0.19494003057479858, 0.0355764739215374, -0.23454684019088745, 0.017811082303524017, 0.27821284532546997, 0.5867189764976501, -0.2999629080295563, -0.20944291353225708, -0.03758065029978752, 0.10731185227632523, -0.09631391614675522, -0.2355409860610962, 0.2578921318054199, 0.05828408524394035, -0.02118513360619545, -0.3530742824077606, -0.27666401863098145, 0.12364751100540161, 0.16011524200439453, -0.14313539862632751, 0.3001478910446167, 0.10227299481630325, 0.27382487058639526, -0.23523466289043427, -0.24935214221477509, 0.3111567795276642, -0.3971347212791443, 0.08763428777456284, 0.3043211102485657, -0.41666004061698914, -0.29259437322616577, -0.2441577911376953, -0.459496408700943, 0.46927839517593384, 0.04577438160777092, -0.08328233659267426, -0.14429649710655212, -0.24764752388000488, 0.22982585430145264, 0.2095310091972351, 0.24703927338123322, 0.10286697745323181, 0.17360028624534607, -0.09497536718845367, -0.30401256680488586, -0.21033337712287903, -0.04761257767677307, 0.3648190498352051, -0.22329221665859222, 0.026643909513950348, -0.14779826998710632, 0.42551058530807495, -0.2259964495897293, 0.22145593166351318, -0.37618961930274963, -0.15698261559009552, -0.10983876138925552, -0.21699509024620056, -0.09844911843538284, 0.08752317726612091, 0.19291472434997559, -0.29634422063827515, 0.16555441915988922, 0.30891361832618713, -0.10992547869682312, -0.05741259455680847, -0.0035171471536159515, 0.042302895337343216, 0.07436426728963852, 0.012200716882944107, -0.134077787399292, 0.06026657670736313, 0.5613353252410889, -0.25076329708099365, 0.1432378888130188, 0.20282356441020966, -0.10297304391860962, 0.01388859748840332, -0.24164457619190216, 0.35789814591407776, 0.10372958332300186, 0.15005697309970856, 0.19660966098308563, -0.25716155767440796, 0.07829490303993225, -0.4137597680091858, -0.023541457951068878, -0.031384021043777466, 0.22050881385803223, -0.024736784398555756, -0.05486535280942917, -0.09590012580156326, 0.4026605486869812, -0.06994540244340897, -0.2582174837589264, -0.11624924093484879, 0.3564276695251465, -0.20727238059043884, -0.262462854385376, -0.07746367901563644, -0.13085778057575226, -0.2178191840648651, -0.2527499794960022, 0.06700883060693741, -0.0014867912977933884, -0.0993555560708046, 0.265522301197052, -0.25394541025161743, -0.045437224209308624, -0.19277648627758026, -0.07025842368602753, 0.57545405626297, -0.14144396781921387, -0.26159608364105225, 0.38145697116851807, -0.05955176055431366, 0.024243677034974098, -0.03252459317445755, 0.2634417712688446, 0.13105960190296173, 0.12521988153457642, 0.15395604074001312, 0.390987753868103, -0.17280621826648712, -0.11738405376672745, 0.035335052758455276, -0.4284524917602539, 0.5378299951553345, -0.13553205132484436, -0.027565691620111465, 0.07007629424333572, 0.02800634503364563, -0.5517649054527283, 0.28290724754333496, -0.028049658983945847, 0.22184062004089355, 0.09329445660114288, -0.07516959309577942, -0.015652313828468323, -0.07118512690067291, -0.33179381489753723, -0.3733099400997162, -0.042114097625017166, -0.005164094269275665, -0.13929548859596252, 0.06439758837223053, -0.4197760224342346, -0.08147072046995163, -0.41949358582496643, -0.0916847437620163, -0.00116000697016716, 0.11650964617729187, -0.0007300227880477905, 0.16969576478004456, -0.20670631527900696, -0.1662127673625946, 0.30537867546081543, 0.6173925399780273, 0.053882941603660583, -0.24591894447803497, 0.562593936920166, 0.19842536747455597, 0.06529247015714645, 0.03105930984020233, 0.15469956398010254, 0.21398496627807617, 0.16842813789844513, -0.020726287737488747, 0.012729573994874954, -0.49959656596183777, 0.21720094978809357, 0.3634508550167084, -0.17285995185375214, 0.057586975395679474, -0.20890384912490845, 0.18543165922164917, -0.0010799933224916458, 0.05419272556900978, -0.19197538495063782, -0.3068320155143738, 0.29243004322052, 0.08419481664896011, 0.3431759178638458, 0.0944051593542099, 0.18061459064483643, 0.14325714111328125, -0.20846538245677948, -0.040535178035497665, -0.13468427956104279, -0.04044194892048836, 0.10944987833499908, 0.19204288721084595, 0.324826717376709, -0.04811486601829529, 0.08628017455339432, 0.27784866094589233, 0.05089458450675011, -0.02982952445745468, -0.054319582879543304, -0.35784807801246643, 0.10885094851255417, 0.1473037749528885, 0.012583281844854355, 0.6043127775192261, 0.2899533808231354, -0.10169677436351776, 0.2671006917953491, 0.005383250769227743, 0.18451060354709625, -0.007971808314323425, 0.009277351200580597, -0.0561743788421154, 0.16483408212661743, 0.33214271068573, 0.13469703495502472, 0.10578582435846329, 0.09362448751926422, 0.16699782013893127, -0.08311454206705093, 0.05239708349108696, -0.28721585869789124, -0.25606924295425415, -0.14503860473632812, -0.2784518301486969, -0.13813811540603638, -0.22438794374465942, -0.1347193568944931, -0.1977611780166626, 0.10897128283977509, 0.14510656893253326, 0.13905875384807587, 0.1357438862323761, -0.0384393185377121, -0.1383044719696045, -0.16995753347873688, 0.028387397527694702, 0.16071279346942902, 0.25551122426986694, 0.16232001781463623, -0.009478586725890636, 0.16205620765686035, 0.2986873686313629, 0.07896070182323456, 0.06197540462017059, -0.5627436637878418, -0.30766797065734863, 0.0719042718410492, -0.25097960233688354, -0.04132620245218277, 0.03835619240999222, -0.008500754833221436, 0.021241553127765656, -0.1929742395877838, 0.2091408669948578, 0.4200664758682251, 0.014414364472031593, -0.10365630686283112, -0.02536824159324169, 0.010649528354406357, -0.14912700653076172, -0.33545181155204773, -0.35743069648742676, -0.1188589483499527, 0.197884202003479, -0.23477672040462494, 0.08657833933830261, -0.5420416593551636, 0.06470724940299988, -0.3465566337108612, 0.1598188579082489, -0.05418359488248825, -0.21618834137916565, -0.3506385385990143, 0.4292575418949127, -0.09561067074537277, -0.017443299293518066, -0.07493715733289719, -0.2106255292892456, 0.13824088871479034, 0.15504181385040283, -0.032752808183431625, -0.030550546944141388, -0.4142223596572876, 0.26294729113578796, -0.14431682229042053, 0.28565776348114014, 0.2279704064130783, 0.3026265799999237, 0.047105684876441956, 0.0815974548459053, -0.28119999170303345, -0.02027095854282379, 0.11546148359775543, 0.2437465786933899, 0.1344296634197235, 0.0689510926604271, -0.14021532237529755, 0.2901756167411804, 0.4406883418560028, 0.13675642013549805, 0.2915959060192108, 0.011434430256485939, 0.0916113406419754, 0.024148110300302505, -0.33732977509498596, -0.333217054605484, -0.052222803235054016, 0.25522005558013916, -0.14311477541923523, 0.09138898551464081, -0.014146199449896812, -0.38561105728149414, -0.11802317202091217, -0.06184966117143631, -0.11330154538154602, -0.05050814896821976, -0.04940522462129593, 0.10916037857532501, -0.0995863825082779, -0.2939487397670746, -0.4126041531562805, 0.08953462541103363, 0.13546229898929596, 0.20083977282047272, -0.0756848081946373, -0.02286834456026554, -0.4677334129810333, -0.19663821160793304, -0.15641391277313232, 0.1918262094259262, 0.1568121314048767, -0.20025552809238434, 0.24238933622837067, 0.08108031004667282, -0.3248063325881958, -0.043375164270401, 0.38457024097442627, -0.04884830117225647, -0.16691868007183075, -0.020703734830021858, -0.053977884352207184, -0.167169451713562, -0.2207358330488205, 0.191030353307724, -0.020593592897057533, -0.18851880729198456, 0.7558024525642395, -0.26179176568984985, -0.089584581553936, 0.24865207076072693, 0.3420107364654541, -0.0904262363910675, -0.30900561809539795, 0.2438853532075882, -0.12115539610385895, -0.2241399735212326, -0.5127704739570618, -0.1499868780374527, -0.050209760665893555, -0.14240510761737823, -0.3189057409763336, -0.2092617154121399, -0.19627144932746887, 0.42083001136779785, 0.15935972332954407, 0.1623552441596985, -0.019949698820710182, 0.3390267491340637, -0.016140688210725784, 0.09885326027870178, -0.21238276362419128, 0.6404815912246704, 0.09697069227695465, -0.5758488774299622, -0.3558084964752197, -0.1928330510854721, 0.48147037625312805, -0.23191845417022705, -0.033568475395441055, 0.5117271542549133, -0.6096247434616089, -0.033017322421073914, -0.08524000644683838, -0.05636199191212654, 0.21111886203289032, 0.2646785080432892, -0.46147608757019043, -0.29202908277511597, 0.5854941606521606, 0.49320751428604126, -0.20007821917533875, 0.38668325543403625, -0.3566220998764038, -0.140309676527977, 0.04791311174631119, -0.4572793245315552, 0.6782684922218323, -0.014039821922779083, 0.1696605682373047, -0.19548958539962769, 0.003785993903875351, 0.27881136536598206, -0.0018959008157253265, -0.0014653205871582031, -0.03707728534936905, -0.47125062346458435, -0.1941075176000595, -0.05135577172040939, 0.03067038580775261, 0.2664765417575836, -0.44960588216781616, 0.4602644145488739, -0.19041098654270172, 0.3339250981807709, -0.08960466086864471, 0.1578359752893448, 0.17159362137317657, -0.011040227487683296, -0.2576112449169159, 0.08867143094539642, -0.23615936934947968, 0.10420191287994385, 0.07020878791809082, -0.11312653869390488, -0.16645130515098572, -0.11032595485448837, -0.09832146018743515, 0.0700424388051033, 0.062488120049238205, 0.339605450630188, -0.01751711219549179, -0.1158028393983841, 0.08933956921100616, 0.1649477630853653, -0.0432267040014267, 0.16262002289295197, 0.032244425266981125, -0.14792129397392273, 0.2446424961090088, 0.1330372542142868, -0.20832452178001404, -0.08700759708881378, -0.12722532451152802, 0.05822830647230148, -0.2409840226173401, 0.3991171419620514, 0.26186051964759827, -0.032701894640922546, -0.2278582751750946, -0.04003244638442993, 0.1824142336845398, -0.39763593673706055, -0.31626659631729126, 0.42576467990875244, 0.18635043501853943, -0.1072055995464325, 0.06100775673985481, 0.001104407012462616, -0.16480454802513123, 0.3576173186302185, -0.024355489760637283, -0.19757027924060822, -0.07410067319869995, 0.1602810174226761, 0.43258845806121826, 0.053194962441921234, 0.09226708114147186, -0.1656929850578308, 0.24137701094150543, 0.025008097290992737, 0.0916915312409401, 0.033219024538993835, 0.09465975314378738, 0.008741247467696667, -0.11174924671649933, 0.12266455590724945, -0.05992851406335831, 0.03025093860924244, 0.07761552929878235, 0.4669858515262604, 0.14995655417442322, -0.14648310840129852, -0.3794407248497009, 0.1188846305012703, 0.27923583984375, 0.2564522922039032, -0.07841368019580841, 0.26643624901771545, -0.1720045804977417, 0.4755677878856659, -0.27253836393356323, 0.1723581850528717, 0.3227381110191345, 0.270194947719574, 0.35750147700309753, 0.12958386540412903, -0.2834271490573883, -0.09506542980670929, 0.20406407117843628, -0.06743579357862473, 0.03299155458807945, -0.25388583540916443, -0.15821507573127747, 0.03898055851459503, 0.05093469098210335, -0.08167575299739838, -0.10179794579744339, -0.1492505967617035, 0.235601007938385, -0.11595431715250015, 0.20667140185832977, 0.18020674586296082, 0.05069156363606453, 0.1166725903749466, -0.01200830563902855, -0.23196381330490112, -0.47930341958999634, 0.2314208298921585, -0.030476272106170654, -0.08907480537891388, 0.08652390539646149, 0.008235089480876923, -0.07505481690168381, -0.0487227700650692, -0.39540910720825195, -0.20643538236618042, 0.1827746331691742, 0.019097119569778442, 0.09988333284854889, 0.26433300971984863, 0.045325133949518204, 0.18945828080177307, 0.05573757737874985, 0.05247312784194946, -0.13349851965904236, 0.2742667496204376, 0.06128799915313721, 0.216949000954628, -0.3315567374229431, -0.18944428861141205, 0.25622451305389404, 0.06490746140480042, 0.1930544525384903, 0.07740450650453568, -0.08852948248386383, 0.2773929238319397, -0.2024862915277481, -0.06956768780946732, 0.13095325231552124, 0.20249328017234802, 0.2486678510904312, 0.6994519829750061, 0.2459070235490799, 0.0006652846932411194, 0.0009487289935350418, 0.17946110665798187, 0.03586488217115402, 0.020432278513908386, -0.20249614119529724, 0.12403339147567749, 0.17138856649398804, -0.06196201220154762, 0.4809606373310089, -0.003939695656299591, 0.00980997085571289, 0.17301391065120697, -0.18599197268486023, 0.086785688996315, 0.30606967210769653, 0.11569672077894211, 0.005726698320358992, -0.34770575165748596, 0.1277868002653122, 0.4313185513019562, 0.03992808237671852, -0.08930803835391998, 0.132651224732399, -0.17054100334644318, -0.22748109698295593, 0.14160732924938202, 0.15811112523078918, -0.38328850269317627, 0.8019646406173706, -0.037413567304611206, 0.12035401165485382, 0.11829040944576263, 0.45334747433662415, 0.322096049785614, 0.22461074590682983, 0.0045603252947330475, -0.08617749065160751, 0.24415311217308044, -0.2720927596092224, -0.02316080406308174, 0.19277486205101013, 0.14773991703987122, 0.12230504304170609, 0.031690310686826706, 0.18065166473388672, -0.016018401831388474, -0.13564802706241608, 0.15944354236125946, -0.26874876022338867, -0.07399632036685944, -0.17230939865112305, 0.09044460952281952, 0.2414740025997162, -0.11065461486577988, 0.06583219766616821, -0.3601928949356079, 0.14037752151489258, -0.5619555115699768, 0.2696976959705353, 0.149468332529068, -0.3671136200428009, -0.010088372975587845, -0.07437986880540848, -0.20299270749092102, -0.6320452094078064, 0.6009206771850586, 0.1943102478981018, -0.03467231243848801, -0.06826724112033844, 0.12566468119621277, -0.07763789594173431, 0.04412698745727539, 0.2958902418613434, -0.05584212392568588, -0.3943188488483429, -0.10355564206838608, -0.3857076168060303, -0.005100607872009277, -0.05063489452004433, -0.18161626160144806, -0.23671135306358337, 0.058885276317596436, 0.07129509747028351, 0.15968036651611328, 0.15276837348937988, 0.06421263515949249, 0.28114938735961914, 0.19769184291362762, -0.3689424395561218, -0.17076247930526733, 0.18269190192222595, 0.10949958115816116, 0.2297801673412323, -0.27700909972190857, 0.32702186703681946, 0.14571726322174072, 0.06760716438293457, -0.209518164396286, 0.12069819867610931, 0.19851179420948029, -0.2469111979007721, 0.3424091339111328, 0.06997313350439072, 0.35415980219841003, -0.2827461361885071, 0.08490867912769318, 0.43514344096183777, 0.12383229285478592, -0.21967792510986328, 0.23846450448036194, 0.16602729260921478, 0.010037418454885483, -0.4132896065711975, 0.3672897517681122, 0.14400804042816162, -0.10408675670623779, -0.08864554762840271, -0.30742278695106506, -0.11395911127328873, 0.2356315702199936, 0.16772082448005676, -0.020737946033477783, 0.011010252870619297, 0.47242528200149536, -0.03655943274497986, 0.08335715532302856, 0.19438906013965607, -0.28490594029426575, 0.3370060920715332, 0.16579146683216095, -0.35547956824302673, -0.19572801887989044, -0.2690757215023041, 0.0679982602596283, 0.07157254219055176, -0.3376253545284271, -0.21687743067741394, 0.3838372826576233, -0.07407858222723007, 0.3203023076057434, 0.27422454953193665, 0.03222453594207764, -0.04872492328286171, -0.12234671413898468, 0.151059091091156, 0.023805037140846252, -0.2833954989910126, -0.16511628031730652, -0.16492968797683716 ]
https://github.com/huggingface/datasets/issues/1769
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2
Hi ! What version of python and datasets do you have ? And also what version of dill and pickle ?
It may be a bug of multiprocessing with Datasets, when I disable the multiprocessing by set num_proc to None, everything works fine. The script I use is https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py Script args: ``` --model_name_or_path ../../../model/chinese-roberta-wwm-ext --train_file /nfs/volume-377-2/bert/data/test/train.txt --output_dir test --do_train --per_device_train_batch_size 2 --gradient_accumulation_steps 2 --learning_rate 1e-4 --max_steps 1000 --warmup_steps 10 --save_steps 1000 --save_total_limit 1 --seed 23333 --max_seq_length 512 --preprocessing_num_workers 2 --cache_dir /nfs/volume-377-2/bert/data/test/cache ``` Where the `/nfs/volume-377-2/bert/data/test/train.txt` is just a toy example with 10000 lines of random string, you should be able to reproduce this error esaily. Full Traceback: ``` Traceback (most recent call last): File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 398, in <module> main() File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 325, in main load_from_cache_file=not data_args.overwrite_cache, File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp> for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in map transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in <listcomp> transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get raise self._value File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 424, in _handle_tasks put(task) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/connection.py", line 209, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/reduction.py", line 54, in dumps cls(buf, protocol, *args, **kwds).dump(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump StockPickler.dump(self, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 409, in dump self.save(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function obj.__dict__, fkwdefaults), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell pickler.save_reduce(_create_cell, (f,), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 521, in save self.save_reduce(obj=obj, *rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 605, in save_reduce save(cls) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type obj.__bases__, _dict), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 507, in save self.save_global(obj, rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 927, in save_global (obj, module_name, name)) _pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union ```
21
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2 It may be a bug of multiprocessing with Datasets, when I disable the multiprocessing by set num_proc to None, everything works fine. The script I use is https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py Script args: ``` --model_name_or_path ../../../model/chinese-roberta-wwm-ext --train_file /nfs/volume-377-2/bert/data/test/train.txt --output_dir test --do_train --per_device_train_batch_size 2 --gradient_accumulation_steps 2 --learning_rate 1e-4 --max_steps 1000 --warmup_steps 10 --save_steps 1000 --save_total_limit 1 --seed 23333 --max_seq_length 512 --preprocessing_num_workers 2 --cache_dir /nfs/volume-377-2/bert/data/test/cache ``` Where the `/nfs/volume-377-2/bert/data/test/train.txt` is just a toy example with 10000 lines of random string, you should be able to reproduce this error esaily. Full Traceback: ``` Traceback (most recent call last): File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 398, in <module> main() File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 325, in main load_from_cache_file=not data_args.overwrite_cache, File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp> for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in map transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in <listcomp> transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get raise self._value File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 424, in _handle_tasks put(task) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/connection.py", line 209, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/reduction.py", line 54, in dumps cls(buf, protocol, *args, **kwds).dump(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump StockPickler.dump(self, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 409, in dump self.save(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function obj.__dict__, fkwdefaults), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell pickler.save_reduce(_create_cell, (f,), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 521, in save self.save_reduce(obj=obj, *rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 605, in save_reduce save(cls) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type obj.__bases__, _dict), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 507, in save self.save_global(obj, rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 927, in save_global (obj, module_name, name)) _pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union ``` Hi ! What version of python and datasets do you have ? And also what version of dill and pickle ?
[ -0.29035988450050354, -0.29742854833602905, 0.11324463784694672, 0.1903708577156067, 0.16615837812423706, -0.05220987647771835, 0.33211368322372437, 0.2303631752729416, 0.2993960380554199, 0.2801509499549866, 0.016717011108994484, 0.3376862108707428, -0.11104438453912735, 0.21741469204425812, 0.004183185286819935, -0.1060650646686554, -0.11580229550600052, -0.1348114162683487, -0.3830089271068573, 0.010605253279209137, -0.29227977991104126, 0.3295297920703888, -0.3364184498786926, 0.17858117818832397, -0.6447757482528687, -0.09804932028055191, -0.04807302728295326, 0.29142558574676514, 0.08679615706205368, -0.08384117484092712, 0.09129659831523895, -0.03556618466973305, 0.012487141415476799, 0.4959757626056671, -0.00011002033716067672, 0.04339580982923508, 0.20303748548030853, -0.0829198956489563, -0.06672526895999908, -0.4173736572265625, 0.07137774676084518, -0.039012208580970764, 0.07075808942317963, -0.05480719357728958, 0.15044891834259033, 0.17994914948940277, 0.14069055020809174, -0.08047087490558624, 0.2613464593887329, 0.11551473289728165, 0.19440853595733643, 0.5662000179290771, 0.11443623900413513, -0.07613573223352432, -0.12526077032089233, 0.21574872732162476, -0.032217707484960556, 0.2660857141017914, 0.1158294752240181, -0.16647496819496155, -0.2567044198513031, 0.20814406871795654, -0.009197043254971504, 0.2851702570915222, -0.1553528606891632, 0.3262346684932709, 0.09002915769815445, -0.2589208483695984, 0.12840475142002106, 0.3979732096195221, 0.07846380770206451, -0.23205670714378357, -0.3231729567050934, -0.06802269071340561, -0.08543617278337479, -0.17135797441005707, 0.08775389939546585, 0.16609035432338715, -0.11769464612007141, 0.08516857028007507, -0.20291762053966522, 0.13196945190429688, 0.2207043170928955, 0.10398489236831665, 0.23207509517669678, 0.3622323274612427, -0.03134253993630409, 0.3686205744743347, 0.27956894040107727, -0.13734081387519836, -0.20739266276359558, -0.18688929080963135, 0.07207056879997253, 0.06321807950735092, -0.04581909999251366, -0.14083808660507202, 0.04550828039646149, -0.09475681930780411, 0.07365622371435165, -0.17858265340328217, -0.17664682865142822, 0.17129755020141602, -0.23897574841976166, 0.31937527656555176, 0.3000180721282959, -0.1272132247686386, -0.09902740269899368, 0.20270361006259918, 0.4027116298675537, -0.07397273182868958, -0.22513192892074585, 0.11599527299404144, 0.3312569856643677, -0.34479600191116333, -0.10419459640979767, 0.15643340349197388, 0.3292238116264343, -0.11150819063186646, -0.1496976763010025, -0.1945514976978302, -0.1339908242225647, -0.17258445918560028, -0.010302131064236164, 0.29037466645240784, 0.05927511677145958, 0.3461208939552307, 0.05660779029130936, 0.18780355155467987, -0.5467140674591064, -0.08292872458696365, -0.3398102819919586, 0.21892689168453217, -0.191693976521492, 0.06260749697685242, 0.22208385169506073, 0.26731446385383606, 0.3550156056880951, 0.19947050511837006, -0.03712645173072815, -0.15230974555015564, 0.23511961102485657, -0.24940359592437744, -0.1287895143032074, 0.19256238639354706, 0.16525524854660034, 0.2886994481086731, 0.2680860161781311, -0.3080253601074219, -0.06359388679265976, 0.0783037468791008, -0.23705458641052246, -0.2890685796737671, -0.07295642048120499, 0.1396498680114746, -0.014291052706539631, 0.12578900158405304, -0.16990932822227478, 0.04475625231862068, 0.4315927028656006, -0.04975900426506996, -0.18824419379234314, -0.2977280020713806, -0.3939252197742462, -0.22074954211711884, -0.037848860025405884, 0.3762210011482239, -0.23416639864444733, -0.15204045176506042, 0.1977582722902298, -0.12353742122650146, 0.5048830509185791, 0.5401948690414429, -0.24759303033351898, -0.08227688819169998, -0.14923283457756042, 0.6606730818748474, 0.03607068210840225, 0.10968554019927979, -0.257219135761261, 0.20260849595069885, -0.09889504313468933, -0.11149927973747253, -0.08419325202703476, 0.0370497852563858, -0.357283353805542, -0.03266773372888565, 0.4061434864997864, 0.135124072432518, 0.05737414211034775, 0.19235658645629883, -0.27117177844047546, -0.3141670227050781, 0.16975271701812744, -0.05447717383503914, 0.06852944195270538, -0.2757890522480011, -0.12620097398757935, -0.08963199704885483, 0.43805500864982605, -0.22410744428634644, 0.07926023006439209, -0.0038885287940502167, 0.1627582460641861, -0.051541417837142944, -0.020110514014959335, -0.2338375449180603, -0.5796087384223938, 0.2878187596797943, -0.22332896292209625, 0.2118988186120987, -0.0640440434217453, -0.13443559408187866, 0.27680695056915283, -0.016979198902845383, -0.32596874237060547, -0.06861788034439087, 0.07566042989492416, 0.07221803069114685, 0.050903622061014175, -0.1822730004787445, -0.08427812159061432, -0.11655829101800919, -0.10495290160179138, -0.014996930956840515, -0.4686061143875122, 0.042573049664497375, -0.40373265743255615, -0.4181519150733948, -0.18951672315597534, 0.20762485265731812, 0.10675127804279327, -0.006862481124699116, -0.11716929823160172, 0.1369662880897522, 0.15026158094406128, -0.04611063003540039, -0.049514248967170715, 0.05626586824655533, -0.019086671993136406, -0.09612861275672913, 0.021798888221383095, 0.21985702216625214, 0.1103200763463974, -0.17809394001960754, -0.2147069275379181, 0.4751461148262024, 0.02840726636350155, 0.2698740065097809, 0.04167763143777847, 0.09579966962337494, 0.22422856092453003, 0.041359443217515945, 0.13225500285625458, -0.17092782258987427, 0.16770927608013153, 0.17140616476535797, 0.16703197360038757, 0.09132006019353867, -0.23927128314971924, 0.039523642510175705, 0.5964309573173523, 0.20254893600940704, 0.411984920501709, 0.00813138484954834, -0.20590680837631226, -0.13738876581192017, -0.1942451298236847, 0.032579947263002396, 0.6064071655273438, 0.16130071878433228, 0.06438565999269485, 0.0018839072436094284, -0.1250704675912857, -0.11863648891448975, 0.012186408042907715, -0.015713028609752655, 0.038367900997400284, 0.1391061395406723, 0.11017736047506332, -0.07655670493841171, -0.3033144474029541, -0.10311830043792725, 0.010304529219865799, 0.31846773624420166, -0.3177986741065979, 0.014538271352648735, -0.3326050043106079, 0.4729810059070587, -0.23474952578544617, 0.009745932184159756, -0.19180381298065186, -0.2922731637954712, -0.17370282113552094, 0.368852436542511, -0.22110958397388458, 0.15469013154506683, 0.1278081089258194, -0.20746202766895294, -0.10400643944740295, 0.23589107394218445, 0.07289454340934753, -0.077144093811512, -0.2809189558029175, -0.0019135605543851852, 0.404887318611145, -0.04306706041097641, 0.04712362587451935, 0.153612419962883, -0.258625328540802, -0.055386438965797424, -0.13959835469722748, 0.07913260161876678, -0.07616877555847168, 0.22843551635742188, 0.2975741922855377, 0.25313007831573486, -0.020326480269432068, -0.3027893900871277, 0.27819862961769104, -0.29911717772483826, -0.19056324660778046, -0.04216393083333969, 0.07795364409685135, -0.11819041520357132, -0.36454999446868896, -0.39522355794906616, -0.45918968319892883, -0.3345876932144165, 0.406663715839386, -0.059952206909656525, 0.1627807915210724, 0.284171462059021, 0.1749650239944458, 0.25119295716285706, 0.12706640362739563, -0.17673245072364807, -0.2883632779121399, 0.1619478315114975, 0.2229670286178589, 0.018643071874976158, -0.2608916461467743, -0.048884034156799316, -0.16836228966712952, -0.041167002171278, -0.20991821587085724, -0.16195380687713623, 0.06790805608034134, -0.4185371696949005, 0.2506229281425476, 0.10129597783088684, 0.2987333834171295, 0.6218910217285156, 0.2733475863933563, -0.15714490413665771, -0.04585849866271019, -0.26764315366744995, 0.17666825652122498, 0.20726892352104187, 0.2516292333602905, -0.004412570968270302, 0.199446439743042, -0.009049002081155777, 0.7935599684715271, 0.2588755488395691, -0.2274363785982132, 0.27470719814300537, 0.0024314820766448975, -0.1775771677494049, -0.08380734175443649, -0.15732981264591217, -0.06351976096630096, -0.3232713043689728, 0.10696811974048615, 0.22163257002830505, -0.1139477863907814, -0.17900842428207397, 0.05172190070152283, 0.15031418204307556, -0.09146226197481155, -0.29321038722991943, 0.49177801609039307, 0.20861618220806122, -0.10759872943162918, 0.057408612221479416, -0.056631363928318024, -0.1271752268075943, 0.040572550147771835, -0.08755916357040405, 0.014340884983539581, 0.011016272008419037, -0.10770050436258316, -0.17657534778118134, -0.20577472448349, -0.5075409412384033, 0.5035909414291382, 0.12886817753314972, 0.30688825249671936, -0.10782226920127869, -0.209570050239563, -0.06163319945335388, -0.08288540691137314, 0.8502635955810547, -0.3850913345813751, 0.010037861764431, 0.11936990916728973, -0.23916326463222504, -0.25144192576408386, -0.23703879117965698, -0.27663275599479675, 0.3788056969642639, 0.32120949029922485, 0.49166277050971985, -0.23725897073745728, -0.10248976200819016, 0.3546546399593353, 0.017388083040714264, -0.1381925791501999, -0.3041337728500366, -0.3489312529563904, -0.24448198080062866, -0.4569973349571228, -0.07686228305101395, 0.22369427978992462, 0.14624492824077606, -0.1781129539012909, 0.0569177083671093, -0.003195466473698616, -0.2490135133266449, 0.24928206205368042, 0.025196798145771027, 0.15518024563789368, 0.20632779598236084, 0.006600815802812576, -0.0015957541763782501, 0.22424918413162231, -0.1629244089126587, 0.2497967630624771, -0.16911005973815918, 0.007037840783596039, 0.2945016622543335, -0.25296735763549805, 0.30812308192253113, 0.1772136688232422, 0.05884663015604019, 0.32148993015289307, 0.218517005443573, 0.3157065212726593, -0.07874762266874313, 0.11289656907320023, 0.3214440643787384, 0.2550255358219147, -0.15212276577949524, -0.2701738178730011, 0.576370120048523, 0.20699146389961243, 0.0711066722869873, 0.2796465754508972, -0.28950798511505127, -0.20012295246124268, 0.19523917138576508, -0.08531088382005692, 0.8592368960380554, -0.033453911542892456, 0.13657481968402863, 0.10396303981542587, 0.04014197736978531, 0.3963150978088379, 0.18848717212677002, 0.14579987525939941, -0.42859143018722534, 0.019972342997789383, 0.006362868472933769, -0.1561584770679474, 0.06997939944267273, 0.19501416385173798, -0.47181081771850586, 0.39893829822540283, -0.1540239453315735, -0.1372062861919403, -0.02096850983798504, 0.260549396276474, 0.04448864609003067, -0.26747241616249084, 0.09877441823482513, 0.1068306714296341, -0.09737253189086914, 0.25099772214889526, 0.0981690064072609, -0.015407631173729897, 0.07682664692401886, -0.30664342641830444, -0.3827332854270935, 0.11944525688886642, -0.21196630597114563, 0.5681124329566956, 0.26543089747428894, 0.1176435649394989, 0.3349751830101013, 0.14744259417057037, 0.004298634827136993, 0.12446585297584534, -0.1284875124692917, -0.013692878186702728, 0.03005019947886467, 0.12238354235887527, -0.21383264660835266, -0.01973160356283188, 0.21937881410121918, 0.0380546972155571, -0.3936789929866791, -0.161359041929245, -0.08267227560281754, 0.06409469246864319, -0.1460667997598648, 0.02843397483229637, 0.023978829383850098, -0.2233826220035553, -0.467312216758728, 0.06059475243091583, -0.3597424328327179, -0.23938924074172974, 0.10978478193283081, -0.02514035254716873, -0.42065930366516113, 0.23207172751426697, 0.09840649366378784, -0.2648565173149109, 0.09744822978973389, 0.46542346477508545, 0.14275693893432617, 0.3938292860984802, 0.6578112840652466, 0.4816330075263977, -0.16191449761390686, -0.2177281379699707, -0.13783392310142517, 0.2559017837047577, -0.5192019939422607, 0.26362496614456177, 0.1261708289384842, -0.15654297173023224, -0.024752264842391014, 0.36673226952552795, 0.04229229316115379, 0.2563845217227936, -0.22223573923110962, -0.2846604287624359, -0.4323420226573944, 0.041218724101781845, -0.012455698102712631, 0.15849049389362335, 0.03773318976163864, 0.43920910358428955, 0.07252248376607895, 0.3446766436100006, -0.316602885723114, 0.10158933699131012, -0.45925477147102356, 0.1270507127046585, 0.08695462346076965, -0.38849958777427673, 0.007180670276284218, 0.10283879935741425, 0.1086365133523941, 0.3089998960494995, -0.2994246184825897, -0.23484715819358826, -0.22640249133110046, 0.07228917628526688, -0.06925509870052338, -0.05940146744251251, 0.2124273180961609, 0.22667671740055084, -0.032950691878795624, -0.17607340216636658, -0.007587152533233166, 0.05211813747882843, -0.010445758700370789, 0.14747929573059082, 0.2194545716047287, 0.019566811621189117, -0.11889582127332687, 0.004781438037753105, -0.24073901772499084, 0.03029610961675644, 0.14272738993167877, 0.012420576065778732, 0.14593806862831116, 0.06743402779102325, -0.13457943499088287, -0.17718088626861572, 0.08095484226942062, 0.13594508171081543, -0.19076508283615112, -0.3552045226097107, -0.2111646682024002, -0.19629602134227753, 0.2878010869026184, 0.17502155900001526, -0.13388140499591827, 0.04253017157316208, 0.07110705971717834, 0.22949418425559998, -0.3894517123699188, 0.10096021741628647, 0.31593483686447144, -0.08129800111055374, 0.2417638599872589, 0.23468133807182312, -0.10673336684703827, 0.1655508279800415, -0.2935245633125305, 0.12670865654945374, 0.002271858975291252, -0.4911996126174927, -0.009272734634578228, 0.09050840139389038, -0.12721233069896698, 0.13931593298912048, 0.39812254905700684, -0.043810296803712845, 0.21800875663757324, 0.17342984676361084, -0.029528379440307617, 0.28618621826171875, -0.33719462156295776, 0.16034920513629913, 0.04284494370222092, -0.6167396903038025, 0.22295182943344116, 0.30427107214927673, -0.15452790260314941, 0.2104465365409851, -0.030724599957466125, 0.3675805628299713, -0.5919659733772278, -0.19598546624183655, -0.08513791859149933, 0.2790285646915436, -0.39774227142333984, -0.41982680559158325, -0.03246597945690155, -0.05472415313124657, -0.21798038482666016, 0.057403456419706345, -0.07103101909160614, 0.1367313265800476, 0.3471324145793915, 0.021595973521471024, -0.14455565810203552, -0.3487924337387085, -0.1260673999786377, -0.012696027755737305, 0.1340656578540802, -0.29569241404533386, 0.06823591887950897, 0.27491575479507446, -0.04596306383609772, -0.5047227144241333, 0.22283653914928436, 0.5591913461685181, 0.39883482456207275, -0.369215726852417, 0.0725749135017395, -0.03959443420171738, 0.06188582628965378, -0.1044696718454361, 0.07688165456056595, 0.09609339386224747, 0.14917074143886566, 0.22303107380867004, 0.11659787595272064, -0.2096037119626999, -0.08218875527381897, 0.12267906963825226, 0.3338048458099365, 0.05177901312708855, 0.4257691502571106, -0.09363196790218353, -0.2233307659626007, -0.04718806594610214, 0.13819637894630432, -0.41848528385162354, 0.21530532836914062, 0.5088750720024109, -0.2176356017589569, 0.2733810544013977, -0.03912579268217087, 0.09814470261335373, -0.0012671556323766708, 0.6340998411178589, 0.14958971738815308, 0.023732367902994156, -0.4357895851135254, 0.24684424698352814, -0.5064622759819031, 0.034147895872592926, -0.26108306646347046, 0.14380638301372528, -0.37084874510765076, 0.34766125679016113, 0.12029369920492172, -0.06318666785955429, -0.009628310799598694, 0.3259032070636749, 0.2164502590894699, 0.35385242104530334, -0.3152369260787964, -0.15420208871364594, -0.27257996797561646, -0.2114034742116928, 0.30934345722198486, -0.43705710768699646, 0.012966040521860123, 0.16912345588207245, 0.05201837420463562, -0.3621640205383301, 0.03534306585788727, 0.00555531308054924, 0.15972867608070374, -0.008219584822654724, 0.25785499811172485, 0.48936495184898376, -0.2150481939315796, -0.014704947359859943, -0.09395833313465118, -0.03487445041537285, -0.16505420207977295, 0.02458692342042923, 0.09823665022850037, 0.5375679731369019, -0.23324424028396606, 0.3349669277667999, -0.4291655719280243, 0.1068597286939621, 0.001759592443704605, 0.07302286475896835, -0.11257284879684448, 0.18445710837841034, 0.1445150375366211, 0.015393193811178207, 0.004369928501546383, 0.3746371567249298, 0.012435335665941238, -0.05912364274263382, -0.19601909816265106, -0.283449649810791, 0.6401265859603882, -0.29230043292045593, -0.45399266481399536, -0.42327508330345154, 0.15188848972320557, -0.22872957587242126, -0.07128709554672241, -0.5009866952896118, 0.04145032912492752, 0.13671059906482697, -0.024166814982891083, -0.45826831459999084, 0.2389630526304245, 0.012207780964672565, -0.21941018104553223, -0.0912206768989563, 0.3244309425354004, 0.1423427313566208, -0.29269152879714966, 0.15418395400047302, -0.34222424030303955 ]
https://github.com/huggingface/datasets/issues/1769
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2
> Hi ! What version of python and datasets do you have ? And also what version of dill and pickle ? python==3.6.10 datasets==1.2.1 dill==0.3.2 pickle.format_version==4.0
It may be a bug of multiprocessing with Datasets, when I disable the multiprocessing by set num_proc to None, everything works fine. The script I use is https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py Script args: ``` --model_name_or_path ../../../model/chinese-roberta-wwm-ext --train_file /nfs/volume-377-2/bert/data/test/train.txt --output_dir test --do_train --per_device_train_batch_size 2 --gradient_accumulation_steps 2 --learning_rate 1e-4 --max_steps 1000 --warmup_steps 10 --save_steps 1000 --save_total_limit 1 --seed 23333 --max_seq_length 512 --preprocessing_num_workers 2 --cache_dir /nfs/volume-377-2/bert/data/test/cache ``` Where the `/nfs/volume-377-2/bert/data/test/train.txt` is just a toy example with 10000 lines of random string, you should be able to reproduce this error esaily. Full Traceback: ``` Traceback (most recent call last): File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 398, in <module> main() File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 325, in main load_from_cache_file=not data_args.overwrite_cache, File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp> for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in map transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in <listcomp> transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get raise self._value File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 424, in _handle_tasks put(task) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/connection.py", line 209, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/reduction.py", line 54, in dumps cls(buf, protocol, *args, **kwds).dump(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump StockPickler.dump(self, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 409, in dump self.save(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function obj.__dict__, fkwdefaults), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell pickler.save_reduce(_create_cell, (f,), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 521, in save self.save_reduce(obj=obj, *rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 605, in save_reduce save(cls) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type obj.__bases__, _dict), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 507, in save self.save_global(obj, rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 927, in save_global (obj, module_name, name)) _pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union ```
26
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2 It may be a bug of multiprocessing with Datasets, when I disable the multiprocessing by set num_proc to None, everything works fine. The script I use is https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py Script args: ``` --model_name_or_path ../../../model/chinese-roberta-wwm-ext --train_file /nfs/volume-377-2/bert/data/test/train.txt --output_dir test --do_train --per_device_train_batch_size 2 --gradient_accumulation_steps 2 --learning_rate 1e-4 --max_steps 1000 --warmup_steps 10 --save_steps 1000 --save_total_limit 1 --seed 23333 --max_seq_length 512 --preprocessing_num_workers 2 --cache_dir /nfs/volume-377-2/bert/data/test/cache ``` Where the `/nfs/volume-377-2/bert/data/test/train.txt` is just a toy example with 10000 lines of random string, you should be able to reproduce this error esaily. Full Traceback: ``` Traceback (most recent call last): File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 398, in <module> main() File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 325, in main load_from_cache_file=not data_args.overwrite_cache, File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp> for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in map transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in <listcomp> transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get raise self._value File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 424, in _handle_tasks put(task) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/connection.py", line 209, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/reduction.py", line 54, in dumps cls(buf, protocol, *args, **kwds).dump(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump StockPickler.dump(self, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 409, in dump self.save(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function obj.__dict__, fkwdefaults), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell pickler.save_reduce(_create_cell, (f,), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 521, in save self.save_reduce(obj=obj, *rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 605, in save_reduce save(cls) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type obj.__bases__, _dict), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 507, in save self.save_global(obj, rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 927, in save_global (obj, module_name, name)) _pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union ``` > Hi ! What version of python and datasets do you have ? And also what version of dill and pickle ? python==3.6.10 datasets==1.2.1 dill==0.3.2 pickle.format_version==4.0
[ -0.29035988450050354, -0.29742854833602905, 0.11324463784694672, 0.1903708577156067, 0.16615837812423706, -0.05220987647771835, 0.33211368322372437, 0.2303631752729416, 0.2993960380554199, 0.2801509499549866, 0.016717011108994484, 0.3376862108707428, -0.11104438453912735, 0.21741469204425812, 0.004183185286819935, -0.1060650646686554, -0.11580229550600052, -0.1348114162683487, -0.3830089271068573, 0.010605253279209137, -0.29227977991104126, 0.3295297920703888, -0.3364184498786926, 0.17858117818832397, -0.6447757482528687, -0.09804932028055191, -0.04807302728295326, 0.29142558574676514, 0.08679615706205368, -0.08384117484092712, 0.09129659831523895, -0.03556618466973305, 0.012487141415476799, 0.4959757626056671, -0.00011002033716067672, 0.04339580982923508, 0.20303748548030853, -0.0829198956489563, -0.06672526895999908, -0.4173736572265625, 0.07137774676084518, -0.039012208580970764, 0.07075808942317963, -0.05480719357728958, 0.15044891834259033, 0.17994914948940277, 0.14069055020809174, -0.08047087490558624, 0.2613464593887329, 0.11551473289728165, 0.19440853595733643, 0.5662000179290771, 0.11443623900413513, -0.07613573223352432, -0.12526077032089233, 0.21574872732162476, -0.032217707484960556, 0.2660857141017914, 0.1158294752240181, -0.16647496819496155, -0.2567044198513031, 0.20814406871795654, -0.009197043254971504, 0.2851702570915222, -0.1553528606891632, 0.3262346684932709, 0.09002915769815445, -0.2589208483695984, 0.12840475142002106, 0.3979732096195221, 0.07846380770206451, -0.23205670714378357, -0.3231729567050934, -0.06802269071340561, -0.08543617278337479, -0.17135797441005707, 0.08775389939546585, 0.16609035432338715, -0.11769464612007141, 0.08516857028007507, -0.20291762053966522, 0.13196945190429688, 0.2207043170928955, 0.10398489236831665, 0.23207509517669678, 0.3622323274612427, -0.03134253993630409, 0.3686205744743347, 0.27956894040107727, -0.13734081387519836, -0.20739266276359558, -0.18688929080963135, 0.07207056879997253, 0.06321807950735092, -0.04581909999251366, -0.14083808660507202, 0.04550828039646149, -0.09475681930780411, 0.07365622371435165, -0.17858265340328217, -0.17664682865142822, 0.17129755020141602, -0.23897574841976166, 0.31937527656555176, 0.3000180721282959, -0.1272132247686386, -0.09902740269899368, 0.20270361006259918, 0.4027116298675537, -0.07397273182868958, -0.22513192892074585, 0.11599527299404144, 0.3312569856643677, -0.34479600191116333, -0.10419459640979767, 0.15643340349197388, 0.3292238116264343, -0.11150819063186646, -0.1496976763010025, -0.1945514976978302, -0.1339908242225647, -0.17258445918560028, -0.010302131064236164, 0.29037466645240784, 0.05927511677145958, 0.3461208939552307, 0.05660779029130936, 0.18780355155467987, -0.5467140674591064, -0.08292872458696365, -0.3398102819919586, 0.21892689168453217, -0.191693976521492, 0.06260749697685242, 0.22208385169506073, 0.26731446385383606, 0.3550156056880951, 0.19947050511837006, -0.03712645173072815, -0.15230974555015564, 0.23511961102485657, -0.24940359592437744, -0.1287895143032074, 0.19256238639354706, 0.16525524854660034, 0.2886994481086731, 0.2680860161781311, -0.3080253601074219, -0.06359388679265976, 0.0783037468791008, -0.23705458641052246, -0.2890685796737671, -0.07295642048120499, 0.1396498680114746, -0.014291052706539631, 0.12578900158405304, -0.16990932822227478, 0.04475625231862068, 0.4315927028656006, -0.04975900426506996, -0.18824419379234314, -0.2977280020713806, -0.3939252197742462, -0.22074954211711884, -0.037848860025405884, 0.3762210011482239, -0.23416639864444733, -0.15204045176506042, 0.1977582722902298, -0.12353742122650146, 0.5048830509185791, 0.5401948690414429, -0.24759303033351898, -0.08227688819169998, -0.14923283457756042, 0.6606730818748474, 0.03607068210840225, 0.10968554019927979, -0.257219135761261, 0.20260849595069885, -0.09889504313468933, -0.11149927973747253, -0.08419325202703476, 0.0370497852563858, -0.357283353805542, -0.03266773372888565, 0.4061434864997864, 0.135124072432518, 0.05737414211034775, 0.19235658645629883, -0.27117177844047546, -0.3141670227050781, 0.16975271701812744, -0.05447717383503914, 0.06852944195270538, -0.2757890522480011, -0.12620097398757935, -0.08963199704885483, 0.43805500864982605, -0.22410744428634644, 0.07926023006439209, -0.0038885287940502167, 0.1627582460641861, -0.051541417837142944, -0.020110514014959335, -0.2338375449180603, -0.5796087384223938, 0.2878187596797943, -0.22332896292209625, 0.2118988186120987, -0.0640440434217453, -0.13443559408187866, 0.27680695056915283, -0.016979198902845383, -0.32596874237060547, -0.06861788034439087, 0.07566042989492416, 0.07221803069114685, 0.050903622061014175, -0.1822730004787445, -0.08427812159061432, -0.11655829101800919, -0.10495290160179138, -0.014996930956840515, -0.4686061143875122, 0.042573049664497375, -0.40373265743255615, -0.4181519150733948, -0.18951672315597534, 0.20762485265731812, 0.10675127804279327, -0.006862481124699116, -0.11716929823160172, 0.1369662880897522, 0.15026158094406128, -0.04611063003540039, -0.049514248967170715, 0.05626586824655533, -0.019086671993136406, -0.09612861275672913, 0.021798888221383095, 0.21985702216625214, 0.1103200763463974, -0.17809394001960754, -0.2147069275379181, 0.4751461148262024, 0.02840726636350155, 0.2698740065097809, 0.04167763143777847, 0.09579966962337494, 0.22422856092453003, 0.041359443217515945, 0.13225500285625458, -0.17092782258987427, 0.16770927608013153, 0.17140616476535797, 0.16703197360038757, 0.09132006019353867, -0.23927128314971924, 0.039523642510175705, 0.5964309573173523, 0.20254893600940704, 0.411984920501709, 0.00813138484954834, -0.20590680837631226, -0.13738876581192017, -0.1942451298236847, 0.032579947263002396, 0.6064071655273438, 0.16130071878433228, 0.06438565999269485, 0.0018839072436094284, -0.1250704675912857, -0.11863648891448975, 0.012186408042907715, -0.015713028609752655, 0.038367900997400284, 0.1391061395406723, 0.11017736047506332, -0.07655670493841171, -0.3033144474029541, -0.10311830043792725, 0.010304529219865799, 0.31846773624420166, -0.3177986741065979, 0.014538271352648735, -0.3326050043106079, 0.4729810059070587, -0.23474952578544617, 0.009745932184159756, -0.19180381298065186, -0.2922731637954712, -0.17370282113552094, 0.368852436542511, -0.22110958397388458, 0.15469013154506683, 0.1278081089258194, -0.20746202766895294, -0.10400643944740295, 0.23589107394218445, 0.07289454340934753, -0.077144093811512, -0.2809189558029175, -0.0019135605543851852, 0.404887318611145, -0.04306706041097641, 0.04712362587451935, 0.153612419962883, -0.258625328540802, -0.055386438965797424, -0.13959835469722748, 0.07913260161876678, -0.07616877555847168, 0.22843551635742188, 0.2975741922855377, 0.25313007831573486, -0.020326480269432068, -0.3027893900871277, 0.27819862961769104, -0.29911717772483826, -0.19056324660778046, -0.04216393083333969, 0.07795364409685135, -0.11819041520357132, -0.36454999446868896, -0.39522355794906616, -0.45918968319892883, -0.3345876932144165, 0.406663715839386, -0.059952206909656525, 0.1627807915210724, 0.284171462059021, 0.1749650239944458, 0.25119295716285706, 0.12706640362739563, -0.17673245072364807, -0.2883632779121399, 0.1619478315114975, 0.2229670286178589, 0.018643071874976158, -0.2608916461467743, -0.048884034156799316, -0.16836228966712952, -0.041167002171278, -0.20991821587085724, -0.16195380687713623, 0.06790805608034134, -0.4185371696949005, 0.2506229281425476, 0.10129597783088684, 0.2987333834171295, 0.6218910217285156, 0.2733475863933563, -0.15714490413665771, -0.04585849866271019, -0.26764315366744995, 0.17666825652122498, 0.20726892352104187, 0.2516292333602905, -0.004412570968270302, 0.199446439743042, -0.009049002081155777, 0.7935599684715271, 0.2588755488395691, -0.2274363785982132, 0.27470719814300537, 0.0024314820766448975, -0.1775771677494049, -0.08380734175443649, -0.15732981264591217, -0.06351976096630096, -0.3232713043689728, 0.10696811974048615, 0.22163257002830505, -0.1139477863907814, -0.17900842428207397, 0.05172190070152283, 0.15031418204307556, -0.09146226197481155, -0.29321038722991943, 0.49177801609039307, 0.20861618220806122, -0.10759872943162918, 0.057408612221479416, -0.056631363928318024, -0.1271752268075943, 0.040572550147771835, -0.08755916357040405, 0.014340884983539581, 0.011016272008419037, -0.10770050436258316, -0.17657534778118134, -0.20577472448349, -0.5075409412384033, 0.5035909414291382, 0.12886817753314972, 0.30688825249671936, -0.10782226920127869, -0.209570050239563, -0.06163319945335388, -0.08288540691137314, 0.8502635955810547, -0.3850913345813751, 0.010037861764431, 0.11936990916728973, -0.23916326463222504, -0.25144192576408386, -0.23703879117965698, -0.27663275599479675, 0.3788056969642639, 0.32120949029922485, 0.49166277050971985, -0.23725897073745728, -0.10248976200819016, 0.3546546399593353, 0.017388083040714264, -0.1381925791501999, -0.3041337728500366, -0.3489312529563904, -0.24448198080062866, -0.4569973349571228, -0.07686228305101395, 0.22369427978992462, 0.14624492824077606, -0.1781129539012909, 0.0569177083671093, -0.003195466473698616, -0.2490135133266449, 0.24928206205368042, 0.025196798145771027, 0.15518024563789368, 0.20632779598236084, 0.006600815802812576, -0.0015957541763782501, 0.22424918413162231, -0.1629244089126587, 0.2497967630624771, -0.16911005973815918, 0.007037840783596039, 0.2945016622543335, -0.25296735763549805, 0.30812308192253113, 0.1772136688232422, 0.05884663015604019, 0.32148993015289307, 0.218517005443573, 0.3157065212726593, -0.07874762266874313, 0.11289656907320023, 0.3214440643787384, 0.2550255358219147, -0.15212276577949524, -0.2701738178730011, 0.576370120048523, 0.20699146389961243, 0.0711066722869873, 0.2796465754508972, -0.28950798511505127, -0.20012295246124268, 0.19523917138576508, -0.08531088382005692, 0.8592368960380554, -0.033453911542892456, 0.13657481968402863, 0.10396303981542587, 0.04014197736978531, 0.3963150978088379, 0.18848717212677002, 0.14579987525939941, -0.42859143018722534, 0.019972342997789383, 0.006362868472933769, -0.1561584770679474, 0.06997939944267273, 0.19501416385173798, -0.47181081771850586, 0.39893829822540283, -0.1540239453315735, -0.1372062861919403, -0.02096850983798504, 0.260549396276474, 0.04448864609003067, -0.26747241616249084, 0.09877441823482513, 0.1068306714296341, -0.09737253189086914, 0.25099772214889526, 0.0981690064072609, -0.015407631173729897, 0.07682664692401886, -0.30664342641830444, -0.3827332854270935, 0.11944525688886642, -0.21196630597114563, 0.5681124329566956, 0.26543089747428894, 0.1176435649394989, 0.3349751830101013, 0.14744259417057037, 0.004298634827136993, 0.12446585297584534, -0.1284875124692917, -0.013692878186702728, 0.03005019947886467, 0.12238354235887527, -0.21383264660835266, -0.01973160356283188, 0.21937881410121918, 0.0380546972155571, -0.3936789929866791, -0.161359041929245, -0.08267227560281754, 0.06409469246864319, -0.1460667997598648, 0.02843397483229637, 0.023978829383850098, -0.2233826220035553, -0.467312216758728, 0.06059475243091583, -0.3597424328327179, -0.23938924074172974, 0.10978478193283081, -0.02514035254716873, -0.42065930366516113, 0.23207172751426697, 0.09840649366378784, -0.2648565173149109, 0.09744822978973389, 0.46542346477508545, 0.14275693893432617, 0.3938292860984802, 0.6578112840652466, 0.4816330075263977, -0.16191449761390686, -0.2177281379699707, -0.13783392310142517, 0.2559017837047577, -0.5192019939422607, 0.26362496614456177, 0.1261708289384842, -0.15654297173023224, -0.024752264842391014, 0.36673226952552795, 0.04229229316115379, 0.2563845217227936, -0.22223573923110962, -0.2846604287624359, -0.4323420226573944, 0.041218724101781845, -0.012455698102712631, 0.15849049389362335, 0.03773318976163864, 0.43920910358428955, 0.07252248376607895, 0.3446766436100006, -0.316602885723114, 0.10158933699131012, -0.45925477147102356, 0.1270507127046585, 0.08695462346076965, -0.38849958777427673, 0.007180670276284218, 0.10283879935741425, 0.1086365133523941, 0.3089998960494995, -0.2994246184825897, -0.23484715819358826, -0.22640249133110046, 0.07228917628526688, -0.06925509870052338, -0.05940146744251251, 0.2124273180961609, 0.22667671740055084, -0.032950691878795624, -0.17607340216636658, -0.007587152533233166, 0.05211813747882843, -0.010445758700370789, 0.14747929573059082, 0.2194545716047287, 0.019566811621189117, -0.11889582127332687, 0.004781438037753105, -0.24073901772499084, 0.03029610961675644, 0.14272738993167877, 0.012420576065778732, 0.14593806862831116, 0.06743402779102325, -0.13457943499088287, -0.17718088626861572, 0.08095484226942062, 0.13594508171081543, -0.19076508283615112, -0.3552045226097107, -0.2111646682024002, -0.19629602134227753, 0.2878010869026184, 0.17502155900001526, -0.13388140499591827, 0.04253017157316208, 0.07110705971717834, 0.22949418425559998, -0.3894517123699188, 0.10096021741628647, 0.31593483686447144, -0.08129800111055374, 0.2417638599872589, 0.23468133807182312, -0.10673336684703827, 0.1655508279800415, -0.2935245633125305, 0.12670865654945374, 0.002271858975291252, -0.4911996126174927, -0.009272734634578228, 0.09050840139389038, -0.12721233069896698, 0.13931593298912048, 0.39812254905700684, -0.043810296803712845, 0.21800875663757324, 0.17342984676361084, -0.029528379440307617, 0.28618621826171875, -0.33719462156295776, 0.16034920513629913, 0.04284494370222092, -0.6167396903038025, 0.22295182943344116, 0.30427107214927673, -0.15452790260314941, 0.2104465365409851, -0.030724599957466125, 0.3675805628299713, -0.5919659733772278, -0.19598546624183655, -0.08513791859149933, 0.2790285646915436, -0.39774227142333984, -0.41982680559158325, -0.03246597945690155, -0.05472415313124657, -0.21798038482666016, 0.057403456419706345, -0.07103101909160614, 0.1367313265800476, 0.3471324145793915, 0.021595973521471024, -0.14455565810203552, -0.3487924337387085, -0.1260673999786377, -0.012696027755737305, 0.1340656578540802, -0.29569241404533386, 0.06823591887950897, 0.27491575479507446, -0.04596306383609772, -0.5047227144241333, 0.22283653914928436, 0.5591913461685181, 0.39883482456207275, -0.369215726852417, 0.0725749135017395, -0.03959443420171738, 0.06188582628965378, -0.1044696718454361, 0.07688165456056595, 0.09609339386224747, 0.14917074143886566, 0.22303107380867004, 0.11659787595272064, -0.2096037119626999, -0.08218875527381897, 0.12267906963825226, 0.3338048458099365, 0.05177901312708855, 0.4257691502571106, -0.09363196790218353, -0.2233307659626007, -0.04718806594610214, 0.13819637894630432, -0.41848528385162354, 0.21530532836914062, 0.5088750720024109, -0.2176356017589569, 0.2733810544013977, -0.03912579268217087, 0.09814470261335373, -0.0012671556323766708, 0.6340998411178589, 0.14958971738815308, 0.023732367902994156, -0.4357895851135254, 0.24684424698352814, -0.5064622759819031, 0.034147895872592926, -0.26108306646347046, 0.14380638301372528, -0.37084874510765076, 0.34766125679016113, 0.12029369920492172, -0.06318666785955429, -0.009628310799598694, 0.3259032070636749, 0.2164502590894699, 0.35385242104530334, -0.3152369260787964, -0.15420208871364594, -0.27257996797561646, -0.2114034742116928, 0.30934345722198486, -0.43705710768699646, 0.012966040521860123, 0.16912345588207245, 0.05201837420463562, -0.3621640205383301, 0.03534306585788727, 0.00555531308054924, 0.15972867608070374, -0.008219584822654724, 0.25785499811172485, 0.48936495184898376, -0.2150481939315796, -0.014704947359859943, -0.09395833313465118, -0.03487445041537285, -0.16505420207977295, 0.02458692342042923, 0.09823665022850037, 0.5375679731369019, -0.23324424028396606, 0.3349669277667999, -0.4291655719280243, 0.1068597286939621, 0.001759592443704605, 0.07302286475896835, -0.11257284879684448, 0.18445710837841034, 0.1445150375366211, 0.015393193811178207, 0.004369928501546383, 0.3746371567249298, 0.012435335665941238, -0.05912364274263382, -0.19601909816265106, -0.283449649810791, 0.6401265859603882, -0.29230043292045593, -0.45399266481399536, -0.42327508330345154, 0.15188848972320557, -0.22872957587242126, -0.07128709554672241, -0.5009866952896118, 0.04145032912492752, 0.13671059906482697, -0.024166814982891083, -0.45826831459999084, 0.2389630526304245, 0.012207780964672565, -0.21941018104553223, -0.0912206768989563, 0.3244309425354004, 0.1423427313566208, -0.29269152879714966, 0.15418395400047302, -0.34222424030303955 ]
https://github.com/huggingface/datasets/issues/1769
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2
Multiprocessing in python require all the functions to be picklable. More specifically, functions need to be picklable with `dill`. However objects like `typing.Union[str, NoneType]` are not picklable in python <3.7. Can you try to update your python version to python>=3.7 ?
It may be a bug of multiprocessing with Datasets, when I disable the multiprocessing by set num_proc to None, everything works fine. The script I use is https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py Script args: ``` --model_name_or_path ../../../model/chinese-roberta-wwm-ext --train_file /nfs/volume-377-2/bert/data/test/train.txt --output_dir test --do_train --per_device_train_batch_size 2 --gradient_accumulation_steps 2 --learning_rate 1e-4 --max_steps 1000 --warmup_steps 10 --save_steps 1000 --save_total_limit 1 --seed 23333 --max_seq_length 512 --preprocessing_num_workers 2 --cache_dir /nfs/volume-377-2/bert/data/test/cache ``` Where the `/nfs/volume-377-2/bert/data/test/train.txt` is just a toy example with 10000 lines of random string, you should be able to reproduce this error esaily. Full Traceback: ``` Traceback (most recent call last): File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 398, in <module> main() File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 325, in main load_from_cache_file=not data_args.overwrite_cache, File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp> for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in map transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in <listcomp> transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get raise self._value File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 424, in _handle_tasks put(task) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/connection.py", line 209, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/reduction.py", line 54, in dumps cls(buf, protocol, *args, **kwds).dump(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump StockPickler.dump(self, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 409, in dump self.save(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function obj.__dict__, fkwdefaults), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell pickler.save_reduce(_create_cell, (f,), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 521, in save self.save_reduce(obj=obj, *rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 605, in save_reduce save(cls) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type obj.__bases__, _dict), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 507, in save self.save_global(obj, rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 927, in save_global (obj, module_name, name)) _pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union ```
41
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2 It may be a bug of multiprocessing with Datasets, when I disable the multiprocessing by set num_proc to None, everything works fine. The script I use is https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py Script args: ``` --model_name_or_path ../../../model/chinese-roberta-wwm-ext --train_file /nfs/volume-377-2/bert/data/test/train.txt --output_dir test --do_train --per_device_train_batch_size 2 --gradient_accumulation_steps 2 --learning_rate 1e-4 --max_steps 1000 --warmup_steps 10 --save_steps 1000 --save_total_limit 1 --seed 23333 --max_seq_length 512 --preprocessing_num_workers 2 --cache_dir /nfs/volume-377-2/bert/data/test/cache ``` Where the `/nfs/volume-377-2/bert/data/test/train.txt` is just a toy example with 10000 lines of random string, you should be able to reproduce this error esaily. Full Traceback: ``` Traceback (most recent call last): File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 398, in <module> main() File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 325, in main load_from_cache_file=not data_args.overwrite_cache, File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp> for k, dataset in self.items() File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in map transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in <listcomp> transformed_shards = [r.get() for r in results] File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get raise self._value File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 424, in _handle_tasks put(task) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/connection.py", line 209, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/reduction.py", line 54, in dumps cls(buf, protocol, *args, **kwds).dump(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump StockPickler.dump(self, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 409, in dump self.save(obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function obj.__dict__, fkwdefaults), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell pickler.save_reduce(_create_cell, (f,), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 521, in save self.save_reduce(obj=obj, *rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 605, in save_reduce save(cls) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type obj.__bases__, _dict), obj=obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce save(args) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple save(element) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save f(self, obj) # Call unbound method with explicit self File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict StockPickler.save_dict(pickler, obj) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict self._batch_setitems(obj.items()) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems save(v) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 507, in save self.save_global(obj, rv) File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 927, in save_global (obj, module_name, name)) _pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union ``` Multiprocessing in python require all the functions to be picklable. More specifically, functions need to be picklable with `dill`. However objects like `typing.Union[str, NoneType]` are not picklable in python <3.7. Can you try to update your python version to python>=3.7 ?
[ -0.29035988450050354, -0.29742854833602905, 0.11324463784694672, 0.1903708577156067, 0.16615837812423706, -0.05220987647771835, 0.33211368322372437, 0.2303631752729416, 0.2993960380554199, 0.2801509499549866, 0.016717011108994484, 0.3376862108707428, -0.11104438453912735, 0.21741469204425812, 0.004183185286819935, -0.1060650646686554, -0.11580229550600052, -0.1348114162683487, -0.3830089271068573, 0.010605253279209137, -0.29227977991104126, 0.3295297920703888, -0.3364184498786926, 0.17858117818832397, -0.6447757482528687, -0.09804932028055191, -0.04807302728295326, 0.29142558574676514, 0.08679615706205368, -0.08384117484092712, 0.09129659831523895, -0.03556618466973305, 0.012487141415476799, 0.4959757626056671, -0.00011002033716067672, 0.04339580982923508, 0.20303748548030853, -0.0829198956489563, -0.06672526895999908, -0.4173736572265625, 0.07137774676084518, -0.039012208580970764, 0.07075808942317963, -0.05480719357728958, 0.15044891834259033, 0.17994914948940277, 0.14069055020809174, -0.08047087490558624, 0.2613464593887329, 0.11551473289728165, 0.19440853595733643, 0.5662000179290771, 0.11443623900413513, -0.07613573223352432, -0.12526077032089233, 0.21574872732162476, -0.032217707484960556, 0.2660857141017914, 0.1158294752240181, -0.16647496819496155, -0.2567044198513031, 0.20814406871795654, -0.009197043254971504, 0.2851702570915222, -0.1553528606891632, 0.3262346684932709, 0.09002915769815445, -0.2589208483695984, 0.12840475142002106, 0.3979732096195221, 0.07846380770206451, -0.23205670714378357, -0.3231729567050934, -0.06802269071340561, -0.08543617278337479, -0.17135797441005707, 0.08775389939546585, 0.16609035432338715, -0.11769464612007141, 0.08516857028007507, -0.20291762053966522, 0.13196945190429688, 0.2207043170928955, 0.10398489236831665, 0.23207509517669678, 0.3622323274612427, -0.03134253993630409, 0.3686205744743347, 0.27956894040107727, -0.13734081387519836, -0.20739266276359558, -0.18688929080963135, 0.07207056879997253, 0.06321807950735092, -0.04581909999251366, -0.14083808660507202, 0.04550828039646149, -0.09475681930780411, 0.07365622371435165, -0.17858265340328217, -0.17664682865142822, 0.17129755020141602, -0.23897574841976166, 0.31937527656555176, 0.3000180721282959, -0.1272132247686386, -0.09902740269899368, 0.20270361006259918, 0.4027116298675537, -0.07397273182868958, -0.22513192892074585, 0.11599527299404144, 0.3312569856643677, -0.34479600191116333, -0.10419459640979767, 0.15643340349197388, 0.3292238116264343, -0.11150819063186646, -0.1496976763010025, -0.1945514976978302, -0.1339908242225647, -0.17258445918560028, -0.010302131064236164, 0.29037466645240784, 0.05927511677145958, 0.3461208939552307, 0.05660779029130936, 0.18780355155467987, -0.5467140674591064, -0.08292872458696365, -0.3398102819919586, 0.21892689168453217, -0.191693976521492, 0.06260749697685242, 0.22208385169506073, 0.26731446385383606, 0.3550156056880951, 0.19947050511837006, -0.03712645173072815, -0.15230974555015564, 0.23511961102485657, -0.24940359592437744, -0.1287895143032074, 0.19256238639354706, 0.16525524854660034, 0.2886994481086731, 0.2680860161781311, -0.3080253601074219, -0.06359388679265976, 0.0783037468791008, -0.23705458641052246, -0.2890685796737671, -0.07295642048120499, 0.1396498680114746, -0.014291052706539631, 0.12578900158405304, -0.16990932822227478, 0.04475625231862068, 0.4315927028656006, -0.04975900426506996, -0.18824419379234314, -0.2977280020713806, -0.3939252197742462, -0.22074954211711884, -0.037848860025405884, 0.3762210011482239, -0.23416639864444733, -0.15204045176506042, 0.1977582722902298, -0.12353742122650146, 0.5048830509185791, 0.5401948690414429, -0.24759303033351898, -0.08227688819169998, -0.14923283457756042, 0.6606730818748474, 0.03607068210840225, 0.10968554019927979, -0.257219135761261, 0.20260849595069885, -0.09889504313468933, -0.11149927973747253, -0.08419325202703476, 0.0370497852563858, -0.357283353805542, -0.03266773372888565, 0.4061434864997864, 0.135124072432518, 0.05737414211034775, 0.19235658645629883, -0.27117177844047546, -0.3141670227050781, 0.16975271701812744, -0.05447717383503914, 0.06852944195270538, -0.2757890522480011, -0.12620097398757935, -0.08963199704885483, 0.43805500864982605, -0.22410744428634644, 0.07926023006439209, -0.0038885287940502167, 0.1627582460641861, -0.051541417837142944, -0.020110514014959335, -0.2338375449180603, -0.5796087384223938, 0.2878187596797943, -0.22332896292209625, 0.2118988186120987, -0.0640440434217453, -0.13443559408187866, 0.27680695056915283, -0.016979198902845383, -0.32596874237060547, -0.06861788034439087, 0.07566042989492416, 0.07221803069114685, 0.050903622061014175, -0.1822730004787445, -0.08427812159061432, -0.11655829101800919, -0.10495290160179138, -0.014996930956840515, -0.4686061143875122, 0.042573049664497375, -0.40373265743255615, -0.4181519150733948, -0.18951672315597534, 0.20762485265731812, 0.10675127804279327, -0.006862481124699116, -0.11716929823160172, 0.1369662880897522, 0.15026158094406128, -0.04611063003540039, -0.049514248967170715, 0.05626586824655533, -0.019086671993136406, -0.09612861275672913, 0.021798888221383095, 0.21985702216625214, 0.1103200763463974, -0.17809394001960754, -0.2147069275379181, 0.4751461148262024, 0.02840726636350155, 0.2698740065097809, 0.04167763143777847, 0.09579966962337494, 0.22422856092453003, 0.041359443217515945, 0.13225500285625458, -0.17092782258987427, 0.16770927608013153, 0.17140616476535797, 0.16703197360038757, 0.09132006019353867, -0.23927128314971924, 0.039523642510175705, 0.5964309573173523, 0.20254893600940704, 0.411984920501709, 0.00813138484954834, -0.20590680837631226, -0.13738876581192017, -0.1942451298236847, 0.032579947263002396, 0.6064071655273438, 0.16130071878433228, 0.06438565999269485, 0.0018839072436094284, -0.1250704675912857, -0.11863648891448975, 0.012186408042907715, -0.015713028609752655, 0.038367900997400284, 0.1391061395406723, 0.11017736047506332, -0.07655670493841171, -0.3033144474029541, -0.10311830043792725, 0.010304529219865799, 0.31846773624420166, -0.3177986741065979, 0.014538271352648735, -0.3326050043106079, 0.4729810059070587, -0.23474952578544617, 0.009745932184159756, -0.19180381298065186, -0.2922731637954712, -0.17370282113552094, 0.368852436542511, -0.22110958397388458, 0.15469013154506683, 0.1278081089258194, -0.20746202766895294, -0.10400643944740295, 0.23589107394218445, 0.07289454340934753, -0.077144093811512, -0.2809189558029175, -0.0019135605543851852, 0.404887318611145, -0.04306706041097641, 0.04712362587451935, 0.153612419962883, -0.258625328540802, -0.055386438965797424, -0.13959835469722748, 0.07913260161876678, -0.07616877555847168, 0.22843551635742188, 0.2975741922855377, 0.25313007831573486, -0.020326480269432068, -0.3027893900871277, 0.27819862961769104, -0.29911717772483826, -0.19056324660778046, -0.04216393083333969, 0.07795364409685135, -0.11819041520357132, -0.36454999446868896, -0.39522355794906616, -0.45918968319892883, -0.3345876932144165, 0.406663715839386, -0.059952206909656525, 0.1627807915210724, 0.284171462059021, 0.1749650239944458, 0.25119295716285706, 0.12706640362739563, -0.17673245072364807, -0.2883632779121399, 0.1619478315114975, 0.2229670286178589, 0.018643071874976158, -0.2608916461467743, -0.048884034156799316, -0.16836228966712952, -0.041167002171278, -0.20991821587085724, -0.16195380687713623, 0.06790805608034134, -0.4185371696949005, 0.2506229281425476, 0.10129597783088684, 0.2987333834171295, 0.6218910217285156, 0.2733475863933563, -0.15714490413665771, -0.04585849866271019, -0.26764315366744995, 0.17666825652122498, 0.20726892352104187, 0.2516292333602905, -0.004412570968270302, 0.199446439743042, -0.009049002081155777, 0.7935599684715271, 0.2588755488395691, -0.2274363785982132, 0.27470719814300537, 0.0024314820766448975, -0.1775771677494049, -0.08380734175443649, -0.15732981264591217, -0.06351976096630096, -0.3232713043689728, 0.10696811974048615, 0.22163257002830505, -0.1139477863907814, -0.17900842428207397, 0.05172190070152283, 0.15031418204307556, -0.09146226197481155, -0.29321038722991943, 0.49177801609039307, 0.20861618220806122, -0.10759872943162918, 0.057408612221479416, -0.056631363928318024, -0.1271752268075943, 0.040572550147771835, -0.08755916357040405, 0.014340884983539581, 0.011016272008419037, -0.10770050436258316, -0.17657534778118134, -0.20577472448349, -0.5075409412384033, 0.5035909414291382, 0.12886817753314972, 0.30688825249671936, -0.10782226920127869, -0.209570050239563, -0.06163319945335388, -0.08288540691137314, 0.8502635955810547, -0.3850913345813751, 0.010037861764431, 0.11936990916728973, -0.23916326463222504, -0.25144192576408386, -0.23703879117965698, -0.27663275599479675, 0.3788056969642639, 0.32120949029922485, 0.49166277050971985, -0.23725897073745728, -0.10248976200819016, 0.3546546399593353, 0.017388083040714264, -0.1381925791501999, -0.3041337728500366, -0.3489312529563904, -0.24448198080062866, -0.4569973349571228, -0.07686228305101395, 0.22369427978992462, 0.14624492824077606, -0.1781129539012909, 0.0569177083671093, -0.003195466473698616, -0.2490135133266449, 0.24928206205368042, 0.025196798145771027, 0.15518024563789368, 0.20632779598236084, 0.006600815802812576, -0.0015957541763782501, 0.22424918413162231, -0.1629244089126587, 0.2497967630624771, -0.16911005973815918, 0.007037840783596039, 0.2945016622543335, -0.25296735763549805, 0.30812308192253113, 0.1772136688232422, 0.05884663015604019, 0.32148993015289307, 0.218517005443573, 0.3157065212726593, -0.07874762266874313, 0.11289656907320023, 0.3214440643787384, 0.2550255358219147, -0.15212276577949524, -0.2701738178730011, 0.576370120048523, 0.20699146389961243, 0.0711066722869873, 0.2796465754508972, -0.28950798511505127, -0.20012295246124268, 0.19523917138576508, -0.08531088382005692, 0.8592368960380554, -0.033453911542892456, 0.13657481968402863, 0.10396303981542587, 0.04014197736978531, 0.3963150978088379, 0.18848717212677002, 0.14579987525939941, -0.42859143018722534, 0.019972342997789383, 0.006362868472933769, -0.1561584770679474, 0.06997939944267273, 0.19501416385173798, -0.47181081771850586, 0.39893829822540283, -0.1540239453315735, -0.1372062861919403, -0.02096850983798504, 0.260549396276474, 0.04448864609003067, -0.26747241616249084, 0.09877441823482513, 0.1068306714296341, -0.09737253189086914, 0.25099772214889526, 0.0981690064072609, -0.015407631173729897, 0.07682664692401886, -0.30664342641830444, -0.3827332854270935, 0.11944525688886642, -0.21196630597114563, 0.5681124329566956, 0.26543089747428894, 0.1176435649394989, 0.3349751830101013, 0.14744259417057037, 0.004298634827136993, 0.12446585297584534, -0.1284875124692917, -0.013692878186702728, 0.03005019947886467, 0.12238354235887527, -0.21383264660835266, -0.01973160356283188, 0.21937881410121918, 0.0380546972155571, -0.3936789929866791, -0.161359041929245, -0.08267227560281754, 0.06409469246864319, -0.1460667997598648, 0.02843397483229637, 0.023978829383850098, -0.2233826220035553, -0.467312216758728, 0.06059475243091583, -0.3597424328327179, -0.23938924074172974, 0.10978478193283081, -0.02514035254716873, -0.42065930366516113, 0.23207172751426697, 0.09840649366378784, -0.2648565173149109, 0.09744822978973389, 0.46542346477508545, 0.14275693893432617, 0.3938292860984802, 0.6578112840652466, 0.4816330075263977, -0.16191449761390686, -0.2177281379699707, -0.13783392310142517, 0.2559017837047577, -0.5192019939422607, 0.26362496614456177, 0.1261708289384842, -0.15654297173023224, -0.024752264842391014, 0.36673226952552795, 0.04229229316115379, 0.2563845217227936, -0.22223573923110962, -0.2846604287624359, -0.4323420226573944, 0.041218724101781845, -0.012455698102712631, 0.15849049389362335, 0.03773318976163864, 0.43920910358428955, 0.07252248376607895, 0.3446766436100006, -0.316602885723114, 0.10158933699131012, -0.45925477147102356, 0.1270507127046585, 0.08695462346076965, -0.38849958777427673, 0.007180670276284218, 0.10283879935741425, 0.1086365133523941, 0.3089998960494995, -0.2994246184825897, -0.23484715819358826, -0.22640249133110046, 0.07228917628526688, -0.06925509870052338, -0.05940146744251251, 0.2124273180961609, 0.22667671740055084, -0.032950691878795624, -0.17607340216636658, -0.007587152533233166, 0.05211813747882843, -0.010445758700370789, 0.14747929573059082, 0.2194545716047287, 0.019566811621189117, -0.11889582127332687, 0.004781438037753105, -0.24073901772499084, 0.03029610961675644, 0.14272738993167877, 0.012420576065778732, 0.14593806862831116, 0.06743402779102325, -0.13457943499088287, -0.17718088626861572, 0.08095484226942062, 0.13594508171081543, -0.19076508283615112, -0.3552045226097107, -0.2111646682024002, -0.19629602134227753, 0.2878010869026184, 0.17502155900001526, -0.13388140499591827, 0.04253017157316208, 0.07110705971717834, 0.22949418425559998, -0.3894517123699188, 0.10096021741628647, 0.31593483686447144, -0.08129800111055374, 0.2417638599872589, 0.23468133807182312, -0.10673336684703827, 0.1655508279800415, -0.2935245633125305, 0.12670865654945374, 0.002271858975291252, -0.4911996126174927, -0.009272734634578228, 0.09050840139389038, -0.12721233069896698, 0.13931593298912048, 0.39812254905700684, -0.043810296803712845, 0.21800875663757324, 0.17342984676361084, -0.029528379440307617, 0.28618621826171875, -0.33719462156295776, 0.16034920513629913, 0.04284494370222092, -0.6167396903038025, 0.22295182943344116, 0.30427107214927673, -0.15452790260314941, 0.2104465365409851, -0.030724599957466125, 0.3675805628299713, -0.5919659733772278, -0.19598546624183655, -0.08513791859149933, 0.2790285646915436, -0.39774227142333984, -0.41982680559158325, -0.03246597945690155, -0.05472415313124657, -0.21798038482666016, 0.057403456419706345, -0.07103101909160614, 0.1367313265800476, 0.3471324145793915, 0.021595973521471024, -0.14455565810203552, -0.3487924337387085, -0.1260673999786377, -0.012696027755737305, 0.1340656578540802, -0.29569241404533386, 0.06823591887950897, 0.27491575479507446, -0.04596306383609772, -0.5047227144241333, 0.22283653914928436, 0.5591913461685181, 0.39883482456207275, -0.369215726852417, 0.0725749135017395, -0.03959443420171738, 0.06188582628965378, -0.1044696718454361, 0.07688165456056595, 0.09609339386224747, 0.14917074143886566, 0.22303107380867004, 0.11659787595272064, -0.2096037119626999, -0.08218875527381897, 0.12267906963825226, 0.3338048458099365, 0.05177901312708855, 0.4257691502571106, -0.09363196790218353, -0.2233307659626007, -0.04718806594610214, 0.13819637894630432, -0.41848528385162354, 0.21530532836914062, 0.5088750720024109, -0.2176356017589569, 0.2733810544013977, -0.03912579268217087, 0.09814470261335373, -0.0012671556323766708, 0.6340998411178589, 0.14958971738815308, 0.023732367902994156, -0.4357895851135254, 0.24684424698352814, -0.5064622759819031, 0.034147895872592926, -0.26108306646347046, 0.14380638301372528, -0.37084874510765076, 0.34766125679016113, 0.12029369920492172, -0.06318666785955429, -0.009628310799598694, 0.3259032070636749, 0.2164502590894699, 0.35385242104530334, -0.3152369260787964, -0.15420208871364594, -0.27257996797561646, -0.2114034742116928, 0.30934345722198486, -0.43705710768699646, 0.012966040521860123, 0.16912345588207245, 0.05201837420463562, -0.3621640205383301, 0.03534306585788727, 0.00555531308054924, 0.15972867608070374, -0.008219584822654724, 0.25785499811172485, 0.48936495184898376, -0.2150481939315796, -0.014704947359859943, -0.09395833313465118, -0.03487445041537285, -0.16505420207977295, 0.02458692342042923, 0.09823665022850037, 0.5375679731369019, -0.23324424028396606, 0.3349669277667999, -0.4291655719280243, 0.1068597286939621, 0.001759592443704605, 0.07302286475896835, -0.11257284879684448, 0.18445710837841034, 0.1445150375366211, 0.015393193811178207, 0.004369928501546383, 0.3746371567249298, 0.012435335665941238, -0.05912364274263382, -0.19601909816265106, -0.283449649810791, 0.6401265859603882, -0.29230043292045593, -0.45399266481399536, -0.42327508330345154, 0.15188848972320557, -0.22872957587242126, -0.07128709554672241, -0.5009866952896118, 0.04145032912492752, 0.13671059906482697, -0.024166814982891083, -0.45826831459999084, 0.2389630526304245, 0.012207780964672565, -0.21941018104553223, -0.0912206768989563, 0.3244309425354004, 0.1423427313566208, -0.29269152879714966, 0.15418395400047302, -0.34222424030303955 ]
https://github.com/huggingface/datasets/issues/1766
Issues when run two programs compute the same metrics
Hi ! To avoid collisions you can specify a `experiment_id` when instantiating your metric using `load_metric`. It will replace "default_experiment" with the experiment id that you provide in the arrow filename. Also when two `experiment_id` collide we're supposed to detect it using our locking mechanism. Not sure why it didn't work in your case. Could you share some code that reproduces the issue ? This would help us investigate.
I got the following error when running two different programs that both compute sacreblue metrics. It seems that both read/and/write to the same location (.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow) where it caches the batches: ``` File "train_matching_min.py", line 160, in <module>ch_9_label avg_loss = valid(epoch, args.batch, args.validation, args.with_label) File "train_matching_min.py", line 93, in valid bleu += eval.compute() File "/u/tlhoang/projects/seal/match/models/eval.py", line 23, in compute return self.metric.compute()['score'] File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 387, in compute self._finalize() File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 355, in _finalize self.data = Dataset(**reader.read_files([{"filename": f} for f in file_paths])) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 231, in read_files pa_table = self._read_files(files) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 170, in _read_files pa_table: pa.Table = self._get_dataset_from_filename(f_dict) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 299, in _get_dataset_from_filename pa_table = f.read_all() File "pyarrow/ipc.pxi", line 481, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Expected to read 1819307375 metadata bytes, but only read 454396 ```
69
Issues when run two programs compute the same metrics I got the following error when running two different programs that both compute sacreblue metrics. It seems that both read/and/write to the same location (.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow) where it caches the batches: ``` File "train_matching_min.py", line 160, in <module>ch_9_label avg_loss = valid(epoch, args.batch, args.validation, args.with_label) File "train_matching_min.py", line 93, in valid bleu += eval.compute() File "/u/tlhoang/projects/seal/match/models/eval.py", line 23, in compute return self.metric.compute()['score'] File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 387, in compute self._finalize() File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 355, in _finalize self.data = Dataset(**reader.read_files([{"filename": f} for f in file_paths])) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 231, in read_files pa_table = self._read_files(files) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 170, in _read_files pa_table: pa.Table = self._get_dataset_from_filename(f_dict) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 299, in _get_dataset_from_filename pa_table = f.read_all() File "pyarrow/ipc.pxi", line 481, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Expected to read 1819307375 metadata bytes, but only read 454396 ``` Hi ! To avoid collisions you can specify a `experiment_id` when instantiating your metric using `load_metric`. It will replace "default_experiment" with the experiment id that you provide in the arrow filename. Also when two `experiment_id` collide we're supposed to detect it using our locking mechanism. Not sure why it didn't work in your case. Could you share some code that reproduces the issue ? This would help us investigate.
[ -0.36117449402809143, -0.1505344957113266, -0.04318747669458389, 0.3872220516204834, 0.2670595049858093, -0.10684031248092651, 0.08155131340026855, 0.30455532670021057, -0.1409018486738205, 0.21661463379859924, -0.3760761618614197, -0.013460120186209679, 0.08526712656021118, 0.005195209756493568, -0.18599970638751984, -0.04606280475854874, 0.003470808267593384, -0.009413585066795349, 0.07728254050016403, -0.0010646097362041473, -0.2850644886493683, 0.22799871861934662, 0.01634618639945984, 0.25543203949928284, -0.10162355750799179, -0.10285646468400955, -0.01355188898742199, -0.12158782035112381, -0.08570350706577301, -0.474290132522583, 0.4356848895549774, 0.028186429291963577, -0.16046588122844696, 0.7840999364852905, -0.00011886378342751414, 0.0990639179944992, 0.24837225675582886, 0.025843391194939613, -0.07039554417133331, -0.37163597345352173, 0.03052915632724762, -0.05601280927658081, 0.15529289841651917, -0.27520906925201416, 0.08796324580907822, -0.14308945834636688, 0.0955488458275795, -0.5427463054656982, 0.3801243305206299, 0.16474328935146332, 0.15466754138469696, 0.5314356088638306, -0.48682165145874023, -0.18242040276527405, 0.12838584184646606, -0.0579499751329422, -0.050340477377176285, 0.5445207953453064, 0.0008056461811065674, 0.20440690219402313, 0.023587360978126526, 0.4144546687602997, -0.11863964051008224, 0.26312893629074097, 0.05707883834838867, 0.09715490788221359, 0.4060325026512146, -0.0158633254468441, 0.16569384932518005, -0.12404336780309677, 0.2570584714412689, -0.3838200271129608, -0.22552846372127533, 0.13827767968177795, -0.19872242212295532, -0.5372883677482605, 0.185103178024292, 0.13695766031742096, -0.17830166220664978, -0.17635656893253326, -0.27794674038887024, 0.07205761224031448, -0.2121042162179947, -0.19637085497379303, 0.08150021731853485, -0.2687273919582367, -0.15741173923015594, 0.1643320918083191, 0.16940128803253174, 0.3121427893638611, 0.12401176989078522, 0.0018441472202539444, -0.1553126871585846, -0.008267856203019619, -0.4027772843837738, 0.054256826639175415, -0.30371180176734924, -0.3437746465206146, -0.09539125859737396, 0.2882912755012512, 0.3789707124233246, -0.04519413411617279, 0.28402382135391235, 0.22244569659233093, 0.030923370271921158, 0.700498104095459, 0.14984968304634094, 0.29020217061042786, 0.20090019702911377, 0.18106305599212646, -0.31000515818595886, -0.1913621723651886, 0.1990123689174652, -0.5310238599777222, 0.24141283333301544, 0.22001487016677856, -0.013256030157208443, -0.3235706388950348, -0.4480690062046051, 0.061548735946416855, 0.19388100504875183, -0.04671354964375496, 0.1330566108226776, 0.31950291991233826, 0.03391530364751816, 0.012323802337050438, 0.12787503004074097, 0.42627233266830444, -0.22094206511974335, 0.21000456809997559, -0.2910304665565491, 0.10027024149894714, -0.4435737133026123, 0.3646080195903778, 0.04746633395552635, -0.08391430974006653, 0.22430355846881866, -0.032046351581811905, 0.40319424867630005, -0.3089303970336914, 0.36521199345588684, -0.44217580556869507, -0.0029977038502693176, 0.09540876746177673, 0.07820107042789459, 0.22512060403823853, 0.29957127571105957, -0.0981406718492508, -0.08110480010509491, -0.0738893523812294, -0.1872102916240692, -0.149111807346344, 0.5365419387817383, 0.15635834634304047, -0.013178843073546886, 0.4289546310901642, -0.3462411165237427, -0.07320979237556458, 0.3937609791755676, -0.21731039881706238, 0.06996911764144897, 0.00657149963080883, -0.4017103612422943, -0.34708255529403687, 0.1470743864774704, 0.355144202709198, -0.2117389291524887, -0.07382600009441376, 0.29294922947883606, 0.12982866168022156, -0.010282807052135468, 0.4685418903827667, -0.22015555202960968, 0.1626339554786682, -0.28661513328552246, -0.02459399774670601, 0.5620931386947632, -0.8298758864402771, -0.3216199576854706, 0.11762575805187225, -0.16347326338291168, -0.33326905965805054, 0.08252200484275818, 0.042999301105737686, 0.3266257643699646, -0.08760493248701096, 0.08907311409711838, -0.22432594001293182, 0.13952244818210602, -0.15095330774784088, -0.3216230869293213, -0.3151443600654602, -0.06383319199085236, -0.2678597867488861, 0.2974463403224945, -0.047139860689640045, 0.24349701404571533, -0.2063739001750946, -0.060068465769290924, -0.12155701220035553, 0.020032130181789398, 0.2438933253288269, 0.18840792775154114, -0.028605639934539795, 0.09913492202758789, -0.28509071469306946, 0.29250285029411316, 0.14487391710281372, -0.5383428335189819, -0.29613611102104187, 0.16910679638385773, -0.20051069557666779, -0.1927509605884552, -0.08577680587768555, -0.07063879072666168, -0.19580301642417908, 0.0659022256731987, 0.13605837523937225, 0.22092020511627197, 0.27802160382270813, -0.05762776359915733, 0.3118053674697876, -0.05844669044017792, 0.07076763361692429, -0.09735073149204254, 0.07383132725954056, -0.12322831898927689, -0.26637154817581177, -0.09806042164564133, 0.07870876789093018, 0.3763604760169983, -0.022603565827012062, -0.1681237518787384, 0.3127591907978058, -0.11685390770435333, 0.21608701348304749, 0.1792306900024414, 0.11884207278490067, 0.1721312701702118, -0.2322569489479065, 0.004848359152674675, -0.03860759362578392, 0.1945938616991043, -0.09878003597259521, 0.4015491008758545, 0.29533272981643677, -0.022891048341989517, 0.12966179847717285, 0.27550214529037476, 0.017034804448485374, -0.10075235366821289, 0.028555389493703842, 0.17278644442558289, -0.1901313066482544, 0.3023919463157654, -0.09715168178081512, 0.052162881940603256, -0.11248967051506042, 0.0968034565448761, -0.10436325520277023, 0.1355571746826172, 0.16272270679473877, -0.0012209266424179077, -0.1695546805858612, -0.036949522793293, 0.07328789681196213, -0.2711121737957001, 0.28889980912208557, 0.7128474116325378, 0.022904038429260254, 0.15263141691684723, 0.13301222026348114, 0.018837593495845795, -0.1760331690311432, 0.1453157663345337, 0.20944304764270782, -0.10755973309278488, 0.09937864542007446, 0.16622227430343628, -0.08168753236532211, -0.03645636886358261, 0.09034086763858795, 0.03812282532453537, -0.021395297721028328, -0.1647397130727768, 0.3923782706260681, -0.02197156846523285, 0.0753559097647667, -0.5359922051429749, 0.014177035540342331, -0.028816308826208115, -0.16891832649707794, -0.10039284825325012, 0.36014577746391296, 0.04996800050139427, 0.0707450583577156, -0.2301943600177765, 0.5003136396408081, -0.27543750405311584, 0.2575496733188629, 0.021313555538654327, -0.15510424971580505, -0.3020186722278595, -0.07128038257360458, 0.16850516200065613, 0.06055031344294548, 0.3412749171257019, -0.17549438774585724, -0.06994928419589996, -0.20886331796646118, -0.18692393600940704, -0.04495725780725479, 0.28859949111938477, 0.4888949692249298, -0.05254523456096649, -0.13934871554374695, -0.3070409297943115, -0.34690046310424805, 0.31383270025253296, -0.4048359990119934, -0.20791910588741302, -0.1324315071105957, 0.015044616535305977, -0.2289842665195465, -0.18729586899280548, -0.10687517374753952, -0.024506518617272377, -0.22136767208576202, 0.20838642120361328, -0.20012526214122772, 0.03607200086116791, 0.07124748826026917, -0.1740553379058838, 0.11427570879459381, 0.07485713809728622, 0.11120046675205231, -0.2778829038143158, -0.19417479634284973, 0.022259168326854706, -0.40089544653892517, -0.19502823054790497, -0.04202140122652054, 0.1363772302865982, 0.4599737524986267, 0.23688539862632751, -0.42594945430755615, -0.43684810400009155, -0.16821865737438202, -0.11737577617168427, 0.10201546549797058, -0.04186171293258667, 0.05511942878365517, -0.06823014467954636, -0.1335442066192627, -0.15035101771354675, -0.19333195686340332, 0.5020689368247986, -0.2520495057106018, 0.06857345253229141, -0.16039630770683289, -0.12222712486982346, 0.04430055245757103, 0.8054549098014832, 0.41464248299598694, 0.08388271182775497, 0.31428658962249756, 0.20357215404510498, 0.3654502332210541, 0.00396902859210968, -0.3886856734752655, 0.18849293887615204, 0.020065367221832275, -0.27146920561790466, 0.1279638558626175, -0.08590033650398254, 0.10546614974737167, -0.1474001258611679, -0.11587300896644592, -0.2137659788131714, -0.09552472829818726, -0.14897003769874573, -0.2166234254837036, 0.23570632934570312, 0.08295710384845734, 0.09117323905229568, -0.32166993618011475, 0.027716033160686493, 0.22083058953285217, 0.23617906868457794, -0.28037115931510925, 0.02431938238441944, -0.1450069695711136, -0.18176820874214172, -0.22255489230155945, 0.5148037672042847, 0.08916260302066803, 0.24470025300979614, -0.20914731919765472, 0.14087849855422974, 0.052331261336803436, -0.07097135484218597, 0.6638152003288269, -0.07394778728485107, -0.08686594665050507, -0.11097976565361023, -0.019375711679458618, -0.40940412878990173, -0.1419026404619217, 0.05507383123040199, 0.13664351403713226, 0.1798197329044342, 0.483946830034256, -0.12086011469364166, -0.005179175175726414, -0.015306014567613602, 0.012094514444470406, -0.18546456098556519, -0.20062853395938873, -0.3357677161693573, -0.38311517238616943, 0.0732777789235115, 0.07374809682369232, -0.019512467086315155, 0.045213863253593445, -0.09378696978092194, 0.09407033026218414, -0.17311258614063263, 0.047435007989406586, 0.24365726113319397, -0.013380555436015129, 0.5679036974906921, -0.3699098229408264, 0.11976239085197449, 0.27744367718696594, 0.08131604641675949, 0.29054883122444153, 0.261848509311676, -0.14876168966293335, -0.4146741032600403, 0.11547952145338058, 0.08396831899881363, -0.006803229451179504, 0.4959118068218231, -0.17064690589904785, 0.1998109221458435, -0.014372475445270538, -0.052506715059280396, 0.12229082733392715, 0.07163878530263901, 0.2608545422554016, 0.3012564182281494, -0.08179666101932526, -0.1803607940673828, 0.0001939833164215088, 0.4088627099990845, -0.11109663546085358, 0.4448747932910919, -0.3718871474266052, -0.13043026626110077, 0.18317373096942902, 0.20753958821296692, 1.141523003578186, 0.10962021350860596, 0.09404276311397552, 0.3654058277606964, -0.3788009285926819, 0.14488042891025543, -0.13388454914093018, 0.3521232604980469, -0.2913299798965454, -0.4262787997722626, 0.044398233294487, -0.42348140478134155, 0.0784708634018898, -0.2582252621650696, -0.09879358857870102, 0.2994014322757721, -0.25757142901420593, 0.022854454815387726, -0.16757448017597198, -0.00948137417435646, -0.17644624412059784, 0.16377504169940948, 0.27844107151031494, 0.11873959004878998, -0.1347375065088272, 0.19182486832141876, -0.19578015804290771, -0.20621958374977112, -0.2727341055870056, -0.12412860244512558, -0.19991004467010498, 0.12547603249549866, -0.3591460883617401, 0.5477303862571716, -0.028982210904359818, -0.187350332736969, -0.05643826350569725, 0.3179163634777069, 1.0567492246627808, -0.03375161811709404, -0.05322813242673874, 0.1115206778049469, 0.13227447867393494, 0.07698182016611099, 0.0788673385977745, -0.4823550283908844, 0.12167954444885254, -0.16219890117645264, -0.20465774834156036, -0.010241024196147919, 0.17127390205860138, 0.054547786712646484, 0.14362302422523499, 0.006504647433757782, -0.04427225887775421, -0.14536039531230927, 0.07130834460258484, 0.05382462590932846, -0.038230448961257935, -0.14293959736824036, 0.036585718393325806, -0.050324492156505585, -0.2049170583486557, 0.12930822372436523, -0.21363972127437592, -0.35866275429725647, 0.1601792424917221, 0.23918229341506958, 0.32215988636016846, -0.3406074345111847, 0.5207617282867432, -0.41818302869796753, -0.16472114622592926, -0.12292801588773727, -0.4281487762928009, -0.10484465211629868, -0.4858563542366028, 0.3519490361213684, -0.32848384976387024, -0.023038305342197418, -0.12904177606105804, 0.4235874116420746, 0.3696022033691406, 0.20826375484466553, -0.05143290385603905, -0.25757357478141785, -0.30797338485717773, 0.06654304265975952, -0.25606465339660645, 0.2094360888004303, -0.06678207963705063, 0.2033172845840454, -0.11510499566793442, 0.24687670171260834, -0.22908280789852142, 0.14910888671875, -0.2235807478427887, -0.057861216366291046, -0.023992713540792465, -0.3083413243293762, 0.27396851778030396, 0.05836612358689308, -0.08296195417642593, 0.24497433006763458, -0.415068656206131, -0.10257432609796524, -0.17030692100524902, 0.16700229048728943, -0.20108765363693237, -0.1663457304239273, -0.16397564113140106, -0.08493779599666595, 0.2917099595069885, -0.09668415039777756, 0.038523998111486435, 0.49527621269226074, -0.004727199673652649, -0.1825712025165558, -0.08010135591030121, 0.35791316628456116, 0.07604223489761353, 0.3112908601760864, 0.07226972281932831, -0.08911646902561188, 0.04557052627205849, 0.2249445766210556, -0.17519836127758026, -0.15445353090763092, -0.21517474949359894, -0.10359487682580948, 0.1023804321885109, 0.1173030287027359, -0.23846960067749023, -0.378930926322937, -0.27736830711364746, 0.04926256835460663, 0.23944509029388428, 0.1593904346227646, -0.022153308615088463, -0.16762685775756836, 0.045271921902894974, 0.1217806339263916, 0.003555312752723694, 0.010083287954330444, 0.07127945125102997, -0.0665706917643547, -0.2697436213493347, 0.2501278519630432, 0.43670496344566345, -0.05953969806432724, 0.21535906195640564, 0.08357375115156174, 0.31534600257873535, -0.35912376642227173, 0.4809868335723877, -0.3079815208911896, 0.2562142312526703, 0.2291850745677948, 0.2896815240383148, 0.14021660387516022, 0.16424591839313507, -0.1615503877401352, -0.2578151226043701, 0.3288826048374176, 0.10091480612754822, -0.06562423706054688, -0.17589324712753296, -0.18314343690872192, -0.12390045821666718, -0.11554145812988281, -0.11641667783260345, 0.1536555141210556, -0.0742521584033966, 0.4652308225631714, -0.2960211932659149, -0.3396768867969513, -0.23517295718193054, 0.09778331965208054, -0.2720488905906677, -0.10778716206550598, 0.03149022161960602, -0.31711286306381226, 0.22783389687538147, 0.04680364951491356, 0.24422061443328857, 0.21211154758930206, 0.22097903490066528, 0.046521127223968506, -0.24910040199756622, 0.06072041392326355, -0.2737986445426941, 0.6104675531387329, 0.05761875584721565, -0.11997590959072113, 0.3298224210739136, 0.22804632782936096, -0.04174957424402237, 0.041511066257953644, 0.662318229675293, 0.5221065878868103, 0.36180025339126587, 0.0910816490650177, -0.11469510197639465, 0.234205961227417, 0.12283051013946533, -0.014762374572455883, 0.17361071705818176, 0.25218355655670166, -0.19602368772029877, 0.24716906249523163, 0.15071094036102295, -0.11467903107404709, 0.3636132776737213, -0.06445266306400299, 0.20040012896060944, -0.2909458577632904, 0.28443214297294617, -0.17783135175704956, 0.020578131079673767, -0.1967293918132782, -0.04218364506959915, -0.5328440070152283, 0.10240016132593155, 0.2991534173488617, -0.17903642356395721, 0.23910987377166748, -0.09700628370046616, 0.07179594039916992, 0.18408112227916718, 0.24527594447135925, 0.4780642092227936, 0.12574103474617004, -0.5874688029289246, 0.054121509194374084, -0.4772074818611145, 0.4764416515827179, 0.059209927916526794, 0.4164777994155884, -0.29253846406936646, 0.25833937525749207, -0.24825254082679749, -0.1623592972755432, 0.48186665773391724, 0.1885388195514679, -0.030882954597473145, 0.06821557134389877, -0.5626352429389954, 0.17880591750144958, 0.04102964699268341, -0.31437334418296814, 0.25320762395858765, -0.3407094478607178, 0.029123596847057343, 0.0009258110076189041, 0.03304697573184967, 0.2292572557926178, 0.05430927127599716, 0.07945385575294495, -0.09887993335723877, 0.33971309661865234, 0.1724281758069992, 0.3838353455066681, 0.0864269807934761, 0.015271415933966637, -0.0633857250213623, -0.1108325868844986, -0.24124762415885925, -0.11479849368333817, 0.03567182272672653, 0.22264464199543, -0.5101050734519958, 0.05442216247320175, -0.3817656934261322, 0.20330557227134705, 0.24251259863376617, -0.21945340931415558, 0.052878886461257935, -0.09754279255867004, 0.01984439045190811, 0.016312798485159874, 0.4529062807559967, 0.40420907735824585, 0.09369048476219177, 0.4554384648799896, -0.3360854983329773, -0.12962456047534943, 0.5763475894927979, -0.5234944224357605, -0.2780396640300751, 0.11900467425584793, 0.44339126348495483, 0.3934999704360962, 0.0013247784227132797, -0.6530671119689941, -0.0659775510430336, 0.2789849042892456, -0.16010794043540955, -0.05280216038227081, 0.17291976511478424, -0.34975406527519226, -0.009457148611545563, 0.10649703443050385, 0.014876000583171844, 0.026049407199025154, -0.3596187233924866, 0.08319076895713806, -0.20891326665878296 ]
https://github.com/huggingface/datasets/issues/1766
Issues when run two programs compute the same metrics
Thank you for your response. I fixed the issue by set "keep_in_memory=True" when load_metric. I cannot share the entire source code but below is the wrapper I wrote: ```python class Evaluation: def __init__(self, metric='sacrebleu'): # self.metric = load_metric(metric, keep_in_memory=True) self.metric = load_metric(metric) def add(self, predictions, references): self.metric.add_batch(predictions=predictions, references=references) def compute(self): return self.metric.compute()['score'] ``` Then call the given wrapper as follows: ```python eval = Evaluation(metric='sacrebleu') for query, candidates, labels in tqdm(dataset): predictions = net.generate(query) references = [[s] for s in labels] eval.add(predictions, references) if n % 100 == 0: bleu += eval.compute() eval = Evaluation(metric='sacrebleu')
I got the following error when running two different programs that both compute sacreblue metrics. It seems that both read/and/write to the same location (.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow) where it caches the batches: ``` File "train_matching_min.py", line 160, in <module>ch_9_label avg_loss = valid(epoch, args.batch, args.validation, args.with_label) File "train_matching_min.py", line 93, in valid bleu += eval.compute() File "/u/tlhoang/projects/seal/match/models/eval.py", line 23, in compute return self.metric.compute()['score'] File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 387, in compute self._finalize() File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 355, in _finalize self.data = Dataset(**reader.read_files([{"filename": f} for f in file_paths])) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 231, in read_files pa_table = self._read_files(files) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 170, in _read_files pa_table: pa.Table = self._get_dataset_from_filename(f_dict) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 299, in _get_dataset_from_filename pa_table = f.read_all() File "pyarrow/ipc.pxi", line 481, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Expected to read 1819307375 metadata bytes, but only read 454396 ```
94
Issues when run two programs compute the same metrics I got the following error when running two different programs that both compute sacreblue metrics. It seems that both read/and/write to the same location (.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow) where it caches the batches: ``` File "train_matching_min.py", line 160, in <module>ch_9_label avg_loss = valid(epoch, args.batch, args.validation, args.with_label) File "train_matching_min.py", line 93, in valid bleu += eval.compute() File "/u/tlhoang/projects/seal/match/models/eval.py", line 23, in compute return self.metric.compute()['score'] File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 387, in compute self._finalize() File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 355, in _finalize self.data = Dataset(**reader.read_files([{"filename": f} for f in file_paths])) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 231, in read_files pa_table = self._read_files(files) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 170, in _read_files pa_table: pa.Table = self._get_dataset_from_filename(f_dict) File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 299, in _get_dataset_from_filename pa_table = f.read_all() File "pyarrow/ipc.pxi", line 481, in pyarrow.lib.RecordBatchReader.read_all File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Expected to read 1819307375 metadata bytes, but only read 454396 ``` Thank you for your response. I fixed the issue by set "keep_in_memory=True" when load_metric. I cannot share the entire source code but below is the wrapper I wrote: ```python class Evaluation: def __init__(self, metric='sacrebleu'): # self.metric = load_metric(metric, keep_in_memory=True) self.metric = load_metric(metric) def add(self, predictions, references): self.metric.add_batch(predictions=predictions, references=references) def compute(self): return self.metric.compute()['score'] ``` Then call the given wrapper as follows: ```python eval = Evaluation(metric='sacrebleu') for query, candidates, labels in tqdm(dataset): predictions = net.generate(query) references = [[s] for s in labels] eval.add(predictions, references) if n % 100 == 0: bleu += eval.compute() eval = Evaluation(metric='sacrebleu')
[ -0.36117449402809143, -0.1505344957113266, -0.04318747669458389, 0.3872220516204834, 0.2670595049858093, -0.10684031248092651, 0.08155131340026855, 0.30455532670021057, -0.1409018486738205, 0.21661463379859924, -0.3760761618614197, -0.013460120186209679, 0.08526712656021118, 0.005195209756493568, -0.18599970638751984, -0.04606280475854874, 0.003470808267593384, -0.009413585066795349, 0.07728254050016403, -0.0010646097362041473, -0.2850644886493683, 0.22799871861934662, 0.01634618639945984, 0.25543203949928284, -0.10162355750799179, -0.10285646468400955, -0.01355188898742199, -0.12158782035112381, -0.08570350706577301, -0.474290132522583, 0.4356848895549774, 0.028186429291963577, -0.16046588122844696, 0.7840999364852905, -0.00011886378342751414, 0.0990639179944992, 0.24837225675582886, 0.025843391194939613, -0.07039554417133331, -0.37163597345352173, 0.03052915632724762, -0.05601280927658081, 0.15529289841651917, -0.27520906925201416, 0.08796324580907822, -0.14308945834636688, 0.0955488458275795, -0.5427463054656982, 0.3801243305206299, 0.16474328935146332, 0.15466754138469696, 0.5314356088638306, -0.48682165145874023, -0.18242040276527405, 0.12838584184646606, -0.0579499751329422, -0.050340477377176285, 0.5445207953453064, 0.0008056461811065674, 0.20440690219402313, 0.023587360978126526, 0.4144546687602997, -0.11863964051008224, 0.26312893629074097, 0.05707883834838867, 0.09715490788221359, 0.4060325026512146, -0.0158633254468441, 0.16569384932518005, -0.12404336780309677, 0.2570584714412689, -0.3838200271129608, -0.22552846372127533, 0.13827767968177795, -0.19872242212295532, -0.5372883677482605, 0.185103178024292, 0.13695766031742096, -0.17830166220664978, -0.17635656893253326, -0.27794674038887024, 0.07205761224031448, -0.2121042162179947, -0.19637085497379303, 0.08150021731853485, -0.2687273919582367, -0.15741173923015594, 0.1643320918083191, 0.16940128803253174, 0.3121427893638611, 0.12401176989078522, 0.0018441472202539444, -0.1553126871585846, -0.008267856203019619, -0.4027772843837738, 0.054256826639175415, -0.30371180176734924, -0.3437746465206146, -0.09539125859737396, 0.2882912755012512, 0.3789707124233246, -0.04519413411617279, 0.28402382135391235, 0.22244569659233093, 0.030923370271921158, 0.700498104095459, 0.14984968304634094, 0.29020217061042786, 0.20090019702911377, 0.18106305599212646, -0.31000515818595886, -0.1913621723651886, 0.1990123689174652, -0.5310238599777222, 0.24141283333301544, 0.22001487016677856, -0.013256030157208443, -0.3235706388950348, -0.4480690062046051, 0.061548735946416855, 0.19388100504875183, -0.04671354964375496, 0.1330566108226776, 0.31950291991233826, 0.03391530364751816, 0.012323802337050438, 0.12787503004074097, 0.42627233266830444, -0.22094206511974335, 0.21000456809997559, -0.2910304665565491, 0.10027024149894714, -0.4435737133026123, 0.3646080195903778, 0.04746633395552635, -0.08391430974006653, 0.22430355846881866, -0.032046351581811905, 0.40319424867630005, -0.3089303970336914, 0.36521199345588684, -0.44217580556869507, -0.0029977038502693176, 0.09540876746177673, 0.07820107042789459, 0.22512060403823853, 0.29957127571105957, -0.0981406718492508, -0.08110480010509491, -0.0738893523812294, -0.1872102916240692, -0.149111807346344, 0.5365419387817383, 0.15635834634304047, -0.013178843073546886, 0.4289546310901642, -0.3462411165237427, -0.07320979237556458, 0.3937609791755676, -0.21731039881706238, 0.06996911764144897, 0.00657149963080883, -0.4017103612422943, -0.34708255529403687, 0.1470743864774704, 0.355144202709198, -0.2117389291524887, -0.07382600009441376, 0.29294922947883606, 0.12982866168022156, -0.010282807052135468, 0.4685418903827667, -0.22015555202960968, 0.1626339554786682, -0.28661513328552246, -0.02459399774670601, 0.5620931386947632, -0.8298758864402771, -0.3216199576854706, 0.11762575805187225, -0.16347326338291168, -0.33326905965805054, 0.08252200484275818, 0.042999301105737686, 0.3266257643699646, -0.08760493248701096, 0.08907311409711838, -0.22432594001293182, 0.13952244818210602, -0.15095330774784088, -0.3216230869293213, -0.3151443600654602, -0.06383319199085236, -0.2678597867488861, 0.2974463403224945, -0.047139860689640045, 0.24349701404571533, -0.2063739001750946, -0.060068465769290924, -0.12155701220035553, 0.020032130181789398, 0.2438933253288269, 0.18840792775154114, -0.028605639934539795, 0.09913492202758789, -0.28509071469306946, 0.29250285029411316, 0.14487391710281372, -0.5383428335189819, -0.29613611102104187, 0.16910679638385773, -0.20051069557666779, -0.1927509605884552, -0.08577680587768555, -0.07063879072666168, -0.19580301642417908, 0.0659022256731987, 0.13605837523937225, 0.22092020511627197, 0.27802160382270813, -0.05762776359915733, 0.3118053674697876, -0.05844669044017792, 0.07076763361692429, -0.09735073149204254, 0.07383132725954056, -0.12322831898927689, -0.26637154817581177, -0.09806042164564133, 0.07870876789093018, 0.3763604760169983, -0.022603565827012062, -0.1681237518787384, 0.3127591907978058, -0.11685390770435333, 0.21608701348304749, 0.1792306900024414, 0.11884207278490067, 0.1721312701702118, -0.2322569489479065, 0.004848359152674675, -0.03860759362578392, 0.1945938616991043, -0.09878003597259521, 0.4015491008758545, 0.29533272981643677, -0.022891048341989517, 0.12966179847717285, 0.27550214529037476, 0.017034804448485374, -0.10075235366821289, 0.028555389493703842, 0.17278644442558289, -0.1901313066482544, 0.3023919463157654, -0.09715168178081512, 0.052162881940603256, -0.11248967051506042, 0.0968034565448761, -0.10436325520277023, 0.1355571746826172, 0.16272270679473877, -0.0012209266424179077, -0.1695546805858612, -0.036949522793293, 0.07328789681196213, -0.2711121737957001, 0.28889980912208557, 0.7128474116325378, 0.022904038429260254, 0.15263141691684723, 0.13301222026348114, 0.018837593495845795, -0.1760331690311432, 0.1453157663345337, 0.20944304764270782, -0.10755973309278488, 0.09937864542007446, 0.16622227430343628, -0.08168753236532211, -0.03645636886358261, 0.09034086763858795, 0.03812282532453537, -0.021395297721028328, -0.1647397130727768, 0.3923782706260681, -0.02197156846523285, 0.0753559097647667, -0.5359922051429749, 0.014177035540342331, -0.028816308826208115, -0.16891832649707794, -0.10039284825325012, 0.36014577746391296, 0.04996800050139427, 0.0707450583577156, -0.2301943600177765, 0.5003136396408081, -0.27543750405311584, 0.2575496733188629, 0.021313555538654327, -0.15510424971580505, -0.3020186722278595, -0.07128038257360458, 0.16850516200065613, 0.06055031344294548, 0.3412749171257019, -0.17549438774585724, -0.06994928419589996, -0.20886331796646118, -0.18692393600940704, -0.04495725780725479, 0.28859949111938477, 0.4888949692249298, -0.05254523456096649, -0.13934871554374695, -0.3070409297943115, -0.34690046310424805, 0.31383270025253296, -0.4048359990119934, -0.20791910588741302, -0.1324315071105957, 0.015044616535305977, -0.2289842665195465, -0.18729586899280548, -0.10687517374753952, -0.024506518617272377, -0.22136767208576202, 0.20838642120361328, -0.20012526214122772, 0.03607200086116791, 0.07124748826026917, -0.1740553379058838, 0.11427570879459381, 0.07485713809728622, 0.11120046675205231, -0.2778829038143158, -0.19417479634284973, 0.022259168326854706, -0.40089544653892517, -0.19502823054790497, -0.04202140122652054, 0.1363772302865982, 0.4599737524986267, 0.23688539862632751, -0.42594945430755615, -0.43684810400009155, -0.16821865737438202, -0.11737577617168427, 0.10201546549797058, -0.04186171293258667, 0.05511942878365517, -0.06823014467954636, -0.1335442066192627, -0.15035101771354675, -0.19333195686340332, 0.5020689368247986, -0.2520495057106018, 0.06857345253229141, -0.16039630770683289, -0.12222712486982346, 0.04430055245757103, 0.8054549098014832, 0.41464248299598694, 0.08388271182775497, 0.31428658962249756, 0.20357215404510498, 0.3654502332210541, 0.00396902859210968, -0.3886856734752655, 0.18849293887615204, 0.020065367221832275, -0.27146920561790466, 0.1279638558626175, -0.08590033650398254, 0.10546614974737167, -0.1474001258611679, -0.11587300896644592, -0.2137659788131714, -0.09552472829818726, -0.14897003769874573, -0.2166234254837036, 0.23570632934570312, 0.08295710384845734, 0.09117323905229568, -0.32166993618011475, 0.027716033160686493, 0.22083058953285217, 0.23617906868457794, -0.28037115931510925, 0.02431938238441944, -0.1450069695711136, -0.18176820874214172, -0.22255489230155945, 0.5148037672042847, 0.08916260302066803, 0.24470025300979614, -0.20914731919765472, 0.14087849855422974, 0.052331261336803436, -0.07097135484218597, 0.6638152003288269, -0.07394778728485107, -0.08686594665050507, -0.11097976565361023, -0.019375711679458618, -0.40940412878990173, -0.1419026404619217, 0.05507383123040199, 0.13664351403713226, 0.1798197329044342, 0.483946830034256, -0.12086011469364166, -0.005179175175726414, -0.015306014567613602, 0.012094514444470406, -0.18546456098556519, -0.20062853395938873, -0.3357677161693573, -0.38311517238616943, 0.0732777789235115, 0.07374809682369232, -0.019512467086315155, 0.045213863253593445, -0.09378696978092194, 0.09407033026218414, -0.17311258614063263, 0.047435007989406586, 0.24365726113319397, -0.013380555436015129, 0.5679036974906921, -0.3699098229408264, 0.11976239085197449, 0.27744367718696594, 0.08131604641675949, 0.29054883122444153, 0.261848509311676, -0.14876168966293335, -0.4146741032600403, 0.11547952145338058, 0.08396831899881363, -0.006803229451179504, 0.4959118068218231, -0.17064690589904785, 0.1998109221458435, -0.014372475445270538, -0.052506715059280396, 0.12229082733392715, 0.07163878530263901, 0.2608545422554016, 0.3012564182281494, -0.08179666101932526, -0.1803607940673828, 0.0001939833164215088, 0.4088627099990845, -0.11109663546085358, 0.4448747932910919, -0.3718871474266052, -0.13043026626110077, 0.18317373096942902, 0.20753958821296692, 1.141523003578186, 0.10962021350860596, 0.09404276311397552, 0.3654058277606964, -0.3788009285926819, 0.14488042891025543, -0.13388454914093018, 0.3521232604980469, -0.2913299798965454, -0.4262787997722626, 0.044398233294487, -0.42348140478134155, 0.0784708634018898, -0.2582252621650696, -0.09879358857870102, 0.2994014322757721, -0.25757142901420593, 0.022854454815387726, -0.16757448017597198, -0.00948137417435646, -0.17644624412059784, 0.16377504169940948, 0.27844107151031494, 0.11873959004878998, -0.1347375065088272, 0.19182486832141876, -0.19578015804290771, -0.20621958374977112, -0.2727341055870056, -0.12412860244512558, -0.19991004467010498, 0.12547603249549866, -0.3591460883617401, 0.5477303862571716, -0.028982210904359818, -0.187350332736969, -0.05643826350569725, 0.3179163634777069, 1.0567492246627808, -0.03375161811709404, -0.05322813242673874, 0.1115206778049469, 0.13227447867393494, 0.07698182016611099, 0.0788673385977745, -0.4823550283908844, 0.12167954444885254, -0.16219890117645264, -0.20465774834156036, -0.010241024196147919, 0.17127390205860138, 0.054547786712646484, 0.14362302422523499, 0.006504647433757782, -0.04427225887775421, -0.14536039531230927, 0.07130834460258484, 0.05382462590932846, -0.038230448961257935, -0.14293959736824036, 0.036585718393325806, -0.050324492156505585, -0.2049170583486557, 0.12930822372436523, -0.21363972127437592, -0.35866275429725647, 0.1601792424917221, 0.23918229341506958, 0.32215988636016846, -0.3406074345111847, 0.5207617282867432, -0.41818302869796753, -0.16472114622592926, -0.12292801588773727, -0.4281487762928009, -0.10484465211629868, -0.4858563542366028, 0.3519490361213684, -0.32848384976387024, -0.023038305342197418, -0.12904177606105804, 0.4235874116420746, 0.3696022033691406, 0.20826375484466553, -0.05143290385603905, -0.25757357478141785, -0.30797338485717773, 0.06654304265975952, -0.25606465339660645, 0.2094360888004303, -0.06678207963705063, 0.2033172845840454, -0.11510499566793442, 0.24687670171260834, -0.22908280789852142, 0.14910888671875, -0.2235807478427887, -0.057861216366291046, -0.023992713540792465, -0.3083413243293762, 0.27396851778030396, 0.05836612358689308, -0.08296195417642593, 0.24497433006763458, -0.415068656206131, -0.10257432609796524, -0.17030692100524902, 0.16700229048728943, -0.20108765363693237, -0.1663457304239273, -0.16397564113140106, -0.08493779599666595, 0.2917099595069885, -0.09668415039777756, 0.038523998111486435, 0.49527621269226074, -0.004727199673652649, -0.1825712025165558, -0.08010135591030121, 0.35791316628456116, 0.07604223489761353, 0.3112908601760864, 0.07226972281932831, -0.08911646902561188, 0.04557052627205849, 0.2249445766210556, -0.17519836127758026, -0.15445353090763092, -0.21517474949359894, -0.10359487682580948, 0.1023804321885109, 0.1173030287027359, -0.23846960067749023, -0.378930926322937, -0.27736830711364746, 0.04926256835460663, 0.23944509029388428, 0.1593904346227646, -0.022153308615088463, -0.16762685775756836, 0.045271921902894974, 0.1217806339263916, 0.003555312752723694, 0.010083287954330444, 0.07127945125102997, -0.0665706917643547, -0.2697436213493347, 0.2501278519630432, 0.43670496344566345, -0.05953969806432724, 0.21535906195640564, 0.08357375115156174, 0.31534600257873535, -0.35912376642227173, 0.4809868335723877, -0.3079815208911896, 0.2562142312526703, 0.2291850745677948, 0.2896815240383148, 0.14021660387516022, 0.16424591839313507, -0.1615503877401352, -0.2578151226043701, 0.3288826048374176, 0.10091480612754822, -0.06562423706054688, -0.17589324712753296, -0.18314343690872192, -0.12390045821666718, -0.11554145812988281, -0.11641667783260345, 0.1536555141210556, -0.0742521584033966, 0.4652308225631714, -0.2960211932659149, -0.3396768867969513, -0.23517295718193054, 0.09778331965208054, -0.2720488905906677, -0.10778716206550598, 0.03149022161960602, -0.31711286306381226, 0.22783389687538147, 0.04680364951491356, 0.24422061443328857, 0.21211154758930206, 0.22097903490066528, 0.046521127223968506, -0.24910040199756622, 0.06072041392326355, -0.2737986445426941, 0.6104675531387329, 0.05761875584721565, -0.11997590959072113, 0.3298224210739136, 0.22804632782936096, -0.04174957424402237, 0.041511066257953644, 0.662318229675293, 0.5221065878868103, 0.36180025339126587, 0.0910816490650177, -0.11469510197639465, 0.234205961227417, 0.12283051013946533, -0.014762374572455883, 0.17361071705818176, 0.25218355655670166, -0.19602368772029877, 0.24716906249523163, 0.15071094036102295, -0.11467903107404709, 0.3636132776737213, -0.06445266306400299, 0.20040012896060944, -0.2909458577632904, 0.28443214297294617, -0.17783135175704956, 0.020578131079673767, -0.1967293918132782, -0.04218364506959915, -0.5328440070152283, 0.10240016132593155, 0.2991534173488617, -0.17903642356395721, 0.23910987377166748, -0.09700628370046616, 0.07179594039916992, 0.18408112227916718, 0.24527594447135925, 0.4780642092227936, 0.12574103474617004, -0.5874688029289246, 0.054121509194374084, -0.4772074818611145, 0.4764416515827179, 0.059209927916526794, 0.4164777994155884, -0.29253846406936646, 0.25833937525749207, -0.24825254082679749, -0.1623592972755432, 0.48186665773391724, 0.1885388195514679, -0.030882954597473145, 0.06821557134389877, -0.5626352429389954, 0.17880591750144958, 0.04102964699268341, -0.31437334418296814, 0.25320762395858765, -0.3407094478607178, 0.029123596847057343, 0.0009258110076189041, 0.03304697573184967, 0.2292572557926178, 0.05430927127599716, 0.07945385575294495, -0.09887993335723877, 0.33971309661865234, 0.1724281758069992, 0.3838353455066681, 0.0864269807934761, 0.015271415933966637, -0.0633857250213623, -0.1108325868844986, -0.24124762415885925, -0.11479849368333817, 0.03567182272672653, 0.22264464199543, -0.5101050734519958, 0.05442216247320175, -0.3817656934261322, 0.20330557227134705, 0.24251259863376617, -0.21945340931415558, 0.052878886461257935, -0.09754279255867004, 0.01984439045190811, 0.016312798485159874, 0.4529062807559967, 0.40420907735824585, 0.09369048476219177, 0.4554384648799896, -0.3360854983329773, -0.12962456047534943, 0.5763475894927979, -0.5234944224357605, -0.2780396640300751, 0.11900467425584793, 0.44339126348495483, 0.3934999704360962, 0.0013247784227132797, -0.6530671119689941, -0.0659775510430336, 0.2789849042892456, -0.16010794043540955, -0.05280216038227081, 0.17291976511478424, -0.34975406527519226, -0.009457148611545563, 0.10649703443050385, 0.014876000583171844, 0.026049407199025154, -0.3596187233924866, 0.08319076895713806, -0.20891326665878296 ]
https://github.com/huggingface/datasets/issues/1765
Error iterating over Dataset with DataLoader
Instead of: ```python dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ``` It should be: ```python dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_size=32) ``` `batch_sampler` accepts a Sampler object or an Iterable, so you get an error.
I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ```
30
Error iterating over Dataset with DataLoader I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ``` Instead of: ```python dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ``` It should be: ```python dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_size=32) ``` `batch_sampler` accepts a Sampler object or an Iterable, so you get an error.
[ -0.2379290610551834, 0.055456504225730896, -0.04567072540521622, 0.20573298633098602, 0.1531803011894226, 0.000141143798828125, 0.792131781578064, 0.30685192346572876, 0.021130643784999847, 0.1527133285999298, 0.04679551720619202, 0.23042553663253784, -0.2809545695781708, -0.24164411425590515, -0.09022638201713562, -0.06044984608888626, -0.07645409554243088, 0.0790700763463974, -0.12242209911346436, 0.03289387375116348, -0.14354035258293152, -0.08673018962144852, -0.19259729981422424, 0.03193603828549385, -0.25093865394592285, -0.13227081298828125, -0.10359163582324982, -0.09470771998167038, -0.33412519097328186, -0.5228336453437805, 0.2897108495235443, 0.11794869601726532, 0.42384791374206543, 0.6812458634376526, -0.00011708562669809908, 0.053265489637851715, 0.120496466755867, -0.12161406129598618, -0.2641814053058624, -0.2320629507303238, 0.1392342448234558, -0.0516229048371315, 0.033674925565719604, -0.3547690510749817, 0.26056039333343506, -0.33127161860466003, -0.017206234857439995, -0.2235834300518036, 0.1987377405166626, 0.24071073532104492, 0.12731043994426727, 0.48786798119544983, -0.01306585967540741, 0.06860649585723877, 0.045241713523864746, 0.25054359436035156, -0.019511356949806213, 0.1971430629491806, 0.19162483513355255, 0.010227501392364502, -0.3597659170627594, 0.11686784029006958, -0.16907085478305817, 0.04752366244792938, 0.1359686553478241, -0.11273882538080215, -0.21776068210601807, -0.13206057250499725, -0.03268358111381531, -0.07962892204523087, 0.5732848048210144, -0.2473982870578766, -0.33389079570770264, -0.16551584005355835, -0.22153036296367645, -0.267302542924881, 0.31921154260635376, -0.1650732457637787, -0.1586039513349533, -0.21399015188217163, 0.11575722694396973, 0.2405710071325302, -0.204026460647583, 0.1367143988609314, -0.25916051864624023, 0.2086893916130066, -0.049849964678287506, 0.30450013279914856, 0.2167694866657257, -0.25569677352905273, 0.3407100737094879, 0.10055159777402878, 0.0440492257475853, 0.27522870898246765, -0.5098055005073547, -0.2515716850757599, 0.09336569160223007, -0.4813285171985626, -0.08895111083984375, 0.18174752593040466, 0.2512766718864441, 0.06592321395874023, -0.026723071932792664, 0.24206465482711792, 0.4608974754810333, 0.18674716353416443, 0.16861027479171753, 0.34300729632377625, 0.05600258335471153, -0.1008400022983551, 0.11158250272274017, -0.06283818930387497, -0.3309619128704071, -0.3040350079536438, 0.22978655993938446, 0.10076084733009338, 0.2355152815580368, 0.06380373239517212, -0.24075227975845337, -0.0010413257405161858, -0.28543975949287415, -0.14088352024555206, 0.11154287308454514, 0.14669710397720337, 0.21548247337341309, 0.07846545428037643, -0.021196315065026283, 0.04944782704114914, -0.02945898473262787, -0.1010555624961853, -0.06310305744409561, 0.1225908100605011, -0.23600460588932037, 0.0062334900721907616, 0.2692129909992218, -0.04495188966393471, -0.000597548671066761, 0.13793231546878815, -0.016348935663700104, 0.106493279337883, 0.18383029103279114, -0.167745441198349, 0.27512121200561523, -0.06683069467544556, 0.05263787880539894, 0.3259076476097107, 0.24278861284255981, 0.052704550325870514, -0.15170422196388245, 0.006441593170166016, -0.4252358376979828, -0.08540761470794678, -0.07112929224967957, 0.13438482582569122, -0.06572791934013367, -0.05965486913919449, -0.40290209650993347, -0.19306109845638275, 0.34761080145835876, -0.15928402543067932, 0.09902076423168182, -0.2618944048881531, 0.0679653137922287, -0.09494350850582123, 0.07169866561889648, 0.3785111606121063, -0.45884206891059875, -0.13893190026283264, 0.15586847066879272, 0.10057884454727173, 0.2683536112308502, 0.2800271213054657, -0.2775178551673889, 0.5750993490219116, -0.4041409194469452, 0.3146158456802368, 0.33827415108680725, -0.4575733542442322, -0.3010724186897278, 0.30232328176498413, -0.1728585958480835, 0.18284380435943604, 0.1311054229736328, 0.02209586463868618, 0.40725448727607727, -0.21179890632629395, 0.12621450424194336, 0.13122227787971497, -0.1754140704870224, -0.0844983458518982, -0.018889285624027252, 0.40735629200935364, 0.5204413533210754, 0.05792112275958061, 0.18990811705589294, 0.09117458760738373, -0.25631189346313477, 0.1866557002067566, 0.04072452709078789, -0.16240239143371582, 0.07528024911880493, 0.14618176221847534, 0.08729252219200134, 0.11540152132511139, 0.2047131359577179, -0.1541338860988617, -0.24141407012939453, 0.017452780157327652, 0.08473578095436096, 0.1103394478559494, -0.1569613367319107, 0.1011081337928772, 0.01563006266951561, 0.18338946998119354, -0.4093039035797119, -0.14764484763145447, 0.10579892992973328, 0.339177668094635, -0.10850541293621063, -0.22628025710582733, -0.2782577574253082, 0.010197176598012447, -0.15022438764572144, 0.1229051798582077, -0.3177070617675781, 0.07564619928598404, 0.07310948520898819, -0.16212035715579987, -0.1109914556145668, 0.0012581869959831238, 0.2185538411140442, -0.23059509694576263, -0.01987547241151333, 0.15274401009082794, 0.07335072755813599, 0.08376584947109222, -0.1409197747707367, 0.08403689414262772, 0.20277567207813263, -0.08059152960777283, -0.03504162281751633, 0.02632415108382702, 0.06335452198982239, -0.2463468313217163, 0.2860276699066162, 0.35574185848236084, -0.04151250049471855, 0.543895959854126, -0.18461403250694275, 0.1865570992231369, 0.0854833647608757, 0.14296309649944305, -0.22977523505687714, 0.1214379221200943, 0.2915952801704407, 0.16527868807315826, 0.27270621061325073, -0.0742383822798729, -0.10618802905082703, -0.016254037618637085, 0.13578571379184723, 0.03465652838349342, -0.1672893464565277, 0.06450604647397995, -0.2023296356201172, 0.07873284071683884, 0.14318910241127014, -0.3583349287509918, 0.2936249077320099, -0.04196431487798691, 0.13556279242038727, -0.22973188757896423, 0.1093873679637909, 0.054877884685993195, -0.006824798882007599, 0.13736769556999207, 0.050109557807445526, 0.13657481968402863, -0.017988819628953934, 0.03299069032073021, -0.19934505224227905, -0.26190444827079773, -0.03216422349214554, 0.4030469059944153, -0.20175081491470337, 0.4200804531574249, -0.22512339055538177, -0.08061394840478897, -0.13573622703552246, -0.46374309062957764, -0.1244163066148758, -0.48858386278152466, -0.29348886013031006, 0.4377196431159973, -0.05235612019896507, 0.2884214222431183, 0.15930208563804626, 0.06599539518356323, 0.6007102131843567, -0.12018122524023056, -0.1299339085817337, -0.16516080498695374, -0.14348658919334412, 0.0020231548696756363, 0.39166539907455444, -0.39059263467788696, 0.31923893094062805, -0.14857293665409088, -0.03643973916769028, -0.49318212270736694, -0.1713026762008667, 0.23434646427631378, -0.2515103220939636, -0.10610975325107574, 0.2501232922077179, 0.16031180322170258, -0.12767401337623596, -0.3462356626987457, 0.23602157831192017, -0.09714030474424362, -0.05986085534095764, 0.3538428544998169, -0.017858019098639488, 0.16488473117351532, 0.19423888623714447, -0.16180527210235596, -0.11437442153692245, -0.22104205191135406, 0.1488947570323944, -0.02422526851296425, 0.3098028302192688, 0.1279517114162445, 0.05087652802467346, 0.0688198059797287, 0.053886692970991135, -0.0885351151227951, -0.05291750654578209, -0.4608559012413025, 0.4211558997631073, -0.31889769434928894, -0.29355117678642273, -0.06109808757901192, -0.005195258185267448, 0.358340322971344, 0.3748795986175537, -0.29544806480407715, -0.001978849060833454, 0.19680283963680267, 0.0960601419210434, -0.1780661642551422, 0.013300919905304909, 0.1617015302181244, 0.11657088994979858, -0.05268663540482521, -0.05286765471100807, 0.14581628143787384, 0.1710810661315918, -0.18763363361358643, 0.25809890031814575, 0.15930244326591492, 0.4765360951423645, 0.2614041268825531, 0.6606873273849487, 0.038906797766685486, -0.3858363628387451, 0.33210211992263794, -0.1400645226240158, -0.0007826462388038635, 0.08665775507688522, -0.6534714698791504, 0.1830664426088333, -0.28974252939224243, -0.026324423030018806, -0.10860742628574371, -0.3637518584728241, -0.20201337337493896, -0.16557000577449799, 0.16914500296115875, -0.02716073766350746, -0.3952353894710541, 0.4657106101512909, -0.43040144443511963, 0.2838456630706787, -0.07929583638906479, 0.13681241869926453, -0.6179904937744141, -0.01597042754292488, 0.1340286135673523, 0.0014616549015045166, 0.2550834119319916, -0.08203370869159698, -0.3944139778614044, 0.07718804478645325, -0.4658883810043335, 0.23202815651893616, 0.08530592918395996, 0.7238262295722961, 0.1851678192615509, -0.20388635993003845, -0.1605457216501236, -0.03389428183436394, 0.7261366844177246, 0.23516243696212769, -0.013185404241085052, 0.09821474552154541, -0.3114120066165924, -0.4381251037120819, -0.07942812144756317, -0.27742674946784973, 0.6424909830093384, 0.15633359551429749, 0.2806633710861206, -0.23284581303596497, -0.13018563389778137, 0.11599018424749374, 0.10674536228179932, -0.21584342420101166, -0.27482280135154724, -0.07602312415838242, -0.06804312765598297, -0.35322338342666626, -0.014091625809669495, 0.04383896291255951, 0.28205251693725586, 0.09237001091241837, 0.02206074818968773, -0.3040832579135895, -0.02766639180481434, 0.36235398054122925, -0.04278600960969925, 0.06606992334127426, -0.1614818572998047, 0.15831461548805237, 0.1936408132314682, 0.2400771677494049, 0.641128420829773, 0.30705350637435913, 0.24509121477603912, -0.4524517059326172, 0.3747635781764984, 0.056793320924043655, 0.27895236015319824, 0.12668326497077942, -0.11202515661716461, -0.0463847741484642, -0.3257368803024292, 0.05009084194898605, -0.43527522683143616, 0.5216365456581116, 0.5002287030220032, 0.14700330793857574, -0.5732987523078918, -0.3403778076171875, 0.20203854143619537, 0.11379586160182953, 0.18212969601154327, 0.7328405976295471, -0.1325450986623764, -0.13832250237464905, 0.1305193454027176, 0.13689598441123962, 0.73729008436203, 0.05995890125632286, 0.12415485084056854, 0.41108137369155884, 0.5742588043212891, 0.28740352392196655, -0.5326962471008301, 0.09997867792844772, -0.22785107791423798, -0.04775974154472351, -0.1629464328289032, -0.25533121824264526, 0.03875802457332611, 0.17045849561691284, -0.059647612273693085, 0.18026210367679596, -0.03505464643239975, 0.5183295011520386, 0.09845241904258728, 0.06107647716999054, -0.3110625147819519, -0.29220274090766907, 0.09589265286922455, 0.11329369246959686, -0.1642976850271225, 0.14646193385124207, -0.07750952243804932, -0.0749974250793457, 0.18221336603164673, -0.2826288342475891, -0.2507404685020447, -0.025755833834409714, -0.22850890457630157, 0.10249286890029907, 0.03291715681552887, -0.4766203761100769, 0.10104304552078247, 0.013341326266527176, 0.05072762444615364, -0.09035946428775787, 0.07236272841691971, -0.22122697532176971, -0.04071824997663498, -0.13065004348754883, -0.1328616738319397, -0.08464229851961136, 0.40968629717826843, 0.12493745237588882, 0.13089695572853088, 0.28170648217201233, 0.23024612665176392, -0.3494545817375183, 0.08346448838710785, 0.22286628186702728, 0.23815256357192993, -0.5538776516914368, 0.10674944519996643, -0.11697626113891602, -0.20017214119434357, -0.2225143313407898, 0.0751270204782486, 0.003570772707462311, -0.3264313340187073, 0.006171859800815582, -0.1581956148147583, -0.09417001157999039, 0.09128502011299133, 0.41936612129211426, 0.09900609403848648, -0.4401397407054901, 0.7563033103942871, 0.18333370983600616, -0.2378757894039154, -0.16016007959842682, 0.13041463494300842, 0.4554121792316437, -0.26989611983299255, 0.10516273975372314, -0.3681175410747528, 0.19371221959590912, -0.20565152168273926, 0.09545361995697021, 0.07498288154602051, 0.0011242106556892395, -0.08470675349235535, -0.3185296058654785, -0.37638577818870544, 0.06417316943407059, -0.12759710848331451, 0.2709617614746094, 0.06571377068758011, 0.1442405730485916, -0.24248625338077545, 0.10846738517284393, -0.2284083217382431, -0.0599614679813385, -0.13040657341480255, 0.21702063083648682, 0.06876564770936966, -0.11554979532957077, -0.02996569313108921, 0.164311021566391, 0.08759870380163193, 0.3649314045906067, 0.07729586213827133, -0.21717265248298645, -0.11241079866886139, 0.10818684846162796, 0.12695541977882385, -0.2696894705295563, 0.07013238221406937, -0.021664656698703766, -0.01061202958226204, -0.3168858587741852, 0.09200872480869293, 0.05930749326944351, -0.03379938751459122, 0.2827904224395752, 0.3835878372192383, 0.04531223699450493, 0.10487338900566101, 0.020299438387155533, 0.24440480768680573, 0.26442837715148926, 0.18606147170066833, 0.32218536734580994, -0.03469739854335785, -0.061479128897190094, -0.2507390081882477, 0.36399248242378235, 0.3781980276107788, -0.11715055257081985, 0.156258225440979, -0.4842170476913452, 0.1358971893787384, -0.13094668090343475, 0.2535530924797058, 0.611329197883606, -0.35448983311653137, -0.15539158880710602, 0.16911262273788452, 0.11266213655471802, -0.004548309370875359, 0.03866658732295036, 0.0609535351395607, -0.05782102793455124, -0.005827050656080246, 0.19322964549064636, -0.057137105613946915, -0.06116662174463272, 0.13544248044490814, -0.08294620364904404, 0.28895992040634155, -0.16346675157546997, 0.1883116215467453, 0.06417673826217651, -0.42789775133132935, -0.08586524426937103, 0.3677484691143036, 0.2824957072734833, 0.1013360396027565, 0.2784428000450134, -0.10788040608167648, 0.4273214042186737, 0.07083895802497864, -0.24930399656295776, -0.016587771475315094, -0.4929744005203247, -0.329954594373703, 0.11119722574949265, 0.2463369220495224, 0.19480162858963013, 0.048969171941280365, 0.3200196623802185, -0.07998926192522049, -0.11177302151918411, -0.021363649517297745, 0.19566914439201355, -0.2775021493434906, 0.09631124138832092, -0.3862144351005554, -0.22133585810661316, -0.20778816938400269, -0.10474881529808044, -0.07726974785327911, -0.1806132197380066, 0.0019157379865646362, 0.11878727376461029, -0.18749941885471344, -0.42980432510375977, 0.06275072693824768, -0.004547931253910065, -0.1123516634106636, -0.3342282772064209, 0.21795929968357086, 0.16026291251182556, 0.11708513647317886, 0.03490929678082466, 0.265189528465271, 0.5087575912475586, 0.46108490228652954, -0.14944615960121155, 0.17691510915756226, -0.501087486743927, -0.19116181135177612, -0.06311273574829102, 0.11251846700906754, -0.4148903787136078, -0.10147596895694733, 0.3867390751838684, 0.08408298343420029, -0.11434430629014969, -0.2153681069612503, 0.13407471776008606, 0.0735938549041748, 0.00014839135110378265, 0.12479199469089508, -0.08155643194913864, 0.04142792522907257, -0.0814749076962471, -0.044169507920742035, -0.4062022268772125, -0.11823451519012451, 0.46783411502838135, 0.11666365712881088, 0.19685912132263184, 0.020753897726535797, 0.058962076902389526, -0.25033965706825256, 0.42579859495162964, 0.4754784405231476, 0.2222505807876587, -0.40928903222084045, -0.2357499748468399, -0.295870840549469, 0.3727256655693054, -0.12138880789279938, -0.19496598839759827, -0.019623221829533577, 0.16514836251735687, 0.3228292167186737, 0.26910915970802307, 0.24353060126304626, -0.14532260596752167, -0.07103810459375381, 0.33608028292655945, -0.32356706261634827, -0.33205077052116394, 0.035634368658065796, 0.2394295036792755, -0.06713181734085083, -0.2778090238571167, 0.23340676724910736, -0.10085997730493546, 0.13328245282173157, -0.20465661585330963, -0.3008013367652893, 0.08007314801216125, 0.04444568231701851, 0.44286373257637024, 0.18970057368278503, 0.42728421092033386, 0.09459976106882095, 0.06287761777639389, -0.27842238545417786, -0.23615778982639313, -0.19147416949272156, 0.04522627592086792, 0.044853679835796356, 0.2142351120710373, -0.03245288133621216, -0.13446144759655, -0.5011915564537048, 0.21689584851264954, -0.10915284603834152, -0.29114028811454773, -0.3574866056442261, 0.27954617142677307, 0.003716088831424713, 0.07022722065448761, -0.07147317379713058, 0.2456231415271759, 0.21205805242061615, 0.5372604727745056, -0.367276132106781, -0.29441529512405396, 0.4216318428516388, -0.6915381550788879, -0.4907267093658447, 0.025035202503204346, -0.1989058554172516, 0.17865654826164246, 0.27032434940338135, -0.56406170129776, 0.003102049231529236, 0.31720420718193054, -0.16942083835601807, -0.13272783160209656, 0.0034329108893871307, 0.09697689116001129, 0.024014350026845932, -0.16893543303012848, 0.3889949917793274, 0.10353568941354752, -0.0350186862051487, -0.017747923731803894, -0.22362670302391052 ]
https://github.com/huggingface/datasets/issues/1765
Error iterating over Dataset with DataLoader
@mariosasko I thought that would fix it, but now I'm getting a different error: ``` /usr/local/lib/python3.6/dist-packages/datasets/arrow_dataset.py:851: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at /pytorch/torch/csrc/utils/tensor_numpy.cpp:141.) return torch.tensor(x, **format_kwargs) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-20-3af1d82bf93a> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_size=32) ----> 2 next(iter(dataloader)) 5 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/collate.py in default_collate(batch) 53 storage = elem.storage()._new_shared(numel) 54 out = elem.new(storage) ---> 55 return torch.stack(batch, 0, out=out) 56 elif elem_type.__module__ == 'numpy' and elem_type.__name__ != 'str_' \ 57 and elem_type.__name__ != 'string_': RuntimeError: stack expects each tensor to be equal size, but got [7] at entry 0 and [10] at entry 1 ``` Any thoughts what this means?I Do I need padding?
I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ```
169
Error iterating over Dataset with DataLoader I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ``` @mariosasko I thought that would fix it, but now I'm getting a different error: ``` /usr/local/lib/python3.6/dist-packages/datasets/arrow_dataset.py:851: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at /pytorch/torch/csrc/utils/tensor_numpy.cpp:141.) return torch.tensor(x, **format_kwargs) --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-20-3af1d82bf93a> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_size=32) ----> 2 next(iter(dataloader)) 5 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/collate.py in default_collate(batch) 53 storage = elem.storage()._new_shared(numel) 54 out = elem.new(storage) ---> 55 return torch.stack(batch, 0, out=out) 56 elif elem_type.__module__ == 'numpy' and elem_type.__name__ != 'str_' \ 57 and elem_type.__name__ != 'string_': RuntimeError: stack expects each tensor to be equal size, but got [7] at entry 0 and [10] at entry 1 ``` Any thoughts what this means?I Do I need padding?
[ -0.2379290610551834, 0.055456504225730896, -0.04567072540521622, 0.20573298633098602, 0.1531803011894226, 0.000141143798828125, 0.792131781578064, 0.30685192346572876, 0.021130643784999847, 0.1527133285999298, 0.04679551720619202, 0.23042553663253784, -0.2809545695781708, -0.24164411425590515, -0.09022638201713562, -0.06044984608888626, -0.07645409554243088, 0.0790700763463974, -0.12242209911346436, 0.03289387375116348, -0.14354035258293152, -0.08673018962144852, -0.19259729981422424, 0.03193603828549385, -0.25093865394592285, -0.13227081298828125, -0.10359163582324982, -0.09470771998167038, -0.33412519097328186, -0.5228336453437805, 0.2897108495235443, 0.11794869601726532, 0.42384791374206543, 0.6812458634376526, -0.00011708562669809908, 0.053265489637851715, 0.120496466755867, -0.12161406129598618, -0.2641814053058624, -0.2320629507303238, 0.1392342448234558, -0.0516229048371315, 0.033674925565719604, -0.3547690510749817, 0.26056039333343506, -0.33127161860466003, -0.017206234857439995, -0.2235834300518036, 0.1987377405166626, 0.24071073532104492, 0.12731043994426727, 0.48786798119544983, -0.01306585967540741, 0.06860649585723877, 0.045241713523864746, 0.25054359436035156, -0.019511356949806213, 0.1971430629491806, 0.19162483513355255, 0.010227501392364502, -0.3597659170627594, 0.11686784029006958, -0.16907085478305817, 0.04752366244792938, 0.1359686553478241, -0.11273882538080215, -0.21776068210601807, -0.13206057250499725, -0.03268358111381531, -0.07962892204523087, 0.5732848048210144, -0.2473982870578766, -0.33389079570770264, -0.16551584005355835, -0.22153036296367645, -0.267302542924881, 0.31921154260635376, -0.1650732457637787, -0.1586039513349533, -0.21399015188217163, 0.11575722694396973, 0.2405710071325302, -0.204026460647583, 0.1367143988609314, -0.25916051864624023, 0.2086893916130066, -0.049849964678287506, 0.30450013279914856, 0.2167694866657257, -0.25569677352905273, 0.3407100737094879, 0.10055159777402878, 0.0440492257475853, 0.27522870898246765, -0.5098055005073547, -0.2515716850757599, 0.09336569160223007, -0.4813285171985626, -0.08895111083984375, 0.18174752593040466, 0.2512766718864441, 0.06592321395874023, -0.026723071932792664, 0.24206465482711792, 0.4608974754810333, 0.18674716353416443, 0.16861027479171753, 0.34300729632377625, 0.05600258335471153, -0.1008400022983551, 0.11158250272274017, -0.06283818930387497, -0.3309619128704071, -0.3040350079536438, 0.22978655993938446, 0.10076084733009338, 0.2355152815580368, 0.06380373239517212, -0.24075227975845337, -0.0010413257405161858, -0.28543975949287415, -0.14088352024555206, 0.11154287308454514, 0.14669710397720337, 0.21548247337341309, 0.07846545428037643, -0.021196315065026283, 0.04944782704114914, -0.02945898473262787, -0.1010555624961853, -0.06310305744409561, 0.1225908100605011, -0.23600460588932037, 0.0062334900721907616, 0.2692129909992218, -0.04495188966393471, -0.000597548671066761, 0.13793231546878815, -0.016348935663700104, 0.106493279337883, 0.18383029103279114, -0.167745441198349, 0.27512121200561523, -0.06683069467544556, 0.05263787880539894, 0.3259076476097107, 0.24278861284255981, 0.052704550325870514, -0.15170422196388245, 0.006441593170166016, -0.4252358376979828, -0.08540761470794678, -0.07112929224967957, 0.13438482582569122, -0.06572791934013367, -0.05965486913919449, -0.40290209650993347, -0.19306109845638275, 0.34761080145835876, -0.15928402543067932, 0.09902076423168182, -0.2618944048881531, 0.0679653137922287, -0.09494350850582123, 0.07169866561889648, 0.3785111606121063, -0.45884206891059875, -0.13893190026283264, 0.15586847066879272, 0.10057884454727173, 0.2683536112308502, 0.2800271213054657, -0.2775178551673889, 0.5750993490219116, -0.4041409194469452, 0.3146158456802368, 0.33827415108680725, -0.4575733542442322, -0.3010724186897278, 0.30232328176498413, -0.1728585958480835, 0.18284380435943604, 0.1311054229736328, 0.02209586463868618, 0.40725448727607727, -0.21179890632629395, 0.12621450424194336, 0.13122227787971497, -0.1754140704870224, -0.0844983458518982, -0.018889285624027252, 0.40735629200935364, 0.5204413533210754, 0.05792112275958061, 0.18990811705589294, 0.09117458760738373, -0.25631189346313477, 0.1866557002067566, 0.04072452709078789, -0.16240239143371582, 0.07528024911880493, 0.14618176221847534, 0.08729252219200134, 0.11540152132511139, 0.2047131359577179, -0.1541338860988617, -0.24141407012939453, 0.017452780157327652, 0.08473578095436096, 0.1103394478559494, -0.1569613367319107, 0.1011081337928772, 0.01563006266951561, 0.18338946998119354, -0.4093039035797119, -0.14764484763145447, 0.10579892992973328, 0.339177668094635, -0.10850541293621063, -0.22628025710582733, -0.2782577574253082, 0.010197176598012447, -0.15022438764572144, 0.1229051798582077, -0.3177070617675781, 0.07564619928598404, 0.07310948520898819, -0.16212035715579987, -0.1109914556145668, 0.0012581869959831238, 0.2185538411140442, -0.23059509694576263, -0.01987547241151333, 0.15274401009082794, 0.07335072755813599, 0.08376584947109222, -0.1409197747707367, 0.08403689414262772, 0.20277567207813263, -0.08059152960777283, -0.03504162281751633, 0.02632415108382702, 0.06335452198982239, -0.2463468313217163, 0.2860276699066162, 0.35574185848236084, -0.04151250049471855, 0.543895959854126, -0.18461403250694275, 0.1865570992231369, 0.0854833647608757, 0.14296309649944305, -0.22977523505687714, 0.1214379221200943, 0.2915952801704407, 0.16527868807315826, 0.27270621061325073, -0.0742383822798729, -0.10618802905082703, -0.016254037618637085, 0.13578571379184723, 0.03465652838349342, -0.1672893464565277, 0.06450604647397995, -0.2023296356201172, 0.07873284071683884, 0.14318910241127014, -0.3583349287509918, 0.2936249077320099, -0.04196431487798691, 0.13556279242038727, -0.22973188757896423, 0.1093873679637909, 0.054877884685993195, -0.006824798882007599, 0.13736769556999207, 0.050109557807445526, 0.13657481968402863, -0.017988819628953934, 0.03299069032073021, -0.19934505224227905, -0.26190444827079773, -0.03216422349214554, 0.4030469059944153, -0.20175081491470337, 0.4200804531574249, -0.22512339055538177, -0.08061394840478897, -0.13573622703552246, -0.46374309062957764, -0.1244163066148758, -0.48858386278152466, -0.29348886013031006, 0.4377196431159973, -0.05235612019896507, 0.2884214222431183, 0.15930208563804626, 0.06599539518356323, 0.6007102131843567, -0.12018122524023056, -0.1299339085817337, -0.16516080498695374, -0.14348658919334412, 0.0020231548696756363, 0.39166539907455444, -0.39059263467788696, 0.31923893094062805, -0.14857293665409088, -0.03643973916769028, -0.49318212270736694, -0.1713026762008667, 0.23434646427631378, -0.2515103220939636, -0.10610975325107574, 0.2501232922077179, 0.16031180322170258, -0.12767401337623596, -0.3462356626987457, 0.23602157831192017, -0.09714030474424362, -0.05986085534095764, 0.3538428544998169, -0.017858019098639488, 0.16488473117351532, 0.19423888623714447, -0.16180527210235596, -0.11437442153692245, -0.22104205191135406, 0.1488947570323944, -0.02422526851296425, 0.3098028302192688, 0.1279517114162445, 0.05087652802467346, 0.0688198059797287, 0.053886692970991135, -0.0885351151227951, -0.05291750654578209, -0.4608559012413025, 0.4211558997631073, -0.31889769434928894, -0.29355117678642273, -0.06109808757901192, -0.005195258185267448, 0.358340322971344, 0.3748795986175537, -0.29544806480407715, -0.001978849060833454, 0.19680283963680267, 0.0960601419210434, -0.1780661642551422, 0.013300919905304909, 0.1617015302181244, 0.11657088994979858, -0.05268663540482521, -0.05286765471100807, 0.14581628143787384, 0.1710810661315918, -0.18763363361358643, 0.25809890031814575, 0.15930244326591492, 0.4765360951423645, 0.2614041268825531, 0.6606873273849487, 0.038906797766685486, -0.3858363628387451, 0.33210211992263794, -0.1400645226240158, -0.0007826462388038635, 0.08665775507688522, -0.6534714698791504, 0.1830664426088333, -0.28974252939224243, -0.026324423030018806, -0.10860742628574371, -0.3637518584728241, -0.20201337337493896, -0.16557000577449799, 0.16914500296115875, -0.02716073766350746, -0.3952353894710541, 0.4657106101512909, -0.43040144443511963, 0.2838456630706787, -0.07929583638906479, 0.13681241869926453, -0.6179904937744141, -0.01597042754292488, 0.1340286135673523, 0.0014616549015045166, 0.2550834119319916, -0.08203370869159698, -0.3944139778614044, 0.07718804478645325, -0.4658883810043335, 0.23202815651893616, 0.08530592918395996, 0.7238262295722961, 0.1851678192615509, -0.20388635993003845, -0.1605457216501236, -0.03389428183436394, 0.7261366844177246, 0.23516243696212769, -0.013185404241085052, 0.09821474552154541, -0.3114120066165924, -0.4381251037120819, -0.07942812144756317, -0.27742674946784973, 0.6424909830093384, 0.15633359551429749, 0.2806633710861206, -0.23284581303596497, -0.13018563389778137, 0.11599018424749374, 0.10674536228179932, -0.21584342420101166, -0.27482280135154724, -0.07602312415838242, -0.06804312765598297, -0.35322338342666626, -0.014091625809669495, 0.04383896291255951, 0.28205251693725586, 0.09237001091241837, 0.02206074818968773, -0.3040832579135895, -0.02766639180481434, 0.36235398054122925, -0.04278600960969925, 0.06606992334127426, -0.1614818572998047, 0.15831461548805237, 0.1936408132314682, 0.2400771677494049, 0.641128420829773, 0.30705350637435913, 0.24509121477603912, -0.4524517059326172, 0.3747635781764984, 0.056793320924043655, 0.27895236015319824, 0.12668326497077942, -0.11202515661716461, -0.0463847741484642, -0.3257368803024292, 0.05009084194898605, -0.43527522683143616, 0.5216365456581116, 0.5002287030220032, 0.14700330793857574, -0.5732987523078918, -0.3403778076171875, 0.20203854143619537, 0.11379586160182953, 0.18212969601154327, 0.7328405976295471, -0.1325450986623764, -0.13832250237464905, 0.1305193454027176, 0.13689598441123962, 0.73729008436203, 0.05995890125632286, 0.12415485084056854, 0.41108137369155884, 0.5742588043212891, 0.28740352392196655, -0.5326962471008301, 0.09997867792844772, -0.22785107791423798, -0.04775974154472351, -0.1629464328289032, -0.25533121824264526, 0.03875802457332611, 0.17045849561691284, -0.059647612273693085, 0.18026210367679596, -0.03505464643239975, 0.5183295011520386, 0.09845241904258728, 0.06107647716999054, -0.3110625147819519, -0.29220274090766907, 0.09589265286922455, 0.11329369246959686, -0.1642976850271225, 0.14646193385124207, -0.07750952243804932, -0.0749974250793457, 0.18221336603164673, -0.2826288342475891, -0.2507404685020447, -0.025755833834409714, -0.22850890457630157, 0.10249286890029907, 0.03291715681552887, -0.4766203761100769, 0.10104304552078247, 0.013341326266527176, 0.05072762444615364, -0.09035946428775787, 0.07236272841691971, -0.22122697532176971, -0.04071824997663498, -0.13065004348754883, -0.1328616738319397, -0.08464229851961136, 0.40968629717826843, 0.12493745237588882, 0.13089695572853088, 0.28170648217201233, 0.23024612665176392, -0.3494545817375183, 0.08346448838710785, 0.22286628186702728, 0.23815256357192993, -0.5538776516914368, 0.10674944519996643, -0.11697626113891602, -0.20017214119434357, -0.2225143313407898, 0.0751270204782486, 0.003570772707462311, -0.3264313340187073, 0.006171859800815582, -0.1581956148147583, -0.09417001157999039, 0.09128502011299133, 0.41936612129211426, 0.09900609403848648, -0.4401397407054901, 0.7563033103942871, 0.18333370983600616, -0.2378757894039154, -0.16016007959842682, 0.13041463494300842, 0.4554121792316437, -0.26989611983299255, 0.10516273975372314, -0.3681175410747528, 0.19371221959590912, -0.20565152168273926, 0.09545361995697021, 0.07498288154602051, 0.0011242106556892395, -0.08470675349235535, -0.3185296058654785, -0.37638577818870544, 0.06417316943407059, -0.12759710848331451, 0.2709617614746094, 0.06571377068758011, 0.1442405730485916, -0.24248625338077545, 0.10846738517284393, -0.2284083217382431, -0.0599614679813385, -0.13040657341480255, 0.21702063083648682, 0.06876564770936966, -0.11554979532957077, -0.02996569313108921, 0.164311021566391, 0.08759870380163193, 0.3649314045906067, 0.07729586213827133, -0.21717265248298645, -0.11241079866886139, 0.10818684846162796, 0.12695541977882385, -0.2696894705295563, 0.07013238221406937, -0.021664656698703766, -0.01061202958226204, -0.3168858587741852, 0.09200872480869293, 0.05930749326944351, -0.03379938751459122, 0.2827904224395752, 0.3835878372192383, 0.04531223699450493, 0.10487338900566101, 0.020299438387155533, 0.24440480768680573, 0.26442837715148926, 0.18606147170066833, 0.32218536734580994, -0.03469739854335785, -0.061479128897190094, -0.2507390081882477, 0.36399248242378235, 0.3781980276107788, -0.11715055257081985, 0.156258225440979, -0.4842170476913452, 0.1358971893787384, -0.13094668090343475, 0.2535530924797058, 0.611329197883606, -0.35448983311653137, -0.15539158880710602, 0.16911262273788452, 0.11266213655471802, -0.004548309370875359, 0.03866658732295036, 0.0609535351395607, -0.05782102793455124, -0.005827050656080246, 0.19322964549064636, -0.057137105613946915, -0.06116662174463272, 0.13544248044490814, -0.08294620364904404, 0.28895992040634155, -0.16346675157546997, 0.1883116215467453, 0.06417673826217651, -0.42789775133132935, -0.08586524426937103, 0.3677484691143036, 0.2824957072734833, 0.1013360396027565, 0.2784428000450134, -0.10788040608167648, 0.4273214042186737, 0.07083895802497864, -0.24930399656295776, -0.016587771475315094, -0.4929744005203247, -0.329954594373703, 0.11119722574949265, 0.2463369220495224, 0.19480162858963013, 0.048969171941280365, 0.3200196623802185, -0.07998926192522049, -0.11177302151918411, -0.021363649517297745, 0.19566914439201355, -0.2775021493434906, 0.09631124138832092, -0.3862144351005554, -0.22133585810661316, -0.20778816938400269, -0.10474881529808044, -0.07726974785327911, -0.1806132197380066, 0.0019157379865646362, 0.11878727376461029, -0.18749941885471344, -0.42980432510375977, 0.06275072693824768, -0.004547931253910065, -0.1123516634106636, -0.3342282772064209, 0.21795929968357086, 0.16026291251182556, 0.11708513647317886, 0.03490929678082466, 0.265189528465271, 0.5087575912475586, 0.46108490228652954, -0.14944615960121155, 0.17691510915756226, -0.501087486743927, -0.19116181135177612, -0.06311273574829102, 0.11251846700906754, -0.4148903787136078, -0.10147596895694733, 0.3867390751838684, 0.08408298343420029, -0.11434430629014969, -0.2153681069612503, 0.13407471776008606, 0.0735938549041748, 0.00014839135110378265, 0.12479199469089508, -0.08155643194913864, 0.04142792522907257, -0.0814749076962471, -0.044169507920742035, -0.4062022268772125, -0.11823451519012451, 0.46783411502838135, 0.11666365712881088, 0.19685912132263184, 0.020753897726535797, 0.058962076902389526, -0.25033965706825256, 0.42579859495162964, 0.4754784405231476, 0.2222505807876587, -0.40928903222084045, -0.2357499748468399, -0.295870840549469, 0.3727256655693054, -0.12138880789279938, -0.19496598839759827, -0.019623221829533577, 0.16514836251735687, 0.3228292167186737, 0.26910915970802307, 0.24353060126304626, -0.14532260596752167, -0.07103810459375381, 0.33608028292655945, -0.32356706261634827, -0.33205077052116394, 0.035634368658065796, 0.2394295036792755, -0.06713181734085083, -0.2778090238571167, 0.23340676724910736, -0.10085997730493546, 0.13328245282173157, -0.20465661585330963, -0.3008013367652893, 0.08007314801216125, 0.04444568231701851, 0.44286373257637024, 0.18970057368278503, 0.42728421092033386, 0.09459976106882095, 0.06287761777639389, -0.27842238545417786, -0.23615778982639313, -0.19147416949272156, 0.04522627592086792, 0.044853679835796356, 0.2142351120710373, -0.03245288133621216, -0.13446144759655, -0.5011915564537048, 0.21689584851264954, -0.10915284603834152, -0.29114028811454773, -0.3574866056442261, 0.27954617142677307, 0.003716088831424713, 0.07022722065448761, -0.07147317379713058, 0.2456231415271759, 0.21205805242061615, 0.5372604727745056, -0.367276132106781, -0.29441529512405396, 0.4216318428516388, -0.6915381550788879, -0.4907267093658447, 0.025035202503204346, -0.1989058554172516, 0.17865654826164246, 0.27032434940338135, -0.56406170129776, 0.003102049231529236, 0.31720420718193054, -0.16942083835601807, -0.13272783160209656, 0.0034329108893871307, 0.09697689116001129, 0.024014350026845932, -0.16893543303012848, 0.3889949917793274, 0.10353568941354752, -0.0350186862051487, -0.017747923731803894, -0.22362670302391052 ]
https://github.com/huggingface/datasets/issues/1765
Error iterating over Dataset with DataLoader
Yes, padding is an answer. This can be solved easily by passing a callable to the collate_fn arg of DataLoader that adds padding.
I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ```
23
Error iterating over Dataset with DataLoader I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ``` Yes, padding is an answer. This can be solved easily by passing a callable to the collate_fn arg of DataLoader that adds padding.
[ -0.2379290610551834, 0.055456504225730896, -0.04567072540521622, 0.20573298633098602, 0.1531803011894226, 0.000141143798828125, 0.792131781578064, 0.30685192346572876, 0.021130643784999847, 0.1527133285999298, 0.04679551720619202, 0.23042553663253784, -0.2809545695781708, -0.24164411425590515, -0.09022638201713562, -0.06044984608888626, -0.07645409554243088, 0.0790700763463974, -0.12242209911346436, 0.03289387375116348, -0.14354035258293152, -0.08673018962144852, -0.19259729981422424, 0.03193603828549385, -0.25093865394592285, -0.13227081298828125, -0.10359163582324982, -0.09470771998167038, -0.33412519097328186, -0.5228336453437805, 0.2897108495235443, 0.11794869601726532, 0.42384791374206543, 0.6812458634376526, -0.00011708562669809908, 0.053265489637851715, 0.120496466755867, -0.12161406129598618, -0.2641814053058624, -0.2320629507303238, 0.1392342448234558, -0.0516229048371315, 0.033674925565719604, -0.3547690510749817, 0.26056039333343506, -0.33127161860466003, -0.017206234857439995, -0.2235834300518036, 0.1987377405166626, 0.24071073532104492, 0.12731043994426727, 0.48786798119544983, -0.01306585967540741, 0.06860649585723877, 0.045241713523864746, 0.25054359436035156, -0.019511356949806213, 0.1971430629491806, 0.19162483513355255, 0.010227501392364502, -0.3597659170627594, 0.11686784029006958, -0.16907085478305817, 0.04752366244792938, 0.1359686553478241, -0.11273882538080215, -0.21776068210601807, -0.13206057250499725, -0.03268358111381531, -0.07962892204523087, 0.5732848048210144, -0.2473982870578766, -0.33389079570770264, -0.16551584005355835, -0.22153036296367645, -0.267302542924881, 0.31921154260635376, -0.1650732457637787, -0.1586039513349533, -0.21399015188217163, 0.11575722694396973, 0.2405710071325302, -0.204026460647583, 0.1367143988609314, -0.25916051864624023, 0.2086893916130066, -0.049849964678287506, 0.30450013279914856, 0.2167694866657257, -0.25569677352905273, 0.3407100737094879, 0.10055159777402878, 0.0440492257475853, 0.27522870898246765, -0.5098055005073547, -0.2515716850757599, 0.09336569160223007, -0.4813285171985626, -0.08895111083984375, 0.18174752593040466, 0.2512766718864441, 0.06592321395874023, -0.026723071932792664, 0.24206465482711792, 0.4608974754810333, 0.18674716353416443, 0.16861027479171753, 0.34300729632377625, 0.05600258335471153, -0.1008400022983551, 0.11158250272274017, -0.06283818930387497, -0.3309619128704071, -0.3040350079536438, 0.22978655993938446, 0.10076084733009338, 0.2355152815580368, 0.06380373239517212, -0.24075227975845337, -0.0010413257405161858, -0.28543975949287415, -0.14088352024555206, 0.11154287308454514, 0.14669710397720337, 0.21548247337341309, 0.07846545428037643, -0.021196315065026283, 0.04944782704114914, -0.02945898473262787, -0.1010555624961853, -0.06310305744409561, 0.1225908100605011, -0.23600460588932037, 0.0062334900721907616, 0.2692129909992218, -0.04495188966393471, -0.000597548671066761, 0.13793231546878815, -0.016348935663700104, 0.106493279337883, 0.18383029103279114, -0.167745441198349, 0.27512121200561523, -0.06683069467544556, 0.05263787880539894, 0.3259076476097107, 0.24278861284255981, 0.052704550325870514, -0.15170422196388245, 0.006441593170166016, -0.4252358376979828, -0.08540761470794678, -0.07112929224967957, 0.13438482582569122, -0.06572791934013367, -0.05965486913919449, -0.40290209650993347, -0.19306109845638275, 0.34761080145835876, -0.15928402543067932, 0.09902076423168182, -0.2618944048881531, 0.0679653137922287, -0.09494350850582123, 0.07169866561889648, 0.3785111606121063, -0.45884206891059875, -0.13893190026283264, 0.15586847066879272, 0.10057884454727173, 0.2683536112308502, 0.2800271213054657, -0.2775178551673889, 0.5750993490219116, -0.4041409194469452, 0.3146158456802368, 0.33827415108680725, -0.4575733542442322, -0.3010724186897278, 0.30232328176498413, -0.1728585958480835, 0.18284380435943604, 0.1311054229736328, 0.02209586463868618, 0.40725448727607727, -0.21179890632629395, 0.12621450424194336, 0.13122227787971497, -0.1754140704870224, -0.0844983458518982, -0.018889285624027252, 0.40735629200935364, 0.5204413533210754, 0.05792112275958061, 0.18990811705589294, 0.09117458760738373, -0.25631189346313477, 0.1866557002067566, 0.04072452709078789, -0.16240239143371582, 0.07528024911880493, 0.14618176221847534, 0.08729252219200134, 0.11540152132511139, 0.2047131359577179, -0.1541338860988617, -0.24141407012939453, 0.017452780157327652, 0.08473578095436096, 0.1103394478559494, -0.1569613367319107, 0.1011081337928772, 0.01563006266951561, 0.18338946998119354, -0.4093039035797119, -0.14764484763145447, 0.10579892992973328, 0.339177668094635, -0.10850541293621063, -0.22628025710582733, -0.2782577574253082, 0.010197176598012447, -0.15022438764572144, 0.1229051798582077, -0.3177070617675781, 0.07564619928598404, 0.07310948520898819, -0.16212035715579987, -0.1109914556145668, 0.0012581869959831238, 0.2185538411140442, -0.23059509694576263, -0.01987547241151333, 0.15274401009082794, 0.07335072755813599, 0.08376584947109222, -0.1409197747707367, 0.08403689414262772, 0.20277567207813263, -0.08059152960777283, -0.03504162281751633, 0.02632415108382702, 0.06335452198982239, -0.2463468313217163, 0.2860276699066162, 0.35574185848236084, -0.04151250049471855, 0.543895959854126, -0.18461403250694275, 0.1865570992231369, 0.0854833647608757, 0.14296309649944305, -0.22977523505687714, 0.1214379221200943, 0.2915952801704407, 0.16527868807315826, 0.27270621061325073, -0.0742383822798729, -0.10618802905082703, -0.016254037618637085, 0.13578571379184723, 0.03465652838349342, -0.1672893464565277, 0.06450604647397995, -0.2023296356201172, 0.07873284071683884, 0.14318910241127014, -0.3583349287509918, 0.2936249077320099, -0.04196431487798691, 0.13556279242038727, -0.22973188757896423, 0.1093873679637909, 0.054877884685993195, -0.006824798882007599, 0.13736769556999207, 0.050109557807445526, 0.13657481968402863, -0.017988819628953934, 0.03299069032073021, -0.19934505224227905, -0.26190444827079773, -0.03216422349214554, 0.4030469059944153, -0.20175081491470337, 0.4200804531574249, -0.22512339055538177, -0.08061394840478897, -0.13573622703552246, -0.46374309062957764, -0.1244163066148758, -0.48858386278152466, -0.29348886013031006, 0.4377196431159973, -0.05235612019896507, 0.2884214222431183, 0.15930208563804626, 0.06599539518356323, 0.6007102131843567, -0.12018122524023056, -0.1299339085817337, -0.16516080498695374, -0.14348658919334412, 0.0020231548696756363, 0.39166539907455444, -0.39059263467788696, 0.31923893094062805, -0.14857293665409088, -0.03643973916769028, -0.49318212270736694, -0.1713026762008667, 0.23434646427631378, -0.2515103220939636, -0.10610975325107574, 0.2501232922077179, 0.16031180322170258, -0.12767401337623596, -0.3462356626987457, 0.23602157831192017, -0.09714030474424362, -0.05986085534095764, 0.3538428544998169, -0.017858019098639488, 0.16488473117351532, 0.19423888623714447, -0.16180527210235596, -0.11437442153692245, -0.22104205191135406, 0.1488947570323944, -0.02422526851296425, 0.3098028302192688, 0.1279517114162445, 0.05087652802467346, 0.0688198059797287, 0.053886692970991135, -0.0885351151227951, -0.05291750654578209, -0.4608559012413025, 0.4211558997631073, -0.31889769434928894, -0.29355117678642273, -0.06109808757901192, -0.005195258185267448, 0.358340322971344, 0.3748795986175537, -0.29544806480407715, -0.001978849060833454, 0.19680283963680267, 0.0960601419210434, -0.1780661642551422, 0.013300919905304909, 0.1617015302181244, 0.11657088994979858, -0.05268663540482521, -0.05286765471100807, 0.14581628143787384, 0.1710810661315918, -0.18763363361358643, 0.25809890031814575, 0.15930244326591492, 0.4765360951423645, 0.2614041268825531, 0.6606873273849487, 0.038906797766685486, -0.3858363628387451, 0.33210211992263794, -0.1400645226240158, -0.0007826462388038635, 0.08665775507688522, -0.6534714698791504, 0.1830664426088333, -0.28974252939224243, -0.026324423030018806, -0.10860742628574371, -0.3637518584728241, -0.20201337337493896, -0.16557000577449799, 0.16914500296115875, -0.02716073766350746, -0.3952353894710541, 0.4657106101512909, -0.43040144443511963, 0.2838456630706787, -0.07929583638906479, 0.13681241869926453, -0.6179904937744141, -0.01597042754292488, 0.1340286135673523, 0.0014616549015045166, 0.2550834119319916, -0.08203370869159698, -0.3944139778614044, 0.07718804478645325, -0.4658883810043335, 0.23202815651893616, 0.08530592918395996, 0.7238262295722961, 0.1851678192615509, -0.20388635993003845, -0.1605457216501236, -0.03389428183436394, 0.7261366844177246, 0.23516243696212769, -0.013185404241085052, 0.09821474552154541, -0.3114120066165924, -0.4381251037120819, -0.07942812144756317, -0.27742674946784973, 0.6424909830093384, 0.15633359551429749, 0.2806633710861206, -0.23284581303596497, -0.13018563389778137, 0.11599018424749374, 0.10674536228179932, -0.21584342420101166, -0.27482280135154724, -0.07602312415838242, -0.06804312765598297, -0.35322338342666626, -0.014091625809669495, 0.04383896291255951, 0.28205251693725586, 0.09237001091241837, 0.02206074818968773, -0.3040832579135895, -0.02766639180481434, 0.36235398054122925, -0.04278600960969925, 0.06606992334127426, -0.1614818572998047, 0.15831461548805237, 0.1936408132314682, 0.2400771677494049, 0.641128420829773, 0.30705350637435913, 0.24509121477603912, -0.4524517059326172, 0.3747635781764984, 0.056793320924043655, 0.27895236015319824, 0.12668326497077942, -0.11202515661716461, -0.0463847741484642, -0.3257368803024292, 0.05009084194898605, -0.43527522683143616, 0.5216365456581116, 0.5002287030220032, 0.14700330793857574, -0.5732987523078918, -0.3403778076171875, 0.20203854143619537, 0.11379586160182953, 0.18212969601154327, 0.7328405976295471, -0.1325450986623764, -0.13832250237464905, 0.1305193454027176, 0.13689598441123962, 0.73729008436203, 0.05995890125632286, 0.12415485084056854, 0.41108137369155884, 0.5742588043212891, 0.28740352392196655, -0.5326962471008301, 0.09997867792844772, -0.22785107791423798, -0.04775974154472351, -0.1629464328289032, -0.25533121824264526, 0.03875802457332611, 0.17045849561691284, -0.059647612273693085, 0.18026210367679596, -0.03505464643239975, 0.5183295011520386, 0.09845241904258728, 0.06107647716999054, -0.3110625147819519, -0.29220274090766907, 0.09589265286922455, 0.11329369246959686, -0.1642976850271225, 0.14646193385124207, -0.07750952243804932, -0.0749974250793457, 0.18221336603164673, -0.2826288342475891, -0.2507404685020447, -0.025755833834409714, -0.22850890457630157, 0.10249286890029907, 0.03291715681552887, -0.4766203761100769, 0.10104304552078247, 0.013341326266527176, 0.05072762444615364, -0.09035946428775787, 0.07236272841691971, -0.22122697532176971, -0.04071824997663498, -0.13065004348754883, -0.1328616738319397, -0.08464229851961136, 0.40968629717826843, 0.12493745237588882, 0.13089695572853088, 0.28170648217201233, 0.23024612665176392, -0.3494545817375183, 0.08346448838710785, 0.22286628186702728, 0.23815256357192993, -0.5538776516914368, 0.10674944519996643, -0.11697626113891602, -0.20017214119434357, -0.2225143313407898, 0.0751270204782486, 0.003570772707462311, -0.3264313340187073, 0.006171859800815582, -0.1581956148147583, -0.09417001157999039, 0.09128502011299133, 0.41936612129211426, 0.09900609403848648, -0.4401397407054901, 0.7563033103942871, 0.18333370983600616, -0.2378757894039154, -0.16016007959842682, 0.13041463494300842, 0.4554121792316437, -0.26989611983299255, 0.10516273975372314, -0.3681175410747528, 0.19371221959590912, -0.20565152168273926, 0.09545361995697021, 0.07498288154602051, 0.0011242106556892395, -0.08470675349235535, -0.3185296058654785, -0.37638577818870544, 0.06417316943407059, -0.12759710848331451, 0.2709617614746094, 0.06571377068758011, 0.1442405730485916, -0.24248625338077545, 0.10846738517284393, -0.2284083217382431, -0.0599614679813385, -0.13040657341480255, 0.21702063083648682, 0.06876564770936966, -0.11554979532957077, -0.02996569313108921, 0.164311021566391, 0.08759870380163193, 0.3649314045906067, 0.07729586213827133, -0.21717265248298645, -0.11241079866886139, 0.10818684846162796, 0.12695541977882385, -0.2696894705295563, 0.07013238221406937, -0.021664656698703766, -0.01061202958226204, -0.3168858587741852, 0.09200872480869293, 0.05930749326944351, -0.03379938751459122, 0.2827904224395752, 0.3835878372192383, 0.04531223699450493, 0.10487338900566101, 0.020299438387155533, 0.24440480768680573, 0.26442837715148926, 0.18606147170066833, 0.32218536734580994, -0.03469739854335785, -0.061479128897190094, -0.2507390081882477, 0.36399248242378235, 0.3781980276107788, -0.11715055257081985, 0.156258225440979, -0.4842170476913452, 0.1358971893787384, -0.13094668090343475, 0.2535530924797058, 0.611329197883606, -0.35448983311653137, -0.15539158880710602, 0.16911262273788452, 0.11266213655471802, -0.004548309370875359, 0.03866658732295036, 0.0609535351395607, -0.05782102793455124, -0.005827050656080246, 0.19322964549064636, -0.057137105613946915, -0.06116662174463272, 0.13544248044490814, -0.08294620364904404, 0.28895992040634155, -0.16346675157546997, 0.1883116215467453, 0.06417673826217651, -0.42789775133132935, -0.08586524426937103, 0.3677484691143036, 0.2824957072734833, 0.1013360396027565, 0.2784428000450134, -0.10788040608167648, 0.4273214042186737, 0.07083895802497864, -0.24930399656295776, -0.016587771475315094, -0.4929744005203247, -0.329954594373703, 0.11119722574949265, 0.2463369220495224, 0.19480162858963013, 0.048969171941280365, 0.3200196623802185, -0.07998926192522049, -0.11177302151918411, -0.021363649517297745, 0.19566914439201355, -0.2775021493434906, 0.09631124138832092, -0.3862144351005554, -0.22133585810661316, -0.20778816938400269, -0.10474881529808044, -0.07726974785327911, -0.1806132197380066, 0.0019157379865646362, 0.11878727376461029, -0.18749941885471344, -0.42980432510375977, 0.06275072693824768, -0.004547931253910065, -0.1123516634106636, -0.3342282772064209, 0.21795929968357086, 0.16026291251182556, 0.11708513647317886, 0.03490929678082466, 0.265189528465271, 0.5087575912475586, 0.46108490228652954, -0.14944615960121155, 0.17691510915756226, -0.501087486743927, -0.19116181135177612, -0.06311273574829102, 0.11251846700906754, -0.4148903787136078, -0.10147596895694733, 0.3867390751838684, 0.08408298343420029, -0.11434430629014969, -0.2153681069612503, 0.13407471776008606, 0.0735938549041748, 0.00014839135110378265, 0.12479199469089508, -0.08155643194913864, 0.04142792522907257, -0.0814749076962471, -0.044169507920742035, -0.4062022268772125, -0.11823451519012451, 0.46783411502838135, 0.11666365712881088, 0.19685912132263184, 0.020753897726535797, 0.058962076902389526, -0.25033965706825256, 0.42579859495162964, 0.4754784405231476, 0.2222505807876587, -0.40928903222084045, -0.2357499748468399, -0.295870840549469, 0.3727256655693054, -0.12138880789279938, -0.19496598839759827, -0.019623221829533577, 0.16514836251735687, 0.3228292167186737, 0.26910915970802307, 0.24353060126304626, -0.14532260596752167, -0.07103810459375381, 0.33608028292655945, -0.32356706261634827, -0.33205077052116394, 0.035634368658065796, 0.2394295036792755, -0.06713181734085083, -0.2778090238571167, 0.23340676724910736, -0.10085997730493546, 0.13328245282173157, -0.20465661585330963, -0.3008013367652893, 0.08007314801216125, 0.04444568231701851, 0.44286373257637024, 0.18970057368278503, 0.42728421092033386, 0.09459976106882095, 0.06287761777639389, -0.27842238545417786, -0.23615778982639313, -0.19147416949272156, 0.04522627592086792, 0.044853679835796356, 0.2142351120710373, -0.03245288133621216, -0.13446144759655, -0.5011915564537048, 0.21689584851264954, -0.10915284603834152, -0.29114028811454773, -0.3574866056442261, 0.27954617142677307, 0.003716088831424713, 0.07022722065448761, -0.07147317379713058, 0.2456231415271759, 0.21205805242061615, 0.5372604727745056, -0.367276132106781, -0.29441529512405396, 0.4216318428516388, -0.6915381550788879, -0.4907267093658447, 0.025035202503204346, -0.1989058554172516, 0.17865654826164246, 0.27032434940338135, -0.56406170129776, 0.003102049231529236, 0.31720420718193054, -0.16942083835601807, -0.13272783160209656, 0.0034329108893871307, 0.09697689116001129, 0.024014350026845932, -0.16893543303012848, 0.3889949917793274, 0.10353568941354752, -0.0350186862051487, -0.017747923731803894, -0.22362670302391052 ]
https://github.com/huggingface/datasets/issues/1765
Error iterating over Dataset with DataLoader
dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_size=4) batch = next(iter(dataloader)) getting ValueError: cannot reshape array of size 8192 into shape (1,512,4) I had put padding as 2048 for encoded_dataset kindly help
I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ```
28
Error iterating over Dataset with DataLoader I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_size=4) batch = next(iter(dataloader)) getting ValueError: cannot reshape array of size 8192 into shape (1,512,4) I had put padding as 2048 for encoded_dataset kindly help
[ -0.2379290610551834, 0.055456504225730896, -0.04567072540521622, 0.20573298633098602, 0.1531803011894226, 0.000141143798828125, 0.792131781578064, 0.30685192346572876, 0.021130643784999847, 0.1527133285999298, 0.04679551720619202, 0.23042553663253784, -0.2809545695781708, -0.24164411425590515, -0.09022638201713562, -0.06044984608888626, -0.07645409554243088, 0.0790700763463974, -0.12242209911346436, 0.03289387375116348, -0.14354035258293152, -0.08673018962144852, -0.19259729981422424, 0.03193603828549385, -0.25093865394592285, -0.13227081298828125, -0.10359163582324982, -0.09470771998167038, -0.33412519097328186, -0.5228336453437805, 0.2897108495235443, 0.11794869601726532, 0.42384791374206543, 0.6812458634376526, -0.00011708562669809908, 0.053265489637851715, 0.120496466755867, -0.12161406129598618, -0.2641814053058624, -0.2320629507303238, 0.1392342448234558, -0.0516229048371315, 0.033674925565719604, -0.3547690510749817, 0.26056039333343506, -0.33127161860466003, -0.017206234857439995, -0.2235834300518036, 0.1987377405166626, 0.24071073532104492, 0.12731043994426727, 0.48786798119544983, -0.01306585967540741, 0.06860649585723877, 0.045241713523864746, 0.25054359436035156, -0.019511356949806213, 0.1971430629491806, 0.19162483513355255, 0.010227501392364502, -0.3597659170627594, 0.11686784029006958, -0.16907085478305817, 0.04752366244792938, 0.1359686553478241, -0.11273882538080215, -0.21776068210601807, -0.13206057250499725, -0.03268358111381531, -0.07962892204523087, 0.5732848048210144, -0.2473982870578766, -0.33389079570770264, -0.16551584005355835, -0.22153036296367645, -0.267302542924881, 0.31921154260635376, -0.1650732457637787, -0.1586039513349533, -0.21399015188217163, 0.11575722694396973, 0.2405710071325302, -0.204026460647583, 0.1367143988609314, -0.25916051864624023, 0.2086893916130066, -0.049849964678287506, 0.30450013279914856, 0.2167694866657257, -0.25569677352905273, 0.3407100737094879, 0.10055159777402878, 0.0440492257475853, 0.27522870898246765, -0.5098055005073547, -0.2515716850757599, 0.09336569160223007, -0.4813285171985626, -0.08895111083984375, 0.18174752593040466, 0.2512766718864441, 0.06592321395874023, -0.026723071932792664, 0.24206465482711792, 0.4608974754810333, 0.18674716353416443, 0.16861027479171753, 0.34300729632377625, 0.05600258335471153, -0.1008400022983551, 0.11158250272274017, -0.06283818930387497, -0.3309619128704071, -0.3040350079536438, 0.22978655993938446, 0.10076084733009338, 0.2355152815580368, 0.06380373239517212, -0.24075227975845337, -0.0010413257405161858, -0.28543975949287415, -0.14088352024555206, 0.11154287308454514, 0.14669710397720337, 0.21548247337341309, 0.07846545428037643, -0.021196315065026283, 0.04944782704114914, -0.02945898473262787, -0.1010555624961853, -0.06310305744409561, 0.1225908100605011, -0.23600460588932037, 0.0062334900721907616, 0.2692129909992218, -0.04495188966393471, -0.000597548671066761, 0.13793231546878815, -0.016348935663700104, 0.106493279337883, 0.18383029103279114, -0.167745441198349, 0.27512121200561523, -0.06683069467544556, 0.05263787880539894, 0.3259076476097107, 0.24278861284255981, 0.052704550325870514, -0.15170422196388245, 0.006441593170166016, -0.4252358376979828, -0.08540761470794678, -0.07112929224967957, 0.13438482582569122, -0.06572791934013367, -0.05965486913919449, -0.40290209650993347, -0.19306109845638275, 0.34761080145835876, -0.15928402543067932, 0.09902076423168182, -0.2618944048881531, 0.0679653137922287, -0.09494350850582123, 0.07169866561889648, 0.3785111606121063, -0.45884206891059875, -0.13893190026283264, 0.15586847066879272, 0.10057884454727173, 0.2683536112308502, 0.2800271213054657, -0.2775178551673889, 0.5750993490219116, -0.4041409194469452, 0.3146158456802368, 0.33827415108680725, -0.4575733542442322, -0.3010724186897278, 0.30232328176498413, -0.1728585958480835, 0.18284380435943604, 0.1311054229736328, 0.02209586463868618, 0.40725448727607727, -0.21179890632629395, 0.12621450424194336, 0.13122227787971497, -0.1754140704870224, -0.0844983458518982, -0.018889285624027252, 0.40735629200935364, 0.5204413533210754, 0.05792112275958061, 0.18990811705589294, 0.09117458760738373, -0.25631189346313477, 0.1866557002067566, 0.04072452709078789, -0.16240239143371582, 0.07528024911880493, 0.14618176221847534, 0.08729252219200134, 0.11540152132511139, 0.2047131359577179, -0.1541338860988617, -0.24141407012939453, 0.017452780157327652, 0.08473578095436096, 0.1103394478559494, -0.1569613367319107, 0.1011081337928772, 0.01563006266951561, 0.18338946998119354, -0.4093039035797119, -0.14764484763145447, 0.10579892992973328, 0.339177668094635, -0.10850541293621063, -0.22628025710582733, -0.2782577574253082, 0.010197176598012447, -0.15022438764572144, 0.1229051798582077, -0.3177070617675781, 0.07564619928598404, 0.07310948520898819, -0.16212035715579987, -0.1109914556145668, 0.0012581869959831238, 0.2185538411140442, -0.23059509694576263, -0.01987547241151333, 0.15274401009082794, 0.07335072755813599, 0.08376584947109222, -0.1409197747707367, 0.08403689414262772, 0.20277567207813263, -0.08059152960777283, -0.03504162281751633, 0.02632415108382702, 0.06335452198982239, -0.2463468313217163, 0.2860276699066162, 0.35574185848236084, -0.04151250049471855, 0.543895959854126, -0.18461403250694275, 0.1865570992231369, 0.0854833647608757, 0.14296309649944305, -0.22977523505687714, 0.1214379221200943, 0.2915952801704407, 0.16527868807315826, 0.27270621061325073, -0.0742383822798729, -0.10618802905082703, -0.016254037618637085, 0.13578571379184723, 0.03465652838349342, -0.1672893464565277, 0.06450604647397995, -0.2023296356201172, 0.07873284071683884, 0.14318910241127014, -0.3583349287509918, 0.2936249077320099, -0.04196431487798691, 0.13556279242038727, -0.22973188757896423, 0.1093873679637909, 0.054877884685993195, -0.006824798882007599, 0.13736769556999207, 0.050109557807445526, 0.13657481968402863, -0.017988819628953934, 0.03299069032073021, -0.19934505224227905, -0.26190444827079773, -0.03216422349214554, 0.4030469059944153, -0.20175081491470337, 0.4200804531574249, -0.22512339055538177, -0.08061394840478897, -0.13573622703552246, -0.46374309062957764, -0.1244163066148758, -0.48858386278152466, -0.29348886013031006, 0.4377196431159973, -0.05235612019896507, 0.2884214222431183, 0.15930208563804626, 0.06599539518356323, 0.6007102131843567, -0.12018122524023056, -0.1299339085817337, -0.16516080498695374, -0.14348658919334412, 0.0020231548696756363, 0.39166539907455444, -0.39059263467788696, 0.31923893094062805, -0.14857293665409088, -0.03643973916769028, -0.49318212270736694, -0.1713026762008667, 0.23434646427631378, -0.2515103220939636, -0.10610975325107574, 0.2501232922077179, 0.16031180322170258, -0.12767401337623596, -0.3462356626987457, 0.23602157831192017, -0.09714030474424362, -0.05986085534095764, 0.3538428544998169, -0.017858019098639488, 0.16488473117351532, 0.19423888623714447, -0.16180527210235596, -0.11437442153692245, -0.22104205191135406, 0.1488947570323944, -0.02422526851296425, 0.3098028302192688, 0.1279517114162445, 0.05087652802467346, 0.0688198059797287, 0.053886692970991135, -0.0885351151227951, -0.05291750654578209, -0.4608559012413025, 0.4211558997631073, -0.31889769434928894, -0.29355117678642273, -0.06109808757901192, -0.005195258185267448, 0.358340322971344, 0.3748795986175537, -0.29544806480407715, -0.001978849060833454, 0.19680283963680267, 0.0960601419210434, -0.1780661642551422, 0.013300919905304909, 0.1617015302181244, 0.11657088994979858, -0.05268663540482521, -0.05286765471100807, 0.14581628143787384, 0.1710810661315918, -0.18763363361358643, 0.25809890031814575, 0.15930244326591492, 0.4765360951423645, 0.2614041268825531, 0.6606873273849487, 0.038906797766685486, -0.3858363628387451, 0.33210211992263794, -0.1400645226240158, -0.0007826462388038635, 0.08665775507688522, -0.6534714698791504, 0.1830664426088333, -0.28974252939224243, -0.026324423030018806, -0.10860742628574371, -0.3637518584728241, -0.20201337337493896, -0.16557000577449799, 0.16914500296115875, -0.02716073766350746, -0.3952353894710541, 0.4657106101512909, -0.43040144443511963, 0.2838456630706787, -0.07929583638906479, 0.13681241869926453, -0.6179904937744141, -0.01597042754292488, 0.1340286135673523, 0.0014616549015045166, 0.2550834119319916, -0.08203370869159698, -0.3944139778614044, 0.07718804478645325, -0.4658883810043335, 0.23202815651893616, 0.08530592918395996, 0.7238262295722961, 0.1851678192615509, -0.20388635993003845, -0.1605457216501236, -0.03389428183436394, 0.7261366844177246, 0.23516243696212769, -0.013185404241085052, 0.09821474552154541, -0.3114120066165924, -0.4381251037120819, -0.07942812144756317, -0.27742674946784973, 0.6424909830093384, 0.15633359551429749, 0.2806633710861206, -0.23284581303596497, -0.13018563389778137, 0.11599018424749374, 0.10674536228179932, -0.21584342420101166, -0.27482280135154724, -0.07602312415838242, -0.06804312765598297, -0.35322338342666626, -0.014091625809669495, 0.04383896291255951, 0.28205251693725586, 0.09237001091241837, 0.02206074818968773, -0.3040832579135895, -0.02766639180481434, 0.36235398054122925, -0.04278600960969925, 0.06606992334127426, -0.1614818572998047, 0.15831461548805237, 0.1936408132314682, 0.2400771677494049, 0.641128420829773, 0.30705350637435913, 0.24509121477603912, -0.4524517059326172, 0.3747635781764984, 0.056793320924043655, 0.27895236015319824, 0.12668326497077942, -0.11202515661716461, -0.0463847741484642, -0.3257368803024292, 0.05009084194898605, -0.43527522683143616, 0.5216365456581116, 0.5002287030220032, 0.14700330793857574, -0.5732987523078918, -0.3403778076171875, 0.20203854143619537, 0.11379586160182953, 0.18212969601154327, 0.7328405976295471, -0.1325450986623764, -0.13832250237464905, 0.1305193454027176, 0.13689598441123962, 0.73729008436203, 0.05995890125632286, 0.12415485084056854, 0.41108137369155884, 0.5742588043212891, 0.28740352392196655, -0.5326962471008301, 0.09997867792844772, -0.22785107791423798, -0.04775974154472351, -0.1629464328289032, -0.25533121824264526, 0.03875802457332611, 0.17045849561691284, -0.059647612273693085, 0.18026210367679596, -0.03505464643239975, 0.5183295011520386, 0.09845241904258728, 0.06107647716999054, -0.3110625147819519, -0.29220274090766907, 0.09589265286922455, 0.11329369246959686, -0.1642976850271225, 0.14646193385124207, -0.07750952243804932, -0.0749974250793457, 0.18221336603164673, -0.2826288342475891, -0.2507404685020447, -0.025755833834409714, -0.22850890457630157, 0.10249286890029907, 0.03291715681552887, -0.4766203761100769, 0.10104304552078247, 0.013341326266527176, 0.05072762444615364, -0.09035946428775787, 0.07236272841691971, -0.22122697532176971, -0.04071824997663498, -0.13065004348754883, -0.1328616738319397, -0.08464229851961136, 0.40968629717826843, 0.12493745237588882, 0.13089695572853088, 0.28170648217201233, 0.23024612665176392, -0.3494545817375183, 0.08346448838710785, 0.22286628186702728, 0.23815256357192993, -0.5538776516914368, 0.10674944519996643, -0.11697626113891602, -0.20017214119434357, -0.2225143313407898, 0.0751270204782486, 0.003570772707462311, -0.3264313340187073, 0.006171859800815582, -0.1581956148147583, -0.09417001157999039, 0.09128502011299133, 0.41936612129211426, 0.09900609403848648, -0.4401397407054901, 0.7563033103942871, 0.18333370983600616, -0.2378757894039154, -0.16016007959842682, 0.13041463494300842, 0.4554121792316437, -0.26989611983299255, 0.10516273975372314, -0.3681175410747528, 0.19371221959590912, -0.20565152168273926, 0.09545361995697021, 0.07498288154602051, 0.0011242106556892395, -0.08470675349235535, -0.3185296058654785, -0.37638577818870544, 0.06417316943407059, -0.12759710848331451, 0.2709617614746094, 0.06571377068758011, 0.1442405730485916, -0.24248625338077545, 0.10846738517284393, -0.2284083217382431, -0.0599614679813385, -0.13040657341480255, 0.21702063083648682, 0.06876564770936966, -0.11554979532957077, -0.02996569313108921, 0.164311021566391, 0.08759870380163193, 0.3649314045906067, 0.07729586213827133, -0.21717265248298645, -0.11241079866886139, 0.10818684846162796, 0.12695541977882385, -0.2696894705295563, 0.07013238221406937, -0.021664656698703766, -0.01061202958226204, -0.3168858587741852, 0.09200872480869293, 0.05930749326944351, -0.03379938751459122, 0.2827904224395752, 0.3835878372192383, 0.04531223699450493, 0.10487338900566101, 0.020299438387155533, 0.24440480768680573, 0.26442837715148926, 0.18606147170066833, 0.32218536734580994, -0.03469739854335785, -0.061479128897190094, -0.2507390081882477, 0.36399248242378235, 0.3781980276107788, -0.11715055257081985, 0.156258225440979, -0.4842170476913452, 0.1358971893787384, -0.13094668090343475, 0.2535530924797058, 0.611329197883606, -0.35448983311653137, -0.15539158880710602, 0.16911262273788452, 0.11266213655471802, -0.004548309370875359, 0.03866658732295036, 0.0609535351395607, -0.05782102793455124, -0.005827050656080246, 0.19322964549064636, -0.057137105613946915, -0.06116662174463272, 0.13544248044490814, -0.08294620364904404, 0.28895992040634155, -0.16346675157546997, 0.1883116215467453, 0.06417673826217651, -0.42789775133132935, -0.08586524426937103, 0.3677484691143036, 0.2824957072734833, 0.1013360396027565, 0.2784428000450134, -0.10788040608167648, 0.4273214042186737, 0.07083895802497864, -0.24930399656295776, -0.016587771475315094, -0.4929744005203247, -0.329954594373703, 0.11119722574949265, 0.2463369220495224, 0.19480162858963013, 0.048969171941280365, 0.3200196623802185, -0.07998926192522049, -0.11177302151918411, -0.021363649517297745, 0.19566914439201355, -0.2775021493434906, 0.09631124138832092, -0.3862144351005554, -0.22133585810661316, -0.20778816938400269, -0.10474881529808044, -0.07726974785327911, -0.1806132197380066, 0.0019157379865646362, 0.11878727376461029, -0.18749941885471344, -0.42980432510375977, 0.06275072693824768, -0.004547931253910065, -0.1123516634106636, -0.3342282772064209, 0.21795929968357086, 0.16026291251182556, 0.11708513647317886, 0.03490929678082466, 0.265189528465271, 0.5087575912475586, 0.46108490228652954, -0.14944615960121155, 0.17691510915756226, -0.501087486743927, -0.19116181135177612, -0.06311273574829102, 0.11251846700906754, -0.4148903787136078, -0.10147596895694733, 0.3867390751838684, 0.08408298343420029, -0.11434430629014969, -0.2153681069612503, 0.13407471776008606, 0.0735938549041748, 0.00014839135110378265, 0.12479199469089508, -0.08155643194913864, 0.04142792522907257, -0.0814749076962471, -0.044169507920742035, -0.4062022268772125, -0.11823451519012451, 0.46783411502838135, 0.11666365712881088, 0.19685912132263184, 0.020753897726535797, 0.058962076902389526, -0.25033965706825256, 0.42579859495162964, 0.4754784405231476, 0.2222505807876587, -0.40928903222084045, -0.2357499748468399, -0.295870840549469, 0.3727256655693054, -0.12138880789279938, -0.19496598839759827, -0.019623221829533577, 0.16514836251735687, 0.3228292167186737, 0.26910915970802307, 0.24353060126304626, -0.14532260596752167, -0.07103810459375381, 0.33608028292655945, -0.32356706261634827, -0.33205077052116394, 0.035634368658065796, 0.2394295036792755, -0.06713181734085083, -0.2778090238571167, 0.23340676724910736, -0.10085997730493546, 0.13328245282173157, -0.20465661585330963, -0.3008013367652893, 0.08007314801216125, 0.04444568231701851, 0.44286373257637024, 0.18970057368278503, 0.42728421092033386, 0.09459976106882095, 0.06287761777639389, -0.27842238545417786, -0.23615778982639313, -0.19147416949272156, 0.04522627592086792, 0.044853679835796356, 0.2142351120710373, -0.03245288133621216, -0.13446144759655, -0.5011915564537048, 0.21689584851264954, -0.10915284603834152, -0.29114028811454773, -0.3574866056442261, 0.27954617142677307, 0.003716088831424713, 0.07022722065448761, -0.07147317379713058, 0.2456231415271759, 0.21205805242061615, 0.5372604727745056, -0.367276132106781, -0.29441529512405396, 0.4216318428516388, -0.6915381550788879, -0.4907267093658447, 0.025035202503204346, -0.1989058554172516, 0.17865654826164246, 0.27032434940338135, -0.56406170129776, 0.003102049231529236, 0.31720420718193054, -0.16942083835601807, -0.13272783160209656, 0.0034329108893871307, 0.09697689116001129, 0.024014350026845932, -0.16893543303012848, 0.3889949917793274, 0.10353568941354752, -0.0350186862051487, -0.017747923731803894, -0.22362670302391052 ]
https://github.com/huggingface/datasets/issues/1765
Error iterating over Dataset with DataLoader
data_loader_val = torch.utils.data.DataLoader(val_dataset, batch_size=32, shuffle=True, drop_last=False, num_workers=0) dataiter = iter(data_loader_val) images, _ = next(dataiter) getting -> TypeError: 'list' object is not callable Cannot iterate through the data. Kindly suggest.
I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ```
29
Error iterating over Dataset with DataLoader I have a Dataset that I've mapped a tokenizer over: ``` encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids']) encoded_dataset[:1] ``` ``` {'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113, 102]]), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])} ``` When I try to iterate as in the docs, I get errors: ``` dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) next(iter(dataloader)) ``` ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-45-05180ba8aa35> in <module>() 1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32) ----> 2 next(iter(dataloader)) 3 frames /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader) 411 self._timeout = loader.timeout 412 self._collate_fn = loader.collate_fn --> 413 self._sampler_iter = iter(self._index_sampler) 414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item() 415 self._persistent_workers = loader.persistent_workers TypeError: 'int' object is not iterable ``` data_loader_val = torch.utils.data.DataLoader(val_dataset, batch_size=32, shuffle=True, drop_last=False, num_workers=0) dataiter = iter(data_loader_val) images, _ = next(dataiter) getting -> TypeError: 'list' object is not callable Cannot iterate through the data. Kindly suggest.
[ -0.2379290610551834, 0.055456504225730896, -0.04567072540521622, 0.20573298633098602, 0.1531803011894226, 0.000141143798828125, 0.792131781578064, 0.30685192346572876, 0.021130643784999847, 0.1527133285999298, 0.04679551720619202, 0.23042553663253784, -0.2809545695781708, -0.24164411425590515, -0.09022638201713562, -0.06044984608888626, -0.07645409554243088, 0.0790700763463974, -0.12242209911346436, 0.03289387375116348, -0.14354035258293152, -0.08673018962144852, -0.19259729981422424, 0.03193603828549385, -0.25093865394592285, -0.13227081298828125, -0.10359163582324982, -0.09470771998167038, -0.33412519097328186, -0.5228336453437805, 0.2897108495235443, 0.11794869601726532, 0.42384791374206543, 0.6812458634376526, -0.00011708562669809908, 0.053265489637851715, 0.120496466755867, -0.12161406129598618, -0.2641814053058624, -0.2320629507303238, 0.1392342448234558, -0.0516229048371315, 0.033674925565719604, -0.3547690510749817, 0.26056039333343506, -0.33127161860466003, -0.017206234857439995, -0.2235834300518036, 0.1987377405166626, 0.24071073532104492, 0.12731043994426727, 0.48786798119544983, -0.01306585967540741, 0.06860649585723877, 0.045241713523864746, 0.25054359436035156, -0.019511356949806213, 0.1971430629491806, 0.19162483513355255, 0.010227501392364502, -0.3597659170627594, 0.11686784029006958, -0.16907085478305817, 0.04752366244792938, 0.1359686553478241, -0.11273882538080215, -0.21776068210601807, -0.13206057250499725, -0.03268358111381531, -0.07962892204523087, 0.5732848048210144, -0.2473982870578766, -0.33389079570770264, -0.16551584005355835, -0.22153036296367645, -0.267302542924881, 0.31921154260635376, -0.1650732457637787, -0.1586039513349533, -0.21399015188217163, 0.11575722694396973, 0.2405710071325302, -0.204026460647583, 0.1367143988609314, -0.25916051864624023, 0.2086893916130066, -0.049849964678287506, 0.30450013279914856, 0.2167694866657257, -0.25569677352905273, 0.3407100737094879, 0.10055159777402878, 0.0440492257475853, 0.27522870898246765, -0.5098055005073547, -0.2515716850757599, 0.09336569160223007, -0.4813285171985626, -0.08895111083984375, 0.18174752593040466, 0.2512766718864441, 0.06592321395874023, -0.026723071932792664, 0.24206465482711792, 0.4608974754810333, 0.18674716353416443, 0.16861027479171753, 0.34300729632377625, 0.05600258335471153, -0.1008400022983551, 0.11158250272274017, -0.06283818930387497, -0.3309619128704071, -0.3040350079536438, 0.22978655993938446, 0.10076084733009338, 0.2355152815580368, 0.06380373239517212, -0.24075227975845337, -0.0010413257405161858, -0.28543975949287415, -0.14088352024555206, 0.11154287308454514, 0.14669710397720337, 0.21548247337341309, 0.07846545428037643, -0.021196315065026283, 0.04944782704114914, -0.02945898473262787, -0.1010555624961853, -0.06310305744409561, 0.1225908100605011, -0.23600460588932037, 0.0062334900721907616, 0.2692129909992218, -0.04495188966393471, -0.000597548671066761, 0.13793231546878815, -0.016348935663700104, 0.106493279337883, 0.18383029103279114, -0.167745441198349, 0.27512121200561523, -0.06683069467544556, 0.05263787880539894, 0.3259076476097107, 0.24278861284255981, 0.052704550325870514, -0.15170422196388245, 0.006441593170166016, -0.4252358376979828, -0.08540761470794678, -0.07112929224967957, 0.13438482582569122, -0.06572791934013367, -0.05965486913919449, -0.40290209650993347, -0.19306109845638275, 0.34761080145835876, -0.15928402543067932, 0.09902076423168182, -0.2618944048881531, 0.0679653137922287, -0.09494350850582123, 0.07169866561889648, 0.3785111606121063, -0.45884206891059875, -0.13893190026283264, 0.15586847066879272, 0.10057884454727173, 0.2683536112308502, 0.2800271213054657, -0.2775178551673889, 0.5750993490219116, -0.4041409194469452, 0.3146158456802368, 0.33827415108680725, -0.4575733542442322, -0.3010724186897278, 0.30232328176498413, -0.1728585958480835, 0.18284380435943604, 0.1311054229736328, 0.02209586463868618, 0.40725448727607727, -0.21179890632629395, 0.12621450424194336, 0.13122227787971497, -0.1754140704870224, -0.0844983458518982, -0.018889285624027252, 0.40735629200935364, 0.5204413533210754, 0.05792112275958061, 0.18990811705589294, 0.09117458760738373, -0.25631189346313477, 0.1866557002067566, 0.04072452709078789, -0.16240239143371582, 0.07528024911880493, 0.14618176221847534, 0.08729252219200134, 0.11540152132511139, 0.2047131359577179, -0.1541338860988617, -0.24141407012939453, 0.017452780157327652, 0.08473578095436096, 0.1103394478559494, -0.1569613367319107, 0.1011081337928772, 0.01563006266951561, 0.18338946998119354, -0.4093039035797119, -0.14764484763145447, 0.10579892992973328, 0.339177668094635, -0.10850541293621063, -0.22628025710582733, -0.2782577574253082, 0.010197176598012447, -0.15022438764572144, 0.1229051798582077, -0.3177070617675781, 0.07564619928598404, 0.07310948520898819, -0.16212035715579987, -0.1109914556145668, 0.0012581869959831238, 0.2185538411140442, -0.23059509694576263, -0.01987547241151333, 0.15274401009082794, 0.07335072755813599, 0.08376584947109222, -0.1409197747707367, 0.08403689414262772, 0.20277567207813263, -0.08059152960777283, -0.03504162281751633, 0.02632415108382702, 0.06335452198982239, -0.2463468313217163, 0.2860276699066162, 0.35574185848236084, -0.04151250049471855, 0.543895959854126, -0.18461403250694275, 0.1865570992231369, 0.0854833647608757, 0.14296309649944305, -0.22977523505687714, 0.1214379221200943, 0.2915952801704407, 0.16527868807315826, 0.27270621061325073, -0.0742383822798729, -0.10618802905082703, -0.016254037618637085, 0.13578571379184723, 0.03465652838349342, -0.1672893464565277, 0.06450604647397995, -0.2023296356201172, 0.07873284071683884, 0.14318910241127014, -0.3583349287509918, 0.2936249077320099, -0.04196431487798691, 0.13556279242038727, -0.22973188757896423, 0.1093873679637909, 0.054877884685993195, -0.006824798882007599, 0.13736769556999207, 0.050109557807445526, 0.13657481968402863, -0.017988819628953934, 0.03299069032073021, -0.19934505224227905, -0.26190444827079773, -0.03216422349214554, 0.4030469059944153, -0.20175081491470337, 0.4200804531574249, -0.22512339055538177, -0.08061394840478897, -0.13573622703552246, -0.46374309062957764, -0.1244163066148758, -0.48858386278152466, -0.29348886013031006, 0.4377196431159973, -0.05235612019896507, 0.2884214222431183, 0.15930208563804626, 0.06599539518356323, 0.6007102131843567, -0.12018122524023056, -0.1299339085817337, -0.16516080498695374, -0.14348658919334412, 0.0020231548696756363, 0.39166539907455444, -0.39059263467788696, 0.31923893094062805, -0.14857293665409088, -0.03643973916769028, -0.49318212270736694, -0.1713026762008667, 0.23434646427631378, -0.2515103220939636, -0.10610975325107574, 0.2501232922077179, 0.16031180322170258, -0.12767401337623596, -0.3462356626987457, 0.23602157831192017, -0.09714030474424362, -0.05986085534095764, 0.3538428544998169, -0.017858019098639488, 0.16488473117351532, 0.19423888623714447, -0.16180527210235596, -0.11437442153692245, -0.22104205191135406, 0.1488947570323944, -0.02422526851296425, 0.3098028302192688, 0.1279517114162445, 0.05087652802467346, 0.0688198059797287, 0.053886692970991135, -0.0885351151227951, -0.05291750654578209, -0.4608559012413025, 0.4211558997631073, -0.31889769434928894, -0.29355117678642273, -0.06109808757901192, -0.005195258185267448, 0.358340322971344, 0.3748795986175537, -0.29544806480407715, -0.001978849060833454, 0.19680283963680267, 0.0960601419210434, -0.1780661642551422, 0.013300919905304909, 0.1617015302181244, 0.11657088994979858, -0.05268663540482521, -0.05286765471100807, 0.14581628143787384, 0.1710810661315918, -0.18763363361358643, 0.25809890031814575, 0.15930244326591492, 0.4765360951423645, 0.2614041268825531, 0.6606873273849487, 0.038906797766685486, -0.3858363628387451, 0.33210211992263794, -0.1400645226240158, -0.0007826462388038635, 0.08665775507688522, -0.6534714698791504, 0.1830664426088333, -0.28974252939224243, -0.026324423030018806, -0.10860742628574371, -0.3637518584728241, -0.20201337337493896, -0.16557000577449799, 0.16914500296115875, -0.02716073766350746, -0.3952353894710541, 0.4657106101512909, -0.43040144443511963, 0.2838456630706787, -0.07929583638906479, 0.13681241869926453, -0.6179904937744141, -0.01597042754292488, 0.1340286135673523, 0.0014616549015045166, 0.2550834119319916, -0.08203370869159698, -0.3944139778614044, 0.07718804478645325, -0.4658883810043335, 0.23202815651893616, 0.08530592918395996, 0.7238262295722961, 0.1851678192615509, -0.20388635993003845, -0.1605457216501236, -0.03389428183436394, 0.7261366844177246, 0.23516243696212769, -0.013185404241085052, 0.09821474552154541, -0.3114120066165924, -0.4381251037120819, -0.07942812144756317, -0.27742674946784973, 0.6424909830093384, 0.15633359551429749, 0.2806633710861206, -0.23284581303596497, -0.13018563389778137, 0.11599018424749374, 0.10674536228179932, -0.21584342420101166, -0.27482280135154724, -0.07602312415838242, -0.06804312765598297, -0.35322338342666626, -0.014091625809669495, 0.04383896291255951, 0.28205251693725586, 0.09237001091241837, 0.02206074818968773, -0.3040832579135895, -0.02766639180481434, 0.36235398054122925, -0.04278600960969925, 0.06606992334127426, -0.1614818572998047, 0.15831461548805237, 0.1936408132314682, 0.2400771677494049, 0.641128420829773, 0.30705350637435913, 0.24509121477603912, -0.4524517059326172, 0.3747635781764984, 0.056793320924043655, 0.27895236015319824, 0.12668326497077942, -0.11202515661716461, -0.0463847741484642, -0.3257368803024292, 0.05009084194898605, -0.43527522683143616, 0.5216365456581116, 0.5002287030220032, 0.14700330793857574, -0.5732987523078918, -0.3403778076171875, 0.20203854143619537, 0.11379586160182953, 0.18212969601154327, 0.7328405976295471, -0.1325450986623764, -0.13832250237464905, 0.1305193454027176, 0.13689598441123962, 0.73729008436203, 0.05995890125632286, 0.12415485084056854, 0.41108137369155884, 0.5742588043212891, 0.28740352392196655, -0.5326962471008301, 0.09997867792844772, -0.22785107791423798, -0.04775974154472351, -0.1629464328289032, -0.25533121824264526, 0.03875802457332611, 0.17045849561691284, -0.059647612273693085, 0.18026210367679596, -0.03505464643239975, 0.5183295011520386, 0.09845241904258728, 0.06107647716999054, -0.3110625147819519, -0.29220274090766907, 0.09589265286922455, 0.11329369246959686, -0.1642976850271225, 0.14646193385124207, -0.07750952243804932, -0.0749974250793457, 0.18221336603164673, -0.2826288342475891, -0.2507404685020447, -0.025755833834409714, -0.22850890457630157, 0.10249286890029907, 0.03291715681552887, -0.4766203761100769, 0.10104304552078247, 0.013341326266527176, 0.05072762444615364, -0.09035946428775787, 0.07236272841691971, -0.22122697532176971, -0.04071824997663498, -0.13065004348754883, -0.1328616738319397, -0.08464229851961136, 0.40968629717826843, 0.12493745237588882, 0.13089695572853088, 0.28170648217201233, 0.23024612665176392, -0.3494545817375183, 0.08346448838710785, 0.22286628186702728, 0.23815256357192993, -0.5538776516914368, 0.10674944519996643, -0.11697626113891602, -0.20017214119434357, -0.2225143313407898, 0.0751270204782486, 0.003570772707462311, -0.3264313340187073, 0.006171859800815582, -0.1581956148147583, -0.09417001157999039, 0.09128502011299133, 0.41936612129211426, 0.09900609403848648, -0.4401397407054901, 0.7563033103942871, 0.18333370983600616, -0.2378757894039154, -0.16016007959842682, 0.13041463494300842, 0.4554121792316437, -0.26989611983299255, 0.10516273975372314, -0.3681175410747528, 0.19371221959590912, -0.20565152168273926, 0.09545361995697021, 0.07498288154602051, 0.0011242106556892395, -0.08470675349235535, -0.3185296058654785, -0.37638577818870544, 0.06417316943407059, -0.12759710848331451, 0.2709617614746094, 0.06571377068758011, 0.1442405730485916, -0.24248625338077545, 0.10846738517284393, -0.2284083217382431, -0.0599614679813385, -0.13040657341480255, 0.21702063083648682, 0.06876564770936966, -0.11554979532957077, -0.02996569313108921, 0.164311021566391, 0.08759870380163193, 0.3649314045906067, 0.07729586213827133, -0.21717265248298645, -0.11241079866886139, 0.10818684846162796, 0.12695541977882385, -0.2696894705295563, 0.07013238221406937, -0.021664656698703766, -0.01061202958226204, -0.3168858587741852, 0.09200872480869293, 0.05930749326944351, -0.03379938751459122, 0.2827904224395752, 0.3835878372192383, 0.04531223699450493, 0.10487338900566101, 0.020299438387155533, 0.24440480768680573, 0.26442837715148926, 0.18606147170066833, 0.32218536734580994, -0.03469739854335785, -0.061479128897190094, -0.2507390081882477, 0.36399248242378235, 0.3781980276107788, -0.11715055257081985, 0.156258225440979, -0.4842170476913452, 0.1358971893787384, -0.13094668090343475, 0.2535530924797058, 0.611329197883606, -0.35448983311653137, -0.15539158880710602, 0.16911262273788452, 0.11266213655471802, -0.004548309370875359, 0.03866658732295036, 0.0609535351395607, -0.05782102793455124, -0.005827050656080246, 0.19322964549064636, -0.057137105613946915, -0.06116662174463272, 0.13544248044490814, -0.08294620364904404, 0.28895992040634155, -0.16346675157546997, 0.1883116215467453, 0.06417673826217651, -0.42789775133132935, -0.08586524426937103, 0.3677484691143036, 0.2824957072734833, 0.1013360396027565, 0.2784428000450134, -0.10788040608167648, 0.4273214042186737, 0.07083895802497864, -0.24930399656295776, -0.016587771475315094, -0.4929744005203247, -0.329954594373703, 0.11119722574949265, 0.2463369220495224, 0.19480162858963013, 0.048969171941280365, 0.3200196623802185, -0.07998926192522049, -0.11177302151918411, -0.021363649517297745, 0.19566914439201355, -0.2775021493434906, 0.09631124138832092, -0.3862144351005554, -0.22133585810661316, -0.20778816938400269, -0.10474881529808044, -0.07726974785327911, -0.1806132197380066, 0.0019157379865646362, 0.11878727376461029, -0.18749941885471344, -0.42980432510375977, 0.06275072693824768, -0.004547931253910065, -0.1123516634106636, -0.3342282772064209, 0.21795929968357086, 0.16026291251182556, 0.11708513647317886, 0.03490929678082466, 0.265189528465271, 0.5087575912475586, 0.46108490228652954, -0.14944615960121155, 0.17691510915756226, -0.501087486743927, -0.19116181135177612, -0.06311273574829102, 0.11251846700906754, -0.4148903787136078, -0.10147596895694733, 0.3867390751838684, 0.08408298343420029, -0.11434430629014969, -0.2153681069612503, 0.13407471776008606, 0.0735938549041748, 0.00014839135110378265, 0.12479199469089508, -0.08155643194913864, 0.04142792522907257, -0.0814749076962471, -0.044169507920742035, -0.4062022268772125, -0.11823451519012451, 0.46783411502838135, 0.11666365712881088, 0.19685912132263184, 0.020753897726535797, 0.058962076902389526, -0.25033965706825256, 0.42579859495162964, 0.4754784405231476, 0.2222505807876587, -0.40928903222084045, -0.2357499748468399, -0.295870840549469, 0.3727256655693054, -0.12138880789279938, -0.19496598839759827, -0.019623221829533577, 0.16514836251735687, 0.3228292167186737, 0.26910915970802307, 0.24353060126304626, -0.14532260596752167, -0.07103810459375381, 0.33608028292655945, -0.32356706261634827, -0.33205077052116394, 0.035634368658065796, 0.2394295036792755, -0.06713181734085083, -0.2778090238571167, 0.23340676724910736, -0.10085997730493546, 0.13328245282173157, -0.20465661585330963, -0.3008013367652893, 0.08007314801216125, 0.04444568231701851, 0.44286373257637024, 0.18970057368278503, 0.42728421092033386, 0.09459976106882095, 0.06287761777639389, -0.27842238545417786, -0.23615778982639313, -0.19147416949272156, 0.04522627592086792, 0.044853679835796356, 0.2142351120710373, -0.03245288133621216, -0.13446144759655, -0.5011915564537048, 0.21689584851264954, -0.10915284603834152, -0.29114028811454773, -0.3574866056442261, 0.27954617142677307, 0.003716088831424713, 0.07022722065448761, -0.07147317379713058, 0.2456231415271759, 0.21205805242061615, 0.5372604727745056, -0.367276132106781, -0.29441529512405396, 0.4216318428516388, -0.6915381550788879, -0.4907267093658447, 0.025035202503204346, -0.1989058554172516, 0.17865654826164246, 0.27032434940338135, -0.56406170129776, 0.003102049231529236, 0.31720420718193054, -0.16942083835601807, -0.13272783160209656, 0.0034329108893871307, 0.09697689116001129, 0.024014350026845932, -0.16893543303012848, 0.3889949917793274, 0.10353568941354752, -0.0350186862051487, -0.017747923731803894, -0.22362670302391052 ]
https://github.com/huggingface/datasets/issues/1762
Unable to format dataset to CUDA Tensors
Hi ! You can get CUDA tensors with ```python dataset.set_format("torch", columns=columns, device="cuda") ``` Indeed `set_format` passes the `**kwargs` to `torch.tensor`
Hi, I came across this [link](https://huggingface.co/docs/datasets/torch_tensorflow.html) where the docs show show to convert a dataset to a particular format. I see that there is an option to convert it to tensors, but I don't see any option to convert it to CUDA tensors. I tried this, but Dataset doesn't support assignment: ``` columns=['input_ids', 'token_type_ids', 'attention_mask', 'start_positions','end_positions'] samples.set_format(type='torch', columns = columns) for column in columns: samples[column].to(torch.device(self.config.device)) ``` There should be an option to do so, or if there is already a way to do this, please let me know. Thanks, Gunjan
20
Unable to format dataset to CUDA Tensors Hi, I came across this [link](https://huggingface.co/docs/datasets/torch_tensorflow.html) where the docs show show to convert a dataset to a particular format. I see that there is an option to convert it to tensors, but I don't see any option to convert it to CUDA tensors. I tried this, but Dataset doesn't support assignment: ``` columns=['input_ids', 'token_type_ids', 'attention_mask', 'start_positions','end_positions'] samples.set_format(type='torch', columns = columns) for column in columns: samples[column].to(torch.device(self.config.device)) ``` There should be an option to do so, or if there is already a way to do this, please let me know. Thanks, Gunjan Hi ! You can get CUDA tensors with ```python dataset.set_format("torch", columns=columns, device="cuda") ``` Indeed `set_format` passes the `**kwargs` to `torch.tensor`
[ -0.22562175989151, -0.44279390573501587, -0.07967863976955414, 0.18397173285484314, 0.5433502793312073, 0.38857293128967285, 0.5336817502975464, 0.3345809280872345, -0.009671414270997047, 0.142757847905159, -0.08334462344646454, 0.24232345819473267, -0.22358541190624237, 0.09736377745866776, 0.1539931297302246, -0.37384966015815735, 0.25072696805000305, -0.15454226732254028, -0.06615705788135529, 0.0754861980676651, -0.18340368568897247, 0.013290739618241787, -0.14197805523872375, -0.29857879877090454, -0.23013974726200104, -0.17566318809986115, -0.004209239035844803, -0.36175107955932617, -0.1628381907939911, -0.07049902528524399, 0.29179897904396057, 0.06723271310329437, 0.2707700729370117, 0.47809693217277527, -0.0001229248446179554, -0.024617746472358704, -0.06422650068998337, -0.09742768853902817, -0.12295806407928467, -0.3244972825050354, 0.09515901654958725, -0.30887410044670105, 0.32647740840911865, -0.233754962682724, -0.41704338788986206, 0.16387508809566498, 0.024588391184806824, -0.3956409692764282, 0.23142395913600922, 0.5253637433052063, 0.11989249289035797, 0.19244658946990967, 0.23941083252429962, 0.02409392222762108, -0.17405900359153748, 0.37660646438598633, -0.35423535108566284, 0.025485137477517128, 0.16958007216453552, 0.15832841396331787, 0.2881675362586975, 0.1371890753507614, -0.14174668490886688, 0.03765301778912544, 0.2801640033721924, 0.013186448253691196, -0.3805174231529236, -0.34324052929878235, 0.021550370380282402, 0.11267788708209991, 0.659446656703949, -0.3422846794128418, -0.35644111037254333, 0.09587479382753372, 0.0935511365532875, -0.383338987827301, -0.2534761428833008, 0.6357636451721191, -0.3619585335254669, 0.06373792886734009, -0.3649025559425354, -0.006093079689890146, -0.2450168877840042, 0.11993542313575745, -0.22958919405937195, 0.00907345861196518, -0.171731635928154, 0.010839097201824188, 0.050786495208740234, 0.1569463312625885, 0.3423220217227936, 0.12478847801685333, 0.22258687019348145, 0.17064237594604492, -0.48078852891921997, -0.08028427511453629, -0.5487516522407532, -0.13748103380203247, 0.15841859579086304, 0.07926900684833527, 0.15616266429424286, 0.00941627286374569, -0.13567793369293213, 0.031078826636075974, -0.23664575815200806, 0.2848209738731384, 0.038816310465335846, 0.22376900911331177, -0.0503094419836998, -0.2578212320804596, 0.345012903213501, -0.0694999173283577, -0.29098767042160034, -0.5439585447311401, -0.311309278011322, 0.2484922707080841, 0.06475549191236496, -0.09519990533590317, -0.27489909529685974, -0.09430667012929916, -0.07213444262742996, 0.1659947782754898, -0.2177155762910843, 0.27595633268356323, 0.013893078081309795, 0.14294099807739258, 0.4675443768501282, 0.19580040872097015, 0.038766734302043915, 0.03511643782258034, -0.01835693046450615, 0.14948919415473938, -0.26463034749031067, -0.1256718635559082, 0.07214424014091492, -0.42105239629745483, -0.023348288610577583, 0.11398836225271225, 0.009613770991563797, 0.031589992344379425, -0.10516251623630524, 0.13687843084335327, 0.47961169481277466, 0.12302114069461823, -0.01581014320254326, 0.37918034195899963, 0.23039406538009644, 0.2479831725358963, -0.18121078610420227, 0.11484893411397934, -0.47549909353256226, -0.13141033053398132, -0.4951534867286682, 0.004849021323025227, 0.20565567910671234, 0.016486231237649918, -0.21505999565124512, 0.1820434182882309, 0.21012136340141296, 0.18329335749149323, 0.09544201195240021, -0.12384526431560516, -0.13860134780406952, -0.31525301933288574, 0.49409225583076477, 0.08943671733140945, -0.3502279222011566, 0.03458091616630554, 0.440689355134964, -0.04636843875050545, 0.22610002756118774, 0.29322412610054016, 0.1481190174818039, -0.08550798147916794, -0.11102727055549622, -0.3296704888343811, 0.4267116189002991, -0.423921674489975, -0.052338577806949615, -0.19578567147254944, 0.13238203525543213, -0.26577144861221313, -0.09770838171243668, 0.1303253322839737, 0.2611173093318939, 0.09110002964735031, 0.1769355833530426, 0.21446922421455383, -0.016698015853762627, -0.025545038282871246, -0.011030610650777817, -0.0166317205876112, 0.5035649538040161, -0.07188554108142853, -0.1488172709941864, 0.3139471709728241, -0.2549305558204651, -0.05588547885417938, 0.1944795548915863, -0.07875145971775055, -0.04557812958955765, 0.0698695108294487, 0.22039687633514404, 0.021500926464796066, -0.13938425481319427, 0.05784711241722107, -0.4551060199737549, -0.05187021568417549, 0.3765421211719513, 0.2090652734041214, 0.0017811506986618042, -0.15419963002204895, -0.009212376549839973, 0.017424101009964943, -0.03164112940430641, -0.04232757166028023, -0.005731968209147453, -0.34129494428634644, -0.01052914746105671, -0.12432041764259338, -0.23459604382514954, 0.28322634100914, -0.24810980260372162, 0.18150651454925537, -0.3356838822364807, 0.068328857421875, 0.02997148223221302, -0.09160634130239487, 0.10929375886917114, 0.21457207202911377, 0.03087625652551651, -0.26100924611091614, 0.06714178621768951, 0.10181226581335068, 0.16453155875205994, -0.05813141167163849, -0.4233418405056, 0.21278661489486694, 0.2228582501411438, -0.036775313317775726, -0.07459747046232224, 0.12345030903816223, -0.03329440951347351, -0.14306676387786865, -0.36164647340774536, 0.36252784729003906, -0.010839123278856277, 0.1866386979818344, -0.37143975496292114, 0.4350890517234802, 0.16893360018730164, 0.12013816833496094, -0.05248936265707016, 0.028817392885684967, 0.01781584694981575, 0.15896034240722656, 0.14901037514209747, -0.08305524289608002, -0.8168124556541443, -0.0437464639544487, 0.044092290103435516, 0.005619950592517853, 0.07371274381875992, 0.06152164563536644, -0.18063756823539734, 0.1289302110671997, 0.2762048840522766, -0.36340010166168213, -0.1357698291540146, 0.08352978527545929, 0.17572295665740967, 0.06016489863395691, 0.07107378542423248, -0.16419892013072968, 0.028269849717617035, -0.08121046423912048, -0.06600232422351837, -0.12476658076047897, 0.1195552796125412, -0.026937145739793777, 0.050096094608306885, 0.291375070810318, -0.029888611286878586, 0.1166294738650322, -0.48488420248031616, -0.006564777344465256, -0.36817193031311035, 0.06706388294696808, -0.4132385849952698, -0.366482675075531, 0.010741418227553368, -0.03109699860215187, -0.15772978961467743, 0.1503380984067917, 0.3468293249607086, 0.25009316205978394, 0.20513394474983215, 0.16085214912891388, 0.21197183430194855, -0.14267471432685852, -0.17581290006637573, -0.24581007659435272, 0.11050673574209213, 0.03284968063235283, 0.31666117906570435, -0.16410194337368011, 0.24304227530956268, -0.23754680156707764, 0.19298478960990906, -0.34154894948005676, 0.07825767248868942, -0.12425699830055237, -0.1230965405702591, -0.11523720622062683, 0.09813342243432999, 0.3823595643043518, 0.0002370402216911316, -0.025125974789261818, 0.12492676079273224, 0.17943982779979706, -0.04764920473098755, 0.01808078959584236, -0.31535080075263977, -0.04193972423672676, -0.1957777440547943, -0.2927688956260681, -0.24477864801883698, -0.21225318312644958, 0.21929219365119934, -0.01794477365911007, 0.12607133388519287, -0.31881090998649597, 0.37605980038642883, -0.1312130242586136, 0.08544734120368958, -0.03705398738384247, 0.0366186797618866, -0.5210579037666321, 0.6136800050735474, -0.2563227117061615, -0.5021970272064209, 0.1569042205810547, 0.17868849635124207, 0.42874613404273987, 0.40222758054733276, -0.009298063814640045, 0.17884215712547302, 0.17368865013122559, 0.00015194714069366455, 0.03754734620451927, 0.04061904549598694, 0.2938463091850281, 0.005161483306437731, 0.12085069715976715, 0.10787764936685562, -0.1107720136642456, -0.06399381905794144, 0.04574773460626602, 0.3260576128959656, 0.12965190410614014, 0.5017368793487549, 0.09555576741695404, 0.7273532748222351, 0.1096750795841217, -0.5754067301750183, 0.02508644387125969, -0.23931080102920532, 0.30881574749946594, -0.10564226657152176, -0.35862040519714355, 0.26951339840888977, -0.049989596009254456, 0.12670467793941498, -0.008506618440151215, -0.12918224930763245, -0.006732109934091568, -0.17408210039138794, 0.18637678027153015, -0.32610711455345154, -0.1349492371082306, 0.13826049864292145, -0.3389182388782501, 0.23865842819213867, -0.3227364122867584, 0.32022717595100403, -0.04967329651117325, -0.17634347081184387, 0.2526324987411499, 0.30944401025772095, 0.23438411951065063, 0.1302158683538437, -0.07782110571861267, 0.01521456241607666, -0.6871011853218079, 0.29092952609062195, -0.13839343190193176, 0.4108785390853882, -0.08452294766902924, 0.23189958930015564, 0.14221389591693878, 0.22389742732048035, 0.7626751065254211, 0.1783871203660965, -0.4628428816795349, -0.00553510244935751, -0.09016765654087067, -0.48898738622665405, -0.14169703423976898, 0.03796255961060524, 0.19729121029376984, -0.05237159505486488, 0.06909070163965225, -0.12462380528450012, -0.2433522492647171, -0.03211089223623276, 0.28178080916404724, -0.2991707921028137, 0.05570225790143013, -0.11038060486316681, -0.07083403319120407, -0.11247926950454712, 0.07603196054697037, 0.22848306596279144, 0.20879574120044708, 0.04937732219696045, -0.24285714328289032, -0.256250262260437, 0.12930849194526672, 0.4290924668312073, -0.14352889358997345, 0.1916424036026001, 0.24311533570289612, -0.12289823591709137, 0.15850570797920227, 0.247436985373497, 0.290974885225296, -0.07480783760547638, -0.16565033793449402, -0.12685562670230865, -0.015753842890262604, -0.0794740542769432, 0.4617822468280792, -0.08186085522174835, 0.03433452174067497, -0.11740799993276596, -0.24188661575317383, -0.05969849228858948, -0.3334888815879822, 0.24952374398708344, 0.24931637942790985, 0.29357802867889404, -0.7081377506256104, -0.5079486966133118, 0.26714199781417847, 0.1704101264476776, 0.2011549323797226, 0.5503256916999817, 0.275513231754303, -0.09372533857822418, 0.18175482749938965, 0.546043336391449, 0.7262744903564453, -0.4373694658279419, 0.0883292704820633, 0.16952145099639893, -0.18520034849643707, 0.4915034770965576, -0.49520939588546753, 0.26784348487854004, -0.349041610956192, -0.012941793538630009, -0.34354522824287415, -0.17042306065559387, 0.09236777573823929, 0.15473580360412598, 0.06939058005809784, 0.24673114717006683, -0.4792620539665222, 0.13293316960334778, -0.07656750082969666, -0.0640297383069992, 0.1686975061893463, -0.27460750937461853, 0.04590342938899994, 0.07356606423854828, -0.2213018387556076, 0.163302481174469, 0.038777731359004974, 0.00782395526766777, -0.08208008110523224, 0.25808805227279663, -0.2444152981042862, -0.10088521242141724, -0.33946678042411804, 0.06628474593162537, 0.0043606236577034, -0.9245520830154419, 0.3079776465892792, 0.6653305292129517, 0.6603671312332153, -0.011560626327991486, -0.16965264081954956, -0.057439934462308884, -0.12453825026750565, -0.1532783955335617, -0.16869547963142395, 0.024165097624063492, 0.2793976068496704, 0.07624086737632751, 0.05644329637289047, 0.30128249526023865, 0.269325315952301, -0.0793764591217041, 0.015616849064826965, 0.03296060115098953, 0.051544319838285446, -0.3542851209640503, -0.5156931281089783, 0.0778118371963501, 0.3148764967918396, 0.034728843718767166, 0.04761519283056259, 0.13364925980567932, -0.15097467601299286, 0.20085975527763367, -0.08687339723110199, -0.13679227232933044, 0.09857286512851715, 0.2253587245941162, -0.00486137717962265, -0.2825217843055725, 0.3255102038383484, 0.4667455554008484, -0.23352807760238647, -0.07200653105974197, -0.04525516554713249, 0.5412323474884033, -0.15099966526031494, 0.06996382027864456, -0.14862443506717682, 0.3061976432800293, -0.14621083438396454, 0.25237393379211426, -0.22613395750522614, 0.020429443567991257, -0.0249018557369709, -0.10997515916824341, -0.28746381402015686, -0.18304668366909027, -0.22173310816287994, 0.3471129834651947, 0.22114312648773193, 0.10990400612354279, 0.03478042781352997, -0.21169130504131317, -0.1549738198518753, 0.04992736876010895, 0.029291918501257896, 0.21129751205444336, 0.12652501463890076, 0.312398761510849, -0.07720588892698288, -0.2509687542915344, 0.013780241832137108, 0.07579810172319412, 0.07604478299617767, -0.13550615310668945, -0.15999558568000793, 0.12925946712493896, 0.024946801364421844, 0.12854956090450287, 0.15133334696292877, -0.031727518886327744, -0.2759663462638855, -0.29571157693862915, 0.27635788917541504, 0.5281388759613037, -0.033418960869312286, 0.5064693689346313, -0.04318520054221153, 0.114893339574337, -0.11242131888866425, -0.11232152581214905, 0.2780425250530243, -0.010090507566928864, 0.10514431446790695, 0.03773799166083336, 0.07683642208576202, -0.06679482012987137, -0.3280537724494934, 0.23378360271453857, 0.13342665135860443, -0.23464980721473694, 0.11914053559303284, -0.0016482137143611908, 0.21648359298706055, -0.0482487827539444, 0.09028276801109314, -0.03377392143011093, -0.08176849037408829, 0.31443625688552856, 0.26363715529441833, 0.05125358700752258, -0.001574736088514328, 0.09053721278905869, -0.015250764787197113, -0.028164401650428772, -0.1318354457616806, 0.07699793577194214, 0.14743545651435852, -0.019123971462249756, -0.21130232512950897, -0.1767432987689972, 0.12216626852750778, -0.357285737991333, 0.26314836740493774, 0.060049861669540405, 0.262947142124176, 0.030051976442337036, 0.21487891674041748, 0.010832548141479492, -0.018816061317920685, -0.10089913010597229, 0.16979363560676575, 0.432899534702301, 0.3964436948299408, -0.12267163395881653, 0.28228551149368286, -0.12447762489318848, -0.28157103061676025, -0.3143928349018097, 0.07359062135219574, 0.23758703470230103, -0.006070949137210846, 0.3808269202709198, -0.1185416653752327, -0.39194661378860474, -0.15496359765529633, 0.1733686774969101, -0.31003594398498535, 0.031671248376369476, -0.16861256957054138, 0.11809361726045609, 0.2738742530345917, 0.09923921525478363, -0.026753205806016922, -0.44985318183898926, 0.23406219482421875, 0.11827441304922104, -0.024837970733642578, 0.24662671983242035, 0.11771930754184723, 0.28417402505874634, 0.0447554737329483, 0.03995261713862419, -0.15344437956809998, -0.23462633788585663, -0.11177240312099457, -0.09163105487823486, 0.2085823118686676, 0.32708507776260376, 0.14547111093997955, 0.13217219710350037, 0.17810185253620148, -0.09220002591609955, -0.07606696337461472, 0.31734415888786316, 0.20294712483882904, -0.010971777141094208, -0.03936326131224632, 0.09728221595287323, 0.11393390595912933, 0.09001269191503525, -0.07896038889884949, -0.013251978904008865, 0.2696390748023987, -0.2736497223377228, -0.16617533564567566, -0.39091190695762634, -0.34259405732154846, -0.41845089197158813, -0.0018124580383300781, -0.17652255296707153, 0.057807281613349915, 0.3780948519706726, 0.0690375566482544, -0.14831209182739258, 0.04841120168566704, -0.0011280402541160583, 0.016821740195155144, 0.3757729232311249, 0.0264282263815403, 0.3644809126853943, -0.10243499279022217, -0.3040473461151123, -0.10690569132566452, 0.07795968651771545, 0.2708781957626343, 0.16561359167099, -0.12999746203422546, -0.09768656641244888, 0.13291619718074799, 0.06388884782791138, -0.20482690632343292, -0.14448346197605133, 0.17467859387397766, 0.45266109704971313, -0.07795760035514832, -0.053757909685373306, -0.45768505334854126, 0.04748043417930603, 0.06578962504863739, 0.01883608102798462, 0.052439115941524506, -0.0736982449889183, -0.0982632040977478, -0.25494593381881714, 0.47859591245651245, -0.07740446925163269, 0.28529322147369385, 0.19149073958396912, -0.0014075841754674911, 0.33934861421585083, 0.21052128076553345, 0.2949734032154083, -0.0881439596414566, 0.13947731256484985, -0.0894131064414978, 0.34844550490379333, -0.1745031625032425, 0.1316312700510025, -0.12189046293497086, -0.43437957763671875, -0.17674490809440613, 0.5815297365188599, 0.13642604649066925, -0.1919684112071991, -0.13351796567440033, 0.21310298144817352, -0.2032683789730072, -0.24811899662017822, 0.6295920014381409, 0.34966379404067993, 0.06299571692943573, 0.1778905987739563, -0.29974260926246643, -0.0053990688174963, 0.2633989453315735, -0.28511521220207214, -0.17757196724414825, 0.026793278753757477, -0.2837471067905426, 0.3643314838409424, 0.12852385640144348, -1.004216194152832, -0.050814852118492126, 0.04311031475663185, -0.2969073951244354, -0.11562716960906982, 0.23675766587257385, 0.06559059023857117, 0.156638965010643, -0.17509527504444122, 0.36214372515678406, 0.10894634574651718, 0.05322110652923584, -0.45031943917274475, -0.3442659378051758 ]