html_url
stringlengths
51
51
title
stringlengths
6
280
comments
stringlengths
67
24.7k
body
stringlengths
51
36.2k
comment_length
int64
16
1.45k
text
stringlengths
159
38.3k
embeddings
sequence
https://github.com/huggingface/datasets/issues/2300
Add VoxPopuli
Hey @jfainberg, This sounds great! I think adding a dependency would not be a big problem, however automatically segmenting the data probably means that it would take a very long time to do: ```python dataset = load_dataset("voxpopuli", "french") ``` => so as a start I think your option 2 is the way to go!
## Adding a Dataset - **Name:** Voxpopuli - **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings - **Paper:** https://arxiv.org/abs/2101.00390 - **Data:** https://github.com/facebookresearch/voxpopuli - **Motivation:** biggest unlabeled speech dataset **Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
54
Add VoxPopuli ## Adding a Dataset - **Name:** Voxpopuli - **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings - **Paper:** https://arxiv.org/abs/2101.00390 - **Data:** https://github.com/facebookresearch/voxpopuli - **Motivation:** biggest unlabeled speech dataset **Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning. Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md). Hey @jfainberg, This sounds great! I think adding a dependency would not be a big problem, however automatically segmenting the data probably means that it would take a very long time to do: ```python dataset = load_dataset("voxpopuli", "french") ``` => so as a start I think your option 2 is the way to go!
[ -0.0816580057144165, 0.3061467111110687, 0.04513053596019745, -0.06544562429189682, 0.0917578935623169, -0.0741552859544754, 0.09213342517614365, -0.13478294014930725, 0.005094093270599842, 0.0749618336558342, 0.11421525478363037, 0.020143359899520874, -0.1508442908525467, 0.16917365789413452, 0.17554743587970734, -0.16946573555469513, 0.010623235255479813, 0.0008435656200163066, 0.0953608900308609, -0.023361144587397575, -0.051213111728429794, 0.04129670187830925, 0.08495845645666122, -0.17064277827739716, -0.11657726764678955, -0.009447097778320312, -0.22073598206043243, 0.05975345894694328, -0.01069772057235241, 0.0013506031828001142, -0.03163659945130348, 0.036187827587127686, 0.08209433406591415, 0.09550482034683228, 0.000005975767635391094, 0.017536219209432602, -0.038920823484659195, -0.13587188720703125, 0.033035725355148315, -0.11707616597414017, 0.005255368072539568, -0.03423212468624115, -0.1726340651512146, 0.025586530566215515, 0.09856577217578888, -0.05200058966875076, 0.044191014021635056, -0.11030858010053635, 0.11705928295850754, 0.12707263231277466, -0.004850650206208229, -0.0620846226811409, 0.026780687272548676, -0.08172890543937683, 0.07759521901607513, 0.010010192170739174, -0.046288520097732544, 0.0770845115184784, 0.0494750551879406, 0.05357521399855614, 0.0010216867085546255, 0.03964238613843918, -0.04117264971137047, -0.09355667978525162, 0.14890068769454956, 0.038147952407598495, -0.18283358216285706, -0.1891295611858368, 0.10018172115087509, 0.16170622408390045, 0.18667453527450562, 0.02201334573328495, 0.13206911087036133, 0.030540315434336662, -0.0325409397482872, -0.17460520565509796, -0.07271920144557953, -0.07824582606554031, 0.0691036805510521, -0.06942858546972275, 0.09241287410259247, -0.1042424812912941, -0.02810007333755493, 0.009928629733622074, -0.12506753206253052, 0.07038366049528122, -0.06982095539569855, -0.010076764039695263, 0.10566715896129608, -0.035232484340667725, -0.06588771194219589, -0.03452376276254654, -0.044039126485586166, 0.03522031381726265, -0.08223803341388702, -0.091839499771595, 0.030322670936584473, -0.10371643304824829, -0.013780355453491211, -0.0011825303081423044, -0.09980098158121109, -0.06645075976848602, -0.03613615036010742, 0.16511230170726776, -0.013501918874680996, -0.0889621153473854, -0.009725937619805336, 0.0025745423045009375, -0.06282579153776169, 0.021675607189536095, -0.13585759699344635, 0.125608429312706, -0.12122927606105804, 0.013109995052218437, 0.06136636435985565, 0.17761768400669098, -0.07211831212043762, 0.013194568455219269, -0.015629690140485764, 0.05931111425161362, 0.134107768535614, -0.08707503974437714, -0.012649094685912132, 0.12452299892902374, 0.0416746586561203, -0.06504756212234497, -0.14607149362564087, 0.11931832134723663, -0.03415696322917938, -0.15719951689243317, 0.04960796609520912, 0.10226713865995407, 0.17842203378677368, 0.044348105788230896, 0.1544126570224762, -0.029176725074648857, 0.004238524939864874, 0.0021184501238167286, -0.12033139169216156, -0.06552417576313019, -0.03596395254135132, -0.08794471621513367, -0.19052748382091522, -0.05748523771762848, 0.01916137896478176, -0.06784269958734512, 0.0014924065908417106, 0.24912229180335999, -0.08637744188308716, 0.012300416827201843, -0.06320584565401077, -0.014111134223639965, -0.2044471800327301, 0.18541282415390015, 0.07439074665307999, -0.1352272629737854, -0.12571588158607483, 0.08074036985635757, -0.1521315723657608, -0.10930057615041733, 0.05997217074036598, 0.052851658314466476, -0.021603282541036606, 0.11786364763975143, 0.05432073771953583, 0.20810037851333618, -0.1516694873571396, -0.05422721803188324, -0.09271038323640823, 0.06012743338942528, 0.08000677078962326, -0.06543157249689102, 0.09036112576723099, 0.07291645556688309, 0.011939776130020618, 0.019260430708527565, -0.06796308606863022, -0.15497596561908722, -0.14914946258068085, 0.023547815158963203, -0.09210196137428284, -0.19328522682189941, 0.0871720016002655, 0.06552162766456604, 0.19757793843746185, 0.11090870201587677, 0.09604966640472412, 0.15896834433078766, 0.016250567510724068, -0.14371170103549957, -0.06679156422615051, -0.015926746651530266, 0.12313420325517654, 0.08760036528110504, 0.0330766960978508, 0.09485313296318054, 0.008914495818316936, -0.0011745914816856384, 0.064103864133358, -0.14062415063381195, 0.036487385630607605, 0.08967628329992294, 0.18101096153259277, -0.021326664835214615, -0.04927704483270645, -0.276792973279953, -0.01570911332964897, -0.1483335942029953, 0.1729326993227005, 0.0638965293765068, 0.08437711000442505, -0.01558536384254694, -0.12187281996011734, -0.1869000643491745, -0.18804655969142914, 0.041699767112731934, -0.024480262771248817, -0.06830810010433197, -0.035563163459300995, 0.046984877437353134, -0.05741172283887863, -0.08797281235456467, 0.05455851927399635, 0.07162690162658691, 0.018254311755299568, 0.04496021568775177, 0.027510641142725945, 0.002467854181304574, 0.14417517185211182, 0.1530742198228836, 0.046998631209135056, 0.0515754371881485, 0.05815182253718376, 0.018379857763648033, -0.09574826806783676, -0.05089833587408066, 0.05270726978778839, -0.09729024022817612, 0.001780534628778696, -0.013090875931084156, -0.04958634823560715, -0.01876281015574932, -0.03497849777340889, -0.06984898447990417, -0.08186611533164978, 0.001024396508000791, 0.11335810273885727, 0.04011159762740135, 0.04414251819252968, -0.11128406971693039, 0.010398689657449722, 0.02208283357322216, 0.07367244362831116, 0.007940069772303104, 0.08286160975694656, 0.012872153893113136, 0.1706526130437851, 0.08937323093414307, -0.0038559511303901672, -0.1541483998298645, -0.023675112053751945, -0.034835416823625565, 0.011011316440999508, -0.006024291273206472, 0.018580792471766472, -0.03767397999763489, 0.01957300305366516, -0.06452380120754242, -0.013526073656976223, 0.026791628450155258, 0.006032994017004967, -0.15565480291843414, 0.024691801518201828, -0.08340217173099518, 0.005941309966146946, -0.17873984575271606, -0.01419017929583788, 0.055492524057626724, 0.051435209810733795, -0.13933630287647247, -0.004952393006533384, 0.019905898720026016, 0.013491882011294365, 0.026603687554597855, 0.08502086997032166, 0.0009695481858216226, 0.0002977262483909726, -0.05893143266439438, 0.02244790457189083, -0.12073759734630585, -0.08217256516218185, 0.07235133647918701, 0.10358672589063644, -0.0526098906993866, 0.010947258211672306, 0.027246257290244102, 0.14784735441207886, 0.006666400469839573, -0.052754778414964676, -0.17426864802837372, 0.001752172363922, 0.0044025396928191185, 0.1933768093585968, 0.05674382299184799, -0.07739763706922531, 0.16684012115001678, 0.045148707926273346, 0.11104047298431396, 0.012859005481004715, 0.005918494891375303, 0.03797885775566101, -0.08871486037969589, 0.06871787458658218, 0.021684255450963974, -0.09709237515926361, 0.15346869826316833, -0.01045903842896223, -0.18947070837020874, -0.13802044093608856, 0.08653475344181061, 0.08362852036952972, 0.01711343601346016, -0.0718771293759346, 0.032515160739421844, -0.00044061956577934325, -0.1349339634180069, -0.27806293964385986, -0.09047725796699524, 0.01535864733159542, 0.1133715882897377, 0.021377339959144592, 0.10732552409172058, -0.04274339973926544, -0.04743903502821922, 0.1290983408689499, 0.0397706963121891, -0.12238205224275589, 0.01814432255923748, 0.10607371479272842, -0.06629826873540878, 0.17495320737361908, -0.11483389139175415, -0.2767889201641083, -0.004577298182994127, -0.05474395304918289, -0.06328770518302917, 0.11557833105325699, -0.08265174925327301, -0.06530434638261795, 0.08461963385343552, 0.09099196642637253, 0.17254379391670227, 0.12696105241775513, 0.08751995116472244, -0.09705917537212372, 0.11659322679042816, -0.15364237129688263, 0.2203640639781952, -0.12112748622894287, -0.01886752061545849, -0.028563719242811203, 0.019651668146252632, 0.21806561946868896, 0.08632931858301163, 0.009721026755869389, -0.005460881628096104, 0.10902673751115799, -0.004193960223346949, -0.14215070009231567, -0.08750922232866287, 0.12360948324203491, -0.020171083509922028, 0.003585676895454526, 0.24790361523628235, -0.0010752398520708084, -0.049169525504112244, 0.007343085948377848, -0.1033186987042427, 0.17783841490745544, 0.07148603349924088, 0.04938605800271034, -0.03451519459486008, 0.03809666261076927, 0.09742564707994461, 0.010973175056278706, -0.12196549773216248, -0.03255226090550423, -0.04038349911570549, -0.16557301580905914, 0.09248864650726318, 0.05695900693535805, 0.005906845908612013, 0.06885582953691483, -0.09162415564060211, -0.09633245319128036, -0.11909045279026031, -0.02464252896606922, 0.048282425850629807, 0.00755641283467412, -0.0048159952275455, 0.15278886258602142, -0.11697379499673843, -0.1294632852077484, -0.22902047634124756, 0.01745086908340454, 0.21491608023643494, -0.04030507430434227, 0.10290204733610153, -0.1019679456949234, 0.02979997731745243, 0.08793426305055618, 0.01767643541097641, -0.2124524712562561, 0.191361203789711, 0.18024790287017822, 0.1807633340358734, -0.06284394860267639, 0.05865000560879707, 0.034092407673597336, 0.09649661928415298, -0.16530144214630127, 0.2161370813846588, 0.02207530476152897, 0.11226075887680054, 0.2659824788570404, 0.041527606546878815, 0.12694932520389557, -0.003456576494500041, 0.19713924825191498, 0.007813424803316593, 0.003054922679439187, 0.24330021440982819, -0.009389271028339863, -0.03269084170460701, -0.15967001020908356, -0.028241412714123726, 0.18899986147880554, -0.13133706152439117, -0.15657274425029755, -0.2596491575241089, -0.010930224321782589, 0.06649970263242722, 0.05265156179666519, 0.022315094247460365, 0.15561912953853607, 0.16977253556251526, -0.2019152194261551, 0.013329843990504742, -0.07006265223026276, 0.01968141831457615, -0.1581389605998993, -0.22726085782051086, -0.2801347076892853, 0.09744928777217865, 0.06258892267942429, -0.05028131604194641, 0.01112725492566824, -0.015951618552207947, -0.05132303386926651, 0.16127407550811768, -0.1877514123916626, -0.10241539031267166, 0.1637921780347824, -0.03710482642054558, -0.00582459382712841, 0.27438828349113464, 0.29557740688323975, -0.16878484189510345, -0.012509183026850224, -0.051995899528265, 0.03278765827417374, 0.036051806062459946, 0.1170937791466713, -0.05565078929066658, 0.3008241653442383, -0.08105973154306412, 0.009916759096086025, -0.15262076258659363, 0.03825357183814049, 0.08468012511730194, 0.015534870326519012, 0.09797144681215286, -0.1029312014579773, 0.05114856734871864, -0.2123783677816391, 0.007122802548110485, 0.04287051409482956, -0.014139823615550995, -0.024011783301830292, 0.025650205090641975, -0.06014645844697952, -0.09448900818824768, 0.0693923607468605, -0.1645803600549698, -0.05022120848298073, -0.0661257654428482, 0.051109280437231064, 0.08140294253826141, 0.00772510003298521, 0.08888842165470123, -0.004992495756596327, -0.000615994562394917, 0.03019479662179947, 0.04636792093515396, -0.038914598524570465, -0.001215666881762445, -0.019738152623176575, 0.007143765222281218, 0.07889630645513535, -0.19211174547672272, 0.1502503603696823, 0.035398196429014206, -0.015612460672855377, -0.018989598378539085, -0.14336486160755157, 0.016102513298392296, -0.07798869907855988, -0.07263891398906708, 0.05875878408551216, 0.12047576159238815, -0.13340449333190918, -0.04879838600754738, 0.0468522384762764, -0.16972661018371582, -0.01468371320515871, -0.13790979981422424, 0.08898879587650299, -0.10770012438297272, 0.005477315280586481, 0.019744614139199257, 0.07301107794046402, 0.017884381115436554, 0.10979744046926498, 0.06028274819254875, -0.09554378688335419, 0.19900038838386536, 0.002255334984511137, -0.09760802239179611, -0.028736967593431473, 0.04196873679757118, -0.03102841041982174, -0.10980477184057236, -0.13364902138710022, 0.0028091655112802982, -0.0037498970050364733, 0.050158459693193436, -0.014108295552432537, -0.20595619082450867, -0.10604071617126465, 0.10389140248298645, -0.03796464949846268, 0.12746669352054596, 0.019207362085580826, -0.14591264724731445, 0.16159266233444214, -2.733336165538374e-32, -0.05198315903544426, -0.09650734066963196, -0.06699470430612564, 0.0012854801025241613, -0.12105374783277512, 0.05776006728410721, 0.10941582918167114, -0.06852267682552338, -0.00506188441067934, -0.04074710234999657, 0.10984361171722412, -0.06379737704992294, 0.02421553246676922, 0.26859766244888306, 0.08425531536340714, 0.011195049621164799, 0.011716634966433048, 0.0011203036410734057, -0.012292269617319107, 0.1484953761100769, 0.024637117981910706, -0.0005913475761190057, 0.0631626546382904, -0.10869964957237244, -0.23946824669837952, -0.07015743106603622, -0.04726094752550125, -0.026128772646188736, -0.1255934238433838, 0.13793836534023285, 0.02800941653549671, 0.08278334885835648, 0.02321551740169525, -0.005191595293581486, 0.019836172461509705, 0.2565646469593048, 0.02986127696931362, 0.11015066504478455, -0.2961614429950714, 0.14141139388084412, 0.08676028251647949, -0.0003273907059337944, -0.008694851770997047, -0.060659755021333694, 0.2836443781852722, 0.07394362986087799, 0.07380986958742142, -0.09450040012598038, 0.047663602977991104, 0.19568997621536255, 0.09267338365316391, 0.12459466606378555, -0.02421245537698269, -0.004740540403872728, 0.20541870594024658, 0.17133976519107819, 0.10398231446743011, -0.14671611785888672, -0.15040254592895508, 0.10807257145643234, 0.0027787256985902786, 0.04246610775589943, -0.05344951152801514, -0.02253863215446472, 0.033999551087617874, 0.004823450464755297, 0.1366339772939682, -0.1649128794670105, 0.066226065158844, 0.09477424621582031, -0.10773977637290955, 0.12634973227977753, 0.0065951235592365265, 0.0036003775894641876, -0.05750555917620659, -0.07670159637928009, -0.16899502277374268, -0.006579633802175522, 0.13307340443134308, -0.2551056742668152, -0.2062782347202301, 0.0544101856648922, 0.027600448578596115, 0.011697199195623398, -0.03914951533079147, -0.07676032930612564, -0.027763092890381813, 0.03807457536458969, 0.0230413805693388, -0.0535486601293087, -0.12798331677913666, -0.14006006717681885, 0.08097333461046219, -0.055595897138118744, -0.012944098562002182, -0.15968331694602966, -0.053682275116443634, 0.16211114823818207, -0.030807970091700554, -0.00018607043602969497, 0.007307876367121935, -0.09826395660638809, 0.262541800737381, -0.027328668162226677, 0.05227285251021385, -0.009538325481116772, 0.032480064779520035, 0.176832914352417, -0.19239884614944458, 0.05137620493769646, 0.014254060573875904, 0.06327736377716064, 0.027149010449647903, 0.15018993616104126, 0.09045583009719849, -0.13513623178005219, 0.03351199999451637, -0.06372430920600891, 0.17559652030467987, 0.017292631790041924, -0.1714305430650711, -0.11130303144454956, -0.09225597977638245, -0.06503717601299286, -0.01057680044323206, 0.0958147794008255, -0.1643734574317932, -0.03297209367156029, 0.01082640327513218, 0.008325708098709583, -0.06990469247102737, -0.049947988241910934, 7.713288141530938e-7, -0.17543677985668182, -0.009858454577624798, -0.09504639357328415, -0.013838744722306728, 0.0430644229054451, 0.04797126725316048, -0.11605920642614365, 0.0660066083073616, -0.14433014392852783, -0.06252115964889526, 0.018146084621548653, -0.29790446162223816, 0.03846259415149689, 0.10837548971176147, -0.3238575756549835, -0.016720103099942207, -0.13489429652690887, -0.09076181799173355, -0.17419923841953278, 0.01990704983472824, 0.03370124474167824, 0.24819040298461914, 0.08786589652299881, 0.008003603667020798, 0.037362974137067795, -0.03506436571478844, 0.005917856004089117, 0.1347866654396057, -0.18162226676940918, 0.12587647140026093, 0.03210620582103729, 0.09168920665979385, -0.1515905112028122, 0.1933211237192154, -0.27036741375923157, -0.18900828063488007, 0.044992540031671524, 0.013202463276684284, -0.02201204188168049, -0.09402729570865631, 0.060023266822099686, 0.24176394939422607, -0.07111307978630066, 0.03714759275317192, 0.0683504268527031, 0.08304969221353531, -0.051662150770425797, -0.013193038292229176, -0.12685494124889374, 0.13668294250965118, 0.08303616940975189, 0.1202053353190422, 0.00794570054858923, 0.054326172918081284, -0.07106834650039673, 0.09777683764696121, 0.00819722842425108, 0.019465504214167595, -0.024193175137043, 0.06089622154831886, -0.16598378121852875, -0.0682038813829422, 0.028110628947615623, -0.09390883147716522, 0.12687812745571136, 0.024371443316340446, 0.06448724120855331, 2.106545110568561e-34, -0.05649667605757713, -0.08522605150938034, -0.06929266452789307, -0.02509823814034462, -0.059826742857694626, -0.0031217446085065603, -0.04722147434949875, -0.020482568070292473, 0.017713746055960655, -0.04460675269365311, -0.012794990092515945 ]
https://github.com/huggingface/datasets/issues/2294
Slow #0 when using map to tokenize.
Hi ! Have you tried other values for `preprocessing_num_workers` ? Is it always process 0 that is slower ? There are no difference between process 0 and the others except that it processes the first shard of the dataset.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not args.overwrite_cache, )` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others. It looks like this: ![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png) It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
39
Slow #0 when using map to tokenize. Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not args.overwrite_cache, )` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others. It looks like this: ![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png) It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it? Hi ! Have you tried other values for `preprocessing_num_workers` ? Is it always process 0 that is slower ? There are no difference between process 0 and the others except that it processes the first shard of the dataset.
[ -0.11650309711694717, 0.006837556604295969, -0.08796552568674088, 0.08659282326698303, 0.055681757628917694, -0.07438238710165024, 0.12216705828905106, 0.15662004053592682, -0.3204202353954315, 0.12929962575435638, 0.11910466849803925, -0.02529129758477211, -0.1261971890926361, 0.056132521480321884, -0.12425397336483002, -0.006700476165860891, 0.021896839141845703, 0.024719666689634323, 0.09764198213815689, -0.07892635464668274, -0.22141613066196442, -0.0429617278277874, 0.004987056367099285, -0.024866141378879547, -0.109994076192379, -0.09220151603221893, -0.06333024799823761, 0.07336442172527313, -0.07861083000898361, -0.16837988793849945, -0.2651635706424713, 0.1379568725824356, -0.22415965795516968, 0.1919933259487152, 0.000005116658485349035, -0.14692245423793793, 0.03694053366780281, 0.15216666460037231, 0.027335025370121002, 0.16632014513015747, 0.22294919192790985, -0.15075181424617767, 0.02355344220995903, 0.03480541333556175, -0.0656658411026001, 0.10952389240264893, -0.09569916129112244, 0.06742144376039505, -0.020514698699116707, 0.022181615233421326, -0.05137518420815468, 0.10448339581489563, -0.21133142709732056, 0.11065284162759781, 0.034601811319589615, 0.014804151840507984, -0.02298812009394169, -0.20369654893875122, -0.14748263359069824, 0.04027428850531578, 0.16027125716209412, -0.08966848254203796, 0.08925782144069672, 0.1211061105132103, 0.03496391698718071, 0.23709681630134583, -0.24518756568431854, -0.1587972790002823, 0.1361847221851349, 0.1898954063653946, -0.26869815587997437, 0.03733105584979057, -0.05908488482236862, 0.11955289542675018, -0.00797798577696085, -0.14582756161689758, 0.023543572053313255, 0.04561333358287811, 0.0008660724852234125, -0.08900526165962219, -0.1317196488380432, 0.022524451836943626, 0.038418710231781006, -0.04908127710223198, -0.1367683708667755, 0.1437739133834839, 0.05476884916424751, 0.047455642372369766, 0.11075223237276077, 0.05260642245411873, -0.08257473260164261, -0.00349805667065084, -0.08269645273685455, 0.09043240547180176, -0.11355368047952652, 0.0952351912856102, -0.09273510426282883, -0.10263726860284805, -0.03291274607181549, -0.14305439591407776, -0.05811299756169319, 0.2053205966949463, 0.015597696416079998, -0.040477294474840164, -0.24592532217502594, -0.17345553636550903, 0.02225552685558796, -0.11090608686208725, 0.04551059380173683, -0.10900379717350006, -0.09289494156837463, 0.20015469193458557, -0.15783846378326416, 0.12745746970176697, 0.1150393858551979, -0.10280010104179382, 0.08336114883422852, -0.0898348018527031, 0.011123821139335632, -0.028056897222995758, 0.08450623601675034, 0.15264534950256348, -0.0029677064158022404, 0.04345431551337242, -0.08652560412883759, 0.15179969370365143, -0.22786222398281097, -0.08918168395757675, -0.31419581174850464, 0.09918557852506638, -0.11459297686815262, -0.025455597788095474, 0.067361019551754, 0.01736050844192505, 0.07049007713794708, 0.06357958167791367, -0.015606176108121872, -0.04489981383085251, 0.025359561666846275, -0.15421244502067566, 0.2535944879055023, -0.09803667664527893, 0.14990577101707458, 0.108420230448246, -0.008746260777115822, 0.15637928247451782, -0.02166672796010971, 0.22539816796779633, -0.06268155574798584, -0.07123629748821259, -0.11521022766828537, 0.05520566925406456, -0.03814481571316719, 0.0028194785118103027, -0.21113057434558868, 0.07774058729410172, -0.011539076454937458, -0.020358961075544357, -0.18885664641857147, 0.010238313116133213, -0.04241614416241646, -0.08360409736633301, -0.163126602768898, 0.003097712527960539, 0.22385765612125397, 0.12150596082210541, -0.023217234760522842, 0.06802044808864594, -0.02143615297973156, 0.14998258650302887, 0.36057132482528687, 0.06265118718147278, -0.06123969331383705, 0.009884396567940712, -0.12378993630409241, 0.2142132967710495, -0.15765678882598877, 0.10543644428253174, -0.04798202961683273, 0.0681726261973381, -0.052918605506420135, -0.12333197146654129, -0.017773151397705078, -0.10961787402629852, 0.22792556881904602, -0.11396633088588715, 0.08976760506629944, 0.08747775852680206, -0.09262338280677795, 0.10496442019939423, -0.08575621992349625, -0.061828598380088806, -0.05993770435452461, -0.04012376815080643, -0.07889590412378311, -0.15431246161460876, -0.16303960978984833, 0.028585923835635185, 0.02707076631486416, -0.20271797478199005, 0.002032994292676449, -0.07890573143959045, -0.016234617680311203, -0.04581017047166824, -0.01746864803135395, 0.057360198348760605, -0.14609235525131226, 0.1311444193124771, 0.0532047338783741, -0.20365014672279358, -0.08488846570253372, 0.06084698811173439, 0.1579635888338089, 0.10705143213272095, 0.051101554185152054, -0.15735183656215668, -0.03641856461763382, 0.015008204616606236, -0.17616914212703705, 0.1549583226442337, -0.05931727588176727, -0.011423670686781406, 0.2054605782032013, 0.10130370408296585, 0.06720343977212906, -0.06231115758419037, 0.1134839877486229, 0.023359498009085655, 0.021983619779348373, 0.05945230647921562, -0.011366922408342361, -0.1790311634540558, 0.20455126464366913, -0.15916593372821808, 0.12511134147644043, 0.14773572981357574, -0.04845087602734566, -0.12300769239664078, 0.1598438173532486, 0.06392316520214081, -0.04644693061709404, -0.053984884172677994, -0.10593258589506149, -0.04532015696167946, 0.10958089679479599, 0.10326024144887924, 0.17721502482891083, 0.16951127350330353, 0.06038444861769676, -0.07486187666654587, 0.10362846404314041, 0.13755397498607635, 0.07494913041591644, 0.038598597049713135, 0.07514815032482147, 0.030111221596598625, 0.15572907030582428, 0.04632188379764557, 0.141172394156456, 0.11280932277441025, 0.13515916466712952, -0.014226517640054226, 0.0488845594227314, -0.002936342265456915, -0.05564792454242706, -0.07595016062259674, 0.05341677367687225, -0.22188319265842438, 0.015922075137495995, 0.05942963808774948, 0.11833758652210236, -0.06473111361265182, -0.07462423294782639, -0.03520994633436203, -0.07806061208248138, -0.0741061344742775, -0.14551375806331635, -0.04964558780193329, -0.00799364224076271, 0.03320688009262085, -0.053933802992105484, 0.025768497958779335, 0.08270687609910965, 0.13904079794883728, 0.12373051792383194, -0.011291797272861004, 0.024569178000092506, 0.2427411526441574, -0.025492249056696892, -0.03512972593307495, 0.0026870451401919127, -0.19204942882061005, 0.08951693028211594, 0.032542984932661057, 0.02793007716536522, 0.017730340361595154, 0.053690072149038315, -0.14223900437355042, -0.0009602362406440079, 0.046078409999608994, -0.03894767165184021, 0.1520635336637497, -0.059978242963552475, -0.055206745862960815, 0.10168857872486115, 0.15958912670612335, -0.000011826353329524864, -0.07029486447572708, -0.29577577114105225, 0.08642418682575226, -0.18474727869033813, -0.059748027473688126, 0.1030198186635971, 0.02925032563507557, -0.06719375401735306, 0.026956085115671158, -0.16631995141506195, -0.0517711378633976, 0.15548856556415558, -0.029303180053830147, -0.051550645381212234, 0.07539986073970795, -0.23742587864398956, -0.168657585978508, -0.04453546181321144, 0.058743227273225784, 0.032590314745903015, 0.11094982177019119, 0.022372791543602943, 0.05425417423248291, 0.028913579881191254, -0.003259703516960144, -0.029147986322641373, 0.09262954443693161, 0.12920911610126495, -0.20946195721626282, -0.010035587474703789, -0.03332008793950081, 0.26464390754699707, 0.1452900916337967, -0.09870436787605286, 0.08409075438976288, -0.12236788123846054, -0.05642183497548103, 0.1328042596578598, 0.1644245833158493, 0.05362666770815849, -0.2760014533996582, 0.013102104887366295, 0.12737086415290833, -0.017482221126556396, 0.17497874796390533, -0.044986024498939514, -0.05292912945151329, 0.03525804355740547, -0.03705684095621109, -0.11528296023607254, 0.09736824780702591, -0.24303774535655975, 0.09218244254589081, 0.042155008763074875, 0.004450782667845488, 0.23631303012371063, 0.05937271565198898, -0.2540823519229889, -0.1931685507297516, -0.07833169400691986, -0.09630259871482849, -0.06648749858140945, -0.021303104236721992, 0.043897610157728195, 0.10435239225625992, -0.0928836539387703, 0.06077910214662552, 0.04170462116599083, -0.05011356249451637, 0.11699370294809341, -0.1459229737520218, 0.07993325591087341, -0.08909112960100174, 0.06964213401079178, 0.05896782502532005, -0.16755180060863495, 0.023460684344172478, 0.08013913780450821, 0.07402597367763519, -0.14219848811626434, -0.06405007839202881, -0.20072892308235168, -0.1088702380657196, -0.1389313042163849, -0.23631396889686584, -0.015992596745491028, -0.17367836833000183, -0.003499853191897273, 0.014145925641059875, 0.07998576760292053, -0.06843839585781097, 0.05208868533372879, 0.17685428261756897, 0.06285247951745987, 0.24098016321659088, -0.004565941635519266, 0.09393700957298279, 0.02037421613931656, -0.06562381237745285, -0.09693237394094467, -0.026680653914809227, 0.1578986495733261, -0.02500607632100582, 0.18507613241672516, 0.29844269156455994, -0.064898282289505, -0.11310598999261856, 0.17292815446853638, -0.11608142405748367, 0.11174894124269485, 0.07444000989198685, -0.02142714522778988, -0.17541533708572388, 0.21163371205329895, -0.20946842432022095, -0.12439308315515518, 0.04575350135564804, -0.08425318449735641, -0.09816896915435791, 0.021075861528515816, -0.02871360257267952, 0.2019338309764862, 0.09666673094034195, -0.0086600286886096, 0.016516687348484993, 0.060882389545440674, 0.16520529985427856, 0.12529298663139343, -0.06859063357114792, -0.04251893237233162, -0.06277770549058914, -0.0419146828353405, 0.1386847198009491, -0.07469960302114487, 0.054505638778209686, 0.32794082164764404, -0.06861206889152527, -0.022114677354693413, -0.140060693025589, 0.06879503279924393, -0.022763332352042198, 0.12429370731115341, 0.04446856305003166, 0.003711563302204013, -0.25262555480003357, -0.06660764664411545, -0.20941995084285736, 0.19728757441043854, 0.10273714363574982, 0.0014883234398439527, -0.3023711144924164, 0.08306260406970978, 0.07874871790409088, -0.074532151222229, -0.01163084153085947, -0.10998948663473129, 0.06818567216396332, -0.11986159533262253, 0.1684851497411728, 0.045910198241472244, 0.001017946982756257, 0.1834932118654251, -0.09231796115636826, -0.017447713762521744, 0.008498921990394592, 0.0408538281917572, 0.12874896824359894, 0.13466918468475342, 0.036841146647930145, 0.11269127577543259, 0.0651225671172142, 0.1585700511932373, -0.1474394053220749, 0.13452214002609253, 0.18758532404899597, -0.07341448217630386, -0.04564179852604866, 0.11492539197206497, 0.09363747388124466, -0.014964446425437927, 0.06120731309056282, -0.09968239068984985, -0.10742279142141342, 0.013344841077923775, 0.08140265196561813, -0.09439680725336075, 0.04065743461251259, -0.045322176069021225, 0.07120118290185928, 0.11349081993103027, -0.05820692330598831, -0.016347508877515793, -0.024313857778906822, 0.1285342276096344, -0.18897949159145355, -0.034199006855487823, -0.08492086827754974, 0.04298423230648041, 0.04013100638985634, -0.07488928735256195, -0.1386493593454361, -0.0077421520836651325, 0.27664947509765625, -0.05504700541496277, 0.05228566750884056, 0.08558690547943115, -0.02845308929681778, 0.09729617834091187, 0.10282864421606064, 0.02227357029914856, -0.07787328958511353, 0.04978218674659729, -0.20996060967445374, 0.0909266322851181, 0.01763322949409485, -0.013004287146031857, -0.037173300981521606, -0.04266362637281418, 0.11715817451477051, -0.14158140122890472, -0.004793841391801834, 0.2560611069202423, 0.18724963068962097, 0.07809198647737503, 0.0630393996834755, 0.04344020038843155, 0.17526210844516754, -0.08668995648622513, 0.1639908105134964, 0.13489030301570892, 0.058897946029901505, -0.10517608374357224, 0.06877628713846207, 0.033254146575927734, -0.09897907078266144, -0.1863633394241333, -0.13341563940048218, 0.0005737928440794349, -0.2092653214931488, -0.008782378397881985, -0.058062560856342316, -0.10717033594846725, -0.1751379370689392, 0.025366265326738358, 0.02687319554388523, 0.09582628309726715, 0.0006262366659939289, -0.09859113395214081, -2.3722019665731017e-32, -0.055053602904081345, -0.14484606683254242, -0.026459844782948494, -0.09314441680908203, 0.019513200968503952, 0.07634592801332474, -0.07545759528875351, 0.007528926711529493, -0.06104838103055954, -0.08760257065296173, -0.17853552103042603, 0.05088247358798981, 0.024780279025435448, 0.062325019389390945, -0.1941537857055664, 0.0491115041077137, 0.3261793553829193, -0.1317429095506668, -0.14305371046066284, -0.0015874834498390555, 0.11503046005964279, 0.0069773634895682335, -0.15668494999408722, 0.14414136111736298, -0.04923665523529053, 0.037863388657569885, 0.11106870323419571, -0.17686128616333008, 0.08542285114526749, -0.20183967053890228, -0.04836450517177582, 0.17014820873737335, -0.04139059782028198, 0.009474045597016811, -0.018522299826145172, -0.12033028900623322, 0.015123862773180008, 0.020860010758042336, 0.12972921133041382, 0.049249522387981415, 0.11070650815963745, -0.12240096181631088, 0.10202425718307495, 0.0736810490489006, -0.06679131835699081, 0.07238265126943588, -0.03148619458079338, 0.16203661262989044, -0.2878982126712799, -0.03198755532503128, -0.12682250142097473, 0.0871422290802002, 0.08123674988746643, 0.06105397269129753, 0.0066763958893716335, -0.2370818555355072, 0.06400281935930252, 0.023485621437430382, -0.21172749996185303, -0.19856663048267365, 0.21936644613742828, 0.02067483216524124, 0.1585955172777176, 0.1840275675058365, -0.01450011134147644, 0.0021011605858802795, 0.4658369719982147, 0.19284673035144806, 0.008734961971640587, 0.07755130529403687, 0.21229484677314758, -0.03407854586839676, 0.007611014414578676, -0.3396666646003723, 0.22348830103874207, -0.008905111812055111, -0.045239243656396866, 0.05030924081802368, 0.0387917086482048, -0.0336252860724926, 0.0009801768464967608, -0.09063567221164703, 0.11652898043394089, 0.056767985224723816, -0.10055423527956009, 0.06629132479429245, -0.0078002759255468845, 0.042910948395729065, -0.07641524821519852, -0.13997767865657806, 0.03060377761721611, 0.043824225664138794, -0.09120281785726547, -0.0581735298037529, 0.03181131184101105, 0.09799908846616745, -0.12063965946435928, 0.1366661936044693, -0.0795697271823883, -0.033114511519670486, -0.22885368764400482, 0.016271863132715225, 0.12549380958080292, 0.019783928990364075, 0.178239107131958, -0.07536851614713669, 0.048778630793094635, -0.1284252256155014, -0.09385019540786743, -0.02547459304332733, -0.039395771920681, 0.0822659432888031, 0.07321721315383911, 0.1434582769870758, 0.0952889695763588, -0.11016754060983658, 0.07604634761810303, 0.007614356931298971, 0.017660778015851974, 0.16920045018196106, -0.020716199651360512, -0.024480564519762993, 0.029809249565005302, -0.051643744111061096, 0.013777255080640316, 0.14366678893566132, -0.1447659730911255, 0.020183725282549858, -0.0934414342045784, -0.17413866519927979, -0.09648284316062927, -0.09873116761445999, 6.806033070461126e-7, -0.058355435729026794, 0.13431569933891296, -0.057429008185863495, -0.07487045973539352, -0.009266676381230354, 0.0855075865983963, -0.1305629312992096, -0.022952331230044365, -0.2539561688899994, 0.14377334713935852, -0.04235732927918434, 0.07199572026729584, 0.03523837402462959, 0.086207814514637, 0.20282886922359467, -0.2598240077495575, -0.11900266259908676, 0.0030473109800368547, -0.24080248177051544, 0.15789897739887238, -0.18977251648902893, -0.02486964501440525, -0.04199932515621185, -0.060520801693201065, 0.3124969005584717, -0.0018666951218619943, 0.03724130988121033, -0.051964860409498215, 0.11845002323389053, -0.05428796261548996, 0.15739591419696808, 0.09507256001234055, -0.07661762833595276, 0.02076594904065132, 0.026858313009142876, 0.06984357535839081, -0.04902217537164688, 0.09253586828708649, 0.051288437098264694, -0.07083212584257126, 0.0533798485994339, -0.1475035846233368, 0.0952119454741478, -0.05598391592502594, 0.08417544513940811, -0.006370882038027048, -0.058841630816459656, 0.18923641741275787, 0.0017217035638168454, 0.052895281463861465, -0.018552634865045547, 0.058732856065034866, -0.08985298126935959, 0.20982031524181366, 0.1329628974199295, -0.2846994996070862, -0.10999143123626709, -0.13154910504817963, 0.03813869506120682, -0.20387764275074005, -0.008520637638866901, -0.26743242144584656, -0.020457521080970764, 0.054768018424510956, 0.17830100655555725, 0.022138338536024094, -0.04452480748295784, 1.3829588870434737e-34, 0.014913545921444893, -0.07809469848871231, 0.17116764187812805, -0.1988658308982849, 0.05098854377865791, -0.12878434360027313, 0.0497952401638031, -0.028202209621667862, -0.17588888108730316, -0.22446690499782562, -0.10792779177427292 ]
https://github.com/huggingface/datasets/issues/2294
Slow #0 when using map to tokenize.
Hi, I have found the reason of it. Before using the map function to tokenize the data, I concatenate the wikipedia and bookcorpus first, like this: ```if args.dataset_name1 is not None: dataset1 = load_dataset(args.dataset_name1, args.dataset_config_name1, split="train") dataset1 = dataset1.remove_columns('title') if args.dataset_name2 is not None: dataset2 = load_dataset(args.dataset_name2, args.dataset_config_name2,split="train") assert dataset1.features.type == dataset2.features.type, str(dataset1.features.type)+';'+str(dataset2.features.type) datasets12 = concatenate_datasets([dataset1, dataset2], split='train') ``` When I just use one datasets, e.g. wikipedia, the problem seems no longer exist: ![image](https://user-images.githubusercontent.com/31714566/116967059-13d24380-ace4-11eb-8d14-b7b9c9a275cc.png) Bookcorpus has more row numbers than Wikipedia, however, it takes much more time to process each batch of wiki than that of bookcorpus. When we first concatenate two datasets and then use _map_ to process the concatenated datasets, e.g. `num_proc=5`, process 0 has to process all of the wikipedia data, causing the problem that #0 takes a longer time to finish the job. The problem is caused by the different characteristic of different datasets. One solution might be using _map_ first to process two datasets seperately, then concatenate the tokenized and processed datasets before input to the `Dataloader`.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not args.overwrite_cache, )` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others. It looks like this: ![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png) It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
172
Slow #0 when using map to tokenize. Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not args.overwrite_cache, )` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others. It looks like this: ![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png) It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it? Hi, I have found the reason of it. Before using the map function to tokenize the data, I concatenate the wikipedia and bookcorpus first, like this: ```if args.dataset_name1 is not None: dataset1 = load_dataset(args.dataset_name1, args.dataset_config_name1, split="train") dataset1 = dataset1.remove_columns('title') if args.dataset_name2 is not None: dataset2 = load_dataset(args.dataset_name2, args.dataset_config_name2,split="train") assert dataset1.features.type == dataset2.features.type, str(dataset1.features.type)+';'+str(dataset2.features.type) datasets12 = concatenate_datasets([dataset1, dataset2], split='train') ``` When I just use one datasets, e.g. wikipedia, the problem seems no longer exist: ![image](https://user-images.githubusercontent.com/31714566/116967059-13d24380-ace4-11eb-8d14-b7b9c9a275cc.png) Bookcorpus has more row numbers than Wikipedia, however, it takes much more time to process each batch of wiki than that of bookcorpus. When we first concatenate two datasets and then use _map_ to process the concatenated datasets, e.g. `num_proc=5`, process 0 has to process all of the wikipedia data, causing the problem that #0 takes a longer time to finish the job. The problem is caused by the different characteristic of different datasets. One solution might be using _map_ first to process two datasets seperately, then concatenate the tokenized and processed datasets before input to the `Dataloader`.
[ -0.07984795421361923, 0.06744571775197983, -0.08228759467601776, 0.0897284671664238, 0.09099467843770981, -0.044263582676649094, 0.11791946738958359, 0.11671610921621323, -0.24356481432914734, 0.12091448158025742, 0.059600938111543655, -0.0074912067502737045, -0.03285465016961098, 0.022029122337698936, -0.13773420453071594, -0.03771877661347389, 0.008356676436960697, -0.048145320266485214, 0.08818362653255463, -0.08158842474222183, -0.18623392283916473, -0.03744480013847351, 0.01036211010068655, -0.04259021580219269, -0.03192505985498428, -0.10649196803569794, -0.0964479148387909, 0.05956098064780235, -0.02932101860642433, -0.15399131178855896, -0.22834502160549164, 0.16164329648017883, -0.22277002036571503, 0.17902635037899017, 0.000005119144589116331, -0.12375389039516449, 0.05492999404668808, 0.12181936204433441, 0.030228322371840477, 0.22463680803775787, 0.2256755828857422, -0.10452153533697128, 0.04419798031449318, 0.058863282203674316, -0.05981489643454552, 0.05820031464099884, -0.1835557222366333, 0.04354916885495186, 0.016589613631367683, -0.01591484248638153, -0.033236559480428696, 0.0683945044875145, -0.17713183164596558, 0.06838881969451904, 0.02385849691927433, 0.05886204168200493, -0.013258070684969425, -0.17765118181705475, -0.14231690764427185, 0.020240673795342445, 0.1681307852268219, -0.07417794317007065, 0.03319281339645386, 0.13227204978466034, -0.01215987280011177, 0.22857098281383514, -0.23431570827960968, -0.11233463138341904, 0.10029280930757523, 0.17202968895435333, -0.17847318947315216, 0.026036405935883522, -0.03567883372306824, 0.1509087234735489, 0.009630748070776463, -0.09106824547052383, 0.01133637223392725, 0.014515846036374569, -0.057719260454177856, -0.13671010732650757, -0.17727860808372498, 0.037875279784202576, 0.02820155955851078, -0.023094387724995613, -0.19816096127033234, 0.11641938984394073, 0.08071471750736237, 0.10340480506420135, 0.10984234511852264, 0.0452018640935421, -0.10107648372650146, -0.0743594616651535, -0.016491658985614777, 0.11237174272537231, -0.15560902655124664, 0.038088422268629074, -0.12015235424041748, -0.19460444152355194, -0.047171883285045624, -0.11796361207962036, -0.11725977808237076, 0.1623724400997162, -0.02652827277779579, -0.0389973409473896, -0.2833739221096039, -0.13866941630840302, -0.021629538387060165, -0.08377200365066528, 0.04994761198759079, -0.09984662383794785, -0.10263384878635406, 0.16242824494838715, -0.11086315661668777, 0.1868990808725357, 0.09708581119775772, -0.13568180799484253, 0.07648275047540665, -0.12654179334640503, -0.015212136320769787, -0.06055305153131485, 0.024704856798052788, 0.12325169891119003, 0.025789152830839157, 0.070189468562603, -0.09797613322734833, 0.07791320234537125, -0.23482312262058258, -0.061006974428892136, -0.28694993257522583, 0.1376848816871643, -0.0751241147518158, -0.03909013792872429, 0.07185325771570206, 0.05617891252040863, 0.10255412757396698, 0.054466716945171356, -0.022476041689515114, -0.03166702389717102, -0.03204222396016121, -0.1291073113679886, 0.2782825231552124, -0.09628144651651382, 0.1348128765821457, 0.04886949807405472, 0.04450193792581558, 0.15816237032413483, -0.03474816307425499, 0.22273655235767365, -0.08698263019323349, -0.09591368585824966, -0.1093667671084404, 0.12074214220046997, -0.04439502954483032, 0.07855087518692017, -0.1705654263496399, 0.08612222969532013, -0.023746877908706665, 0.012378479354083538, -0.14436772465705872, -0.04091934487223625, -0.015752986073493958, -0.018505597487092018, -0.13066676259040833, 0.04565965384244919, 0.22592368721961975, 0.14628614485263824, 0.0017140127019956708, 0.07042846083641052, 0.0700845867395401, 0.2038109004497528, 0.34318405389785767, 0.1296636015176773, -0.11495231091976166, 0.09446624666452408, -0.13252893090248108, 0.17317216098308563, -0.10144560784101486, 0.028438152745366096, -0.04807836189866066, 0.06673911958932877, -0.03798693045973778, -0.05183156207203865, -0.0527135506272316, -0.11862538009881973, 0.2419843226671219, -0.1198052316904068, 0.1465979516506195, 0.13928811252117157, -0.07448802888393402, 0.07529168576002121, -0.09845723956823349, -0.10632029175758362, 0.020103977993130684, 0.0028788279742002487, -0.0698876902461052, -0.15870580077171326, -0.17692621052265167, 0.08558304607868195, 0.0586528405547142, -0.21400056779384613, -0.011644866317510605, -0.037305139005184174, -0.05906688794493675, 0.008425464853644371, -0.06184057146310806, 0.05924771726131439, -0.1516173779964447, 0.17909300327301025, 0.12198469787836075, -0.18655483424663544, -0.08260270953178406, 0.012736985459923744, 0.1839088350534439, 0.06410710513591766, 0.048007551580667496, -0.19520315527915955, -0.07876066118478775, 0.06238692253828049, -0.13367386162281036, 0.16818571090698242, -0.04572684317827225, 0.01476074568927288, 0.19038568437099457, 0.1036597490310669, 0.04755743592977524, 0.032495029270648956, 0.11435295641422272, 0.07167048752307892, 0.005980249028652906, 0.06425768882036209, 0.02260010503232479, -0.19627772271633148, 0.15707065165042877, -0.17405320703983307, 0.06902335584163666, 0.15556202828884125, -0.00007807510701240972, -0.2216683179140091, 0.1702011525630951, 0.06091589108109474, -0.022783225402235985, -0.049934495240449905, -0.07831385731697083, -0.08229232579469681, -0.022603211924433708, 0.12355050444602966, 0.22452440857887268, 0.21986615657806396, 0.047534599900245667, -0.10085690766572952, 0.09248185157775879, 0.10181132704019547, 0.06022510305047035, 0.0263043399900198, 0.04952581599354744, 0.08769164234399796, 0.2205106019973755, 0.09607640653848648, 0.16277830302715302, 0.09905717521905899, 0.1682319939136505, 0.03544164076447487, -0.005159376189112663, -0.006909412797540426, -0.048209283500909805, -0.06078421324491501, 0.07574388384819031, -0.18310509622097015, 0.010916693136096, 0.0671302080154419, 0.11645563691854477, -0.10967151820659637, -0.06348872929811478, -0.04734853282570839, -0.020710617303848267, -0.07920679450035095, -0.17095403373241425, -0.0676344707608223, 0.014744306914508343, 0.036576367914676666, -0.03393653407692909, -0.05562403053045273, 0.12118983268737793, 0.1272026151418686, 0.13412795960903168, 0.02229047380387783, 0.03538776934146881, 0.1652602255344391, -0.10399656742811203, -0.05738101527094841, -0.0010234357323497534, -0.18239110708236694, 0.04268519580364227, -0.021268486976623535, -0.004338446073234081, 0.030463216826319695, 0.0819035992026329, -0.13623130321502686, 0.001636276370845735, -0.005606047343462706, 0.0029162655118852854, 0.14673256874084473, -0.07193833589553833, -0.02353733777999878, 0.13259832561016083, 0.16667185723781586, -0.005017814692109823, -0.022879622876644135, -0.29211950302124023, 0.039413291960954666, -0.16923888027668, -0.07019326835870743, 0.10092684626579285, -0.02739608846604824, -0.06770139932632446, 0.033229731023311615, -0.13228978216648102, -0.1541060209274292, 0.13914212584495544, 0.0061354245990514755, -0.037338558584451675, 0.05986243858933449, -0.23588161170482635, -0.19218160212039948, -0.05984487012028694, 0.015058765187859535, -0.0030756026972085238, 0.09955792129039764, 0.03461437299847603, 0.001457825186662376, 0.009670835919678211, 0.028261912986636162, -0.06625737994909286, 0.04015970230102539, 0.17337633669376373, -0.17414134740829468, -0.0036316083278506994, 0.031303104013204575, 0.28135424852371216, 0.16658686101436615, -0.05873088911175728, 0.07168582826852798, -0.10882144421339035, -0.018324732780456543, 0.12506113946437836, 0.09969952702522278, 0.08522903919219971, -0.3638628423213959, 0.04094259440898895, 0.09864497929811478, 0.01861187443137169, 0.12449714541435242, -0.05289924889802933, -0.07496804744005203, 0.07656991481781006, -0.03726458176970482, -0.11299940943717957, 0.07573182880878448, -0.2518121898174286, 0.05823972448706627, 0.03765933960676193, -0.021724481135606766, 0.21250203251838684, 0.08334573358297348, -0.2639195919036865, -0.20646865665912628, -0.037715621292591095, -0.0562032125890255, -0.09640255570411682, -0.06322870403528214, 0.03857611119747162, 0.06059106066823006, -0.050923798233270645, 0.10596968233585358, 0.08149854838848114, -0.036908507347106934, 0.1169314980506897, -0.12092453986406326, 0.12914149463176727, -0.07097742706537247, 0.07689223438501358, 0.03962267190217972, -0.1915503293275833, 0.04159456491470337, 0.09862292557954788, 0.057387154549360275, -0.13329826295375824, -0.06396471709012985, -0.2430642545223236, -0.21629948914051056, -0.14356206357479095, -0.2660573720932007, 0.008980972692370415, -0.1803014725446701, -0.036739494651556015, 0.058210086077451706, 0.06880797445774078, -0.04602591320872307, 0.0833987295627594, 0.18142220377922058, 0.027179056778550148, 0.19271264970302582, 0.037720080465078354, 0.08746185153722763, 0.0007602270925417542, -0.06690913438796997, -0.1414272040128708, -0.012704567052423954, 0.10869009047746658, 0.002243244554847479, 0.180193692445755, 0.36696821451187134, -0.08156254142522812, -0.1416655033826828, 0.16015999019145966, -0.05560595169663429, 0.09255906939506531, 0.09536478668451309, 0.0015372849302366376, -0.17030397057533264, 0.1358720362186432, -0.16402490437030792, -0.14759953320026398, 0.09015118330717087, -0.09711974859237671, -0.14247830212116241, 0.007020420860499144, -0.016652634367346764, 0.22828935086727142, 0.14161893725395203, -0.029079612344503403, 0.0793401375412941, 0.11124882847070694, 0.097187839448452, 0.11193801462650299, -0.037893038243055344, 0.018864620476961136, -0.06339514255523682, -0.05869019776582718, 0.09532850980758667, -0.06275048106908798, 0.06117924302816391, 0.338020384311676, -0.09956824034452438, 0.005146460607647896, -0.1906314343214035, 0.10092607140541077, -0.011140878312289715, 0.05070577934384346, 0.05846187844872475, -0.04061467573046684, -0.27731722593307495, -0.09576386958360672, -0.18670932948589325, 0.23918385803699493, 0.0736590325832367, 0.02267199568450451, -0.34157270193099976, 0.003818618832156062, 0.0780423954129219, -0.10277420282363892, -0.021038776263594627, -0.052550435066223145, 0.11312270909547806, -0.13125896453857422, 0.14610379934310913, 0.13605767488479614, -0.042454712092876434, 0.12010253220796585, -0.03569376841187477, -0.004444966558367014, -0.0037139758933335543, 0.05292198061943054, 0.09222466498613358, 0.12845762073993683, 0.015162736177444458, 0.033202577382326126, 0.10927029699087143, 0.17613252997398376, -0.18551601469516754, 0.20368103682994843, 0.2137027084827423, -0.09842569380998611, -0.11542560160160065, 0.08751911669969559, 0.09031431376934052, -0.0015235015889629722, 0.04602758213877678, -0.10642708092927933, -0.12735052406787872, -0.01024105865508318, 0.06349010765552521, -0.08318125456571579, -0.030246460810303688, 0.07108166068792343, -0.03071807324886322, 0.12072055786848068, -0.03915160149335861, -0.04443192854523659, 0.0058226739056408405, 0.10395114123821259, -0.16903626918792725, -0.032702554017305374, -0.08004733175039291, 0.07646218687295914, -0.03332381322979927, -0.17175324261188507, -0.14268526434898376, 0.059961676597595215, 0.2236623913049698, 0.020524827763438225, 0.028280066326260567, 0.10750472545623779, -0.04250543192028999, 0.07501565665006638, 0.16279050707817078, -0.011503318324685097, -0.07205120474100113, 0.046443238854408264, -0.1515662968158722, 0.10757917910814285, -0.041061319410800934, -0.013972330838441849, 0.0031860547605901957, -0.015525830909609795, 0.18116608262062073, -0.14929446578025818, -0.01929476670920849, 0.2641178071498871, 0.25977668166160583, 0.06702765077352524, 0.07398123294115067, 0.038885872811079025, 0.15310794115066528, -0.10627499222755432, 0.17496074736118317, 0.12915648519992828, 0.019964244216680527, -0.10549066215753555, 0.02713661827147007, 0.05559847503900528, -0.07827547192573547, -0.13201788067817688, -0.10122764855623245, -0.027220021933317184, -0.16318073868751526, -0.017088856548070908, -0.03059624694287777, -0.011631644330918789, -0.11442355066537857, 0.024173717945814133, 0.014055471867322922, 0.07578946650028229, -0.05483746528625488, -0.02333800122141838, -2.3641261734461588e-32, -0.029916943982243538, -0.09810240566730499, -0.047739990055561066, -0.1309678852558136, 0.023460030555725098, 0.05379284545779228, -0.09333868324756622, -0.001099183107726276, -0.11232498288154602, -0.08339438587427139, -0.1490880399942398, 0.09683051705360413, -0.005352327600121498, -0.0015198992332443595, -0.18654076755046844, 0.02234419621527195, 0.2745719254016876, -0.052290964871644974, -0.18082039058208466, 0.020006442442536354, 0.14272372424602509, 0.04702236130833626, -0.17449752986431122, 0.09275174140930176, -0.08231373876333237, 0.010364570654928684, 0.13877829909324646, -0.16812506318092346, 0.02862168475985527, -0.17306473851203918, -0.08093927800655365, 0.16821599006652832, -0.09765536338090897, 0.004415135830640793, -0.03924094885587692, -0.09749509394168854, -0.01282726600766182, -0.02613145299255848, 0.14927323162555695, 0.059748560190200806, 0.12027623504400253, -0.12932540476322174, 0.16460750997066498, 0.1143081784248352, -0.04620235785841942, 0.02734696865081787, -0.049566127359867096, 0.13475242257118225, -0.2925887405872345, -0.03499021381139755, -0.1647670716047287, 0.07761260122060776, 0.0969434380531311, 0.11893589794635773, 0.044211506843566895, -0.2545740604400635, 0.049283310770988464, 0.0626947432756424, -0.17663191258907318, -0.18081344664096832, 0.18862274289131165, 0.026682863011956215, 0.1426527053117752, 0.1357090324163437, -0.009956997819244862, 0.06376215815544128, 0.48786264657974243, 0.21322482824325562, 0.04341505840420723, 0.11779488623142242, 0.22784149646759033, 0.01153020840138197, 0.008770020678639412, -0.22987176477909088, 0.21838264167308807, -0.07374994456768036, -0.10736454278230667, 0.09482172876596451, 0.020071890205144882, -0.047297924757003784, -0.08823799341917038, -0.07430658489465714, 0.08692947775125504, 0.053266141563653946, -0.11987342685461044, 0.14611788094043732, -0.033217936754226685, 0.05573650449514389, -0.06068073585629463, -0.14548951387405396, -0.023493122309446335, 0.01440394390374422, -0.12500984966754913, -0.07666191458702087, -0.03795097395777702, 0.150028258562088, -0.13104407489299774, 0.14346915483474731, -0.09966329485177994, 0.0101146399974823, -0.16707976162433624, -0.016748497262597084, 0.10154501348733902, 0.058554358780384064, 0.18587802350521088, -0.09629923105239868, 0.06233084946870804, -0.1381569653749466, -0.13486044108867645, 0.012864358723163605, -0.01357197854667902, 0.02822466939687729, 0.07528853416442871, 0.022839782759547234, 0.12649880349636078, -0.0816366970539093, 0.08966295421123505, 0.0024938222486525774, -0.000964456528890878, 0.0866326242685318, -0.054225802421569824, -0.07819868624210358, 0.05050816386938095, -0.03199446573853493, 0.03509119898080826, 0.11767543852329254, -0.12190926820039749, -0.00017526735609862953, -0.044982798397541046, -0.16245359182357788, -0.13863059878349304, -0.11683128774166107, 6.814070161453856e-7, -0.07140499353408813, 0.1389210969209671, -0.03923223167657852, -0.03621627762913704, -0.05308054760098457, 0.08395231515169144, -0.13260863721370697, -0.03406434878706932, -0.22295252978801727, 0.11355465650558472, -0.06246153265237808, 0.07433666288852692, 0.04089700058102608, 0.05881120264530182, 0.21256929636001587, -0.2147897481918335, -0.10169512033462524, 0.005262716207653284, -0.27019354701042175, 0.1416245698928833, -0.12467382103204727, -0.04851386696100235, -0.03164389729499817, -0.08525644987821579, 0.2425934076309204, -0.021115059033036232, 0.06066877767443657, -0.07205062359571457, 0.14750796556472778, -0.00735093979164958, 0.14990143477916718, 0.10780385881662369, -0.0856502577662468, 0.07529348880052567, 0.02558278478682041, 0.04662390425801277, 0.03475334122776985, 0.04364367574453354, 0.10944878309965134, 0.005027392413467169, 0.09688140451908112, -0.13831327855587006, 0.050664208829402924, -0.04120830073952675, 0.12102766335010529, -0.00048525689635425806, -0.049307145178318024, 0.14049594104290009, 0.011892943643033504, -0.0033566050697118044, -0.001663536299020052, 0.0920250415802002, -0.05040339007973671, 0.237091526389122, 0.09251156449317932, -0.24534690380096436, -0.05846807360649109, -0.21528267860412598, 0.06343229115009308, -0.14694906771183014, -0.0421479232609272, -0.2418738305568695, -0.06921537965536118, 0.08225679397583008, 0.19284288585186005, -0.03369997441768646, -0.038308750838041306, 1.45587122004063e-34, 0.005545917432755232, -0.07677430659532547, 0.16550035774707794, -0.20007681846618652, 0.06703072786331177, -0.18232029676437378, 0.12295559048652649, -0.07192583382129669, -0.19167843461036682, -0.22462695837020874, -0.10610544681549072 ]
https://github.com/huggingface/datasets/issues/2294
Slow #0 when using map to tokenize.
That makes sense ! You can indeed use `map` on both datasets separately and then concatenate. Another option is to concatenate, then shuffle, and then `map`.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not args.overwrite_cache, )` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others. It looks like this: ![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png) It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
26
Slow #0 when using map to tokenize. Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map( tokenize_function, batched=True, num_proc=args.preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=not args.overwrite_cache, )` to tokenize by multiprocessing. However, I have found that when `num_proc`>1,the process _#0_ is much slower than others. It looks like this: ![image](https://user-images.githubusercontent.com/31714566/116665555-81246280-a9cc-11eb-8a37-6e608ab310d0.png) It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it? That makes sense ! You can indeed use `map` on both datasets separately and then concatenate. Another option is to concatenate, then shuffle, and then `map`.
[ -0.1163768321275711, 0.031639039516448975, -0.07547574490308762, 0.08636163175106049, 0.08260086178779602, -0.04492463171482086, 0.0818619579076767, 0.1068832203745842, -0.2588692605495453, 0.09772630780935287, 0.08622835576534271, -0.007762435358017683, -0.08839277178049088, 0.021795380860567093, -0.13834692537784576, -0.005953736137598753, 0.0226728618144989, -0.010259704664349556, 0.08692362904548645, -0.09633542597293854, -0.21978631615638733, -0.06416105479001999, 0.01768973097205162, -0.018144071102142334, -0.034708209335803986, -0.08641111850738525, -0.08948150277137756, 0.05150999128818512, -0.06486503779888153, -0.16591858863830566, -0.27374890446662903, 0.14319130778312683, -0.19946211576461792, 0.1783275604248047, 0.000005208480615692679, -0.12851005792617798, 0.02222093939781189, 0.14777956902980804, 0.05634528025984764, 0.18778496980667114, 0.20027291774749756, -0.10698055475950241, 0.0170261450111866, 0.06467350572347641, -0.07812482118606567, 0.09185171872377396, -0.11727924644947052, 0.020876305177807808, 0.0066821095533668995, -0.00924760103225708, -0.04649420082569122, 0.07921430468559265, -0.1984267234802246, 0.10117088258266449, 0.05229859799146652, 0.01669316180050373, -0.0017746011726558208, -0.1991187334060669, -0.12888532876968384, 0.0004285875766072422, 0.1431400626897812, -0.09593762457370758, 0.07490605115890503, 0.10942023992538452, 0.015769824385643005, 0.24466322362422943, -0.2429303079843521, -0.12416095286607742, 0.09292219579219818, 0.17962971329689026, -0.23935961723327637, 0.04682566598057747, -0.030319252982735634, 0.14656521379947662, -0.029736721888184547, -0.09775304794311523, 0.015652284026145935, 0.022702902555465698, -0.012290466576814651, -0.11403891444206238, -0.18371541798114777, 0.02190154790878296, 0.05165727809071541, -0.029885735362768173, -0.18620125949382782, 0.1647549569606781, 0.09472861886024475, 0.0626319944858551, 0.09815283119678497, 0.04387339577078819, -0.10180389881134033, -0.04105081781744957, -0.05534657835960388, 0.11540789157152176, -0.1318715661764145, 0.05191711708903313, -0.09879062324762344, -0.18429984152317047, -0.027462372556328773, -0.16197460889816284, -0.06037433445453644, 0.21299511194229126, -0.015220862813293934, -0.05843964219093323, -0.2742566168308258, -0.15160605311393738, -0.006377677898854017, -0.04476594552397728, 0.033474985510110855, -0.09070540964603424, -0.0830051526427269, 0.2017669826745987, -0.12366142868995667, 0.17034290730953217, 0.07369133830070496, -0.11680609732866287, 0.05026555806398392, -0.08912205696105957, -0.01852515898644924, -0.0663108229637146, 0.031526271253824234, 0.13278761506080627, 0.018330050632357597, 0.03872578591108322, -0.11168307065963745, 0.10294477641582489, -0.20058229565620422, -0.07825489342212677, -0.2742427587509155, 0.14127303659915924, -0.10366969555616379, -0.0295425895601511, 0.059163179248571396, 0.03201182559132576, 0.0980825424194336, 0.08959276974201202, -0.04557498171925545, -0.0465034656226635, -0.0025389892980456352, -0.10325449705123901, 0.24084478616714478, -0.08509213477373123, 0.1576954871416092, 0.08829685300588608, 0.029341164976358414, 0.14654961228370667, -0.031568173319101334, 0.2448805719614029, -0.06367338448762894, -0.08757878839969635, -0.12228349596261978, 0.10683095455169678, -0.03974652662873268, 0.015244605951011181, -0.18538691103458405, 0.07007309049367905, 0.002596881240606308, -0.001756751909852028, -0.15419773757457733, -0.0026986768934875727, -0.03675499185919762, -0.057653144001960754, -0.16600145399570465, 0.01232325192540884, 0.22604778409004211, 0.13787442445755005, -0.036736708134412766, 0.050076160579919815, 0.0643794983625412, 0.1499767303466797, 0.31807321310043335, 0.1272881031036377, -0.09930558502674103, 0.06258656829595566, -0.14438499510288239, 0.20786555111408234, -0.13715434074401855, 0.06114641949534416, -0.042587582021951675, 0.057337310165166855, -0.05138561129570007, -0.08655595779418945, -0.04795375093817711, -0.10174906998872757, 0.23940889537334442, -0.10505571216344833, 0.20311900973320007, 0.12876445055007935, -0.07668453454971313, 0.07881012558937073, -0.07450337707996368, -0.07843368500471115, -0.005088056903332472, -0.01923905499279499, -0.09752418845891953, -0.15103940665721893, -0.13794487714767456, 0.047971196472644806, 0.057007696479558945, -0.21056117117404938, 0.017421215772628784, -0.0675494447350502, -0.04926639422774315, -0.0190449021756649, -0.03979971259832382, 0.06338819116353989, -0.16177378594875336, 0.13754650950431824, 0.07790998369455338, -0.18908379971981049, -0.06207805499434471, 0.05895643308758736, 0.19403982162475586, 0.07613392174243927, 0.048612020909786224, -0.15235309302806854, -0.048525042831897736, 0.03414425626397133, -0.15535283088684082, 0.1319708675146103, -0.07836081832647324, -0.0347895510494709, 0.22381897270679474, 0.09642274677753448, 0.054281290620565414, -0.04795493558049202, 0.1097264513373375, 0.04272474721074104, 0.0377282053232193, 0.060133472084999084, 0.01117399800568819, -0.16339890658855438, 0.19570139050483704, -0.16767728328704834, 0.07069993019104004, 0.1365187168121338, 0.008885198272764683, -0.16191543638706207, 0.1642915904521942, 0.06432143598794937, -0.07529966533184052, -0.04396572709083557, -0.1193566620349884, -0.06836263090372086, 0.0597350113093853, 0.09812428802251816, 0.23160159587860107, 0.16670481860637665, 0.07438745349645615, -0.054707400500774384, 0.11369016766548157, 0.1208394318819046, 0.04920949041843414, 0.010660638101398945, 0.05413252115249634, 0.05644848197698593, 0.17060361802577972, 0.04056276008486748, 0.14517265558242798, 0.09129763394594193, 0.18689802289009094, -0.003950633108615875, 0.018049631267786026, -0.03645344078540802, -0.04713559150695801, -0.051327306777238846, 0.0411238819360733, -0.21429143846035004, 0.010412179864943027, 0.07393215596675873, 0.1257873922586441, -0.06673401594161987, -0.07200454920530319, -0.04044868052005768, -0.04467527195811272, -0.06852210313081741, -0.1707974225282669, -0.07295507937669754, 0.012392041273415089, 0.06242472305893898, -0.03392672911286354, -0.03153279051184654, 0.10368485003709793, 0.12741687893867493, 0.11719170957803726, -0.016314715147018433, 0.025998160243034363, 0.20775608718395233, -0.05377636104822159, -0.11038191616535187, -0.009918643161654472, -0.19083553552627563, 0.08238773047924042, 0.006884557660669088, 0.002170882886275649, 0.017924005165696144, 0.10708696395158768, -0.1616256833076477, 0.033770207315683365, 0.016722669824957848, -0.005629780702292919, 0.1227504163980484, -0.07670070976018906, -0.027411671355366707, 0.10547270625829697, 0.13389767706394196, 0.029726777225732803, -0.03775347024202347, -0.2873116731643677, 0.06704819947481155, -0.22255770862102509, -0.0612758994102478, 0.08460784703493118, -0.03658492490649223, -0.061962928622961044, 0.01582997292280197, -0.176065593957901, -0.08437974750995636, 0.16436581313610077, -0.029147282242774963, -0.05997595191001892, 0.0661718100309372, -0.2074270248413086, -0.1731034517288208, -0.04351285845041275, 0.02356233447790146, 0.016664141789078712, 0.09252060204744339, 0.014478860422968864, 0.010434677824378014, 0.013662419281899929, -0.002351240487769246, -0.028436990454792976, 0.08757423609495163, 0.11076527088880539, -0.21977707743644714, -0.004849044140428305, -0.005031671840697527, 0.2521723508834839, 0.17341302335262299, -0.07710011303424835, 0.06846717745065689, -0.12054304778575897, -0.0765686109662056, 0.13257278501987457, 0.1533859819173813, 0.12886443734169006, -0.3017796277999878, 0.011373060755431652, 0.12342435121536255, -0.010817022062838078, 0.13301315903663635, -0.05999211221933365, -0.054255567491054535, 0.06365543603897095, -0.04182172194123268, -0.10303639620542526, 0.08790311962366104, -0.20759469270706177, 0.07550757378339767, 0.01719864271581173, -0.017815323546528816, 0.22879667580127716, 0.07287585735321045, -0.2483651041984558, -0.20032313466072083, -0.056343454867601395, -0.08103996515274048, -0.07278649508953094, -0.013032068498432636, 0.022370418533682823, 0.09484252333641052, -0.08465175330638885, 0.07362857460975647, 0.06925176829099655, -0.05925558879971504, 0.10372219234704971, -0.12339003384113312, 0.12251674383878708, -0.10566604137420654, 0.09123031795024872, 0.048571061342954636, -0.17177258431911469, 0.04002007842063904, 0.07550711929798126, 0.048876237124204636, -0.12132199108600616, -0.09233542531728745, -0.2655923664569855, -0.1436162143945694, -0.13772468268871307, -0.2636179029941559, -0.03416118025779724, -0.19861434400081635, -0.01945042982697487, 0.05171481519937515, 0.09356316924095154, -0.0643555298447609, 0.022618962451815605, 0.1595039665699005, 0.05564655363559723, 0.20419158041477203, 0.010824862867593765, 0.057695988565683365, 0.02361433394253254, -0.02996589057147503, -0.10853353142738342, 0.01731388084590435, 0.13093440234661102, -0.023525390774011612, 0.21474671363830566, 0.38272595405578613, -0.08699069917201996, -0.11210900545120239, 0.16041012108325958, -0.10556389391422272, 0.11235592514276505, 0.08910568058490753, 0.009749048389494419, -0.16323818266391754, 0.18002411723136902, -0.2216423600912094, -0.1509282886981964, 0.03942199423909187, -0.06624694913625717, -0.1163061335682869, 0.0617770217359066, -0.0070595210418105125, 0.208771750330925, 0.09962911158800125, 0.011992891319096088, 0.0465933121740818, 0.08474728465080261, 0.16450348496437073, 0.11206261068582535, -0.030686426907777786, -0.01026913058012724, -0.08783968538045883, -0.030541766434907913, 0.11758901178836823, -0.05567661300301552, 0.0557718388736248, 0.28351831436157227, -0.06986569613218307, -0.017026158049702644, -0.15661247074604034, 0.0788525864481926, -0.021024424582719803, 0.08164838701486588, 0.029972011223435402, 0.0032679180148988962, -0.2679937183856964, -0.0961233377456665, -0.2214769423007965, 0.20307894051074982, 0.0903945341706276, 0.04670250415802002, -0.3516238331794739, 0.027707723900675774, 0.10029406100511551, -0.10820593684911728, -0.016508400440216064, -0.08158178627490997, 0.09216003865003586, -0.11588302254676819, 0.17356576025485992, 0.09436039626598358, 0.0049089728854596615, 0.15880455076694489, -0.06133052706718445, 0.011207438074052334, 0.006627179682254791, 0.04864221811294556, 0.11479403078556061, 0.11475244164466858, -0.002102114725857973, 0.06114798039197922, 0.08696617931127548, 0.18422912061214447, -0.16629308462142944, 0.14880450069904327, 0.2388068586587906, -0.0766950249671936, -0.08382020145654678, 0.09458965063095093, 0.10376957058906555, -0.027748888358473778, 0.05174199864268303, -0.11288798600435257, -0.12660475075244904, -0.012452439405024052, 0.08407817035913467, -0.08210579305887222, 0.00386660173535347, 0.017832249402999878, 0.04263409227132797, 0.16252726316452026, -0.06466405838727951, -0.029497258365154266, -0.06068253889679909, 0.09864313900470734, -0.18222954869270325, -0.03708617761731148, -0.05753595009446144, 0.06562762707471848, 0.032512128353118896, -0.11920231580734253, -0.13419176638126373, 0.036491766571998596, 0.25549671053886414, 0.025239504873752594, 0.04544706270098686, 0.0659715011715889, -0.06130358204245567, 0.06838701665401459, 0.12910820543766022, 0.021313501521945, -0.06685687601566315, 0.07307852059602737, -0.17679674923419952, 0.10085029155015945, -0.008636027574539185, -0.024660099297761917, -0.02553449384868145, -0.02385644055902958, 0.11470375210046768, -0.12948603928089142, -0.01713293232023716, 0.25978800654411316, 0.2039099484682083, 0.06320630013942719, 0.053045615553855896, 0.02018577605485916, 0.18462803959846497, -0.08284550160169601, 0.15464270114898682, 0.1412014216184616, 0.07233547419309616, -0.1203712448477745, 0.021308444440364838, 0.034361619502305984, -0.08492971956729889, -0.14675533771514893, -0.12262274324893951, -0.022034354507923126, -0.20228338241577148, -0.004729547072201967, -0.06282404810190201, -0.06992678344249725, -0.12521864473819733, 0.027721818536520004, 0.009294274263083935, 0.09059666097164154, -0.0287014152854681, -0.06544830650091171, -2.3920028750391154e-32, -0.047881752252578735, -0.13325105607509613, -0.029939228668808937, -0.12067388743162155, 0.024637099355459213, 0.08486691862344742, -0.04560955986380577, 0.011869191192090511, -0.028779154643416405, -0.09681614488363266, -0.15506920218467712, 0.06448127329349518, 0.02145777828991413, 0.05066816508769989, -0.18427909910678864, 0.04875662550330162, 0.3138233721256256, -0.10122691094875336, -0.1640387624502182, -0.015574846416711807, 0.13399997353553772, 0.010411360301077366, -0.18626168370246887, 0.12160303443670273, -0.05317750200629234, 0.06747126579284668, 0.12406735867261887, -0.14807677268981934, 0.05581782013177872, -0.19357511401176453, -0.06708621978759766, 0.13117344677448273, -0.07502081990242004, 0.022895999252796173, -0.03150840476155281, -0.09610167145729065, -0.003941112197935581, -0.009760340675711632, 0.11307762563228607, 0.024374037981033325, 0.11969992518424988, -0.12432355433702469, 0.1146337017416954, 0.0918673723936081, -0.04800829291343689, 0.02268529310822487, -0.030485009774565697, 0.15831439197063446, -0.2907066345214844, -0.022865206003189087, -0.14988647401332855, 0.0992559865117073, 0.08342456072568893, 0.04218259081244469, 0.013011109083890915, -0.25808197259902954, 0.04967023432254791, 0.02816922403872013, -0.16842134296894073, -0.16138462722301483, 0.22184130549430847, 0.02522920072078705, 0.16585557162761688, 0.17924098670482635, -0.02079087309539318, 0.04683308303356171, 0.46145445108413696, 0.20278732478618622, 0.007379617542028427, 0.09329599887132645, 0.1988416314125061, -0.05839453637599945, -0.012965129688382149, -0.27206599712371826, 0.2390717715024948, -0.008414358831942081, -0.07642260938882828, 0.09367526322603226, 0.037729427218437195, -0.046109165996313095, -0.035788390785455704, -0.0543830581009388, 0.0948341116309166, 0.04073021933436394, -0.07729111611843109, 0.10876345634460449, -0.03006872721016407, 0.05730389803647995, -0.07621854543685913, -0.15344871580600739, 0.014471705071628094, 0.06340476125478745, -0.10179097950458527, -0.061071865260601044, 0.00006104565545683727, 0.10019636154174805, -0.1137322336435318, 0.13556186854839325, -0.09373751282691956, 0.0021966577041894197, -0.208973228931427, -0.020860034972429276, 0.13786645233631134, 0.03962954133749008, 0.1534479707479477, -0.0784238874912262, 0.053187448531389236, -0.10307898372411728, -0.12411057204008102, -0.012312560342252254, -0.001406072755344212, 0.0626063421368599, 0.09921916574239731, 0.06189458817243576, 0.13684898614883423, -0.08960554003715515, 0.07434167712926865, 0.027449827641248703, 0.014404337853193283, 0.19235342741012573, -0.022180436179041862, -0.04578258842229843, 0.031634215265512466, -0.046861372888088226, 0.04491117596626282, 0.1545170545578003, -0.1513718068599701, -0.003550959751009941, -0.08820637315511703, -0.17044463753700256, -0.0904858410358429, -0.1261967420578003, 6.937911507520766e-7, -0.0412154458463192, 0.1279909908771515, -0.03488178178668022, -0.06415749341249466, -0.0462242029607296, 0.05767044797539711, -0.11582519859075546, -0.031314339488744736, -0.23550277948379517, 0.14644929766654968, -0.0465952530503273, 0.08286800235509872, 0.02896488830447197, 0.09773488342761993, 0.22532649338245392, -0.23044851422309875, -0.13392680883407593, 0.012604483403265476, -0.24934625625610352, 0.12199927121400833, -0.13702581822872162, -0.006514425855129957, -0.04986134544014931, -0.07569907605648041, 0.2882418632507324, -0.015645114704966545, 0.08006154745817184, -0.07024406641721725, 0.12978136539459229, -0.04494371637701988, 0.11212912946939468, 0.08739102631807327, -0.08092863857746124, 0.053281400352716446, -0.005265466403216124, 0.05452067777514458, 0.02006419748067856, 0.08407670259475708, 0.05223938077688217, -0.052747830748558044, 0.0761633887887001, -0.1226416602730751, 0.06174661964178085, -0.05650373175740242, 0.09807047992944717, -0.06626914441585541, -0.042062822729349136, 0.163621187210083, 0.0008174145477823913, 0.053788285702466965, 0.0023648920468986034, 0.07161331176757812, -0.09138855338096619, 0.237185537815094, 0.09990579634904861, -0.24526061117649078, -0.07441112399101257, -0.1801241934299469, 0.02796347625553608, -0.22675345838069916, -0.021634912118315697, -0.2594807744026184, -0.04229171946644783, 0.042218808084726334, 0.16909699141979218, -0.018818166106939316, -0.03824485465884209, 1.5059562333465349e-34, 0.016648346558213234, -0.0712430328130722, 0.1739262193441391, -0.23349954187870026, 0.04873454570770264, -0.13289085030555725, 0.09472307562828064, -0.057004448026418686, -0.1986744999885559, -0.2122029811143875, -0.10351074486970901 ]
https://github.com/huggingface/datasets/issues/2288
Load_dataset for local CSV files
Hi, this is not a standard CSV file (requires additional preprocessing) so I wouldn't label this as s bug. You could parse the examples with the regex module or the string API to extract the data, but the following approach is probably the easiest (once you load the data): ```python import ast # load the dataset and copy the features def process(ex): return {"tokens": ast.literal_eval(ex["tokens"]), "labels": ast.literal_eval(ex["labels"])} dataset = dataset.map(process, features=new_features) ```
The method load_dataset fails to correctly load a dataset from csv. Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings. row example: ```tokens | labels ['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ] ``` The method, loads each list as a string: (i.g "['I' , 'am', 'John']"). To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type ``` new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None)) new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags))) dataset = dataset.cast(new_features) ``` but I got the following error ``` ArrowNotImplementedError: Unsupported cast from string to list using function cast_list ``` Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well. How can this be solved ?
72
Load_dataset for local CSV files The method load_dataset fails to correctly load a dataset from csv. Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings. row example: ```tokens | labels ['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ] ``` The method, loads each list as a string: (i.g "['I' , 'am', 'John']"). To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type ``` new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None)) new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags))) dataset = dataset.cast(new_features) ``` but I got the following error ``` ArrowNotImplementedError: Unsupported cast from string to list using function cast_list ``` Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well. How can this be solved ? Hi, this is not a standard CSV file (requires additional preprocessing) so I wouldn't label this as s bug. You could parse the examples with the regex module or the string API to extract the data, but the following approach is probably the easiest (once you load the data): ```python import ast # load the dataset and copy the features def process(ex): return {"tokens": ast.literal_eval(ex["tokens"]), "labels": ast.literal_eval(ex["labels"])} dataset = dataset.map(process, features=new_features) ```
[ -0.0692109614610672, 0.05429096892476082, -0.044393621385097504, 0.06515002250671387, 0.15335839986801147, -0.03521401435136795, 0.0880747064948082, 0.02682316116988659, 0.20773880183696747, 0.05811065807938576, -0.07232324033975601, -0.03244291618466377, 0.018808258697390556, -0.008341215550899506, -0.052642930299043655, 0.08189302682876587, -0.0973656177520752, 0.029919251799583435, 0.13038039207458496, 0.09438621252775192, -0.17222636938095093, -0.03163947910070419, 0.14172299206256866, 0.11875658482313156, 0.05474608391523361, -0.02156130038201809, -0.03575767204165459, 0.07447876781225204, 0.1250600814819336, -0.07956848293542862, 0.013932645320892334, -0.02301512286067009, 0.026424473151564598, -0.022310569882392883, 0.000005964599495200673, -0.03146101161837578, 0.02968568541109562, 0.07205699384212494, -0.0009376773959957063, -0.18382956087589264, 0.12841781973838806, -0.15374542772769928, -0.07882208377122879, 0.009836213663220406, -0.07354876399040222, -0.21242578327655792, -0.0855339914560318, 0.06354893743991852, -0.024493230506777763, 0.0024637836031615734, -0.10418760776519775, -0.014237084425985813, -0.26181548833847046, -0.1590310037136078, 0.0041741374880075455, -0.051969997584819794, 0.11499495059251785, 0.0035781015176326036, -0.13844606280326843, -0.02181568555533886, -0.04689682647585869, -0.20649917423725128, -0.1821475625038147, 0.008203413337469101, -0.06479372084140778, 0.009585214778780937, -0.12079213559627533, -0.05615261569619179, 0.04186444729566574, 0.2052299529314041, 0.026335150003433228, 0.1365903615951538, -0.0735434889793396, -0.03540198132395744, 0.019024904817342758, -0.06607719510793686, -0.05677755922079086, -0.011565146967768669, -0.10980075597763062, 0.20556312799453735, 0.04227016121149063, -0.10468219220638275, -0.039668090641498566, -0.12941516935825348, -0.16613730788230896, 0.038364477455616, -0.08890905976295471, -0.0019005121430382133, -0.017938882112503052, -0.11430985480546951, -0.054328493773937225, 0.08951762318611145, -0.03206232562661171, -0.19675733149051666, 0.1780334711074829, 0.10982487350702286, 0.0038109722081571817, -0.025901800021529198, 0.039769962430000305, -0.04822482541203499, -0.01476963423192501, 0.013042270205914974, 0.027701647952198982, 0.04740332067012787, -0.018872493878006935, -0.04645698890089989, 0.18407203257083893, -0.0009911383967846632, -0.07032709568738937, -0.09488525241613388, -0.22479620575904846, 0.2292335033416748, -0.4288477301597595, -0.05494895949959755, 0.21312502026557922, 0.07036600261926651, 0.002671279013156891, 0.06741511821746826, -0.015522144734859467, 0.14202894270420074, 0.07178150862455368, -0.05518476665019989, 0.08557804673910141, 0.10598444938659668, 0.10813827812671661, 0.08756223320960999, -0.015842467546463013, -0.005058957729488611, -0.09173595905303955, -0.05831596255302429, -0.06350395083427429, -0.11166587471961975, -0.01941436156630516, 0.02563503198325634, 0.0825633779168129, -0.09815468639135361, -0.043325603008270264, -0.14607694745063782, -0.009779255837202072, -0.028821347281336784, 0.09795499593019485, 0.0908653661608696, -0.18161797523498535, 0.13156025111675262, 0.07984894514083862, 0.06627152115106583, 0.01932276040315628, -0.008291536010801792, -0.08140718191862106, 0.07166384905576706, -0.3091854751110077, 0.022150719538331032, -0.10733470320701599, 0.12625904381275177, -0.24866874516010284, -0.1046447828412056, -0.2431381195783615, -0.13863897323608398, -0.1887170672416687, -0.0365755558013916, 0.013776385225355625, -0.07183107733726501, 0.05761628970503807, -0.07106722146272659, 0.0672394260764122, 0.0841403529047966, 0.013582734391093254, -0.05500843748450279, 0.005969429854303598, -0.031217120587825775, 0.020750226452946663, -0.031042689457535744, 0.00037967655225656927, 0.0019384012557566166, -0.18521028757095337, 0.15663005411624908, -0.0224699005484581, 0.07471106201410294, 0.015337185934185982, 0.08759331703186035, 0.15082217752933502, -0.06053990498185158, 0.04280465096235275, -0.10583361983299255, 0.19453123211860657, -0.00898565910756588, -0.13105720281600952, 0.08858524262905121, -0.006224751938134432, -0.05282235145568848, -0.05156087875366211, -0.030012112110853195, 0.039240047335624695, -0.01654026284813881, 0.005018424242734909, -0.00790603831410408, -0.06775074452161789, 0.010603776201605797, -0.012598417699337006, -0.15720120072364807, -0.12746751308441162, 0.056208137422800064, -0.053075965493917465, 0.00017625687178224325, -0.05336914211511612, -0.015726355835795403, -0.06507864594459534, 0.13360869884490967, 0.10213721543550491, -0.23184223473072052, -0.048916202038526535, 0.02105308696627617, -0.13884760439395905, 0.054446056485176086, -0.05430467799305916, 0.054605428129434586, -0.03695249184966087, 0.10915011912584305, -0.11042520403862, 0.07023563235998154, 0.0015734197804704309, -0.04534246772527695, -0.009921158663928509, 0.18531830608844757, 0.1437956839799881, 0.04017576947808266, 0.1143057644367218, 0.0021395282819867134, -0.023669986054301262, 0.009114796295762062, 0.03133761137723923, -0.04615022987127304, 0.15111438930034637, 0.11958175152540207, 0.04643835499882698, 0.008684898726642132, 0.03419087827205658, 0.10461743921041489, 0.05985790491104126, -0.046150024980306625, -0.04544287919998169, 0.060656286776065826, -0.0206411425024271, -0.03966321051120758, 0.024029603227972984, 0.2500380575656891, 0.025007683783769608, 0.1797289252281189, -0.04577260464429855, 0.06466466933488846, 0.34391260147094727, 0.2010815292596817, -0.14652350544929504, 0.19522784650325775, 0.04546790570020676, -0.04845258966088295, 0.026725921779870987, 0.21320736408233643, -0.051681652665138245, -0.038317352533340454, 0.1753639429807663, 0.031031427904963493, -0.03878166899085045, -0.048000115901231766, 0.07168985158205032, -0.056386467069387436, -0.027727877721190453, -0.25534752011299133, 0.03977595642209053, 0.1533244550228119, -0.013964156620204449, -0.10300421714782715, -0.1835681051015854, -0.12570549547672272, 0.024051399901509285, -0.16084453463554382, 0.02201918140053749, -0.13331441581249237, -0.05022253468632698, 0.06556812673807144, -0.18696680665016174, 0.09077414870262146, 0.10737364739179611, -0.08906276524066925, 0.05315420404076576, 0.03701493889093399, -0.0435464084148407, 0.10734154284000397, -0.014514212496578693, -0.11704498529434204, 0.08257453888654709, -0.05749443173408508, 0.06995610892772675, -0.12278762459754944, 0.008157062344253063, 0.007492121309041977, 0.014436712488532066, -0.05389932170510292, -0.010910140350461006, -0.1085844486951828, -0.011950714513659477, 0.025294536724686623, -0.017703155055642128, 0.09653403609991074, 0.09106932580471039, 0.1197848841547966, 0.07931919395923615, 0.04720321670174599, -0.16990436613559723, 0.02999856509268284, -0.022713493555784225, -0.004519048612564802, 0.07482662796974182, -0.04352247714996338, -0.05917477607727051, -0.00868478324264288, -0.05654723569750786, -0.2836131751537323, 0.10660228133201599, -0.07594193518161774, 0.0544932521879673, 0.2066388726234436, 0.03960715979337692, -0.20726637542247772, -0.05738688260316849, -0.008236326277256012, -0.17828136682510376, -0.1916232854127884, 0.037598468363285065, 0.0830889642238617, -0.16828776895999908, 0.1540984809398651, 0.07171748578548431, -0.07095266878604889, 0.056437067687511444, -0.15336720645427704, -0.07906431704759598, 0.02606825903058052, 0.34832364320755005, 0.05241026729345322, -0.12916941940784454, -0.009677514433860779, -0.09525764733552933, -0.14122018218040466, -0.001487739384174347, -0.026136489585042, 0.0645362138748169, -0.14351874589920044, -0.0428956113755703, -0.04007653892040253, -0.07239466905593872, 0.045846328139305115, 0.06398594379425049, -0.034416746348142624, 0.03717932850122452, 0.011713474988937378, -0.0844937190413475, 0.1147354245185852, -0.09924853593111038, 0.15526878833770752, -0.0240840632468462, -0.0761965960264206, 0.045332469046115875, -0.013458170928061008, 0.03674764558672905, 0.1191769614815712, 0.13731169700622559, -0.07076717168092728, -0.03235374018549919, -0.06433416157960892, -0.11662033945322037, -0.0991726964712143, -0.08367475867271423, 0.02233160473406315, 0.024267427623271942, -0.14126421511173248, 0.010386527515947819, -0.121819406747818, 0.16112056374549866, -0.05184190347790718, 0.09199244529008865, -0.18032604455947876, -0.08578774333000183, 0.11788896471261978, 0.14475353062152863, 0.011552906595170498, -0.05957832187414169, 0.04517844319343567, -0.12849260866641998, 0.22529883682727814, -0.0007723873713985085, 0.11419014632701874, 0.06479174643754959, -0.19666573405265808, -0.07248055934906006, -0.05782143771648407, 0.14459191262722015, 0.03955277055501938, 0.026607554405927658, 0.033473145216703415, 0.1475721150636673, 0.07699104398488998, 0.035851914435625076, 0.05211191624403, 0.14403174817562103, 0.08972088247537613, 0.07058496028184891, 0.06775679439306259, -0.004366617649793625, -0.15894892811775208, 0.06456417590379715, 0.03559885174036026, -0.10144393891096115, -0.01644778624176979, -0.012382864020764828, 0.10957537591457367, -0.06048524007201195, -0.037094175815582275, -0.08657790720462799, -0.16418930888175964, -0.09659497439861298, -0.04612814635038376, 0.201856330037117, 0.23190879821777344, -0.11173078417778015, 0.045880623161792755, -0.09571662545204163, 0.06515678018331528, 0.1737188845872879, -0.05311081185936928, 0.11820461601018906, 0.04706763103604317, 0.05547693371772766, -0.05163955315947533, 0.08980508148670197, -0.09076233208179474, 0.342056006193161, -0.023738190531730652, -0.1060861200094223, -0.11890320479869843, -0.18571361899375916, 0.0433700829744339, -0.04859009012579918, -0.0908331498503685, 0.08139537274837494, -0.08923536539077759, -0.028500882908701897, -0.012508779764175415, -0.02838996984064579, -0.20822687447071075, -0.23088864982128143, -0.02651282213628292, -0.1595468819141388, -0.14507336914539337, 0.030814852565526962, -0.09301431477069855, 0.00519057409837842, -0.0060165757313370705, 0.03323820233345032, 0.1843978762626648, -0.017048196867108345, -0.06964287161827087, -0.09075390547513962, 0.01863277144730091, 0.06575898081064224, 0.12256509810686111, 0.20636427402496338, -0.0760006234049797, -0.23405733704566956, -0.007839681580662727, -0.03109007515013218, 0.06134619191288948, -0.01890796795487404, 0.08631149679422379, 0.12320584803819656, -0.008457779884338379, 0.0779867023229599, 0.14967256784439087, -0.15053032338619232, 0.06522680819034576, 0.20075735449790955, 0.2380405068397522, 0.1288459300994873, -0.10581565648317337, 0.08962502330541611, 0.0921269878745079, -0.060148533433675766, -0.06313803046941757, -0.12107423692941666, 0.08935650438070297, 0.0840848982334137, 0.0048540327697992325, 0.12870363891124725, -0.06216208264231682, -0.014223752543330193, 0.06562824547290802, -0.02175195887684822, 0.18203769624233246, -0.0019842740148305893, 0.13705234229564667, 0.007351340726017952, -0.04692532867193222, -0.021593544632196426, -0.04282437637448311, 0.0941816046833992, -0.1356237530708313, -0.024704663082957268, 0.008657087571918964, -0.0043165856041014194, 0.08097312599420547, 0.03566974028944969, -0.0022768129128962755, -0.03962651640176773, 0.0715346410870552, 0.09806554764509201, 0.09680243581533432, -0.10273905098438263, -0.12390295416116714, 0.032563816756010056, -0.02197606861591339, 0.09008754044771194, -0.09783528745174408, 0.05893052741885185, 0.0004882971406914294, 0.009907534345984459, 0.08912376314401627, -0.0031937879975885153, -0.05216708779335022, 0.1381365954875946, -0.0503767654299736, -0.03561272472143173, -0.025100121274590492, 0.17029939591884613, 0.009011160582304, 0.053426820784807205, 0.09097510576248169, 0.06522376090288162, -0.2089257836341858, 0.032443635165691376, 0.07836488634347916, -0.06847267597913742, -0.19413745403289795, 0.0304175466299057, 0.004694940056651831, 0.012115594930946827, 0.12972624599933624, -0.049198899418115616, 0.0018211697461083531, 0.1546442061662674, -0.1398678570985794, -0.11869396269321442, 0.060265276581048965, 0.03736591339111328, -0.08018936216831207, -0.1705753207206726, -2.543561418805747e-32, -0.014144277200102806, 0.05360322445631027, -0.08561653643846512, -0.05646718665957451, 0.0007053074659779668, -0.011188213713467121, 0.04864932596683502, -0.07651218771934509, -0.04807225242257118, 0.025581469759345055, -0.10638846457004547, -0.02329549565911293, 0.08466263115406036, 0.06888562440872192, -0.19095207750797272, -0.07973168790340424, 0.012462598271667957, -0.08122444152832031, -0.01593424379825592, -0.0034448588266968727, 0.12109454721212387, 0.0977005586028099, -0.015460291877388954, 0.0013662591809406877, 0.030546853318810463, -0.12314289808273315, 0.165310338139534, -0.2751758396625519, 0.14030762016773224, -0.012197609059512615, -0.09582109749317169, 0.09743480384349823, 0.04590882733464241, -0.014302232302725315, -0.0006791318883188069, 0.04114307090640068, -0.13149869441986084, 0.02626504935324192, 0.10989955067634583, -0.04397409409284592, 0.12461037933826447, 0.013651729561388493, 0.14418426156044006, -0.12585896253585815, -0.008733614347875118, 0.11187627911567688, 0.06667589396238327, 0.017021533101797104, -0.09402403235435486, -0.013900511898100376, 0.022804727777838707, -0.03766366094350815, 0.1292889565229416, 0.04515105113387108, 0.03609323501586914, 0.01986534707248211, 0.03121359460055828, 0.0566520020365715, -0.10848332196474075, -0.09901881963014603, -0.06035510078072548, 0.02166496217250824, -0.04256472364068031, -0.10540542006492615, 0.20730413496494293, -0.0920504629611969, 0.23627564311027527, 0.11777558922767639, -0.10179243236780167, 0.09515950083732605, 0.22320669889450073, 0.12084343284368515, -0.11793432384729385, -0.06942715495824814, -0.12491119652986526, -0.09124134480953217, -0.22788196802139282, 0.04410343989729881, -0.015657691285014153, -0.0491638109087944, -0.08599250018596649, -0.01786953955888748, 0.052983541041612625, 0.11705874651670456, -0.05701274424791336, -0.07871720939874649, -0.0030718424823135138, -0.10015860944986343, -0.13257326185703278, -0.1191970482468605, 0.003967235330492258, -0.11868349462747574, -0.06727171689271927, 0.10518860816955566, -0.18050281703472137, -0.028046123683452606, -0.07789802551269531, -0.005681732669472694, -0.18077616393566132, 0.16531328856945038, -0.041669175028800964, -0.02742636948823929, 0.22531048953533173, -0.06825561076402664, 0.17517229914665222, 0.05855926126241684, 0.11630705744028091, -0.06218668818473816, -0.13076266646385193, -0.08761896193027496, -0.05899185314774513, 0.07727933675050735, 0.11048959195613861, 0.1627970039844513, 0.23110780119895935, 0.11852071434259415, 0.00819831807166338, -0.0955965593457222, -0.0012249615974724293, 0.13286374509334564, -0.039248161017894745, 0.05442709103226662, 0.15550141036510468, 0.024417966604232788, -0.025693833827972412, 0.2418849766254425, -0.19822044670581818, -0.00187579239718616, 0.04386015236377716, 0.021217886358499527, 0.12102928757667542, 0.03260333463549614, 7.711631724305335e-7, -0.23454266786575317, 0.11044071614742279, -0.03231387212872505, -0.0004056395264342427, -0.08040834963321686, 0.13293254375457764, -0.3314748704433441, 0.00022113724844530225, 0.18626436591148376, 0.04186126962304115, 0.13665539026260376, -0.06168285757303238, -0.1060599610209465, 0.10564492642879486, -0.17778250575065613, -0.11045871675014496, -0.08925317972898483, 0.05906722694635391, 0.02124289609491825, 0.11936739087104797, 0.20312179625034332, 0.1984252780675888, -0.10860099643468857, -0.01230012346059084, -0.039837535470724106, -0.07679763436317444, -0.016897020861506462, 0.05072995647788048, -0.02488601580262184, 0.017541076987981796, -0.10748942941427231, 0.04130735248327255, -0.009516466408967972, 0.17653484642505646, 0.06465345621109009, 0.00013973888417240232, -0.07495298236608505, -0.057762134820222855, 0.15822507441043854, 0.05628427863121033, 0.05733848363161087, 0.07897889614105225, 0.04920530691742897, 0.07376602292060852, 0.22305701673030853, -0.1206342875957489, -0.10313493013381958, -0.09013179689645767, 0.0019696801900863647, 0.12999394536018372, -0.11919216066598892, 0.053429942578077316, 0.10881224274635315, 0.15023723244667053, 0.08851949870586395, -0.07164064794778824, -0.01954996958374977, -0.1526547223329544, 0.043430108577013016, 0.007622831501066685, -0.10825144499540329, -0.064237080514431, 0.11366371810436249, -0.05729668587446213, 0.11978849023580551, 0.009271648712456226, 0.11643894016742706, 1.2962788060510517e-34, 0.012849573977291584, -0.10688358545303345, 0.02589794434607029, -0.03938455879688263, -0.013911872170865536, -0.16444747149944305, -0.13517533242702484, -0.05116211250424385, 0.010764033533632755, -0.19364634156227112, -0.04121750593185425 ]
https://github.com/huggingface/datasets/issues/2288
Load_dataset for local CSV files
Hi, Thanks for the reply. I have already used ```ast.literal_eval``` to evaluate the string into list, but I was getting another error: ``` ArrowInvalid: Could not convert X with type str: tried to convert to int ``` Why this happens ? Should labels be mapped to their ids and use int instead of str ?
The method load_dataset fails to correctly load a dataset from csv. Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings. row example: ```tokens | labels ['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ] ``` The method, loads each list as a string: (i.g "['I' , 'am', 'John']"). To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type ``` new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None)) new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags))) dataset = dataset.cast(new_features) ``` but I got the following error ``` ArrowNotImplementedError: Unsupported cast from string to list using function cast_list ``` Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well. How can this be solved ?
55
Load_dataset for local CSV files The method load_dataset fails to correctly load a dataset from csv. Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings. row example: ```tokens | labels ['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ] ``` The method, loads each list as a string: (i.g "['I' , 'am', 'John']"). To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type ``` new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None)) new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags))) dataset = dataset.cast(new_features) ``` but I got the following error ``` ArrowNotImplementedError: Unsupported cast from string to list using function cast_list ``` Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well. How can this be solved ? Hi, Thanks for the reply. I have already used ```ast.literal_eval``` to evaluate the string into list, but I was getting another error: ``` ArrowInvalid: Could not convert X with type str: tried to convert to int ``` Why this happens ? Should labels be mapped to their ids and use int instead of str ?
[ -0.09500051289796829, 0.029099872335791588, -0.034776508808135986, 0.04934120550751686, 0.1486329287290573, -0.03218404948711395, 0.09685198217630386, 0.045537322759628296, 0.22446657717227936, 0.04380268603563309, -0.0854029580950737, -0.008172635920345783, 0.0066275037825107574, -0.013049679808318615, -0.07281653583049774, 0.11454974859952927, -0.07425708323717117, 0.03809766843914986, 0.07813234627246857, 0.07398991286754608, -0.13998208940029144, -0.033471424132585526, 0.16110000014305115, 0.08614567667245865, 0.028975896537303925, -0.05571331828832626, -0.0023700720630586147, 0.06016021594405174, 0.1341167390346527, -0.10964007675647736, 0.04576139524579048, -0.006003876682370901, 0.06052087992429733, -0.03369700536131859, 0.000006212954303919105, -0.017486346885561943, 0.01965317688882351, 0.08426552265882492, -0.017977431416511536, -0.1568824052810669, 0.1423412561416626, -0.13841049373149872, -0.06755033135414124, 0.031676020473241806, -0.07684022933244705, -0.1952696591615677, -0.11229758709669113, 0.06120089441537857, -0.028767237439751625, 0.05821532756090164, -0.11118227243423462, -0.04173549264669418, -0.19877874851226807, -0.14778488874435425, 0.027119260281324387, -0.040095824748277664, 0.07267436385154724, 0.060521818697452545, -0.15974363684654236, 0.03831370174884796, -0.04297772794961929, -0.19955594837665558, -0.15860529243946075, 0.04333357885479927, -0.019332971423864365, -0.006095457822084427, -0.11655659228563309, -0.03322478383779526, 0.06892968714237213, 0.18036481738090515, 0.02864438109099865, 0.15340100228786469, -0.049367506057024, -0.009031218476593494, 0.012754062190651894, -0.08576422929763794, -0.06239822879433632, -0.02629329264163971, -0.10444780439138412, 0.18941695988178253, 0.03242504969239235, -0.08800376951694489, -0.03471115604043007, -0.10563907772302628, -0.15606960654258728, 0.010843785479664803, -0.1109531968832016, 0.03796137869358063, -0.027391260489821434, -0.15142548084259033, -0.08049501478672028, 0.07829450815916061, -0.04875922575592995, -0.16158610582351685, 0.1565762609243393, 0.11061540991067886, -0.039883021265268326, -0.039739686995744705, 0.042021494358778, -0.07779927551746368, -0.02862955443561077, 0.03169276565313339, 0.03621040657162666, 0.004296693950891495, -0.06328236311674118, -0.009631047956645489, 0.18604528903961182, 0.010058865882456303, -0.06945174187421799, -0.1138925701379776, -0.22684346139431, 0.19939956068992615, -0.4120543599128723, -0.04012417048215866, 0.2336120903491974, 0.0708741545677185, 0.01330418698489666, 0.07013650238513947, 0.004772991873323917, 0.09330389648675919, 0.03809020668268204, -0.023163769394159317, 0.08946595340967178, 0.09559837728738785, 0.08809724450111389, 0.08750930428504944, -0.040906716138124466, 0.007890122942626476, -0.11911378055810928, -0.05417841300368309, -0.030142711475491524, -0.09885493665933609, -0.008058100938796997, 0.040364861488342285, 0.08457402884960175, -0.09659641236066818, -0.058273423463106155, -0.12654711306095123, -0.005948671139776707, -0.03590139374136925, 0.12127739936113358, 0.05601402372121811, -0.1892753690481186, 0.07513592392206192, 0.07638666033744812, 0.07397538423538208, 0.020519312471151352, -0.006253126077353954, -0.052867576479911804, 0.10577287524938583, -0.29556798934936523, -0.015104404650628567, -0.14401166141033173, 0.08565343916416168, -0.23705832660198212, -0.11236102133989334, -0.20934537053108215, -0.14782030880451202, -0.15089008212089539, -0.06840614229440689, 0.004081131424754858, -0.05422358959913254, 0.05996346473693848, -0.07932812720537186, 0.062441371381282806, 0.106373131275177, 0.010776215232908726, -0.036817844957113266, 0.052159760147333145, 0.019969820976257324, 0.003908762242645025, -0.02909652329981327, -0.03602246940135956, -0.04507749527692795, -0.15778352320194244, 0.1293175220489502, 0.008633810095489025, 0.06930549442768097, -0.046141766011714935, 0.050637565553188324, 0.1431964933872223, -0.1347140669822693, 0.06734823435544968, -0.06261784583330154, 0.17450641095638275, -0.009027333930134773, -0.0888507217168808, 0.0944751724600792, -0.026890836656093597, -0.07560951262712479, -0.053405582904815674, 0.0018454124219715595, 0.06199638545513153, 0.0027998131699860096, -0.014407753013074398, -0.04788621515035629, -0.04691760241985321, -0.004377615172415972, -0.04716135561466217, -0.1415373533964157, -0.10699691623449326, 0.03829077258706093, -0.06785524636507034, 0.007924078963696957, -0.05727076530456543, 0.012585786171257496, -0.0810902789235115, 0.11030881106853485, 0.10990972071886063, -0.24911053478717804, -0.06374423205852509, 0.010200879536569118, -0.1535307615995407, 0.033807422965765, -0.020955868065357208, 0.04062860459089279, -0.018917400389909744, 0.114725261926651, -0.11881959438323975, 0.11317190527915955, -0.013496573083102703, -0.10403744131326675, -0.04005997255444527, 0.16042251884937286, 0.08649323135614395, 0.021150702610611916, 0.10223705321550369, -0.01887684501707554, -0.05137020722031593, 0.004894813988357782, 0.04249907284975052, -0.040639325976371765, 0.11780139803886414, 0.13042181730270386, 0.018956925719976425, -0.056532979011535645, 0.0762513130903244, 0.09135207533836365, 0.09004725515842438, -0.08249868452548981, -0.044710226356983185, 0.07170164585113525, -0.028064314275979996, -0.042936816811561584, 0.012380787171423435, 0.24613800644874573, -0.03009553998708725, 0.15819771587848663, -0.04927121475338936, 0.06969976425170898, 0.32323411107063293, 0.1988344043493271, -0.14316615462303162, 0.19467179477214813, 0.02821117825806141, -0.015029135160148144, 0.06725913286209106, 0.21668589115142822, -0.023398278281092644, 0.02939769998192787, 0.15911823511123657, 0.05168404057621956, -0.0103538166731596, -0.044967640191316605, 0.06732627749443054, -0.03468240052461624, -0.0023482488468289375, -0.28082478046417236, 0.05907783657312393, 0.13717611134052277, -0.030702566727995872, -0.08763661235570908, -0.1778871864080429, -0.09426059573888779, 0.03815209120512009, -0.1830769181251526, 0.002464408753439784, -0.12808124721050262, 0.01005327794700861, 0.0538344606757164, -0.1866893619298935, 0.09960118681192398, 0.10823433846235275, -0.07496324926614761, 0.03351600095629692, 0.008624371141195297, -0.016463281586766243, 0.04004555195569992, -0.010791029781103134, -0.14730150997638702, 0.036861009895801544, -0.0583343468606472, 0.05235425382852554, -0.125228151679039, 0.0037715560756623745, 0.0077988323755562305, 0.03464129939675331, -0.08007610589265823, 0.020259683951735497, -0.07822491973638535, -0.026300763711333275, 0.05485939234495163, -0.07225742191076279, 0.09479714184999466, 0.07120762020349503, 0.12344297021627426, 0.06875068694353104, -0.000019712577341124415, -0.1452656239271164, 0.03564510494470596, -0.0065854210406541824, -0.03069107048213482, 0.08143417537212372, -0.039568424224853516, -0.05428451672196388, 0.0030870663467794657, -0.09182991087436676, -0.2410924732685089, 0.13301171362400055, -0.05560130998492241, 0.06493479758501053, 0.2158477008342743, 0.04697909951210022, -0.18512217700481415, -0.044124968349933624, -0.00819825753569603, -0.1921270191669464, -0.2469581663608551, 0.029157668352127075, 0.07923354208469391, -0.14812900125980377, 0.13719315826892853, 0.09867158532142639, -0.06831696629524231, 0.09430814534425735, -0.13884422183036804, -0.06622914224863052, 0.012697998434305191, 0.3683107793331146, 0.04679718613624573, -0.13082346320152283, -0.012039328925311565, -0.04360208660364151, -0.13537350296974182, -0.000981294782832265, 0.011158620938658714, 0.07788696885108948, -0.12264741957187653, -0.0344596691429615, -0.04897937551140785, -0.031096195802092552, 0.012469652108848095, 0.038079749792814255, -0.023942848667502403, 0.052405282855033875, 0.028247280046343803, -0.04354555159807205, 0.07221854478120804, -0.09558555483818054, 0.14563995599746704, -0.06414356082677841, -0.10778383165597916, 0.019103579223155975, 0.0028514431323856115, 0.06259357929229736, 0.13174587488174438, 0.14458999037742615, -0.05257919803261757, -0.06470036506652832, -0.057720668613910675, -0.15160831809043884, -0.0990476906299591, -0.07786974310874939, 0.042123954743146896, 0.056313931941986084, -0.12312684953212738, 0.017239300534129143, -0.1364639848470688, 0.16984498500823975, -0.05297433212399483, 0.08341781049966812, -0.20683230459690094, -0.1396074891090393, 0.09551580250263214, 0.09253609925508499, -0.0077920937910676, -0.05616026744246483, 0.04517883434891701, -0.09895001351833344, 0.19965271651744843, 0.03949763998389244, 0.1104888767004013, 0.04213746264576912, -0.16382841765880585, -0.0925087258219719, -0.04167359694838524, 0.17011556029319763, 0.05369437858462334, 0.04792177677154541, 0.03962905332446098, 0.188175767660141, 0.04211468622088432, 0.03016047738492489, 0.03781288489699364, 0.1353214979171753, 0.10713396966457367, 0.09254401177167892, 0.0698174387216568, -0.009524599649012089, -0.2091473639011383, 0.08033029735088348, 0.07952045649290085, -0.09990602731704712, -0.05107782036066055, -0.015946393832564354, 0.07010100781917572, -0.02551613189280033, -0.03879332169890404, -0.09320877492427826, -0.14678506553173065, -0.07686899602413177, -0.05681784451007843, 0.18853382766246796, 0.18840737640857697, -0.09857930988073349, 0.03305976465344429, -0.13055136799812317, 0.03511733189225197, 0.13007624447345734, -0.08325377851724625, 0.0885908305644989, 0.04655412584543228, 0.05057957395911217, -0.053362250328063965, 0.1055624708533287, -0.05275605246424675, 0.3154112696647644, -0.04651305079460144, -0.12029336392879486, -0.12565572559833527, -0.2025705873966217, 0.02770441584289074, -0.08398587256669998, -0.08262098580598831, 0.05096813663840294, -0.13394609093666077, -0.026258742436766624, 0.006878579966723919, 0.001725363777950406, -0.21921753883361816, -0.19610264897346497, -0.05488532409071922, -0.13339807093143463, -0.1281827837228775, 0.027403831481933594, -0.0714431032538414, 0.007535784970968962, 0.03535296395421028, 0.012738324701786041, 0.14783842861652374, 0.02186160907149315, -0.06770409643650055, -0.0563245564699173, 0.002086442895233631, 0.07233886420726776, 0.08408151566982269, 0.21479463577270508, -0.08263698220252991, -0.254849910736084, -0.012822425924241543, -0.017918620258569717, 0.06553754210472107, -0.008076758123934269, 0.039906829595565796, 0.1261080801486969, -0.04179328307509422, 0.09091132134199142, 0.1273387372493744, -0.1667441576719284, 0.05027955770492554, 0.17792440950870514, 0.22666169703006744, 0.12347141653299332, -0.11415382474660873, 0.07692369818687439, 0.0860309973359108, -0.05857355147600174, -0.08235431462526321, -0.11509391665458679, 0.0766274482011795, 0.06819803267717361, 0.05849319323897362, 0.1102035641670227, -0.041863974183797836, 0.005058556329458952, 0.041392259299755096, -0.014419499784708023, 0.15568536520004272, 0.009650263004004955, 0.15803265571594238, -0.006151605863124132, -0.054862428456544876, -0.0739433541893959, -0.017777681350708008, 0.0684741884469986, -0.15538054704666138, -0.017493467777967453, 0.004615469835698605, 0.028520189225673676, 0.11019368469715118, 0.048028625547885895, 0.00391650665551424, -0.022196833044290543, 0.061469826847314835, 0.0707465410232544, 0.06691232323646545, -0.134165421128273, -0.05596761405467987, 0.0018785197753459215, -0.010698951780796051, 0.1182587519288063, -0.1141776442527771, 0.07757002860307693, 0.005438386928290129, -0.040130842477083206, 0.12250100821256638, -0.009668026119470596, -0.0550636425614357, 0.10626699030399323, -0.027877599000930786, -0.00202936097048223, -0.026250725612044334, 0.14801591634750366, -0.01082977931946516, 0.09535178542137146, 0.12431127578020096, 0.10250300914049149, -0.22552554309368134, 0.046112045645713806, 0.057403504848480225, -0.08336453884840012, -0.1658700406551361, 0.06340716779232025, -0.015503725968301296, 0.031900543719530106, 0.152983158826828, -0.057014212012290955, -0.021806538105010986, 0.16187983751296997, -0.12651056051254272, -0.11335036158561707, 0.0004161663237027824, -0.029977722093462944, -0.07975859940052032, -0.17664632201194763, -2.541964215856567e-32, -0.010744896717369556, 0.04718897119164467, -0.0839088037610054, -0.09314624220132828, 0.01030659954994917, -0.05324418097734451, 0.08158942312002182, -0.05938984453678131, -0.022906087338924408, 0.016175484284758568, -0.060504231601953506, -0.01788339950144291, 0.05390059947967529, 0.06757379323244095, -0.19473396241664886, -0.09387563914060593, 0.007798714563250542, -0.044235821813344955, -0.012256888672709465, -0.01801903545856476, 0.12197382003068924, 0.07883075624704361, 0.018771769478917122, 0.021637750789523125, 0.020437194034457207, -0.14816801249980927, 0.17467081546783447, -0.286504328250885, 0.14822906255722046, -0.03513675928115845, -0.08539081364870071, 0.07088406383991241, 0.026442665606737137, -0.03972705826163292, 0.03837192803621292, 0.04133177176117897, -0.1279703974723816, 0.007840900681912899, 0.08935533463954926, -0.018092134967446327, 0.13713312149047852, 0.010733026079833508, 0.09338050335645676, -0.14941276609897614, -0.013202184811234474, 0.07033194601535797, 0.07961451262235641, 0.0015121118631213903, -0.09860853850841522, -0.08142702281475067, -0.004724034108221531, -0.038319557905197144, 0.15211497247219086, 0.017235485836863518, -0.005251651629805565, 0.08121128380298615, -0.013137096539139748, 0.03357219696044922, -0.09199945628643036, -0.11886744946241379, -0.02364208921790123, 0.011585094034671783, -0.07401271164417267, -0.057189568877220154, 0.2146969437599182, -0.053771112114191055, 0.21654418110847473, 0.09826269000768661, -0.09940994530916214, 0.1577850580215454, 0.22673383355140686, 0.12379161268472672, -0.06138279289007187, -0.04233196750283241, -0.09122522175312042, -0.08128225058317184, -0.2401079684495926, 0.04691449925303459, 0.020549023523926735, -0.0674750879406929, -0.07547716796398163, 0.007760095410048962, 0.06390278041362762, 0.11072654277086258, -0.07675383985042572, -0.07137370854616165, -0.05797567591071129, -0.12023095041513443, -0.11313124001026154, -0.11739776283502579, 0.015049964189529419, -0.12412302196025848, -0.02472052164375782, 0.10612336546182632, -0.227363720536232, -0.03220947086811066, -0.0731576606631279, 0.016126345843076706, -0.1718168556690216, 0.17352725565433502, -0.030473263934254646, -0.018952010199427605, 0.2500079870223999, -0.06628870964050293, 0.1844159960746765, 0.03714523836970329, 0.11967626959085464, -0.06879331171512604, -0.0937134176492691, -0.079630047082901, -0.04586507007479668, 0.06352627277374268, 0.14076364040374756, 0.13991110026836395, 0.21382859349250793, 0.13555091619491577, -0.013391257263720036, -0.06980926543474197, -0.02732815220952034, 0.13750262558460236, -0.04189944267272949, -0.005740782245993614, 0.11813013255596161, 0.02176038548350334, -0.037382591515779495, 0.24234479665756226, -0.20864152908325195, -0.002149533247575164, -0.00826549157500267, 0.012059292756021023, 0.13470129668712616, 0.043314605951309204, 7.81992412157706e-7, -0.28288134932518005, 0.1398184597492218, -0.08055894821882248, 0.001679345965385437, -0.08551308512687683, 0.13279211521148682, -0.2669924199581146, 0.03795259818434715, 0.22137551009655, 0.05952413007616997, 0.12452400475740433, -0.07471494376659393, -0.1119547039270401, 0.1202586218714714, -0.15426179766654968, -0.08539889007806778, -0.07480818033218384, 0.11210265010595322, 0.031442876905202866, 0.16617736220359802, 0.20680561661720276, 0.19538921117782593, -0.11150191724300385, -0.008402381092309952, 0.003929414786398411, -0.08233968168497086, 0.014042169786989689, 0.04289821535348892, -0.005746894516050816, 0.01055435836315155, -0.10824192315340042, 0.03864056244492531, -0.009727679193019867, 0.1627771109342575, 0.11792068183422089, -0.030897533521056175, -0.053721118718385696, -0.0818835198879242, 0.13565152883529663, 0.07630392163991928, 0.05357663705945015, 0.06303859502077103, 0.05113615468144417, 0.08834339678287506, 0.2280517965555191, -0.12070531398057938, -0.10666455328464508, -0.034401893615722656, -0.020799437537789345, 0.11056342720985413, -0.10614835470914841, 0.029251093044877052, 0.09767612814903259, 0.12811368703842163, 0.11342678219079971, -0.07476473599672318, -0.004918289370834827, -0.15369482338428497, 0.04783034324645996, 0.0406576432287693, -0.08479692786931992, -0.0708099827170372, 0.08821737766265869, -0.01745741069316864, 0.13012561202049255, -0.009642469696700573, 0.10964813083410263, 1.459676194235196e-34, 0.024537725374102592, -0.10438825935125351, -0.03294511139392853, -0.012037329375743866, 0.00439803209155798, -0.13992227613925934, -0.11890056729316711, -0.045648884028196335, 0.08005277067422867, -0.18602067232131958, -0.017248524352908134 ]
https://github.com/huggingface/datasets/issues/2285
Help understanding how to build a dataset for language modeling as with the old TextDataset
I received an answer for this question on the HuggingFace Datasets forum by @lhoestq Hi ! If you want to tokenize line by line, you can use this: ``` max_seq_length = 512 num_proc = 4 def tokenize_function(examples): # Remove empty lines examples["text"] = [line for line in examples["text"] if len(line) > 0 and not line.isspace()] return tokenizer( examples["text"], truncation=True, max_length=max_seq_length, ) tokenized_dataset = dataset.map( tokenize_function, batched=True, num_proc=num_proc, remove_columns=["text"], ) ``` Though the TextDataset was doing a different processing by concatenating all the texts and building blocks of size 512. If you need this behavior, then you must apply an additional map function after the tokenization: ``` # Main data processing function that will concatenate all texts from # our dataset and generate chunks of max_seq_length. def group_texts(examples): # Concatenate all texts. concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()} total_length = len(concatenated_examples[list(examples.keys())[0]]) # We drop the small remainder, we could add padding if the model supported it instead of this drop, # you can customize this part to your needs. total_length = (total_length // max_seq_length) * max_seq_length # Split by chunks of max_len. result = { k: [t[i : i + max_seq_length] for i in range(0, total_length, max_seq_length)] for k, t in concatenated_examples.items() } return result # Note that with `batched=True`, this map processes 1,000 texts together, # so group_texts throws away a remainder for each of those groups of 1,000 texts. # You can adjust that batch_size here but a higher value might be slower to preprocess. tokenized_dataset = tokenized_dataset.map( group_texts, batched=True, num_proc=num_proc, ) ``` This code comes from the processing of the run_mlm.py example script of transformers
Hello, I am trying to load a custom dataset that I will then use for language modeling. The dataset consists of a text file that has a whole document in each line, meaning that each line overpasses the normal 512 tokens limit of most tokenizers. I would like to understand what is the process to build a text dataset that tokenizes each line, having previously split the documents in the dataset into lines of a "tokenizable" size, as the old TextDataset class would do, where you only had to do the following, and a tokenized dataset without text loss would be available to pass to a DataCollator: ``` model_checkpoint = 'distilbert-base-uncased' from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained(model_checkpoint) from transformers import TextDataset dataset = TextDataset( tokenizer=tokenizer, file_path="path/to/text_file.txt", block_size=512, ) ``` For now, what I have is the following, which, of course, throws an error because each line is longer than the maximum block size in the tokenizer: ``` import datasets dataset = datasets.load_dataset('path/to/text_file.txt') model_checkpoint = 'distilbert-base-uncased' tokenizer = AutoTokenizer.from_pretrained(model_checkpoint) def tokenize_function(examples): return tokenizer(examples["text"]) tokenized_datasets = dataset.map(tokenize_function, batched=True, num_proc=4, remove_columns=["text"]) tokenized_datasets ``` So what would be the "standard" way of creating a dataset in the way it was done before? Thank you very much for the help :))
270
Help understanding how to build a dataset for language modeling as with the old TextDataset Hello, I am trying to load a custom dataset that I will then use for language modeling. The dataset consists of a text file that has a whole document in each line, meaning that each line overpasses the normal 512 tokens limit of most tokenizers. I would like to understand what is the process to build a text dataset that tokenizes each line, having previously split the documents in the dataset into lines of a "tokenizable" size, as the old TextDataset class would do, where you only had to do the following, and a tokenized dataset without text loss would be available to pass to a DataCollator: ``` model_checkpoint = 'distilbert-base-uncased' from transformers import AutoTokenizer tokenizer = AutoTokenizer.from_pretrained(model_checkpoint) from transformers import TextDataset dataset = TextDataset( tokenizer=tokenizer, file_path="path/to/text_file.txt", block_size=512, ) ``` For now, what I have is the following, which, of course, throws an error because each line is longer than the maximum block size in the tokenizer: ``` import datasets dataset = datasets.load_dataset('path/to/text_file.txt') model_checkpoint = 'distilbert-base-uncased' tokenizer = AutoTokenizer.from_pretrained(model_checkpoint) def tokenize_function(examples): return tokenizer(examples["text"]) tokenized_datasets = dataset.map(tokenize_function, batched=True, num_proc=4, remove_columns=["text"]) tokenized_datasets ``` So what would be the "standard" way of creating a dataset in the way it was done before? Thank you very much for the help :)) I received an answer for this question on the HuggingFace Datasets forum by @lhoestq Hi ! If you want to tokenize line by line, you can use this: ``` max_seq_length = 512 num_proc = 4 def tokenize_function(examples): # Remove empty lines examples["text"] = [line for line in examples["text"] if len(line) > 0 and not line.isspace()] return tokenizer( examples["text"], truncation=True, max_length=max_seq_length, ) tokenized_dataset = dataset.map( tokenize_function, batched=True, num_proc=num_proc, remove_columns=["text"], ) ``` Though the TextDataset was doing a different processing by concatenating all the texts and building blocks of size 512. If you need this behavior, then you must apply an additional map function after the tokenization: ``` # Main data processing function that will concatenate all texts from # our dataset and generate chunks of max_seq_length. def group_texts(examples): # Concatenate all texts. concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()} total_length = len(concatenated_examples[list(examples.keys())[0]]) # We drop the small remainder, we could add padding if the model supported it instead of this drop, # you can customize this part to your needs. total_length = (total_length // max_seq_length) * max_seq_length # Split by chunks of max_len. result = { k: [t[i : i + max_seq_length] for i in range(0, total_length, max_seq_length)] for k, t in concatenated_examples.items() } return result # Note that with `batched=True`, this map processes 1,000 texts together, # so group_texts throws away a remainder for each of those groups of 1,000 texts. # You can adjust that batch_size here but a higher value might be slower to preprocess. tokenized_dataset = tokenized_dataset.map( group_texts, batched=True, num_proc=num_proc, ) ``` This code comes from the processing of the run_mlm.py example script of transformers
[ 0.10265998542308807, 0.0792938694357872, -0.06585051864385605, 0.06504035741090775, 0.017895014956593513, -0.0659455731511116, 0.2698138952255249, 0.010552977211773396, -0.1311875432729721, -0.1050560399889946, 0.12014256417751312, -0.1998070478439331, -0.004092644900083542, 0.13906660676002502, 0.0072688995860517025, -0.12332872301340103, -0.026132619008421898, -0.20408713817596436, 0.05014808475971222, -0.0458129346370697, 0.11757051199674606, 0.029307343065738678, 0.1674700826406479, 0.04784752428531647, -0.2877354919910431, -0.024833768606185913, -0.1913440078496933, 0.13906189799308777, -0.21840856969356537, -0.07811856269836426, -0.12559369206428528, 0.18116866052150726, 0.1733229160308838, 0.1276373565196991, 0.000005186541784496512, -0.10831194370985031, -0.130032479763031, -0.03074539639055729, 0.005523676052689552, 0.014952020719647408, 0.23967814445495605, -0.04403730109333992, 0.020656704902648926, 0.08158354461193085, -0.021895183250308037, -0.11626584082841873, -0.0017002045642584562, 0.08904531598091125, 0.2053551971912384, 0.2001868635416031, -0.030768783763051033, -0.17359910905361176, -0.05803648382425308, -0.06786346435546875, -0.14445775747299194, -0.021388350054621696, 0.22211997210979462, 0.043470367789268494, 0.0185090284794569, -0.059195343405008316, 0.02103525586426258, 0.008635257370769978, -0.016568152233958244, -0.18868668377399445, 0.13471655547618866, 0.03981181979179382, -0.27765652537345886, -0.21004311740398407, 0.11859890073537827, 0.018876921385526657, 0.09749582409858704, -0.054929886013269424, 0.024036036804318428, 0.14723654091358185, -0.05365120619535446, -0.17237591743469238, -0.08495379984378815, -0.09019853919744492, 0.014347885735332966, 0.09869510680437088, -0.08731565624475479, -0.008428838104009628, -0.13403186202049255, -0.08276411890983582, -0.2287948727607727, 0.0941629633307457, -0.07885424047708511, 0.03307860717177391, -0.09103959798812866, -0.0026449814904481173, 0.032194871455430984, -0.15591107308864594, 0.1954120248556137, 0.07820609956979752, -0.016726965084671974, -0.13003720343112946, -0.10864786058664322, -0.08114810287952423, 0.09335855394601822, 0.13546964526176453, -0.1546448916196823, 0.03958989307284355, -0.078350730240345, 0.018612924963235855, -0.005444702692329884, 0.04031149670481682, 0.020382963120937347, 0.0204303078353405, -0.10847840458154678, 0.044760070741176605, -0.09011634439229965, 0.0025058819446712732, -0.40769830346107483, 0.015237126499414444, 0.08350328356027603, -0.010228493250906467, 0.08829566091299057, 0.06295181065797806, 0.10489177703857422, 0.0836995393037796, 0.05088638514280319, -0.12418306618928909, -0.023389266803860664, -0.011142055504024029, -0.05002053827047348, -0.12240341305732727, -0.16788600385189056, 0.022012395784258842, -0.0020685296040028334, -0.08423732221126556, -0.028798328712582588, -0.0006061266758479178, 0.1262606978416443, -0.00022431634715758264, 0.008762838318943977, 0.04019612818956375, 0.07134288549423218, -0.057902656495571136, -0.06542239338159561, -0.0645618736743927, -0.04338749498128891, -0.20469509065151215, -0.2857646346092224, -0.22237059473991394, 0.1378139704465866, 0.15087123215198517, -0.03232025355100632, 0.018000317737460136, -0.14030049741268158, 0.003101537935435772, -0.032769206911325455, 0.06746888160705566, -0.13751381635665894, 0.07527495175600052, -0.012554473243653774, -0.0812034085392952, -0.040208518505096436, 0.11211568862199783, 0.0013347032945603132, 0.13564233481884003, 0.10899025201797485, 0.09513524174690247, 0.09873079508543015, -0.07882659137248993, 0.0811488926410675, 0.10470155626535416, -0.1394796222448349, 0.10014403611421585, -0.053190793842077255, 0.007286878768354654, 0.21339046955108643, 0.2234853357076645, -0.08485467731952667, 0.13847698271274567, -0.025917524471879005, 0.2943296730518341, 0.11491966247558594, 0.12136946618556976, -0.11940734088420868, 0.0696941390633583, 0.06448211520910263, -0.0005103375297039747, 0.05392586812376976, -0.30140867829322815, 0.4079095721244812, -0.0059150527231395245, 0.1088676005601883, 0.32639768719673157, -0.07665557414293289, -0.1168806180357933, -0.10314815491437912, 0.15414805710315704, 0.04295473173260689, -0.261274129152298, 0.09731902182102203, -0.16817638278007507, -0.024269653484225273, -0.022645657882094383, 0.004346733912825584, -0.1931382268667221, 0.05090906843543053, 0.013542722910642624, -0.018985329195857048, 0.2232970893383026, 0.10660327225923538, -0.0691937580704689, 0.011028227396309376, -0.10016310214996338, 0.19881489872932434, 0.010746480897068977, -0.09996157139539719, 0.0802110880613327, -0.17324863374233246, -0.027746733278036118, -0.09729288518428802, 0.11721480637788773, -0.011514183133840561, 0.0137716643512249, -0.07818543910980225, 0.10916648805141449, -0.03599737212061882, -0.039741288870573044, 0.04144883155822754, 0.19878891110420227, 0.12793181836605072, 0.054839495569467545, -0.1335136741399765, 0.043736398220062256, -0.10043320804834366, 0.18010419607162476, 0.04247983917593956, -0.053316161036491394, 0.0863959938287735, 0.0037495242431759834, 0.03242506831884384, -0.04999973252415657, -0.10420466959476471, 0.06406661868095398, 0.12498268485069275, 0.08240500092506409, 0.10300194472074509, -0.046809837222099304, -0.0024244538508355618, -0.04316416382789612, -0.073968306183815, 0.04435289278626442, 0.12718306481838226, 0.04501326382160187, -0.07044048607349396, -0.19062019884586334, 0.06664008647203445, 0.1174045130610466, 0.01306065171957016, 0.14156955480575562, -0.04670693725347519, 0.011498426087200642, 0.003635510103777051, 0.26016154885292053, -0.04345514252781868, -0.014716871082782745, 0.07017427682876587, -0.14762602746486664, 0.04142105206847191, 0.07539002597332001, 0.004929897375404835, -0.13023971021175385, 0.04465990141034126, -0.08331503719091415, -0.04048466682434082, -0.026801932603120804, 0.12562358379364014, -0.012115495279431343, 0.00199125031940639, -0.1318870335817337, 0.03742482513189316, -0.1385204792022705, -0.10991308838129044, -0.028305860236287117, -0.14073504507541656, 0.22767886519432068, -0.03234391286969185, -0.13607513904571533, -0.006417324300855398, 0.03260998800396919, 0.08173584938049316, 0.1450110226869583, -0.032693471759557724, -0.11466066539287567, -0.29324981570243835, -0.05524897202849388, -0.0966903567314148, 0.08973956853151321, 0.035628270357847214, -0.26397258043289185, 0.07396971434354782, -0.14363859593868256, 0.2275632619857788, 0.012804653495550156, -0.08642862737178802, 0.11937005817890167, -0.029078127816319466, 0.08760445564985275, -0.02578802779316902, 0.03365830332040787, 0.001782258041203022, 0.353349894285202, 0.0091738011687994, 0.19298626482486725, -0.24802422523498535, -0.0313941091299057, -0.015272462740540504, -0.1119183674454689, -0.13474343717098236, 0.1500311940908432, 0.06101180613040924, 0.08237089216709137, -0.06019345670938492, -0.2476138025522232, -0.036576882004737854, 0.09527074545621872, 0.016925491392612457, -0.04232261702418327, -0.04851853847503662, -0.20012140274047852, -0.005103862378746271, -0.15863414108753204, 0.03394575044512749, -0.16355271637439728, 0.16315679252147675, 0.12379272282123566, -0.029693542048335075, 0.054705772548913956, -0.13737231492996216, 0.09920984506607056, 0.018387632444500923, -0.11598219722509384, -0.05243568494915962, -0.0883312001824379, 0.1643693447113037, 0.0838291198015213, -0.06774018704891205, 0.09881038218736649, -0.07300465553998947, 0.012451699934899807, 0.003284772392362356, -0.010666167363524437, 0.11994284391403198, -0.07362226396799088, -0.09927544742822647, -0.017821865156292915, 0.16424231231212616, 0.1510922759771347, -0.1875544786453247, 0.1004670187830925, -0.10535866767168045, 0.17410297691822052, -0.22923600673675537, -0.05253024399280548, -0.09513989835977554, -0.05003761872649193, 0.15112057328224182, 0.044904157519340515, 0.19231711328029633, 0.07159098982810974, -0.013425923883914948, -0.09776309132575989, 0.21042758226394653, -0.04239605739712715, 0.10403192043304443, -0.12415936589241028, 0.1831895262002945, -0.014814108610153198, -0.029474541544914246, 0.11973074823617935, -0.004323015455156565, -0.05302244424819946, 0.04962317273020744, -0.13853339850902557, 0.10730204731225967, -0.0821918323636055, 0.08708789199590683, -0.2303667962551117, -0.10314866155385971, 0.07285656034946442, 0.05801177769899368, 0.11732914298772812, 0.07735052704811096, -0.026235198602080345, 0.1424797773361206, 0.1301792412996292, 0.08103267103433609, -0.20232662558555603, 0.1181243434548378, -0.09465386718511581, -0.10246885567903519, -0.0784364566206932, 0.020374462008476257, 0.1898263692855835, 0.0914750024676323, 0.1423216015100479, 0.096688412129879, 0.09224031865596771, -0.09346681088209152, 0.016527084633708, -0.02351635880768299, 0.07181525230407715, 0.019107894971966743, 0.1499011218547821, -0.003504948690533638, 0.06453373283147812, 0.16773703694343567, 0.17655591666698456, 0.00357330241240561, -0.06733731180429459, 0.0406748466193676, 0.13639827072620392, -0.020470239222049713, 0.17603719234466553, 0.13684731721878052, -0.030722353607416153, -0.16607719659805298, -0.13536007702350616, 0.11879013478755951, 0.20497171580791473, -0.050329018384218216, 0.05698920413851738, -0.04216291755437851, 0.06089623644948006, 0.18125778436660767, 0.18461070954799652, 0.08755744993686676, -0.03018745221197605, -0.07936717569828033, 0.03474796935915947, -0.07464280724525452, -0.06013945862650871, 0.016318611800670624, -0.03879443556070328, -0.05584011599421501, -0.05888059735298157, 0.11637523770332336, 0.17356498539447784, 0.23339979350566864, -0.0504491925239563, 0.12855422496795654, -0.21330401301383972, -0.01013307087123394, 0.00028630392625927925, 0.1454189121723175, 0.05906900763511658, -0.071961410343647, -0.20995676517486572, -0.09698440879583359, -0.07806926965713501, -0.09792826324701309, -0.0618051141500473, -0.019944919273257256, -0.15568557381629944, -0.16683511435985565, 0.14872196316719055, -0.22424274682998657, 0.02863982878625393, 0.06977894902229309, 0.015047648921608925, -0.2048327475786209, 0.16467425227165222, 0.2746347486972809, -0.3212522566318512, -0.16863860189914703, -0.11200172454118729, 0.002424586098641157, 0.11142326146364212, 0.026474297046661377, -0.05445409566164017, 0.15976184606552124, -0.12629422545433044, -0.04978716000914574, 0.1541672945022583, -0.13987144827842712, -0.0037855820264667273, 0.1887085884809494, 0.05181248486042023, 0.11825566738843918, 0.17090123891830444, -0.013692973181605339, 0.04111415892839432, -0.09796980768442154, -0.03099377453327179, -0.05426178500056267, 0.021043958142399788, -0.1413874328136444, -0.09991943091154099, -0.09679523855447769, -0.1400827169418335, -0.0706438273191452, 0.03633890673518181, 0.031247589737176895, 0.14387297630310059, -0.029086371883749962, 0.1263752281665802, 0.17493373155593872, -0.12092272937297821, 0.015079823322594166, 0.030982378870248795, -0.19487251341342926, -0.022914206609129906, -0.16529661417007446, 0.09042111784219742, -0.06662219017744064, 0.007294792216271162, -0.036359839141368866, 0.14589573442935944, -0.05182171240448952, -0.11068791896104813, -0.07546645402908325, -0.024161966517567635, -0.20809806883335114, 0.0008108565234579146, 0.08007452636957169, -0.028741681948304176, -0.03335054591298103, 0.025954080745577812, 0.12306948751211166, -0.036066554486751556, 0.09631016850471497, -0.05296092480421066, 0.09298419207334518, -0.11970386654138565, -0.016886303201317787, 0.09135236591100693, 0.035444602370262146, -0.06174921989440918, 0.21594595909118652, -0.15988808870315552, -0.010526620782911777, 0.16238157451152802, 0.17508535087108612, -0.0429476760327816, -0.04962063580751419, -0.22157201170921326, 0.01779922842979431, -0.10154010355472565, -0.02347920462489128, 0.22077426314353943, 0.021395105868577957, 0.02666473016142845, -0.16470757126808167, -0.06082650646567345, -0.02339203841984272, -0.06311063468456268, 0.0299335066229105, 0.16771650314331055, 0.18489301204681396, -0.08680593967437744, 0.07055840641260147, -2.596592377075156e-32, 0.10591752827167511, 0.011469759047031403, 0.04677284508943558, -0.021437877789139748, -0.15109635889530182, 0.034263208508491516, 0.11810142546892166, -0.29961708188056946, 0.01910225674510002, -0.04387142136693001, -0.09349074959754944, -0.0005244939238764346, 0.07714638113975525, 0.15807513892650604, -0.23377518355846405, 0.10062598437070847, 0.06366829574108124, -0.08596177399158478, -0.14438802003860474, 0.10177963227033615, 0.17116679251194, 0.07945278286933899, 0.008423557505011559, 0.19046196341514587, 0.07330700010061264, -0.07193125039339066, -0.0960279181599617, -0.0033564658369868994, 0.08133389800786972, 0.02613077312707901, -0.144065722823143, 0.036546289920806885, -0.08358429372310638, -0.014268162660300732, -0.07629356533288956, 0.2065792828798294, -0.22069598734378815, -0.03952394053339958, -0.013576680794358253, 0.17398923635482788, -0.02089986950159073, -0.1206095889210701, 0.2296554297208786, -0.13511675596237183, -0.09068764746189117, 0.11204107105731964, 0.04422811046242714, 0.037903498858213425, -0.06666693091392517, -0.0005140177672728896, -0.08771908283233643, 0.09178280085325241, 0.016008030623197556, 0.050821609795093536, 0.11045603454113007, -0.3205665051937103, 0.059576552361249924, 0.07504438608884811, -0.07681019604206085, 0.02341996505856514, 0.09135439991950989, 0.022275902330875397, 0.005000586621463299, -0.023467255756258965, 0.06563122570514679, 0.050718970596790314, 0.15423914790153503, 0.01728219911456108, 0.008913307450711727, -0.013809801079332829, 0.04184577614068985, -0.07327698171138763, -0.06280308961868286, -0.012802532874047756, -0.10867227613925934, -0.029617469757795334, -0.18932905793190002, -0.01870703138411045, -0.10380090028047562, -0.01884475350379944, 0.1043597087264061, 0.1786123663187027, -0.07057808339595795, -0.022022733464837074, -0.05771885812282562, -0.16278108954429626, -0.08564278483390808, 0.006640920881181955, 0.020139941945672035, -0.05876815691590309, -0.1646401435136795, -0.004432768560945988, -0.0697910413146019, 0.025943320244550705, -0.18716168403625488, 0.12682852149009705, -0.15753762423992157, -0.009914632886648178, -0.06755412369966507, -0.15136919915676117, 0.00221558497287333, -0.052568886429071426, 0.12774772942066193, 0.018760917708277702, 0.08539333194494247, -0.02560339868068695, 0.20224852859973907, 0.12360489368438721, -0.20022106170654297, 0.00251108524389565, -0.057268861681222916, 0.052235834300518036, 0.1386183202266693, 0.11687732487916946, -0.05603737756609917, -0.045077864080667496, 0.04709797725081444, 0.0021312085445970297, 0.18614576756954193, -0.046303410083055496, -0.11533163487911224, 0.04400346428155899, 0.0680808424949646, 0.025309082120656967, -0.014511986635625362, 0.0355939157307148, -0.18318405747413635, -0.06357164680957794, 0.10760600864887238, -0.09265850484371185, -0.008165438659489155, 0.025505509227514267, 6.570800792360387e-7, 0.03173009306192398, 0.19975076615810394, 0.30384203791618347, -0.07969102263450623, 0.00575762614607811, 0.04368587210774422, -0.25113818049430847, 0.04222768172621727, 0.060563404113054276, 0.11998185515403748, 0.051847904920578, 0.03448816016316414, -0.044829487800598145, 0.09718325734138489, -0.11375010013580322, 0.0394706092774868, -0.050463415682315826, -0.06888095289468765, -0.2649633586406708, -0.005764215253293514, 0.14408238232135773, 0.16003400087356567, -0.14177663624286652, 0.06421144306659698, 0.010216259397566319, -0.10271090269088745, -0.12190628051757812, 0.04373450204730034, 0.11126579344272614, 0.04924388602375984, 0.11729022860527039, -0.2256188839673996, 0.07473709434270859, 0.04943633824586868, 0.003548994893208146, 0.23326551914215088, -0.21297532320022583, 0.16563865542411804, -0.01901426911354065, 0.2208697646856308, 0.15363767743110657, -0.19378964602947235, -0.017267202958464622, -0.2671358287334442, 0.19973976910114288, 0.11359724402427673, 0.12322220951318741, -0.10001728683710098, -0.034668873995542526, -0.012575751170516014, -0.022511892020702362, 0.05289263278245926, 0.14877018332481384, 0.3241106867790222, 0.05689511075615883, -0.047468144446611404, 0.02154231071472168, -0.08234608918428421, -0.05835738033056259, -0.08215537667274475, -0.20281603932380676, -0.12217997759580612, -0.1499059647321701, 0.10938332229852676, -0.07177374511957169, -0.19514481723308563, 0.14397314190864563, 6.384405414819102e-35, 0.02222810685634613, -0.10829009115695953, 0.024155540391802788, -0.1620650440454483, -0.0567530132830143, -0.1432320475578308, 0.18530797958374023, 0.19442789256572723, -0.09047278016805649, -0.23942099511623383, -0.12853842973709106 ]