html_url stringlengths 48 51 | title stringlengths 5 280 | comments stringlengths 63 51.8k | body stringlengths 0 36.2k ⌀ | comment_length int64 16 1.52k | text stringlengths 159 54.1k | embeddings listlengths 768 768 |
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/514 | dataset.shuffle(keep_in_memory=True) is never allowed | Oh yes ok got it thanks. Should be fixed if we are happy with #513 indeed. | As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)`
The commit added the lines
```python
# lines 994-996 in src/nlp/arrow_dataset.py
assert (
not keep_in_memory or cache_file_name is None
), "Please use either `keep_in_memory` or `cache_file_name` but not both."
```
This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check.
I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. | 16 | dataset.shuffle(keep_in_memory=True) is never allowed
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)`
The commit added the lines
```python
# lines 994-996 in src/nlp/arrow_dataset.py
assert (
not keep_in_memory or cache_file_name is None
), "Please use either `keep_in_memory` or `cache_file_name` but not both."
```
This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check.
I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
Oh yes ok got it thanks. Should be fixed if we are happy with #513 indeed. | [
-0.10787230730056763,
0.031478047370910645,
-0.05921569839119911,
0.17983411252498627,
0.2271602898836136,
-0.05695998668670654,
-0.0781591534614563,
0.3618607223033905,
-0.017298530787229538,
0.31020307540893555,
0.061767153441905975,
0.5769482254981995,
-0.2770044803619385,
-0.4012131690979004,
-0.030209947377443314,
0.08211331069469452,
0.04266723617911339,
0.06440766155719757,
-0.06057584285736084,
-0.15430745482444763,
-0.40355148911476135,
-0.13434211909770966,
-0.4251638650894165,
-0.16856257617473602,
-0.2936739921569824,
-0.14768283069133759,
-0.06942498683929443,
0.1123732179403305,
-0.2651754319667816,
-0.4221324026584625,
-0.050732821226119995,
0.275295615196228,
-0.4287704527378082,
0.4618905484676361,
-0.00011052581248804927,
-0.24254311621189117,
0.2252238541841507,
-0.07326193898916245,
-0.21657225489616394,
-0.08470652997493744,
-0.37495505809783936,
0.10294459760189056,
-0.06259061396121979,
-0.1702316403388977,
0.1931009292602539,
-0.1649807095527649,
0.050829917192459106,
-0.4214203655719757,
0.2389519065618515,
0.21298585832118988,
0.23097385466098785,
0.07959014177322388,
-0.004712507128715515,
-0.04259426146745682,
0.5332525372505188,
0.06852502375841141,
-0.17112722992897034,
0.1763259619474411,
0.16075333952903748,
-0.23778443038463593,
0.021252281963825226,
0.2817612886428833,
-0.1588004231452942,
0.21974177658557892,
0.2054118514060974,
-0.07898511737585068,
-0.13509565591812134,
-0.18968600034713745,
0.3096529543399811,
0.17935465276241302,
0.2681090831756592,
-0.39943447709083557,
-0.24052803218364716,
-0.11299922317266464,
0.008462028577923775,
-0.34944233298301697,
0.300212562084198,
0.22817657887935638,
-0.02640507183969021,
-0.18794240057468414,
-0.14576935768127441,
-0.10699966549873352,
0.16327399015426636,
-0.093822181224823,
0.20046040415763855,
0.2594088017940521,
0.07561804354190826,
0.0720263421535492,
0.49292948842048645,
-0.08767814934253693,
0.20414631068706512,
-0.049483828246593475,
-0.2196621596813202,
0.31183287501335144,
-0.4002455174922943,
-0.0920264944434166,
0.16149383783340454,
0.07448314875364304,
0.23049098253250122,
0.07565353810787201,
0.2575990557670593,
0.006720703095197678,
0.013253477402031422,
0.25167274475097656,
0.20012646913528442,
0.37846797704696655,
-0.06540580838918686,
0.21343132853507996,
0.1905718892812729,
-0.08007267117500305,
-0.17315393686294556,
0.08808717876672745,
0.04157005995512009,
-0.3028278648853302,
0.07492569088935852,
-0.08003006130456924,
0.1167866587638855,
-0.24637223780155182,
-0.10123363882303238,
0.13183732330799103,
-0.1357845664024353,
-0.2121957391500473,
0.04538290575146675,
0.5516234040260315,
0.18660299479961395,
-0.07676646113395691,
0.014775723218917847,
0.06872738897800446,
-0.058700382709503174,
0.09639590978622437,
-0.3627191483974457,
0.11536435782909393,
-0.3626093566417694,
0.0938815027475357,
0.23760800063610077,
0.12139284610748291,
0.3731110692024231,
-0.10519324243068695,
-0.06587213277816772,
0.11021333932876587,
0.27351611852645874,
-0.2634016275405884,
0.39253371953964233,
0.22904452681541443,
-0.2552446126937866,
0.02419074811041355,
0.020668350160121918,
0.14937886595726013,
-0.22030261158943176,
0.4370919167995453,
-0.1299479901790619,
-0.2776746451854706,
0.27397269010543823,
0.174529030919075,
-0.04801643639802933,
-0.03797841817140579,
-0.0036671683192253113,
-0.07302255928516388,
0.44607990980148315,
-0.3608434200286865,
0.3171113133430481,
-0.20892851054668427,
-0.027908941730856895,
-0.38700562715530396,
0.0059968773275613785,
0.1643783152103424,
-0.22295533120632172,
0.07575444877147675,
-0.27342790365219116,
-0.014844667166471481,
0.194869726896286,
0.4441380500793457,
-0.09104117006063461,
-0.35846954584121704,
-0.23990431427955627,
0.1730918139219284,
0.2468247413635254,
-0.13807964324951172,
-0.5333726406097412,
-0.2369210422039032,
-0.1584782898426056,
0.03616923838853836,
0.08791337162256241,
0.05844195932149887,
-0.062700055539608,
-0.11635435372591019,
0.4518161714076996,
0.021028658375144005,
0.018345067277550697,
0.13438521325588226,
-0.30992400646209717,
-0.14006085693836212,
0.36973869800567627,
-0.1520807296037674,
-0.24018310010433197,
-0.17309752106666565,
0.119515061378479,
-0.1781291663646698,
0.38074177503585815,
0.04133082181215286,
-0.030813707038760185,
-0.03498320281505585,
0.4841260313987732,
-0.219828262925148,
-0.0847400352358818,
-0.07475079596042633,
-0.15926742553710938,
0.15090122818946838,
0.06921729445457458,
-0.12820491194725037,
-0.10194730758666992,
-0.21619874238967896,
-0.05006501078605652,
-0.07203403115272522,
-0.19365771114826202,
-0.3217892646789551,
0.14004944264888763,
0.055104419589042664,
0.07145819067955017,
0.05531919375061989,
-0.1687682718038559,
0.09281198680400848,
-0.42366039752960205,
-0.16203701496124268,
-0.08879786729812622,
0.16012537479400635,
-0.12449682503938675,
-0.20090539753437042,
0.09206493198871613,
0.2002393901348114,
-0.05143459141254425,
0.05138038098812103,
-0.30459198355674744,
0.43805500864982605,
0.2062826156616211,
0.08236242830753326,
0.07510814815759659,
0.09880344569683075,
-0.10491717606782913,
-0.10152403265237808,
0.2643214762210846,
-0.1814335733652115,
0.11313764750957489,
-0.1391752064228058,
-0.08185800164937973,
0.23963713645935059,
-0.22785960137844086,
0.07608740031719208,
0.19140300154685974,
-0.21402952075004578,
0.2335221767425537,
0.19477808475494385,
-0.07633532583713531,
-0.18927958607673645,
0.3093518614768982,
0.21438352763652802,
0.3748638927936554,
0.2533474266529083,
-0.23953697085380554,
-0.07308530062437057,
0.7524771690368652,
0.22069492936134338,
0.14991572499275208,
0.022045275196433067,
0.021172277629375458,
-0.30061107873916626,
0.1650637686252594,
0.4131224751472473,
0.49860620498657227,
0.18924178183078766,
0.1480911523103714,
-0.002886274829506874,
0.020692404359579086,
-0.07620290666818619,
0.3187272846698761,
0.025200627744197845,
0.14750176668167114,
0.0877852588891983,
0.2769102454185486,
-0.22251732647418976,
-0.5638148188591003,
-0.1646713763475418,
0.30803555250167847,
0.24249111115932465,
-0.08202088624238968,
-0.23886056244373322,
-0.35991865396499634,
-0.13612590730190277,
-0.14083299040794373,
-0.10599970072507858,
-0.21283365786075592,
-0.12997350096702576,
0.09275425225496292,
0.3725084066390991,
-0.21256688237190247,
0.37396878004074097,
-0.24820725619792938,
0.4168657660484314,
-0.022202957421541214,
-0.11719772964715958,
-0.23208056390285492,
-0.21777884662151337,
0.14361560344696045,
0.11651043593883514,
0.16973112523555756,
0.09457169473171234,
0.38997361063957214,
0.2874012589454651,
-0.1426669955253601,
-0.05846661329269409,
-0.21580979228019714,
0.03472427278757095,
-0.1650773584842682,
-0.029339568689465523,
0.027454465627670288,
0.061413589864969254,
-0.11374973505735397,
-0.3544992208480835,
0.0075108688324689865,
-0.3451034128665924,
-0.2569625675678253,
0.11526334285736084,
0.24797706305980682,
-0.19415980577468872,
-0.3728398084640503,
-0.41074612736701965,
-0.2554982900619507,
-0.4678593873977661,
0.4274532198905945,
-0.04211235046386719,
0.16973301768302917,
0.41220566630363464,
0.026855960488319397,
0.08716128021478653,
-0.36798834800720215,
0.046726129949092865,
-0.48011159896850586,
-0.3200536370277405,
0.16642460227012634,
-0.2421019971370697,
-0.127479687333107,
-0.050911057740449905,
-0.07979864627122879,
0.29872292280197144,
0.2556760609149933,
-0.17015139758586884,
-0.014400122687220573,
-0.4049578607082367,
-0.0595422238111496,
0.0206533744931221,
0.17051555216312408,
0.5260155200958252,
0.15086007118225098,
-0.18826274573802948,
-0.17595043778419495,
-0.16729089617729187,
0.23452505469322205,
0.3991561830043793,
0.1976090669631958,
0.030670631676912308,
-0.001397348940372467,
0.27864328026771545,
0.6611918210983276,
0.03487543761730194,
0.26503756642341614,
0.24445946514606476,
0.12085958570241928,
0.3795448839664459,
-0.37076428532600403,
-0.04518140107393265,
0.3426941931247711,
0.1007092222571373,
-0.3421362638473511,
0.08984740823507309,
-0.19200366735458374,
-0.3663152754306793,
-0.06478417664766312,
0.24074742197990417,
0.0730639100074768,
-0.18177390098571777,
0.08917487412691116,
-0.0761931985616684,
-0.061005376279354095,
0.21420373022556305,
0.09790641814470291,
-0.2363513708114624,
-0.1197248324751854,
-0.08301974833011627,
-0.15023446083068848,
0.2026253342628479,
-0.17229829728603363,
-0.5896502733230591,
-0.28540104627609253,
-0.415849894285202,
0.29970234632492065,
0.021984785795211792,
0.630490243434906,
-0.04624437540769577,
-0.27508553862571716,
0.14212605357170105,
-0.013684691861271858,
0.48436248302459717,
-0.12237528711557388,
0.0978710949420929,
0.2757170498371124,
0.23645451664924622,
-0.1469786912202835,
0.022587556391954422,
-0.31533026695251465,
0.10524140298366547,
-0.2829588055610657,
-0.20830631256103516,
-0.2535836398601532,
-0.07929535955190659,
-0.04130537807941437,
-0.016631770879030228,
0.028088893741369247,
0.05576227977871895,
-0.3222193419933319,
0.13238129019737244,
-0.359912246465683,
0.13067544996738434,
0.2097441554069519,
-0.1717754751443863,
-0.4578043818473816,
0.018815886229276657,
0.09598585963249207,
0.0022870544344186783,
-0.05084875226020813,
0.1427774727344513,
0.5783633589744568,
0.05323491245508194,
0.0800342857837677,
0.21536420285701752,
-0.22083696722984314,
0.24040696024894714,
0.3562561869621277,
-0.180362269282341,
0.20779535174369812,
-0.019691962748765945,
-0.10947421193122864,
0.3237189054489136,
0.4031086266040802,
-0.008754504844546318,
0.24211683869361877,
0.04130672663450241,
-0.026921972632408142,
-0.16104595363140106,
-0.08986221253871918,
0.3695458173751831,
-0.1644631326198578,
0.009617859497666359,
-0.6999326348304749,
0.27226752042770386,
0.381976842880249,
-0.1795828640460968,
0.76955246925354,
0.03423347324132919,
-0.09264890849590302,
0.3315492868423462,
-0.07725230604410172,
1.1195507049560547,
0.033970460295677185,
0.17710638046264648,
0.17556160688400269,
-0.015926450490951538,
0.11487861722707748,
-0.03968091309070587,
0.29060423374176025,
-0.23783759772777557,
-0.5211145281791687,
0.1604730486869812,
-0.2698270380496979,
0.17623001337051392,
-0.0710655152797699,
-0.253615140914917,
0.24522019922733307,
0.09293396770954132,
-0.04449448361992836,
-0.17270153760910034,
0.007868167012929916,
-0.3439277410507202,
-0.04055115208029747,
-0.042926985770463943,
0.13225507736206055,
-0.03353578597307205,
0.02997499145567417,
-0.058601438999176025,
0.013780659064650536,
-0.06308074295520782,
-0.2973027229309082,
-0.09443585574626923,
0.1352882981300354,
-0.20446960628032684,
0.2324857860803604,
-0.2904858887195587,
0.006201833486557007,
0.010941479355096817,
-0.054746393114328384,
-0.12837213277816772,
0.2540833652019501,
-0.04814445972442627,
0.40960562229156494,
0.5715175867080688,
0.23147398233413696,
0.07684753090143204,
0.21455924212932587,
0.24581973254680634,
0.025563016533851624,
-0.22694969177246094,
0.05391831696033478,
-0.14830245077610016,
-0.4766717553138733,
-0.1591784656047821,
0.03632444888353348,
0.26322677731513977,
0.1623256951570511,
-0.36793646216392517,
0.24862203001976013,
-0.3597944378852844,
-0.2111903876066208,
0.1669827699661255,
0.12705166637897491,
-0.13224956393241882,
0.47005993127822876,
0.014276571571826935,
-0.22955763339996338,
-0.0009840857237577438,
0.5051690936088562,
0.08646724373102188,
0.2383112609386444,
0.5237419605255127,
-0.07267292588949203,
-0.17001217603683472,
-0.28729912638664246,
-0.2536235451698303,
-0.03601273149251938,
-0.204470694065094,
0.18376198410987854,
-0.05546906962990761,
-0.28398916125297546,
0.06887508928775787,
0.2643088400363922,
0.10663267970085144,
0.4070768356323242,
-0.0948500782251358,
-0.22920891642570496,
-0.42018362879753113,
0.44376713037490845,
-0.09925702214241028,
0.41402649879455566,
-0.2612752318382263,
0.08263438940048218,
-0.12150602042675018,
0.1916922777891159,
-0.3876180648803711,
0.09383541345596313,
-0.0836891457438469,
0.2934553623199463,
0.015755975618958473,
-0.11193463951349258,
0.023032408207654953,
-0.17077361047267914,
0.15248766541481018,
0.35071343183517456,
-0.37249377369880676,
-0.2430211901664734,
0.14579376578330994,
0.1175747960805893,
0.0835484117269516,
0.05920637398958206,
-0.08965114504098892,
-0.5925162434577942,
-0.10818377137184143,
-0.18363872170448303,
0.0946241021156311,
0.14584815502166748,
-0.05784863233566284,
0.3071139454841614,
0.36627718806266785,
-0.006175100803375244,
0.3721620440483093,
0.28927597403526306,
-0.1997232437133789,
-0.38404351472854614,
-0.04666365683078766,
-0.02141168713569641,
-0.19071067869663239,
-0.10976691544055939,
-0.09900330007076263,
-0.06740880757570267,
-0.25416457653045654,
0.22144639492034912,
0.05561435967683792,
-0.01754673570394516,
-0.21992520987987518,
-0.09808006882667542,
0.429517924785614,
0.6297250390052795,
-0.07643241435289383,
-0.3640531003475189,
0.40697017312049866,
0.2642084062099457,
-0.345533549785614,
-0.16291935741901398,
0.046428702771663666,
0.27528414130210876,
0.1474655568599701,
0.008306287229061127,
-0.075951486825943,
-0.1911001205444336,
-0.1815365105867386,
0.28965261578559875,
0.22053661942481995,
-0.6552203893661499,
0.27705758810043335,
0.12683512270450592,
0.02103225514292717,
-0.17865045368671417,
0.20173753798007965,
0.2562084197998047,
0.3099999725818634,
0.3726300001144409,
-0.04602237790822983,
0.35596540570259094,
0.4608311057090759,
0.06596587598323822,
0.11708545684814453,
-0.2425631284713745,
0.11539106070995331,
0.5658172369003296,
-0.08120036125183105,
0.2766994833946228,
0.2415810376405716,
0.3678363561630249,
0.061221543699502945,
-0.14634497463703156,
-0.16861657798290253,
-0.04493255540728569,
-0.18315494060516357,
0.011736424639821053,
0.17100489139556885,
-0.29132235050201416,
-0.058317575603723526,
-0.07934024930000305,
-0.06837727129459381,
0.17550808191299438,
0.6497917175292969,
0.12100198864936829,
0.06104820966720581,
-0.36777734756469727,
0.23698166012763977,
0.1279890537261963,
0.2782161235809326,
-0.30368927121162415,
0.1446886509656906,
0.11850601434707642,
-0.07520104944705963,
0.3234331011772156,
0.2481108009815216,
0.18160925805568695,
0.382904589176178,
-0.20081134140491486,
0.06899800151586533,
-0.05051666870713234,
-0.12656842172145844,
-0.15661077201366425,
0.3311428725719452,
0.38470396399497986,
-0.13906340301036835,
0.19856728613376617,
0.16332609951496124,
-0.17679952085018158,
0.014326542615890503,
0.2011551856994629,
0.16553641855716705,
-0.1903318166732788,
0.23069068789482117,
0.1728617548942566,
-0.15046051144599915,
0.042780812829732895,
-0.103780098259449,
-0.47271618247032166,
-0.03838961943984032,
-0.14188572764396667,
-0.2031337022781372,
0.03780040144920349,
-0.08494661748409271,
0.09199643135070801,
-0.0921621322631836,
0.3033487796783447,
0.15685845911502838,
-0.12623152136802673,
-0.17806541919708252,
-0.26765531301498413,
-0.9151121377944946,
0.2245614230632782,
0.05150120332837105,
0.0624053031206131,
-0.13494907319545746,
0.38462069630622864,
0.0082029327750206,
-0.20361031591892242,
0.1121896505355835,
-0.0982702374458313,
-0.039663661271333694,
0.22327247262001038,
-0.4372611939907074,
0.07024054229259491,
-0.08145298063755035,
-0.0988086611032486,
0.14654436707496643,
-0.24783867597579956,
0.031127968803048134,
-0.11476127058267593,
0.04793989658355713,
0.007239704951643944,
-0.03801234811544418,
0.03593062236905098,
0.3697405159473419,
0.46672317385673523,
0.01612231507897377,
0.2574399709701538,
-0.08029329776763916,
0.042293377220630646,
-0.2977578043937683,
-0.28289419412612915,
0.024515580385923386,
-0.21855518221855164,
0.07094848155975342,
0.4769240915775299,
-0.16035044193267822,
-0.12550297379493713,
-0.27001193165779114,
0.2912334203720093,
-0.2710496187210083,
0.11839509010314941,
-0.33230718970298767,
0.2123008668422699,
0.09011753648519516,
0.3516816198825836,
-0.2855340242385864,
-0.02802782505750656,
-0.036668501794338226,
0.1451435089111328,
-0.29316121339797974,
-0.3934071958065033,
0.7955737113952637,
-0.21202906966209412,
-0.2552545964717865,
-0.12430077791213989,
0.5379712581634521,
0.021998420357704163,
-0.4403069019317627,
-0.3389931619167328,
-0.030006200075149536,
0.11507701873779297,
0.0005139857530593872,
-0.23199521005153656,
0.10296942293643951,
-0.38944947719573975,
0.05187603458762169,
-0.08740285038948059,
0.5879088640213013,
-0.1065414622426033,
-0.2709551155567169,
0.1191219836473465,
-0.2413642406463623
] |
https://github.com/huggingface/datasets/issues/514 | dataset.shuffle(keep_in_memory=True) is never allowed | My bad. This is actually not fixed in #513. Sorry about that...
The new `indices_cache_file_name` is set to a non-None value in the new `shuffle()` as well.
The buffer and caching mechanisms used in the `select()` function are too intricate for me to understand why the check is there at all. I've removed it in my local build and it seems to be working fine for my project, without really considering other implications of the change.
| As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)`
The commit added the lines
```python
# lines 994-996 in src/nlp/arrow_dataset.py
assert (
not keep_in_memory or cache_file_name is None
), "Please use either `keep_in_memory` or `cache_file_name` but not both."
```
This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check.
I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. | 76 | dataset.shuffle(keep_in_memory=True) is never allowed
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)`
The commit added the lines
```python
# lines 994-996 in src/nlp/arrow_dataset.py
assert (
not keep_in_memory or cache_file_name is None
), "Please use either `keep_in_memory` or `cache_file_name` but not both."
```
This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check.
I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
My bad. This is actually not fixed in #513. Sorry about that...
The new `indices_cache_file_name` is set to a non-None value in the new `shuffle()` as well.
The buffer and caching mechanisms used in the `select()` function are too intricate for me to understand why the check is there at all. I've removed it in my local build and it seems to be working fine for my project, without really considering other implications of the change.
| [
-0.1627901941537857,
0.1008971780538559,
-0.047236040234565735,
0.14130473136901855,
0.19698777794837952,
-0.08948737382888794,
-0.07246842980384827,
0.37462082505226135,
0.02849704399704933,
0.32976406812667847,
0.0540856271982193,
0.5689109563827515,
-0.2949671447277069,
-0.40706074237823486,
-0.06308291852474213,
0.18253189325332642,
0.09145530313253403,
0.04643785580992699,
-0.06404244899749756,
-0.11498208343982697,
-0.40232330560684204,
-0.1355522871017456,
-0.38077312707901,
-0.20722408592700958,
-0.2809174656867981,
-0.1180851086974144,
-0.061781831085681915,
0.09146418422460556,
-0.25828415155410767,
-0.4361538589000702,
-0.00634315051138401,
0.3478771150112152,
-0.4093186855316162,
0.416029691696167,
-0.00010997634672094136,
-0.17911425232887268,
0.207314133644104,
-0.07387495785951614,
-0.2709139585494995,
-0.09894995391368866,
-0.3752155900001526,
0.11048093438148499,
-0.09581224620342255,
-0.0919574499130249,
0.17562991380691528,
-0.18544623255729675,
0.05888104811310768,
-0.5130763053894043,
0.17869868874549866,
0.2128080129623413,
0.21111269295215607,
0.049981556832790375,
-0.03358082473278046,
-0.02931087836623192,
0.5861100554466248,
0.05661320686340332,
-0.18904083967208862,
0.16635726392269135,
0.1492808610200882,
-0.19059085845947266,
-0.000799231231212616,
0.2823547124862671,
-0.2549174427986145,
0.25754183530807495,
0.261125773191452,
-0.0905020460486412,
-0.1236085519194603,
-0.18463365733623505,
0.3069358170032501,
0.2646515965461731,
0.2544344365596771,
-0.36754998564720154,
-0.28487810492515564,
-0.17756682634353638,
-0.00832308828830719,
-0.35383039712905884,
0.3373943269252777,
0.15217946469783783,
0.0035766419023275375,
-0.176980659365654,
-0.1892118901014328,
-0.0270583163946867,
0.23196429014205933,
-0.09661588072776794,
0.24912244081497192,
0.26061153411865234,
0.059469014406204224,
0.040991101413965225,
0.5399265289306641,
-0.0905897468328476,
0.2658838629722595,
-0.12244051694869995,
-0.23888549208641052,
0.2838871479034424,
-0.3870711922645569,
-0.1137690320611,
0.19622176885604858,
0.04598931223154068,
0.22128048539161682,
0.07044024765491486,
0.2729633152484894,
0.07080983370542526,
0.024004973471164703,
0.20284053683280945,
0.10221780836582184,
0.40536370873451233,
-0.08943077176809311,
0.1724642515182495,
0.19955644011497498,
-0.031599510461091995,
-0.14094442129135132,
0.08015384525060654,
0.005148701369762421,
-0.24885772168636322,
0.0470430813729763,
-0.048276692628860474,
0.09994189441204071,
-0.2141384333372116,
-0.12548553943634033,
0.12037499994039536,
-0.12013718485832214,
-0.22330088913440704,
0.09014076739549637,
0.5079163312911987,
0.1808762401342392,
-0.02026531845331192,
-0.053989477455616,
0.06033005565404892,
-0.07072500884532928,
0.15337848663330078,
-0.3479057550430298,
0.06793855130672455,
-0.3014753460884094,
0.14468231797218323,
0.2900344729423523,
0.09291097521781921,
0.3374699354171753,
-0.05304710194468498,
-0.07445429265499115,
0.16771093010902405,
0.24098753929138184,
-0.29885363578796387,
0.4511573910713196,
0.20908203721046448,
-0.32778066396713257,
0.01167559064924717,
0.030516862869262695,
0.06618841737508774,
-0.27134308218955994,
0.41430988907814026,
-0.130840003490448,
-0.25825268030166626,
0.29510897397994995,
0.16859830915927887,
-0.0781639814376831,
-0.06271238625049591,
-0.028289712965488434,
0.00044998154044151306,
0.42580893635749817,
-0.3920407295227051,
0.34422045946121216,
-0.21522510051727295,
-0.0734056830406189,
-0.35123685002326965,
0.02235383354127407,
0.15928472578525543,
-0.21998801827430725,
0.06613846123218536,
-0.26489967107772827,
0.054558925330638885,
0.13903017342090607,
0.4122769832611084,
-0.07077325135469437,
-0.3986480236053467,
-0.1971275508403778,
0.09059745073318481,
0.21417143940925598,
-0.15213578939437866,
-0.5648220777511597,
-0.24087421596050262,
-0.13164611160755157,
0.0403599739074707,
0.16589988768100739,
0.04755036532878876,
-0.019921263679862022,
-0.1683560311794281,
0.4874160587787628,
0.015976224094629288,
0.03790270537137985,
0.1605655401945114,
-0.28679633140563965,
-0.2108650952577591,
0.2988811135292053,
-0.1238565444946289,
-0.2522100806236267,
-0.1908818483352661,
0.11999790370464325,
-0.17366918921470642,
0.31755632162094116,
0.04627020284533501,
-0.011107289232313633,
-0.033735983073711395,
0.4648878276348114,
-0.2766034007072449,
-0.06746325641870499,
-0.10128333419561386,
-0.17856532335281372,
0.1913275122642517,
0.068678118288517,
-0.2096100151538849,
-0.10759146511554718,
-0.1848168671131134,
0.023645754903554916,
-0.11831748485565186,
-0.2057339996099472,
-0.32019561529159546,
0.11419111490249634,
0.11477664858102798,
0.1583022028207779,
0.09175561368465424,
-0.1539449244737625,
0.064510278403759,
-0.3795573115348816,
-0.1858309954404831,
-0.06214192137122154,
0.11523774266242981,
-0.0434529185295105,
-0.24223458766937256,
0.04611774533987045,
0.22483429312705994,
-0.09231985360383987,
0.06425496190786362,
-0.3035542964935303,
0.4044661223888397,
0.21187527477741241,
0.06544139981269836,
0.049732256680727005,
0.20672060549259186,
-0.09723611921072006,
-0.04550424590706825,
0.3066759705543518,
-0.24564947187900543,
0.10840391367673874,
-0.04018048197031021,
-0.08836140483617783,
0.2758994400501251,
-0.298566997051239,
0.12851710617542267,
0.19371578097343445,
-0.3063235580921173,
0.2506427764892578,
0.1813523918390274,
-0.07752179354429245,
-0.23785343766212463,
0.2764938473701477,
0.22713184356689453,
0.4078926146030426,
0.27923890948295593,
-0.16853713989257812,
-0.0030659139156341553,
0.8022280335426331,
0.22159242630004883,
0.12261836230754852,
0.02824665978550911,
-0.00992324948310852,
-0.33113598823547363,
0.1510765105485916,
0.43689316511154175,
0.5458807945251465,
0.20664247870445251,
0.13917607069015503,
-0.05234942585229874,
0.042790915817022324,
-0.12482398003339767,
0.30327123403549194,
-0.005101263523101807,
0.0998852401971817,
0.14773595333099365,
0.2927752733230591,
-0.1784619837999344,
-0.5660681128501892,
-0.11746871471405029,
0.3162509500980377,
0.1801416575908661,
-0.0468139722943306,
-0.16965526342391968,
-0.39156046509742737,
-0.113441601395607,
-0.1453723907470703,
-0.1362469643354416,
-0.2019047886133194,
-0.13970904052257538,
0.1181994080543518,
0.428018182516098,
-0.22400322556495667,
0.403080016374588,
-0.21910734474658966,
0.3761199116706848,
-0.08205538243055344,
-0.20098689198493958,
-0.23238588869571686,
-0.2473515421152115,
0.11350434273481369,
0.10718290507793427,
0.18013203144073486,
0.03494769707322121,
0.32261303067207336,
0.264710396528244,
-0.15617744624614716,
-0.10727383941411972,
-0.2211647927761078,
0.05032023414969444,
-0.15550419688224792,
-0.02164733223617077,
-0.04789996147155762,
0.010121285915374756,
-0.08827575296163559,
-0.3869796693325043,
0.008691512979567051,
-0.38317689299583435,
-0.24120105803012848,
0.1789950132369995,
0.1787719875574112,
-0.1435183584690094,
-0.4018125832080841,
-0.33352065086364746,
-0.2333361953496933,
-0.4529963731765747,
0.374129056930542,
-0.06399213522672653,
0.0997936874628067,
0.4208822548389435,
0.050193581730127335,
0.11929301917552948,
-0.370349258184433,
0.056627057492733,
-0.5147153735160828,
-0.3384055495262146,
0.14413011074066162,
-0.18813568353652954,
-0.08592560887336731,
-0.10791721194982529,
-0.10237088054418564,
0.2616952955722809,
0.3022655248641968,
-0.15286025404930115,
0.020132575184106827,
-0.4135584533214569,
-0.022030342370271683,
0.06478367000818253,
0.0957222431898117,
0.5864396691322327,
0.1653221994638443,
-0.212055504322052,
-0.19229555130004883,
-0.13801221549510956,
0.17893582582473755,
0.37185966968536377,
0.1798119843006134,
0.05726116895675659,
0.018241556361317635,
0.2684490978717804,
0.7134549021720886,
-0.011072741821408272,
0.2548036277294159,
0.2837662994861603,
0.16796651482582092,
0.4330679476261139,
-0.4372285306453705,
-0.012113277800381184,
0.3658876121044159,
0.09327539056539536,
-0.3274996876716614,
0.10780275613069534,
-0.20092284679412842,
-0.4239676892757416,
-0.07029327750205994,
0.253644734621048,
0.08827359229326248,
-0.19287480413913727,
0.11466651409864426,
-0.10827426612377167,
-0.0777750089764595,
0.2088019698858261,
0.1254797875881195,
-0.21213680505752563,
-0.19722330570220947,
-0.0898093730211258,
-0.13055437803268433,
0.20531925559043884,
-0.1757034957408905,
-0.571644127368927,
-0.3005232810974121,
-0.4015980064868927,
0.33167964220046997,
0.08360563218593597,
0.6012483835220337,
-0.05744200199842453,
-0.3226548731327057,
0.09375763684511185,
0.027769405394792557,
0.4177290201187134,
-0.1002548411488533,
0.055320680141448975,
0.28660792112350464,
0.256670743227005,
-0.1767851710319519,
-0.024348143488168716,
-0.2983761727809906,
0.07480227947235107,
-0.3461560308933258,
-0.15687887370586395,
-0.27133631706237793,
-0.10511279106140137,
-0.09748517721891403,
0.02602788433432579,
0.049891214817762375,
0.1094595193862915,
-0.4067121148109436,
0.16495323181152344,
-0.3717479109764099,
0.1544075459241867,
0.16675329208374023,
-0.15727895498275757,
-0.46360158920288086,
-0.009596358984708786,
0.11691178381443024,
-0.020465679466724396,
-0.0727095752954483,
0.1309039443731308,
0.5553306341171265,
0.13491852581501007,
0.056791845709085464,
0.2547767162322998,
-0.26177355647087097,
0.2977278232574463,
0.2745456099510193,
-0.2015114575624466,
0.2483658790588379,
0.02671586535871029,
-0.0410485714673996,
0.2491193413734436,
0.4222630560398102,
-0.019600268453359604,
0.24539253115653992,
0.11590849608182907,
-0.046106092631816864,
-0.2089993804693222,
-0.08559948951005936,
0.33291417360305786,
-0.17250047624111176,
0.0061696371994912624,
-0.7266321182250977,
0.27000802755355835,
0.42166081070899963,
-0.20214934647083282,
0.8089630007743835,
-0.02630653977394104,
-0.07454214990139008,
0.3130095601081848,
-0.029332682490348816,
1.0826152563095093,
0.052393488585948944,
0.18458838760852814,
0.15239457786083221,
-0.014946561306715012,
0.11521967500448227,
-0.027476860210299492,
0.3338969945907593,
-0.16107258200645447,
-0.5241382122039795,
0.16414587199687958,
-0.24127210676670074,
0.14344948530197144,
-0.08536927402019501,
-0.25559002161026,
0.2435745745897293,
0.1431552916765213,
-0.0014053918421268463,
-0.1848623901605606,
-0.0017581135034561157,
-0.4116513133049011,
-0.060256559401750565,
-0.014968100935220718,
0.11896921694278717,
-0.028836682438850403,
0.02157563716173172,
0.004009278491139412,
0.05076933652162552,
-0.05618085712194443,
-0.21494132280349731,
-0.0922037810087204,
0.08773671090602875,
-0.21328561007976532,
0.25127652287483215,
-0.29274889826774597,
0.012026950716972351,
-0.07752961665391922,
-0.07941065728664398,
-0.1324298083782196,
0.23658083379268646,
-0.0912313461303711,
0.41568946838378906,
0.5673072934150696,
0.2921692132949829,
0.09024563431739807,
0.11298679560422897,
0.2711988091468811,
0.06237839162349701,
-0.20338888466358185,
0.032193057239055634,
-0.13765427470207214,
-0.47102683782577515,
-0.13522888720035553,
-0.0016211792826652527,
0.25884366035461426,
0.16529947519302368,
-0.2814907133579254,
0.21029484272003174,
-0.3044538199901581,
-0.21407808363437653,
0.1672842651605606,
0.07608767598867416,
-0.015446914359927177,
0.41474586725234985,
-0.07231877744197845,
-0.26430749893188477,
-0.04798555746674538,
0.5450504422187805,
0.05258005112409592,
0.2975499927997589,
0.4717646837234497,
-0.17051945626735687,
-0.16950473189353943,
-0.22844642400741577,
-0.2198897898197174,
-0.03727308288216591,
-0.18422965705394745,
0.16333787143230438,
-0.029056629166007042,
-0.33229735493659973,
0.10182463377714157,
0.25363898277282715,
0.07162103056907654,
0.4311788082122803,
-0.12069983780384064,
-0.17421458661556244,
-0.38888251781463623,
0.4864368438720703,
-0.10693411529064178,
0.3767164945602417,
-0.25891053676605225,
0.012110119685530663,
-0.12515169382095337,
0.11985461413860321,
-0.37646913528442383,
0.05122601240873337,
-0.05639411509037018,
0.24955101311206818,
-0.04180293530225754,
-0.13358736038208008,
0.06592249870300293,
-0.20197589695453644,
0.12323550879955292,
0.2920113801956177,
-0.3878263533115387,
-0.2230166792869568,
0.1272723525762558,
0.12929537892341614,
0.05177269130945206,
0.04839624464511871,
-0.11833526939153671,
-0.6028361320495605,
-0.0754036158323288,
-0.24510088562965393,
0.13266652822494507,
0.11494588106870651,
-0.06391213834285736,
0.25696632266044617,
0.36232078075408936,
0.020895645022392273,
0.3931995630264282,
0.2849190831184387,
-0.25239089131355286,
-0.38893741369247437,
-0.0620700977742672,
0.0018399432301521301,
-0.19618432223796844,
-0.09523462504148483,
-0.08865798264741898,
-0.061913661658763885,
-0.2578052878379822,
0.166885107755661,
0.03875333443284035,
0.03191402181982994,
-0.23497164249420166,
-0.03179207816720009,
0.3383495509624481,
0.638177752494812,
0.015067050233483315,
-0.41978719830513,
0.37465012073516846,
0.2426556795835495,
-0.24499233067035675,
-0.1985408067703247,
0.0005009863525629044,
0.281086266040802,
0.16747403144836426,
-0.037504054605960846,
-0.030975565314292908,
-0.24510882794857025,
-0.0940178781747818,
0.31146323680877686,
0.25272300839424133,
-0.6664283275604248,
0.2603015601634979,
0.11667397618293762,
0.06194828823208809,
-0.16337056457996368,
0.24222004413604736,
0.18898901343345642,
0.3079884648323059,
0.3570041060447693,
-0.03695137798786163,
0.31942513585090637,
0.42525357007980347,
0.11097434163093567,
0.05938028544187546,
-0.2671724259853363,
0.14725881814956665,
0.5640748739242554,
-0.1756100058555603,
0.2904317378997803,
0.25773078203201294,
0.3387804329395294,
0.025239247828722,
-0.08477052301168442,
-0.14626924693584442,
-0.04928223416209221,
-0.15768757462501526,
-0.0292043536901474,
0.19334588944911957,
-0.2965599000453949,
-0.021636873483657837,
-0.053490281105041504,
-0.0778493881225586,
0.21903139352798462,
0.6823831796646118,
0.07872983068227768,
0.02281610667705536,
-0.30853787064552307,
0.23659765720367432,
0.12220563739538193,
0.3123133182525635,
-0.2915610373020172,
0.15404914319515228,
0.18674606084823608,
-0.09265555441379547,
0.3304528295993805,
0.2505859136581421,
0.19573736190795898,
0.3371889591217041,
-0.22785484790802002,
0.0878952220082283,
-0.028681885451078415,
-0.14430907368659973,
-0.22098246216773987,
0.3758552670478821,
0.35376396775245667,
-0.1627032458782196,
0.14525017142295837,
0.1758391112089157,
-0.18294884264469147,
-0.01676565408706665,
0.1404101401567459,
0.20128463208675385,
-0.18296684324741364,
0.19949999451637268,
0.24461674690246582,
-0.08557111024856567,
0.10979344695806503,
-0.06660617142915726,
-0.4104937016963959,
-0.013631285168230534,
-0.16644996404647827,
-0.22428005933761597,
0.034213121980428696,
-0.07898788154125214,
0.09036137908697128,
-0.035306334495544434,
0.3293508291244507,
0.13391782343387604,
-0.15808171033859253,
-0.1349671632051468,
-0.23585766553878784,
-0.8640739917755127,
0.18185219168663025,
0.06823945790529251,
0.15683364868164062,
-0.08894752711057663,
0.39572277665138245,
0.019033893942832947,
-0.1654413640499115,
0.06441515684127808,
-0.08632394671440125,
-0.04288719221949577,
0.1791069209575653,
-0.4435938894748688,
0.09027545154094696,
-0.08502216637134552,
-0.10683268308639526,
0.12951862812042236,
-0.294693261384964,
0.04674987494945526,
-0.1034761443734169,
0.032506197690963745,
0.004984615370631218,
-0.02089468389749527,
0.07116302847862244,
0.42194056510925293,
0.43974781036376953,
0.04152870550751686,
0.2196602076292038,
-0.10057304799556732,
0.03497576713562012,
-0.290199875831604,
-0.2234971672296524,
0.004294094629585743,
-0.21731683611869812,
0.03320099040865898,
0.4783434569835663,
-0.190058171749115,
-0.17434559762477875,
-0.23008562624454498,
0.34569841623306274,
-0.25092917680740356,
0.12297236919403076,
-0.3572005331516266,
0.1816214770078659,
0.07424672693014145,
0.37744325399398804,
-0.32271620631217957,
0.005615599453449249,
0.032829418778419495,
0.14583852887153625,
-0.2736539840698242,
-0.37564581632614136,
0.712977945804596,
-0.22505228221416473,
-0.2088698297739029,
-0.1358778476715088,
0.4948708415031433,
0.039808664470911026,
-0.39102858304977417,
-0.256096214056015,
0.02816348522901535,
0.14486348628997803,
0.04476518929004669,
-0.213639035820961,
0.09727586805820465,
-0.36130958795547485,
0.1303616762161255,
-0.1091751903295517,
0.5722789764404297,
-0.07235661894083023,
-0.27722328901290894,
0.10974226891994476,
-0.21197664737701416
] |
https://github.com/huggingface/datasets/issues/514 | dataset.shuffle(keep_in_memory=True) is never allowed | Ok I'll investigate and add a series of tests on the `keep_in_memory=True` settings which is under-tested atm | As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)`
The commit added the lines
```python
# lines 994-996 in src/nlp/arrow_dataset.py
assert (
not keep_in_memory or cache_file_name is None
), "Please use either `keep_in_memory` or `cache_file_name` but not both."
```
This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check.
I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. | 17 | dataset.shuffle(keep_in_memory=True) is never allowed
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)`
The commit added the lines
```python
# lines 994-996 in src/nlp/arrow_dataset.py
assert (
not keep_in_memory or cache_file_name is None
), "Please use either `keep_in_memory` or `cache_file_name` but not both."
```
This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check.
I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
Ok I'll investigate and add a series of tests on the `keep_in_memory=True` settings which is under-tested atm | [
-0.16453975439071655,
0.04706403613090515,
-0.06451335549354553,
0.18163159489631653,
0.22622878849506378,
-0.06582225114107132,
-0.09840323030948639,
0.3320510685443878,
-0.007561886683106422,
0.33992141485214233,
0.044422656297683716,
0.5816403031349182,
-0.29123300313949585,
-0.42862561345100403,
-0.07635004818439484,
0.1383524388074875,
0.043693702667951584,
0.09388767182826996,
-0.04312595725059509,
-0.14757615327835083,
-0.3487337827682495,
-0.1134752631187439,
-0.43575775623321533,
-0.19661082327365875,
-0.3342383801937103,
-0.1588745266199112,
-0.024881422519683838,
0.11037373542785645,
-0.23720420897006989,
-0.3972378075122833,
-0.06870044022798538,
0.2789510488510132,
-0.44234493374824524,
0.49374377727508545,
-0.00011062973499065265,
-0.2429223209619522,
0.17970873415470123,
-0.057864852249622345,
-0.24357819557189941,
-0.12178663909435272,
-0.3575274348258972,
0.19020918011665344,
-0.03835432231426239,
-0.16585418581962585,
0.1627752184867859,
-0.16572575271129608,
0.062461383640766144,
-0.43913236260414124,
0.27392715215682983,
0.19192463159561157,
0.23257118463516235,
0.048362091183662415,
-0.010864559561014175,
-0.07084094732999802,
0.5056999325752258,
0.0983683243393898,
-0.18650612235069275,
0.2023807018995285,
0.09942873567342758,
-0.18267063796520233,
-0.0003845691680908203,
0.26226431131362915,
-0.15028993785381317,
0.2361278533935547,
0.20723938941955566,
-0.06699718534946442,
-0.16667339205741882,
-0.18255022168159485,
0.3554883301258087,
0.1823658049106598,
0.22925636172294617,
-0.424245685338974,
-0.22381265461444855,
-0.10830157995223999,
0.00639363331720233,
-0.296493262052536,
0.2984437942504883,
0.185324028134346,
-0.022890402004122734,
-0.17574501037597656,
-0.1930442452430725,
-0.05609196424484253,
0.15071521699428558,
-0.08236241340637207,
0.2069922685623169,
0.26199454069137573,
0.050416313111782074,
0.056710101664066315,
0.5261256098747253,
-0.09701372683048248,
0.1877242624759674,
-0.03745994716882706,
-0.2361273467540741,
0.3029496371746063,
-0.42306768894195557,
-0.06242169067263603,
0.17137855291366577,
0.08727546781301498,
0.22058787941932678,
0.061353862285614014,
0.30085137486457825,
0.04461818188428879,
0.01289523858577013,
0.21068885922431946,
0.1390133798122406,
0.38084280490875244,
-0.07203569263219833,
0.18353542685508728,
0.19633066654205322,
-0.07484351843595505,
-0.20124921202659607,
0.04944564774632454,
0.008846545591950417,
-0.27484890818595886,
0.08455269038677216,
-0.13423892855644226,
0.10053041577339172,
-0.25769487023353577,
-0.10261274129152298,
0.1227499395608902,
-0.1149025484919548,
-0.19203393161296844,
0.04237695038318634,
0.6033258438110352,
0.16030246019363403,
-0.11700711399316788,
0.025567643344402313,
0.0903492271900177,
-0.04608353227376938,
0.1373940408229828,
-0.36945652961730957,
0.08494271337985992,
-0.32146286964416504,
0.1383458822965622,
0.2982781231403351,
0.15028750896453857,
0.3950698971748352,
-0.06422416865825653,
-0.02519543468952179,
0.1381617933511734,
0.282737672328949,
-0.2803497612476349,
0.3846617043018341,
0.2303173542022705,
-0.24049223959445953,
0.04702998697757721,
-0.019658830016851425,
0.11895188689231873,
-0.18820323050022125,
0.4020312428474426,
-0.08727923780679703,
-0.26134559512138367,
0.36058104038238525,
0.17782357335090637,
-0.10038404911756516,
-0.034316129982471466,
-0.010385788977146149,
-0.09159034490585327,
0.4123304784297943,
-0.3571668565273285,
0.2896510660648346,
-0.19290263950824738,
-0.0031735748052597046,
-0.3660290241241455,
0.04721385985612869,
0.14115101099014282,
-0.16841179132461548,
0.04702366143465042,
-0.24368461966514587,
0.02364337630569935,
0.1621587574481964,
0.4457206726074219,
-0.08740610629320145,
-0.3389570116996765,
-0.2185918539762497,
0.19656093418598175,
0.2297675609588623,
-0.14873652160167694,
-0.5433412790298462,
-0.2355116307735443,
-0.1417674571275711,
0.044300585985183716,
0.11158192902803421,
0.0318915918469429,
-0.03900482878088951,
-0.10022982954978943,
0.46595636010169983,
0.060135964304208755,
0.038138821721076965,
0.1441458761692047,
-0.3020870089530945,
-0.13128814101219177,
0.3288307785987854,
-0.11448223888874054,
-0.23942847549915314,
-0.16336971521377563,
0.0918087512254715,
-0.1207452192902565,
0.3615778982639313,
0.06536995619535446,
-0.040391869843006134,
-0.062086984515190125,
0.46026432514190674,
-0.28900933265686035,
-0.09273403137922287,
-0.08825676143169403,
-0.10437055677175522,
0.15924331545829773,
0.0940956324338913,
-0.14101922512054443,
-0.15038521587848663,
-0.20464926958084106,
-0.033318012952804565,
-0.10328991711139679,
-0.24233554303646088,
-0.3282051980495453,
0.15485186874866486,
0.10084833204746246,
0.10140734910964966,
0.06171628460288048,
-0.10634112358093262,
0.08678245544433594,
-0.4196276366710663,
-0.1925981640815735,
-0.07564139366149902,
0.1260683834552765,
-0.08845113217830658,
-0.23833641409873962,
0.060584135353565216,
0.2049887478351593,
-0.09312810748815536,
0.0096158217638731,
-0.31483718752861023,
0.44071128964424133,
0.18788555264472961,
0.06368592381477356,
0.0666089653968811,
0.0964369997382164,
-0.12636035680770874,
-0.11586747318506241,
0.2639685571193695,
-0.21414493024349213,
0.1109960749745369,
-0.1265970766544342,
-0.11254122108221054,
0.2180502712726593,
-0.2423674613237381,
0.09688816964626312,
0.23936845362186432,
-0.24731417000293732,
0.2639487087726593,
0.18859241902828217,
-0.04163307324051857,
-0.20779168605804443,
0.2843482196331024,
0.16916179656982422,
0.42929577827453613,
0.20451289415359497,
-0.22785238921642303,
-0.08149252086877823,
0.7257270216941833,
0.2631526291370392,
0.16926994919776917,
-0.02891409397125244,
-0.031421415507793427,
-0.2949010729789734,
0.13420212268829346,
0.3861590623855591,
0.516514241695404,
0.2118198722600937,
0.14964570105075836,
-0.029634715989232063,
0.016999414190649986,
-0.08780115097761154,
0.2908546030521393,
-0.005639903247356415,
0.13657253980636597,
0.13038590550422668,
0.29463207721710205,
-0.2110145539045334,
-0.5754868388175964,
-0.1763487160205841,
0.3066597878932953,
0.2283555567264557,
-0.05380509793758392,
-0.24551008641719818,
-0.34113380312919617,
-0.08839036524295807,
-0.07714329659938812,
-0.11255774646997452,
-0.19192707538604736,
-0.10042423009872437,
0.12753815948963165,
0.3741231858730316,
-0.18713507056236267,
0.38859060406684875,
-0.21753989160060883,
0.3834330141544342,
-0.02557770162820816,
-0.16850419342517853,
-0.24060463905334473,
-0.19943884015083313,
0.12486492097377777,
0.13166986405849457,
0.1653929203748703,
0.1222228854894638,
0.39360862970352173,
0.30407223105430603,
-0.18547137081623077,
-0.06359318643808365,
-0.18191543221473694,
0.05489242076873779,
-0.13910187780857086,
-0.0073847174644470215,
-0.014350078999996185,
0.06173361465334892,
-0.10765035450458527,
-0.3901996314525604,
0.043461449444293976,
-0.3487754762172699,
-0.2571062445640564,
0.1572532057762146,
0.22255143523216248,
-0.25055867433547974,
-0.4013534486293793,
-0.40128234028816223,
-0.23195500671863556,
-0.47349458932876587,
0.40632593631744385,
-0.025074275210499763,
0.12163634598255157,
0.4188085198402405,
0.03011161834001541,
0.10689510405063629,
-0.3666156530380249,
0.10071835666894913,
-0.4784908890724182,
-0.2979618012905121,
0.16239714622497559,
-0.2508961260318756,
-0.12095962464809418,
-0.04466330632567406,
-0.09640602767467499,
0.2673756182193756,
0.33454352617263794,
-0.19745256006717682,
0.0018108626827597618,
-0.4214384853839874,
-0.043003372848033905,
0.03909279406070709,
0.1247500479221344,
0.5532547831535339,
0.13906438648700714,
-0.1910768747329712,
-0.1802102029323578,
-0.1579674929380417,
0.28390076756477356,
0.4101511240005493,
0.18071827292442322,
-0.00015529245138168335,
-0.008867237716913223,
0.24470967054367065,
0.6376878619194031,
-0.02674749493598938,
0.23070472478866577,
0.22281180322170258,
0.07092830538749695,
0.3748375177383423,
-0.38684380054473877,
-0.021332476288080215,
0.3736647963523865,
0.12935200333595276,
-0.32588398456573486,
0.14075931906700134,
-0.22247594594955444,
-0.353887677192688,
-0.08056814968585968,
0.23274892568588257,
0.046179234981536865,
-0.18970036506652832,
0.08828191459178925,
-0.03636753559112549,
-0.04941169172525406,
0.18911688029766083,
0.13291433453559875,
-0.19167517125606537,
-0.10989300161600113,
-0.09428048133850098,
-0.1530972570180893,
0.18817755579948425,
-0.18367770314216614,
-0.560934841632843,
-0.27040719985961914,
-0.4111950397491455,
0.3094630837440491,
-0.033186428248882294,
0.6306986212730408,
-0.08604690432548523,
-0.2974001467227936,
0.12290100753307343,
-0.008854091167449951,
0.47431957721710205,
-0.12370473891496658,
0.08453075587749481,
0.27293631434440613,
0.18212813138961792,
-0.13365435600280762,
0.013095967471599579,
-0.3547093868255615,
0.09564713388681412,
-0.28608211874961853,
-0.1827215850353241,
-0.2694426476955414,
-0.08525858074426651,
-0.08303417265415192,
0.00751508679240942,
0.036567334085702896,
0.06909012049436569,
-0.3085596263408661,
0.18194159865379333,
-0.36356648802757263,
0.16438283026218414,
0.15146878361701965,
-0.14729906618595123,
-0.42720285058021545,
0.007822860032320023,
0.057661108672618866,
0.015303481370210648,
-0.04051312804222107,
0.2390468865633011,
0.6286556720733643,
0.04076971858739853,
0.10306614637374878,
0.2285548597574234,
-0.19703170657157898,
0.27198779582977295,
0.3310127854347229,
-0.14187031984329224,
0.22647321224212646,
0.004425192251801491,
-0.12670743465423584,
0.24631652235984802,
0.4111558198928833,
-0.060057736933231354,
0.20251323282718658,
0.048742640763521194,
-0.0015602633357048035,
-0.13604024052619934,
-0.04083903878927231,
0.3589111864566803,
-0.17286522686481476,
0.008310272358357906,
-0.6530938744544983,
0.22205907106399536,
0.35764771699905396,
-0.1815076768398285,
0.72260582447052,
-0.007230967283248901,
-0.11785577237606049,
0.38151246309280396,
-0.09981480985879898,
1.083906650543213,
0.05666008219122887,
0.1469869762659073,
0.1830812394618988,
0.04493103176355362,
0.07916855812072754,
-0.06254731863737106,
0.25747132301330566,
-0.1825033724308014,
-0.519965410232544,
0.1725636124610901,
-0.2586374878883362,
0.15095391869544983,
-0.019749626517295837,
-0.2885986566543579,
0.22321103513240814,
0.08819486200809479,
-0.04522224888205528,
-0.22660396993160248,
0.025286920368671417,
-0.3053610026836395,
-0.05736592784523964,
-0.07781755179166794,
0.14469066262245178,
0.018636558204889297,
0.0033212751150131226,
-0.018823664635419846,
0.011327551677823067,
-0.06923940777778625,
-0.27801379561424255,
-0.09840910136699677,
0.13220584392547607,
-0.22281983494758606,
0.18976648151874542,
-0.29560989141464233,
0.058238282799720764,
0.030688706785440445,
-0.07676352560520172,
-0.11133342981338501,
0.28372055292129517,
-0.07941042631864548,
0.40602314472198486,
0.5098744034767151,
0.22480246424674988,
0.08270510286092758,
0.18294896185398102,
0.23285140097141266,
0.004880499094724655,
-0.1908225417137146,
0.0659310594201088,
-0.1313793808221817,
-0.4533766508102417,
-0.1187153160572052,
0.03023785725235939,
0.21312499046325684,
0.14673283696174622,
-0.38119035959243774,
0.24222151935100555,
-0.37998777627944946,
-0.20486432313919067,
0.17451317608356476,
0.10236608982086182,
-0.12702037394046783,
0.4684290587902069,
0.031604379415512085,
-0.246326744556427,
-0.016755584627389908,
0.464419960975647,
0.03974444791674614,
0.212546706199646,
0.47211793065071106,
-0.13301695883274078,
-0.14375115931034088,
-0.3098313510417938,
-0.30667251348495483,
-0.030711818486452103,
-0.2263917326927185,
0.18333445489406586,
-0.031110739335417747,
-0.30752938985824585,
0.09131144732236862,
0.23059113323688507,
0.11419520527124405,
0.4145868122577667,
-0.14334364235401154,
-0.23667572438716888,
-0.3798679709434509,
0.4347459077835083,
-0.030917640775442123,
0.3997690975666046,
-0.2919093668460846,
0.11684346199035645,
-0.10299456864595413,
0.22209200263023376,
-0.3882456421852112,
0.06218201667070389,
-0.09400021284818649,
0.3419761657714844,
-0.10912643373012543,
-0.12846574187278748,
0.08387807756662369,
-0.19458724558353424,
0.1724511831998825,
0.33112961053848267,
-0.3868032991886139,
-0.2547595202922821,
0.13035258650779724,
0.11556831002235413,
0.07424740493297577,
0.08590877801179886,
-0.11146827042102814,
-0.5825695991516113,
-0.10710462927818298,
-0.2249593883752823,
0.15329471230506897,
0.10116522759199142,
-0.09494349360466003,
0.22923687100410461,
0.4127993881702423,
0.00021447241306304932,
0.3605826497077942,
0.2648468613624573,
-0.20137134194374084,
-0.3913643956184387,
-0.028855986893177032,
-0.02269584685564041,
-0.2145078480243683,
-0.12465712428092957,
-0.08700471371412277,
-0.08552355319261551,
-0.2674269676208496,
0.20914611220359802,
0.008030515164136887,
0.011076532304286957,
-0.22235290706157684,
-0.08928864449262619,
0.4202602207660675,
0.6356110572814941,
-0.04350133240222931,
-0.3844485282897949,
0.3709195554256439,
0.268391877412796,
-0.336907297372818,
-0.17506979405879974,
0.03922600299119949,
0.24604083597660065,
0.20218536257743835,
0.01225191354751587,
-0.10072145611047745,
-0.21542760729789734,
-0.1817190796136856,
0.26787349581718445,
0.22369547188282013,
-0.6251196265220642,
0.21959856152534485,
0.10225550830364227,
0.006535444408655167,
-0.15856477618217468,
0.19507601857185364,
0.23381097614765167,
0.2964688539505005,
0.3898302912712097,
-0.09630876034498215,
0.32890599966049194,
0.46818453073501587,
0.05873808637261391,
0.10872595012187958,
-0.23756740987300873,
0.1286790519952774,
0.5398042798042297,
-0.07868926227092743,
0.28753212094306946,
0.2556872069835663,
0.33708876371383667,
0.06290196627378464,
-0.11886237561702728,
-0.18143945932388306,
-0.05437469109892845,
-0.1782623529434204,
0.03366101160645485,
0.20414945483207703,
-0.2808973491191864,
-0.07449311017990112,
-0.09669345617294312,
-0.06545425951480865,
0.1876656413078308,
0.6637600660324097,
0.11497487127780914,
0.058737292885780334,
-0.353499174118042,
0.21419459581375122,
0.12433265894651413,
0.25563135743141174,
-0.2843034863471985,
0.1898604929447174,
0.13739068806171417,
-0.04328109323978424,
0.3281437158584595,
0.2436446100473404,
0.17750184237957,
0.3849611282348633,
-0.2102644294500351,
0.12738607823848724,
-0.03783441334962845,
-0.12247063964605331,
-0.21184472739696503,
0.3429829478263855,
0.4248507618904114,
-0.1512327790260315,
0.19446980953216553,
0.17756639420986176,
-0.19108593463897705,
-0.02041470631957054,
0.1460636705160141,
0.17082227766513824,
-0.17092283070087433,
0.16959115862846375,
0.1908319592475891,
-0.12842565774917603,
0.03990301862359047,
-0.07298629730939865,
-0.45949670672416687,
0.017556533217430115,
-0.18541041016578674,
-0.2413068562746048,
0.04449206590652466,
-0.04200216755270958,
0.09010781347751617,
-0.09425753355026245,
0.3228239119052887,
0.12172524631023407,
-0.07273668795824051,
-0.1752488911151886,
-0.28536513447761536,
-0.8999336957931519,
0.21285295486450195,
0.06894411891698837,
0.08177501708269119,
-0.140722393989563,
0.41412320733070374,
0.0608888678252697,
-0.2042652666568756,
0.11646656692028046,
-0.07875931262969971,
-0.05352344363927841,
0.22701577842235565,
-0.46811503171920776,
0.10608330368995667,
-0.08315299451351166,
-0.07970990240573883,
0.14059700071811676,
-0.2543371319770813,
0.03372076898813248,
-0.07851244509220123,
0.05575109273195267,
0.053309570997953415,
-0.0191890187561512,
0.02176409214735031,
0.34503939747810364,
0.4877486824989319,
0.015371739864349365,
0.24862833321094513,
-0.11033801734447479,
0.07119668275117874,
-0.27496442198753357,
-0.2630711793899536,
0.04764256253838539,
-0.23432090878486633,
0.1461324840784073,
0.490122526884079,
-0.11514001339673996,
-0.15584854781627655,
-0.23555921018123627,
0.2968493402004242,
-0.24191337823867798,
0.10620120167732239,
-0.30292609333992004,
0.21356458961963654,
0.07514151185750961,
0.38436776399612427,
-0.32152238488197327,
-0.013581663370132446,
-0.07000516355037689,
0.0796150341629982,
-0.2733808755874634,
-0.39396724104881287,
0.789016604423523,
-0.20054581761360168,
-0.23816664516925812,
-0.132788747549057,
0.5532740950584412,
-0.0033603906631469727,
-0.4281306564807892,
-0.3254094421863556,
-0.005857318639755249,
0.10681475698947906,
0.0033219419419765472,
-0.2388474941253662,
0.09156624972820282,
-0.3629474937915802,
0.08317717909812927,
-0.08046741783618927,
0.6088454723358154,
-0.09734451025724411,
-0.2683151960372925,
0.08872899413108826,
-0.24172590672969818
] |
https://github.com/huggingface/datasets/issues/514 | dataset.shuffle(keep_in_memory=True) is never allowed | These are the steps needed to fix this issue:
1. add the following check to `Dataset.shuffle`:
```python
if keep_in_memory and indices_cache_file_name is not None:
raise ValueError("Please use either `keep_in_memory` or `indices_cache_file_name` but not both.")
```
2. set `indices_cache_file_name` to `None` if `keep_in_memory` is True in the call to `select`
3. add a test with `shuffle(keep_in_memory=True)` | As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)`
The commit added the lines
```python
# lines 994-996 in src/nlp/arrow_dataset.py
assert (
not keep_in_memory or cache_file_name is None
), "Please use either `keep_in_memory` or `cache_file_name` but not both."
```
This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check.
I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`. | 55 | dataset.shuffle(keep_in_memory=True) is never allowed
As of commit ef4aac2, the usage of the parameter `keep_in_memory=True` is never possible: `dataset.select(keep_in_memory=True)`
The commit added the lines
```python
# lines 994-996 in src/nlp/arrow_dataset.py
assert (
not keep_in_memory or cache_file_name is None
), "Please use either `keep_in_memory` or `cache_file_name` but not both."
```
This affects both `shuffle()` as `select()` is a sub-routine, and `map()` that has the same check.
I'd love to fix this myself, but unsure what the intention of the assert is given the rest of the logic in the function concerning `ccache_file_name` and `keep_in_memory`.
These are the steps needed to fix this issue:
1. add the following check to `Dataset.shuffle`:
```python
if keep_in_memory and indices_cache_file_name is not None:
raise ValueError("Please use either `keep_in_memory` or `indices_cache_file_name` but not both.")
```
2. set `indices_cache_file_name` to `None` if `keep_in_memory` is True in the call to `select`
3. add a test with `shuffle(keep_in_memory=True)` | [
-0.1556694209575653,
0.08413463830947876,
-0.04676385223865509,
0.18429037928581238,
0.23401691019535065,
-0.020786896347999573,
-0.10741785168647766,
0.3230173885822296,
-0.018350880593061447,
0.3236328959465027,
0.09992798417806625,
0.5789645910263062,
-0.3018130660057068,
-0.4819587171077728,
-0.04291591793298721,
0.18505029380321503,
-0.004113651812076569,
0.11033055186271667,
-0.01857655495405197,
-0.08994405716657639,
-0.3410757780075073,
-0.14676165580749512,
-0.4572557210922241,
-0.18809573352336884,
-0.3184870779514313,
-0.12373324483633041,
-0.031094087287783623,
0.10321543365716934,
-0.26963502168655396,
-0.40075695514678955,
0.036740079522132874,
0.32833898067474365,
-0.43438804149627686,
0.46542373299598694,
-0.00011582372098928317,
-0.23591750860214233,
0.19188016653060913,
-0.07291821390390396,
-0.27985918521881104,
-0.21325339376926422,
-0.43143579363822937,
0.22879338264465332,
-0.07110404968261719,
-0.17764200270175934,
0.17843684554100037,
-0.18617691099643707,
0.03443392366170883,
-0.4506979286670685,
0.24552059173583984,
0.26743629574775696,
0.1690748631954193,
-0.022930435836315155,
0.022425968199968338,
-0.06446083635091782,
0.47401928901672363,
0.14117538928985596,
-0.13641570508480072,
0.19179683923721313,
0.061315566301345825,
-0.1423138976097107,
0.11808282136917114,
0.22689642012119293,
-0.2053503692150116,
0.20100173354148865,
0.18977129459381104,
-0.085871621966362,
-0.1396428942680359,
-0.15592807531356812,
0.3390423357486725,
0.18480810523033142,
0.2738272547721863,
-0.43058663606643677,
-0.22146031260490417,
-0.10013531148433685,
0.04864600673317909,
-0.29213497042655945,
0.32143333554267883,
0.2205873429775238,
-0.011794988997280598,
-0.14191177487373352,
-0.20627142488956451,
-0.10075487196445465,
0.14123892784118652,
-0.09242810308933258,
0.1857709139585495,
0.28129059076309204,
0.06662188470363617,
0.10617034137248993,
0.6212946176528931,
-0.07219248265028,
0.16178452968597412,
-0.03900689259171486,
-0.2674437165260315,
0.3709504008293152,
-0.4205647110939026,
-0.10133571922779083,
0.16376709938049316,
0.06612084805965424,
0.26844969391822815,
0.05846192315220833,
0.29528483748435974,
0.0059215109795331955,
-0.013243751600384712,
0.2061803936958313,
0.14278799295425415,
0.42228758335113525,
-0.03459096699953079,
0.22155384719371796,
0.19765283167362213,
-0.03034319169819355,
-0.1293954998254776,
0.08544542640447617,
-0.06152276694774628,
-0.327399879693985,
0.0209101140499115,
-0.021564923226833344,
0.14178124070167542,
-0.25297173857688904,
-0.11058107763528824,
0.1065259724855423,
-0.18152064085006714,
-0.23460505902767181,
0.07077086716890335,
0.6077759861946106,
0.18997620046138763,
-0.10564828664064407,
0.08326379954814911,
0.08635488152503967,
-0.006465565413236618,
0.1283823698759079,
-0.33717474341392517,
0.11371356248855591,
-0.29214999079704285,
0.09294892847537994,
0.3164753317832947,
0.08951497077941895,
0.3392116129398346,
0.01401397492736578,
-0.05722953379154205,
0.1544799655675888,
0.24193236231803894,
-0.28715863823890686,
0.39701178669929504,
0.25054994225502014,
-0.23356357216835022,
0.037939488887786865,
0.033182427287101746,
0.06899705529212952,
-0.18826612830162048,
0.44970691204071045,
-0.11194542795419693,
-0.26292163133621216,
0.33196547627449036,
0.10203967988491058,
-0.0933554396033287,
-0.014786407351493835,
-0.08277540653944016,
-0.0892680287361145,
0.4732372462749481,
-0.3573334515094757,
0.34106630086898804,
-0.24254505336284637,
-0.010125283151865005,
-0.3315165936946869,
0.08268441259860992,
0.14082485437393188,
-0.20196974277496338,
0.054591819643974304,
-0.26974159479141235,
0.02867467887699604,
0.18413525819778442,
0.4211002588272095,
-0.09233408421278,
-0.35593554377555847,
-0.25104883313179016,
0.0885777473449707,
0.21646419167518616,
-0.12934157252311707,
-0.5195730328559875,
-0.25061681866645813,
-0.10499024391174316,
0.04646959900856018,
0.1581096649169922,
-0.042060863226652145,
-0.08011136204004288,
-0.1215135008096695,
0.5362176895141602,
0.058144062757492065,
0.035168617963790894,
0.10190769284963608,
-0.2528438866138458,
-0.16595952212810516,
0.38420814275741577,
-0.14885714650154114,
-0.24922896921634674,
-0.15521293878555298,
0.07040941715240479,
-0.09620808064937592,
0.37058570981025696,
0.031016210094094276,
-0.053945884108543396,
-0.1286172717809677,
0.46392005681991577,
-0.2876119017601013,
-0.11872091889381409,
-0.07200141251087189,
-0.11026421934366226,
0.2110975980758667,
0.08349219709634781,
-0.15281738340854645,
-0.2069762796163559,
-0.21004974842071533,
-0.05273805558681488,
-0.10622643679380417,
-0.16845007240772247,
-0.3388429582118988,
0.07281692326068878,
0.09473879635334015,
0.12060621380805969,
0.10028718411922455,
-0.10320685803890228,
0.05127976834774017,
-0.4528488218784332,
-0.2236092984676361,
-0.04901920631527901,
0.1744406670331955,
-0.03190866857767105,
-0.18821243941783905,
0.05108734220266342,
0.22556191682815552,
-0.06786554306745529,
0.013223257847130299,
-0.3467015326023102,
0.3960588276386261,
0.18439944088459015,
0.05988340079784393,
0.008963912725448608,
0.13742755353450775,
-0.11062873154878616,
-0.1556587815284729,
0.22223550081253052,
-0.27252885699272156,
0.12397982180118561,
-0.10279509425163269,
-0.09575308114290237,
0.21571560204029083,
-0.31267786026000977,
0.1410861611366272,
0.20128582417964935,
-0.18294928967952728,
0.30145174264907837,
0.1954350769519806,
-0.06286422163248062,
-0.23040510714054108,
0.3284201920032501,
0.17802852392196655,
0.4323950409889221,
0.24314139783382416,
-0.18878644704818726,
-0.0989457294344902,
0.7175685167312622,
0.2590411603450775,
0.12722623348236084,
-0.049576275050640106,
-0.00093068927526474,
-0.24276188015937805,
0.1414569914340973,
0.35598790645599365,
0.5060904622077942,
0.15345118939876556,
0.09043245017528534,
-0.03583751618862152,
-0.015905577689409256,
-0.0524703785777092,
0.3233146071434021,
0.004110775887966156,
0.13704624772071838,
0.09562650322914124,
0.29276707768440247,
-0.19785752892494202,
-0.5565996170043945,
-0.2138047218322754,
0.327609121799469,
0.2413012683391571,
-0.11101056635379791,
-0.20799073576927185,
-0.38995230197906494,
-0.05080223083496094,
-0.10867182910442352,
-0.20092815160751343,
-0.16066953539848328,
-0.08877817541360855,
0.06349952518939972,
0.41492775082588196,
-0.19218310713768005,
0.3812492787837982,
-0.24415642023086548,
0.4096481204032898,
-0.03518325462937355,
-0.23323236405849457,
-0.25338828563690186,
-0.22766588628292084,
0.17620396614074707,
0.08091546595096588,
0.18660901486873627,
0.12663783133029938,
0.3157708942890167,
0.2674100995063782,
-0.21643531322479248,
-0.02358870767056942,
-0.19858506321907043,
0.06805963814258575,
-0.20839841663837433,
0.0189640074968338,
-0.0029690563678741455,
0.05484987422823906,
-0.05575951188802719,
-0.4489419460296631,
0.009217647835612297,
-0.33414119482040405,
-0.1896238476037979,
0.17929896712303162,
0.18097570538520813,
-0.23755985498428345,
-0.4377734363079071,
-0.36179447174072266,
-0.22652235627174377,
-0.4661282002925873,
0.39793461561203003,
-0.07461551576852798,
0.12092889845371246,
0.43373656272888184,
0.028502177447080612,
0.13443748652935028,
-0.33596500754356384,
0.1007237583398819,
-0.48392027616500854,
-0.2789416015148163,
0.14883093535900116,
-0.20030388236045837,
-0.08137418329715729,
-0.02409408614039421,
-0.13056546449661255,
0.2955284118652344,
0.32167547941207886,
-0.1635754406452179,
0.09019997715950012,
-0.42126184701919556,
-0.05974416807293892,
0.0038319751620292664,
0.1032245084643364,
0.5293386578559875,
0.1371327042579651,
-0.1305343061685562,
-0.18326175212860107,
-0.15947522222995758,
0.2713698744773865,
0.4651015102863312,
0.1626076102256775,
0.07754425704479218,
0.027047161012887955,
0.28861626982688904,
0.726141095161438,
-0.004328591749072075,
0.17747750878334045,
0.20899692177772522,
0.08469881862401962,
0.3793800473213196,
-0.30369460582733154,
-0.08094370365142822,
0.35880887508392334,
0.16690514981746674,
-0.33806276321411133,
0.07886377722024918,
-0.2889922857284546,
-0.3414783477783203,
-0.08959859609603882,
0.24631276726722717,
0.035541802644729614,
-0.2344348132610321,
0.11238886415958405,
-0.12917663156986237,
-0.05014965683221817,
0.19256214797496796,
0.10961901396512985,
-0.18186452984809875,
-0.09701786190271378,
-0.07839596271514893,
-0.10910496115684509,
0.24887612462043762,
-0.16873684525489807,
-0.5100258588790894,
-0.35190749168395996,
-0.4348573088645935,
0.3472614586353302,
0.042530275881290436,
0.7235786318778992,
-0.08707565814256668,
-0.19095885753631592,
0.13902616500854492,
0.02148367278277874,
0.5119467973709106,
-0.11017385870218277,
0.09226527810096741,
0.3382747173309326,
0.19441212713718414,
-0.17690052092075348,
0.008462592959403992,
-0.3302248418331146,
0.09876443445682526,
-0.3501279056072235,
-0.2581905424594879,
-0.3169175982475281,
-0.09205932915210724,
-0.09908272325992584,
0.02441743016242981,
0.046562906354665756,
0.14106111228466034,
-0.3369206190109253,
0.20067253708839417,
-0.3550785481929779,
0.19584855437278748,
0.1720314919948578,
-0.1179627999663353,
-0.519358217716217,
0.06796558201313019,
0.03263929486274719,
-0.030619515106081963,
-0.023316025733947754,
0.200605109333992,
0.6243413686752319,
0.0910874679684639,
0.054352667182683945,
0.24068912863731384,
-0.3383335471153259,
0.30510395765304565,
0.3421854078769684,
-0.11527414619922638,
0.24037717282772064,
0.034974440932273865,
-0.07439377158880234,
0.33848699927330017,
0.38637566566467285,
-0.0793457180261612,
0.19562992453575134,
0.07614956796169281,
-0.0457511842250824,
-0.2283858060836792,
-0.054829634726047516,
0.35693591833114624,
-0.18265460431575775,
-0.013656804338097572,
-0.7117164731025696,
0.1910598874092102,
0.4295879602432251,
-0.16943177580833435,
0.762016236782074,
0.08458878844976425,
-0.14651574194431305,
0.31418752670288086,
-0.0914418175816536,
1.123381495475769,
0.07354963570833206,
0.057084642350673676,
0.16415247321128845,
0.0951153039932251,
0.12033255398273468,
-0.029436228796839714,
0.2571879029273987,
-0.12990427017211914,
-0.5475008487701416,
0.17287592589855194,
-0.3215563893318176,
0.19451183080673218,
-0.07914215326309204,
-0.33994564414024353,
0.18456639349460602,
0.04302511364221573,
-0.0700826346874237,
-0.129292294383049,
-0.0048812925815582275,
-0.341394305229187,
-0.04990218207240105,
-0.06205209344625473,
0.08533357083797455,
-0.025392919778823853,
-0.01429712027311325,
-0.028523558750748634,
0.025227151811122894,
-0.08731743693351746,
-0.28601571917533875,
-0.14330065250396729,
0.15625014901161194,
-0.23365385830402374,
0.22634534537792206,
-0.34911277890205383,
0.09470368921756744,
0.12265589833259583,
-0.08125343918800354,
-0.04367672652006149,
0.3304930627346039,
-0.0797242522239685,
0.4153589606285095,
0.4837658703327179,
0.2635824978351593,
0.06817901134490967,
0.2000521421432495,
0.2759765386581421,
0.061772264540195465,
-0.21845105290412903,
0.15476307272911072,
-0.12175999581813812,
-0.4523470401763916,
-0.09845390915870667,
0.05143843963742256,
0.20511355996131897,
0.20649755001068115,
-0.3625485599040985,
0.27388760447502136,
-0.2944808006286621,
-0.19912824034690857,
0.12967531383037567,
0.08793611079454422,
-0.10871687531471252,
0.42436376214027405,
-0.06760571897029877,
-0.29296761751174927,
0.019533587619662285,
0.4942997395992279,
0.02055596560239792,
0.2882489562034607,
0.46831172704696655,
-0.2080651968717575,
-0.09525112807750702,
-0.23226094245910645,
-0.3197248578071594,
-0.06401717662811279,
-0.27103036642074585,
0.15563365817070007,
-0.05419419705867767,
-0.2834203839302063,
0.05436871200799942,
0.2640232741832733,
0.10526619851589203,
0.45765507221221924,
-0.1046142578125,
-0.2692822813987732,
-0.36290600895881653,
0.48573577404022217,
-0.06531287729740143,
0.3857762813568115,
-0.23167487978935242,
0.1824929267168045,
-0.14753514528274536,
0.24001985788345337,
-0.3289719223976135,
0.06325490027666092,
-0.11298022419214249,
0.33256226778030396,
-0.11247177422046661,
-0.11864388734102249,
0.06449901312589645,
-0.25614461302757263,
0.12494608759880066,
0.3637980818748474,
-0.38499125838279724,
-0.18227431178092957,
0.05364420637488365,
0.1509840190410614,
0.12034834921360016,
0.12556231021881104,
-0.11671856045722961,
-0.628027081489563,
-0.058374691754579544,
-0.25069981813430786,
0.16209135949611664,
0.13423782587051392,
-0.08161599934101105,
0.21814224123954773,
0.4588705003261566,
0.022010281682014465,
0.2633123993873596,
0.2713853120803833,
-0.18692994117736816,
-0.43885064125061035,
-0.016148319467902184,
0.007056612521409988,
-0.28242233395576477,
-0.10941389203071594,
-0.16186478734016418,
-0.09228014200925827,
-0.26321661472320557,
0.2173433005809784,
-0.018382906913757324,
0.07153221219778061,
-0.21531005203723907,
-0.11381363868713379,
0.37454527616500854,
0.6320878267288208,
-0.04274028167128563,
-0.32931360602378845,
0.35786646604537964,
0.19218024611473083,
-0.26486730575561523,
-0.14915074408054352,
-0.049533065408468246,
0.26703009009361267,
0.18127727508544922,
0.012995168566703796,
-0.06295368820428848,
-0.2806561589241028,
-0.17696766555309296,
0.2511712312698364,
0.24679651856422424,
-0.6458235383033752,
0.2760411500930786,
0.12873917818069458,
-0.05287531018257141,
-0.20013172924518585,
0.1584470123052597,
0.20092327892780304,
0.34297022223472595,
0.2904971241950989,
-0.1267320215702057,
0.2796640396118164,
0.46638256311416626,
0.014282900840044022,
0.15893423557281494,
-0.2172798067331314,
0.1403207927942276,
0.5603929758071899,
-0.08950667083263397,
0.2576806843280792,
0.24912677705287933,
0.38114261627197266,
0.000374416820704937,
-0.0857781320810318,
-0.16258318722248077,
-0.05545380339026451,
-0.1256392002105713,
0.017422450706362724,
0.2224811613559723,
-0.275259405374527,
-0.05452834814786911,
-0.1592538058757782,
-0.04370790347456932,
0.17796382308006287,
0.6619769334793091,
0.12297099083662033,
0.02547621726989746,
-0.3659687340259552,
0.18351340293884277,
0.21580132842063904,
0.22791174054145813,
-0.31280267238616943,
0.1916302889585495,
0.18080714344978333,
-0.09828639030456543,
0.33117321133613586,
0.2096019685268402,
0.21259619295597076,
0.3336711525917053,
-0.1658751517534256,
0.09798622131347656,
-0.019788648933172226,
-0.10331358015537262,
-0.17400267720222473,
0.3393414318561554,
0.3693632185459137,
-0.19705019891262054,
0.15009361505508423,
0.15298956632614136,
-0.159662663936615,
-0.0888901948928833,
0.15462800860404968,
0.2683482766151428,
-0.18802353739738464,
0.17664101719856262,
0.2177707850933075,
-0.041881345212459564,
0.16302713751792908,
-0.04078153520822525,
-0.43241626024246216,
0.026790931820869446,
-0.2685231566429138,
-0.255992591381073,
0.047159597277641296,
-0.0007349418010562658,
0.0623597577214241,
-0.04244143143296242,
0.2602470815181732,
0.11920027434825897,
-0.09035132080316544,
-0.1868521273136139,
-0.2705383002758026,
-0.8957180380821228,
0.1778915822505951,
0.13950473070144653,
0.11360931396484375,
-0.06217242777347565,
0.373705118894577,
0.04357019439339638,
-0.23384980857372284,
0.07831249386072159,
-0.08321032673120499,
-0.009551497176289558,
0.15537187457084656,
-0.45709705352783203,
0.08716205507516861,
-0.04247205704450607,
-0.1213248074054718,
0.12554460763931274,
-0.2870008647441864,
0.02464202046394348,
-0.08302819728851318,
-0.013931617140769958,
0.047601982951164246,
-0.030793216079473495,
0.047832850366830826,
0.4032895565032959,
0.5056812167167664,
0.030927399173378944,
0.30971890687942505,
-0.10761057585477829,
0.11917734891176224,
-0.28509706258773804,
-0.23982849717140198,
0.07756874710321426,
-0.2764018774032593,
0.11212071776390076,
0.4954315721988678,
-0.16242603957653046,
-0.16193820536136627,
-0.27242305874824524,
0.3309730291366577,
-0.248292475938797,
0.0716046467423439,
-0.4031983017921448,
0.19102473556995392,
-0.04124896228313446,
0.42500069737434387,
-0.3528859317302704,
-0.039024703204631805,
-0.025222554802894592,
0.14562731981277466,
-0.21067816019058228,
-0.37551867961883545,
0.8542885780334473,
-0.21497707068920135,
-0.2519201636314392,
-0.13376064598560333,
0.5605742931365967,
-0.01589198410511017,
-0.41793927550315857,
-0.2639246881008148,
-0.016514308750629425,
0.11373771727085114,
0.02548070065677166,
-0.26029035449028015,
0.06019015610218048,
-0.31678736209869385,
0.15764950215816498,
-0.07978024333715439,
0.6765532493591309,
-0.11327999085187912,
-0.27012819051742554,
0.08136874437332153,
-0.2381286472082138
] |
https://github.com/huggingface/datasets/issues/511 | dataset.shuffle() and select() resets format. Intended? | Hi @vegarab yes feel free to open a discussion here.
This design choice was not very much thought about.
Since `dataset.select()` (like all the method without a trailing underscore) is non-destructive and returns a new dataset it has most of its properties initialized from scratch (except the table and infos).
Thinking about it I don't see a strong reason against transmitting the format from the parent dataset to its newly created child. It's probably what's expected by the user in most cases. What do you think @lhoestq?
By the way, I've been working today on a refactoring of all the samples re-ordering/selection methods (`select`, `sort`, `shuffle`, `shard`, `train_test_split`). The idea is to speed them up by a lot (like, really a lot) by working as much as possible with an indices mapping table instead of doing a deep copy of the full dataset as we've been doing currently. You can give it a look and try it here: https://github.com/huggingface/nlp/pull/513
Feedbacks are very much welcome | Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight?
When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving.
I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset.
The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`.
_I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_
#### How to reproduce:
```python
import nlp
from transformers import T5Tokenizer
tokenizer = T5Tokenizer.from_pretrained("t5-base")
def create_features(batch):
context_encoding = tokenizer.batch_encode_plus(batch["context"])
return {"input_ids": context_encoding["input_ids"]}
dataset = nlp.load_dataset("cosmos_qa", split="train")
dataset = dataset.map(create_features, batched=True)
dataset.set_format(type="torch", columns=["input_ids"])
dataset[0]
# {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])}
dataset = dataset.shuffle()
dataset[0]
# {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]}
``` | 164 | dataset.shuffle() and select() resets format. Intended?
Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight?
When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving.
I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset.
The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`.
_I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_
#### How to reproduce:
```python
import nlp
from transformers import T5Tokenizer
tokenizer = T5Tokenizer.from_pretrained("t5-base")
def create_features(batch):
context_encoding = tokenizer.batch_encode_plus(batch["context"])
return {"input_ids": context_encoding["input_ids"]}
dataset = nlp.load_dataset("cosmos_qa", split="train")
dataset = dataset.map(create_features, batched=True)
dataset.set_format(type="torch", columns=["input_ids"])
dataset[0]
# {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])}
dataset = dataset.shuffle()
dataset[0]
# {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]}
```
Hi @vegarab yes feel free to open a discussion here.
This design choice was not very much thought about.
Since `dataset.select()` (like all the method without a trailing underscore) is non-destructive and returns a new dataset it has most of its properties initialized from scratch (except the table and infos).
Thinking about it I don't see a strong reason against transmitting the format from the parent dataset to its newly created child. It's probably what's expected by the user in most cases. What do you think @lhoestq?
By the way, I've been working today on a refactoring of all the samples re-ordering/selection methods (`select`, `sort`, `shuffle`, `shard`, `train_test_split`). The idea is to speed them up by a lot (like, really a lot) by working as much as possible with an indices mapping table instead of doing a deep copy of the full dataset as we've been doing currently. You can give it a look and try it here: https://github.com/huggingface/nlp/pull/513
Feedbacks are very much welcome | [
-0.13821236789226532,
-0.22472023963928223,
0.02396431565284729,
0.24767377972602844,
0.1281205713748932,
-0.1362016648054123,
0.2032121866941452,
0.08245699107646942,
-0.6032930612564087,
-0.0022735372185707092,
-0.28427135944366455,
0.3227507472038269,
-0.19512398540973663,
0.17383140325546265,
0.13989843428134918,
-0.14475202560424805,
0.11455836147069931,
0.20896700024604797,
-0.04357992857694626,
-0.1156107634305954,
-0.1563793569803238,
-0.2866494357585907,
-0.2859785556793213,
-0.06061689555644989,
-0.4345370829105377,
0.026099354028701782,
0.00500689260661602,
0.14790046215057373,
-0.08020428568124771,
0.07603559643030167,
0.04423215240240097,
0.2561854124069214,
-0.1987258642911911,
0.5789403915405273,
-0.00012897227134089917,
-0.16552983224391937,
0.055399809032678604,
-0.283581018447876,
-0.29249653220176697,
0.05556754022836685,
-0.05953061580657959,
0.2450539469718933,
0.03356803208589554,
-0.17916807532310486,
0.09662721306085587,
-0.37745070457458496,
-0.09206296503543854,
-0.11476945877075195,
0.18904629349708557,
0.15507487952709198,
0.07984384894371033,
0.336845338344574,
-0.24911314249038696,
0.24383895099163055,
0.3745868504047394,
0.5576680898666382,
-0.13131318986415863,
0.20562002062797546,
0.10186757147312164,
0.3548141121864319,
0.4095388650894165,
0.12682212889194489,
-0.2900158762931824,
-0.24198873341083527,
0.28389933705329895,
0.014217130839824677,
-0.24832329154014587,
-0.2783829867839813,
0.16920268535614014,
0.07647660374641418,
0.7366987466812134,
-0.5577980279922485,
-0.11404433101415634,
-0.43056565523147583,
0.16854910552501678,
-0.3902669847011566,
0.07195190340280533,
0.15495969355106354,
0.09294946491718292,
-0.011896546930074692,
-0.41191595792770386,
-0.0944788008928299,
0.13514824211597443,
0.075121209025383,
0.21187937259674072,
0.25102749466896057,
-0.12628214061260223,
0.22148782014846802,
-0.2606825828552246,
0.32793790102005005,
0.24813248217105865,
-0.3805215656757355,
-0.00022528693079948425,
-0.030866973102092743,
-0.18490824103355408,
-0.09451831877231598,
-0.04338059574365616,
0.045278917998075485,
-0.07049153745174408,
0.3731216788291931,
0.525702953338623,
0.2177649736404419,
-0.16844066977500916,
0.11709728837013245,
0.37568455934524536,
0.16489222645759583,
0.15346232056617737,
0.06236796826124191,
0.0424034520983696,
-0.3042166233062744,
0.0391024611890316,
0.011079717427492142,
0.25515809655189514,
-0.04330427572131157,
0.3766874074935913,
-0.03462737798690796,
-0.04035525023937225,
-0.12734927237033844,
-0.02188357338309288,
0.06628663837909698,
-0.28079935908317566,
-0.360956609249115,
-0.14094363152980804,
0.11199598014354706,
0.027599457651376724,
0.3346133828163147,
-0.2615429162979126,
0.20034775137901306,
-0.33646702766418457,
0.06723745167255402,
-0.15362507104873657,
-0.10033755004405975,
-0.23053839802742004,
0.12306006252765656,
0.1779460608959198,
-0.34176334738731384,
0.22913409769535065,
0.08579586446285248,
-0.055318161845207214,
0.04108518362045288,
0.1837371289730072,
-0.37577125430107117,
0.4564967751502991,
0.23024849593639374,
-0.17371195554733276,
0.1937035322189331,
0.05660189315676689,
0.23354361951351166,
-0.25585833191871643,
0.497836172580719,
-0.24115625023841858,
-0.20498761534690857,
0.2311905026435852,
0.0342101976275444,
-0.1543441116809845,
-0.02287045121192932,
-0.20879557728767395,
0.1444379687309265,
0.4477292001247406,
-0.35782745480537415,
0.20716507732868195,
-0.5868688225746155,
-0.22728247940540314,
-0.4626278281211853,
0.028632735833525658,
0.20168748497962952,
-0.3084818720817566,
-0.09988996386528015,
0.5335568189620972,
-0.12908637523651123,
0.22925123572349548,
0.2242172211408615,
-0.3500422239303589,
0.3968574106693268,
-0.15442560613155365,
-0.06339932978153229,
0.5925034284591675,
0.069908007979393,
-0.2872908115386963,
-0.34885090589523315,
-0.07918956875801086,
0.357781320810318,
-0.11156276613473892,
0.15252113342285156,
-0.1749599575996399,
-0.08007092773914337,
0.2018081247806549,
0.11498508602380753,
-0.0569889172911644,
0.11312606185674667,
-0.20521993935108185,
0.0311103705316782,
0.4739534854888916,
0.11602534353733063,
-0.08591507375240326,
-0.009482838213443756,
-0.07618492096662521,
0.1589438021183014,
0.18879953026771545,
-0.029502596706151962,
-0.23515351116657257,
0.049947597086429596,
-0.11331580579280853,
0.18671351671218872,
-0.015464197844266891,
-0.18546757102012634,
-0.22540345788002014,
-0.1526831090450287,
0.17995251715183258,
-0.3040948510169983,
0.35762137174606323,
0.03910893201828003,
0.01064559817314148,
-0.33286818861961365,
-0.45708003640174866,
-0.3931131660938263,
-0.04994454234838486,
0.406502902507782,
0.04904772713780403,
0.11866863071918488,
-0.31953027844429016,
0.06144730746746063,
-0.2063673734664917,
-0.00839924719184637,
-0.41157233715057373,
0.12485305964946747,
0.11709863692522049,
-0.21234288811683655,
-0.3896256685256958,
0.12420833110809326,
-0.12434586137533188,
-0.08578313142061234,
-0.2129509150981903,
0.3616209924221039,
0.14429888129234314,
-0.26476889848709106,
-0.37841957807540894,
0.4010252356529236,
0.12741251289844513,
0.2065179944038391,
0.13458502292633057,
-0.18959929049015045,
0.3265334367752075,
-0.19155874848365784,
-0.2690970301628113,
0.3493041396141052,
-0.6575782895088196,
-0.1802593171596527,
-0.1800181269645691,
-0.6270246505737305,
-0.03936214745044708,
0.24368473887443542,
-0.3853665292263031,
0.04598315805196762,
0.053165484219789505,
0.3270132541656494,
0.19386643171310425,
0.37999042868614197,
-0.570050835609436,
-0.0476527139544487,
0.7285051345825195,
-0.22127217054367065,
0.05534087494015694,
0.05336379259824753,
-0.17174479365348816,
-0.35056620836257935,
-0.18459531664848328,
-0.02032465860247612,
0.7820940613746643,
-0.01536384504288435,
-0.0367373488843441,
0.055393919348716736,
0.0814550369977951,
-0.35191214084625244,
0.09552714228630066,
0.24915027618408203,
0.006955654360353947,
0.44111475348472595,
0.3575187027454376,
0.11176298558712006,
-0.4882294535636902,
0.13027909398078918,
0.16376912593841553,
-0.08035504072904587,
-0.33491793274879456,
0.09440487623214722,
-0.15565459430217743,
0.059632137417793274,
-0.37720441818237305,
-0.025495875626802444,
0.044669270515441895,
-0.05999929457902908,
-0.08116363734006882,
0.04894553869962692,
0.10023017227649689,
-0.06276106834411621,
0.24643290042877197,
0.22445131838321686,
-0.017559610307216644,
-0.3098868131637573,
0.31089961528778076,
-0.07125864177942276,
-0.19934135675430298,
-0.11472716927528381,
0.012394162826240063,
-0.029599826782941818,
0.35437002778053284,
-0.05589175969362259,
-0.20557451248168945,
-0.13918673992156982,
-0.19546160101890564,
0.2927090525627136,
-0.09289810061454773,
-0.0006682630628347397,
0.01936764270067215,
-0.035041168332099915,
0.014271847903728485,
-0.19803734123706818,
0.10207311064004898,
0.11471530795097351,
0.19757308065891266,
0.040813080966472626,
0.17961959540843964,
0.1345440000295639,
-0.1993228942155838,
-0.29128971695899963,
-0.031338684260845184,
0.08816523849964142,
0.2162625640630722,
-0.1674562245607376,
-0.013983391225337982,
0.4659084677696228,
-0.08459055423736572,
-0.14701798558235168,
-0.6666826009750366,
0.107666015625,
-0.36958152055740356,
-0.5208799839019775,
0.12932859361171722,
-0.05557581037282944,
-0.21379680931568146,
-0.2652086317539215,
0.14503900706768036,
-0.05729148909449577,
0.5463924407958984,
-0.23820817470550537,
-0.19538769125938416,
-0.13740898668766022,
-0.0648621991276741,
-0.06913109123706818,
0.41676607728004456,
0.3020017743110657,
0.05715690553188324,
0.19458487629890442,
0.038517214357852936,
-0.04340390861034393,
0.1414676159620285,
0.37477385997772217,
0.07985150814056396,
0.09517420828342438,
0.1910054087638855,
-0.01786436326801777,
0.5995123386383057,
-0.1991274207830429,
-0.16133370995521545,
0.1348060965538025,
0.1795825958251953,
0.38828614354133606,
-0.4722308814525604,
-0.10417819023132324,
0.48221975564956665,
-0.051631003618240356,
-0.09032520651817322,
0.290075421333313,
-0.24376347661018372,
0.015320424921810627,
-0.11817009001970291,
0.15897272527217865,
-0.2877342998981476,
-0.22490541636943817,
0.4279426038265228,
-0.00423276424407959,
0.2148876190185547,
0.09032237529754639,
0.3507173955440521,
-0.10937629640102386,
0.05329851061105728,
-0.15508601069450378,
0.14168155193328857,
0.40430209040641785,
0.0007885368540883064,
-0.5444187521934509,
-0.22122645378112793,
-0.12434855848550797,
0.008922837674617767,
0.11232130974531174,
0.5317485928535461,
0.03066517785191536,
-0.17363601922988892,
0.17700916528701782,
0.2656615674495697,
0.5368555784225464,
-0.08874958008527756,
-0.05829865485429764,
0.17312069237232208,
-0.38767746090888977,
-0.14655442535877228,
-0.31784147024154663,
-0.21313408017158508,
0.06772693991661072,
-0.25107187032699585,
0.26369649171829224,
-0.203009232878685,
-0.014072269201278687,
-0.0744815394282341,
0.4079805910587311,
-0.11855348944664001,
0.03408288210630417,
-0.09524869918823242,
-0.008302748203277588,
-0.1466766595840454,
0.0440278984606266,
-0.1954730898141861,
-0.17438559234142303,
-0.3775612711906433,
0.3725058138370514,
-0.06660948693752289,
0.23096179962158203,
-0.035242512822151184,
-0.13758063316345215,
0.26524317264556885,
0.13893115520477295,
-0.1037345677614212,
0.10864805430173874,
0.06862226128578186,
0.06773604452610016,
0.09913846850395203,
-0.05003960803151131,
-0.021467819809913635,
0.29401713609695435,
-0.3436627686023712,
0.1544419825077057,
0.46938851475715637,
0.06231074780225754,
0.03374941647052765,
-0.42049145698547363,
0.08564146608114243,
-0.23206312954425812,
0.07239318639039993,
0.3479060232639313,
-0.08063223958015442,
-0.29999038577079773,
-1.069737195968628,
0.24514269828796387,
0.18150605261325836,
0.034704312682151794,
0.1759745180606842,
-0.21919803321361542,
-0.04218985140323639,
0.2608635425567627,
0.15438443422317505,
1.0892903804779053,
-0.05072542279958725,
0.521842896938324,
0.32293620705604553,
-0.07319476455450058,
0.3819907009601593,
-0.34161025285720825,
0.11296582221984863,
-0.24471497535705566,
-0.44245895743370056,
0.05314728617668152,
-0.2846354842185974,
-0.007202737033367157,
0.007824346423149109,
-0.1367422342300415,
0.32340654730796814,
-0.2796405255794525,
-0.052400123327970505,
-0.025282593443989754,
0.03405559062957764,
-0.11027701944112778,
-0.09481494128704071,
-0.06336838006973267,
-0.05981922522187233,
-0.19977031648159027,
0.18121714890003204,
-0.07177193462848663,
0.11819393187761307,
-0.11086076498031616,
0.029805168509483337,
-0.04482178017497063,
-0.1666140854358673,
-0.051236800849437714,
0.00928216427564621,
-0.3341158628463745,
-0.615584671497345,
0.2836144268512726,
0.3402099013328552,
0.09963921457529068,
0.1792660802602768,
0.05344180762767792,
0.08369453251361847,
0.24518200755119324,
0.4168071746826172,
-0.00294763152487576,
-0.0521089993417263,
0.42355164885520935,
0.06524872034788132,
0.06779368966817856,
0.2524891197681427,
-0.019039511680603027,
-0.09698279201984406,
-0.8286123275756836,
0.17091290652751923,
0.3791935443878174,
-0.24731265008449554,
-0.4441278874874115,
0.05428255721926689,
-0.0023435279726982117,
0.026549194008111954,
-0.04083532467484474,
0.18201178312301636,
0.1740788221359253,
0.43151164054870605,
-0.2256634384393692,
-0.4154629707336426,
-0.1995777189731598,
0.2852519750595093,
0.2003926932811737,
-0.04522651433944702,
0.4193189740180969,
-0.05192858353257179,
-0.20080451667308807,
-0.052736375480890274,
0.23712369799613953,
-0.09742939472198486,
-0.45427027344703674,
-0.10128815472126007,
-0.08410082757472992,
0.12555445730686188,
-0.019005950540304184,
0.2705135941505432,
-0.2472781389951706,
0.06370837241411209,
-0.2091897428035736,
-0.029178928583860397,
0.1038120836019516,
0.017678916454315186,
0.4277178943157196,
0.34376925230026245,
0.36472633481025696,
0.3129192888736725,
0.015242340043187141,
-0.05648642033338547,
-0.13059070706367493,
0.029776426032185555,
0.32411542534828186,
0.39778000116348267,
0.018363427370786667,
0.006416764110326767,
-0.31310805678367615,
-0.06049332022666931,
-0.11093749105930328,
0.14403468370437622,
-0.11407139897346497,
-0.08748036623001099,
-0.15205682814121246,
0.23002701997756958,
0.07486096024513245,
-0.002526815515011549,
-0.16952744126319885,
-0.1676240861415863,
-0.17427681386470795,
-0.23966434597969055,
0.29760119318962097,
0.2611987292766571,
0.021024320274591446,
0.12576554715633392,
0.43622609972953796,
0.028532367199659348,
0.1622672826051712,
0.190421923995018,
-0.1589655578136444,
-0.26151466369628906,
0.12345468997955322,
0.016478609293699265,
-0.2788671553134918,
-0.05190753564238548,
-0.5990064740180969,
0.14334999024868011,
0.21411430835723877,
0.3800847828388214,
0.012301936745643616,
-0.3274233341217041,
0.33178484439849854,
-0.16787151992321014,
0.40225425362586975,
0.5396654009819031,
0.027557875961065292,
-0.49488842487335205,
0.2594493329524994,
-0.07203145325183868,
0.2253413200378418,
-0.14198264479637146,
-0.03956417366862297,
0.18178802728652954,
-0.11395283043384552,
0.1323445588350296,
-0.15845626592636108,
0.350094735622406,
-0.514656662940979,
-0.09928905963897705,
0.13790546357631683,
-0.16130414605140686,
0.22361794114112854,
0.4979376196861267,
0.046597693115472794,
-0.06681805849075317,
0.1828078031539917,
-0.07711401581764221,
-0.14453187584877014,
0.28081831336021423,
0.7301185131072998,
0.5393791198730469,
0.4825175702571869,
0.03955266624689102,
-0.06726441532373428,
-0.469754695892334,
-0.215525820851326,
0.19769585132598877,
0.03753328323364258,
0.5161764025688171,
0.22811633348464966,
0.04634147509932518,
0.11341941356658936,
-0.0799596980214119,
0.12704603374004364,
0.3366563618183136,
-0.12231991440057755,
-0.04207177832722664,
0.21047049760818481,
-0.39913010597229004,
0.08121201395988464,
0.1484827697277069,
-0.4271036684513092,
0.21039552986621857,
0.10511333495378494,
0.170705646276474,
-0.1856764703989029,
-0.11141791939735413,
0.24262332916259766,
-0.1366683542728424,
0.1284889280796051,
-0.10801951587200165,
-0.05541238188743591,
0.17677706480026245,
0.027132432907819748,
0.18982087075710297,
0.12851445376873016,
-0.05137132480740547,
0.35183465480804443,
-0.14665523171424866,
0.05710466206073761,
-0.10327771306037903,
0.1627274751663208,
0.02708897367119789,
0.09426064044237137,
0.31154105067253113,
-0.30986812710762024,
0.4923085868358612,
0.06184086948633194,
-0.012640136294066906,
-0.12643511593341827,
0.34088557958602905,
0.21790191531181335,
-0.5887758135795593,
-0.027243398129940033,
0.139826238155365,
0.05931036174297333,
0.09648949652910233,
0.10668103396892548,
-0.49069899320602417,
0.03797886520624161,
0.014746999368071556,
0.42936891317367554,
0.1835746467113495,
-0.008561721071600914,
-0.00652290228754282,
0.10725827515125275,
0.4353662133216858,
0.08265496790409088,
-0.15522229671478271,
-0.047448236495256424,
0.025911718606948853,
-0.42849719524383545,
0.05065273120999336,
0.3247934579849243,
0.12122493982315063,
0.24925296008586884,
-0.11007144302129745,
0.2826697826385498,
0.13804996013641357,
-0.17089007794857025,
0.21736904978752136,
-0.0020118728280067444,
0.4330168068408966,
-0.3053794205188751,
-0.08730855584144592,
-0.41097021102905273,
0.1781347543001175,
-0.17096038162708282,
-0.19092902541160583,
0.12010018527507782,
0.10291720181703568,
0.02816978096961975,
-0.20066197216510773,
-0.1350133717060089,
-0.014714299701154232,
0.3194841742515564,
0.21519148349761963,
0.07097280770540237,
0.2752596139907837,
0.014904014766216278,
0.01396816037595272,
-0.13955241441726685,
0.08658929914236069,
-0.008438770659267902,
0.21011784672737122,
-0.21705082058906555,
0.3956201672554016,
-0.1571718007326126,
0.18088304996490479,
-0.3153144121170044,
0.2677328884601593,
-0.1786736696958542,
0.20129667222499847,
-0.29495546221733093,
-0.06183295696973801,
0.32271233201026917,
0.042142074555158615,
0.08046253025531769,
0.5686164498329163,
-0.018174923956394196,
0.2659771144390106,
-0.2791575789451599,
0.29633164405822754,
0.49348247051239014,
0.13304001092910767,
-0.22015748918056488,
-0.21622103452682495,
-0.026843354105949402,
0.13144269585609436,
0.06208423525094986,
-0.309726357460022,
0.005292981863021851,
0.2125549614429474,
-0.23436933755874634,
-0.33160287141799927,
0.205373153090477,
-0.05433420464396477,
-0.26185885071754456,
-0.12505966424942017,
0.5423802137374878,
-0.05477898567914963,
-0.094931960105896,
-0.04365264251828194,
-0.03871092572808266
] |
https://github.com/huggingface/datasets/issues/511 | dataset.shuffle() and select() resets format. Intended? | I think it's ok to keep the format.
If we want to have this behavior for `.map` too we just have to make sure it doesn't keep a column that's been removed. | Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight?
When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving.
I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset.
The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`.
_I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_
#### How to reproduce:
```python
import nlp
from transformers import T5Tokenizer
tokenizer = T5Tokenizer.from_pretrained("t5-base")
def create_features(batch):
context_encoding = tokenizer.batch_encode_plus(batch["context"])
return {"input_ids": context_encoding["input_ids"]}
dataset = nlp.load_dataset("cosmos_qa", split="train")
dataset = dataset.map(create_features, batched=True)
dataset.set_format(type="torch", columns=["input_ids"])
dataset[0]
# {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])}
dataset = dataset.shuffle()
dataset[0]
# {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]}
``` | 32 | dataset.shuffle() and select() resets format. Intended?
Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight?
When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving.
I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset.
The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`.
_I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_
#### How to reproduce:
```python
import nlp
from transformers import T5Tokenizer
tokenizer = T5Tokenizer.from_pretrained("t5-base")
def create_features(batch):
context_encoding = tokenizer.batch_encode_plus(batch["context"])
return {"input_ids": context_encoding["input_ids"]}
dataset = nlp.load_dataset("cosmos_qa", split="train")
dataset = dataset.map(create_features, batched=True)
dataset.set_format(type="torch", columns=["input_ids"])
dataset[0]
# {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])}
dataset = dataset.shuffle()
dataset[0]
# {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]}
```
I think it's ok to keep the format.
If we want to have this behavior for `.map` too we just have to make sure it doesn't keep a column that's been removed. | [
-0.13821236789226532,
-0.22472023963928223,
0.02396431565284729,
0.24767377972602844,
0.1281205713748932,
-0.1362016648054123,
0.2032121866941452,
0.08245699107646942,
-0.6032930612564087,
-0.0022735372185707092,
-0.28427135944366455,
0.3227507472038269,
-0.19512398540973663,
0.17383140325546265,
0.13989843428134918,
-0.14475202560424805,
0.11455836147069931,
0.20896700024604797,
-0.04357992857694626,
-0.1156107634305954,
-0.1563793569803238,
-0.2866494357585907,
-0.2859785556793213,
-0.06061689555644989,
-0.4345370829105377,
0.026099354028701782,
0.00500689260661602,
0.14790046215057373,
-0.08020428568124771,
0.07603559643030167,
0.04423215240240097,
0.2561854124069214,
-0.1987258642911911,
0.5789403915405273,
-0.00012897227134089917,
-0.16552983224391937,
0.055399809032678604,
-0.283581018447876,
-0.29249653220176697,
0.05556754022836685,
-0.05953061580657959,
0.2450539469718933,
0.03356803208589554,
-0.17916807532310486,
0.09662721306085587,
-0.37745070457458496,
-0.09206296503543854,
-0.11476945877075195,
0.18904629349708557,
0.15507487952709198,
0.07984384894371033,
0.336845338344574,
-0.24911314249038696,
0.24383895099163055,
0.3745868504047394,
0.5576680898666382,
-0.13131318986415863,
0.20562002062797546,
0.10186757147312164,
0.3548141121864319,
0.4095388650894165,
0.12682212889194489,
-0.2900158762931824,
-0.24198873341083527,
0.28389933705329895,
0.014217130839824677,
-0.24832329154014587,
-0.2783829867839813,
0.16920268535614014,
0.07647660374641418,
0.7366987466812134,
-0.5577980279922485,
-0.11404433101415634,
-0.43056565523147583,
0.16854910552501678,
-0.3902669847011566,
0.07195190340280533,
0.15495969355106354,
0.09294946491718292,
-0.011896546930074692,
-0.41191595792770386,
-0.0944788008928299,
0.13514824211597443,
0.075121209025383,
0.21187937259674072,
0.25102749466896057,
-0.12628214061260223,
0.22148782014846802,
-0.2606825828552246,
0.32793790102005005,
0.24813248217105865,
-0.3805215656757355,
-0.00022528693079948425,
-0.030866973102092743,
-0.18490824103355408,
-0.09451831877231598,
-0.04338059574365616,
0.045278917998075485,
-0.07049153745174408,
0.3731216788291931,
0.525702953338623,
0.2177649736404419,
-0.16844066977500916,
0.11709728837013245,
0.37568455934524536,
0.16489222645759583,
0.15346232056617737,
0.06236796826124191,
0.0424034520983696,
-0.3042166233062744,
0.0391024611890316,
0.011079717427492142,
0.25515809655189514,
-0.04330427572131157,
0.3766874074935913,
-0.03462737798690796,
-0.04035525023937225,
-0.12734927237033844,
-0.02188357338309288,
0.06628663837909698,
-0.28079935908317566,
-0.360956609249115,
-0.14094363152980804,
0.11199598014354706,
0.027599457651376724,
0.3346133828163147,
-0.2615429162979126,
0.20034775137901306,
-0.33646702766418457,
0.06723745167255402,
-0.15362507104873657,
-0.10033755004405975,
-0.23053839802742004,
0.12306006252765656,
0.1779460608959198,
-0.34176334738731384,
0.22913409769535065,
0.08579586446285248,
-0.055318161845207214,
0.04108518362045288,
0.1837371289730072,
-0.37577125430107117,
0.4564967751502991,
0.23024849593639374,
-0.17371195554733276,
0.1937035322189331,
0.05660189315676689,
0.23354361951351166,
-0.25585833191871643,
0.497836172580719,
-0.24115625023841858,
-0.20498761534690857,
0.2311905026435852,
0.0342101976275444,
-0.1543441116809845,
-0.02287045121192932,
-0.20879557728767395,
0.1444379687309265,
0.4477292001247406,
-0.35782745480537415,
0.20716507732868195,
-0.5868688225746155,
-0.22728247940540314,
-0.4626278281211853,
0.028632735833525658,
0.20168748497962952,
-0.3084818720817566,
-0.09988996386528015,
0.5335568189620972,
-0.12908637523651123,
0.22925123572349548,
0.2242172211408615,
-0.3500422239303589,
0.3968574106693268,
-0.15442560613155365,
-0.06339932978153229,
0.5925034284591675,
0.069908007979393,
-0.2872908115386963,
-0.34885090589523315,
-0.07918956875801086,
0.357781320810318,
-0.11156276613473892,
0.15252113342285156,
-0.1749599575996399,
-0.08007092773914337,
0.2018081247806549,
0.11498508602380753,
-0.0569889172911644,
0.11312606185674667,
-0.20521993935108185,
0.0311103705316782,
0.4739534854888916,
0.11602534353733063,
-0.08591507375240326,
-0.009482838213443756,
-0.07618492096662521,
0.1589438021183014,
0.18879953026771545,
-0.029502596706151962,
-0.23515351116657257,
0.049947597086429596,
-0.11331580579280853,
0.18671351671218872,
-0.015464197844266891,
-0.18546757102012634,
-0.22540345788002014,
-0.1526831090450287,
0.17995251715183258,
-0.3040948510169983,
0.35762137174606323,
0.03910893201828003,
0.01064559817314148,
-0.33286818861961365,
-0.45708003640174866,
-0.3931131660938263,
-0.04994454234838486,
0.406502902507782,
0.04904772713780403,
0.11866863071918488,
-0.31953027844429016,
0.06144730746746063,
-0.2063673734664917,
-0.00839924719184637,
-0.41157233715057373,
0.12485305964946747,
0.11709863692522049,
-0.21234288811683655,
-0.3896256685256958,
0.12420833110809326,
-0.12434586137533188,
-0.08578313142061234,
-0.2129509150981903,
0.3616209924221039,
0.14429888129234314,
-0.26476889848709106,
-0.37841957807540894,
0.4010252356529236,
0.12741251289844513,
0.2065179944038391,
0.13458502292633057,
-0.18959929049015045,
0.3265334367752075,
-0.19155874848365784,
-0.2690970301628113,
0.3493041396141052,
-0.6575782895088196,
-0.1802593171596527,
-0.1800181269645691,
-0.6270246505737305,
-0.03936214745044708,
0.24368473887443542,
-0.3853665292263031,
0.04598315805196762,
0.053165484219789505,
0.3270132541656494,
0.19386643171310425,
0.37999042868614197,
-0.570050835609436,
-0.0476527139544487,
0.7285051345825195,
-0.22127217054367065,
0.05534087494015694,
0.05336379259824753,
-0.17174479365348816,
-0.35056620836257935,
-0.18459531664848328,
-0.02032465860247612,
0.7820940613746643,
-0.01536384504288435,
-0.0367373488843441,
0.055393919348716736,
0.0814550369977951,
-0.35191214084625244,
0.09552714228630066,
0.24915027618408203,
0.006955654360353947,
0.44111475348472595,
0.3575187027454376,
0.11176298558712006,
-0.4882294535636902,
0.13027909398078918,
0.16376912593841553,
-0.08035504072904587,
-0.33491793274879456,
0.09440487623214722,
-0.15565459430217743,
0.059632137417793274,
-0.37720441818237305,
-0.025495875626802444,
0.044669270515441895,
-0.05999929457902908,
-0.08116363734006882,
0.04894553869962692,
0.10023017227649689,
-0.06276106834411621,
0.24643290042877197,
0.22445131838321686,
-0.017559610307216644,
-0.3098868131637573,
0.31089961528778076,
-0.07125864177942276,
-0.19934135675430298,
-0.11472716927528381,
0.012394162826240063,
-0.029599826782941818,
0.35437002778053284,
-0.05589175969362259,
-0.20557451248168945,
-0.13918673992156982,
-0.19546160101890564,
0.2927090525627136,
-0.09289810061454773,
-0.0006682630628347397,
0.01936764270067215,
-0.035041168332099915,
0.014271847903728485,
-0.19803734123706818,
0.10207311064004898,
0.11471530795097351,
0.19757308065891266,
0.040813080966472626,
0.17961959540843964,
0.1345440000295639,
-0.1993228942155838,
-0.29128971695899963,
-0.031338684260845184,
0.08816523849964142,
0.2162625640630722,
-0.1674562245607376,
-0.013983391225337982,
0.4659084677696228,
-0.08459055423736572,
-0.14701798558235168,
-0.6666826009750366,
0.107666015625,
-0.36958152055740356,
-0.5208799839019775,
0.12932859361171722,
-0.05557581037282944,
-0.21379680931568146,
-0.2652086317539215,
0.14503900706768036,
-0.05729148909449577,
0.5463924407958984,
-0.23820817470550537,
-0.19538769125938416,
-0.13740898668766022,
-0.0648621991276741,
-0.06913109123706818,
0.41676607728004456,
0.3020017743110657,
0.05715690553188324,
0.19458487629890442,
0.038517214357852936,
-0.04340390861034393,
0.1414676159620285,
0.37477385997772217,
0.07985150814056396,
0.09517420828342438,
0.1910054087638855,
-0.01786436326801777,
0.5995123386383057,
-0.1991274207830429,
-0.16133370995521545,
0.1348060965538025,
0.1795825958251953,
0.38828614354133606,
-0.4722308814525604,
-0.10417819023132324,
0.48221975564956665,
-0.051631003618240356,
-0.09032520651817322,
0.290075421333313,
-0.24376347661018372,
0.015320424921810627,
-0.11817009001970291,
0.15897272527217865,
-0.2877342998981476,
-0.22490541636943817,
0.4279426038265228,
-0.00423276424407959,
0.2148876190185547,
0.09032237529754639,
0.3507173955440521,
-0.10937629640102386,
0.05329851061105728,
-0.15508601069450378,
0.14168155193328857,
0.40430209040641785,
0.0007885368540883064,
-0.5444187521934509,
-0.22122645378112793,
-0.12434855848550797,
0.008922837674617767,
0.11232130974531174,
0.5317485928535461,
0.03066517785191536,
-0.17363601922988892,
0.17700916528701782,
0.2656615674495697,
0.5368555784225464,
-0.08874958008527756,
-0.05829865485429764,
0.17312069237232208,
-0.38767746090888977,
-0.14655442535877228,
-0.31784147024154663,
-0.21313408017158508,
0.06772693991661072,
-0.25107187032699585,
0.26369649171829224,
-0.203009232878685,
-0.014072269201278687,
-0.0744815394282341,
0.4079805910587311,
-0.11855348944664001,
0.03408288210630417,
-0.09524869918823242,
-0.008302748203277588,
-0.1466766595840454,
0.0440278984606266,
-0.1954730898141861,
-0.17438559234142303,
-0.3775612711906433,
0.3725058138370514,
-0.06660948693752289,
0.23096179962158203,
-0.035242512822151184,
-0.13758063316345215,
0.26524317264556885,
0.13893115520477295,
-0.1037345677614212,
0.10864805430173874,
0.06862226128578186,
0.06773604452610016,
0.09913846850395203,
-0.05003960803151131,
-0.021467819809913635,
0.29401713609695435,
-0.3436627686023712,
0.1544419825077057,
0.46938851475715637,
0.06231074780225754,
0.03374941647052765,
-0.42049145698547363,
0.08564146608114243,
-0.23206312954425812,
0.07239318639039993,
0.3479060232639313,
-0.08063223958015442,
-0.29999038577079773,
-1.069737195968628,
0.24514269828796387,
0.18150605261325836,
0.034704312682151794,
0.1759745180606842,
-0.21919803321361542,
-0.04218985140323639,
0.2608635425567627,
0.15438443422317505,
1.0892903804779053,
-0.05072542279958725,
0.521842896938324,
0.32293620705604553,
-0.07319476455450058,
0.3819907009601593,
-0.34161025285720825,
0.11296582221984863,
-0.24471497535705566,
-0.44245895743370056,
0.05314728617668152,
-0.2846354842185974,
-0.007202737033367157,
0.007824346423149109,
-0.1367422342300415,
0.32340654730796814,
-0.2796405255794525,
-0.052400123327970505,
-0.025282593443989754,
0.03405559062957764,
-0.11027701944112778,
-0.09481494128704071,
-0.06336838006973267,
-0.05981922522187233,
-0.19977031648159027,
0.18121714890003204,
-0.07177193462848663,
0.11819393187761307,
-0.11086076498031616,
0.029805168509483337,
-0.04482178017497063,
-0.1666140854358673,
-0.051236800849437714,
0.00928216427564621,
-0.3341158628463745,
-0.615584671497345,
0.2836144268512726,
0.3402099013328552,
0.09963921457529068,
0.1792660802602768,
0.05344180762767792,
0.08369453251361847,
0.24518200755119324,
0.4168071746826172,
-0.00294763152487576,
-0.0521089993417263,
0.42355164885520935,
0.06524872034788132,
0.06779368966817856,
0.2524891197681427,
-0.019039511680603027,
-0.09698279201984406,
-0.8286123275756836,
0.17091290652751923,
0.3791935443878174,
-0.24731265008449554,
-0.4441278874874115,
0.05428255721926689,
-0.0023435279726982117,
0.026549194008111954,
-0.04083532467484474,
0.18201178312301636,
0.1740788221359253,
0.43151164054870605,
-0.2256634384393692,
-0.4154629707336426,
-0.1995777189731598,
0.2852519750595093,
0.2003926932811737,
-0.04522651433944702,
0.4193189740180969,
-0.05192858353257179,
-0.20080451667308807,
-0.052736375480890274,
0.23712369799613953,
-0.09742939472198486,
-0.45427027344703674,
-0.10128815472126007,
-0.08410082757472992,
0.12555445730686188,
-0.019005950540304184,
0.2705135941505432,
-0.2472781389951706,
0.06370837241411209,
-0.2091897428035736,
-0.029178928583860397,
0.1038120836019516,
0.017678916454315186,
0.4277178943157196,
0.34376925230026245,
0.36472633481025696,
0.3129192888736725,
0.015242340043187141,
-0.05648642033338547,
-0.13059070706367493,
0.029776426032185555,
0.32411542534828186,
0.39778000116348267,
0.018363427370786667,
0.006416764110326767,
-0.31310805678367615,
-0.06049332022666931,
-0.11093749105930328,
0.14403468370437622,
-0.11407139897346497,
-0.08748036623001099,
-0.15205682814121246,
0.23002701997756958,
0.07486096024513245,
-0.002526815515011549,
-0.16952744126319885,
-0.1676240861415863,
-0.17427681386470795,
-0.23966434597969055,
0.29760119318962097,
0.2611987292766571,
0.021024320274591446,
0.12576554715633392,
0.43622609972953796,
0.028532367199659348,
0.1622672826051712,
0.190421923995018,
-0.1589655578136444,
-0.26151466369628906,
0.12345468997955322,
0.016478609293699265,
-0.2788671553134918,
-0.05190753564238548,
-0.5990064740180969,
0.14334999024868011,
0.21411430835723877,
0.3800847828388214,
0.012301936745643616,
-0.3274233341217041,
0.33178484439849854,
-0.16787151992321014,
0.40225425362586975,
0.5396654009819031,
0.027557875961065292,
-0.49488842487335205,
0.2594493329524994,
-0.07203145325183868,
0.2253413200378418,
-0.14198264479637146,
-0.03956417366862297,
0.18178802728652954,
-0.11395283043384552,
0.1323445588350296,
-0.15845626592636108,
0.350094735622406,
-0.514656662940979,
-0.09928905963897705,
0.13790546357631683,
-0.16130414605140686,
0.22361794114112854,
0.4979376196861267,
0.046597693115472794,
-0.06681805849075317,
0.1828078031539917,
-0.07711401581764221,
-0.14453187584877014,
0.28081831336021423,
0.7301185131072998,
0.5393791198730469,
0.4825175702571869,
0.03955266624689102,
-0.06726441532373428,
-0.469754695892334,
-0.215525820851326,
0.19769585132598877,
0.03753328323364258,
0.5161764025688171,
0.22811633348464966,
0.04634147509932518,
0.11341941356658936,
-0.0799596980214119,
0.12704603374004364,
0.3366563618183136,
-0.12231991440057755,
-0.04207177832722664,
0.21047049760818481,
-0.39913010597229004,
0.08121201395988464,
0.1484827697277069,
-0.4271036684513092,
0.21039552986621857,
0.10511333495378494,
0.170705646276474,
-0.1856764703989029,
-0.11141791939735413,
0.24262332916259766,
-0.1366683542728424,
0.1284889280796051,
-0.10801951587200165,
-0.05541238188743591,
0.17677706480026245,
0.027132432907819748,
0.18982087075710297,
0.12851445376873016,
-0.05137132480740547,
0.35183465480804443,
-0.14665523171424866,
0.05710466206073761,
-0.10327771306037903,
0.1627274751663208,
0.02708897367119789,
0.09426064044237137,
0.31154105067253113,
-0.30986812710762024,
0.4923085868358612,
0.06184086948633194,
-0.012640136294066906,
-0.12643511593341827,
0.34088557958602905,
0.21790191531181335,
-0.5887758135795593,
-0.027243398129940033,
0.139826238155365,
0.05931036174297333,
0.09648949652910233,
0.10668103396892548,
-0.49069899320602417,
0.03797886520624161,
0.014746999368071556,
0.42936891317367554,
0.1835746467113495,
-0.008561721071600914,
-0.00652290228754282,
0.10725827515125275,
0.4353662133216858,
0.08265496790409088,
-0.15522229671478271,
-0.047448236495256424,
0.025911718606948853,
-0.42849719524383545,
0.05065273120999336,
0.3247934579849243,
0.12122493982315063,
0.24925296008586884,
-0.11007144302129745,
0.2826697826385498,
0.13804996013641357,
-0.17089007794857025,
0.21736904978752136,
-0.0020118728280067444,
0.4330168068408966,
-0.3053794205188751,
-0.08730855584144592,
-0.41097021102905273,
0.1781347543001175,
-0.17096038162708282,
-0.19092902541160583,
0.12010018527507782,
0.10291720181703568,
0.02816978096961975,
-0.20066197216510773,
-0.1350133717060089,
-0.014714299701154232,
0.3194841742515564,
0.21519148349761963,
0.07097280770540237,
0.2752596139907837,
0.014904014766216278,
0.01396816037595272,
-0.13955241441726685,
0.08658929914236069,
-0.008438770659267902,
0.21011784672737122,
-0.21705082058906555,
0.3956201672554016,
-0.1571718007326126,
0.18088304996490479,
-0.3153144121170044,
0.2677328884601593,
-0.1786736696958542,
0.20129667222499847,
-0.29495546221733093,
-0.06183295696973801,
0.32271233201026917,
0.042142074555158615,
0.08046253025531769,
0.5686164498329163,
-0.018174923956394196,
0.2659771144390106,
-0.2791575789451599,
0.29633164405822754,
0.49348247051239014,
0.13304001092910767,
-0.22015748918056488,
-0.21622103452682495,
-0.026843354105949402,
0.13144269585609436,
0.06208423525094986,
-0.309726357460022,
0.005292981863021851,
0.2125549614429474,
-0.23436933755874634,
-0.33160287141799927,
0.205373153090477,
-0.05433420464396477,
-0.26185885071754456,
-0.12505966424942017,
0.5423802137374878,
-0.05477898567914963,
-0.094931960105896,
-0.04365264251828194,
-0.03871092572808266
] |
https://github.com/huggingface/datasets/issues/511 | dataset.shuffle() and select() resets format. Intended? | Since datasets 1.0.0 the format is not reset anymore.
Closing this one, but feel free to re-open if you have other questions | Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight?
When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving.
I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset.
The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`.
_I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_
#### How to reproduce:
```python
import nlp
from transformers import T5Tokenizer
tokenizer = T5Tokenizer.from_pretrained("t5-base")
def create_features(batch):
context_encoding = tokenizer.batch_encode_plus(batch["context"])
return {"input_ids": context_encoding["input_ids"]}
dataset = nlp.load_dataset("cosmos_qa", split="train")
dataset = dataset.map(create_features, batched=True)
dataset.set_format(type="torch", columns=["input_ids"])
dataset[0]
# {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])}
dataset = dataset.shuffle()
dataset[0]
# {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]}
``` | 22 | dataset.shuffle() and select() resets format. Intended?
Calling `dataset.shuffle()` or `dataset.select()` on a dataset resets its format set by `dataset.set_format()`. Is this intended or an oversight?
When working on quite large datasets that require a lot of preprocessing I find it convenient to save the processed dataset to file using `torch.save("dataset.pt")`. Later loading the dataset object using `torch.load("dataset.pt")`, which conserves the defined format before saving.
I do shuffling and selecting (for controlling dataset size) after loading the data from .pt-file, as it's convenient whenever you train multiple models with varying sizes of the same dataset.
The obvious workaround for this is to set the format again after using `dataset.select()` or `dataset.shuffle()`.
_I guess this is more of a discussion on the design philosophy of the functions. Please let me know if this is not the right channel for these kinds of discussions or if they are not wanted at all!_
#### How to reproduce:
```python
import nlp
from transformers import T5Tokenizer
tokenizer = T5Tokenizer.from_pretrained("t5-base")
def create_features(batch):
context_encoding = tokenizer.batch_encode_plus(batch["context"])
return {"input_ids": context_encoding["input_ids"]}
dataset = nlp.load_dataset("cosmos_qa", split="train")
dataset = dataset.map(create_features, batched=True)
dataset.set_format(type="torch", columns=["input_ids"])
dataset[0]
# {'input_ids': tensor([ 1804, 3525, 1602, ... 0, 0])}
dataset = dataset.shuffle()
dataset[0]
# {'id': '3Q9(...)20', 'context': "Good Old War an (...) play ?', 'answer0': 'None of the above choices .', 'answer1': 'This person likes music and likes to see the show , they will see other bands play .', (...) 'input_ids': [1804, 3525, 1602, ... , 0, 0]}
```
Since datasets 1.0.0 the format is not reset anymore.
Closing this one, but feel free to re-open if you have other questions | [
-0.13821236789226532,
-0.22472023963928223,
0.02396431565284729,
0.24767377972602844,
0.1281205713748932,
-0.1362016648054123,
0.2032121866941452,
0.08245699107646942,
-0.6032930612564087,
-0.0022735372185707092,
-0.28427135944366455,
0.3227507472038269,
-0.19512398540973663,
0.17383140325546265,
0.13989843428134918,
-0.14475202560424805,
0.11455836147069931,
0.20896700024604797,
-0.04357992857694626,
-0.1156107634305954,
-0.1563793569803238,
-0.2866494357585907,
-0.2859785556793213,
-0.06061689555644989,
-0.4345370829105377,
0.026099354028701782,
0.00500689260661602,
0.14790046215057373,
-0.08020428568124771,
0.07603559643030167,
0.04423215240240097,
0.2561854124069214,
-0.1987258642911911,
0.5789403915405273,
-0.00012897227134089917,
-0.16552983224391937,
0.055399809032678604,
-0.283581018447876,
-0.29249653220176697,
0.05556754022836685,
-0.05953061580657959,
0.2450539469718933,
0.03356803208589554,
-0.17916807532310486,
0.09662721306085587,
-0.37745070457458496,
-0.09206296503543854,
-0.11476945877075195,
0.18904629349708557,
0.15507487952709198,
0.07984384894371033,
0.336845338344574,
-0.24911314249038696,
0.24383895099163055,
0.3745868504047394,
0.5576680898666382,
-0.13131318986415863,
0.20562002062797546,
0.10186757147312164,
0.3548141121864319,
0.4095388650894165,
0.12682212889194489,
-0.2900158762931824,
-0.24198873341083527,
0.28389933705329895,
0.014217130839824677,
-0.24832329154014587,
-0.2783829867839813,
0.16920268535614014,
0.07647660374641418,
0.7366987466812134,
-0.5577980279922485,
-0.11404433101415634,
-0.43056565523147583,
0.16854910552501678,
-0.3902669847011566,
0.07195190340280533,
0.15495969355106354,
0.09294946491718292,
-0.011896546930074692,
-0.41191595792770386,
-0.0944788008928299,
0.13514824211597443,
0.075121209025383,
0.21187937259674072,
0.25102749466896057,
-0.12628214061260223,
0.22148782014846802,
-0.2606825828552246,
0.32793790102005005,
0.24813248217105865,
-0.3805215656757355,
-0.00022528693079948425,
-0.030866973102092743,
-0.18490824103355408,
-0.09451831877231598,
-0.04338059574365616,
0.045278917998075485,
-0.07049153745174408,
0.3731216788291931,
0.525702953338623,
0.2177649736404419,
-0.16844066977500916,
0.11709728837013245,
0.37568455934524536,
0.16489222645759583,
0.15346232056617737,
0.06236796826124191,
0.0424034520983696,
-0.3042166233062744,
0.0391024611890316,
0.011079717427492142,
0.25515809655189514,
-0.04330427572131157,
0.3766874074935913,
-0.03462737798690796,
-0.04035525023937225,
-0.12734927237033844,
-0.02188357338309288,
0.06628663837909698,
-0.28079935908317566,
-0.360956609249115,
-0.14094363152980804,
0.11199598014354706,
0.027599457651376724,
0.3346133828163147,
-0.2615429162979126,
0.20034775137901306,
-0.33646702766418457,
0.06723745167255402,
-0.15362507104873657,
-0.10033755004405975,
-0.23053839802742004,
0.12306006252765656,
0.1779460608959198,
-0.34176334738731384,
0.22913409769535065,
0.08579586446285248,
-0.055318161845207214,
0.04108518362045288,
0.1837371289730072,
-0.37577125430107117,
0.4564967751502991,
0.23024849593639374,
-0.17371195554733276,
0.1937035322189331,
0.05660189315676689,
0.23354361951351166,
-0.25585833191871643,
0.497836172580719,
-0.24115625023841858,
-0.20498761534690857,
0.2311905026435852,
0.0342101976275444,
-0.1543441116809845,
-0.02287045121192932,
-0.20879557728767395,
0.1444379687309265,
0.4477292001247406,
-0.35782745480537415,
0.20716507732868195,
-0.5868688225746155,
-0.22728247940540314,
-0.4626278281211853,
0.028632735833525658,
0.20168748497962952,
-0.3084818720817566,
-0.09988996386528015,
0.5335568189620972,
-0.12908637523651123,
0.22925123572349548,
0.2242172211408615,
-0.3500422239303589,
0.3968574106693268,
-0.15442560613155365,
-0.06339932978153229,
0.5925034284591675,
0.069908007979393,
-0.2872908115386963,
-0.34885090589523315,
-0.07918956875801086,
0.357781320810318,
-0.11156276613473892,
0.15252113342285156,
-0.1749599575996399,
-0.08007092773914337,
0.2018081247806549,
0.11498508602380753,
-0.0569889172911644,
0.11312606185674667,
-0.20521993935108185,
0.0311103705316782,
0.4739534854888916,
0.11602534353733063,
-0.08591507375240326,
-0.009482838213443756,
-0.07618492096662521,
0.1589438021183014,
0.18879953026771545,
-0.029502596706151962,
-0.23515351116657257,
0.049947597086429596,
-0.11331580579280853,
0.18671351671218872,
-0.015464197844266891,
-0.18546757102012634,
-0.22540345788002014,
-0.1526831090450287,
0.17995251715183258,
-0.3040948510169983,
0.35762137174606323,
0.03910893201828003,
0.01064559817314148,
-0.33286818861961365,
-0.45708003640174866,
-0.3931131660938263,
-0.04994454234838486,
0.406502902507782,
0.04904772713780403,
0.11866863071918488,
-0.31953027844429016,
0.06144730746746063,
-0.2063673734664917,
-0.00839924719184637,
-0.41157233715057373,
0.12485305964946747,
0.11709863692522049,
-0.21234288811683655,
-0.3896256685256958,
0.12420833110809326,
-0.12434586137533188,
-0.08578313142061234,
-0.2129509150981903,
0.3616209924221039,
0.14429888129234314,
-0.26476889848709106,
-0.37841957807540894,
0.4010252356529236,
0.12741251289844513,
0.2065179944038391,
0.13458502292633057,
-0.18959929049015045,
0.3265334367752075,
-0.19155874848365784,
-0.2690970301628113,
0.3493041396141052,
-0.6575782895088196,
-0.1802593171596527,
-0.1800181269645691,
-0.6270246505737305,
-0.03936214745044708,
0.24368473887443542,
-0.3853665292263031,
0.04598315805196762,
0.053165484219789505,
0.3270132541656494,
0.19386643171310425,
0.37999042868614197,
-0.570050835609436,
-0.0476527139544487,
0.7285051345825195,
-0.22127217054367065,
0.05534087494015694,
0.05336379259824753,
-0.17174479365348816,
-0.35056620836257935,
-0.18459531664848328,
-0.02032465860247612,
0.7820940613746643,
-0.01536384504288435,
-0.0367373488843441,
0.055393919348716736,
0.0814550369977951,
-0.35191214084625244,
0.09552714228630066,
0.24915027618408203,
0.006955654360353947,
0.44111475348472595,
0.3575187027454376,
0.11176298558712006,
-0.4882294535636902,
0.13027909398078918,
0.16376912593841553,
-0.08035504072904587,
-0.33491793274879456,
0.09440487623214722,
-0.15565459430217743,
0.059632137417793274,
-0.37720441818237305,
-0.025495875626802444,
0.044669270515441895,
-0.05999929457902908,
-0.08116363734006882,
0.04894553869962692,
0.10023017227649689,
-0.06276106834411621,
0.24643290042877197,
0.22445131838321686,
-0.017559610307216644,
-0.3098868131637573,
0.31089961528778076,
-0.07125864177942276,
-0.19934135675430298,
-0.11472716927528381,
0.012394162826240063,
-0.029599826782941818,
0.35437002778053284,
-0.05589175969362259,
-0.20557451248168945,
-0.13918673992156982,
-0.19546160101890564,
0.2927090525627136,
-0.09289810061454773,
-0.0006682630628347397,
0.01936764270067215,
-0.035041168332099915,
0.014271847903728485,
-0.19803734123706818,
0.10207311064004898,
0.11471530795097351,
0.19757308065891266,
0.040813080966472626,
0.17961959540843964,
0.1345440000295639,
-0.1993228942155838,
-0.29128971695899963,
-0.031338684260845184,
0.08816523849964142,
0.2162625640630722,
-0.1674562245607376,
-0.013983391225337982,
0.4659084677696228,
-0.08459055423736572,
-0.14701798558235168,
-0.6666826009750366,
0.107666015625,
-0.36958152055740356,
-0.5208799839019775,
0.12932859361171722,
-0.05557581037282944,
-0.21379680931568146,
-0.2652086317539215,
0.14503900706768036,
-0.05729148909449577,
0.5463924407958984,
-0.23820817470550537,
-0.19538769125938416,
-0.13740898668766022,
-0.0648621991276741,
-0.06913109123706818,
0.41676607728004456,
0.3020017743110657,
0.05715690553188324,
0.19458487629890442,
0.038517214357852936,
-0.04340390861034393,
0.1414676159620285,
0.37477385997772217,
0.07985150814056396,
0.09517420828342438,
0.1910054087638855,
-0.01786436326801777,
0.5995123386383057,
-0.1991274207830429,
-0.16133370995521545,
0.1348060965538025,
0.1795825958251953,
0.38828614354133606,
-0.4722308814525604,
-0.10417819023132324,
0.48221975564956665,
-0.051631003618240356,
-0.09032520651817322,
0.290075421333313,
-0.24376347661018372,
0.015320424921810627,
-0.11817009001970291,
0.15897272527217865,
-0.2877342998981476,
-0.22490541636943817,
0.4279426038265228,
-0.00423276424407959,
0.2148876190185547,
0.09032237529754639,
0.3507173955440521,
-0.10937629640102386,
0.05329851061105728,
-0.15508601069450378,
0.14168155193328857,
0.40430209040641785,
0.0007885368540883064,
-0.5444187521934509,
-0.22122645378112793,
-0.12434855848550797,
0.008922837674617767,
0.11232130974531174,
0.5317485928535461,
0.03066517785191536,
-0.17363601922988892,
0.17700916528701782,
0.2656615674495697,
0.5368555784225464,
-0.08874958008527756,
-0.05829865485429764,
0.17312069237232208,
-0.38767746090888977,
-0.14655442535877228,
-0.31784147024154663,
-0.21313408017158508,
0.06772693991661072,
-0.25107187032699585,
0.26369649171829224,
-0.203009232878685,
-0.014072269201278687,
-0.0744815394282341,
0.4079805910587311,
-0.11855348944664001,
0.03408288210630417,
-0.09524869918823242,
-0.008302748203277588,
-0.1466766595840454,
0.0440278984606266,
-0.1954730898141861,
-0.17438559234142303,
-0.3775612711906433,
0.3725058138370514,
-0.06660948693752289,
0.23096179962158203,
-0.035242512822151184,
-0.13758063316345215,
0.26524317264556885,
0.13893115520477295,
-0.1037345677614212,
0.10864805430173874,
0.06862226128578186,
0.06773604452610016,
0.09913846850395203,
-0.05003960803151131,
-0.021467819809913635,
0.29401713609695435,
-0.3436627686023712,
0.1544419825077057,
0.46938851475715637,
0.06231074780225754,
0.03374941647052765,
-0.42049145698547363,
0.08564146608114243,
-0.23206312954425812,
0.07239318639039993,
0.3479060232639313,
-0.08063223958015442,
-0.29999038577079773,
-1.069737195968628,
0.24514269828796387,
0.18150605261325836,
0.034704312682151794,
0.1759745180606842,
-0.21919803321361542,
-0.04218985140323639,
0.2608635425567627,
0.15438443422317505,
1.0892903804779053,
-0.05072542279958725,
0.521842896938324,
0.32293620705604553,
-0.07319476455450058,
0.3819907009601593,
-0.34161025285720825,
0.11296582221984863,
-0.24471497535705566,
-0.44245895743370056,
0.05314728617668152,
-0.2846354842185974,
-0.007202737033367157,
0.007824346423149109,
-0.1367422342300415,
0.32340654730796814,
-0.2796405255794525,
-0.052400123327970505,
-0.025282593443989754,
0.03405559062957764,
-0.11027701944112778,
-0.09481494128704071,
-0.06336838006973267,
-0.05981922522187233,
-0.19977031648159027,
0.18121714890003204,
-0.07177193462848663,
0.11819393187761307,
-0.11086076498031616,
0.029805168509483337,
-0.04482178017497063,
-0.1666140854358673,
-0.051236800849437714,
0.00928216427564621,
-0.3341158628463745,
-0.615584671497345,
0.2836144268512726,
0.3402099013328552,
0.09963921457529068,
0.1792660802602768,
0.05344180762767792,
0.08369453251361847,
0.24518200755119324,
0.4168071746826172,
-0.00294763152487576,
-0.0521089993417263,
0.42355164885520935,
0.06524872034788132,
0.06779368966817856,
0.2524891197681427,
-0.019039511680603027,
-0.09698279201984406,
-0.8286123275756836,
0.17091290652751923,
0.3791935443878174,
-0.24731265008449554,
-0.4441278874874115,
0.05428255721926689,
-0.0023435279726982117,
0.026549194008111954,
-0.04083532467484474,
0.18201178312301636,
0.1740788221359253,
0.43151164054870605,
-0.2256634384393692,
-0.4154629707336426,
-0.1995777189731598,
0.2852519750595093,
0.2003926932811737,
-0.04522651433944702,
0.4193189740180969,
-0.05192858353257179,
-0.20080451667308807,
-0.052736375480890274,
0.23712369799613953,
-0.09742939472198486,
-0.45427027344703674,
-0.10128815472126007,
-0.08410082757472992,
0.12555445730686188,
-0.019005950540304184,
0.2705135941505432,
-0.2472781389951706,
0.06370837241411209,
-0.2091897428035736,
-0.029178928583860397,
0.1038120836019516,
0.017678916454315186,
0.4277178943157196,
0.34376925230026245,
0.36472633481025696,
0.3129192888736725,
0.015242340043187141,
-0.05648642033338547,
-0.13059070706367493,
0.029776426032185555,
0.32411542534828186,
0.39778000116348267,
0.018363427370786667,
0.006416764110326767,
-0.31310805678367615,
-0.06049332022666931,
-0.11093749105930328,
0.14403468370437622,
-0.11407139897346497,
-0.08748036623001099,
-0.15205682814121246,
0.23002701997756958,
0.07486096024513245,
-0.002526815515011549,
-0.16952744126319885,
-0.1676240861415863,
-0.17427681386470795,
-0.23966434597969055,
0.29760119318962097,
0.2611987292766571,
0.021024320274591446,
0.12576554715633392,
0.43622609972953796,
0.028532367199659348,
0.1622672826051712,
0.190421923995018,
-0.1589655578136444,
-0.26151466369628906,
0.12345468997955322,
0.016478609293699265,
-0.2788671553134918,
-0.05190753564238548,
-0.5990064740180969,
0.14334999024868011,
0.21411430835723877,
0.3800847828388214,
0.012301936745643616,
-0.3274233341217041,
0.33178484439849854,
-0.16787151992321014,
0.40225425362586975,
0.5396654009819031,
0.027557875961065292,
-0.49488842487335205,
0.2594493329524994,
-0.07203145325183868,
0.2253413200378418,
-0.14198264479637146,
-0.03956417366862297,
0.18178802728652954,
-0.11395283043384552,
0.1323445588350296,
-0.15845626592636108,
0.350094735622406,
-0.514656662940979,
-0.09928905963897705,
0.13790546357631683,
-0.16130414605140686,
0.22361794114112854,
0.4979376196861267,
0.046597693115472794,
-0.06681805849075317,
0.1828078031539917,
-0.07711401581764221,
-0.14453187584877014,
0.28081831336021423,
0.7301185131072998,
0.5393791198730469,
0.4825175702571869,
0.03955266624689102,
-0.06726441532373428,
-0.469754695892334,
-0.215525820851326,
0.19769585132598877,
0.03753328323364258,
0.5161764025688171,
0.22811633348464966,
0.04634147509932518,
0.11341941356658936,
-0.0799596980214119,
0.12704603374004364,
0.3366563618183136,
-0.12231991440057755,
-0.04207177832722664,
0.21047049760818481,
-0.39913010597229004,
0.08121201395988464,
0.1484827697277069,
-0.4271036684513092,
0.21039552986621857,
0.10511333495378494,
0.170705646276474,
-0.1856764703989029,
-0.11141791939735413,
0.24262332916259766,
-0.1366683542728424,
0.1284889280796051,
-0.10801951587200165,
-0.05541238188743591,
0.17677706480026245,
0.027132432907819748,
0.18982087075710297,
0.12851445376873016,
-0.05137132480740547,
0.35183465480804443,
-0.14665523171424866,
0.05710466206073761,
-0.10327771306037903,
0.1627274751663208,
0.02708897367119789,
0.09426064044237137,
0.31154105067253113,
-0.30986812710762024,
0.4923085868358612,
0.06184086948633194,
-0.012640136294066906,
-0.12643511593341827,
0.34088557958602905,
0.21790191531181335,
-0.5887758135795593,
-0.027243398129940033,
0.139826238155365,
0.05931036174297333,
0.09648949652910233,
0.10668103396892548,
-0.49069899320602417,
0.03797886520624161,
0.014746999368071556,
0.42936891317367554,
0.1835746467113495,
-0.008561721071600914,
-0.00652290228754282,
0.10725827515125275,
0.4353662133216858,
0.08265496790409088,
-0.15522229671478271,
-0.047448236495256424,
0.025911718606948853,
-0.42849719524383545,
0.05065273120999336,
0.3247934579849243,
0.12122493982315063,
0.24925296008586884,
-0.11007144302129745,
0.2826697826385498,
0.13804996013641357,
-0.17089007794857025,
0.21736904978752136,
-0.0020118728280067444,
0.4330168068408966,
-0.3053794205188751,
-0.08730855584144592,
-0.41097021102905273,
0.1781347543001175,
-0.17096038162708282,
-0.19092902541160583,
0.12010018527507782,
0.10291720181703568,
0.02816978096961975,
-0.20066197216510773,
-0.1350133717060089,
-0.014714299701154232,
0.3194841742515564,
0.21519148349761963,
0.07097280770540237,
0.2752596139907837,
0.014904014766216278,
0.01396816037595272,
-0.13955241441726685,
0.08658929914236069,
-0.008438770659267902,
0.21011784672737122,
-0.21705082058906555,
0.3956201672554016,
-0.1571718007326126,
0.18088304996490479,
-0.3153144121170044,
0.2677328884601593,
-0.1786736696958542,
0.20129667222499847,
-0.29495546221733093,
-0.06183295696973801,
0.32271233201026917,
0.042142074555158615,
0.08046253025531769,
0.5686164498329163,
-0.018174923956394196,
0.2659771144390106,
-0.2791575789451599,
0.29633164405822754,
0.49348247051239014,
0.13304001092910767,
-0.22015748918056488,
-0.21622103452682495,
-0.026843354105949402,
0.13144269585609436,
0.06208423525094986,
-0.309726357460022,
0.005292981863021851,
0.2125549614429474,
-0.23436933755874634,
-0.33160287141799927,
0.205373153090477,
-0.05433420464396477,
-0.26185885071754456,
-0.12505966424942017,
0.5423802137374878,
-0.05477898567914963,
-0.094931960105896,
-0.04365264251828194,
-0.03871092572808266
] |
https://github.com/huggingface/datasets/issues/509 | Converting TensorFlow dataset example | Do you want to convert a dataset script to the tfds format ?
If so, we currently have a comversion script nlp/commands/convert.py but it is a conversion script that goes from tfds to nlp.
I think it shouldn't be too hard to do the changes in reverse (at some manual adjustments).
If you manage to make it work in reverse, feel free to open a PR to share it with the community :) | Hi,
I want to use TensorFlow datasets with this repo, I noticed you made some conversion script,
can you give a simple example of using it?
Thanks
| 73 | Converting TensorFlow dataset example
Hi,
I want to use TensorFlow datasets with this repo, I noticed you made some conversion script,
can you give a simple example of using it?
Thanks
Do you want to convert a dataset script to the tfds format ?
If so, we currently have a comversion script nlp/commands/convert.py but it is a conversion script that goes from tfds to nlp.
I think it shouldn't be too hard to do the changes in reverse (at some manual adjustments).
If you manage to make it work in reverse, feel free to open a PR to share it with the community :) | [
-0.13549047708511353,
-0.05655335634946823,
-0.10985840857028961,
-0.19693289697170258,
0.1657164990901947,
0.09159808605909348,
0.33403852581977844,
0.4940682053565979,
-0.14726471900939941,
0.13998377323150635,
0.030208343639969826,
0.34261050820350647,
0.019534092396497726,
0.3617256283760071,
0.33801332116127014,
-0.3144354224205017,
0.050477202981710434,
0.2795867323875427,
-0.33027657866477966,
-0.11373413354158401,
-0.03580698370933533,
0.10837344825267792,
-0.11152671277523041,
0.06859342008829117,
0.1368517428636551,
-0.03016875497996807,
-0.08500500023365021,
0.2507575750350952,
0.12261991947889328,
0.04226735979318619,
0.1680339127779007,
0.15605992078781128,
0.3117431700229645,
0.7285927534103394,
-0.00010577813372947276,
-0.0028072521090507507,
0.07530444115400314,
-0.09469402581453323,
-0.07483506202697754,
-0.33863431215286255,
-0.15522968769073486,
-0.21834293007850647,
0.009097566828131676,
-0.3499975800514221,
-0.22641712427139282,
0.08124864846467972,
0.11513066291809082,
-0.14078401029109955,
0.5385847091674805,
0.526094377040863,
0.2700381875038147,
0.19336073100566864,
-0.06913698464632034,
0.10159879177808762,
0.06658507138490677,
0.1731279045343399,
-0.20120154321193695,
0.044669486582279205,
0.3796444535255432,
-0.19142726063728333,
0.27587661147117615,
0.2336083948612213,
-0.08742203563451767,
-0.15432272851467133,
0.31593945622444153,
0.04815660044550896,
0.13110564649105072,
-0.47176381945610046,
0.008744128048419952,
0.5226517915725708,
0.5459261536598206,
-0.43986576795578003,
-0.09455396234989166,
-0.13905413448810577,
0.05455976352095604,
-0.3348768949508667,
-0.4834911823272705,
0.11210830509662628,
-0.13929243385791779,
0.2684396505355835,
-0.5411633253097534,
-0.22165757417678833,
-0.40270328521728516,
0.10949002206325531,
-0.08126551657915115,
0.09304764866828918,
0.02701108530163765,
0.02008795365691185,
-0.0979301929473877,
-0.2529070973396301,
0.07444342970848083,
-0.00016507692635059357,
0.2594025433063507,
0.12889505922794342,
-0.1298975646495819,
-0.32379472255706787,
-0.043823741376399994,
-0.4010469913482666,
0.09472780674695969,
0.0584128238260746,
-0.052355214953422546,
0.24258139729499817,
-0.31224310398101807,
0.1642352044582367,
-0.18624736368656158,
0.2841513156890869,
0.18871203064918518,
0.2639869153499603,
0.18265973031520844,
-0.24707286059856415,
0.031128372997045517,
0.18996188044548035,
-0.2797745168209076,
-0.10542061179876328,
-0.18553145229816437,
-0.0917770117521286,
0.3033266067504883,
-0.1337185651063919,
-0.13321051001548767,
-0.201002299785614,
-0.03396213799715042,
-0.08617561310529709,
-0.127531960606575,
0.25545674562454224,
-0.03433411568403244,
0.09717310220003128,
0.21320827305316925,
0.24638020992279053,
0.007652357220649719,
0.013232304714620113,
-0.08993282169103622,
0.1835041642189026,
-0.2858376204967499,
-0.19595521688461304,
0.05372852459549904,
0.10416194796562195,
0.09442615509033203,
-0.17557835578918457,
0.034999437630176544,
0.30557847023010254,
0.3406423032283783,
0.3691463768482208,
0.18239367008209229,
0.0859626904129982,
0.1540002077817917,
-0.07963137328624725,
0.23770558834075928,
-0.18919682502746582,
-0.3463331460952759,
0.35551488399505615,
-0.3057294189929962,
-0.12361115217208862,
-0.14176598191261292,
0.23520687222480774,
-0.2167695313692093,
-0.47020068764686584,
-0.21256855130195618,
0.4416572153568268,
0.009898796677589417,
0.00003668665885925293,
0.1393333524465561,
-0.2634066939353943,
-0.29796135425567627,
-0.2006850242614746,
0.06359720975160599,
0.2533062696456909,
-0.6270143985748291,
0.00872078537940979,
0.0280473530292511,
-0.32413285970687866,
0.23539534211158752,
0.04729051887989044,
-0.04203952103853226,
0.124158576130867,
0.1520133912563324,
-0.032176755368709564,
0.8314971923828125,
-0.4936860203742981,
0.07055944204330444,
0.37508681416511536,
-0.18233904242515564,
-0.14545421302318573,
-0.13489103317260742,
0.047249022871255875,
0.1545654833316803,
-0.16713915765285492,
-0.2246343195438385,
0.4862651228904724,
-0.3266904354095459,
0.26097801327705383,
-0.008849088102579117,
-0.18779318034648895,
0.3314783573150635,
0.1990189105272293,
0.05730948969721794,
0.22330749034881592,
-0.059054963290691376,
0.061401113867759705,
0.3003414571285248,
-0.3258719742298126,
0.04792005568742752,
-0.05983390659093857,
0.10436736047267914,
-0.01287689059972763,
0.1901647001504898,
-0.21964213252067566,
-0.3102649748325348,
0.05122528225183487,
0.06176071614027023,
0.1311338096857071,
0.24256275594234467,
-0.11073482781648636,
-0.2938147485256195,
-0.16321419179439545,
0.10981911420822144,
0.04963420331478119,
0.19782768189907074,
-0.21809032559394836,
0.08118584752082825,
-0.1274270862340927,
-0.43163353204727173,
-0.038288116455078125,
-0.09734729677438736,
0.03611766919493675,
-0.19630196690559387,
0.36468422412872314,
0.1487559825181961,
-0.12141165137290955,
-0.010746382176876068,
0.2152692973613739,
-0.08536162227392197,
-0.5249536633491516,
-0.04513566568493843,
0.36029261350631714,
-0.24170097708702087,
0.3648475408554077,
0.25041934847831726,
0.31318265199661255,
0.26917436718940735,
-0.168970987200737,
0.2763988971710205,
0.1496816873550415,
-0.08017946034669876,
-0.09266109764575958,
-0.393779993057251,
0.4031625986099243,
0.003223266452550888,
0.24615120887756348,
0.09370318055152893,
0.1271243393421173,
0.30302000045776367,
-0.34689441323280334,
-0.23693107068538666,
0.03712303936481476,
0.08326460421085358,
-0.051113907247781754,
-0.29279911518096924,
-0.18211384117603302,
-0.4421226680278778,
0.44925710558891296,
0.46579089760780334,
-0.4190252423286438,
-0.015198826789855957,
0.3167184591293335,
-0.08550596982240677,
-0.01366184838116169,
0.10806842893362045,
0.25863519310951233,
0.021683715283870697,
0.11258409172296524,
0.019919954240322113,
0.2573533356189728,
-0.1341620534658432,
-0.08741794526576996,
0.1846424639225006,
-0.05756174027919769,
0.4302837550640106,
-0.2699303925037384,
0.018453380092978477,
0.037207622081041336,
0.047573111951351166,
-0.2376662641763687,
0.04297672212123871,
0.3551797866821289,
-0.1561986356973648,
0.19300730526447296,
-0.4067862629890442,
-0.4654596745967865,
-0.2318648248910904,
0.03950926288962364,
0.25292837619781494,
-0.12535513937473297,
0.0527370348572731,
0.02139376290142536,
-0.04926038533449173,
0.1367941051721573,
0.22641000151634216,
0.23789438605308533,
0.10300742089748383,
0.09969533979892731,
-0.2383306324481964,
-0.27148303389549255,
-0.3784898817539215,
0.22523188591003418,
0.3144751787185669,
0.12465165555477142,
0.39251992106437683,
-0.33509087562561035,
-0.03690486028790474,
-0.4471806585788727,
-0.3675510585308075,
0.17970220744609833,
-0.30594402551651,
-0.140795037150383,
0.10603494197130203,
0.13295583426952362,
-0.03225325793027878,
0.056858502328395844,
-0.1369747668504715,
-0.016906987875699997,
0.02532189153134823,
0.20521244406700134,
-0.23481597006320953,
-0.25294533371925354,
-0.338911771774292,
-0.2970339357852936,
-0.2056213766336441,
-0.1967361718416214,
0.1507047563791275,
0.3304750323295593,
0.3571397662162781,
0.13139232993125916,
0.21773307025432587,
0.46485239267349243,
0.267209529876709,
-0.11475388705730438,
0.11040045320987701,
-0.15422296524047852,
0.20046402513980865,
-0.39842259883880615,
-0.4548291563987732,
0.2888486683368683,
0.017748385667800903,
0.12053784728050232,
0.1832214891910553,
-0.23877879977226257,
-0.256913423538208,
-0.1529291868209839,
0.010119520127773285,
0.029691163450479507,
0.16533106565475464,
0.2616767883300781,
-0.09888998419046402,
-0.10237250477075577,
-0.1688302755355835,
-0.046265117824077606,
0.17446093261241913,
-0.03264256566762924,
0.15935638546943665,
0.09310419857501984,
0.5094342231750488,
0.012058727443218231,
0.5736191272735596,
0.08047468960285187,
-0.463507741689682,
-0.18167321383953094,
-0.34953442215919495,
0.10995176434516907,
0.21261918544769287,
0.0766797885298729,
0.20352743566036224,
0.10463173687458038,
0.15431906282901764,
0.2083740383386612,
-0.007008615881204605,
-0.21794652938842773,
-0.03207419067621231,
-0.03712335228919983,
-0.1571473926305771,
-0.19405195116996765,
0.02285597287118435,
-0.374855637550354,
0.08671382814645767,
0.09733682870864868,
-0.2412237524986267,
-0.25707700848579407,
-0.07999605685472488,
-0.04092802107334137,
0.2149726152420044,
0.20329949259757996,
0.042955122888088226,
-0.5349581241607666,
-0.16421250998973846,
-0.43183332681655884,
0.2228107750415802,
-0.20350919663906097,
-0.05206027626991272,
-0.059182919561862946,
0.10909952968358994,
0.015242055058479309,
-0.12944674491882324,
0.5048205852508545,
-0.23555557429790497,
0.011583391577005386,
0.20573292672634125,
-0.12282321602106094,
-0.38911521434783936,
-0.0865117758512497,
-0.5830414295196533,
0.44159558415412903,
0.1200191080570221,
0.24974945187568665,
-0.09564030915498734,
-0.28732138872146606,
0.37485504150390625,
-0.028056707233190536,
-0.15952278673648834,
0.01196060050278902,
0.18752944469451904,
-0.4287967085838318,
-0.3779332637786865,
-0.15956845879554749,
0.0658508911728859,
-0.20247334241867065,
-0.41597408056259155,
-0.24616718292236328,
0.1638127714395523,
0.22475728392601013,
0.39196789264678955,
0.2527739107608795,
-0.0790424644947052,
0.3548322021961212,
-0.15364393591880798,
-0.1274600774049759,
0.010680068284273148,
0.038605090230703354,
-0.031894102692604065,
0.050764307379722595,
-0.24217674136161804,
0.03367246314883232,
0.03723418712615967,
0.335275799036026,
0.23747164011001587,
0.06624306738376617,
-0.11061719805002213,
-0.09156583249568939,
0.15279364585876465,
0.09670461714267731,
0.14964327216148376,
0.24755939841270447,
0.1688022017478943,
-0.4757455885410309,
-0.5301384925842285,
0.340137243270874,
-0.007400208152830601,
-0.13595733046531677,
0.09935876727104187,
0.09289947152137756,
-0.23272646963596344,
0.19261997938156128,
0.2273743748664856,
0.943920373916626,
-0.2948628067970276,
0.10382869094610214,
0.5949642658233643,
-0.06070566549897194,
0.7162026166915894,
-0.4931625723838806,
-0.17017774283885956,
-0.26443612575531006,
-0.021754544228315353,
-0.025688789784908295,
-0.16841255128383636,
-0.036859817802906036,
0.25746044516563416,
-0.6424682140350342,
0.24701251089572906,
0.0667688250541687,
-0.13344846665859222,
0.27240079641342163,
0.23108595609664917,
0.11836989969015121,
-0.1616884469985962,
-0.12874607741832733,
0.2684849202632904,
0.07409724593162537,
-0.05784136429429054,
-0.10919410735368729,
-0.25822240114212036,
-0.1783962994813919,
0.22833065688610077,
-0.24021537601947784,
0.24074777960777283,
-0.025620460510253906,
-0.22155871987342834,
0.10872448980808258,
-0.11067485809326172,
0.448055624961853,
0.33645716309547424,
0.6660110950469971,
0.16804103553295135,
-0.34639599919319153,
0.0017299465835094452,
-0.045441851019859314,
0.11128859221935272,
0.05870189890265465,
-0.011294323951005936,
0.4692017138004303,
-0.22077977657318115,
-0.2251424342393875,
0.22917258739471436,
0.113777756690979,
0.04348001629114151,
-0.19496490061283112,
-0.16450060904026031,
-0.054905228316783905,
0.002923195715993643,
-0.17643938958644867,
0.40431246161460876,
-0.40626364946365356,
0.21027587354183197,
0.19115297496318817,
0.1750522255897522,
-0.21242432296276093,
0.19915206730365753,
0.009546838700771332,
-0.1557263731956482,
0.13298346102237701,
-0.2656419277191162,
0.2591840624809265,
-0.27870604395866394,
0.3880555331707001,
0.32726389169692993,
0.03694535046815872,
-0.21794354915618896,
-0.11338052153587341,
0.13921503722667694,
-0.08681578934192657,
0.17086109519004822,
-0.0673048347234726,
-0.06077203154563904,
0.18370012938976288,
-0.026000838726758957,
-0.18843315541744232,
0.17456978559494019,
-0.3014700710773468,
-0.2322058081626892,
-0.13208800554275513,
-0.1107662171125412,
0.1990896314382553,
0.08882562071084976,
-0.1003728061914444,
0.26894500851631165,
0.013430031016469002,
-0.24444302916526794,
-0.41055843234062195,
0.23535822331905365,
-0.05955873429775238,
0.2885020077228546,
0.43368056416511536,
0.11946989595890045,
-0.10406416654586792,
-0.17788544297218323,
0.05512606352567673,
-0.0050950199365615845,
-0.18385615944862366,
-0.3351588249206543,
-0.18243449926376343,
0.11673573404550552,
-0.01607491448521614,
-0.49263110756874084,
0.3430461585521698,
0.09092603623867035,
-0.19512733817100525,
-0.03384958580136299,
0.15623585879802704,
0.017451751977205276,
-0.0989515483379364,
0.48006919026374817,
0.28187957406044006,
-0.03143506497144699,
0.255121648311615,
-0.24633881449699402,
0.10361140221357346,
0.20199696719646454,
-0.18800236284732819,
0.4242718815803528,
0.13999120891094208,
-0.18046246469020844,
-0.26383036375045776,
0.11869791150093079,
0.28795117139816284,
0.21304258704185486,
0.4271521270275116,
-0.09868836402893066,
0.2778204381465912,
-0.07773318141698837,
0.22925929725170135,
0.06751766800880432,
-0.38428840041160583,
0.18522067368030548,
0.27295559644699097,
0.2478901445865631,
-0.14219695329666138,
0.18299566209316254,
0.2702973484992981,
-0.17902079224586487,
0.06934860348701477,
0.1512635499238968,
-0.1563563495874405,
0.33132535219192505,
0.2594586908817291,
-0.18477237224578857,
0.26482412219047546,
-0.3637622594833374,
0.14195263385772705,
0.22733277082443237,
-0.32236000895500183,
-0.015145409852266312,
-0.31222617626190186,
0.1277264803647995,
0.05705182999372482,
-0.11972172558307648,
0.15530282258987427,
0.3168904483318329,
0.15230321884155273,
-0.08431191742420197,
0.36101165413856506,
-0.08981313556432724,
-0.04128300026059151,
0.12288761883974075,
-0.12113329768180847,
0.31194284558296204,
0.2081071436405182,
0.17419150471687317,
0.11850518733263016,
0.07025490701198578,
-0.03917984664440155,
0.39366546273231506,
0.12872174382209778,
-0.04059199243783951,
-0.22239650785923004,
0.07702482491731644,
-0.1651802957057953,
-0.20939554274082184,
-0.3505537807941437,
-0.10537493228912354,
-0.13786868751049042,
0.18233707547187805,
0.008705556392669678,
0.11710024625062943,
0.3869173228740692,
-0.146865576505661,
0.09014099836349487,
0.09049119055271149,
-0.056742072105407715,
-0.0716630071401596,
-0.06775811314582825,
-0.15166951715946198,
0.24675719439983368,
0.2833401560783386,
0.26517340540885925,
0.07429413497447968,
0.42104294896125793,
0.06797973811626434,
-0.1373470574617386,
0.2447861135005951,
0.1359490305185318,
0.06867607682943344,
-0.09247022867202759,
-0.15918776392936707,
0.1929430365562439,
-0.13769732415676117,
0.11386267840862274,
-0.02909078076481819,
-0.27436956763267517,
-0.25083765387535095,
0.2464630901813507,
0.10803088545799255,
-0.2730606198310852,
-0.24366548657417297,
-0.03764031082391739,
-0.2719661593437195,
-0.13851381838321686,
0.5426116585731506,
0.12327844649553299,
0.13785693049430847,
-0.1872282475233078,
0.11526289582252502,
0.006355013698339462,
0.561373770236969,
0.04900597035884857,
0.32721564173698425,
0.060511279851198196,
-0.05558224394917488,
-0.3118552565574646,
0.1494044065475464,
0.0035061053931713104,
-0.14539194107055664,
0.05053252726793289,
-0.009845328517258167,
0.23929589986801147,
0.16027671098709106,
0.0475228950381279,
-0.4620169699192047,
-0.20057716965675354,
0.13592767715454102,
-0.1267755627632141,
-0.3016205132007599,
-0.25188887119293213,
0.30505722761154175,
0.03381456062197685,
-0.226681649684906,
0.27487802505493164,
-0.035494182258844376,
0.0481884703040123,
-0.29897254705429077,
0.300408273935318,
0.2310102880001068,
0.005412839353084564,
-0.02432304620742798,
0.08612597733736038,
0.2654087543487549,
-0.1187250018119812,
0.06336081027984619,
0.0004627890884876251,
-0.04673425480723381,
-0.43906325101852417,
0.1593438684940338,
-0.17682518064975739,
-0.1780131459236145,
-0.09156948328018188,
-0.260818213224411,
-0.03697368875145912,
-0.23705652356147766,
0.0015803314745426178,
-0.286971777677536,
-0.2905566394329071,
0.19054453074932098,
-0.04972776025533676,
-0.04073150083422661,
0.20428355038166046,
0.2939434349536896,
-0.018323250114917755,
0.10069459676742554,
-0.3634255528450012,
0.0011138729751110077,
0.43060770630836487,
-0.0717415064573288,
-0.392242968082428,
0.06579826772212982,
-0.006541810929775238,
-0.11592067033052444,
-0.01939890719950199,
-0.38491448760032654,
-0.06268079578876495,
0.1641979217529297,
-0.0941297709941864,
-0.12476953864097595,
0.2935926914215088,
0.19217433035373688,
-0.053342174738645554,
-0.2185538113117218,
0.16535961627960205,
0.015719499439001083,
-0.22854948043823242,
-0.2731185257434845,
-0.36325573921203613
] |
https://github.com/huggingface/datasets/issues/508 | TypeError: Receiver() takes no arguments | Which version of Apache Beam do you have (can you copy your full environment info here)? | I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. | 16 | TypeError: Receiver() takes no arguments
I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
Which version of Apache Beam do you have (can you copy your full environment info here)? | [
-0.09465426206588745,
0.3181280195713043,
0.08749550580978394,
0.36292415857315063,
0.27408045530319214,
-0.0989537388086319,
0.2871831953525543,
0.23696555197238922,
-0.02867480367422104,
0.06884243339300156,
0.23884813487529755,
0.3297019898891449,
-0.09087178856134415,
-0.33632412552833557,
0.1751248687505722,
-0.5368744134902954,
-0.21418732404708862,
0.1947944462299347,
-0.23295292258262634,
-0.1850881278514862,
-0.1442270129919052,
0.3994986116886139,
-0.3325725197792053,
-0.07246468961238861,
-0.14122751355171204,
0.1027456670999527,
-0.07617750018835068,
0.1753544807434082,
-0.11846467107534409,
-0.3360362946987152,
0.1966995894908905,
-0.0673622190952301,
0.07337907701730728,
0.27500733733177185,
-0.000124508558656089,
0.3304242491722107,
0.6380138993263245,
-0.1410856693983078,
-0.541078507900238,
-0.0631844699382782,
-0.08117727190256119,
-0.23492559790611267,
0.1993425488471985,
-0.2498534619808197,
-0.20832324028015137,
-0.23526142537593842,
0.10239560902118683,
-0.05813661217689514,
0.35634011030197144,
0.2815554440021515,
0.0985947698354721,
0.19951540231704712,
0.18262438476085663,
-0.13684262335300446,
0.5043621063232422,
0.04321551322937012,
0.056196004152297974,
0.036174848675727844,
-0.22741970419883728,
0.23722538352012634,
-0.20685705542564392,
0.04593081772327423,
-0.2663237452507019,
-0.057869818061590195,
0.33067160844802856,
-0.22049230337142944,
0.08741335570812225,
0.17523090541362762,
-0.09427767246961594,
-0.010445468127727509,
0.805767297744751,
0.005263898521661758,
0.06409405171871185,
-0.2012140452861786,
0.08064084500074387,
-0.19088618457317352,
0.23832017183303833,
0.07156098634004593,
-0.4543539583683014,
-0.13701844215393066,
0.11433355510234833,
-0.12816880643367767,
-0.34139445424079895,
0.3352711796760559,
-0.0335036963224411,
0.4075165390968323,
-0.0230085588991642,
0.3289751410484314,
0.14224952459335327,
0.12647630274295807,
0.2072719782590866,
-0.23249194025993347,
-0.12685443460941315,
0.14523908495903015,
-0.3808571398258209,
0.17483794689178467,
0.17637676000595093,
0.29668959975242615,
-0.06376974284648895,
0.18299490213394165,
0.09322786331176758,
-0.1865077018737793,
0.07350356876850128,
0.12764933705329895,
0.33984503149986267,
0.12092773616313934,
0.13197243213653564,
0.012714873068034649,
0.004744298756122589,
-0.07475925981998444,
0.0249653123319149,
0.03207183629274368,
-0.02361433207988739,
-0.36054471135139465,
-0.24061250686645508,
0.22457337379455566,
0.23575444519519806,
-0.04856301099061966,
0.04526801407337189,
-0.21168439090251923,
-0.31318601965904236,
-0.20823295414447784,
0.16942721605300903,
0.4560171067714691,
0.053725115954875946,
0.49079784750938416,
0.3138803243637085,
0.16133393347263336,
-0.12674649059772491,
-0.5722315907478333,
-0.18036988377571106,
0.3171546459197998,
-0.1612580269575119,
-0.1637430340051651,
0.3268590569496155,
0.0613694041967392,
0.2865220010280609,
-0.27623450756073,
0.18724265694618225,
0.17346683144569397,
-0.016800913959741592,
-0.1587233990430832,
-0.2288750410079956,
0.17436447739601135,
0.1935788244009018,
0.27897870540618896,
0.21413390338420868,
-0.2745317816734314,
0.018914900720119476,
0.2086559236049652,
-0.22238484025001526,
-0.16894717514514923,
0.26481130719184875,
0.042567864060401917,
0.10715454816818237,
-0.138429656624794,
-0.5075430274009705,
0.11159837245941162,
-0.13575419783592224,
-0.26595938205718994,
-0.26108717918395996,
-0.20193415880203247,
-0.0996062159538269,
-0.22975555062294006,
0.3767795264720917,
0.5294708013534546,
-0.09896838665008545,
-0.029180433601140976,
-0.0063150180503726006,
0.13542237877845764,
0.08295197039842606,
0.035779211670160294,
-0.31141218543052673,
0.49217456579208374,
-0.1760828047990799,
-0.10474242269992828,
0.868653416633606,
-0.5204976201057434,
-0.05067667365074158,
0.36399927735328674,
0.11729878187179565,
-0.07188699394464493,
0.3070541024208069,
0.06187024340033531,
0.11707518249750137,
-0.09589488804340363,
0.03175264596939087,
0.40219706296920776,
-0.04654449224472046,
0.02345566637814045,
-0.15334810316562653,
0.03900083899497986,
0.2969614267349243,
0.3607647716999054,
0.0934305489063263,
0.2212415337562561,
-0.27348196506500244,
0.4947691261768341,
0.20715728402137756,
0.00373854860663414,
0.060567282140254974,
0.5123982429504395,
-0.39014285802841187,
-0.08273270726203918,
0.03902716189622879,
0.11307788640260696,
0.026666052639484406,
-0.04886316880583763,
-0.1335095763206482,
0.15623240172863007,
0.16262662410736084,
0.1614459753036499,
-0.4275050163269043,
0.02301519177854061,
-0.0830780416727066,
0.04276352748274803,
0.05673923343420029,
0.28403764963150024,
-0.1937219351530075,
0.2580309510231018,
0.028549548238515854,
0.3317638337612152,
0.017510315403342247,
-0.023406989872455597,
-0.3775361478328705,
0.20459289848804474,
-0.12001917511224747,
-0.25547704100608826,
0.28296709060668945,
-0.022836782038211823,
0.4561702311038971,
0.04208808392286301,
-0.17343220114707947,
0.13932430744171143,
0.17994439601898193,
-0.020908087491989136,
0.04133925214409828,
-0.20815543830394745,
0.02838706411421299,
-0.1349174678325653,
-0.04747176915407181,
0.5747932195663452,
0.24731674790382385,
-0.19312870502471924,
0.007398448884487152,
-0.05638420581817627,
-0.09503380954265594,
0.2234853208065033,
-0.052073411643505096,
0.18903601169586182,
0.0732775405049324,
0.2233697474002838,
-0.08493173122406006,
0.22737058997154236,
0.20469985902309418,
0.19900740683078766,
0.21412032842636108,
-0.0926080122590065,
-0.06868143379688263,
-0.22866639494895935,
0.28741052746772766,
0.2148696333169937,
0.03242797777056694,
-0.01442108303308487,
-0.29639166593551636,
0.0025035925209522247,
0.22511008381843567,
-0.06385231018066406,
0.2678775191307068,
0.17269742488861084,
-0.12468861043453217,
-0.00754878856241703,
0.0018161009065806866,
-0.10727781802415848,
0.44600293040275574,
0.05648136883974075,
0.26112040877342224,
-0.016631685197353363,
-0.10843143612146378,
-0.019783865660429,
-0.24262553453445435,
-0.2545628249645233,
0.027842896059155464,
0.2242686152458191,
-0.42473167181015015,
0.035679638385772705,
-0.20872488617897034,
-0.6600084900856018,
-0.23596185445785522,
-0.049445562064647675,
-0.16059936583042145,
-0.5055608749389648,
-0.16127747297286987,
0.32735416293144226,
0.014642488211393356,
0.12758317589759827,
-0.12058529257774353,
0.2305706888437271,
0.33199214935302734,
-0.2339307814836502,
-0.41851991415023804,
-0.1734267771244049,
-0.29965272545814514,
-0.03364299237728119,
0.1122230589389801,
0.13237322866916656,
0.13859839737415314,
0.1139131560921669,
-0.030663326382637024,
-0.06609787791967392,
-0.005705744028091431,
0.21524807810783386,
-0.10905660688877106,
0.1235097274184227,
0.2650184631347656,
0.3777042031288147,
-0.2389564961194992,
-0.09747014939785004,
0.3813406825065613,
0.002663128077983856,
0.1714814007282257,
0.3198920488357544,
0.03559166565537453,
-0.07547961175441742,
-0.10614433884620667,
-0.25005507469177246,
0.05141860991716385,
-0.6115217208862305,
-0.1775636374950409,
0.23730610311031342,
0.000051841139793395996,
0.15428651869297028,
0.2415063977241516,
0.18054284155368805,
0.12876780331134796,
0.3176608681678772,
0.016924263909459114,
-0.23874293267726898,
0.3329896032810211,
-0.1693129986524582,
-0.3372398316860199,
-0.1376378834247589,
0.11696569621562958,
0.23388788104057312,
0.21988999843597412,
-0.46016591787338257,
-0.38336536288261414,
0.2961047887802124,
-0.03479574993252754,
0.006530109792947769,
0.16944728791713715,
0.3062463104724884,
0.017128603532910347,
0.09248511493206024,
-0.2547697126865387,
-0.19896504282951355,
0.04688837751746178,
-0.22227346897125244,
0.2826959192752838,
0.2882087230682373,
0.3215000033378601,
-0.038476280868053436,
0.9122617840766907,
0.23742160201072693,
0.14308488368988037,
0.5309513211250305,
0.1021704152226448,
0.2991397976875305,
-0.03677090257406235,
-0.24229514598846436,
0.2306566834449768,
0.18123608827590942,
0.13666950166225433,
0.20913492143154144,
-0.24923962354660034,
-0.25546345114707947,
-0.40862396359443665,
-0.2131759524345398,
-0.2362276315689087,
-0.3552214205265045,
0.16340656578540802,
-0.3094652593135834,
0.25373029708862305,
-0.13851068913936615,
0.20273351669311523,
-0.3603171408176422,
-0.09952846169471741,
0.14941680431365967,
0.14400669932365417,
0.160201758146286,
0.11304952949285507,
-0.07522530108690262,
-0.060710880905389786,
-0.3460041880607605,
0.3344672918319702,
-0.12067768722772598,
0.3733888566493988,
-0.05666356161236763,
0.0655359998345375,
0.03895983844995499,
-0.05802946537733078,
0.713597297668457,
-0.3010062873363495,
-0.0036396607756614685,
0.24828460812568665,
0.22073844075202942,
-0.6750038266181946,
0.11390720307826996,
-0.11228692531585693,
0.2548104226589203,
0.004968170076608658,
-0.3782784044742584,
-0.4797845482826233,
-0.19211295247077942,
0.17425520718097687,
-0.07232864201068878,
-0.1652676910161972,
-0.08825333416461945,
-0.22018976509571075,
-0.32471609115600586,
-0.30970174074172974,
-0.10598408430814743,
-0.04440512880682945,
0.4491245150566101,
0.23013891279697418,
0.27297624945640564,
-0.14226122200489044,
0.0037114620208740234,
-0.023120470345020294,
-0.12722590565681458,
0.14489829540252686,
-0.0203227661550045,
-0.23666471242904663,
-0.19474823772907257,
0.5161570310592651,
-0.5861029624938965,
0.36507779359817505,
0.2983974814414978,
-0.6307682991027832,
-0.048727504909038544,
-0.018520968034863472,
0.28411591053009033,
0.21166397631168365,
-0.31098899245262146,
0.052807267755270004,
-0.04902728646993637,
-0.1705605387687683,
-0.00020359735935926437,
0.23041579127311707,
0.41071709990501404,
-0.3813045024871826,
-0.05218615382909775,
-0.5629244446754456,
0.4374677240848541,
-0.13509711623191833,
-0.010410450398921967,
0.2742978036403656,
-0.12945732474327087,
-0.1884312629699707,
0.6053574681282043,
-0.03186073899269104,
0.9742019772529602,
0.2021540105342865,
0.1885174661874771,
0.4231555461883545,
-0.12777674198150635,
0.622761607170105,
-0.12437380850315094,
0.32190418243408203,
-0.389394611120224,
0.04144727438688278,
-0.06381471455097198,
-0.17461083829402924,
-0.09305641800165176,
0.13327696919441223,
-0.26067280769348145,
0.2774873673915863,
0.07044894993305206,
-0.05497981235384941,
0.08896137773990631,
0.12558625638484955,
0.11164534837007523,
-0.10677187144756317,
-0.5512534379959106,
0.057797037065029144,
-0.4502732753753662,
0.01628904603421688,
-0.072995126247406,
-0.1618124395608902,
0.0773976594209671,
-0.5212675929069519,
-0.102923184633255,
0.16554754972457886,
-0.24027055501937866,
0.1557009518146515,
-0.05653611943125725,
-0.25477319955825806,
0.18542326986789703,
0.36229875683784485,
-0.020917430520057678,
0.056942835450172424,
-0.1994667500257492,
0.31147995591163635,
-0.5459028482437134,
-0.06956148892641068,
-0.15937966108322144,
0.3023843765258789,
0.2848663330078125,
-0.025128979235887527,
-0.14674288034439087,
0.33409276604652405,
-0.1659710556268692,
-0.6099491119384766,
-0.04951713979244232,
-0.08532626926898956,
0.4431840777397156,
-0.03684834763407707,
-0.20565465092658997,
0.07756856828927994,
-0.15242020785808563,
0.03554236516356468,
0.03950725868344307,
0.024493563920259476,
-0.20601783692836761,
0.06884953379631042,
-0.05289831385016441,
0.0025283321738243103,
0.1737150102853775,
0.4771813154220581,
0.0580921396613121,
0.025352053344249725,
0.5821671485900879,
0.274031400680542,
-0.025717314332723618,
-0.15860089659690857,
-0.23228120803833008,
-0.3409326374530792,
-0.6085491180419922,
0.19907329976558685,
0.3044445216655731,
0.06213432550430298,
0.08742460608482361,
0.20383943617343903,
-0.07797244191169739,
0.1705034077167511,
0.056089241057634354,
-0.30495765805244446,
0.11341362446546555,
0.2060198038816452,
-0.24361871182918549,
-0.06297646462917328,
0.4305717349052429,
-0.03239744156599045,
0.3100139796733856,
-0.14917728304862976,
-0.18580619990825653,
-0.12412562221288681,
-0.18789039552211761,
0.1358191967010498,
0.16001087427139282,
-0.22639650106430054,
-0.11575824022293091,
0.2592049539089203,
0.07067063450813293,
-0.24402837455272675,
-0.2439688742160797,
-0.06035751476883888,
-0.16677239537239075,
0.20026008784770966,
0.22434774041175842,
0.12140995264053345,
-0.12901966273784637,
-0.4042980670928955,
-0.12375026941299438,
-0.18162937462329865,
0.022590164095163345,
-0.1426827609539032,
-0.24291007220745087,
0.055743757635354996,
0.1504148542881012,
0.36744147539138794,
-0.5081478953361511,
0.19756866991519928,
0.07603896409273148,
-0.09266912937164307,
0.21329347789287567,
0.1916119009256363,
0.26245802640914917,
-0.04969266057014465,
-0.46626925468444824,
0.16151933372020721,
0.2004980742931366,
-0.03445540368556976,
0.529545247554779,
-0.18402670323848724,
-0.11347715556621552,
-0.10942408442497253,
-0.08067657053470612,
0.080779530107975,
-0.1513763815164566,
0.011796822771430016,
0.06921067088842392,
0.0332738496363163,
-0.15379419922828674,
0.04944710060954094,
0.32259345054626465,
0.20399503409862518,
-0.06518559902906418,
0.07361532747745514,
-0.08708719164133072,
-0.36611515283584595,
0.20963340997695923,
0.11635332554578781,
0.3633624315261841,
-0.1511387974023819,
-0.11197565495967865,
0.13395003974437714,
-0.034958772361278534,
-0.08543753623962402,
-0.052797965705394745,
0.2270287126302719,
0.05373949930071831,
0.29034948348999023,
-0.144478440284729,
0.0543755441904068,
-0.05644102394580841,
-0.3188200294971466,
-0.04710390418767929,
-0.15345399081707,
0.20089857280254364,
0.4862777292728424,
0.1516953408718109,
0.14434584975242615,
-0.1632327288389206,
0.19970715045928955,
0.04823414236307144,
0.11418979614973068,
-0.2721180021762848,
0.16049468517303467,
0.018279967829585075,
0.03101946786046028,
-0.6282179951667786,
-0.015780940651893616,
-0.4327569603919983,
-0.14489200711250305,
-0.004946254193782806,
-0.16302360594272614,
-0.030058741569519043,
0.21194221079349518,
-0.11699812114238739,
-0.37938427925109863,
0.21547383069992065,
0.12184816598892212,
-0.0333385244011879,
-0.15128915011882782,
0.20378023386001587,
0.08548735082149506,
0.11784428358078003,
0.19989067316055298,
0.2706089913845062,
0.3540657162666321,
0.4170273244380951,
-0.2698945105075836,
-0.1693301796913147,
0.2886005640029907,
0.0005996972322463989,
-0.20721597969532013,
-0.06146793067455292,
0.09717079997062683,
0.32109349966049194,
0.39598220586776733,
0.07382845133543015,
0.014399639330804348,
-0.00851411372423172,
0.12758144736289978,
-0.061321284621953964,
-0.2382631003856659,
0.47238051891326904,
-0.046352319419384,
-0.09188354760408401,
-0.3303665816783905,
0.0329027883708477,
-0.5663155913352966,
0.32977384328842163,
0.059532083570957184,
0.357300341129303,
-0.010647928342223167,
-0.20455652475357056,
-0.019939113408327103,
-0.06562705338001251,
0.3586011826992035,
0.3856939375400543,
0.374083936214447,
-0.30916276574134827,
-0.42480599880218506,
-0.4309867024421692,
0.15818773210048676,
0.16397488117218018,
-0.2411169409751892,
0.10705935209989548,
0.1998967081308365,
0.28318506479263306,
0.24040547013282776,
-0.1074826717376709,
-0.2510263919830322,
-0.05572628229856491,
0.17863789200782776,
-0.218936949968338,
-0.2895011007785797,
0.20643992722034454,
0.06966330111026764,
-0.1936570256948471,
-0.21789070963859558,
-0.14199374616146088,
0.00838556606322527,
0.09180378168821335,
-0.16567447781562805,
-0.3625207245349884,
0.1477169692516327,
0.08224141597747803,
-0.021816082298755646,
-0.0256651584059,
0.4474616050720215,
0.05809037387371063,
-0.0019749123603105545,
-0.18325549364089966,
-0.07431719452142715,
-0.1690213978290558,
-0.28163862228393555,
-0.1547076404094696,
0.5438709259033203,
-0.22133252024650574,
0.25255778431892395,
-0.3257875442504883,
0.24450860917568207,
-0.13348262012004852,
0.3438495695590973,
-0.146602600812912,
0.06482960283756256,
-0.46840864419937134,
0.3983728885650635,
-0.13448145985603333,
-0.06758611649274826,
-0.025552816689014435,
0.1462191641330719,
-0.4820396900177002,
-0.2730070650577545,
0.5664800405502319,
-0.5063443183898926,
-0.2313736528158188,
0.00631704181432724,
0.21578672528266907,
-0.4116668701171875,
0.3354259431362152,
-0.35841280221939087,
-0.03860654681921005,
0.28557878732681274,
-0.06732425838708878,
-0.1444847732782364,
0.16551581025123596,
-0.0476103350520134,
0.11225004494190216,
-0.08310577273368835,
-0.5315558910369873,
0.043798401951789856,
-0.1335090547800064,
-0.13964007794857025,
-0.2604454755783081
] |
https://github.com/huggingface/datasets/issues/508 | TypeError: Receiver() takes no arguments | apache-beam==2.23.0
nlp==0.4.0
For me this was resolved by running the same python script on Linux (or really WSL). | I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. | 18 | TypeError: Receiver() takes no arguments
I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
apache-beam==2.23.0
nlp==0.4.0
For me this was resolved by running the same python script on Linux (or really WSL). | [
-0.09465426206588745,
0.3181280195713043,
0.08749550580978394,
0.36292415857315063,
0.27408045530319214,
-0.0989537388086319,
0.2871831953525543,
0.23696555197238922,
-0.02867480367422104,
0.06884243339300156,
0.23884813487529755,
0.3297019898891449,
-0.09087178856134415,
-0.33632412552833557,
0.1751248687505722,
-0.5368744134902954,
-0.21418732404708862,
0.1947944462299347,
-0.23295292258262634,
-0.1850881278514862,
-0.1442270129919052,
0.3994986116886139,
-0.3325725197792053,
-0.07246468961238861,
-0.14122751355171204,
0.1027456670999527,
-0.07617750018835068,
0.1753544807434082,
-0.11846467107534409,
-0.3360362946987152,
0.1966995894908905,
-0.0673622190952301,
0.07337907701730728,
0.27500733733177185,
-0.000124508558656089,
0.3304242491722107,
0.6380138993263245,
-0.1410856693983078,
-0.541078507900238,
-0.0631844699382782,
-0.08117727190256119,
-0.23492559790611267,
0.1993425488471985,
-0.2498534619808197,
-0.20832324028015137,
-0.23526142537593842,
0.10239560902118683,
-0.05813661217689514,
0.35634011030197144,
0.2815554440021515,
0.0985947698354721,
0.19951540231704712,
0.18262438476085663,
-0.13684262335300446,
0.5043621063232422,
0.04321551322937012,
0.056196004152297974,
0.036174848675727844,
-0.22741970419883728,
0.23722538352012634,
-0.20685705542564392,
0.04593081772327423,
-0.2663237452507019,
-0.057869818061590195,
0.33067160844802856,
-0.22049230337142944,
0.08741335570812225,
0.17523090541362762,
-0.09427767246961594,
-0.010445468127727509,
0.805767297744751,
0.005263898521661758,
0.06409405171871185,
-0.2012140452861786,
0.08064084500074387,
-0.19088618457317352,
0.23832017183303833,
0.07156098634004593,
-0.4543539583683014,
-0.13701844215393066,
0.11433355510234833,
-0.12816880643367767,
-0.34139445424079895,
0.3352711796760559,
-0.0335036963224411,
0.4075165390968323,
-0.0230085588991642,
0.3289751410484314,
0.14224952459335327,
0.12647630274295807,
0.2072719782590866,
-0.23249194025993347,
-0.12685443460941315,
0.14523908495903015,
-0.3808571398258209,
0.17483794689178467,
0.17637676000595093,
0.29668959975242615,
-0.06376974284648895,
0.18299490213394165,
0.09322786331176758,
-0.1865077018737793,
0.07350356876850128,
0.12764933705329895,
0.33984503149986267,
0.12092773616313934,
0.13197243213653564,
0.012714873068034649,
0.004744298756122589,
-0.07475925981998444,
0.0249653123319149,
0.03207183629274368,
-0.02361433207988739,
-0.36054471135139465,
-0.24061250686645508,
0.22457337379455566,
0.23575444519519806,
-0.04856301099061966,
0.04526801407337189,
-0.21168439090251923,
-0.31318601965904236,
-0.20823295414447784,
0.16942721605300903,
0.4560171067714691,
0.053725115954875946,
0.49079784750938416,
0.3138803243637085,
0.16133393347263336,
-0.12674649059772491,
-0.5722315907478333,
-0.18036988377571106,
0.3171546459197998,
-0.1612580269575119,
-0.1637430340051651,
0.3268590569496155,
0.0613694041967392,
0.2865220010280609,
-0.27623450756073,
0.18724265694618225,
0.17346683144569397,
-0.016800913959741592,
-0.1587233990430832,
-0.2288750410079956,
0.17436447739601135,
0.1935788244009018,
0.27897870540618896,
0.21413390338420868,
-0.2745317816734314,
0.018914900720119476,
0.2086559236049652,
-0.22238484025001526,
-0.16894717514514923,
0.26481130719184875,
0.042567864060401917,
0.10715454816818237,
-0.138429656624794,
-0.5075430274009705,
0.11159837245941162,
-0.13575419783592224,
-0.26595938205718994,
-0.26108717918395996,
-0.20193415880203247,
-0.0996062159538269,
-0.22975555062294006,
0.3767795264720917,
0.5294708013534546,
-0.09896838665008545,
-0.029180433601140976,
-0.0063150180503726006,
0.13542237877845764,
0.08295197039842606,
0.035779211670160294,
-0.31141218543052673,
0.49217456579208374,
-0.1760828047990799,
-0.10474242269992828,
0.868653416633606,
-0.5204976201057434,
-0.05067667365074158,
0.36399927735328674,
0.11729878187179565,
-0.07188699394464493,
0.3070541024208069,
0.06187024340033531,
0.11707518249750137,
-0.09589488804340363,
0.03175264596939087,
0.40219706296920776,
-0.04654449224472046,
0.02345566637814045,
-0.15334810316562653,
0.03900083899497986,
0.2969614267349243,
0.3607647716999054,
0.0934305489063263,
0.2212415337562561,
-0.27348196506500244,
0.4947691261768341,
0.20715728402137756,
0.00373854860663414,
0.060567282140254974,
0.5123982429504395,
-0.39014285802841187,
-0.08273270726203918,
0.03902716189622879,
0.11307788640260696,
0.026666052639484406,
-0.04886316880583763,
-0.1335095763206482,
0.15623240172863007,
0.16262662410736084,
0.1614459753036499,
-0.4275050163269043,
0.02301519177854061,
-0.0830780416727066,
0.04276352748274803,
0.05673923343420029,
0.28403764963150024,
-0.1937219351530075,
0.2580309510231018,
0.028549548238515854,
0.3317638337612152,
0.017510315403342247,
-0.023406989872455597,
-0.3775361478328705,
0.20459289848804474,
-0.12001917511224747,
-0.25547704100608826,
0.28296709060668945,
-0.022836782038211823,
0.4561702311038971,
0.04208808392286301,
-0.17343220114707947,
0.13932430744171143,
0.17994439601898193,
-0.020908087491989136,
0.04133925214409828,
-0.20815543830394745,
0.02838706411421299,
-0.1349174678325653,
-0.04747176915407181,
0.5747932195663452,
0.24731674790382385,
-0.19312870502471924,
0.007398448884487152,
-0.05638420581817627,
-0.09503380954265594,
0.2234853208065033,
-0.052073411643505096,
0.18903601169586182,
0.0732775405049324,
0.2233697474002838,
-0.08493173122406006,
0.22737058997154236,
0.20469985902309418,
0.19900740683078766,
0.21412032842636108,
-0.0926080122590065,
-0.06868143379688263,
-0.22866639494895935,
0.28741052746772766,
0.2148696333169937,
0.03242797777056694,
-0.01442108303308487,
-0.29639166593551636,
0.0025035925209522247,
0.22511008381843567,
-0.06385231018066406,
0.2678775191307068,
0.17269742488861084,
-0.12468861043453217,
-0.00754878856241703,
0.0018161009065806866,
-0.10727781802415848,
0.44600293040275574,
0.05648136883974075,
0.26112040877342224,
-0.016631685197353363,
-0.10843143612146378,
-0.019783865660429,
-0.24262553453445435,
-0.2545628249645233,
0.027842896059155464,
0.2242686152458191,
-0.42473167181015015,
0.035679638385772705,
-0.20872488617897034,
-0.6600084900856018,
-0.23596185445785522,
-0.049445562064647675,
-0.16059936583042145,
-0.5055608749389648,
-0.16127747297286987,
0.32735416293144226,
0.014642488211393356,
0.12758317589759827,
-0.12058529257774353,
0.2305706888437271,
0.33199214935302734,
-0.2339307814836502,
-0.41851991415023804,
-0.1734267771244049,
-0.29965272545814514,
-0.03364299237728119,
0.1122230589389801,
0.13237322866916656,
0.13859839737415314,
0.1139131560921669,
-0.030663326382637024,
-0.06609787791967392,
-0.005705744028091431,
0.21524807810783386,
-0.10905660688877106,
0.1235097274184227,
0.2650184631347656,
0.3777042031288147,
-0.2389564961194992,
-0.09747014939785004,
0.3813406825065613,
0.002663128077983856,
0.1714814007282257,
0.3198920488357544,
0.03559166565537453,
-0.07547961175441742,
-0.10614433884620667,
-0.25005507469177246,
0.05141860991716385,
-0.6115217208862305,
-0.1775636374950409,
0.23730610311031342,
0.000051841139793395996,
0.15428651869297028,
0.2415063977241516,
0.18054284155368805,
0.12876780331134796,
0.3176608681678772,
0.016924263909459114,
-0.23874293267726898,
0.3329896032810211,
-0.1693129986524582,
-0.3372398316860199,
-0.1376378834247589,
0.11696569621562958,
0.23388788104057312,
0.21988999843597412,
-0.46016591787338257,
-0.38336536288261414,
0.2961047887802124,
-0.03479574993252754,
0.006530109792947769,
0.16944728791713715,
0.3062463104724884,
0.017128603532910347,
0.09248511493206024,
-0.2547697126865387,
-0.19896504282951355,
0.04688837751746178,
-0.22227346897125244,
0.2826959192752838,
0.2882087230682373,
0.3215000033378601,
-0.038476280868053436,
0.9122617840766907,
0.23742160201072693,
0.14308488368988037,
0.5309513211250305,
0.1021704152226448,
0.2991397976875305,
-0.03677090257406235,
-0.24229514598846436,
0.2306566834449768,
0.18123608827590942,
0.13666950166225433,
0.20913492143154144,
-0.24923962354660034,
-0.25546345114707947,
-0.40862396359443665,
-0.2131759524345398,
-0.2362276315689087,
-0.3552214205265045,
0.16340656578540802,
-0.3094652593135834,
0.25373029708862305,
-0.13851068913936615,
0.20273351669311523,
-0.3603171408176422,
-0.09952846169471741,
0.14941680431365967,
0.14400669932365417,
0.160201758146286,
0.11304952949285507,
-0.07522530108690262,
-0.060710880905389786,
-0.3460041880607605,
0.3344672918319702,
-0.12067768722772598,
0.3733888566493988,
-0.05666356161236763,
0.0655359998345375,
0.03895983844995499,
-0.05802946537733078,
0.713597297668457,
-0.3010062873363495,
-0.0036396607756614685,
0.24828460812568665,
0.22073844075202942,
-0.6750038266181946,
0.11390720307826996,
-0.11228692531585693,
0.2548104226589203,
0.004968170076608658,
-0.3782784044742584,
-0.4797845482826233,
-0.19211295247077942,
0.17425520718097687,
-0.07232864201068878,
-0.1652676910161972,
-0.08825333416461945,
-0.22018976509571075,
-0.32471609115600586,
-0.30970174074172974,
-0.10598408430814743,
-0.04440512880682945,
0.4491245150566101,
0.23013891279697418,
0.27297624945640564,
-0.14226122200489044,
0.0037114620208740234,
-0.023120470345020294,
-0.12722590565681458,
0.14489829540252686,
-0.0203227661550045,
-0.23666471242904663,
-0.19474823772907257,
0.5161570310592651,
-0.5861029624938965,
0.36507779359817505,
0.2983974814414978,
-0.6307682991027832,
-0.048727504909038544,
-0.018520968034863472,
0.28411591053009033,
0.21166397631168365,
-0.31098899245262146,
0.052807267755270004,
-0.04902728646993637,
-0.1705605387687683,
-0.00020359735935926437,
0.23041579127311707,
0.41071709990501404,
-0.3813045024871826,
-0.05218615382909775,
-0.5629244446754456,
0.4374677240848541,
-0.13509711623191833,
-0.010410450398921967,
0.2742978036403656,
-0.12945732474327087,
-0.1884312629699707,
0.6053574681282043,
-0.03186073899269104,
0.9742019772529602,
0.2021540105342865,
0.1885174661874771,
0.4231555461883545,
-0.12777674198150635,
0.622761607170105,
-0.12437380850315094,
0.32190418243408203,
-0.389394611120224,
0.04144727438688278,
-0.06381471455097198,
-0.17461083829402924,
-0.09305641800165176,
0.13327696919441223,
-0.26067280769348145,
0.2774873673915863,
0.07044894993305206,
-0.05497981235384941,
0.08896137773990631,
0.12558625638484955,
0.11164534837007523,
-0.10677187144756317,
-0.5512534379959106,
0.057797037065029144,
-0.4502732753753662,
0.01628904603421688,
-0.072995126247406,
-0.1618124395608902,
0.0773976594209671,
-0.5212675929069519,
-0.102923184633255,
0.16554754972457886,
-0.24027055501937866,
0.1557009518146515,
-0.05653611943125725,
-0.25477319955825806,
0.18542326986789703,
0.36229875683784485,
-0.020917430520057678,
0.056942835450172424,
-0.1994667500257492,
0.31147995591163635,
-0.5459028482437134,
-0.06956148892641068,
-0.15937966108322144,
0.3023843765258789,
0.2848663330078125,
-0.025128979235887527,
-0.14674288034439087,
0.33409276604652405,
-0.1659710556268692,
-0.6099491119384766,
-0.04951713979244232,
-0.08532626926898956,
0.4431840777397156,
-0.03684834763407707,
-0.20565465092658997,
0.07756856828927994,
-0.15242020785808563,
0.03554236516356468,
0.03950725868344307,
0.024493563920259476,
-0.20601783692836761,
0.06884953379631042,
-0.05289831385016441,
0.0025283321738243103,
0.1737150102853775,
0.4771813154220581,
0.0580921396613121,
0.025352053344249725,
0.5821671485900879,
0.274031400680542,
-0.025717314332723618,
-0.15860089659690857,
-0.23228120803833008,
-0.3409326374530792,
-0.6085491180419922,
0.19907329976558685,
0.3044445216655731,
0.06213432550430298,
0.08742460608482361,
0.20383943617343903,
-0.07797244191169739,
0.1705034077167511,
0.056089241057634354,
-0.30495765805244446,
0.11341362446546555,
0.2060198038816452,
-0.24361871182918549,
-0.06297646462917328,
0.4305717349052429,
-0.03239744156599045,
0.3100139796733856,
-0.14917728304862976,
-0.18580619990825653,
-0.12412562221288681,
-0.18789039552211761,
0.1358191967010498,
0.16001087427139282,
-0.22639650106430054,
-0.11575824022293091,
0.2592049539089203,
0.07067063450813293,
-0.24402837455272675,
-0.2439688742160797,
-0.06035751476883888,
-0.16677239537239075,
0.20026008784770966,
0.22434774041175842,
0.12140995264053345,
-0.12901966273784637,
-0.4042980670928955,
-0.12375026941299438,
-0.18162937462329865,
0.022590164095163345,
-0.1426827609539032,
-0.24291007220745087,
0.055743757635354996,
0.1504148542881012,
0.36744147539138794,
-0.5081478953361511,
0.19756866991519928,
0.07603896409273148,
-0.09266912937164307,
0.21329347789287567,
0.1916119009256363,
0.26245802640914917,
-0.04969266057014465,
-0.46626925468444824,
0.16151933372020721,
0.2004980742931366,
-0.03445540368556976,
0.529545247554779,
-0.18402670323848724,
-0.11347715556621552,
-0.10942408442497253,
-0.08067657053470612,
0.080779530107975,
-0.1513763815164566,
0.011796822771430016,
0.06921067088842392,
0.0332738496363163,
-0.15379419922828674,
0.04944710060954094,
0.32259345054626465,
0.20399503409862518,
-0.06518559902906418,
0.07361532747745514,
-0.08708719164133072,
-0.36611515283584595,
0.20963340997695923,
0.11635332554578781,
0.3633624315261841,
-0.1511387974023819,
-0.11197565495967865,
0.13395003974437714,
-0.034958772361278534,
-0.08543753623962402,
-0.052797965705394745,
0.2270287126302719,
0.05373949930071831,
0.29034948348999023,
-0.144478440284729,
0.0543755441904068,
-0.05644102394580841,
-0.3188200294971466,
-0.04710390418767929,
-0.15345399081707,
0.20089857280254364,
0.4862777292728424,
0.1516953408718109,
0.14434584975242615,
-0.1632327288389206,
0.19970715045928955,
0.04823414236307144,
0.11418979614973068,
-0.2721180021762848,
0.16049468517303467,
0.018279967829585075,
0.03101946786046028,
-0.6282179951667786,
-0.015780940651893616,
-0.4327569603919983,
-0.14489200711250305,
-0.004946254193782806,
-0.16302360594272614,
-0.030058741569519043,
0.21194221079349518,
-0.11699812114238739,
-0.37938427925109863,
0.21547383069992065,
0.12184816598892212,
-0.0333385244011879,
-0.15128915011882782,
0.20378023386001587,
0.08548735082149506,
0.11784428358078003,
0.19989067316055298,
0.2706089913845062,
0.3540657162666321,
0.4170273244380951,
-0.2698945105075836,
-0.1693301796913147,
0.2886005640029907,
0.0005996972322463989,
-0.20721597969532013,
-0.06146793067455292,
0.09717079997062683,
0.32109349966049194,
0.39598220586776733,
0.07382845133543015,
0.014399639330804348,
-0.00851411372423172,
0.12758144736289978,
-0.061321284621953964,
-0.2382631003856659,
0.47238051891326904,
-0.046352319419384,
-0.09188354760408401,
-0.3303665816783905,
0.0329027883708477,
-0.5663155913352966,
0.32977384328842163,
0.059532083570957184,
0.357300341129303,
-0.010647928342223167,
-0.20455652475357056,
-0.019939113408327103,
-0.06562705338001251,
0.3586011826992035,
0.3856939375400543,
0.374083936214447,
-0.30916276574134827,
-0.42480599880218506,
-0.4309867024421692,
0.15818773210048676,
0.16397488117218018,
-0.2411169409751892,
0.10705935209989548,
0.1998967081308365,
0.28318506479263306,
0.24040547013282776,
-0.1074826717376709,
-0.2510263919830322,
-0.05572628229856491,
0.17863789200782776,
-0.218936949968338,
-0.2895011007785797,
0.20643992722034454,
0.06966330111026764,
-0.1936570256948471,
-0.21789070963859558,
-0.14199374616146088,
0.00838556606322527,
0.09180378168821335,
-0.16567447781562805,
-0.3625207245349884,
0.1477169692516327,
0.08224141597747803,
-0.021816082298755646,
-0.0256651584059,
0.4474616050720215,
0.05809037387371063,
-0.0019749123603105545,
-0.18325549364089966,
-0.07431719452142715,
-0.1690213978290558,
-0.28163862228393555,
-0.1547076404094696,
0.5438709259033203,
-0.22133252024650574,
0.25255778431892395,
-0.3257875442504883,
0.24450860917568207,
-0.13348262012004852,
0.3438495695590973,
-0.146602600812912,
0.06482960283756256,
-0.46840864419937134,
0.3983728885650635,
-0.13448145985603333,
-0.06758611649274826,
-0.025552816689014435,
0.1462191641330719,
-0.4820396900177002,
-0.2730070650577545,
0.5664800405502319,
-0.5063443183898926,
-0.2313736528158188,
0.00631704181432724,
0.21578672528266907,
-0.4116668701171875,
0.3354259431362152,
-0.35841280221939087,
-0.03860654681921005,
0.28557878732681274,
-0.06732425838708878,
-0.1444847732782364,
0.16551581025123596,
-0.0476103350520134,
0.11225004494190216,
-0.08310577273368835,
-0.5315558910369873,
0.043798401951789856,
-0.1335090547800064,
-0.13964007794857025,
-0.2604454755783081
] |
https://github.com/huggingface/datasets/issues/508 | TypeError: Receiver() takes no arguments | Do you manage to run a dummy beam pipeline with python on windows ?
You can test a dummy pipeline with [this code](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/examples/wordcount_minimal.py)
If you get the same error, it means that the issue comes from apache beam.
Otherwise we'll investigate what went wrong here | I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. | 45 | TypeError: Receiver() takes no arguments
I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
Do you manage to run a dummy beam pipeline with python on windows ?
You can test a dummy pipeline with [this code](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/examples/wordcount_minimal.py)
If you get the same error, it means that the issue comes from apache beam.
Otherwise we'll investigate what went wrong here | [
-0.09465426206588745,
0.3181280195713043,
0.08749550580978394,
0.36292415857315063,
0.27408045530319214,
-0.0989537388086319,
0.2871831953525543,
0.23696555197238922,
-0.02867480367422104,
0.06884243339300156,
0.23884813487529755,
0.3297019898891449,
-0.09087178856134415,
-0.33632412552833557,
0.1751248687505722,
-0.5368744134902954,
-0.21418732404708862,
0.1947944462299347,
-0.23295292258262634,
-0.1850881278514862,
-0.1442270129919052,
0.3994986116886139,
-0.3325725197792053,
-0.07246468961238861,
-0.14122751355171204,
0.1027456670999527,
-0.07617750018835068,
0.1753544807434082,
-0.11846467107534409,
-0.3360362946987152,
0.1966995894908905,
-0.0673622190952301,
0.07337907701730728,
0.27500733733177185,
-0.000124508558656089,
0.3304242491722107,
0.6380138993263245,
-0.1410856693983078,
-0.541078507900238,
-0.0631844699382782,
-0.08117727190256119,
-0.23492559790611267,
0.1993425488471985,
-0.2498534619808197,
-0.20832324028015137,
-0.23526142537593842,
0.10239560902118683,
-0.05813661217689514,
0.35634011030197144,
0.2815554440021515,
0.0985947698354721,
0.19951540231704712,
0.18262438476085663,
-0.13684262335300446,
0.5043621063232422,
0.04321551322937012,
0.056196004152297974,
0.036174848675727844,
-0.22741970419883728,
0.23722538352012634,
-0.20685705542564392,
0.04593081772327423,
-0.2663237452507019,
-0.057869818061590195,
0.33067160844802856,
-0.22049230337142944,
0.08741335570812225,
0.17523090541362762,
-0.09427767246961594,
-0.010445468127727509,
0.805767297744751,
0.005263898521661758,
0.06409405171871185,
-0.2012140452861786,
0.08064084500074387,
-0.19088618457317352,
0.23832017183303833,
0.07156098634004593,
-0.4543539583683014,
-0.13701844215393066,
0.11433355510234833,
-0.12816880643367767,
-0.34139445424079895,
0.3352711796760559,
-0.0335036963224411,
0.4075165390968323,
-0.0230085588991642,
0.3289751410484314,
0.14224952459335327,
0.12647630274295807,
0.2072719782590866,
-0.23249194025993347,
-0.12685443460941315,
0.14523908495903015,
-0.3808571398258209,
0.17483794689178467,
0.17637676000595093,
0.29668959975242615,
-0.06376974284648895,
0.18299490213394165,
0.09322786331176758,
-0.1865077018737793,
0.07350356876850128,
0.12764933705329895,
0.33984503149986267,
0.12092773616313934,
0.13197243213653564,
0.012714873068034649,
0.004744298756122589,
-0.07475925981998444,
0.0249653123319149,
0.03207183629274368,
-0.02361433207988739,
-0.36054471135139465,
-0.24061250686645508,
0.22457337379455566,
0.23575444519519806,
-0.04856301099061966,
0.04526801407337189,
-0.21168439090251923,
-0.31318601965904236,
-0.20823295414447784,
0.16942721605300903,
0.4560171067714691,
0.053725115954875946,
0.49079784750938416,
0.3138803243637085,
0.16133393347263336,
-0.12674649059772491,
-0.5722315907478333,
-0.18036988377571106,
0.3171546459197998,
-0.1612580269575119,
-0.1637430340051651,
0.3268590569496155,
0.0613694041967392,
0.2865220010280609,
-0.27623450756073,
0.18724265694618225,
0.17346683144569397,
-0.016800913959741592,
-0.1587233990430832,
-0.2288750410079956,
0.17436447739601135,
0.1935788244009018,
0.27897870540618896,
0.21413390338420868,
-0.2745317816734314,
0.018914900720119476,
0.2086559236049652,
-0.22238484025001526,
-0.16894717514514923,
0.26481130719184875,
0.042567864060401917,
0.10715454816818237,
-0.138429656624794,
-0.5075430274009705,
0.11159837245941162,
-0.13575419783592224,
-0.26595938205718994,
-0.26108717918395996,
-0.20193415880203247,
-0.0996062159538269,
-0.22975555062294006,
0.3767795264720917,
0.5294708013534546,
-0.09896838665008545,
-0.029180433601140976,
-0.0063150180503726006,
0.13542237877845764,
0.08295197039842606,
0.035779211670160294,
-0.31141218543052673,
0.49217456579208374,
-0.1760828047990799,
-0.10474242269992828,
0.868653416633606,
-0.5204976201057434,
-0.05067667365074158,
0.36399927735328674,
0.11729878187179565,
-0.07188699394464493,
0.3070541024208069,
0.06187024340033531,
0.11707518249750137,
-0.09589488804340363,
0.03175264596939087,
0.40219706296920776,
-0.04654449224472046,
0.02345566637814045,
-0.15334810316562653,
0.03900083899497986,
0.2969614267349243,
0.3607647716999054,
0.0934305489063263,
0.2212415337562561,
-0.27348196506500244,
0.4947691261768341,
0.20715728402137756,
0.00373854860663414,
0.060567282140254974,
0.5123982429504395,
-0.39014285802841187,
-0.08273270726203918,
0.03902716189622879,
0.11307788640260696,
0.026666052639484406,
-0.04886316880583763,
-0.1335095763206482,
0.15623240172863007,
0.16262662410736084,
0.1614459753036499,
-0.4275050163269043,
0.02301519177854061,
-0.0830780416727066,
0.04276352748274803,
0.05673923343420029,
0.28403764963150024,
-0.1937219351530075,
0.2580309510231018,
0.028549548238515854,
0.3317638337612152,
0.017510315403342247,
-0.023406989872455597,
-0.3775361478328705,
0.20459289848804474,
-0.12001917511224747,
-0.25547704100608826,
0.28296709060668945,
-0.022836782038211823,
0.4561702311038971,
0.04208808392286301,
-0.17343220114707947,
0.13932430744171143,
0.17994439601898193,
-0.020908087491989136,
0.04133925214409828,
-0.20815543830394745,
0.02838706411421299,
-0.1349174678325653,
-0.04747176915407181,
0.5747932195663452,
0.24731674790382385,
-0.19312870502471924,
0.007398448884487152,
-0.05638420581817627,
-0.09503380954265594,
0.2234853208065033,
-0.052073411643505096,
0.18903601169586182,
0.0732775405049324,
0.2233697474002838,
-0.08493173122406006,
0.22737058997154236,
0.20469985902309418,
0.19900740683078766,
0.21412032842636108,
-0.0926080122590065,
-0.06868143379688263,
-0.22866639494895935,
0.28741052746772766,
0.2148696333169937,
0.03242797777056694,
-0.01442108303308487,
-0.29639166593551636,
0.0025035925209522247,
0.22511008381843567,
-0.06385231018066406,
0.2678775191307068,
0.17269742488861084,
-0.12468861043453217,
-0.00754878856241703,
0.0018161009065806866,
-0.10727781802415848,
0.44600293040275574,
0.05648136883974075,
0.26112040877342224,
-0.016631685197353363,
-0.10843143612146378,
-0.019783865660429,
-0.24262553453445435,
-0.2545628249645233,
0.027842896059155464,
0.2242686152458191,
-0.42473167181015015,
0.035679638385772705,
-0.20872488617897034,
-0.6600084900856018,
-0.23596185445785522,
-0.049445562064647675,
-0.16059936583042145,
-0.5055608749389648,
-0.16127747297286987,
0.32735416293144226,
0.014642488211393356,
0.12758317589759827,
-0.12058529257774353,
0.2305706888437271,
0.33199214935302734,
-0.2339307814836502,
-0.41851991415023804,
-0.1734267771244049,
-0.29965272545814514,
-0.03364299237728119,
0.1122230589389801,
0.13237322866916656,
0.13859839737415314,
0.1139131560921669,
-0.030663326382637024,
-0.06609787791967392,
-0.005705744028091431,
0.21524807810783386,
-0.10905660688877106,
0.1235097274184227,
0.2650184631347656,
0.3777042031288147,
-0.2389564961194992,
-0.09747014939785004,
0.3813406825065613,
0.002663128077983856,
0.1714814007282257,
0.3198920488357544,
0.03559166565537453,
-0.07547961175441742,
-0.10614433884620667,
-0.25005507469177246,
0.05141860991716385,
-0.6115217208862305,
-0.1775636374950409,
0.23730610311031342,
0.000051841139793395996,
0.15428651869297028,
0.2415063977241516,
0.18054284155368805,
0.12876780331134796,
0.3176608681678772,
0.016924263909459114,
-0.23874293267726898,
0.3329896032810211,
-0.1693129986524582,
-0.3372398316860199,
-0.1376378834247589,
0.11696569621562958,
0.23388788104057312,
0.21988999843597412,
-0.46016591787338257,
-0.38336536288261414,
0.2961047887802124,
-0.03479574993252754,
0.006530109792947769,
0.16944728791713715,
0.3062463104724884,
0.017128603532910347,
0.09248511493206024,
-0.2547697126865387,
-0.19896504282951355,
0.04688837751746178,
-0.22227346897125244,
0.2826959192752838,
0.2882087230682373,
0.3215000033378601,
-0.038476280868053436,
0.9122617840766907,
0.23742160201072693,
0.14308488368988037,
0.5309513211250305,
0.1021704152226448,
0.2991397976875305,
-0.03677090257406235,
-0.24229514598846436,
0.2306566834449768,
0.18123608827590942,
0.13666950166225433,
0.20913492143154144,
-0.24923962354660034,
-0.25546345114707947,
-0.40862396359443665,
-0.2131759524345398,
-0.2362276315689087,
-0.3552214205265045,
0.16340656578540802,
-0.3094652593135834,
0.25373029708862305,
-0.13851068913936615,
0.20273351669311523,
-0.3603171408176422,
-0.09952846169471741,
0.14941680431365967,
0.14400669932365417,
0.160201758146286,
0.11304952949285507,
-0.07522530108690262,
-0.060710880905389786,
-0.3460041880607605,
0.3344672918319702,
-0.12067768722772598,
0.3733888566493988,
-0.05666356161236763,
0.0655359998345375,
0.03895983844995499,
-0.05802946537733078,
0.713597297668457,
-0.3010062873363495,
-0.0036396607756614685,
0.24828460812568665,
0.22073844075202942,
-0.6750038266181946,
0.11390720307826996,
-0.11228692531585693,
0.2548104226589203,
0.004968170076608658,
-0.3782784044742584,
-0.4797845482826233,
-0.19211295247077942,
0.17425520718097687,
-0.07232864201068878,
-0.1652676910161972,
-0.08825333416461945,
-0.22018976509571075,
-0.32471609115600586,
-0.30970174074172974,
-0.10598408430814743,
-0.04440512880682945,
0.4491245150566101,
0.23013891279697418,
0.27297624945640564,
-0.14226122200489044,
0.0037114620208740234,
-0.023120470345020294,
-0.12722590565681458,
0.14489829540252686,
-0.0203227661550045,
-0.23666471242904663,
-0.19474823772907257,
0.5161570310592651,
-0.5861029624938965,
0.36507779359817505,
0.2983974814414978,
-0.6307682991027832,
-0.048727504909038544,
-0.018520968034863472,
0.28411591053009033,
0.21166397631168365,
-0.31098899245262146,
0.052807267755270004,
-0.04902728646993637,
-0.1705605387687683,
-0.00020359735935926437,
0.23041579127311707,
0.41071709990501404,
-0.3813045024871826,
-0.05218615382909775,
-0.5629244446754456,
0.4374677240848541,
-0.13509711623191833,
-0.010410450398921967,
0.2742978036403656,
-0.12945732474327087,
-0.1884312629699707,
0.6053574681282043,
-0.03186073899269104,
0.9742019772529602,
0.2021540105342865,
0.1885174661874771,
0.4231555461883545,
-0.12777674198150635,
0.622761607170105,
-0.12437380850315094,
0.32190418243408203,
-0.389394611120224,
0.04144727438688278,
-0.06381471455097198,
-0.17461083829402924,
-0.09305641800165176,
0.13327696919441223,
-0.26067280769348145,
0.2774873673915863,
0.07044894993305206,
-0.05497981235384941,
0.08896137773990631,
0.12558625638484955,
0.11164534837007523,
-0.10677187144756317,
-0.5512534379959106,
0.057797037065029144,
-0.4502732753753662,
0.01628904603421688,
-0.072995126247406,
-0.1618124395608902,
0.0773976594209671,
-0.5212675929069519,
-0.102923184633255,
0.16554754972457886,
-0.24027055501937866,
0.1557009518146515,
-0.05653611943125725,
-0.25477319955825806,
0.18542326986789703,
0.36229875683784485,
-0.020917430520057678,
0.056942835450172424,
-0.1994667500257492,
0.31147995591163635,
-0.5459028482437134,
-0.06956148892641068,
-0.15937966108322144,
0.3023843765258789,
0.2848663330078125,
-0.025128979235887527,
-0.14674288034439087,
0.33409276604652405,
-0.1659710556268692,
-0.6099491119384766,
-0.04951713979244232,
-0.08532626926898956,
0.4431840777397156,
-0.03684834763407707,
-0.20565465092658997,
0.07756856828927994,
-0.15242020785808563,
0.03554236516356468,
0.03950725868344307,
0.024493563920259476,
-0.20601783692836761,
0.06884953379631042,
-0.05289831385016441,
0.0025283321738243103,
0.1737150102853775,
0.4771813154220581,
0.0580921396613121,
0.025352053344249725,
0.5821671485900879,
0.274031400680542,
-0.025717314332723618,
-0.15860089659690857,
-0.23228120803833008,
-0.3409326374530792,
-0.6085491180419922,
0.19907329976558685,
0.3044445216655731,
0.06213432550430298,
0.08742460608482361,
0.20383943617343903,
-0.07797244191169739,
0.1705034077167511,
0.056089241057634354,
-0.30495765805244446,
0.11341362446546555,
0.2060198038816452,
-0.24361871182918549,
-0.06297646462917328,
0.4305717349052429,
-0.03239744156599045,
0.3100139796733856,
-0.14917728304862976,
-0.18580619990825653,
-0.12412562221288681,
-0.18789039552211761,
0.1358191967010498,
0.16001087427139282,
-0.22639650106430054,
-0.11575824022293091,
0.2592049539089203,
0.07067063450813293,
-0.24402837455272675,
-0.2439688742160797,
-0.06035751476883888,
-0.16677239537239075,
0.20026008784770966,
0.22434774041175842,
0.12140995264053345,
-0.12901966273784637,
-0.4042980670928955,
-0.12375026941299438,
-0.18162937462329865,
0.022590164095163345,
-0.1426827609539032,
-0.24291007220745087,
0.055743757635354996,
0.1504148542881012,
0.36744147539138794,
-0.5081478953361511,
0.19756866991519928,
0.07603896409273148,
-0.09266912937164307,
0.21329347789287567,
0.1916119009256363,
0.26245802640914917,
-0.04969266057014465,
-0.46626925468444824,
0.16151933372020721,
0.2004980742931366,
-0.03445540368556976,
0.529545247554779,
-0.18402670323848724,
-0.11347715556621552,
-0.10942408442497253,
-0.08067657053470612,
0.080779530107975,
-0.1513763815164566,
0.011796822771430016,
0.06921067088842392,
0.0332738496363163,
-0.15379419922828674,
0.04944710060954094,
0.32259345054626465,
0.20399503409862518,
-0.06518559902906418,
0.07361532747745514,
-0.08708719164133072,
-0.36611515283584595,
0.20963340997695923,
0.11635332554578781,
0.3633624315261841,
-0.1511387974023819,
-0.11197565495967865,
0.13395003974437714,
-0.034958772361278534,
-0.08543753623962402,
-0.052797965705394745,
0.2270287126302719,
0.05373949930071831,
0.29034948348999023,
-0.144478440284729,
0.0543755441904068,
-0.05644102394580841,
-0.3188200294971466,
-0.04710390418767929,
-0.15345399081707,
0.20089857280254364,
0.4862777292728424,
0.1516953408718109,
0.14434584975242615,
-0.1632327288389206,
0.19970715045928955,
0.04823414236307144,
0.11418979614973068,
-0.2721180021762848,
0.16049468517303467,
0.018279967829585075,
0.03101946786046028,
-0.6282179951667786,
-0.015780940651893616,
-0.4327569603919983,
-0.14489200711250305,
-0.004946254193782806,
-0.16302360594272614,
-0.030058741569519043,
0.21194221079349518,
-0.11699812114238739,
-0.37938427925109863,
0.21547383069992065,
0.12184816598892212,
-0.0333385244011879,
-0.15128915011882782,
0.20378023386001587,
0.08548735082149506,
0.11784428358078003,
0.19989067316055298,
0.2706089913845062,
0.3540657162666321,
0.4170273244380951,
-0.2698945105075836,
-0.1693301796913147,
0.2886005640029907,
0.0005996972322463989,
-0.20721597969532013,
-0.06146793067455292,
0.09717079997062683,
0.32109349966049194,
0.39598220586776733,
0.07382845133543015,
0.014399639330804348,
-0.00851411372423172,
0.12758144736289978,
-0.061321284621953964,
-0.2382631003856659,
0.47238051891326904,
-0.046352319419384,
-0.09188354760408401,
-0.3303665816783905,
0.0329027883708477,
-0.5663155913352966,
0.32977384328842163,
0.059532083570957184,
0.357300341129303,
-0.010647928342223167,
-0.20455652475357056,
-0.019939113408327103,
-0.06562705338001251,
0.3586011826992035,
0.3856939375400543,
0.374083936214447,
-0.30916276574134827,
-0.42480599880218506,
-0.4309867024421692,
0.15818773210048676,
0.16397488117218018,
-0.2411169409751892,
0.10705935209989548,
0.1998967081308365,
0.28318506479263306,
0.24040547013282776,
-0.1074826717376709,
-0.2510263919830322,
-0.05572628229856491,
0.17863789200782776,
-0.218936949968338,
-0.2895011007785797,
0.20643992722034454,
0.06966330111026764,
-0.1936570256948471,
-0.21789070963859558,
-0.14199374616146088,
0.00838556606322527,
0.09180378168821335,
-0.16567447781562805,
-0.3625207245349884,
0.1477169692516327,
0.08224141597747803,
-0.021816082298755646,
-0.0256651584059,
0.4474616050720215,
0.05809037387371063,
-0.0019749123603105545,
-0.18325549364089966,
-0.07431719452142715,
-0.1690213978290558,
-0.28163862228393555,
-0.1547076404094696,
0.5438709259033203,
-0.22133252024650574,
0.25255778431892395,
-0.3257875442504883,
0.24450860917568207,
-0.13348262012004852,
0.3438495695590973,
-0.146602600812912,
0.06482960283756256,
-0.46840864419937134,
0.3983728885650635,
-0.13448145985603333,
-0.06758611649274826,
-0.025552816689014435,
0.1462191641330719,
-0.4820396900177002,
-0.2730070650577545,
0.5664800405502319,
-0.5063443183898926,
-0.2313736528158188,
0.00631704181432724,
0.21578672528266907,
-0.4116668701171875,
0.3354259431362152,
-0.35841280221939087,
-0.03860654681921005,
0.28557878732681274,
-0.06732425838708878,
-0.1444847732782364,
0.16551581025123596,
-0.0476103350520134,
0.11225004494190216,
-0.08310577273368835,
-0.5315558910369873,
0.043798401951789856,
-0.1335090547800064,
-0.13964007794857025,
-0.2604454755783081
] |
https://github.com/huggingface/datasets/issues/508 | TypeError: Receiver() takes no arguments | Still, same error, so I guess it is on apache beam then.
Thanks for the investigation. | I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. | 16 | TypeError: Receiver() takes no arguments
I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
Still, same error, so I guess it is on apache beam then.
Thanks for the investigation. | [
-0.09465426206588745,
0.3181280195713043,
0.08749550580978394,
0.36292415857315063,
0.27408045530319214,
-0.0989537388086319,
0.2871831953525543,
0.23696555197238922,
-0.02867480367422104,
0.06884243339300156,
0.23884813487529755,
0.3297019898891449,
-0.09087178856134415,
-0.33632412552833557,
0.1751248687505722,
-0.5368744134902954,
-0.21418732404708862,
0.1947944462299347,
-0.23295292258262634,
-0.1850881278514862,
-0.1442270129919052,
0.3994986116886139,
-0.3325725197792053,
-0.07246468961238861,
-0.14122751355171204,
0.1027456670999527,
-0.07617750018835068,
0.1753544807434082,
-0.11846467107534409,
-0.3360362946987152,
0.1966995894908905,
-0.0673622190952301,
0.07337907701730728,
0.27500733733177185,
-0.000124508558656089,
0.3304242491722107,
0.6380138993263245,
-0.1410856693983078,
-0.541078507900238,
-0.0631844699382782,
-0.08117727190256119,
-0.23492559790611267,
0.1993425488471985,
-0.2498534619808197,
-0.20832324028015137,
-0.23526142537593842,
0.10239560902118683,
-0.05813661217689514,
0.35634011030197144,
0.2815554440021515,
0.0985947698354721,
0.19951540231704712,
0.18262438476085663,
-0.13684262335300446,
0.5043621063232422,
0.04321551322937012,
0.056196004152297974,
0.036174848675727844,
-0.22741970419883728,
0.23722538352012634,
-0.20685705542564392,
0.04593081772327423,
-0.2663237452507019,
-0.057869818061590195,
0.33067160844802856,
-0.22049230337142944,
0.08741335570812225,
0.17523090541362762,
-0.09427767246961594,
-0.010445468127727509,
0.805767297744751,
0.005263898521661758,
0.06409405171871185,
-0.2012140452861786,
0.08064084500074387,
-0.19088618457317352,
0.23832017183303833,
0.07156098634004593,
-0.4543539583683014,
-0.13701844215393066,
0.11433355510234833,
-0.12816880643367767,
-0.34139445424079895,
0.3352711796760559,
-0.0335036963224411,
0.4075165390968323,
-0.0230085588991642,
0.3289751410484314,
0.14224952459335327,
0.12647630274295807,
0.2072719782590866,
-0.23249194025993347,
-0.12685443460941315,
0.14523908495903015,
-0.3808571398258209,
0.17483794689178467,
0.17637676000595093,
0.29668959975242615,
-0.06376974284648895,
0.18299490213394165,
0.09322786331176758,
-0.1865077018737793,
0.07350356876850128,
0.12764933705329895,
0.33984503149986267,
0.12092773616313934,
0.13197243213653564,
0.012714873068034649,
0.004744298756122589,
-0.07475925981998444,
0.0249653123319149,
0.03207183629274368,
-0.02361433207988739,
-0.36054471135139465,
-0.24061250686645508,
0.22457337379455566,
0.23575444519519806,
-0.04856301099061966,
0.04526801407337189,
-0.21168439090251923,
-0.31318601965904236,
-0.20823295414447784,
0.16942721605300903,
0.4560171067714691,
0.053725115954875946,
0.49079784750938416,
0.3138803243637085,
0.16133393347263336,
-0.12674649059772491,
-0.5722315907478333,
-0.18036988377571106,
0.3171546459197998,
-0.1612580269575119,
-0.1637430340051651,
0.3268590569496155,
0.0613694041967392,
0.2865220010280609,
-0.27623450756073,
0.18724265694618225,
0.17346683144569397,
-0.016800913959741592,
-0.1587233990430832,
-0.2288750410079956,
0.17436447739601135,
0.1935788244009018,
0.27897870540618896,
0.21413390338420868,
-0.2745317816734314,
0.018914900720119476,
0.2086559236049652,
-0.22238484025001526,
-0.16894717514514923,
0.26481130719184875,
0.042567864060401917,
0.10715454816818237,
-0.138429656624794,
-0.5075430274009705,
0.11159837245941162,
-0.13575419783592224,
-0.26595938205718994,
-0.26108717918395996,
-0.20193415880203247,
-0.0996062159538269,
-0.22975555062294006,
0.3767795264720917,
0.5294708013534546,
-0.09896838665008545,
-0.029180433601140976,
-0.0063150180503726006,
0.13542237877845764,
0.08295197039842606,
0.035779211670160294,
-0.31141218543052673,
0.49217456579208374,
-0.1760828047990799,
-0.10474242269992828,
0.868653416633606,
-0.5204976201057434,
-0.05067667365074158,
0.36399927735328674,
0.11729878187179565,
-0.07188699394464493,
0.3070541024208069,
0.06187024340033531,
0.11707518249750137,
-0.09589488804340363,
0.03175264596939087,
0.40219706296920776,
-0.04654449224472046,
0.02345566637814045,
-0.15334810316562653,
0.03900083899497986,
0.2969614267349243,
0.3607647716999054,
0.0934305489063263,
0.2212415337562561,
-0.27348196506500244,
0.4947691261768341,
0.20715728402137756,
0.00373854860663414,
0.060567282140254974,
0.5123982429504395,
-0.39014285802841187,
-0.08273270726203918,
0.03902716189622879,
0.11307788640260696,
0.026666052639484406,
-0.04886316880583763,
-0.1335095763206482,
0.15623240172863007,
0.16262662410736084,
0.1614459753036499,
-0.4275050163269043,
0.02301519177854061,
-0.0830780416727066,
0.04276352748274803,
0.05673923343420029,
0.28403764963150024,
-0.1937219351530075,
0.2580309510231018,
0.028549548238515854,
0.3317638337612152,
0.017510315403342247,
-0.023406989872455597,
-0.3775361478328705,
0.20459289848804474,
-0.12001917511224747,
-0.25547704100608826,
0.28296709060668945,
-0.022836782038211823,
0.4561702311038971,
0.04208808392286301,
-0.17343220114707947,
0.13932430744171143,
0.17994439601898193,
-0.020908087491989136,
0.04133925214409828,
-0.20815543830394745,
0.02838706411421299,
-0.1349174678325653,
-0.04747176915407181,
0.5747932195663452,
0.24731674790382385,
-0.19312870502471924,
0.007398448884487152,
-0.05638420581817627,
-0.09503380954265594,
0.2234853208065033,
-0.052073411643505096,
0.18903601169586182,
0.0732775405049324,
0.2233697474002838,
-0.08493173122406006,
0.22737058997154236,
0.20469985902309418,
0.19900740683078766,
0.21412032842636108,
-0.0926080122590065,
-0.06868143379688263,
-0.22866639494895935,
0.28741052746772766,
0.2148696333169937,
0.03242797777056694,
-0.01442108303308487,
-0.29639166593551636,
0.0025035925209522247,
0.22511008381843567,
-0.06385231018066406,
0.2678775191307068,
0.17269742488861084,
-0.12468861043453217,
-0.00754878856241703,
0.0018161009065806866,
-0.10727781802415848,
0.44600293040275574,
0.05648136883974075,
0.26112040877342224,
-0.016631685197353363,
-0.10843143612146378,
-0.019783865660429,
-0.24262553453445435,
-0.2545628249645233,
0.027842896059155464,
0.2242686152458191,
-0.42473167181015015,
0.035679638385772705,
-0.20872488617897034,
-0.6600084900856018,
-0.23596185445785522,
-0.049445562064647675,
-0.16059936583042145,
-0.5055608749389648,
-0.16127747297286987,
0.32735416293144226,
0.014642488211393356,
0.12758317589759827,
-0.12058529257774353,
0.2305706888437271,
0.33199214935302734,
-0.2339307814836502,
-0.41851991415023804,
-0.1734267771244049,
-0.29965272545814514,
-0.03364299237728119,
0.1122230589389801,
0.13237322866916656,
0.13859839737415314,
0.1139131560921669,
-0.030663326382637024,
-0.06609787791967392,
-0.005705744028091431,
0.21524807810783386,
-0.10905660688877106,
0.1235097274184227,
0.2650184631347656,
0.3777042031288147,
-0.2389564961194992,
-0.09747014939785004,
0.3813406825065613,
0.002663128077983856,
0.1714814007282257,
0.3198920488357544,
0.03559166565537453,
-0.07547961175441742,
-0.10614433884620667,
-0.25005507469177246,
0.05141860991716385,
-0.6115217208862305,
-0.1775636374950409,
0.23730610311031342,
0.000051841139793395996,
0.15428651869297028,
0.2415063977241516,
0.18054284155368805,
0.12876780331134796,
0.3176608681678772,
0.016924263909459114,
-0.23874293267726898,
0.3329896032810211,
-0.1693129986524582,
-0.3372398316860199,
-0.1376378834247589,
0.11696569621562958,
0.23388788104057312,
0.21988999843597412,
-0.46016591787338257,
-0.38336536288261414,
0.2961047887802124,
-0.03479574993252754,
0.006530109792947769,
0.16944728791713715,
0.3062463104724884,
0.017128603532910347,
0.09248511493206024,
-0.2547697126865387,
-0.19896504282951355,
0.04688837751746178,
-0.22227346897125244,
0.2826959192752838,
0.2882087230682373,
0.3215000033378601,
-0.038476280868053436,
0.9122617840766907,
0.23742160201072693,
0.14308488368988037,
0.5309513211250305,
0.1021704152226448,
0.2991397976875305,
-0.03677090257406235,
-0.24229514598846436,
0.2306566834449768,
0.18123608827590942,
0.13666950166225433,
0.20913492143154144,
-0.24923962354660034,
-0.25546345114707947,
-0.40862396359443665,
-0.2131759524345398,
-0.2362276315689087,
-0.3552214205265045,
0.16340656578540802,
-0.3094652593135834,
0.25373029708862305,
-0.13851068913936615,
0.20273351669311523,
-0.3603171408176422,
-0.09952846169471741,
0.14941680431365967,
0.14400669932365417,
0.160201758146286,
0.11304952949285507,
-0.07522530108690262,
-0.060710880905389786,
-0.3460041880607605,
0.3344672918319702,
-0.12067768722772598,
0.3733888566493988,
-0.05666356161236763,
0.0655359998345375,
0.03895983844995499,
-0.05802946537733078,
0.713597297668457,
-0.3010062873363495,
-0.0036396607756614685,
0.24828460812568665,
0.22073844075202942,
-0.6750038266181946,
0.11390720307826996,
-0.11228692531585693,
0.2548104226589203,
0.004968170076608658,
-0.3782784044742584,
-0.4797845482826233,
-0.19211295247077942,
0.17425520718097687,
-0.07232864201068878,
-0.1652676910161972,
-0.08825333416461945,
-0.22018976509571075,
-0.32471609115600586,
-0.30970174074172974,
-0.10598408430814743,
-0.04440512880682945,
0.4491245150566101,
0.23013891279697418,
0.27297624945640564,
-0.14226122200489044,
0.0037114620208740234,
-0.023120470345020294,
-0.12722590565681458,
0.14489829540252686,
-0.0203227661550045,
-0.23666471242904663,
-0.19474823772907257,
0.5161570310592651,
-0.5861029624938965,
0.36507779359817505,
0.2983974814414978,
-0.6307682991027832,
-0.048727504909038544,
-0.018520968034863472,
0.28411591053009033,
0.21166397631168365,
-0.31098899245262146,
0.052807267755270004,
-0.04902728646993637,
-0.1705605387687683,
-0.00020359735935926437,
0.23041579127311707,
0.41071709990501404,
-0.3813045024871826,
-0.05218615382909775,
-0.5629244446754456,
0.4374677240848541,
-0.13509711623191833,
-0.010410450398921967,
0.2742978036403656,
-0.12945732474327087,
-0.1884312629699707,
0.6053574681282043,
-0.03186073899269104,
0.9742019772529602,
0.2021540105342865,
0.1885174661874771,
0.4231555461883545,
-0.12777674198150635,
0.622761607170105,
-0.12437380850315094,
0.32190418243408203,
-0.389394611120224,
0.04144727438688278,
-0.06381471455097198,
-0.17461083829402924,
-0.09305641800165176,
0.13327696919441223,
-0.26067280769348145,
0.2774873673915863,
0.07044894993305206,
-0.05497981235384941,
0.08896137773990631,
0.12558625638484955,
0.11164534837007523,
-0.10677187144756317,
-0.5512534379959106,
0.057797037065029144,
-0.4502732753753662,
0.01628904603421688,
-0.072995126247406,
-0.1618124395608902,
0.0773976594209671,
-0.5212675929069519,
-0.102923184633255,
0.16554754972457886,
-0.24027055501937866,
0.1557009518146515,
-0.05653611943125725,
-0.25477319955825806,
0.18542326986789703,
0.36229875683784485,
-0.020917430520057678,
0.056942835450172424,
-0.1994667500257492,
0.31147995591163635,
-0.5459028482437134,
-0.06956148892641068,
-0.15937966108322144,
0.3023843765258789,
0.2848663330078125,
-0.025128979235887527,
-0.14674288034439087,
0.33409276604652405,
-0.1659710556268692,
-0.6099491119384766,
-0.04951713979244232,
-0.08532626926898956,
0.4431840777397156,
-0.03684834763407707,
-0.20565465092658997,
0.07756856828927994,
-0.15242020785808563,
0.03554236516356468,
0.03950725868344307,
0.024493563920259476,
-0.20601783692836761,
0.06884953379631042,
-0.05289831385016441,
0.0025283321738243103,
0.1737150102853775,
0.4771813154220581,
0.0580921396613121,
0.025352053344249725,
0.5821671485900879,
0.274031400680542,
-0.025717314332723618,
-0.15860089659690857,
-0.23228120803833008,
-0.3409326374530792,
-0.6085491180419922,
0.19907329976558685,
0.3044445216655731,
0.06213432550430298,
0.08742460608482361,
0.20383943617343903,
-0.07797244191169739,
0.1705034077167511,
0.056089241057634354,
-0.30495765805244446,
0.11341362446546555,
0.2060198038816452,
-0.24361871182918549,
-0.06297646462917328,
0.4305717349052429,
-0.03239744156599045,
0.3100139796733856,
-0.14917728304862976,
-0.18580619990825653,
-0.12412562221288681,
-0.18789039552211761,
0.1358191967010498,
0.16001087427139282,
-0.22639650106430054,
-0.11575824022293091,
0.2592049539089203,
0.07067063450813293,
-0.24402837455272675,
-0.2439688742160797,
-0.06035751476883888,
-0.16677239537239075,
0.20026008784770966,
0.22434774041175842,
0.12140995264053345,
-0.12901966273784637,
-0.4042980670928955,
-0.12375026941299438,
-0.18162937462329865,
0.022590164095163345,
-0.1426827609539032,
-0.24291007220745087,
0.055743757635354996,
0.1504148542881012,
0.36744147539138794,
-0.5081478953361511,
0.19756866991519928,
0.07603896409273148,
-0.09266912937164307,
0.21329347789287567,
0.1916119009256363,
0.26245802640914917,
-0.04969266057014465,
-0.46626925468444824,
0.16151933372020721,
0.2004980742931366,
-0.03445540368556976,
0.529545247554779,
-0.18402670323848724,
-0.11347715556621552,
-0.10942408442497253,
-0.08067657053470612,
0.080779530107975,
-0.1513763815164566,
0.011796822771430016,
0.06921067088842392,
0.0332738496363163,
-0.15379419922828674,
0.04944710060954094,
0.32259345054626465,
0.20399503409862518,
-0.06518559902906418,
0.07361532747745514,
-0.08708719164133072,
-0.36611515283584595,
0.20963340997695923,
0.11635332554578781,
0.3633624315261841,
-0.1511387974023819,
-0.11197565495967865,
0.13395003974437714,
-0.034958772361278534,
-0.08543753623962402,
-0.052797965705394745,
0.2270287126302719,
0.05373949930071831,
0.29034948348999023,
-0.144478440284729,
0.0543755441904068,
-0.05644102394580841,
-0.3188200294971466,
-0.04710390418767929,
-0.15345399081707,
0.20089857280254364,
0.4862777292728424,
0.1516953408718109,
0.14434584975242615,
-0.1632327288389206,
0.19970715045928955,
0.04823414236307144,
0.11418979614973068,
-0.2721180021762848,
0.16049468517303467,
0.018279967829585075,
0.03101946786046028,
-0.6282179951667786,
-0.015780940651893616,
-0.4327569603919983,
-0.14489200711250305,
-0.004946254193782806,
-0.16302360594272614,
-0.030058741569519043,
0.21194221079349518,
-0.11699812114238739,
-0.37938427925109863,
0.21547383069992065,
0.12184816598892212,
-0.0333385244011879,
-0.15128915011882782,
0.20378023386001587,
0.08548735082149506,
0.11784428358078003,
0.19989067316055298,
0.2706089913845062,
0.3540657162666321,
0.4170273244380951,
-0.2698945105075836,
-0.1693301796913147,
0.2886005640029907,
0.0005996972322463989,
-0.20721597969532013,
-0.06146793067455292,
0.09717079997062683,
0.32109349966049194,
0.39598220586776733,
0.07382845133543015,
0.014399639330804348,
-0.00851411372423172,
0.12758144736289978,
-0.061321284621953964,
-0.2382631003856659,
0.47238051891326904,
-0.046352319419384,
-0.09188354760408401,
-0.3303665816783905,
0.0329027883708477,
-0.5663155913352966,
0.32977384328842163,
0.059532083570957184,
0.357300341129303,
-0.010647928342223167,
-0.20455652475357056,
-0.019939113408327103,
-0.06562705338001251,
0.3586011826992035,
0.3856939375400543,
0.374083936214447,
-0.30916276574134827,
-0.42480599880218506,
-0.4309867024421692,
0.15818773210048676,
0.16397488117218018,
-0.2411169409751892,
0.10705935209989548,
0.1998967081308365,
0.28318506479263306,
0.24040547013282776,
-0.1074826717376709,
-0.2510263919830322,
-0.05572628229856491,
0.17863789200782776,
-0.218936949968338,
-0.2895011007785797,
0.20643992722034454,
0.06966330111026764,
-0.1936570256948471,
-0.21789070963859558,
-0.14199374616146088,
0.00838556606322527,
0.09180378168821335,
-0.16567447781562805,
-0.3625207245349884,
0.1477169692516327,
0.08224141597747803,
-0.021816082298755646,
-0.0256651584059,
0.4474616050720215,
0.05809037387371063,
-0.0019749123603105545,
-0.18325549364089966,
-0.07431719452142715,
-0.1690213978290558,
-0.28163862228393555,
-0.1547076404094696,
0.5438709259033203,
-0.22133252024650574,
0.25255778431892395,
-0.3257875442504883,
0.24450860917568207,
-0.13348262012004852,
0.3438495695590973,
-0.146602600812912,
0.06482960283756256,
-0.46840864419937134,
0.3983728885650635,
-0.13448145985603333,
-0.06758611649274826,
-0.025552816689014435,
0.1462191641330719,
-0.4820396900177002,
-0.2730070650577545,
0.5664800405502319,
-0.5063443183898926,
-0.2313736528158188,
0.00631704181432724,
0.21578672528266907,
-0.4116668701171875,
0.3354259431362152,
-0.35841280221939087,
-0.03860654681921005,
0.28557878732681274,
-0.06732425838708878,
-0.1444847732782364,
0.16551581025123596,
-0.0476103350520134,
0.11225004494190216,
-0.08310577273368835,
-0.5315558910369873,
0.043798401951789856,
-0.1335090547800064,
-0.13964007794857025,
-0.2604454755783081
] |
https://github.com/huggingface/datasets/issues/508 | TypeError: Receiver() takes no arguments | Thanks for trying
Let us know if you find clues of what caused this issue, or if you find a fix | I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump. | 21 | TypeError: Receiver() takes no arguments
I am trying to load a wikipedia data set
```
import nlp
from nlp import load_dataset
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=data_path, beam_runner='DirectRunner')
#dataset = load_dataset('wikipedia', '20200501.sv', cache_dir=data_path, beam_runner='DirectRunner')
```
This fails in the apache beam runner.
```
Traceback (most recent call last):
File "D:/ML/wikiembedding/gpt2_sv.py", line 36, in <module>
dataset = load_dataset("wikipedia", "20200501.en", split="train", cache_dir=my_cache_dir, beam_runner='DirectRunner')
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\load.py", line 548, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 462, in download_and_prepare
self._download_and_prepare(
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\nlp\builder.py", line 969, in _download_and_prepare
pipeline_results = pipeline.run()
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\pipeline.py", line 534, in run
return self.runner.run_pipeline(self, self._options)
....
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 218, in process_encoded
self.output(decoded_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\apache_beam\runners\worker\operations.py", line 332, in output
cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
File "C:\Users\seto\AppData\Local\Programs\Python\Python38\lib\site-packages\Cython\Shadow.py", line 167, in cast
return type(*args)
TypeError: Receiver() takes no arguments
```
This is run on a Windows 10 machine with python 3.8. I get the same error loading the swedish wikipedia dump.
Thanks for trying
Let us know if you find clues of what caused this issue, or if you find a fix | [
-0.09465426206588745,
0.3181280195713043,
0.08749550580978394,
0.36292415857315063,
0.27408045530319214,
-0.0989537388086319,
0.2871831953525543,
0.23696555197238922,
-0.02867480367422104,
0.06884243339300156,
0.23884813487529755,
0.3297019898891449,
-0.09087178856134415,
-0.33632412552833557,
0.1751248687505722,
-0.5368744134902954,
-0.21418732404708862,
0.1947944462299347,
-0.23295292258262634,
-0.1850881278514862,
-0.1442270129919052,
0.3994986116886139,
-0.3325725197792053,
-0.07246468961238861,
-0.14122751355171204,
0.1027456670999527,
-0.07617750018835068,
0.1753544807434082,
-0.11846467107534409,
-0.3360362946987152,
0.1966995894908905,
-0.0673622190952301,
0.07337907701730728,
0.27500733733177185,
-0.000124508558656089,
0.3304242491722107,
0.6380138993263245,
-0.1410856693983078,
-0.541078507900238,
-0.0631844699382782,
-0.08117727190256119,
-0.23492559790611267,
0.1993425488471985,
-0.2498534619808197,
-0.20832324028015137,
-0.23526142537593842,
0.10239560902118683,
-0.05813661217689514,
0.35634011030197144,
0.2815554440021515,
0.0985947698354721,
0.19951540231704712,
0.18262438476085663,
-0.13684262335300446,
0.5043621063232422,
0.04321551322937012,
0.056196004152297974,
0.036174848675727844,
-0.22741970419883728,
0.23722538352012634,
-0.20685705542564392,
0.04593081772327423,
-0.2663237452507019,
-0.057869818061590195,
0.33067160844802856,
-0.22049230337142944,
0.08741335570812225,
0.17523090541362762,
-0.09427767246961594,
-0.010445468127727509,
0.805767297744751,
0.005263898521661758,
0.06409405171871185,
-0.2012140452861786,
0.08064084500074387,
-0.19088618457317352,
0.23832017183303833,
0.07156098634004593,
-0.4543539583683014,
-0.13701844215393066,
0.11433355510234833,
-0.12816880643367767,
-0.34139445424079895,
0.3352711796760559,
-0.0335036963224411,
0.4075165390968323,
-0.0230085588991642,
0.3289751410484314,
0.14224952459335327,
0.12647630274295807,
0.2072719782590866,
-0.23249194025993347,
-0.12685443460941315,
0.14523908495903015,
-0.3808571398258209,
0.17483794689178467,
0.17637676000595093,
0.29668959975242615,
-0.06376974284648895,
0.18299490213394165,
0.09322786331176758,
-0.1865077018737793,
0.07350356876850128,
0.12764933705329895,
0.33984503149986267,
0.12092773616313934,
0.13197243213653564,
0.012714873068034649,
0.004744298756122589,
-0.07475925981998444,
0.0249653123319149,
0.03207183629274368,
-0.02361433207988739,
-0.36054471135139465,
-0.24061250686645508,
0.22457337379455566,
0.23575444519519806,
-0.04856301099061966,
0.04526801407337189,
-0.21168439090251923,
-0.31318601965904236,
-0.20823295414447784,
0.16942721605300903,
0.4560171067714691,
0.053725115954875946,
0.49079784750938416,
0.3138803243637085,
0.16133393347263336,
-0.12674649059772491,
-0.5722315907478333,
-0.18036988377571106,
0.3171546459197998,
-0.1612580269575119,
-0.1637430340051651,
0.3268590569496155,
0.0613694041967392,
0.2865220010280609,
-0.27623450756073,
0.18724265694618225,
0.17346683144569397,
-0.016800913959741592,
-0.1587233990430832,
-0.2288750410079956,
0.17436447739601135,
0.1935788244009018,
0.27897870540618896,
0.21413390338420868,
-0.2745317816734314,
0.018914900720119476,
0.2086559236049652,
-0.22238484025001526,
-0.16894717514514923,
0.26481130719184875,
0.042567864060401917,
0.10715454816818237,
-0.138429656624794,
-0.5075430274009705,
0.11159837245941162,
-0.13575419783592224,
-0.26595938205718994,
-0.26108717918395996,
-0.20193415880203247,
-0.0996062159538269,
-0.22975555062294006,
0.3767795264720917,
0.5294708013534546,
-0.09896838665008545,
-0.029180433601140976,
-0.0063150180503726006,
0.13542237877845764,
0.08295197039842606,
0.035779211670160294,
-0.31141218543052673,
0.49217456579208374,
-0.1760828047990799,
-0.10474242269992828,
0.868653416633606,
-0.5204976201057434,
-0.05067667365074158,
0.36399927735328674,
0.11729878187179565,
-0.07188699394464493,
0.3070541024208069,
0.06187024340033531,
0.11707518249750137,
-0.09589488804340363,
0.03175264596939087,
0.40219706296920776,
-0.04654449224472046,
0.02345566637814045,
-0.15334810316562653,
0.03900083899497986,
0.2969614267349243,
0.3607647716999054,
0.0934305489063263,
0.2212415337562561,
-0.27348196506500244,
0.4947691261768341,
0.20715728402137756,
0.00373854860663414,
0.060567282140254974,
0.5123982429504395,
-0.39014285802841187,
-0.08273270726203918,
0.03902716189622879,
0.11307788640260696,
0.026666052639484406,
-0.04886316880583763,
-0.1335095763206482,
0.15623240172863007,
0.16262662410736084,
0.1614459753036499,
-0.4275050163269043,
0.02301519177854061,
-0.0830780416727066,
0.04276352748274803,
0.05673923343420029,
0.28403764963150024,
-0.1937219351530075,
0.2580309510231018,
0.028549548238515854,
0.3317638337612152,
0.017510315403342247,
-0.023406989872455597,
-0.3775361478328705,
0.20459289848804474,
-0.12001917511224747,
-0.25547704100608826,
0.28296709060668945,
-0.022836782038211823,
0.4561702311038971,
0.04208808392286301,
-0.17343220114707947,
0.13932430744171143,
0.17994439601898193,
-0.020908087491989136,
0.04133925214409828,
-0.20815543830394745,
0.02838706411421299,
-0.1349174678325653,
-0.04747176915407181,
0.5747932195663452,
0.24731674790382385,
-0.19312870502471924,
0.007398448884487152,
-0.05638420581817627,
-0.09503380954265594,
0.2234853208065033,
-0.052073411643505096,
0.18903601169586182,
0.0732775405049324,
0.2233697474002838,
-0.08493173122406006,
0.22737058997154236,
0.20469985902309418,
0.19900740683078766,
0.21412032842636108,
-0.0926080122590065,
-0.06868143379688263,
-0.22866639494895935,
0.28741052746772766,
0.2148696333169937,
0.03242797777056694,
-0.01442108303308487,
-0.29639166593551636,
0.0025035925209522247,
0.22511008381843567,
-0.06385231018066406,
0.2678775191307068,
0.17269742488861084,
-0.12468861043453217,
-0.00754878856241703,
0.0018161009065806866,
-0.10727781802415848,
0.44600293040275574,
0.05648136883974075,
0.26112040877342224,
-0.016631685197353363,
-0.10843143612146378,
-0.019783865660429,
-0.24262553453445435,
-0.2545628249645233,
0.027842896059155464,
0.2242686152458191,
-0.42473167181015015,
0.035679638385772705,
-0.20872488617897034,
-0.6600084900856018,
-0.23596185445785522,
-0.049445562064647675,
-0.16059936583042145,
-0.5055608749389648,
-0.16127747297286987,
0.32735416293144226,
0.014642488211393356,
0.12758317589759827,
-0.12058529257774353,
0.2305706888437271,
0.33199214935302734,
-0.2339307814836502,
-0.41851991415023804,
-0.1734267771244049,
-0.29965272545814514,
-0.03364299237728119,
0.1122230589389801,
0.13237322866916656,
0.13859839737415314,
0.1139131560921669,
-0.030663326382637024,
-0.06609787791967392,
-0.005705744028091431,
0.21524807810783386,
-0.10905660688877106,
0.1235097274184227,
0.2650184631347656,
0.3777042031288147,
-0.2389564961194992,
-0.09747014939785004,
0.3813406825065613,
0.002663128077983856,
0.1714814007282257,
0.3198920488357544,
0.03559166565537453,
-0.07547961175441742,
-0.10614433884620667,
-0.25005507469177246,
0.05141860991716385,
-0.6115217208862305,
-0.1775636374950409,
0.23730610311031342,
0.000051841139793395996,
0.15428651869297028,
0.2415063977241516,
0.18054284155368805,
0.12876780331134796,
0.3176608681678772,
0.016924263909459114,
-0.23874293267726898,
0.3329896032810211,
-0.1693129986524582,
-0.3372398316860199,
-0.1376378834247589,
0.11696569621562958,
0.23388788104057312,
0.21988999843597412,
-0.46016591787338257,
-0.38336536288261414,
0.2961047887802124,
-0.03479574993252754,
0.006530109792947769,
0.16944728791713715,
0.3062463104724884,
0.017128603532910347,
0.09248511493206024,
-0.2547697126865387,
-0.19896504282951355,
0.04688837751746178,
-0.22227346897125244,
0.2826959192752838,
0.2882087230682373,
0.3215000033378601,
-0.038476280868053436,
0.9122617840766907,
0.23742160201072693,
0.14308488368988037,
0.5309513211250305,
0.1021704152226448,
0.2991397976875305,
-0.03677090257406235,
-0.24229514598846436,
0.2306566834449768,
0.18123608827590942,
0.13666950166225433,
0.20913492143154144,
-0.24923962354660034,
-0.25546345114707947,
-0.40862396359443665,
-0.2131759524345398,
-0.2362276315689087,
-0.3552214205265045,
0.16340656578540802,
-0.3094652593135834,
0.25373029708862305,
-0.13851068913936615,
0.20273351669311523,
-0.3603171408176422,
-0.09952846169471741,
0.14941680431365967,
0.14400669932365417,
0.160201758146286,
0.11304952949285507,
-0.07522530108690262,
-0.060710880905389786,
-0.3460041880607605,
0.3344672918319702,
-0.12067768722772598,
0.3733888566493988,
-0.05666356161236763,
0.0655359998345375,
0.03895983844995499,
-0.05802946537733078,
0.713597297668457,
-0.3010062873363495,
-0.0036396607756614685,
0.24828460812568665,
0.22073844075202942,
-0.6750038266181946,
0.11390720307826996,
-0.11228692531585693,
0.2548104226589203,
0.004968170076608658,
-0.3782784044742584,
-0.4797845482826233,
-0.19211295247077942,
0.17425520718097687,
-0.07232864201068878,
-0.1652676910161972,
-0.08825333416461945,
-0.22018976509571075,
-0.32471609115600586,
-0.30970174074172974,
-0.10598408430814743,
-0.04440512880682945,
0.4491245150566101,
0.23013891279697418,
0.27297624945640564,
-0.14226122200489044,
0.0037114620208740234,
-0.023120470345020294,
-0.12722590565681458,
0.14489829540252686,
-0.0203227661550045,
-0.23666471242904663,
-0.19474823772907257,
0.5161570310592651,
-0.5861029624938965,
0.36507779359817505,
0.2983974814414978,
-0.6307682991027832,
-0.048727504909038544,
-0.018520968034863472,
0.28411591053009033,
0.21166397631168365,
-0.31098899245262146,
0.052807267755270004,
-0.04902728646993637,
-0.1705605387687683,
-0.00020359735935926437,
0.23041579127311707,
0.41071709990501404,
-0.3813045024871826,
-0.05218615382909775,
-0.5629244446754456,
0.4374677240848541,
-0.13509711623191833,
-0.010410450398921967,
0.2742978036403656,
-0.12945732474327087,
-0.1884312629699707,
0.6053574681282043,
-0.03186073899269104,
0.9742019772529602,
0.2021540105342865,
0.1885174661874771,
0.4231555461883545,
-0.12777674198150635,
0.622761607170105,
-0.12437380850315094,
0.32190418243408203,
-0.389394611120224,
0.04144727438688278,
-0.06381471455097198,
-0.17461083829402924,
-0.09305641800165176,
0.13327696919441223,
-0.26067280769348145,
0.2774873673915863,
0.07044894993305206,
-0.05497981235384941,
0.08896137773990631,
0.12558625638484955,
0.11164534837007523,
-0.10677187144756317,
-0.5512534379959106,
0.057797037065029144,
-0.4502732753753662,
0.01628904603421688,
-0.072995126247406,
-0.1618124395608902,
0.0773976594209671,
-0.5212675929069519,
-0.102923184633255,
0.16554754972457886,
-0.24027055501937866,
0.1557009518146515,
-0.05653611943125725,
-0.25477319955825806,
0.18542326986789703,
0.36229875683784485,
-0.020917430520057678,
0.056942835450172424,
-0.1994667500257492,
0.31147995591163635,
-0.5459028482437134,
-0.06956148892641068,
-0.15937966108322144,
0.3023843765258789,
0.2848663330078125,
-0.025128979235887527,
-0.14674288034439087,
0.33409276604652405,
-0.1659710556268692,
-0.6099491119384766,
-0.04951713979244232,
-0.08532626926898956,
0.4431840777397156,
-0.03684834763407707,
-0.20565465092658997,
0.07756856828927994,
-0.15242020785808563,
0.03554236516356468,
0.03950725868344307,
0.024493563920259476,
-0.20601783692836761,
0.06884953379631042,
-0.05289831385016441,
0.0025283321738243103,
0.1737150102853775,
0.4771813154220581,
0.0580921396613121,
0.025352053344249725,
0.5821671485900879,
0.274031400680542,
-0.025717314332723618,
-0.15860089659690857,
-0.23228120803833008,
-0.3409326374530792,
-0.6085491180419922,
0.19907329976558685,
0.3044445216655731,
0.06213432550430298,
0.08742460608482361,
0.20383943617343903,
-0.07797244191169739,
0.1705034077167511,
0.056089241057634354,
-0.30495765805244446,
0.11341362446546555,
0.2060198038816452,
-0.24361871182918549,
-0.06297646462917328,
0.4305717349052429,
-0.03239744156599045,
0.3100139796733856,
-0.14917728304862976,
-0.18580619990825653,
-0.12412562221288681,
-0.18789039552211761,
0.1358191967010498,
0.16001087427139282,
-0.22639650106430054,
-0.11575824022293091,
0.2592049539089203,
0.07067063450813293,
-0.24402837455272675,
-0.2439688742160797,
-0.06035751476883888,
-0.16677239537239075,
0.20026008784770966,
0.22434774041175842,
0.12140995264053345,
-0.12901966273784637,
-0.4042980670928955,
-0.12375026941299438,
-0.18162937462329865,
0.022590164095163345,
-0.1426827609539032,
-0.24291007220745087,
0.055743757635354996,
0.1504148542881012,
0.36744147539138794,
-0.5081478953361511,
0.19756866991519928,
0.07603896409273148,
-0.09266912937164307,
0.21329347789287567,
0.1916119009256363,
0.26245802640914917,
-0.04969266057014465,
-0.46626925468444824,
0.16151933372020721,
0.2004980742931366,
-0.03445540368556976,
0.529545247554779,
-0.18402670323848724,
-0.11347715556621552,
-0.10942408442497253,
-0.08067657053470612,
0.080779530107975,
-0.1513763815164566,
0.011796822771430016,
0.06921067088842392,
0.0332738496363163,
-0.15379419922828674,
0.04944710060954094,
0.32259345054626465,
0.20399503409862518,
-0.06518559902906418,
0.07361532747745514,
-0.08708719164133072,
-0.36611515283584595,
0.20963340997695923,
0.11635332554578781,
0.3633624315261841,
-0.1511387974023819,
-0.11197565495967865,
0.13395003974437714,
-0.034958772361278534,
-0.08543753623962402,
-0.052797965705394745,
0.2270287126302719,
0.05373949930071831,
0.29034948348999023,
-0.144478440284729,
0.0543755441904068,
-0.05644102394580841,
-0.3188200294971466,
-0.04710390418767929,
-0.15345399081707,
0.20089857280254364,
0.4862777292728424,
0.1516953408718109,
0.14434584975242615,
-0.1632327288389206,
0.19970715045928955,
0.04823414236307144,
0.11418979614973068,
-0.2721180021762848,
0.16049468517303467,
0.018279967829585075,
0.03101946786046028,
-0.6282179951667786,
-0.015780940651893616,
-0.4327569603919983,
-0.14489200711250305,
-0.004946254193782806,
-0.16302360594272614,
-0.030058741569519043,
0.21194221079349518,
-0.11699812114238739,
-0.37938427925109863,
0.21547383069992065,
0.12184816598892212,
-0.0333385244011879,
-0.15128915011882782,
0.20378023386001587,
0.08548735082149506,
0.11784428358078003,
0.19989067316055298,
0.2706089913845062,
0.3540657162666321,
0.4170273244380951,
-0.2698945105075836,
-0.1693301796913147,
0.2886005640029907,
0.0005996972322463989,
-0.20721597969532013,
-0.06146793067455292,
0.09717079997062683,
0.32109349966049194,
0.39598220586776733,
0.07382845133543015,
0.014399639330804348,
-0.00851411372423172,
0.12758144736289978,
-0.061321284621953964,
-0.2382631003856659,
0.47238051891326904,
-0.046352319419384,
-0.09188354760408401,
-0.3303665816783905,
0.0329027883708477,
-0.5663155913352966,
0.32977384328842163,
0.059532083570957184,
0.357300341129303,
-0.010647928342223167,
-0.20455652475357056,
-0.019939113408327103,
-0.06562705338001251,
0.3586011826992035,
0.3856939375400543,
0.374083936214447,
-0.30916276574134827,
-0.42480599880218506,
-0.4309867024421692,
0.15818773210048676,
0.16397488117218018,
-0.2411169409751892,
0.10705935209989548,
0.1998967081308365,
0.28318506479263306,
0.24040547013282776,
-0.1074826717376709,
-0.2510263919830322,
-0.05572628229856491,
0.17863789200782776,
-0.218936949968338,
-0.2895011007785797,
0.20643992722034454,
0.06966330111026764,
-0.1936570256948471,
-0.21789070963859558,
-0.14199374616146088,
0.00838556606322527,
0.09180378168821335,
-0.16567447781562805,
-0.3625207245349884,
0.1477169692516327,
0.08224141597747803,
-0.021816082298755646,
-0.0256651584059,
0.4474616050720215,
0.05809037387371063,
-0.0019749123603105545,
-0.18325549364089966,
-0.07431719452142715,
-0.1690213978290558,
-0.28163862228393555,
-0.1547076404094696,
0.5438709259033203,
-0.22133252024650574,
0.25255778431892395,
-0.3257875442504883,
0.24450860917568207,
-0.13348262012004852,
0.3438495695590973,
-0.146602600812912,
0.06482960283756256,
-0.46840864419937134,
0.3983728885650635,
-0.13448145985603333,
-0.06758611649274826,
-0.025552816689014435,
0.1462191641330719,
-0.4820396900177002,
-0.2730070650577545,
0.5664800405502319,
-0.5063443183898926,
-0.2313736528158188,
0.00631704181432724,
0.21578672528266907,
-0.4116668701171875,
0.3354259431362152,
-0.35841280221939087,
-0.03860654681921005,
0.28557878732681274,
-0.06732425838708878,
-0.1444847732782364,
0.16551581025123596,
-0.0476103350520134,
0.11225004494190216,
-0.08310577273368835,
-0.5315558910369873,
0.043798401951789856,
-0.1335090547800064,
-0.13964007794857025,
-0.2604454755783081
] |
https://github.com/huggingface/datasets/issues/507 | Errors when I use | Looks like an issue with 3.0.2 transformers version. Works fine when I use "master" version of transformers. | I tried the following example code from https://huggingface.co/deepset/roberta-base-squad2 and got errors
I am using **transformers 3.0.2** code .
from transformers.pipelines import pipeline
from transformers.modeling_auto import AutoModelForQuestionAnswering
from transformers.tokenization_auto import AutoTokenizer
model_name = "deepset/roberta-base-squad2"
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
QA_input = {
'question': 'Why is model conversion important?',
'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.'
}
res = nlp(QA_input)
The errors are :
res = nlp(QA_input)
File ".local/lib/python3.6/site-packages/transformers/pipelines.py", line 1316, in __call__
for s, e, score in zip(starts, ends, scores)
File ".local/lib/python3.6/site-packages/transformers/pipelines.py", line 1316, in <listcomp>
for s, e, score in zip(starts, ends, scores)
KeyError: 0
| 17 | Errors when I use
I tried the following example code from https://huggingface.co/deepset/roberta-base-squad2 and got errors
I am using **transformers 3.0.2** code .
from transformers.pipelines import pipeline
from transformers.modeling_auto import AutoModelForQuestionAnswering
from transformers.tokenization_auto import AutoTokenizer
model_name = "deepset/roberta-base-squad2"
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
QA_input = {
'question': 'Why is model conversion important?',
'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.'
}
res = nlp(QA_input)
The errors are :
res = nlp(QA_input)
File ".local/lib/python3.6/site-packages/transformers/pipelines.py", line 1316, in __call__
for s, e, score in zip(starts, ends, scores)
File ".local/lib/python3.6/site-packages/transformers/pipelines.py", line 1316, in <listcomp>
for s, e, score in zip(starts, ends, scores)
KeyError: 0
Looks like an issue with 3.0.2 transformers version. Works fine when I use "master" version of transformers. | [
0.1425894945859909,
-0.3862660229206085,
0.10190004110336304,
0.2882797122001648,
-0.0408770814538002,
-0.003729894757270813,
0.36078912019729614,
0.286632239818573,
-0.23267029225826263,
-0.036164239048957825,
0.11111921072006226,
0.17491081357002258,
-0.30201056599617004,
-0.13477544486522675,
-0.1869155317544937,
-0.2722381055355072,
0.22310003638267517,
0.16487060487270355,
-0.22499582171440125,
-0.07556290179491043,
-0.09814159572124481,
0.4294787347316742,
-0.5823257565498352,
0.3994290828704834,
-0.6540247797966003,
0.06348349899053574,
-0.09769372642040253,
-0.08822288364171982,
0.21798957884311676,
-0.4048302471637726,
0.16647419333457947,
-0.13799402117729187,
0.4408758282661438,
0.4950670897960663,
-0.00011285571963526309,
0.06629328429698944,
0.5166268348693848,
0.003433695062994957,
-0.1831674426794052,
-0.4616502523422241,
-0.09586647152900696,
-0.02167971432209015,
0.2401290237903595,
-0.1488671898841858,
0.10993567854166031,
-0.00959059875458479,
0.11236337572336197,
0.11614884436130524,
0.6158460378646851,
0.26044970750808716,
0.2036687582731247,
0.5679879188537598,
0.16067321598529816,
-0.1586018055677414,
0.03865066543221474,
0.06511954218149185,
-0.16223472356796265,
-0.25322243571281433,
-0.07118557393550873,
-0.15412405133247375,
0.0513453371822834,
0.34336748719215393,
-0.154583141207695,
-0.3195067346096039,
0.19651031494140625,
-0.02486555650830269,
0.3771713078022003,
-0.6403250694274902,
0.17681342363357544,
0.34471485018730164,
-0.022076420485973358,
0.02970953844487667,
-0.43387898802757263,
-0.370990514755249,
-0.04777395725250244,
0.0846327394247055,
0.07156502455472946,
-0.057592667639255524,
-0.10821886360645294,
-0.03203708305954933,
-0.3570268154144287,
0.11109143495559692,
-0.25770533084869385,
-0.038713522255420685,
-0.005688849836587906,
0.7290470600128174,
-0.00431474857032299,
0.11541955173015594,
0.026356028392910957,
-0.398836612701416,
0.11193566769361496,
-0.08867569267749786,
-0.11080819368362427,
0.2810792624950409,
-0.4623842239379883,
-0.4678984582424164,
-0.10544981807470322,
-0.014150649309158325,
-0.12585954368114471,
0.1329769790172577,
-0.04763545095920563,
-0.040070801973342896,
0.11469446122646332,
0.050595901906490326,
0.2708023488521576,
0.37767472863197327,
0.3136991262435913,
0.3700648546218872,
0.3415612578392029,
-0.00408647395670414,
0.15954624116420746,
-0.01969313994050026,
-0.48878446221351624,
-0.02262093499302864,
0.09474307298660278,
0.16827073693275452,
0.2845749855041504,
-0.040379807353019714,
0.06958327442407608,
-0.08895544707775116,
-0.272549569606781,
0.030897242948412895,
0.28774529695510864,
0.3125792443752289,
0.16070838272571564,
0.408132404088974,
-0.044281478971242905,
0.3618611693382263,
-0.15409208834171295,
-0.47883671522140503,
-0.04824533686041832,
-0.02482067048549652,
-0.13053838908672333,
0.02590334601700306,
0.18326818943023682,
0.36353549361228943,
0.29596397280693054,
-0.31332364678382874,
0.15741145610809326,
0.19291120767593384,
0.06968463212251663,
-0.26522257924079895,
-0.1392066478729248,
0.22219443321228027,
0.0477907620370388,
0.12352793663740158,
0.2732221186161041,
-0.15461629629135132,
-0.026914499700069427,
0.28888392448425293,
-0.15267011523246765,
-0.07309317588806152,
0.03826785832643509,
0.12809568643569946,
-0.1564273089170456,
-0.20495952665805817,
-0.10685103386640549,
0.14244163036346436,
0.26015058159828186,
-0.019687995314598083,
-0.15115594863891602,
-0.26804572343826294,
-0.07123009115457535,
-0.027350477874279022,
0.015234177932143211,
0.4272628426551819,
0.12178413569927216,
-0.2629703879356384,
-0.007493449375033379,
0.14398892223834991,
-0.1053132489323616,
0.16603274643421173,
-0.05942641198635101,
0.23975390195846558,
-0.006709186360239983,
0.3142332434654236,
0.3387302756309509,
-0.23479557037353516,
0.06108275055885315,
0.15116676688194275,
-0.010912664234638214,
-0.2349625527858734,
0.05589485913515091,
-0.18205204606056213,
0.1183113157749176,
-0.22716602683067322,
-0.07244656980037689,
-0.1401997208595276,
0.008308861404657364,
0.161110058426857,
-0.09774598479270935,
-0.21601910889148712,
-0.03986307978630066,
0.2065846174955368,
0.16629792749881744,
0.1019943505525589,
-0.3797045350074768,
0.531324565410614,
-0.1683851182460785,
-0.19078056514263153,
0.17800846695899963,
-0.09161610901355743,
0.40593233704566956,
-0.24185945093631744,
0.07686848938465118,
-0.10728788375854492,
-0.27314749360084534,
0.22033187747001648,
-0.49802166223526,
0.19645634293556213,
-0.052173033356666565,
0.2371755689382553,
-0.1382562518119812,
0.08033774793148041,
-0.18171270191669464,
-0.07709620893001556,
0.1701812595129013,
-0.07762482762336731,
0.1599171757698059,
0.11368754506111145,
-0.2996765971183777,
-0.08669331669807434,
0.486461341381073,
0.07555840164422989,
-0.38000720739364624,
0.2390681356191635,
-0.2562909722328186,
-0.32215404510498047,
-0.1728244125843048,
0.18001969158649445,
0.41334372758865356,
0.1605980545282364,
-0.060364000499248505,
0.2198891043663025,
-0.21347129344940186,
-0.09203590452671051,
-0.10085207968950272,
0.3315393924713135,
0.241849884390831,
-0.3857056796550751,
0.1534547060728073,
0.49651360511779785,
0.17352987825870514,
0.1489475965499878,
0.13905902206897736,
0.41174429655075073,
0.049088604748249054,
0.14753250777721405,
0.08933927118778229,
0.14361058175563812,
0.027317898347973824,
-0.19758498668670654,
-0.17866428196430206,
-0.04894968122243881,
0.01249585673213005,
0.06536736339330673,
-0.020929895341396332,
-0.3088860809803009,
0.08542972803115845,
-0.19010934233665466,
0.49911001324653625,
-0.022007428109645844,
0.16195422410964966,
0.1475793570280075,
-0.4284461736679077,
0.040990859270095825,
-0.1600484549999237,
0.22723551094532013,
0.31097322702407837,
0.10939331352710724,
-0.15930642187595367,
0.10081545263528824,
-0.0423445925116539,
-0.033986903727054596,
0.33027616143226624,
0.0721159428358078,
0.28261640667915344,
0.12888026237487793,
0.19148261845111847,
0.14019641280174255,
0.14152789115905762,
-0.20439642667770386,
-0.09894729405641556,
0.2039456069469452,
-0.3245394825935364,
0.18877863883972168,
0.038753874599933624,
0.06972560286521912,
-0.13713490962982178,
-0.24315465986728668,
-0.2385846972465515,
-0.39787837862968445,
0.09223668277263641,
0.03479529917240143,
0.048994068056344986,
0.23075924813747406,
0.0914824903011322,
0.24004775285720825,
0.2203383594751358,
0.49283358454704285,
-0.09065888822078705,
-0.011917844414710999,
-0.4879201650619507,
-0.01009589247405529,
0.06996603310108185,
-0.5400474071502686,
-0.060456737875938416,
0.04477686434984207,
-0.06788518279790878,
0.294770210981369,
-0.3794867694377899,
0.3721454441547394,
-0.15198464691638947,
0.08318722248077393,
0.1768328994512558,
-0.10780368745326996,
-0.018315469846129417,
-0.38809531927108765,
0.4292585253715515,
-0.3619121015071869,
-0.017132669687271118,
0.3872005343437195,
0.042326491326093674,
-0.12685763835906982,
-0.22208184003829956,
-0.08119644969701767,
0.056621089577674866,
-0.1438729465007782,
-0.092424675822258,
-0.13423272967338562,
0.17254742980003357,
0.41807642579078674,
0.022033467888832092,
0.4735865592956543,
-0.2557694613933563,
-0.16968105733394623,
0.1678779274225235,
0.18195277452468872,
0.5343098640441895,
-0.021697254851460457,
-0.37801966071128845,
0.1458333283662796,
-0.2738337218761444,
-0.025869552046060562,
-0.5093504786491394,
-0.05536988377571106,
-0.2531599700450897,
-0.12455126643180847,
-0.15655845403671265,
0.1502876877784729,
0.055768851190805435,
0.2515537440776825,
0.01708970032632351,
0.007382119074463844,
0.04669135808944702,
-0.1840885579586029,
0.12860968708992004,
0.20612305402755737,
0.37237536907196045,
-0.026704099029302597,
0.4878300726413727,
0.10480698943138123,
0.6293371319770813,
0.3555672764778137,
-0.0857287049293518,
0.1341521441936493,
0.07910890877246857,
-0.2296396642923355,
0.029293827712535858,
-0.22510115802288055,
-0.3233575224876404,
0.031258828938007355,
-0.0030000079423189163,
0.17983794212341309,
0.03219810128211975,
-0.2912760376930237,
-0.17826776206493378,
-0.11142051219940186,
-0.18024104833602905,
-0.20814228057861328,
-0.13531580567359924,
-0.1797330230474472,
0.16016319394111633,
-0.2067035734653473,
0.2087402641773224,
-0.2168799340724945,
0.021985936909914017,
-0.025386739522218704,
-0.09397400915622711,
0.06600388139486313,
-0.199272021651268,
-0.4379245936870575,
-0.14255517721176147,
-0.2592298686504364,
0.4074147939682007,
-0.12053340673446655,
0.3221699297428131,
-0.010891031473875046,
-0.3574220538139343,
-0.0811125636100769,
-0.15807263553142548,
0.642600417137146,
-0.13906806707382202,
-0.1791144758462906,
0.08675849437713623,
-0.2970714569091797,
-0.49071791768074036,
-0.16065622866153717,
-0.33400627970695496,
0.04722423478960991,
0.4098539650440216,
0.3750638961791992,
-0.2564997673034668,
-0.06560445576906204,
0.06337561458349228,
-0.5187550783157349,
-0.17495878040790558,
0.041230492293834686,
-0.28845295310020447,
0.08039847761392593,
-0.1542811095714569,
-0.1534997522830963,
-0.050388485193252563,
0.12254966050386429,
-0.14489103853702545,
0.15052594244480133,
0.12051153182983398,
-0.21014896035194397,
0.09129699319601059,
0.490736186504364,
0.08128143101930618,
0.0005746070528402925,
0.018310129642486572,
0.21778610348701477,
-0.0035038888454437256,
-0.1578540951013565,
0.04800243303179741,
0.2946726977825165,
-0.3666609525680542,
0.26728543639183044,
0.19550734758377075,
0.29015785455703735,
0.19516628980636597,
-0.015765512362122536,
0.016765519976615906,
0.021158387884497643,
0.22601917386054993,
0.11063307523727417,
-0.34052059054374695,
0.35451245307922363,
-0.012285113334655762,
-0.15326228737831116,
0.058108359575271606,
0.1402447521686554,
-0.3238539695739746,
0.14206290245056152,
-0.4734610915184021,
0.10984369367361069,
-0.17246229946613312,
0.616448163986206,
0.04268159717321396,
0.9207691550254822,
0.13586154580116272,
0.012935332953929901,
0.08482210338115692,
-0.016921333968639374,
0.557511031627655,
0.19665594398975372,
0.18720568716526031,
-0.48164495825767517,
0.2159907966852188,
0.02242380566895008,
0.05452169105410576,
0.08281098306179047,
0.1604759395122528,
-0.5252497792243958,
0.24506941437721252,
-0.007060892879962921,
0.13655100762844086,
-0.05625990778207779,
0.15886546671390533,
0.10249670594930649,
-0.1845775991678238,
-0.3168308138847351,
0.15921123325824738,
0.03636930137872696,
0.20586062967777252,
-0.01851421222090721,
-0.27745044231414795,
-0.10498063266277313,
-0.35729968547821045,
-0.15823601186275482,
0.3035012185573578,
-0.12923964858055115,
-0.0857655256986618,
0.7080215215682983,
0.20286373794078827,
0.6197365522384644,
0.5606234073638916,
0.516688883304596,
0.05335931479930878,
-0.4011370539665222,
-0.11512097716331482,
0.026761289685964584,
-0.042054686695337296,
-0.12568557262420654,
0.04200546070933342,
-0.043193966150283813,
-0.1279366910457611,
-0.25089651346206665,
0.08835712820291519,
0.1080322414636612,
0.17122383415699005,
-0.11114586889743805,
-0.08486738801002502,
0.10507308691740036,
-0.1521771252155304,
0.01996478997170925,
-0.12429307401180267,
-0.07582900673151016,
0.03864370658993721,
0.1679321974515915,
-0.0929519534111023,
-0.30175888538360596,
-0.28103911876678467,
0.14192228019237518,
-0.07421012222766876,
0.21436449885368347,
0.3510374128818512,
-0.034798093140125275,
0.3840600550174713,
0.6542606353759766,
0.06261543929576874,
0.10276491940021515,
-0.19217726588249207,
0.23962563276290894,
0.05201875418424606,
-0.6680753231048584,
0.16154448688030243,
0.07132840901613235,
-0.40311580896377563,
0.23724262416362762,
0.3277624249458313,
0.22340944409370422,
0.10687185078859329,
-0.16239939630031586,
0.008959002792835236,
-0.30932116508483887,
0.20557959377765656,
0.01018073782324791,
-0.19333523511886597,
-0.12141469120979309,
0.02798807993531227,
0.17579223215579987,
0.11855888366699219,
-0.30841028690338135,
-0.10663218051195145,
-0.41460660099983215,
0.01864398643374443,
-0.40019282698631287,
-0.6514692902565002,
0.09224700927734375,
0.04014982283115387,
0.09786950796842575,
-0.0025703012943267822,
-0.27976468205451965,
-0.1697242259979248,
-0.17002452909946442,
0.1263950765132904,
0.33131203055381775,
-0.2610856890678406,
-0.21677416563034058,
0.03739110380411148,
-0.08546426892280579,
-0.14781200885772705,
0.016099493950605392,
0.08903854340314865,
0.12975507974624634,
0.49989062547683716,
0.34312328696250916,
0.1461980640888214,
-0.330453097820282,
0.013064660131931305,
-0.0009317100048065186,
-0.11152206361293793,
0.3274608254432678,
0.17545734345912933,
0.07229256629943848,
-0.09463176876306534,
-0.39502817392349243,
0.2633705735206604,
0.28687214851379395,
-0.05069826543331146,
0.3815040588378906,
-0.4005312919616699,
-0.026322726160287857,
0.004074035678058863,
-0.12704052031040192,
-0.006129533052444458,
-0.1277550607919693,
0.024819528684020042,
0.061914972960948944,
0.10998765379190445,
-0.25247883796691895,
0.16548429429531097,
-0.18111039698123932,
-0.12809157371520996,
-0.13679392635822296,
0.2108079046010971,
0.09776543080806732,
-0.02701743319630623,
0.25169289112091064,
0.1957518458366394,
0.5039551854133606,
0.111612468957901,
0.25418251752853394,
0.2503436207771301,
-0.12148500978946686,
0.16402220726013184,
0.33421027660369873,
-0.4417221248149872,
-0.04332587867975235,
-0.2629716992378235,
-0.12269795686006546,
0.26096639037132263,
-0.2051958441734314,
0.22179923951625824,
0.3339414596557617,
0.007381584495306015,
0.0020566731691360474,
0.11502361297607422,
0.3605114817619324,
-0.06884481757879257,
-0.30442145466804504,
-0.056780315935611725,
0.02588251233100891,
0.13806813955307007,
-0.5615829825401306,
0.15028762817382812,
-0.11572558432817459,
-0.4203840494155884,
-0.21019777655601501,
-0.1604299694299698,
-0.35180509090423584,
-0.23968662321567535,
-0.1430501788854599,
-0.19453908503055573,
-0.24227216839790344,
0.06595968455076218,
-0.26276540756225586,
0.004238864406943321,
-0.08326320350170135,
0.4153217673301697,
0.11733826249837875,
-0.11982525885105133,
0.3166150152683258,
0.22338494658470154,
0.10955697298049927,
-0.07486556470394135,
0.33911001682281494,
0.47989997267723083,
0.5285981297492981,
-0.5117015838623047,
0.1337430477142334,
0.044615648686885834,
-0.15742823481559753,
0.30191439390182495,
0.16405963897705078,
0.14108869433403015,
0.37666407227516174,
-0.08367283642292023,
0.026485012844204903,
-0.1202346608042717,
-0.027530204504728317,
-0.34702491760253906,
0.3050815165042877,
-0.07697486877441406,
0.6026283502578735,
-0.17007160186767578,
0.07052978128194809,
-0.03803296387195587,
0.017638109624385834,
-0.6420900821685791,
0.2209075391292572,
0.281873881816864,
-0.008003858849406242,
-0.021658912301063538,
-0.08776091039180756,
0.06818243116140366,
-0.1623542606830597,
0.36749470233917236,
0.33446213603019714,
-0.24954137206077576,
-0.33011823892593384,
0.022245056927204132,
-0.23582759499549866,
0.17580761015415192,
0.020581869408488274,
0.24685287475585938,
0.17019063234329224,
0.13968481123447418,
0.08777612447738647,
0.04324987530708313,
-0.2119874507188797,
-0.21274882555007935,
-0.3202988803386688,
0.2325865775346756,
-0.22644750773906708,
0.16267703473567963,
0.09173813462257385,
0.16309885680675507,
0.09703817963600159,
-0.12104041129350662,
-0.020949985831975937,
0.18173107504844666,
-0.04122326523065567,
0.18836797773838043,
0.05869598686695099,
0.032441988587379456,
0.15964791178703308,
-0.010997019708156586,
0.15784992277622223,
0.410209983587265,
0.1294575333595276,
-0.1036413311958313,
-0.14860127866268158,
-0.21906234323978424,
-0.35943567752838135,
-0.2469455897808075,
-0.06652911007404327,
0.4473227560520172,
-0.03676612675189972,
-0.07152143120765686,
-0.2113654464483261,
-0.22428035736083984,
0.016589835286140442,
-0.1691880077123642,
-0.3869921565055847,
0.16178256273269653,
-0.14895057678222656,
0.05435109883546829,
-0.012880215421319008,
-0.09060976654291153,
-0.004240885376930237,
-0.008515569381415844,
-0.32820257544517517,
0.0023107118904590607,
0.5907201766967773,
-0.5755987167358398,
-0.25329363346099854,
-0.20074285566806793,
0.09248387068510056,
-0.17207983136177063,
-0.05984218418598175,
-0.423831969499588,
-0.20638790726661682,
0.3250182569026947,
-0.1363995373249054,
-0.25072234869003296,
0.17856165766716003,
0.18198682367801666,
-0.10216381400823593,
-0.08247391879558563,
0.13033966720104218,
0.10932229459285736,
-0.06769472360610962,
-0.05706044286489487,
-0.081546351313591
] |
https://github.com/huggingface/datasets/issues/501 | Caching doesn't work for map (non-deterministic) | Thanks for reporting !
To store the cache file, we compute a hash of the function given in `.map`, using our own hashing function.
The hash doesn't seem to stay the same over sessions for the tokenizer.
Apparently this is because of the regex at `tokenizer.pat` is not well supported by our hashing function.
I'm working on a fix | The caching functionality doesn't work reliably when tokenizing a dataset. Here's a small example to reproduce it.
```python
import nlp
import transformers
def main():
ds = nlp.load_dataset("reddit", split="train[:500]")
tokenizer = transformers.AutoTokenizer.from_pretrained("gpt2")
def convert_to_features(example_batch):
input_str = example_batch["body"]
encodings = tokenizer(input_str, add_special_tokens=True, truncation=True)
return encodings
ds = ds.map(convert_to_features, batched=True)
if __name__ == "__main__":
main()
```
Roughly 3/10 times, this example recomputes the tokenization.
Is this expected behaviour? | 59 | Caching doesn't work for map (non-deterministic)
The caching functionality doesn't work reliably when tokenizing a dataset. Here's a small example to reproduce it.
```python
import nlp
import transformers
def main():
ds = nlp.load_dataset("reddit", split="train[:500]")
tokenizer = transformers.AutoTokenizer.from_pretrained("gpt2")
def convert_to_features(example_batch):
input_str = example_batch["body"]
encodings = tokenizer(input_str, add_special_tokens=True, truncation=True)
return encodings
ds = ds.map(convert_to_features, batched=True)
if __name__ == "__main__":
main()
```
Roughly 3/10 times, this example recomputes the tokenization.
Is this expected behaviour?
Thanks for reporting !
To store the cache file, we compute a hash of the function given in `.map`, using our own hashing function.
The hash doesn't seem to stay the same over sessions for the tokenizer.
Apparently this is because of the regex at `tokenizer.pat` is not well supported by our hashing function.
I'm working on a fix | [
-0.01368667185306549,
0.04759855568408966,
0.06730742752552032,
-0.04567527025938034,
0.09199449419975281,
-0.18352091312408447,
0.2613238990306854,
0.13279606401920319,
0.0008187666535377502,
-0.3439313769340515,
0.08850192278623581,
0.24871201813220978,
-0.14104709029197693,
-0.2732979357242584,
0.1312420517206192,
0.170965313911438,
0.3097132444381714,
0.04413079842925072,
0.30557820200920105,
-0.0806422084569931,
-0.06544587016105652,
-0.0272678229957819,
-0.3542218804359436,
-0.029705874621868134,
-0.5633120536804199,
0.052004218101501465,
-0.1355009227991104,
-0.40043193101882935,
0.2827106714248657,
-0.39119502902030945,
0.09910821914672852,
0.1787097156047821,
-0.013468826189637184,
0.2490125596523285,
-0.00011657227150863037,
-0.12955227494239807,
0.3142707943916321,
-0.06422460079193115,
0.20276208221912384,
-0.13746489584445953,
-0.10561540722846985,
-0.32169246673583984,
-0.15899896621704102,
-0.022034376859664917,
-0.08482097834348679,
-0.20719198882579803,
0.2631581127643585,
-0.10601459443569183,
0.5493525862693787,
0.006881128065288067,
0.1311335563659668,
0.17379990220069885,
-0.10376130044460297,
0.31602802872657776,
0.0371430329978466,
0.011069227010011673,
-0.12727706134319305,
-0.25867584347724915,
-0.108120858669281,
-0.38133442401885986,
-0.4259670376777649,
0.17911052703857422,
-0.17745596170425415,
-0.1869017481803894,
0.2517659664154053,
0.2371276468038559,
-0.059267811477184296,
-0.1703377217054367,
0.23430949449539185,
-0.1654302179813385,
0.43198254704475403,
-0.22391599416732788,
-0.29622188210487366,
-0.07843830436468124,
-0.2797980308532715,
-0.15671849250793457,
0.44395139813423157,
-0.0860389694571495,
-0.07148522138595581,
0.05915720760822296,
-0.4800792336463928,
0.15903279185295105,
0.1002616137266159,
0.09257396310567856,
0.043999165296554565,
0.530156135559082,
0.08887872099876404,
0.10976357758045197,
-0.18249522149562836,
-0.22950147092342377,
-0.0440581850707531,
-0.22854739427566528,
-0.12614677846431732,
0.47429949045181274,
-0.15238860249519348,
-0.2847384214401245,
0.026227854192256927,
-0.08007753640413284,
0.054459936916828156,
0.2948213815689087,
0.05041207745671272,
0.2815190851688385,
-0.029981929808855057,
0.2159367799758911,
0.007893800735473633,
0.54781174659729,
0.19643788039684296,
0.44254279136657715,
0.1908518671989441,
-0.5588887333869934,
-0.4889090359210968,
-0.08126038312911987,
-0.029800981283187866,
0.03431372344493866,
0.6790266036987305,
0.05612703040242195,
-0.3889099955558777,
0.03413773700594902,
0.18528282642364502,
0.05845275893807411,
-0.354709267616272,
-0.17928288877010345,
0.0523776039481163,
0.2285996675491333,
-0.11129187792539597,
0.0362100750207901,
-0.5301239490509033,
0.03301205486059189,
0.06994827091693878,
-0.1227097287774086,
-0.21772171556949615,
-0.16494059562683105,
-0.44428810477256775,
0.2580901086330414,
0.1851164698600769,
0.4816354513168335,
0.28296950459480286,
-0.11872509866952896,
-0.1610897332429886,
-0.12241416424512863,
0.10460645705461502,
-0.27127182483673096,
0.44023969769477844,
-0.003461357206106186,
-0.3136524260044098,
0.19001798331737518,
-0.026726748794317245,
-0.014104530215263367,
-0.3247203826904297,
-0.008299976587295532,
-0.018700361251831055,
-0.08472912013530731,
0.43186521530151367,
0.04270092770457268,
-0.23802463710308075,
-0.13476543128490448,
-0.029930584132671356,
0.29315492510795593,
0.5849562287330627,
-0.23446282744407654,
-0.022243492305278778,
-0.05238475650548935,
-0.31153181195259094,
-0.3348664939403534,
0.16095787286758423,
0.2611808776855469,
0.27047446370124817,
-0.29197436571121216,
0.4862920641899109,
0.39122751355171204,
0.30230703949928284,
0.5853936672210693,
-0.187411367893219,
0.12775757908821106,
-0.07888864725828171,
0.6074697375297546,
0.22613392770290375,
-0.1387709081172943,
-0.5778242349624634,
0.016322927549481392,
0.09311847388744354,
0.09223760664463043,
-0.08541832119226456,
-0.05149619281291962,
0.34769436717033386,
-0.2769734859466553,
0.03197760879993439,
0.3163944482803345,
0.04875461757183075,
0.0056757498532533646,
-0.33022522926330566,
-0.06354574859142303,
0.4362439513206482,
-0.21021251380443573,
0.19924017786979675,
-0.04791460186243057,
-0.035388924181461334,
0.1872393637895584,
-0.2263922095298767,
0.0907612219452858,
0.22842861711978912,
-0.04912567883729935,
0.16356706619262695,
-0.18055875599384308,
0.1260126233100891,
-0.07574039697647095,
-0.1877250075340271,
0.1920468509197235,
-0.18713681399822235,
-0.18077130615711212,
0.03393646329641342,
-0.11340495944023132,
0.1624484360218048,
-0.1431272327899933,
-0.06627750396728516,
-0.2908810079097748,
0.10511592030525208,
0.11165255308151245,
0.38746654987335205,
0.15150654315948486,
-0.14658840000629425,
0.12434014678001404,
0.46455562114715576,
0.011935567483305931,
0.11252495646476746,
-0.09797945618629456,
0.045576564967632294,
-0.2353748381137848,
-0.30908164381980896,
0.16315039992332458,
0.24180668592453003,
0.057263996452093124,
-0.1184215322136879,
0.16259929537773132,
-0.02884921245276928,
0.21416406333446503,
-0.07008098065853119,
0.40443551540374756,
0.07872209697961807,
-0.0859917551279068,
0.06432724744081497,
0.30193158984184265,
-0.1264505237340927,
-0.27961787581443787,
0.03595712035894394,
0.4145945906639099,
0.5003687739372253,
-0.023509323596954346,
-0.1423831582069397,
0.05573417246341705,
0.30908384919166565,
-0.15240058302879333,
-0.11689962446689606,
-0.16373121738433838,
-0.0872417688369751,
-0.09064732491970062,
0.13493867218494415,
0.09354597330093384,
0.09027668833732605,
0.14264000952243805,
0.3982757329940796,
-0.026045048609375954,
0.08506262302398682,
0.056583065539598465,
-0.383219838142395,
-0.51828533411026,
0.10023041069507599,
-0.020621415227651596,
0.03757782280445099,
0.005719772074371576,
0.266019731760025,
-0.01376948319375515,
-0.17208930850028992,
-0.15457099676132202,
0.1181880384683609,
-0.06530910730361938,
-0.21038158237934113,
0.1019192636013031,
0.16040809452533722,
0.30068570375442505,
-0.1281338632106781,
-0.13577277958393097,
0.2475641369819641,
0.007780225016176701,
-0.053692951798439026,
0.06890460848808289,
-0.245695561170578,
0.0005733184516429901,
0.23471373319625854,
-0.08983553200960159,
-0.22501882910728455,
-0.2172686904668808,
-0.13923855125904083,
0.2956092655658722,
0.035928066819906235,
0.4442124366760254,
-0.1402329057455063,
0.08420373499393463,
-0.04568568617105484,
-0.15483510494232178,
-0.16303855180740356,
-0.3049258887767792,
-0.2561382055282593,
-0.09476174414157867,
0.2327452152967453,
-0.29592275619506836,
0.21571704745292664,
-0.014919154345989227,
0.04955784231424332,
-0.12731558084487915,
-0.3565974235534668,
0.1648930162191391,
0.0026209503412246704,
-0.08096791058778763,
-0.1507011353969574,
-0.34123504161834717,
-0.5605165362358093,
-0.03470655530691147,
0.2581993341445923,
-0.45321953296661377,
-0.1404504030942917,
0.2224096953868866,
0.18762029707431793,
-0.10442225635051727,
0.015645790845155716,
0.14283698797225952,
-0.048426128923892975,
0.010442566126585007,
0.16988278925418854,
-0.06455088406801224,
0.0911724641919136,
0.4004296362400055,
-0.29320433735847473,
0.004720505326986313,
-0.49014851450920105,
-0.14633610844612122,
-0.3706042468547821,
-0.23663944005966187,
0.7362598180770874,
-0.11054635047912598,
-0.08007140457630157,
-0.026162486523389816,
-0.11542103439569473,
0.2398850917816162,
0.5107491612434387,
-0.18600362539291382,
0.16233904659748077,
-0.07665105909109116,
0.10535679757595062,
0.09626239538192749,
-0.30812451243400574,
0.3067163825035095,
-0.0934620350599289,
-0.07068312168121338,
0.051195450127124786,
-0.1466677486896515,
0.14302003383636475,
0.2608572840690613,
0.3049934208393097,
0.2392120361328125,
0.09110765159130096,
0.35361695289611816,
0.8350934982299805,
0.08380979299545288,
-0.15414080023765564,
0.1790553331375122,
0.20119236409664154,
0.05612405017018318,
-0.16763010621070862,
0.018237939104437828,
-0.06496565788984299,
-0.10812616348266602,
-0.03741111233830452,
0.19511005282402039,
0.1247868612408638,
-0.42964139580726624,
-0.07525713741779327,
-0.28708216547966003,
-0.07739780843257904,
-0.365316241979599,
0.23143047094345093,
-0.5263296365737915,
0.3536958396434784,
0.25223931670188904,
0.42129021883010864,
-0.5082790851593018,
-0.37028682231903076,
0.05153655260801315,
-0.120579794049263,
0.3768257796764374,
0.027549555525183678,
-0.603643000125885,
0.15982913970947266,
-0.6390215754508972,
0.22548720240592957,
-0.03145506978034973,
0.6086584329605103,
-0.04929670691490173,
-0.12634825706481934,
-0.11252744495868683,
-0.027351729571819305,
0.3081950545310974,
-0.36216169595718384,
0.11806651204824448,
0.16595837473869324,
-0.26143670082092285,
0.0024891234934329987,
-0.13479797542095184,
0.036508526653051376,
0.1394210308790207,
0.37139278650283813,
0.6505627036094666,
-0.19849535822868347,
-0.10037632286548615,
-0.6000765562057495,
-0.05404018983244896,
0.06487978994846344,
-0.287395715713501,
0.07346348464488983,
0.30185556411743164,
-0.19094359874725342,
0.08215396106243134,
0.19171828031539917,
-0.09741494059562683,
0.24283906817436218,
-0.03139027580618858,
-0.19406943023204803,
-0.1073341816663742,
0.23250102996826172,
0.041573937982320786,
0.34747475385665894,
-0.009896183386445045,
0.20715413987636566,
0.2720629572868347,
0.10657557100057602,
-0.25265446305274963,
-0.3211752772331238,
0.2206674963235855,
-0.22903570532798767,
-0.06933441758155823,
-0.00514198699966073,
0.2123207151889801,
0.12096269428730011,
-0.03751233592629433,
0.04407159984111786,
-0.14889614284038544,
-0.01460196077823639,
-0.23735441267490387,
0.16716696321964264,
0.08336953073740005,
0.19542154669761658,
-0.3794456124305725,
-0.3263632357120514,
0.1258125603199005,
0.13840332627296448,
-0.18074345588684082,
0.22662454843521118,
-0.37758493423461914,
-0.44602322578430176,
0.6914547085762024,
0.22732606530189514,
0.9793086647987366,
0.13668426871299744,
0.4066053330898285,
-0.2610698938369751,
0.24546299874782562,
0.39617741107940674,
-0.20343726873397827,
0.27053993940353394,
-0.2106606662273407,
0.06207779794931412,
-0.050861723721027374,
-0.13268429040908813,
0.00912337377667427,
0.3172048330307007,
-0.2797609269618988,
0.37966597080230713,
0.14434288442134857,
0.8239802718162537,
0.1463346779346466,
0.05896006524562836,
0.0857708603143692,
-0.233041912317276,
0.2865399122238159,
0.13256019353866577,
-0.02688802033662796,
0.2350768893957138,
0.02845900133252144,
-0.09104620665311813,
0.03944619372487068,
0.07687070965766907,
-0.1889706254005432,
0.06907288730144501,
-0.2721971273422241,
0.17234089970588684,
0.19900019466876984,
0.09197430312633514,
-0.0357406847178936,
0.12718307971954346,
0.3098222613334656,
0.16352766752243042,
-0.2802836298942566,
0.07498272508382797,
0.3586246967315674,
0.20181918144226074,
-0.009623520076274872,
-0.3221384882926941,
0.2645989656448364,
0.0702611580491066,
0.05405599623918533,
-0.07454337924718857,
-0.054570507258176804,
-0.4214327931404114,
-0.5006970167160034,
-0.048471033573150635,
0.11821107566356659,
-0.0697837620973587,
0.1867564469575882,
0.044783152639865875,
-0.20547139644622803,
-0.13294513523578644,
0.116634801030159,
0.17083033919334412,
-0.05468796193599701,
0.4148549437522888,
-0.13487815856933594,
-0.035656850785017014,
0.028378192335367203,
0.4033694863319397,
-0.000759318470954895,
-0.1859472543001175,
0.4934471547603607,
-0.4574658274650574,
-0.3638174533843994,
-0.15663599967956543,
-0.16531676054000854,
-0.2013350874185562,
-0.22253862023353577,
-0.06256966292858124,
-0.3878854215145111,
-0.19723030924797058,
0.03753482550382614,
0.04482448846101761,
0.16295334696769714,
0.10894640535116196,
-0.038968611508607864,
-0.27165791392326355,
-0.4200654625892639,
-0.06419618427753448,
-0.028873968869447708,
0.0158565491437912,
-0.04224226251244545,
0.2786877155303955,
-0.03108452633023262,
0.2577911913394928,
-0.2614101767539978,
-0.20177830755710602,
0.07115454226732254,
0.1786181628704071,
-0.31313279271125793,
-0.2629750370979309,
0.11784882098436356,
-0.06989584863185883,
-0.004026699811220169,
0.34123551845550537,
-0.33159807324409485,
-0.11273506283760071,
-0.07756835222244263,
0.16651666164398193,
0.3449390232563019,
-0.18282762169837952,
-0.21376687288284302,
0.16946999728679657,
0.0159769244492054,
-0.5175480842590332,
-0.19795410335063934,
0.30849164724349976,
0.010292574763298035,
0.009713483043015003,
0.1756764054298401,
0.285893976688385,
0.13759326934814453,
-0.09750622510910034,
-0.0166269913315773,
0.08856332302093506,
-0.046682700514793396,
0.2704509496688843,
0.006390230730175972,
0.028555087745189667,
-0.26470211148262024,
0.1746235489845276,
0.19209837913513184,
-0.042692288756370544,
0.4463929235935211,
-0.07283952832221985,
-0.1335800588130951,
0.16154704988002777,
-0.1888233721256256,
0.18498778343200684,
0.021443774923682213,
-0.48648208379745483,
0.7638770937919617,
0.1510971486568451,
-0.016299284994602203,
-0.05259113386273384,
0.34052711725234985,
0.1530587524175644,
-0.0649227648973465,
0.052094824612140656,
0.4691831171512604,
-0.09862590581178665,
0.005894824862480164,
0.04980657994747162,
0.5783460140228271,
-0.40474122762680054,
0.14368636906147003,
-0.1437252014875412,
0.0994395762681961,
0.19408591091632843,
0.3811711370944977,
0.07639474421739578,
0.08557882159948349,
0.05426070839166641,
0.3561933934688568,
0.23288123309612274,
0.1432286947965622,
0.2286987006664276,
-0.30982890725135803,
-0.24259337782859802,
-0.21233828365802765,
0.4649176597595215,
0.03334077447652817,
0.5086623430252075,
-0.11323240399360657,
0.2447831630706787,
0.15917666256427765,
-0.13475145399570465,
-0.23194953799247742,
0.303999662399292,
-0.22837325930595398,
-0.2894878685474396,
0.10079121589660645,
-0.043623585253953934,
-0.15050005912780762,
0.15391980111598969,
-0.1167207807302475,
0.1253163069486618,
0.14424246549606323,
-0.008362889289855957,
-0.035418182611465454,
0.030040644109249115,
0.14557364583015442,
-0.057956136763095856,
0.3666916489601135,
-0.3213548958301544,
0.2709100544452667,
-0.4509083032608032,
-0.13220864534378052,
-0.1833263337612152,
0.1297282874584198,
0.27462488412857056,
0.32920920848846436,
-0.32308655977249146,
0.1327793300151825,
-0.06978431344032288,
0.05780229717493057,
-0.1904817670583725,
0.6730788946151733,
0.0656597837805748,
-0.49360209703445435,
0.024180706590414047,
-0.04149241000413895,
-0.028901908546686172,
-0.07741619646549225,
0.07288333028554916,
0.014757084660232067,
0.19963018596172333,
0.4930044114589691,
0.04544786363840103,
-0.13820165395736694,
0.26673048734664917,
0.04645998030900955,
-0.25401145219802856,
-0.09443611651659012,
0.15649087727069855,
-0.024984175339341164,
0.24814754724502563,
-0.25275352597236633,
0.07367739081382751,
-0.07420742511749268,
0.358121782541275,
0.3809104263782501,
-0.17094311118125916,
-0.26394209265708923,
-0.06462632864713669,
-0.4245135486125946,
0.4025978446006775,
-0.09219080209732056,
0.2847805619239807,
-0.23248030245304108,
0.20752140879631042,
-0.1105874702334404,
-0.004981424659490585,
-0.13823823630809784,
0.0578962042927742,
-0.3202587068080902,
0.08504986763000488,
-0.14611566066741943,
0.4202273190021515,
-0.14695292711257935,
0.2991520166397095,
0.15467709302902222,
-0.31796595454216003,
0.2920420467853546,
-0.008577371947467327,
0.13185951113700867,
-0.09590474516153336,
-0.0870143473148346,
0.03773318603634834,
0.27268120646476746,
0.5620136260986328,
0.2327573597431183,
0.0872582271695137,
0.0696965754032135,
0.18947282433509827,
-0.37470272183418274,
0.02166871540248394,
-0.056568194180727005,
-0.02971639484167099,
-0.135491743683815,
0.1955701857805252,
-0.35133758187294006,
0.17860455811023712,
-0.16323193907737732,
0.0025963911321014166,
0.044997841119766235,
-0.4295826554298401,
-0.04999030381441116,
-0.05069264769554138,
-0.19095081090927124,
-0.029221493750810623,
0.00036462675780057907,
0.3448743224143982,
-0.17466691136360168,
0.251006156206131,
-0.3981536030769348,
-0.2146267592906952,
0.2298824042081833,
-0.6583094596862793,
-0.4971136450767517,
-0.044097814708948135,
0.08418956398963928,
0.40801000595092773,
0.006948077119886875,
-0.2966827154159546,
-0.21577830612659454,
0.2761684060096741,
0.07779057323932648,
-0.24849213659763336,
-0.10163885354995728,
0.026470359414815903,
-0.12463407218456268,
-0.2842129170894623,
0.2960048019886017,
-0.0015486963093280792,
-0.2540479004383087,
0.040507640689611435,
-0.036009129136800766
] |
https://github.com/huggingface/datasets/issues/501 | Caching doesn't work for map (non-deterministic) | Hi. I believe the fix was for the nlp library. Is there a solution to handle compiled regex expressions in .map() with the caching. I want to run a simple regex pattern on a big dataset, but I am running into the issue of compiled expression not being cached.
Instead of opening a new issue, I thought I would put my query here. Let me know if a new issue would be more suitable. Thanks | The caching functionality doesn't work reliably when tokenizing a dataset. Here's a small example to reproduce it.
```python
import nlp
import transformers
def main():
ds = nlp.load_dataset("reddit", split="train[:500]")
tokenizer = transformers.AutoTokenizer.from_pretrained("gpt2")
def convert_to_features(example_batch):
input_str = example_batch["body"]
encodings = tokenizer(input_str, add_special_tokens=True, truncation=True)
return encodings
ds = ds.map(convert_to_features, batched=True)
if __name__ == "__main__":
main()
```
Roughly 3/10 times, this example recomputes the tokenization.
Is this expected behaviour? | 75 | Caching doesn't work for map (non-deterministic)
The caching functionality doesn't work reliably when tokenizing a dataset. Here's a small example to reproduce it.
```python
import nlp
import transformers
def main():
ds = nlp.load_dataset("reddit", split="train[:500]")
tokenizer = transformers.AutoTokenizer.from_pretrained("gpt2")
def convert_to_features(example_batch):
input_str = example_batch["body"]
encodings = tokenizer(input_str, add_special_tokens=True, truncation=True)
return encodings
ds = ds.map(convert_to_features, batched=True)
if __name__ == "__main__":
main()
```
Roughly 3/10 times, this example recomputes the tokenization.
Is this expected behaviour?
Hi. I believe the fix was for the nlp library. Is there a solution to handle compiled regex expressions in .map() with the caching. I want to run a simple regex pattern on a big dataset, but I am running into the issue of compiled expression not being cached.
Instead of opening a new issue, I thought I would put my query here. Let me know if a new issue would be more suitable. Thanks | [
-0.06600198894739151,
0.193084716796875,
0.07353241741657257,
-0.040212757885456085,
0.061078764498233795,
-0.25886964797973633,
0.3066854178905487,
0.2218094766139984,
-0.04172998666763306,
-0.34482449293136597,
0.15576523542404175,
0.37849265336990356,
-0.20115341246128082,
-0.40204286575317383,
0.16970068216323853,
0.2604164481163025,
0.15951265394687653,
0.18994131684303284,
0.17312827706336975,
-0.10524465143680573,
-0.05852098762989044,
0.04587141424417496,
-0.41282379627227783,
0.023614872246980667,
-0.47583866119384766,
-0.12051758915185928,
-0.028505835682153702,
-0.3642866015434265,
0.3359546363353729,
-0.37821832299232483,
0.09729938209056854,
0.053913019597530365,
0.0806964784860611,
0.09154671430587769,
-0.00012161589256720617,
-0.20754939317703247,
0.3001493513584137,
-0.055076368153095245,
0.21352694928646088,
0.04687795042991638,
-0.11829926073551178,
-0.2798621654510498,
-0.23373673856258392,
-0.06625858694314957,
-0.03961619362235069,
-0.28787851333618164,
0.298901230096817,
-0.3674800395965576,
0.554905891418457,
-0.026069629937410355,
0.08648823201656342,
0.14962875843048096,
-0.2186702936887741,
0.4665457606315613,
0.058320216834545135,
-0.02788636088371277,
-0.0830879881978035,
-0.3447240889072418,
0.2579854130744934,
-0.4508627951145172,
-0.421772301197052,
0.11853718757629395,
-0.30796024203300476,
-0.21152397990226746,
0.1711440533399582,
0.08792337775230408,
0.01885164901614189,
-0.08639711141586304,
0.09953325986862183,
-0.04490987956523895,
0.32855919003486633,
-0.1592528522014618,
-0.3050915002822876,
-0.10625375807285309,
-0.26703616976737976,
-0.20022620260715485,
0.2601653039455414,
-0.022923050448298454,
-0.018576813861727715,
0.062310270965099335,
-0.6566746830940247,
-0.021071575582027435,
-0.004631593823432922,
0.054059069603681564,
0.11940982937812805,
0.6311113834381104,
0.10234608501195908,
0.07835106551647186,
-0.20780448615550995,
-0.2925869822502136,
-0.050468169152736664,
-0.22613820433616638,
-0.1534528136253357,
0.4740787148475647,
-0.0658988505601883,
-0.24274680018424988,
0.07953475415706635,
-0.12759637832641602,
0.059823133051395416,
0.17395246028900146,
0.08647938072681427,
0.30381274223327637,
0.060210730880498886,
0.24003398418426514,
0.005568394437432289,
0.5121037364006042,
0.15409280359745026,
0.45593300461769104,
0.4053199291229248,
-0.4951237142086029,
-0.5075621604919434,
0.010084256529808044,
-0.10894816368818283,
-0.0021757681388407946,
0.4322591722011566,
0.16036856174468994,
-0.40895771980285645,
-0.01459977775812149,
0.1489821821451187,
-0.004073912277817726,
-0.3460520803928375,
-0.1627807766199112,
0.08454977720975876,
0.26090794801712036,
-0.18551626801490784,
-0.15147772431373596,
-0.3798767924308777,
0.0023338962346315384,
0.17301344871520996,
-0.315120667219162,
-0.19520878791809082,
-0.14702348411083221,
-0.38252541422843933,
0.19532719254493713,
0.2924540638923645,
0.37304916977882385,
0.1996772438287735,
-0.2312711626291275,
-0.1726687103509903,
-0.15858648717403412,
0.006148276850581169,
-0.3062334656715393,
0.6830567717552185,
0.001198548823595047,
-0.3832496702671051,
0.07659241557121277,
-0.04897438362240791,
-0.10125109553337097,
-0.32363808155059814,
0.1704680174589157,
0.031737685203552246,
-0.17431698739528656,
0.620567798614502,
-0.006534908898174763,
-0.23026445508003235,
-0.16088244318962097,
-0.03268665820360184,
0.38294917345046997,
0.6491847038269043,
-0.34265756607055664,
-0.07461283355951309,
-0.00012978911399841309,
-0.2992759943008423,
-0.259498655796051,
0.27215439081192017,
0.18667492270469666,
-0.042856667190790176,
-0.14910314977169037,
0.2436351329088211,
0.5894524455070496,
0.2494678795337677,
0.6963405013084412,
-0.200168639421463,
0.22153037786483765,
-0.10114845633506775,
0.4370540976524353,
0.32083365321159363,
-0.07483721524477005,
-0.4709504246711731,
0.11943339556455612,
0.14312219619750977,
0.026857620105147362,
-0.016655266284942627,
-0.08275887370109558,
0.28944700956344604,
-0.41518133878707886,
-0.07621924579143524,
0.43347376585006714,
0.07230189442634583,
0.06162608414888382,
-0.29575198888778687,
-0.15652675926685333,
0.4039943814277649,
-0.22691282629966736,
0.2185036689043045,
-0.096866674721241,
-0.016515381634235382,
0.13947980105876923,
-0.20792365074157715,
-0.06075005605816841,
0.2516695559024811,
0.06192363053560257,
0.13331101834774017,
-0.1791594922542572,
0.142438605427742,
-0.07669603824615479,
-0.14129698276519775,
0.09255430847406387,
-0.5475367307662964,
-0.24153229594230652,
0.05893087014555931,
-0.07673925906419754,
0.24589630961418152,
-0.12203115224838257,
0.10309760272502899,
-0.2706655263900757,
0.05149775743484497,
-0.05729213356971741,
0.4202706813812256,
0.017034489661455154,
-0.12598051130771637,
0.013683230616152287,
0.4112090468406677,
-0.012153561227023602,
0.1406116485595703,
-0.11916855722665787,
0.14656081795692444,
-0.3150082528591156,
-0.2075820118188858,
0.23071962594985962,
0.08920875191688538,
0.03753054141998291,
-0.09851884096860886,
0.07394688576459885,
-0.1527726948261261,
0.22864411771297455,
-0.24955588579177856,
0.22148188948631287,
0.004728564992547035,
-0.16600297391414642,
0.09083105623722076,
0.3637651205062866,
-0.1516111195087433,
-0.2729237973690033,
0.036855172365903854,
0.2887011170387268,
0.5115234851837158,
0.14282305538654327,
-0.01223091408610344,
-0.0036720875650644302,
0.19979125261306763,
-0.11465788632631302,
-0.06962002068758011,
-0.1565765142440796,
-0.1703110933303833,
-0.07065998017787933,
0.22958262264728546,
0.15443268418312073,
0.1435086727142334,
0.051463838666677475,
0.38817787170410156,
0.09619803726673126,
0.026197783648967743,
0.060458309948444366,
-0.3144492506980896,
-0.3852281868457794,
0.03638368099927902,
-0.1598293036222458,
0.025506794452667236,
0.07429516315460205,
0.2425822913646698,
-0.08922234922647476,
-0.02614497020840645,
-0.07128898799419403,
0.1252378225326538,
-0.027757205069065094,
-0.04518852382898331,
0.06774253398180008,
0.2593419849872589,
0.24516287446022034,
-0.09252433478832245,
-0.18160200119018555,
0.30075228214263916,
-0.1957302838563919,
-0.1547420173883438,
0.05273459106683731,
-0.33719581365585327,
-0.024523824453353882,
0.1917882263660431,
-0.06721668690443039,
-0.22449681162834167,
0.019996700808405876,
-0.07924060523509979,
0.2984413504600525,
-0.031029673293232918,
0.40904897451400757,
0.24343383312225342,
0.13990671932697296,
-0.13513799011707306,
-0.2824355363845825,
-0.12012193351984024,
-0.3530977666378021,
-0.27875033020973206,
-0.1246802806854248,
0.211481973528862,
-0.23816806077957153,
0.11512785404920578,
0.07337265461683273,
0.051550015807151794,
-0.13727693259716034,
-0.46284738183021545,
-0.028255894780158997,
-0.021449465304613113,
-0.0974494218826294,
-0.09340985119342804,
-0.26412099599838257,
-0.5436194539070129,
-0.04235225170850754,
0.06886386126279831,
-0.32671859860420227,
0.01657535694539547,
-0.013308219611644745,
0.2276047170162201,
-0.11960460245609283,
0.02343842387199402,
0.012778565287590027,
0.07228060066699982,
-0.02183888480067253,
0.37870609760284424,
-0.20677883923053741,
0.15527181327342987,
0.3655729293823242,
-0.4222687780857086,
-0.02263393998146057,
-0.42244645953178406,
-0.02856769971549511,
-0.1295832395553589,
-0.07694093137979507,
0.7490437030792236,
-0.12977315485477448,
-0.059419628232717514,
-0.15652285516262054,
-0.16828756034374237,
0.14446865022182465,
0.4097289443016052,
-0.1452239453792572,
0.4246538579463959,
-0.13455958664417267,
-0.07972268760204315,
0.09917615354061127,
-0.23932819068431854,
0.4076303243637085,
-0.1352742612361908,
0.00449722446501255,
-0.05984931439161301,
-0.26615285873413086,
0.35344311594963074,
0.27497243881225586,
0.3275718688964844,
0.35824984312057495,
-0.01392572745680809,
0.30908122658729553,
0.7040413022041321,
0.05383707210421562,
-0.08867241442203522,
0.22429731488227844,
0.44965246319770813,
0.027169745415449142,
-0.04561295360326767,
0.15933965146541595,
-0.04575598984956741,
-0.01512119174003601,
-0.07037688791751862,
0.24943281710147858,
0.2259022295475006,
-0.4007176160812378,
-0.07602379471063614,
-0.1255006492137909,
0.06159420311450958,
-0.28328937292099,
0.1976749449968338,
-0.42664748430252075,
0.3887665271759033,
0.42930516600608826,
0.31615185737609863,
-0.4428166151046753,
-0.2930668294429779,
0.05553391948342323,
-0.26053357124328613,
0.6027120351791382,
-0.009943068958818913,
-0.4187537133693695,
-0.025158528238534927,
-0.5360240936279297,
0.12198885530233383,
0.09576099365949631,
0.4379396438598633,
-0.111859530210495,
-0.05666178837418556,
-0.045768484473228455,
-0.03408370539546013,
0.054771989583969116,
-0.40340694785118103,
0.24238713085651398,
0.15888823568820953,
-0.14496293663978577,
-0.04475849121809006,
-0.06093020737171173,
-0.03601513430476189,
-0.033291418105363846,
0.5182976722717285,
0.6607611775398254,
-0.1852046102285385,
-0.011228939518332481,
-0.42535293102264404,
0.04203566908836365,
0.08453927934169769,
-0.33912917971611023,
0.015218470245599747,
0.23515617847442627,
0.025954371318221092,
0.07540373504161835,
0.33906447887420654,
-0.1006426140666008,
0.18791787326335907,
-0.23091958463191986,
-0.23138298094272614,
-0.041741304099559784,
0.20172742009162903,
-0.013315538875758648,
0.3851355016231537,
-0.12920670211315155,
0.2543661594390869,
0.08258730173110962,
0.08978337049484253,
-0.1842023879289627,
-0.2710863947868347,
0.06144563853740692,
-0.029288507997989655,
-0.11093371361494064,
0.08075187355279922,
0.36633992195129395,
0.033875130116939545,
-0.12240403890609741,
-0.18472015857696533,
-0.0922536700963974,
-0.031193621456623077,
-0.28017812967300415,
0.13329756259918213,
0.09006153047084808,
0.2506379187107086,
-0.349322110414505,
-0.2906759977340698,
0.20088323950767517,
0.30270805954933167,
-0.2649974822998047,
0.325793981552124,
-0.28018516302108765,
-0.4952229857444763,
0.5560885071754456,
0.27828672528266907,
0.8317694664001465,
-0.10802619159221649,
0.28836047649383545,
-0.36602067947387695,
0.06302876770496368,
0.38544976711273193,
-0.06437645852565765,
0.397458016872406,
-0.36851540207862854,
-0.2039823681116104,
0.03820651024580002,
-0.2297586053609848,
0.07619937509298325,
0.6015428900718689,
-0.28171592950820923,
0.31936243176460266,
0.28039437532424927,
0.5129643678665161,
0.22913610935211182,
0.2399977445602417,
0.2332065999507904,
-0.26215532422065735,
0.15969283878803253,
0.06226271390914917,
-0.12142008543014526,
0.1815035492181778,
0.00952855870127678,
-0.14952602982521057,
0.06883838772773743,
-0.04810415953397751,
-0.19292864203453064,
0.14726895093917847,
-0.15232819318771362,
0.23064734041690826,
0.2970844507217407,
0.10624270141124725,
0.2774289548397064,
0.32808321714401245,
0.2260085642337799,
0.36984187364578247,
-0.14354883134365082,
0.12079071998596191,
0.4310057461261749,
0.1454014927148819,
0.13626164197921753,
-0.18596163392066956,
0.09681762754917145,
0.03683466464281082,
0.07860388606786728,
-0.12369094043970108,
-0.31111329793930054,
-0.4366335868835449,
-0.3772902488708496,
0.03429804742336273,
0.13647282123565674,
0.01799609139561653,
0.18712399899959564,
0.15488609671592712,
-0.15540386736392975,
-0.0026857368648052216,
0.05982144922018051,
0.18956857919692993,
-0.08849291503429413,
0.6123675107955933,
-0.05493910238146782,
-0.14019176363945007,
0.05193787068128586,
0.4048411548137665,
-0.14501789212226868,
-0.12760776281356812,
0.6226543188095093,
-0.2772215008735657,
-0.3957323431968689,
-0.15888451039791107,
-0.19708839058876038,
-0.16076569259166718,
-0.22308844327926636,
0.04770547151565552,
-0.3184288442134857,
-0.2138599455356598,
0.10438720136880875,
0.20877937972545624,
0.022037383168935776,
0.1423632800579071,
-0.2244725227355957,
-0.2659127116203308,
-0.48721030354499817,
-0.0851101279258728,
-0.2373640388250351,
-0.12291261553764343,
0.18709465861320496,
0.0664823055267334,
-0.03153210133314133,
0.34574389457702637,
-0.21659597754478455,
-0.13130095601081848,
0.1218404546380043,
0.2937133312225342,
-0.34461092948913574,
-0.2019757330417633,
0.08001334220170975,
0.018930070102214813,
-0.07707943022251129,
0.31999170780181885,
-0.1568145900964737,
-0.0842750146985054,
-0.0566256009042263,
0.17784421145915985,
0.18409353494644165,
-0.18779700994491577,
-0.1850411295890808,
0.0291861891746521,
-0.14285802841186523,
-0.5513569116592407,
-0.08039997518062592,
0.21359768509864807,
0.004391372203826904,
-0.10600432753562927,
0.038950927555561066,
0.23508858680725098,
0.019078098237514496,
0.0642271339893341,
-0.16801106929779053,
0.038996390998363495,
-0.14607711136341095,
0.3383287787437439,
0.10454466938972473,
-0.07158543169498444,
-0.1518200933933258,
-0.0038302913308143616,
0.2077963948249817,
-0.012547574937343597,
0.5573087334632874,
-0.20761044323444366,
-0.260932594537735,
0.21822723746299744,
-0.13225123286247253,
0.16367527842521667,
0.20306237041950226,
-0.45738187432289124,
0.7396343946456909,
0.07663023471832275,
-0.12732580304145813,
-0.10408900678157806,
0.20577925443649292,
0.18837925791740417,
-0.0975094884634018,
0.0975169688463211,
0.40542352199554443,
-0.11935637146234512,
0.0373418852686882,
0.025590024888515472,
0.5467458963394165,
-0.1822921335697174,
0.10827165842056274,
-0.12443578243255615,
0.109108105301857,
0.05644870549440384,
0.3309251368045807,
0.24497582018375397,
0.17167699337005615,
-0.29940158128738403,
0.273843377828598,
0.08558262139558792,
0.21954143047332764,
0.29256653785705566,
-0.2494649887084961,
-0.28260037302970886,
-0.22180436551570892,
0.42594248056411743,
0.19427385926246643,
0.4395255744457245,
-0.21378234028816223,
0.4651105999946594,
0.08342750370502472,
-0.10329664498567581,
-0.11981172859668732,
0.3500233590602875,
-0.2463005781173706,
-0.27323248982429504,
0.31218552589416504,
0.18688485026359558,
0.005664132535457611,
0.06510409712791443,
-0.08432595431804657,
0.14862215518951416,
0.06723712384700775,
0.03226684778928757,
0.20415465533733368,
0.027110427618026733,
0.13517507910728455,
-0.11028594523668289,
0.36593008041381836,
-0.32799726724624634,
0.39002567529678345,
-0.5145686864852905,
-0.03189757466316223,
-0.06032603606581688,
0.14280365407466888,
0.28650107979774475,
0.42761075496673584,
-0.28940823674201965,
0.2143203765153885,
-0.23718814551830292,
0.11399675905704498,
-0.13168267905712128,
0.6725894808769226,
0.10620831698179245,
-0.3592396378517151,
0.060408178716897964,
-0.12259982526302338,
0.06721113622188568,
-0.122030109167099,
0.018768280744552612,
0.13377909362316132,
0.37159860134124756,
0.4393759071826935,
0.17122900485992432,
-0.18796440958976746,
0.18400783836841583,
-0.0826585665345192,
-0.1516806185245514,
-0.018657997250556946,
0.25582271814346313,
-0.21178652346134186,
0.20751157402992249,
-0.05225694179534912,
0.03892587497830391,
-0.0572504885494709,
0.28711116313934326,
0.45559030771255493,
-0.1097857877612114,
-0.2626076340675354,
-0.19792981445789337,
-0.428973913192749,
0.32548320293426514,
-0.05249236151576042,
0.2151358723640442,
-0.25316086411476135,
0.13331514596939087,
-0.23135393857955933,
-0.11300848424434662,
-0.06587746739387512,
0.0468086302280426,
-0.34186646342277527,
0.08561256527900696,
-0.0914580374956131,
0.47505611181259155,
-0.08212721347808838,
0.22280584275722504,
0.11320783197879791,
-0.24521547555923462,
0.22180187702178955,
0.10540740936994553,
0.023710384964942932,
-0.03919810429215431,
-0.034060969948768616,
-0.02808513678610325,
0.4003095328807831,
0.3607790470123291,
0.19402019679546356,
0.1324509233236313,
0.14923810958862305,
0.1936810314655304,
-0.22811880707740784,
0.16479769349098206,
0.08837775886058807,
0.13164149224758148,
-0.01774546131491661,
0.17255116999149323,
-0.5090722441673279,
0.2825237810611725,
-0.17148315906524658,
0.0419759638607502,
0.02401670068502426,
-0.4783896207809448,
-0.10064305365085602,
-0.12483619153499603,
-0.1889444887638092,
0.07883627712726593,
0.05243619903922081,
0.14894351363182068,
-0.14305514097213745,
0.15284296870231628,
-0.3796413540840149,
-0.28298911452293396,
0.29564329981803894,
-0.7287414073944092,
-0.5526953339576721,
-0.037300363183021545,
0.1941935420036316,
0.4796527922153473,
-0.07247106730937958,
-0.22924652695655823,
-0.29451632499694824,
0.3064783811569214,
0.06634505093097687,
-0.226318359375,
-0.22725585103034973,
-0.14702735841274261,
-0.08267129212617874,
-0.3321796953678131,
0.07764333486557007,
0.08180654048919678,
-0.2620282471179962,
-0.2196841537952423,
-0.12961412966251373
] |
https://github.com/huggingface/datasets/issues/501 | Caching doesn't work for map (non-deterministic) | Hi @MaveriQ! This fix is also included in the `datasets` library. Can you provide a reproducer? | The caching functionality doesn't work reliably when tokenizing a dataset. Here's a small example to reproduce it.
```python
import nlp
import transformers
def main():
ds = nlp.load_dataset("reddit", split="train[:500]")
tokenizer = transformers.AutoTokenizer.from_pretrained("gpt2")
def convert_to_features(example_batch):
input_str = example_batch["body"]
encodings = tokenizer(input_str, add_special_tokens=True, truncation=True)
return encodings
ds = ds.map(convert_to_features, batched=True)
if __name__ == "__main__":
main()
```
Roughly 3/10 times, this example recomputes the tokenization.
Is this expected behaviour? | 16 | Caching doesn't work for map (non-deterministic)
The caching functionality doesn't work reliably when tokenizing a dataset. Here's a small example to reproduce it.
```python
import nlp
import transformers
def main():
ds = nlp.load_dataset("reddit", split="train[:500]")
tokenizer = transformers.AutoTokenizer.from_pretrained("gpt2")
def convert_to_features(example_batch):
input_str = example_batch["body"]
encodings = tokenizer(input_str, add_special_tokens=True, truncation=True)
return encodings
ds = ds.map(convert_to_features, batched=True)
if __name__ == "__main__":
main()
```
Roughly 3/10 times, this example recomputes the tokenization.
Is this expected behaviour?
Hi @MaveriQ! This fix is also included in the `datasets` library. Can you provide a reproducer? | [
-0.1349279284477234,
0.06448481976985931,
0.054842259734869,
-0.03990881145000458,
0.08280739188194275,
-0.19817164540290833,
0.261613130569458,
0.14076370000839233,
0.062289122492074966,
-0.31121599674224854,
0.0850706398487091,
0.3259902596473694,
-0.08646847307682037,
-0.17782582342624664,
0.06490283459424973,
0.1799335926771164,
0.39022791385650635,
0.07195957750082016,
0.20124408602714539,
-0.12966471910476685,
-0.12208575010299683,
-0.0392003133893013,
-0.45672738552093506,
-0.1123671680688858,
-0.6042137145996094,
0.04766780138015747,
-0.182251438498497,
-0.5127728581428528,
0.24233798682689667,
-0.4093155562877655,
0.11089515686035156,
0.21004287898540497,
0.0581875741481781,
0.2194381207227707,
-0.00011596408148761839,
-0.20177118480205536,
0.3354034423828125,
-0.012746728025376797,
0.07365618646144867,
-0.08198775351047516,
-0.10247783362865448,
-0.4235684275627136,
-0.0876661166548729,
-0.06467247009277344,
-0.16404813528060913,
-0.23479245603084564,
0.26820632815361023,
-0.11250230669975281,
0.49578726291656494,
0.0026941057294607162,
0.15723702311515808,
0.2507798969745636,
0.011210385710000992,
0.256608247756958,
-0.03765324503183365,
0.09722253680229187,
-0.17259708046913147,
-0.2864345908164978,
0.035221632570028305,
-0.4202393889427185,
-0.3749331533908844,
0.23373465240001678,
-0.16198240220546722,
-0.14817656576633453,
0.19558581709861755,
0.20296840369701385,
-0.09079620987176895,
-0.21974313259124756,
0.2062353789806366,
-0.20818957686424255,
0.6324712038040161,
-0.17204532027244568,
-0.327621728181839,
-0.1973121166229248,
-0.20085972547531128,
-0.17375187575817108,
0.41240713000297546,
-0.0812661275267601,
-0.008854314684867859,
0.04892066493630409,
-0.49000608921051025,
0.1640225499868393,
0.06569857895374298,
0.1546882688999176,
-0.022301476448774338,
0.6200382709503174,
0.07382653653621674,
0.12935125827789307,
-0.22602032124996185,
-0.2605072259902954,
0.08411988615989685,
-0.2511439025402069,
-0.09359796345233917,
0.4597420394420624,
-0.2610233724117279,
-0.3019331395626068,
0.0010537803173065186,
-0.05460947006940842,
0.06648867577314377,
0.14676764607429504,
-0.10786186158657074,
0.1704319715499878,
0.032388024032115936,
0.14507436752319336,
0.11022499203681946,
0.5370433926582336,
0.1107848659157753,
0.5495604276657104,
0.2153489887714386,
-0.5512447357177734,
-0.4485074579715729,
-0.06828409433364868,
-0.03997921198606491,
0.03402164950966835,
0.6473576426506042,
0.04630186781287193,
-0.22751179337501526,
0.049556102603673935,
0.006845785304903984,
0.023816511034965515,
-0.2909310460090637,
-0.1684647798538208,
0.061401255428791046,
0.20614373683929443,
-0.17410683631896973,
0.043525051325559616,
-0.5797643065452576,
0.07848674058914185,
0.03512950241565704,
-0.18551896512508392,
-0.23160472512245178,
-0.2064620405435562,
-0.43562474846839905,
0.176345095038414,
0.23887674510478973,
0.5577669739723206,
0.2926327586174011,
-0.07841060310602188,
-0.23307709395885468,
-0.13619285821914673,
0.14430299401283264,
-0.2985076904296875,
0.34659847617149353,
0.03195220232009888,
-0.2624129354953766,
0.22490249574184418,
0.045916758477687836,
-0.02877061627805233,
-0.3070552349090576,
-0.0029962360858917236,
-0.1413595974445343,
-0.11231711506843567,
0.28339245915412903,
0.07484136521816254,
-0.21521970629692078,
-0.19100818037986755,
-0.0763327106833458,
0.3265385925769806,
0.6145004034042358,
-0.1883472502231598,
0.010896362364292145,
-0.06077037751674652,
-0.35837361216545105,
-0.2373887449502945,
0.13974176347255707,
0.33997631072998047,
0.18896329402923584,
-0.2326073795557022,
0.40011683106422424,
0.39744338393211365,
0.4188375174999237,
0.6160258650779724,
-0.24045109748840332,
0.16914445161819458,
-0.1544618010520935,
0.4835096001625061,
0.2125479280948639,
-0.16091075539588928,
-0.6110787987709045,
0.05785016342997551,
0.04501138627529144,
0.06161881983280182,
-0.19146513938903809,
0.05482827499508858,
0.3530570864677429,
-0.24840234220027924,
0.014301031827926636,
0.3590617775917053,
0.11694701761007309,
0.049956247210502625,
-0.2933940887451172,
-0.056423693895339966,
0.47721076011657715,
-0.18509304523468018,
0.1748519092798233,
0.021536216139793396,
-0.03765975683927536,
0.19938847422599792,
-0.18293297290802002,
0.05732155591249466,
0.23113670945167542,
-0.020720012485980988,
0.20473672449588776,
-0.1743491142988205,
0.09830208122730255,
-0.08405597507953644,
-0.2743791341781616,
0.21945875883102417,
-0.10592055320739746,
-0.20114180445671082,
0.03151027858257294,
-0.15326720476150513,
0.12425840646028519,
-0.06552276760339737,
-0.11905209720134735,
-0.2552020251750946,
0.11484101414680481,
0.12213991582393646,
0.3242988884449005,
0.1338716447353363,
-0.1251889020204544,
0.1648809015750885,
0.2910411059856415,
0.05374418944120407,
0.09991626441478729,
0.006472831591963768,
0.07388122379779816,
-0.21576924622058868,
-0.283256858587265,
0.13498827815055847,
0.26948925852775574,
0.0521690770983696,
-0.20352137088775635,
0.18771731853485107,
-0.03555731102824211,
0.30991145968437195,
-0.09158798307180405,
0.3279067873954773,
0.13776010274887085,
-0.1472410410642624,
0.037228431552648544,
0.35377028584480286,
-0.016551770269870758,
-0.22853505611419678,
-0.03001505136489868,
0.4332900047302246,
0.43612584471702576,
0.013584181666374207,
-0.1453244984149933,
0.019864549860358238,
0.2964637875556946,
-0.08618254959583282,
-0.07741368561983109,
-0.19245845079421997,
0.004368875175714493,
-0.09525330364704132,
0.16944971680641174,
0.1364935040473938,
-0.08565530925989151,
0.15504330396652222,
0.4342217743396759,
0.01033652201294899,
0.08812317997217178,
0.08522003144025803,
-0.33908942341804504,
-0.5202369093894958,
0.22507987916469574,
0.022512022405862808,
0.05774317681789398,
0.03506888821721077,
0.2565164566040039,
-0.10163017362356186,
-0.17275649309158325,
-0.1626044064760208,
0.16862905025482178,
-0.12732462584972382,
-0.11912571638822556,
0.11038944125175476,
0.2787749171257019,
0.2743997573852539,
-0.23164507746696472,
-0.054599255323410034,
0.2804866433143616,
0.08488292992115021,
-0.06818607449531555,
0.0396222323179245,
-0.2341291755437851,
-0.129776269197464,
0.2234523743391037,
-0.03209057077765465,
-0.21110853552818298,
-0.21561773121356964,
-0.15925590693950653,
0.32158413529396057,
0.05588190630078316,
0.464717298746109,
-0.13285940885543823,
0.07961280643939972,
-0.048698924481868744,
-0.07478226721286774,
-0.13737276196479797,
-0.28377604484558105,
-0.2328467071056366,
-0.06904979050159454,
0.1672569066286087,
-0.2344752848148346,
0.30796346068382263,
-0.031068993732333183,
0.07416452467441559,
-0.19965073466300964,
-0.36782577633857727,
0.14224205911159515,
0.015758778899908066,
-0.10769154131412506,
-0.1644544005393982,
-0.2974182963371277,
-0.4958952069282532,
-0.010438691824674606,
0.20361003279685974,
-0.37608468532562256,
-0.13918820023536682,
0.13713686168193817,
0.10438945889472961,
-0.13174410164356232,
0.034681398421525955,
0.08512371778488159,
-0.11115994304418564,
0.013655170798301697,
0.14463040232658386,
-0.07438714802265167,
0.06037836894392967,
0.424683153629303,
-0.21522511541843414,
0.002207704819738865,
-0.31101202964782715,
-0.1141727864742279,
-0.35198894143104553,
-0.21694083511829376,
0.6883367896080017,
-0.0656341090798378,
-0.15319222211837769,
-0.0650055855512619,
-0.05782604590058327,
0.2550615072250366,
0.4300459623336792,
-0.2274760752916336,
0.16954070329666138,
-0.2081504762172699,
0.14058491587638855,
0.04028167575597763,
-0.2838389277458191,
0.31090813875198364,
-0.1346193552017212,
-0.0874234214425087,
0.04309116303920746,
-0.06654155999422073,
0.08565730601549149,
0.15096043050289154,
0.2732169032096863,
0.11643628031015396,
0.1689748466014862,
0.25815436244010925,
0.765081524848938,
0.10977296531200409,
-0.16776473820209503,
0.2541152834892273,
0.19913484156131744,
0.14067310094833374,
-0.23067471385002136,
-0.1194840595126152,
-0.0008017956279218197,
-0.10545012354850769,
0.008070822805166245,
0.19315211474895477,
0.06190090253949165,
-0.46196091175079346,
-0.04817815124988556,
-0.17845989763736725,
-0.006016813218593597,
-0.2525772750377655,
0.14292415976524353,
-0.5183974504470825,
0.4206294119358063,
0.29258447885513306,
0.37919846177101135,
-0.5391911268234253,
-0.4287974238395691,
-0.041168827563524246,
-0.20094363391399384,
0.36528468132019043,
-0.03659030795097351,
-0.6461907029151917,
0.11679206788539886,
-0.6486899256706238,
0.16648036241531372,
-0.073895663022995,
0.659725546836853,
-0.04403483122587204,
-0.03976680338382721,
-0.026849523186683655,
-0.035625308752059937,
0.42445898056030273,
-0.27671849727630615,
0.1389128565788269,
0.07228018343448639,
-0.19283583760261536,
-0.07069908082485199,
-0.18526813387870789,
-0.02705768682062626,
0.1846548616886139,
0.36108121275901794,
0.7297500371932983,
-0.14898471534252167,
-0.13204164803028107,
-0.5274554491043091,
0.013314757496118546,
0.11715283989906311,
-0.3186250329017639,
0.022514570504426956,
0.3716965615749359,
-0.22129587829113007,
0.17999489605426788,
0.26026037335395813,
-0.09670411050319672,
0.11951490491628647,
-0.11738628149032593,
-0.26904332637786865,
-0.07568435370922089,
0.07330860197544098,
0.045801449567079544,
0.35270991921424866,
0.03600034862756729,
0.33346280455589294,
0.1937965303659439,
0.13227757811546326,
-0.1630796492099762,
-0.274059534072876,
0.1234951913356781,
-0.3051707148551941,
-0.012526050209999084,
0.011092173866927624,
0.26398590207099915,
0.08197392523288727,
-0.043244440108537674,
0.09041587263345718,
-0.22097815573215485,
-0.017669588327407837,
-0.3450406491756439,
0.2025805562734604,
0.1755468100309372,
0.24319177865982056,
-0.4107372462749481,
-0.3571433126926422,
0.19472092390060425,
0.18846721947193146,
-0.16051064431667328,
0.2570655643939972,
-0.303405225276947,
-0.4287472367286682,
0.5609029531478882,
0.22478440403938293,
0.90692138671875,
0.131433367729187,
0.3749714195728302,
-0.2676352262496948,
0.18524935841560364,
0.5485239028930664,
-0.04705285280942917,
0.29305219650268555,
-0.2296569049358368,
0.05794640630483627,
-0.04330980405211449,
-0.1304539293050766,
-0.02993524819612503,
0.29756489396095276,
-0.2701743245124817,
0.39743393659591675,
0.09793777763843536,
0.7751334309577942,
0.08817852288484573,
0.09211134910583496,
0.09721408784389496,
-0.2509597837924957,
0.25010988116264343,
0.1401319056749344,
-0.09771399199962616,
0.2687448561191559,
-0.010245158337056637,
-0.001819961704313755,
0.10216504335403442,
0.062309011816978455,
-0.22311493754386902,
0.07650279998779297,
-0.19006682932376862,
0.212882399559021,
0.18404996395111084,
-0.019014202058315277,
0.058623071759939194,
0.24061022698879242,
0.3945571184158325,
0.22168713808059692,
-0.27420854568481445,
0.06308357417583466,
0.2806340157985687,
0.29205429553985596,
-0.05206641927361488,
-0.31702935695648193,
0.1951928585767746,
0.06567904353141785,
0.03763147443532944,
-0.12705078721046448,
-0.043766096234321594,
-0.3309444785118103,
-0.4398138225078583,
0.009160198271274567,
0.196467325091362,
-0.11842647194862366,
0.15118606388568878,
0.04781084507703781,
-0.11250340938568115,
-0.2102476954460144,
0.1365867555141449,
0.16486260294914246,
0.0007340861484408379,
0.3482034504413605,
-0.13923174142837524,
-0.08056903630495071,
0.03103683702647686,
0.4734482765197754,
0.09031718969345093,
-0.13280144333839417,
0.5852774381637573,
-0.37809285521507263,
-0.36708390712738037,
-0.20676204562187195,
-0.14582626521587372,
-0.17802807688713074,
-0.3409252166748047,
-0.018917977809906006,
-0.33701270818710327,
-0.16211102902889252,
0.04663928225636482,
0.09900327026844025,
0.06167944520711899,
0.04113243520259857,
0.015987273305654526,
-0.21935734152793884,
-0.45047175884246826,
-0.09867626428604126,
-0.08115670084953308,
0.05678088963031769,
-0.014295857399702072,
0.2390906661748886,
-0.0027210265398025513,
0.18992888927459717,
-0.27970457077026367,
-0.15163765847682953,
0.009662045165896416,
0.22324934601783752,
-0.3301489055156708,
-0.22546783089637756,
-0.02489548921585083,
-0.073616161942482,
0.00730057992041111,
0.24372456967830658,
-0.18719571828842163,
-0.15192243456840515,
-0.05323927477002144,
0.15883657336235046,
0.3261813819408417,
-0.25511300563812256,
-0.14514940977096558,
0.02812117710709572,
-0.07054747641086578,
-0.5471653938293457,
-0.21097606420516968,
0.27995482087135315,
0.03983137011528015,
0.04715808480978012,
0.2074069082736969,
0.29590070247650146,
0.1902136504650116,
-0.04254641383886337,
0.006481178104877472,
-0.022489041090011597,
-0.11473295092582703,
0.31523025035858154,
0.06915264576673508,
0.060053750872612,
-0.27344709634780884,
0.12171025574207306,
0.21499547362327576,
-0.0069452449679374695,
0.38146069645881653,
-0.15735438466072083,
-0.1370171308517456,
0.16802063584327698,
-0.14893601834774017,
0.16379496455192566,
0.020735038444399834,
-0.49995157122612,
0.7711906433105469,
0.16437135636806488,
-0.13742312788963318,
-0.12200499325990677,
0.24051989614963531,
0.1679236739873886,
-0.03261137008666992,
-0.027499593794345856,
0.5009929537773132,
-0.07267733663320541,
0.006921499967575073,
0.07108468562364578,
0.5759029388427734,
-0.3398747444152832,
0.2092280089855194,
-0.04046831652522087,
0.12068317830562592,
0.13547466695308685,
0.3010747730731964,
0.05313321575522423,
0.0397491455078125,
0.12305238097906113,
0.3398989140987396,
0.2608598470687866,
0.21468278765678406,
0.23089225590229034,
-0.2610505521297455,
-0.17769430577754974,
-0.15503551065921783,
0.35103553533554077,
-0.09874720871448517,
0.5012529492378235,
-0.10626989603042603,
0.18866388499736786,
0.039076291024684906,
-0.14245788753032684,
-0.2330261766910553,
0.3268849551677704,
-0.28994086384773254,
-0.28800851106643677,
-0.0100551787763834,
-0.042404189705848694,
-0.09967267513275146,
0.15415923297405243,
-0.19533473253250122,
0.11049826443195343,
0.04520512744784355,
-0.061201512813568115,
-0.0604325532913208,
-0.15436951816082,
0.19992578029632568,
0.029018182307481766,
0.35090041160583496,
-0.2987217605113983,
0.3256942629814148,
-0.4327579736709595,
-0.11473241448402405,
-0.21655774116516113,
0.23169736564159393,
0.3006224036216736,
0.32639527320861816,
-0.2740839421749115,
0.10667973011732101,
-0.04613396152853966,
0.03362122178077698,
-0.17681525647640228,
0.6580578684806824,
0.015168875455856323,
-0.5250890254974365,
0.03754204511642456,
-0.05132761597633362,
-0.022175349295139313,
-0.003459617495536804,
0.11060892045497894,
-0.06695559620857239,
0.11818762123584747,
0.48993298411369324,
-0.01912713423371315,
-0.20316168665885925,
0.25362449884414673,
0.1073312982916832,
-0.277296781539917,
-0.012389897368848324,
0.27994951605796814,
-0.0833565816283226,
0.22325420379638672,
-0.2561102509498596,
0.08354737609624863,
-0.18594209849834442,
0.3644551932811737,
0.45889079570770264,
-0.0992792472243309,
-0.2734648585319519,
-0.14623215794563293,
-0.47273364663124084,
0.4227394759654999,
-0.10853369534015656,
0.35376569628715515,
-0.23161320388317108,
0.15086889266967773,
-0.19572991132736206,
-0.05475311726331711,
-0.10914066433906555,
0.08260279148817062,
-0.24992945790290833,
0.09768195450305939,
-0.2075524777173996,
0.35060805082321167,
-0.16936233639717102,
0.2854713797569275,
0.10248443484306335,
-0.2893661558628082,
0.331447571516037,
-0.0260641947388649,
0.10870332270860672,
-0.129149928689003,
0.016066960990428925,
0.02228536456823349,
0.28911906480789185,
0.49198663234710693,
0.2746265232563019,
0.1604718714952469,
0.08118101954460144,
0.17904803156852722,
-0.41739416122436523,
-0.0745878592133522,
-0.09962259978055954,
-0.0355139896273613,
-0.08059301972389221,
0.14243590831756592,
-0.33510348200798035,
0.19400233030319214,
-0.09099575877189636,
-0.04476221278309822,
0.10142688453197479,
-0.38050174713134766,
-0.0763409212231636,
-0.05374126881361008,
-0.19651535153388977,
-0.07644645869731903,
-0.047341328114271164,
0.3012929856777191,
-0.07141156494617462,
0.25532135367393494,
-0.3666988015174866,
-0.2915985584259033,
0.2564956843852997,
-0.6239059567451477,
-0.4820702373981476,
-0.13774508237838745,
0.12349293380975723,
0.45233243703842163,
0.013246599584817886,
-0.2757900655269623,
-0.19981230795383453,
0.3442097306251526,
0.07552989572286606,
-0.182403102517128,
0.014553952030837536,
0.10721740126609802,
-0.060577403753995895,
-0.2886028289794922,
0.4881148040294647,
0.00008456781506538391,
-0.26122260093688965,
0.12625230848789215,
-0.08670753240585327
] |
https://github.com/huggingface/datasets/issues/492 | nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema | In 0.4.0, the assertion in `concatenate_datasets ` is on the features, and not the schema.
Could you try to update `nlp` ?
Also, since 0.4.0, you can use `dset_wikipedia.cast_(dset_books.features)` to avoid the schema cast hack. | Here's the code I'm trying to run:
```python
dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir)
dset_wikipedia.drop(columns=["title"])
dset_wikipedia.features.pop("title")
dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir)
dset = nlp.concatenate_datasets([dset_wikipedia, dset_books])
```
This fails because they have different schemas, despite having identical features.
```python
assert dset_wikipedia.features == dset_books.features # True
assert dset_wikipedia._data.schema == dset_books._data.schema # False
```
The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves.
```python
dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema)
```
| 35 | nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema
Here's the code I'm trying to run:
```python
dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir)
dset_wikipedia.drop(columns=["title"])
dset_wikipedia.features.pop("title")
dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir)
dset = nlp.concatenate_datasets([dset_wikipedia, dset_books])
```
This fails because they have different schemas, despite having identical features.
```python
assert dset_wikipedia.features == dset_books.features # True
assert dset_wikipedia._data.schema == dset_books._data.schema # False
```
The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves.
```python
dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema)
```
In 0.4.0, the assertion in `concatenate_datasets ` is on the features, and not the schema.
Could you try to update `nlp` ?
Also, since 0.4.0, you can use `dset_wikipedia.cast_(dset_books.features)` to avoid the schema cast hack. | [
-0.06439656019210815,
0.11732551455497742,
0.026808492839336395,
0.1252688765525818,
0.15670698881149292,
-0.07730834186077118,
0.34048697352409363,
0.1692478209733963,
-0.3219624161720276,
-0.353398859500885,
0.07657499611377716,
0.367360919713974,
-0.0683538094162941,
0.32758182287216187,
0.09264781326055527,
-0.027801550924777985,
0.20226643979549408,
0.2302504926919937,
0.0969584509730339,
-0.0026240088045597076,
-0.0930330753326416,
0.18114466965198517,
-0.39656251668930054,
0.040222346782684326,
-0.5902642607688904,
0.2065485715866089,
-0.033300139009952545,
-0.01950646936893463,
-0.1387539803981781,
-0.5088024735450745,
0.3443296551704407,
0.20197367668151855,
-0.100295290350914,
0.34479615092277527,
-0.00012460003199521452,
-0.12146662920713425,
0.5814357995986938,
-0.10619399696588516,
-0.13572461903095245,
-0.1315976232290268,
-0.10617271065711975,
-0.3342741131782532,
0.14512957632541656,
-0.18405911326408386,
0.044118575751781464,
-0.1426273137331009,
-0.00757330097258091,
0.30418896675109863,
-0.5539481043815613,
0.26949331164360046,
0.04740102216601372,
0.514581561088562,
0.4430455267429352,
0.25059974193573,
0.33812445402145386,
0.003944903612136841,
-0.1633378267288208,
0.07745271921157837,
-0.22171828150749207,
-0.23089568316936493,
0.2946069538593292,
-0.00408950075507164,
-0.30326488614082336,
-0.2862056791782379,
0.18922030925750732,
0.005323578603565693,
0.03609785810112953,
-0.14862170815467834,
-0.13279452919960022,
0.4225984215736389,
0.44905030727386475,
-0.2722758650779724,
-0.3485789895057678,
-0.20521444082260132,
0.024923361837863922,
-0.2226932942867279,
0.3266037106513977,
0.41078221797943115,
0.049545254558324814,
0.04458942264318466,
-0.44048386812210083,
0.11014892160892487,
-0.1068292111158371,
0.2732962369918823,
-0.3308849036693573,
0.3821586072444916,
0.4234020709991455,
0.10966071486473083,
0.012808151543140411,
-0.12922106683254242,
0.25862517952919006,
-0.3746068775653839,
-0.019423488527536392,
0.16267240047454834,
-0.2908127009868622,
-0.18419931828975677,
-0.22538629174232483,
0.022113390266895294,
0.4305441379547119,
-0.02901797741651535,
-0.14555588364601135,
0.07469864189624786,
-0.14019563794136047,
0.10762731730937958,
0.19453297555446625,
0.2544098198413849,
0.22397860884666443,
-0.10421373695135117,
0.003869045525789261,
0.07679611444473267,
-0.21665383875370026,
0.2659812867641449,
0.2274274379014969,
-0.27575039863586426,
0.08937942981719971,
-0.040519293397665024,
0.5651309490203857,
-0.06947264075279236,
-0.3042343854904175,
0.05654820427298546,
-0.7364642024040222,
-0.123580701649189,
0.10291466116905212,
-0.04024973511695862,
-0.0763518288731575,
0.44912371039390564,
0.05864337086677551,
0.36355656385421753,
-0.19769582152366638,
-0.3798345923423767,
-0.07226265221834183,
0.014561093412339687,
0.016205180436372757,
0.061152271926403046,
0.1437862515449524,
0.07904334366321564,
0.16704653203487396,
-0.020861079916357994,
-0.4102078080177307,
0.2052234709262848,
-0.21138902008533478,
-0.16764521598815918,
-0.14890599250793457,
0.02897743508219719,
-0.219166561961174,
-0.36026108264923096,
0.015673955902457237,
-0.35023999214172363,
-0.23684394359588623,
0.15333954989910126,
-0.0034029781818389893,
-0.30476927757263184,
-0.2618936598300934,
0.03209327906370163,
-0.3846158981323242,
-0.10740508139133453,
-0.05265577882528305,
0.3227861821651459,
0.21901953220367432,
-0.018992597237229347,
0.07113300263881683,
-0.11525526642799377,
-0.0018659122288227081,
-0.24450291693210602,
0.14686349034309387,
0.15509158372879028,
-0.05093412473797798,
-0.016489967703819275,
0.11213412880897522,
-0.16545546054840088,
-0.04991849511861801,
0.26302289962768555,
-0.08395261317491531,
0.09469851106405258,
-0.16705653071403503,
0.4398614168167114,
0.35684633255004883,
-0.007368244230747223,
-0.0031483564525842667,
0.04584495350718498,
0.26897501945495605,
0.08529046922922134,
0.11071145534515381,
0.008312494494020939,
-0.37393638491630554,
0.03493403643369675,
-0.04454810917377472,
0.34062469005584717,
-0.06432804465293884,
-0.13244904577732086,
-0.20040149986743927,
-0.32908299565315247,
0.6721149682998657,
-0.16428937017917633,
-0.07429607212543488,
0.13884319365024567,
-0.09337278455495834,
0.23716458678245544,
0.3771463930606842,
-0.23933637142181396,
-0.13517527282238007,
-0.03203919529914856,
0.2976108491420746,
0.22488534450531006,
-0.35737013816833496,
-0.32453152537345886,
-0.6215192675590515,
0.11531282216310501,
-0.27445340156555176,
0.5649372339248657,
-0.07131730020046234,
-0.34678715467453003,
-0.022643551230430603,
0.11680398136377335,
0.18421176075935364,
0.04912451282143593,
0.0502411350607872,
0.13206735253334045,
0.0034758783876895905,
0.20404604077339172,
-0.01722446084022522,
-0.03416210412979126,
-0.0021853987127542496,
0.07433698326349258,
-0.15439699590206146,
0.5079222917556763,
-0.05080098658800125,
-0.2447681427001953,
0.011601075530052185,
0.5782470107078552,
0.2310590147972107,
0.001877314643934369,
0.020986272022128105,
0.2861756980419159,
-0.021009597927331924,
0.016991131007671356,
-0.1841738224029541,
0.3597719073295593,
0.010344431735575199,
-0.10821321606636047,
-0.11973416060209274,
0.29582878947257996,
0.08247368782758713,
-0.0362321101129055,
0.10697771608829498,
0.5403357148170471,
0.08906130492687225,
-0.12748229503631592,
0.2386866956949234,
-0.031010974198579788,
0.0641218051314354,
-0.14568422734737396,
-0.09171957522630692,
-0.06876321136951447,
0.10331165045499802,
-0.029711417853832245,
-0.3782552182674408,
0.46861809492111206,
-0.5818834900856018,
-0.1038336232304573,
0.4880427122116089,
-0.18039241433143616,
0.20120227336883545,
-0.18904945254325867,
-0.19808098673820496,
0.0216359943151474,
0.3691531717777252,
-0.3686346113681793,
0.164269357919693,
0.1738225817680359,
0.02482384815812111,
0.04858182370662689,
-0.30413249135017395,
0.0645628347992897,
0.37595927715301514,
-0.03632596880197525,
0.12762592732906342,
-0.010122984647750854,
0.2944432497024536,
-0.20631490647792816,
-0.3622223734855652,
0.14047326147556305,
0.12486038357019424,
-0.00015787780284881592,
-0.33403676748275757,
-0.008838901296257973,
-0.3641412854194641,
-0.06759056448936462,
-0.4399201571941376,
-0.22861595451831818,
-0.503398597240448,
-0.43183526396751404,
-0.14808811247348785,
0.7034401893615723,
0.004324525594711304,
0.27847349643707275,
-0.6784136891365051,
-0.22468207776546478,
0.0438680499792099,
-0.26377373933792114,
-0.01350599154829979,
0.04790462553501129,
-0.19326460361480713,
-0.0891905277967453,
0.2925311326980591,
0.1887551248073578,
-0.20671650767326355,
0.020694592967629433,
-0.16096368432044983,
-0.20258775353431702,
-0.7249016165733337,
0.0783894956111908,
-0.3375943899154663,
0.00199054554104805,
0.2957773208618164,
-0.0846201628446579,
0.15909059345722198,
-0.34672778844833374,
0.14590106904506683,
0.1718694269657135,
-0.4136028587818146,
0.4664402902126312,
0.03332445025444031,
-0.287702739238739,
-0.008931493386626244,
-0.21850791573524475,
-0.058883748948574066,
-0.24343863129615784,
0.23348002135753632,
-0.013571565970778465,
0.07514688372612,
0.43133872747421265,
0.01593010127544403,
0.0507933683693409,
-0.1473100632429123,
-0.04406216740608215,
0.0670362263917923,
0.43668991327285767,
0.4299980103969574,
0.24937158823013306,
-0.15704552829265594,
0.1447857767343521,
-0.23026321828365326,
-0.16301703453063965,
0.2447805255651474,
0.000988893210887909,
-0.11028750240802765,
-0.15803243219852448,
0.5572421550750732,
0.20547178387641907,
-0.5082896947860718,
0.3505127429962158,
0.4187277555465698,
0.07526154071092606,
0.013917900621891022,
-0.2324424833059311,
-0.009098462760448456,
0.4431094825267792,
0.2931428551673889,
0.08663994073867798,
-0.1674504578113556,
0.17159120738506317,
0.05248870700597763,
-0.03548990562558174,
-0.2688121199607849,
0.5545907020568848,
-0.19803111255168915,
-0.006735365837812424,
0.16514548659324646,
-0.0011853110045194626,
-0.1469268649816513,
0.015507906675338745,
0.27956855297088623,
0.19511106610298157,
-0.24524646997451782,
-0.23439113795757294,
0.13713595271110535,
0.12299290299415588,
-0.18624579906463623,
-0.14446485042572021,
0.13355880975723267,
-0.3576020300388336,
0.36505013704299927,
-0.06971286237239838,
-0.16778486967086792,
-0.1720568686723709,
-0.42460623383522034,
-0.024985939264297485,
0.14610245823860168,
-0.05824325233697891,
0.11054965108633041,
-0.6636126637458801,
-0.05151698738336563,
-0.006246939301490784,
0.39964842796325684,
0.19197958707809448,
0.5644321441650391,
0.22600384056568146,
-0.42119595408439636,
-0.1715785712003708,
-0.14372800290584564,
0.5449907779693604,
0.009910522028803825,
-0.1428053081035614,
0.29447147250175476,
0.2399405539035797,
-0.28927069902420044,
-0.27854523062705994,
0.02735113725066185,
0.12035921961069107,
0.35691383481025696,
0.24000133574008942,
-0.5941351652145386,
-0.24634775519371033,
0.3794518709182739,
0.28202828764915466,
0.03032432124018669,
-0.03144780918955803,
-0.12356969714164734,
0.05202646553516388,
0.05942162871360779,
-0.17027252912521362,
-0.07572879642248154,
0.35462892055511475,
-0.3836919963359833,
0.035162683576345444,
-0.31019923090934753,
-0.09641661494970322,
0.1639792025089264,
0.330537348985672,
0.3377698063850403,
-0.31649282574653625,
0.0744251012802124,
-0.3892458975315094,
0.14555895328521729,
0.12628892064094543,
0.38106802105903625,
0.39673352241516113,
-0.44784629344940186,
-0.4655647873878479,
0.11590348184108734,
0.357837975025177,
-0.027673542499542236,
0.1747053861618042,
0.28861770033836365,
-0.20071662962436676,
-0.2645499110221863,
-0.19837571680545807,
-0.028964219614863396,
0.41334155201911926,
-0.09976054728031158,
-0.11462196707725525,
-0.06494193524122238,
0.509623110294342,
0.0212690532207489,
0.12192076444625854,
-0.588642954826355,
0.2646949291229248,
-0.475528359413147,
0.2535632252693176,
-0.11447007209062576,
0.9977648854255676,
0.11568401753902435,
0.10022831708192825,
0.2691836357116699,
0.16573695838451385,
0.5099565386772156,
0.007556498050689697,
0.15776628255844116,
-0.3320663273334503,
0.23493127524852753,
-0.14032161235809326,
-0.2033420205116272,
0.18939799070358276,
0.2155362367630005,
-0.2847732603549957,
0.20998500287532806,
-0.044533614069223404,
0.08996796607971191,
-0.03129028528928757,
0.2504953145980835,
0.06052321940660477,
0.2865281403064728,
-0.30728620290756226,
-0.094887875020504,
-0.09237606823444366,
0.08322173357009888,
0.06340906023979187,
-0.20933258533477783,
-0.3941883444786072,
-0.15526270866394043,
0.011526115238666534,
0.181025892496109,
0.07290006428956985,
0.060182951390743256,
0.4171118438243866,
-0.21206369996070862,
-0.03180555999279022,
0.2774350941181183,
-0.009271673858165741,
-0.25074535608291626,
-0.03982650488615036,
-0.05818350240588188,
0.225580632686615,
-0.1509777009487152,
0.19827860593795776,
-0.11555776000022888,
0.24599875509738922,
0.1325129270553589,
-0.3227517306804657,
-0.11543106287717819,
-0.13967116177082062,
-0.19833716750144958,
-0.10887421667575836,
-0.11202090978622437,
0.03152546286582947,
-0.14325574040412903,
-0.18744875490665436,
0.032170042395591736,
-0.08157265931367874,
-0.08312004059553146,
-0.025220070034265518,
-0.21518854796886444,
-0.07785288989543915,
0.03839930146932602,
0.03803390637040138,
-0.15258318185806274,
0.04483409970998764,
0.2418367564678192,
0.23767083883285522,
0.5447998046875,
0.46377354860305786,
0.03762603923678398,
-0.004066549241542816,
0.0038769766688346863,
-0.28746306896209717,
-0.23030585050582886,
-0.38079506158828735,
-0.11401548981666565,
-0.06502518057823181,
-0.14886312186717987,
-0.1858009248971939,
0.6646886467933655,
0.044605329632759094,
0.29153570532798767,
0.08675657212734222,
-0.15469864010810852,
-0.08424470573663712,
0.38144880533218384,
0.20853446424007416,
0.22130215167999268,
0.004242822527885437,
0.5544474720954895,
0.15170498192310333,
0.04859161749482155,
-0.1127219945192337,
-0.09730637073516846,
-0.3818839490413666,
0.2463042140007019,
0.1525014489889145,
-0.07379358261823654,
-0.18649087846279144,
-0.3309206962585449,
0.08159417659044266,
-0.29785192012786865,
0.13101719319820404,
0.010848008096218109,
-0.0611114464700222,
0.20714224874973297,
0.3853253722190857,
0.04629381746053696,
0.043473124504089355,
0.018926221877336502,
0.30194705724716187,
-0.12284235656261444,
-0.1633676141500473,
0.11679830402135849,
-0.15093298256397247,
0.33402547240257263,
0.3067089319229126,
0.2679740786552429,
-0.38991492986679077,
0.04543602094054222,
-0.11738361418247223,
-0.0730443149805069,
-0.013227753341197968,
0.3408556282520294,
0.01956883631646633,
0.16279838979244232,
-0.0384201854467392,
0.12290090322494507,
-0.032385677099227905,
0.09296952188014984,
-0.009425640106201172,
-0.11493536829948425,
-0.3325374722480774,
-0.06180792301893234,
-0.019269613549113274,
0.419944167137146,
-0.01501842588186264,
-0.2145325243473053,
0.3441826403141022,
0.021738611161708832,
-0.40451669692993164,
-0.056326061487197876,
0.19630207121372223,
-0.32766541838645935,
0.02975865826010704,
0.14096775650978088,
0.4163489043712616,
0.2480723261833191,
-0.3645539879798889,
0.11515634506940842,
0.09502629190683365,
0.04223630949854851,
0.2047935128211975,
0.21294742822647095,
-0.015564806759357452,
0.17719392478466034,
0.4805327355861664,
-0.02085108309984207,
0.0870029479265213,
-0.15910376608371735,
0.4040461480617523,
0.179798886179924,
0.02184971049427986,
-0.18596713244915009,
0.4318917989730835,
0.1254313886165619,
-0.3001899719238281,
0.1034141480922699,
0.48304983973503113,
0.08744066953659058,
0.1706010103225708,
0.3680456876754761,
0.04898606613278389,
-0.26323601603507996,
-0.1646345555782318,
0.09225134551525116,
-0.11820923537015915,
-0.12795551121234894,
-0.23268097639083862,
-0.26870256662368774,
-0.12625513970851898,
-0.18265275657176971,
0.03510681539773941,
-0.18471047282218933,
0.5446305274963379,
0.08575668931007385,
-0.08713263273239136,
-0.3670361340045929,
0.3395569920539856,
0.24779784679412842,
0.1671563982963562,
-0.22757452726364136,
0.05508202686905861,
0.03803880512714386,
-0.24804562330245972,
0.22642208635807037,
0.35929399728775024,
0.29178518056869507,
0.3263563811779022,
-0.3158448338508606,
-0.3911435902118683,
0.01930081658065319,
0.029535191133618355,
0.09633348137140274,
0.005622267723083496,
-0.08329612016677856,
0.12382706999778748,
0.1970171481370926,
-0.018727783113718033,
0.0856877937912941,
-0.0020501650869846344,
-0.0753253847360611,
-0.252896249294281,
-0.30666762590408325,
0.5929837226867676,
-0.018234621733427048,
-0.35182589292526245,
0.03880384564399719,
0.07254405319690704,
-0.011743642389774323,
-0.19553843140602112,
0.17933563888072968,
0.27537354826927185,
0.21460193395614624,
0.08601504564285278,
0.011573877185583115,
0.19364546239376068,
0.15901875495910645,
0.09588086605072021,
0.13929292559623718,
-0.016912873834371567,
0.16927923262119293,
-0.454395055770874,
0.024960562586784363,
-0.05219779536128044,
-0.21022695302963257,
0.08040713518857956,
0.30084604024887085,
0.04545034468173981,
0.02516925148665905,
-0.39794713258743286,
-0.029296131804585457,
0.24268758296966553,
-0.02505166083574295,
-0.24671989679336548,
-0.10982680320739746,
0.2442292720079422,
-0.3090699017047882,
-0.2742750644683838,
-0.30037060379981995,
0.3783368170261383,
-0.23269544541835785,
-0.05843738093972206,
-0.00805199146270752,
0.18609413504600525,
0.48216015100479126,
0.30976158380508423,
-0.015544071793556213,
-0.00046756863594055176,
0.7240961790084839,
0.07778850197792053,
-0.03916240110993385,
-0.2763914465904236,
-0.14315010607242584,
-0.42824169993400574,
0.20609375834465027,
-0.29757922887802124,
0.220962792634964,
-0.0779448077082634,
0.5272229909896851,
0.06258738040924072,
0.514811635017395,
-0.12454496324062347,
-0.22233515977859497,
0.007780646905303001,
0.2017621099948883,
-0.374904990196228,
0.05190465971827507,
0.10742256045341492,
0.02301587164402008,
-0.026264965534210205,
0.05951988697052002,
-0.0937538743019104,
-0.4693760275840759,
0.1555231362581253,
-0.1344616860151291,
-0.2337854504585266,
0.026650898158550262,
-0.018500983715057373,
0.14006757736206055,
0.07302307337522507,
-0.48396238684654236,
-0.20245863497257233,
0.3920612633228302,
0.07018563151359558,
0.07715953886508942,
0.16482537984848022,
0.15356849133968353,
-0.12442484498023987,
-0.16481947898864746,
-0.026082560420036316,
-0.22623881697654724,
-0.0990440621972084,
-0.05597970262169838,
-0.04037713631987572
] |
https://github.com/huggingface/datasets/issues/492 | nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema | I'm using the master branch. The assertion failure comes from the underlying `pa.concat_tables()`, which is in the pyarrow package. That method does check schemas.
Since `features.type` does not contain information about nullable vs non-nullable features, the `cast_()` method won't resolve the schema mismatch. There is information in a schema which is not stored in features. | Here's the code I'm trying to run:
```python
dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir)
dset_wikipedia.drop(columns=["title"])
dset_wikipedia.features.pop("title")
dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir)
dset = nlp.concatenate_datasets([dset_wikipedia, dset_books])
```
This fails because they have different schemas, despite having identical features.
```python
assert dset_wikipedia.features == dset_books.features # True
assert dset_wikipedia._data.schema == dset_books._data.schema # False
```
The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves.
```python
dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema)
```
| 55 | nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema
Here's the code I'm trying to run:
```python
dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir)
dset_wikipedia.drop(columns=["title"])
dset_wikipedia.features.pop("title")
dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir)
dset = nlp.concatenate_datasets([dset_wikipedia, dset_books])
```
This fails because they have different schemas, despite having identical features.
```python
assert dset_wikipedia.features == dset_books.features # True
assert dset_wikipedia._data.schema == dset_books._data.schema # False
```
The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves.
```python
dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema)
```
I'm using the master branch. The assertion failure comes from the underlying `pa.concat_tables()`, which is in the pyarrow package. That method does check schemas.
Since `features.type` does not contain information about nullable vs non-nullable features, the `cast_()` method won't resolve the schema mismatch. There is information in a schema which is not stored in features. | [
-0.000032529234886169434,
0.053868040442466736,
0.030973229557275772,
0.15277712047100067,
0.13154174387454987,
-0.00970158725976944,
0.2905564606189728,
0.11267922818660736,
-0.4240894615650177,
-0.3221021890640259,
0.13241738080978394,
0.30092909932136536,
0.07467900216579437,
0.21840806305408478,
0.010595787316560745,
0.06208016723394394,
0.1866665482521057,
0.19850817322731018,
0.1221265196800232,
0.01448071002960205,
-0.03284844756126404,
0.1648804396390915,
-0.3214719891548157,
0.06254615634679794,
-0.6196386814117432,
0.22295306622982025,
0.035740926861763,
-0.019678346812725067,
-0.11478648334741592,
-0.46188870072364807,
0.37069785594940186,
0.1314745992422104,
-0.1188879981637001,
0.35809633135795593,
-0.00012183638318674639,
-0.0039296820759773254,
0.448419988155365,
-0.12727244198322296,
-0.08421696722507477,
-0.049364566802978516,
-0.14760175347328186,
-0.3369846045970917,
0.0708870142698288,
-0.1506243646144867,
0.06785725057125092,
-0.03252727538347244,
-0.061025090515613556,
0.3406127095222473,
-0.46046215295791626,
0.18143866956233978,
0.04704851284623146,
0.5140039920806885,
0.44500625133514404,
0.21149399876594543,
0.3964323401451111,
-0.011449366807937622,
-0.14967869222164154,
0.1629146784543991,
-0.2344384789466858,
-0.1761411875486374,
0.30716845393180847,
-0.044736821204423904,
-0.3355341851711273,
-0.24688436090946198,
0.09197796881198883,
-0.0022426117211580276,
0.019352693110704422,
-0.09271074831485748,
-0.21544882655143738,
0.40145909786224365,
0.3250857889652252,
-0.3767760097980499,
-0.36207401752471924,
-0.2539636790752411,
-0.07219215482473373,
-0.0025721341371536255,
0.32220184803009033,
0.433278888463974,
-0.04340916872024536,
0.08936890959739685,
-0.39069435000419617,
0.16984021663665771,
-0.005558118224143982,
0.01999961957335472,
-0.37567996978759766,
0.27916550636291504,
0.41805872321128845,
0.1256665587425232,
-0.05781223252415657,
-0.03258180618286133,
0.2527773976325989,
-0.3134332597255707,
0.023916132748126984,
0.05009201541543007,
-0.40312063694000244,
-0.19110386073589325,
-0.12406075745820999,
-0.13039866089820862,
0.4479847550392151,
-0.057168759405612946,
0.01963656209409237,
0.048737313598394394,
-0.08741650730371475,
0.15095403790473938,
0.16082945466041565,
0.24695764482021332,
0.06909193843603134,
-0.003220138605684042,
-0.0491848886013031,
0.0776769369840622,
-0.23106053471565247,
0.2671496868133545,
0.26649945974349976,
-0.27228280901908875,
0.1462371051311493,
0.015612834133207798,
0.529816210269928,
-0.1942785382270813,
-0.301701158285141,
0.15679259598255157,
-0.7380692362785339,
-0.10707082599401474,
0.09513629227876663,
-0.08272220939397812,
-0.08597240597009659,
0.4375618100166321,
0.02316863089799881,
0.37511855363845825,
-0.12579993903636932,
-0.3113953471183777,
-0.0775916650891304,
-0.018343355506658554,
0.018543947488069534,
0.007430739235132933,
0.15003521740436554,
0.14728941023349762,
0.11752437055110931,
-0.005865584127604961,
-0.38929325342178345,
0.20038899779319763,
-0.21253889799118042,
-0.16890741884708405,
-0.052931345999240875,
0.11275754868984222,
-0.19863839447498322,
-0.3424559533596039,
0.07485919445753098,
-0.2692534327507019,
-0.29566916823387146,
0.14898669719696045,
-0.05049119144678116,
-0.2925233542919159,
-0.04878487437963486,
0.04918256029486656,
-0.45489633083343506,
-0.013857424259185791,
-0.0014935880899429321,
0.1368769258260727,
0.17108428478240967,
-0.0737830102443695,
0.12135273218154907,
-0.14545296132564545,
0.04883493855595589,
-0.3303677439689636,
0.22749106585979462,
0.007443040609359741,
-0.13839353621006012,
0.014926262199878693,
0.2834966480731964,
-0.21843086183071136,
-0.048167355358600616,
0.2854071855545044,
0.008305043913424015,
0.1808186173439026,
-0.1705978363752365,
0.5086686015129089,
0.26441603899002075,
0.08034747838973999,
-0.03015940450131893,
-0.08416173607110977,
0.24821992218494415,
0.15218527615070343,
0.19214975833892822,
0.03782902657985687,
-0.4064253270626068,
-0.04623134806752205,
-0.013871416449546814,
0.3398262858390808,
-0.13730713725090027,
-0.1272161900997162,
-0.2157672494649887,
-0.25596776604652405,
0.5326586365699768,
-0.03190362825989723,
-0.1721978634595871,
0.07556487619876862,
-0.028126493096351624,
0.21799759566783905,
0.27797770500183105,
-0.22563135623931885,
-0.27877214550971985,
0.003352964296936989,
0.1888369470834732,
0.19725997745990753,
-0.30897071957588196,
-0.2877030372619629,
-0.46052825450897217,
0.18791881203651428,
-0.34350618720054626,
0.559939444065094,
-0.21559949219226837,
-0.3793882727622986,
-0.02159682847559452,
0.24953977763652802,
0.2796550691127777,
0.15427488088607788,
0.07672181725502014,
0.18392960727214813,
0.10653696954250336,
0.1507071554660797,
0.04333792254328728,
-0.06353268772363663,
-0.06509128957986832,
0.08935703337192535,
-0.23725701868534088,
0.43502190709114075,
-0.06433174759149551,
-0.25458404421806335,
-0.02053980901837349,
0.5571248531341553,
0.12511904537677765,
0.0465453639626503,
0.029241465032100677,
0.28601178526878357,
-0.041997030377388,
-0.005018912255764008,
-0.20087817311286926,
0.2961171269416809,
-0.12804119288921356,
-0.16561874747276306,
-0.2111012488603592,
0.21490052342414856,
0.07449846714735031,
-0.005227543413639069,
0.1057891696691513,
0.48753905296325684,
0.06620756536722183,
-0.04671401530504227,
0.21574737131595612,
-0.10686332732439041,
-0.0017407406121492386,
-0.0956154465675354,
-0.08447587490081787,
0.019174687564373016,
0.21119430661201477,
0.2053702473640442,
-0.5470690727233887,
0.5216991901397705,
-0.4695624113082886,
-0.08864559978246689,
0.5151795148849487,
-0.2779282331466675,
0.2281651794910431,
-0.2124318778514862,
-0.13460412621498108,
0.13121649622917175,
0.3989616930484772,
-0.36956459283828735,
0.1940736174583435,
0.10239085555076599,
0.028828110545873642,
0.04486328363418579,
-0.3958706855773926,
0.06516635417938232,
0.2654563784599304,
0.04233365133404732,
0.03811095654964447,
0.051146287471055984,
0.2779499292373657,
-0.11128061264753342,
-0.26649901270866394,
0.18187974393367767,
0.03127932548522949,
-0.10448944568634033,
-0.3702565133571625,
0.0883164033293724,
-0.3647003471851349,
-0.011504694819450378,
-0.35895630717277527,
-0.23593851923942566,
-0.512919008731842,
-0.39447012543678284,
-0.03594154119491577,
0.5990917682647705,
-0.050606101751327515,
0.2528383433818817,
-0.695655882358551,
-0.269645631313324,
0.011453354731202126,
-0.42574408650398254,
0.05111778527498245,
-0.07402671128511429,
-0.11232144385576248,
-0.05951530486345291,
0.2943378686904907,
0.1861015409231186,
-0.2042577862739563,
-0.12553741037845612,
-0.15820524096488953,
-0.19198302924633026,
-0.6355782151222229,
0.18599684536457062,
-0.4187498688697815,
0.010983727872371674,
0.3473016321659088,
-0.1060541570186615,
0.1912699043750763,
-0.3261113166809082,
0.1868240088224411,
0.17111212015151978,
-0.4117398262023926,
0.565446674823761,
0.0669073536992073,
-0.3507685661315918,
0.01600535959005356,
-0.16780516505241394,
-0.08403146266937256,
-0.23492072522640228,
0.27039235830307007,
-0.09932896494865417,
0.03529329225420952,
0.2802298963069916,
0.013852019794285297,
0.008908403106033802,
-0.24741032719612122,
0.11147250980138779,
0.024869294837117195,
0.3900659382343292,
0.35636162757873535,
0.3765406608581543,
-0.13720187544822693,
0.18837052583694458,
-0.3040183186531067,
-0.15887972712516785,
0.29094821214675903,
-0.07030832767486572,
-0.13153176009655,
-0.17064310610294342,
0.6069601774215698,
0.13649395108222961,
-0.4531556963920593,
0.3239975571632385,
0.4185802936553955,
0.06732840836048126,
0.000743422657251358,
-0.18609456717967987,
-0.05407533794641495,
0.4165591895580292,
0.2537948489189148,
0.03504689410328865,
-0.1258545219898224,
0.1467141956090927,
0.05901190638542175,
-0.06423594802618027,
-0.22572381794452667,
0.5036706328392029,
-0.2651812434196472,
0.02977636083960533,
0.1756279468536377,
0.0661863461136818,
-0.16620221734046936,
-0.0177924782037735,
0.08215100318193436,
0.1531197726726532,
-0.24640712141990662,
-0.17098887264728546,
0.09172958135604858,
0.10666151344776154,
-0.15336434543132782,
-0.27860400080680847,
0.23649239540100098,
-0.24136608839035034,
0.35380470752716064,
-0.04012759029865265,
-0.1589079052209854,
-0.18803827464580536,
-0.3680250346660614,
-0.010951974429190159,
0.07845814526081085,
-0.08207560330629349,
0.09584935009479523,
-0.6450892090797424,
-0.3294064700603485,
0.07523655146360397,
0.3648808002471924,
0.25793132185935974,
0.5744525790214539,
0.1310126930475235,
-0.43484777212142944,
-0.21963994204998016,
-0.09171172976493835,
0.535967230796814,
-0.008451856672763824,
-0.03844580054283142,
0.29162073135375977,
0.27403751015663147,
-0.2739705443382263,
-0.29680392146110535,
-0.0802818238735199,
0.08348529040813446,
0.2472422868013382,
0.1379486620426178,
-0.6362393498420715,
-0.1290539801120758,
0.2843501567840576,
0.3965994119644165,
0.10002081096172333,
0.02784092351794243,
-0.23551733791828156,
0.012315206229686737,
-0.04864520579576492,
-0.14259901642799377,
0.02842540107667446,
0.22785373032093048,
-0.3272438943386078,
0.06322124600410461,
-0.324568510055542,
0.021354954689741135,
0.1703508347272873,
0.4805373549461365,
0.28500860929489136,
-0.33638837933540344,
0.03985494747757912,
-0.45392727851867676,
0.20343109965324402,
0.10724414885044098,
0.5703113675117493,
0.5020776391029358,
-0.5287028551101685,
-0.38862544298171997,
0.1841164231300354,
0.3425617814064026,
-0.04657651484012604,
0.09250283986330032,
0.16495206952095032,
-0.15433363616466522,
-0.2554900646209717,
-0.2398645579814911,
-0.05000769719481468,
0.35975247621536255,
-0.030898205935955048,
-0.10705742985010147,
0.027835944667458534,
0.43186113238334656,
0.15854738652706146,
0.09565767645835876,
-0.6823589205741882,
0.2394425868988037,
-0.40080490708351135,
0.2723214030265808,
-0.04769069701433182,
0.9379627108573914,
0.1299598515033722,
0.09235123544931412,
0.33370649814605713,
0.20174039900302887,
0.48094919323921204,
-0.018320631235837936,
0.1827782839536667,
-0.24606499075889587,
-0.01134044025093317,
-0.18704837560653687,
-0.2756965756416321,
0.07338926196098328,
0.17456096410751343,
-0.25659164786338806,
0.302605539560318,
0.0013167038559913635,
0.14667683839797974,
0.06869872659444809,
0.11669190227985382,
-0.008148549124598503,
0.30802544951438904,
-0.30765020847320557,
-0.08256019651889801,
-0.08761295676231384,
0.028252901509404182,
0.10459096729755402,
-0.10905203968286514,
-0.5096399784088135,
-0.16946665942668915,
0.00022373348474502563,
0.18465867638587952,
-0.032826490700244904,
0.013788621872663498,
0.3616641163825989,
-0.11492129415273666,
-0.13526414334774017,
0.1706976443529129,
-0.002250269055366516,
-0.2959185838699341,
0.017662767320871353,
-0.07592622935771942,
0.2719799876213074,
-0.07849482446908951,
0.3047950565814972,
-0.08251408487558365,
0.34301382303237915,
0.12292765825986862,
-0.31463325023651123,
-0.06771189719438553,
-0.22358331084251404,
-0.17901475727558136,
-0.08219105005264282,
-0.15332141518592834,
0.07608665525913239,
-0.25409576296806335,
-0.11252328753471375,
-0.12760618329048157,
-0.12013489007949829,
-0.03202953562140465,
-0.010824630036950111,
-0.1855923980474472,
-0.0641232505440712,
0.14634349942207336,
-0.06420823931694031,
-0.19067233800888062,
0.04571019858121872,
0.10478729009628296,
0.18757116794586182,
0.6064354181289673,
0.3791366219520569,
-0.03999985381960869,
0.013300735503435135,
0.05723203718662262,
-0.31770962476730347,
-0.30025649070739746,
-0.4511320888996124,
-0.1510191112756729,
-0.16928991675376892,
-0.2728016972541809,
-0.26617950201034546,
0.6759352684020996,
0.2157924622297287,
0.20650139451026917,
0.058778200298547745,
-0.1873878389596939,
-0.02198038063943386,
0.46427321434020996,
0.33794966340065,
0.18340422213077545,
0.05765046179294586,
0.6058556437492371,
0.10564613342285156,
-0.014396710321307182,
-0.1383228749036789,
-0.18918688595294952,
-0.5123184323310852,
0.2607538104057312,
-0.003222387284040451,
-0.01688460260629654,
-0.1995469331741333,
-0.3552440106868744,
0.09967780113220215,
-0.1902480274438858,
0.11877136677503586,
-0.0018301960080862045,
0.079926997423172,
0.20262449979782104,
0.301137238740921,
0.13070273399353027,
0.02929583564400673,
0.05909605324268341,
0.3133090138435364,
-0.08635718375444412,
-0.16917794942855835,
0.040839411318302155,
-0.08714659512042999,
0.20836113393306732,
0.25135186314582825,
0.2837483286857605,
-0.443742573261261,
0.12967315316200256,
-0.16731923818588257,
-0.09360410273075104,
-0.020044319331645966,
0.34365314245224,
-0.17224696278572083,
0.15085314214229584,
0.011136681772768497,
0.18424305319786072,
-0.003724418580532074,
0.09087114036083221,
0.004709087312221527,
-0.027297362685203552,
-0.37700629234313965,
-0.08519038558006287,
0.08575670421123505,
0.3486766517162323,
-0.009089851751923561,
-0.1660287231206894,
0.30114924907684326,
0.043286941945552826,
-0.3755923807621002,
-0.022331345826387405,
0.26524844765663147,
-0.32565751671791077,
0.11983971297740936,
0.24650827050209045,
0.4056604206562042,
0.26721230149269104,
-0.24613036215305328,
0.13361302018165588,
0.19416490197181702,
0.192734494805336,
0.08109080791473389,
0.3828414976596832,
-0.06259045004844666,
0.2826988399028778,
0.49635574221611023,
-0.04282746836543083,
0.17832288146018982,
-0.20524762570858002,
0.37768298387527466,
0.229221910238266,
-0.008283659815788269,
-0.25434350967407227,
0.46715453267097473,
0.1503637433052063,
-0.25362253189086914,
-0.010229840874671936,
0.5429742932319641,
0.07197405397891998,
0.09157774597406387,
0.3733733296394348,
-0.023843735456466675,
-0.2738284468650818,
-0.2085317224264145,
0.08683168888092041,
-0.06299451738595963,
-0.016190363094210625,
-0.2711745500564575,
-0.19617658853530884,
-0.08998820185661316,
-0.2310902625322342,
0.011707697063684464,
-0.17691992223262787,
0.5453141927719116,
0.05382698029279709,
-0.06992454826831818,
-0.2815672755241394,
0.2920907735824585,
0.2002326250076294,
0.18376600742340088,
-0.21179084479808807,
0.06379964202642441,
0.10467230528593063,
-0.3237309157848358,
0.31699326634407043,
0.39421504735946655,
0.36085647344589233,
0.2614825963973999,
-0.2633309066295624,
-0.33942514657974243,
-0.050521086901426315,
0.05343422293663025,
0.029379669576883316,
0.01235188078135252,
-0.2310137152671814,
-0.034865956753492355,
0.17087621986865997,
0.03979257494211197,
0.06148042529821396,
-0.11195540428161621,
-0.19790290296077728,
-0.2635840177536011,
-0.28997302055358887,
0.5647649765014648,
-0.05323366820812225,
-0.3765742778778076,
0.09052139520645142,
0.02994377166032791,
-0.04133410006761551,
-0.10767306387424469,
0.12394405901432037,
0.25451791286468506,
0.1993420124053955,
0.15362107753753662,
0.01589953526854515,
0.12617072463035583,
0.19480593502521515,
0.131179541349411,
0.17235469818115234,
0.053971029818058014,
0.2657206058502197,
-0.559280276298523,
0.060754839330911636,
-0.03142074868083,
-0.3658485412597656,
0.2509438395500183,
0.25909242033958435,
0.12262493371963501,
0.1718990057706833,
-0.3156033754348755,
0.022911973297595978,
0.05842217803001404,
0.0001740381121635437,
-0.1930539309978485,
-0.22403760254383087,
0.10517440736293793,
-0.3982795178890228,
-0.29574304819107056,
-0.2477903962135315,
0.42068731784820557,
-0.19101236760616302,
-0.005666542798280716,
0.09535332024097443,
0.07057848572731018,
0.464858740568161,
0.28016597032546997,
0.07375393807888031,
0.02407558634877205,
0.6520788669586182,
0.056508392095565796,
-0.028948089107871056,
-0.19641143083572388,
-0.16256831586360931,
-0.42496392130851746,
0.2250288724899292,
-0.3275966942310333,
0.18316753208637238,
-0.05685378611087799,
0.5732349157333374,
0.030640795826911926,
0.35867932438850403,
0.013811536133289337,
-0.2656756639480591,
0.022426189854741096,
0.24755319952964783,
-0.3517128825187683,
0.1354188621044159,
0.12609456479549408,
0.059037670493125916,
0.017751544713974,
0.14080771803855896,
-0.07730723917484283,
-0.5094183087348938,
0.1611296683549881,
-0.018684810027480125,
-0.19122806191444397,
0.0852581262588501,
-0.054571494460105896,
-0.055015452206134796,
0.0704416036605835,
-0.4616413712501526,
-0.13455426692962646,
0.32799282670021057,
0.09597821533679962,
0.08500628173351288,
0.0883452445268631,
0.1363302767276764,
-0.09626591205596924,
-0.094611257314682,
0.012552440166473389,
-0.3227333128452301,
-0.0914960503578186,
-0.026031125336885452,
0.06702101230621338
] |
https://github.com/huggingface/datasets/issues/492 | nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema | I'm doing a refactor of type inference in #363 . Both text fields should match after that | Here's the code I'm trying to run:
```python
dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir)
dset_wikipedia.drop(columns=["title"])
dset_wikipedia.features.pop("title")
dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir)
dset = nlp.concatenate_datasets([dset_wikipedia, dset_books])
```
This fails because they have different schemas, despite having identical features.
```python
assert dset_wikipedia.features == dset_books.features # True
assert dset_wikipedia._data.schema == dset_books._data.schema # False
```
The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves.
```python
dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema)
```
| 17 | nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema
Here's the code I'm trying to run:
```python
dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir)
dset_wikipedia.drop(columns=["title"])
dset_wikipedia.features.pop("title")
dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir)
dset = nlp.concatenate_datasets([dset_wikipedia, dset_books])
```
This fails because they have different schemas, despite having identical features.
```python
assert dset_wikipedia.features == dset_books.features # True
assert dset_wikipedia._data.schema == dset_books._data.schema # False
```
The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves.
```python
dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema)
```
I'm doing a refactor of type inference in #363 . Both text fields should match after that | [
-0.016118217259645462,
0.04183270037174225,
0.049754682928323746,
0.17914724349975586,
0.2209603637456894,
-0.15513715147972107,
0.3485470116138458,
0.17719464004039764,
-0.23378266394138336,
-0.24968989193439484,
0.05285617709159851,
0.24274380505084991,
0.041850872337818146,
0.3009524345397949,
-0.014264277182519436,
-0.03924652189016342,
0.13698838651180267,
0.1927274465560913,
0.05735053867101669,
-0.01330152153968811,
0.02792055904865265,
0.21281109750270844,
-0.4326975345611572,
0.07985308766365051,
-0.6052958369255066,
0.28320157527923584,
0.12171581387519836,
-0.08153358846902847,
-0.1724741905927658,
-0.35381510853767395,
0.3396437466144562,
0.06339272856712341,
-0.12739437818527222,
0.2941179871559143,
-0.0001230618654517457,
-0.07879745215177536,
0.47112876176834106,
-0.1221960037946701,
0.005654351785778999,
-0.15418286621570587,
0.0033248141407966614,
-0.21844589710235596,
0.11886076629161835,
-0.15947002172470093,
-0.012246755883097649,
0.07878458499908447,
0.05748005211353302,
0.26551246643066406,
-0.48575812578201294,
0.21437539160251617,
0.03135407343506813,
0.5556204319000244,
0.36111217737197876,
0.2949577867984772,
0.4820651113986969,
0.10810782015323639,
-0.16404688358306885,
-0.04037089645862579,
-0.14884577691555023,
-0.22067658603191376,
0.3500575125217438,
0.023376787081360817,
-0.3031661808490753,
-0.24887512624263763,
0.21041199564933777,
0.13718046247959137,
0.013231504708528519,
-0.16581444442272186,
-0.21618637442588806,
0.38460713624954224,
0.37849047780036926,
-0.27217528223991394,
-0.29824137687683105,
-0.28715217113494873,
-0.06365907192230225,
-0.1074376106262207,
0.31444719433784485,
0.2532116174697876,
-0.0958041101694107,
0.0034738443791866302,
-0.28659385442733765,
0.10254678130149841,
-0.09194113314151764,
0.1352296769618988,
-0.3512835204601288,
0.30310457944869995,
0.4236578345298767,
0.08383865654468536,
-0.10905814170837402,
-0.0581076443195343,
0.20375190675258636,
-0.3682914674282074,
0.18214476108551025,
0.19743013381958008,
-0.30363941192626953,
-0.25785213708877563,
-0.19632792472839355,
-0.12830397486686707,
0.3435283899307251,
-0.0971287339925766,
-0.10113310068845749,
0.09219858050346375,
-0.1799587458372116,
0.21359747648239136,
0.21646720170974731,
0.19402043521404266,
0.09218640625476837,
-0.046675682067871094,
0.03243802487850189,
0.015587475150823593,
-0.2754157483577728,
0.17777001857757568,
0.25332948565483093,
-0.35799485445022583,
0.2222445160150528,
-0.022209271788597107,
0.5951609015464783,
-0.21464106440544128,
-0.358143150806427,
0.10463013499975204,
-0.6537964940071106,
-0.029283523559570312,
0.13767775893211365,
-0.12459000200033188,
-0.10581865161657333,
0.43465954065322876,
-0.0013261549174785614,
0.3968074917793274,
-0.27126267552375793,
-0.36313220858573914,
-0.04254933074116707,
-0.008445555344223976,
0.0379897840321064,
-0.011499298736453056,
0.11967122554779053,
0.20677533745765686,
0.11142125725746155,
0.01679709553718567,
-0.3512588143348694,
0.21690189838409424,
-0.167596235871315,
-0.20539255440235138,
-0.09122443944215775,
0.008731324225664139,
-0.25066590309143066,
-0.3312963545322418,
0.13843411207199097,
-0.36709052324295044,
-0.22138524055480957,
0.14482718706130981,
0.0643104538321495,
-0.1541721671819687,
-0.14228114485740662,
0.05240873992443085,
-0.4513302445411682,
-0.12603220343589783,
-0.16294199228286743,
0.3355960249900818,
0.21536794304847717,
0.008600760251283646,
0.05660143494606018,
-0.1638469398021698,
-0.010453220456838608,
-0.21588246524333954,
0.2360282838344574,
0.13520614802837372,
-0.08152914047241211,
-0.012646984308958054,
0.1752239614725113,
-0.26013174653053284,
-0.04062891751527786,
0.24107390642166138,
-0.023620812222361565,
0.06748829782009125,
-0.1356777399778366,
0.5942893624305725,
0.3529719114303589,
0.025498460978269577,
0.10120271146297455,
0.038564540445804596,
0.220633402466774,
0.06680665910243988,
0.08721358329057693,
0.023399651050567627,
-0.3188512921333313,
0.05895180255174637,
-0.08547572791576385,
0.3682389259338379,
-0.19216832518577576,
-0.08414608240127563,
-0.20039547979831696,
-0.2794535458087921,
0.5485411882400513,
-0.11830578744411469,
-0.009765170514583588,
0.09450709074735641,
-0.15174105763435364,
0.2460000365972519,
0.2656451165676117,
-0.2121189534664154,
-0.1468268781900406,
-0.033081792294979095,
0.3460654020309448,
0.32855165004730225,
-0.4251268208026886,
-0.467006117105484,
-0.546267032623291,
0.15261194109916687,
-0.3511544466018677,
0.5649886727333069,
-0.0926041305065155,
-0.3628208637237549,
-0.04448923468589783,
0.09577568620443344,
0.22397202253341675,
0.1940455287694931,
0.071637824177742,
0.06657532602548599,
-0.045118298381567,
0.17730696499347687,
-0.016454771161079407,
-0.14609703421592712,
0.029327722266316414,
0.18200354278087616,
-0.18781208992004395,
0.503950834274292,
-0.05055009573698044,
-0.2504658102989197,
-0.04865872859954834,
0.5068326592445374,
0.22126194834709167,
0.0639989897608757,
0.07465118169784546,
0.17063531279563904,
0.08448891341686249,
0.027459487318992615,
-0.25657063722610474,
0.2689794898033142,
-0.035739436745643616,
-0.09271099418401718,
-0.18112370371818542,
0.26585355401039124,
0.14432169497013092,
-0.050433117896318436,
0.0820595771074295,
0.47810810804367065,
0.1191558688879013,
-0.16837918758392334,
0.2042894810438156,
-0.13956104218959808,
-0.009268512949347496,
-0.11870887875556946,
-0.051552511751651764,
-0.06251391023397446,
0.06555822491645813,
0.058873146772384644,
-0.5917348861694336,
0.5582194328308105,
-0.6158358454704285,
-0.1362636685371399,
0.43732166290283203,
-0.17057454586029053,
0.1929084062576294,
-0.23890069127082825,
-0.11878453940153122,
0.07762067019939423,
0.25463712215423584,
-0.4221940040588379,
0.11739633977413177,
0.11945374310016632,
0.04857960715889931,
-0.01742071472108364,
-0.3542959690093994,
0.10415009409189224,
0.29961368441581726,
0.005959808826446533,
0.16077426075935364,
-0.0010491013526916504,
0.20294193923473358,
-0.029264625161886215,
-0.33219170570373535,
0.16105538606643677,
0.11275168508291245,
-0.08558002859354019,
-0.365203857421875,
-0.05168554559350014,
-0.2765156626701355,
-0.08317729830741882,
-0.49306243658065796,
-0.121007539331913,
-0.3591441810131073,
-0.40362992882728577,
-0.07511510699987411,
0.7243289351463318,
-0.018225332722067833,
0.17535611987113953,
-0.6069016456604004,
-0.24302460253238678,
-0.001976592466235161,
-0.342610627412796,
-0.04809072986245155,
0.005659410730004311,
-0.18993091583251953,
-0.04402140527963638,
0.3493368327617645,
0.2407255619764328,
-0.26839786767959595,
-0.003267752006649971,
-0.21047183871269226,
-0.2128606140613556,
-0.8254589438438416,
0.09230859577655792,
-0.34237104654312134,
0.07492221891880035,
0.2931857705116272,
-0.047514572739601135,
0.20736756920814514,
-0.2992771565914154,
0.16912631690502167,
0.18057659268379211,
-0.49055445194244385,
0.4479926824569702,
0.07588231563568115,
-0.2894553542137146,
-0.0016756802797317505,
-0.17187654972076416,
0.0003844723105430603,
-0.17677529156208038,
0.09336131066083908,
-0.09212195873260498,
-0.022157080471515656,
0.3520946800708771,
-0.0063568949699401855,
-0.03003751114010811,
-0.12659282982349396,
0.004345867782831192,
0.11291284114122391,
0.4491639733314514,
0.4396442174911499,
0.3248733580112457,
-0.09223829209804535,
0.19754904508590698,
-0.22712261974811554,
-0.223373144865036,
0.18047697842121124,
0.007067576050758362,
-0.1562502384185791,
-0.2261991649866104,
0.551250159740448,
0.23555517196655273,
-0.4834790825843811,
0.3058187663555145,
0.4202594459056854,
0.07748159766197205,
0.08246865123510361,
-0.22981756925582886,
-0.01797715574502945,
0.3961818814277649,
0.32033517956733704,
-0.022816840559244156,
-0.14557501673698425,
0.1353578269481659,
0.06272166967391968,
-0.1255173236131668,
-0.2235632687807083,
0.5573558211326599,
-0.19326470792293549,
-0.12993881106376648,
0.17009016871452332,
0.07132294774055481,
-0.11769179999828339,
-0.058273717761039734,
0.10832306742668152,
0.1492452472448349,
-0.2013479769229889,
-0.2157619148492813,
0.08458404242992401,
0.09087266027927399,
-0.22143962979316711,
-0.27298814058303833,
0.1639743149280548,
-0.30207228660583496,
0.23034217953681946,
-0.0404956191778183,
-0.18059378862380981,
-0.22849132120609283,
-0.3759218752384186,
-0.00449015386402607,
0.11424048244953156,
0.0032659247517585754,
0.10188663005828857,
-0.6307582855224609,
-0.0709880068898201,
0.08686108142137527,
0.33990660309791565,
0.1385785937309265,
0.36956530809402466,
0.15237775444984436,
-0.5020942687988281,
-0.16807685792446136,
-0.08669266849756241,
0.4714754819869995,
0.0638905018568039,
-0.09741680324077606,
0.13356783986091614,
0.18171648681163788,
-0.19570021331310272,
-0.2683577537536621,
-0.010740872472524643,
0.008222980424761772,
0.3010809123516083,
0.2705409526824951,
-0.6396733522415161,
-0.17916804552078247,
0.3811222016811371,
0.33751392364501953,
0.014552157372236252,
-0.03121926262974739,
-0.15949417650699615,
0.09151685982942581,
0.09235958755016327,
-0.12573039531707764,
0.06379927694797516,
0.2886246144771576,
-0.34157904982566833,
0.013958822935819626,
-0.33685624599456787,
-0.03778932988643646,
0.28425633907318115,
0.4143272638320923,
0.22347918152809143,
-0.3767014741897583,
0.08280520141124725,
-0.4237985610961914,
0.18715128302574158,
-0.02362675406038761,
0.4478933811187744,
0.4763246774673462,
-0.5722715258598328,
-0.43869373202323914,
0.1377784013748169,
0.36456620693206787,
-0.10186401009559631,
0.2148091048002243,
0.28863799571990967,
-0.15153540670871735,
-0.2807994484901428,
-0.18099278211593628,
0.01322842575609684,
0.3981316089630127,
-0.0156291164457798,
-0.07684699445962906,
-0.02581760287284851,
0.5186465382575989,
-0.022581351920962334,
0.08838409185409546,
-0.6236911416053772,
0.39992469549179077,
-0.2987963557243347,
0.32281655073165894,
-0.047007061541080475,
0.8657006025314331,
0.023756932467222214,
0.047617051750421524,
0.28931915760040283,
0.12707360088825226,
0.5067013502120972,
0.007846303284168243,
0.1557166576385498,
-0.281758189201355,
0.17017211019992828,
-0.14892220497131348,
-0.20626482367515564,
0.1013185977935791,
0.26284199953079224,
-0.168443500995636,
0.14222490787506104,
0.08981315791606903,
0.21865496039390564,
0.004173023626208305,
0.13187310099601746,
-0.025371858850121498,
0.331238716840744,
-0.2488349974155426,
-0.08958679437637329,
-0.060412921011447906,
0.15977822244167328,
0.15831705927848816,
-0.17862315475940704,
-0.4871669113636017,
-0.0729668140411377,
0.01768498122692108,
0.23381510376930237,
0.01731371134519577,
0.03154103830456734,
0.474831759929657,
-0.19610586762428284,
0.04249059036374092,
0.3946956694126129,
0.08428821712732315,
-0.30700552463531494,
-0.017249489203095436,
-0.07549697160720825,
0.2429918348789215,
-0.1359572857618332,
0.21570390462875366,
-0.2212693691253662,
0.2682466506958008,
0.1090966984629631,
-0.33411797881126404,
-0.11935644596815109,
-0.08639538288116455,
-0.1597205400466919,
-0.07788772881031036,
-0.12718439102172852,
0.16677844524383545,
-0.17953963577747345,
-0.24072565138339996,
-0.06481146812438965,
-0.0542011559009552,
-0.06771978735923767,
-0.030590269714593887,
-0.20762275159358978,
-0.06985955685377121,
0.050164952874183655,
0.015396546572446823,
-0.15754351019859314,
0.09987707436084747,
0.15038415789604187,
0.22141358256340027,
0.629348874092102,
0.45652908086776733,
0.028614964336156845,
-0.0017690509557724,
0.024723127484321594,
-0.2843746244907379,
-0.2169722020626068,
-0.3930876553058624,
-0.14691424369812012,
-0.04481079429388046,
-0.25188934803009033,
-0.1806902438402176,
0.733397901058197,
0.1308620274066925,
0.12956452369689941,
0.08953791856765747,
-0.18428239226341248,
-0.04293591529130936,
0.3645331859588623,
0.15388400852680206,
0.2513918876647949,
0.08190684020519257,
0.577345073223114,
0.11867953836917877,
-0.04482698440551758,
-0.11211206763982773,
-0.0954190269112587,
-0.39928534626960754,
0.26237261295318604,
0.06136390194296837,
-0.05569670349359512,
-0.19162721931934357,
-0.40264880657196045,
0.11198073625564575,
-0.25774556398391724,
0.23084904253482819,
-0.006807919591665268,
-0.033836644142866135,
0.2028183788061142,
0.3138071894645691,
0.08879982680082321,
0.06908784806728363,
0.10505206882953644,
0.3505171835422516,
-0.08290920406579971,
-0.0861673504114151,
0.1872447431087494,
-0.07844299077987671,
0.3959691822528839,
0.18232305347919464,
0.29399335384368896,
-0.46794945001602173,
0.034305866807699203,
-0.1881808638572693,
-0.08780200779438019,
0.08348409831523895,
0.27656662464141846,
-0.008383559063076973,
0.18896397948265076,
-0.07007846236228943,
0.12280857563018799,
-0.013632319867610931,
-0.05460409075021744,
-0.0650932639837265,
-0.06488479673862457,
-0.3568445146083832,
-0.002499549649655819,
-0.07474285364151001,
0.40727826952934265,
0.06185036897659302,
-0.1671941876411438,
0.29691627621650696,
0.053084153681993484,
-0.3996775150299072,
0.07959482073783875,
0.15228703618049622,
-0.41522905230522156,
0.09229682385921478,
0.1816767454147339,
0.3825952112674713,
0.4038792848587036,
-0.3096640110015869,
0.0723772719502449,
0.1195049062371254,
0.1604405790567398,
0.17946313321590424,
0.2838931083679199,
0.030270610004663467,
0.15874791145324707,
0.4817337095737457,
0.0031793229281902313,
0.06484927237033844,
-0.17224623262882233,
0.4451207220554352,
0.1695605367422104,
-0.24850061535835266,
-0.10778766870498657,
0.43515148758888245,
0.073004812002182,
-0.2572183907032013,
0.10323446244001389,
0.42074236273765564,
0.021180391311645508,
0.1734536588191986,
0.2988909184932709,
0.1028890311717987,
-0.19194184243679047,
-0.21269918978214264,
0.08565150946378708,
-0.14389687776565552,
-0.12899917364120483,
-0.24812915921211243,
-0.33731263875961304,
-0.06726241856813431,
-0.18976986408233643,
0.00888257846236229,
-0.19298507273197174,
0.4818558990955353,
0.036158330738544464,
-0.13718362152576447,
-0.24508152902126312,
0.3785538375377655,
0.19291993975639343,
0.26497408747673035,
-0.193934828042984,
0.06454520672559738,
-0.00028239935636520386,
-0.3305131196975708,
0.3294859230518341,
0.3417544662952423,
0.22702161967754364,
0.3470465838909149,
-0.3818877637386322,
-0.39018896222114563,
0.007548733614385128,
-0.024357106536626816,
0.04697459191083908,
-0.1039169579744339,
-0.20618247985839844,
0.1557299643754959,
0.2123425453901291,
0.025074100121855736,
0.10441181808710098,
-0.04664425924420357,
-0.19717414677143097,
-0.24422606825828552,
-0.27921637892723083,
0.55441814661026,
-0.0030105262994766235,
-0.19243058562278748,
-0.0728185772895813,
-0.014263935387134552,
-0.03390054404735565,
-0.3230065703392029,
0.1046113520860672,
0.2030601054430008,
0.14895889163017273,
0.0625694990158081,
0.010997939854860306,
0.15757906436920166,
0.05502212047576904,
0.18447431921958923,
0.05280473455786705,
-0.044411830604076385,
0.3143444061279297,
-0.4968890845775604,
0.05857886001467705,
-0.020046349614858627,
-0.2889114320278168,
0.16671054065227509,
0.3873150944709778,
0.06090770289301872,
0.06827789545059204,
-0.3706539273262024,
-0.00685744546353817,
0.11689212173223495,
0.06062031164765358,
-0.09623805433511734,
-0.1325855851173401,
0.01622164249420166,
-0.3778543770313263,
-0.23718136548995972,
-0.24194687604904175,
0.36598289012908936,
-0.1840182989835739,
-0.014263492077589035,
-0.06431401520967484,
0.22272947430610657,
0.43426769971847534,
0.3516329228878021,
-0.061797454953193665,
0.04684987664222717,
0.7053892612457275,
0.1270478069782257,
-0.01174685824662447,
-0.08673204481601715,
-0.039537448436021805,
-0.5143463015556335,
0.2094184160232544,
-0.297378271818161,
0.221235990524292,
-0.002668708562850952,
0.6017209887504578,
0.12484226375818253,
0.39210087060928345,
-0.06452369689941406,
-0.33284956216812134,
-0.021238898858428,
0.17323778569698334,
-0.3336334824562073,
0.11937834322452545,
0.18561549484729767,
0.019398532807826996,
0.06063609942793846,
0.05339287221431732,
-0.08823376893997192,
-0.45437484979629517,
0.09792767465114594,
-0.06319713592529297,
-0.1480971872806549,
-0.022242099046707153,
-0.1345861256122589,
0.11813337355852127,
0.10678371787071228,
-0.5811046957969666,
-0.19214200973510742,
0.3485526442527771,
0.020662928000092506,
0.16051405668258667,
0.12544691562652588,
0.25568726658821106,
-0.13779227435588837,
-0.17977696657180786,
0.010649800300598145,
-0.260782927274704,
0.08927079290151596,
-0.10128189623355865,
-0.08761781454086304
] |
https://github.com/huggingface/datasets/issues/492 | nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema | It should be good now. I was able to run
```python
>>> from nlp import concatenate_datasets, load_dataset
>>>
>>> bookcorpus = load_dataset("bookcorpus", split="train")
>>> wiki = load_dataset("wikipedia", "20200501.en", split="train")
>>> wiki.remove_columns_("title") # only keep the text
>>>
>>> assert bookcorpus.features.type == wiki.features.type
>>> bert_dataset = concatenate_datasets([bookcorpus, wiki])
``` | Here's the code I'm trying to run:
```python
dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir)
dset_wikipedia.drop(columns=["title"])
dset_wikipedia.features.pop("title")
dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir)
dset = nlp.concatenate_datasets([dset_wikipedia, dset_books])
```
This fails because they have different schemas, despite having identical features.
```python
assert dset_wikipedia.features == dset_books.features # True
assert dset_wikipedia._data.schema == dset_books._data.schema # False
```
The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves.
```python
dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema)
```
| 48 | nlp.Features does not distinguish between nullable and non-nullable types in PyArrow schema
Here's the code I'm trying to run:
```python
dset_wikipedia = nlp.load_dataset("wikipedia", "20200501.en", split="train", cache_dir=args.cache_dir)
dset_wikipedia.drop(columns=["title"])
dset_wikipedia.features.pop("title")
dset_books = nlp.load_dataset("bookcorpus", split="train", cache_dir=args.cache_dir)
dset = nlp.concatenate_datasets([dset_wikipedia, dset_books])
```
This fails because they have different schemas, despite having identical features.
```python
assert dset_wikipedia.features == dset_books.features # True
assert dset_wikipedia._data.schema == dset_books._data.schema # False
```
The Wikipedia dataset has 'text: string', while the BookCorpus dataset has 'text: string not null'. Currently I hack together a working schema match with the following line, but it would be better if this was handled in Features themselves.
```python
dset_wikipedia._data = dset_wikipedia.data.cast(dset_books._data.schema)
```
It should be good now. I was able to run
```python
>>> from nlp import concatenate_datasets, load_dataset
>>>
>>> bookcorpus = load_dataset("bookcorpus", split="train")
>>> wiki = load_dataset("wikipedia", "20200501.en", split="train")
>>> wiki.remove_columns_("title") # only keep the text
>>>
>>> assert bookcorpus.features.type == wiki.features.type
>>> bert_dataset = concatenate_datasets([bookcorpus, wiki])
``` | [
0.01957632228732109,
0.10143719613552094,
0.010049540549516678,
0.15250787138938904,
0.2617858350276947,
-0.026245106011629105,
0.3992980420589447,
0.18358749151229858,
-0.2757071256637573,
-0.3310970067977905,
0.05789187550544739,
0.29932790994644165,
-0.09611610323190689,
0.34909072518348694,
-0.024857714772224426,
-0.08866956830024719,
0.2123328000307083,
0.2151871621608734,
0.09041938185691833,
-0.0006229318678379059,
-0.021691294386982918,
0.14710019528865814,
-0.4190043807029724,
0.040725305676460266,
-0.5618266463279724,
0.1993517279624939,
0.00913291610777378,
-0.0635872483253479,
-0.13210101425647736,
-0.35583627223968506,
0.3598956763744354,
0.16322891414165497,
-0.09640887379646301,
0.34942203760147095,
-0.0001237269607372582,
-0.046531353145837784,
0.46177178621292114,
-0.09445922821760178,
-0.11426892876625061,
-0.12294171750545502,
-0.04685637727379799,
-0.22616420686244965,
0.14282125234603882,
-0.2239900827407837,
0.06601046025753021,
0.03968102112412453,
-0.02371189184486866,
0.21809101104736328,
-0.48271745443344116,
0.300502210855484,
0.04979845508933067,
0.604124903678894,
0.32168814539909363,
0.28877055644989014,
0.43258756399154663,
0.026021171361207962,
-0.23784497380256653,
0.057116542011499405,
-0.2866385877132416,
-0.24003931879997253,
0.3646000921726227,
-0.0030348761938512325,
-0.42240697145462036,
-0.27763545513153076,
0.1704857051372528,
0.032102394849061966,
0.013993237167596817,
-0.18114157021045685,
-0.13268274068832397,
0.3763584494590759,
0.3835633099079132,
-0.32701605558395386,
-0.276154488325119,
-0.274053692817688,
-0.03833353519439697,
-0.14717994630336761,
0.23136281967163086,
0.3422127664089203,
0.04262877628207207,
0.0377742275595665,
-0.3583480417728424,
0.13328418135643005,
-0.06110114976763725,
0.1729690432548523,
-0.3576497435569763,
0.2891923487186432,
0.406644344329834,
0.12650585174560547,
-0.05741961672902107,
-0.09569805860519409,
0.23970338702201843,
-0.38633885979652405,
0.13255909085273743,
0.13347750902175903,
-0.34279701113700867,
-0.15341970324516296,
-0.21583640575408936,
-0.17523181438446045,
0.4142796993255615,
-0.10131356120109558,
-0.06843544542789459,
0.04848849028348923,
-0.11785958707332611,
0.15815985202789307,
0.1803007870912552,
0.3018611967563629,
0.17228302359580994,
-0.04250426962971687,
-0.04739318788051605,
0.05396757647395134,
-0.2548181712627411,
0.2683298885822296,
0.27837297320365906,
-0.2501659095287323,
0.16445407271385193,
-0.008123228326439857,
0.58778977394104,
-0.12116482853889465,
-0.39539793133735657,
0.10546033829450607,
-0.657997190952301,
-0.06537128984928131,
0.11580435931682587,
-0.07508719712495804,
-0.016488686203956604,
0.4329293966293335,
-0.02503335475921631,
0.4224490523338318,
-0.2510069012641907,
-0.29128074645996094,
-0.11030789464712143,
0.04833599552512169,
-0.006532985717058182,
-0.028801782056689262,
0.1892845332622528,
0.09694454073905945,
0.1741940975189209,
-0.04175788536667824,
-0.3898361921310425,
0.20162612199783325,
-0.14082801342010498,
-0.200907900929451,
-0.08406580239534378,
0.05120590329170227,
-0.1916183978319168,
-0.2432674914598465,
0.12918266654014587,
-0.42636221647262573,
-0.259758323431015,
0.1686256229877472,
0.05844469368457794,
-0.22874663770198822,
-0.14985667169094086,
0.06859394162893295,
-0.4282655715942383,
-0.10481470823287964,
-0.06400793045759201,
0.23321762681007385,
0.2305508553981781,
-0.04541309177875519,
0.07356637716293335,
-0.159199059009552,
0.021661747246980667,
-0.2626655399799347,
0.11998263746500015,
0.2031267285346985,
-0.0939798355102539,
0.01176714152097702,
0.15684716403484344,
-0.21040374040603638,
0.005221545696258545,
0.22586338222026825,
-0.02690444327890873,
0.11593160033226013,
-0.18682220578193665,
0.5118378400802612,
0.3278874158859253,
-0.0432589128613472,
0.016894150525331497,
0.03806963562965393,
0.20243538916110992,
0.0965595543384552,
0.12858465313911438,
0.044415272772312164,
-0.29827743768692017,
-0.027474574744701385,
-0.07790133357048035,
0.30872416496276855,
-0.09856107831001282,
-0.07814759016036987,
-0.18207509815692902,
-0.25656670331954956,
0.659167468547821,
-0.09432046115398407,
-0.05640552565455437,
0.14041869342327118,
-0.13829758763313293,
0.33282604813575745,
0.31807252764701843,
-0.19692930579185486,
-0.12136026471853256,
0.017903529107570648,
0.18785813450813293,
0.22086675465106964,
-0.42776623368263245,
-0.37640514969825745,
-0.6329755783081055,
0.12959358096122742,
-0.29529905319213867,
0.5714241862297058,
-0.09098269045352936,
-0.36216455698013306,
-0.12144114077091217,
0.11484547704458237,
0.15600988268852234,
0.06610620021820068,
0.06892844289541245,
0.15259864926338196,
0.019554514437913895,
0.17337872087955475,
-0.06327029317617416,
-0.06914202123880386,
-0.00016677193343639374,
0.12999902665615082,
-0.30268633365631104,
0.4794207215309143,
-0.06807102262973785,
-0.23942339420318604,
0.038031719624996185,
0.549789309501648,
0.26307573914527893,
0.02915598265826702,
0.0447436198592186,
0.22678124904632568,
-0.047428764402866364,
-0.03205256164073944,
-0.18488696217536926,
0.30591124296188354,
-0.006551720201969147,
-0.09525981545448303,
-0.1367526650428772,
0.2938748896121979,
0.11120415478944778,
-0.10221192985773087,
0.0039692409336566925,
0.520698606967926,
-0.020163457840681076,
-0.04844159632921219,
0.18785785138607025,
-0.061009377241134644,
0.04822637140750885,
-0.15849794447422028,
-0.08948139101266861,
-0.10959315299987793,
0.11269544064998627,
0.08233029395341873,
-0.4957495629787445,
0.5330724120140076,
-0.5667439103126526,
-0.18116524815559387,
0.4938707947731018,
-0.19769436120986938,
0.18249434232711792,
-0.20207169651985168,
-0.12896192073822021,
0.09108143299818039,
0.37978026270866394,
-0.42103463411331177,
0.20703011751174927,
0.1284211277961731,
0.11072517931461334,
0.024974407628178596,
-0.31962063908576965,
0.08125969022512436,
0.33316609263420105,
-0.029122307896614075,
0.11147331446409225,
-0.038376450538635254,
0.2469995617866516,
-0.13896843791007996,
-0.3223753869533539,
0.09816429018974304,
0.13579031825065613,
-0.0476689487695694,
-0.3277384340763092,
0.0029740668833255768,
-0.3342837989330292,
-0.11659944802522659,
-0.38742804527282715,
-0.22712767124176025,
-0.40853145718574524,
-0.4292834401130676,
-0.12640997767448425,
0.6499423980712891,
-0.056376244872808456,
0.2817404568195343,
-0.6548402905464172,
-0.294658362865448,
0.07852647453546524,
-0.4065556526184082,
-0.010940473526716232,
0.004167558625340462,
-0.12551862001419067,
-0.06743298470973969,
0.3089800775051117,
0.291669636964798,
-0.18437139689922333,
-0.04138185828924179,
-0.21613618731498718,
-0.16201084852218628,
-0.7112452983856201,
0.12530732154846191,
-0.4536364674568176,
0.02613125741481781,
0.29749345779418945,
-0.009508199989795685,
0.1389736384153366,
-0.3155113458633423,
0.18607009947299957,
0.1755693256855011,
-0.39179185032844543,
0.4901827573776245,
0.10416384786367416,
-0.2944887578487396,
-0.032160282135009766,
-0.19162893295288086,
-0.02937266044318676,
-0.26498833298683167,
0.11475424468517303,
-0.0891404077410698,
0.040856242179870605,
0.38607341051101685,
0.02111179381608963,
0.048782430589199066,
-0.07451098412275314,
0.034881845116615295,
0.10426370054483414,
0.4250566363334656,
0.4264545738697052,
0.28124192357063293,
-0.12412959337234497,
0.18684609234333038,
-0.260531485080719,
-0.20540091395378113,
0.22082047164440155,
-0.051010861992836,
-0.14541275799274445,
-0.23334364593029022,
0.5366601943969727,
0.23746325075626373,
-0.38846302032470703,
0.2863417863845825,
0.4431607723236084,
0.08261220902204514,
0.010179810225963593,
-0.31892266869544983,
-0.04056220501661301,
0.3840855062007904,
0.2121475785970688,
0.03990570083260536,
-0.12002036720514297,
0.138734370470047,
0.03879271075129509,
-0.08649635314941406,
-0.20548467338085175,
0.5309776663780212,
-0.23939326405525208,
-0.06136954948306084,
0.14157849550247192,
-0.03202222287654877,
-0.10774392634630203,
-0.04946592450141907,
0.15458254516124725,
0.1558997929096222,
-0.265779584646225,
-0.25183919072151184,
0.10599006712436676,
0.16727954149246216,
-0.2113858461380005,
-0.17784151434898376,
0.20122644305229187,
-0.30515971779823303,
0.3195037841796875,
-0.04060717672109604,
-0.19858917593955994,
-0.1919315904378891,
-0.3699119985103607,
0.033811211585998535,
0.1395128220319748,
-0.09812989085912704,
0.10264452546834946,
-0.6497273445129395,
0.001736801816150546,
0.020879730582237244,
0.37670743465423584,
0.1342528909444809,
0.4731310307979584,
0.14602544903755188,
-0.45086953043937683,
-0.19023720920085907,
-0.06153705343604088,
0.5640015602111816,
0.061231665313243866,
-0.06457256525754929,
0.3183949887752533,
0.21168756484985352,
-0.2911323308944702,
-0.2674373388290405,
-0.07870282232761383,
0.0937376394867897,
0.35643503069877625,
0.21677875518798828,
-0.6534014344215393,
-0.23090867698192596,
0.36774954199790955,
0.38144710659980774,
0.033067140728235245,
0.004281780682504177,
-0.19246862828731537,
-0.061292052268981934,
0.015352444723248482,
-0.16253992915153503,
0.012941902503371239,
0.311893492937088,
-0.41721877455711365,
0.03441205993294716,
-0.3534699082374573,
-0.13194946944713593,
0.2542102038860321,
0.3573932349681854,
0.3443431854248047,
-0.32195764780044556,
0.09547287225723267,
-0.47583743929862976,
0.18212729692459106,
-0.038387395441532135,
0.5125541687011719,
0.4208610951900482,
-0.48591601848602295,
-0.37286704778671265,
0.12002967298030853,
0.3413620591163635,
-0.00794076919555664,
0.17136037349700928,
0.2588386833667755,
-0.20450149476528168,
-0.2189018279314041,
-0.16183222830295563,
0.03143537417054176,
0.3969663083553314,
-0.1037939265370369,
-0.1424652636051178,
-0.07943277806043625,
0.49810710549354553,
0.08530044555664062,
0.12107324600219727,
-0.6400700211524963,
0.29072993993759155,
-0.3826369643211365,
0.38157641887664795,
-0.1184937134385109,
0.9706952571868896,
0.034426119178533554,
0.11598552763462067,
0.3479287922382355,
0.167333722114563,
0.5139726996421814,
0.07219058275222778,
0.18025977909564972,
-0.3007269501686096,
0.19648981094360352,
-0.129343643784523,
-0.22132667899131775,
0.13103532791137695,
0.19713300466537476,
-0.2321760058403015,
0.23259657621383667,
-0.06646078079938889,
0.17164979875087738,
-0.01714733988046646,
0.2490384578704834,
0.005471960641443729,
0.27604547142982483,
-0.31805986166000366,
-0.1031709685921669,
-0.1124357283115387,
0.08920907974243164,
0.12881290912628174,
-0.1908586025238037,
-0.4532470703125,
-0.1403726041316986,
0.08319827914237976,
0.1300484538078308,
0.0804385244846344,
0.062040433287620544,
0.36101481318473816,
-0.23215776681900024,
-0.02853560633957386,
0.3560190796852112,
0.049916211515665054,
-0.30629944801330566,
0.01726062409579754,
-0.09500595927238464,
0.2784457802772522,
-0.11845611035823822,
0.22199249267578125,
-0.11967571824789047,
0.3196139931678772,
0.1337706446647644,
-0.2596150040626526,
-0.08319974690675735,
-0.12166443467140198,
-0.14499595761299133,
-0.16094163060188293,
-0.11056570708751678,
0.06583122909069061,
-0.2531042993068695,
-0.16357722878456116,
-0.024169161915779114,
-0.11542272567749023,
-0.0930647999048233,
-0.035070016980171204,
-0.2148527354001999,
-0.09621759504079819,
0.0768125057220459,
0.029871931299567223,
-0.15281051397323608,
0.04195312783122063,
0.12574732303619385,
0.27090850472450256,
0.6052498817443848,
0.504289984703064,
0.036174435168504715,
-0.008430365473031998,
0.005501721054315567,
-0.27315613627433777,
-0.29763877391815186,
-0.36961737275123596,
-0.07140389829874039,
-0.10662734508514404,
-0.2701568603515625,
-0.22187766432762146,
0.6855998039245605,
0.050029583275318146,
0.25795429944992065,
0.10758787393569946,
-0.17601947486400604,
-0.08866212517023087,
0.326296865940094,
0.2517026960849762,
0.27264997363090515,
0.012091457843780518,
0.55889892578125,
0.11516785621643066,
-0.04516387730836868,
-0.11834313720464706,
-0.09415073692798615,
-0.45018884539604187,
0.2993205487728119,
0.12593284249305725,
-0.027382053434848785,
-0.19646765291690826,
-0.3474905788898468,
0.10526047646999359,
-0.2562192678451538,
0.16770251095294952,
-0.0052705686539411545,
-0.06971075385808945,
0.2226894497871399,
0.28148263692855835,
0.06298904120922089,
0.00834367424249649,
0.07718247920274734,
0.31292736530303955,
-0.11154042929410934,
-0.11602357029914856,
0.1301073133945465,
-0.10958844423294067,
0.3613772392272949,
0.1909671574831009,
0.28765296936035156,
-0.38548529148101807,
0.01165543869137764,
-0.11467929184436798,
-0.08398996293544769,
0.038431644439697266,
0.31899160146713257,
0.025051355361938477,
0.1879183053970337,
-0.012674059718847275,
0.07839697599411011,
-0.03950212895870209,
0.07912266254425049,
-0.005277454853057861,
-0.14481496810913086,
-0.3106226921081543,
-0.04187306389212608,
0.017504997551441193,
0.43567442893981934,
-0.05738655477762222,
-0.2004944086074829,
0.30629536509513855,
0.0385013148188591,
-0.3957902193069458,
0.04818807169795036,
0.23316769301891327,
-0.3720862567424774,
0.07856501638889313,
0.19545117020606995,
0.34851425886154175,
0.29890650510787964,
-0.36536872386932373,
0.08933672308921814,
0.16329915821552277,
0.14652389287948608,
0.15098127722740173,
0.26366478204727173,
-0.06489874422550201,
0.16047251224517822,
0.4644602835178375,
-0.011503797024488449,
0.05042792484164238,
-0.1111411452293396,
0.440894216299057,
0.25186264514923096,
-0.11694205552339554,
-0.12436319887638092,
0.40531736612319946,
0.12247894704341888,
-0.25398218631744385,
0.11319263279438019,
0.4421788454055786,
0.10593436658382416,
0.1297670602798462,
0.31137093901634216,
0.03844059631228447,
-0.22674523293972015,
-0.12112024426460266,
0.11794072389602661,
-0.09314387291669846,
-0.08734828233718872,
-0.27570128440856934,
-0.25654852390289307,
-0.08109089732170105,
-0.1800367385149002,
0.02432381547987461,
-0.1540013551712036,
0.5543491840362549,
0.05920528247952461,
-0.1635769158601761,
-0.2852016091346741,
0.4014178216457367,
0.19218650460243225,
0.13593696057796478,
-0.19956345856189728,
0.036686770617961884,
0.0967629924416542,
-0.2490330934524536,
0.22497695684432983,
0.3008888065814972,
0.2749756872653961,
0.29349544644355774,
-0.4081040620803833,
-0.3811708986759186,
0.025295590981841087,
0.002677708864212036,
0.04316115006804466,
0.02896079421043396,
-0.16804146766662598,
0.14789842069149017,
0.23488061130046844,
0.0013728179037570953,
0.0638585239648819,
-0.04051836207509041,
-0.10478317737579346,
-0.28176149725914,
-0.2665730118751526,
0.5761905312538147,
-0.051848456263542175,
-0.2904803454875946,
-0.014522965997457504,
-0.02299114316701889,
-0.08984463661909103,
-0.18885581195354462,
0.2122810184955597,
0.24193330109119415,
0.2618585228919983,
0.11011337488889694,
0.0030345339328050613,
0.17694351077079773,
0.144915372133255,
0.10258127748966217,
0.13410794734954834,
-0.041791774332523346,
0.2796100378036499,
-0.5538759231567383,
0.018384456634521484,
-0.0415448360145092,
-0.3055506944656372,
0.17915362119674683,
0.28136134147644043,
0.06399428844451904,
0.05713219568133354,
-0.44040733575820923,
-0.0674697682261467,
0.15487639605998993,
0.021446403115987778,
-0.18985618650913239,
-0.13476966321468353,
0.12542524933815002,
-0.3303123712539673,
-0.23334993422031403,
-0.35708534717559814,
0.3794094920158386,
-0.18392467498779297,
-0.015975095331668854,
-0.02010762318968773,
0.20728859305381775,
0.4881547689437866,
0.2732687294483185,
-0.022035464644432068,
0.06963345408439636,
0.7188732624053955,
0.1258997619152069,
-0.0476648285984993,
-0.23020949959754944,
-0.06189152970910072,
-0.4107394814491272,
0.1571616232395172,
-0.2478824257850647,
0.24142473936080933,
-0.06751915067434311,
0.5831834673881531,
0.008576793596148491,
0.45992571115493774,
-0.03804188594222069,
-0.2560945749282837,
0.007837841287255287,
0.17656585574150085,
-0.36247169971466064,
0.1571977734565735,
0.13288308680057526,
0.12751959264278412,
-0.020087115466594696,
0.1368735134601593,
-0.11844871938228607,
-0.49560242891311646,
0.2262369841337204,
-0.11837676912546158,
-0.29522705078125,
0.1455477625131607,
-0.10589371621608734,
0.10775002837181091,
0.09190971404314041,
-0.5134958624839783,
-0.15204712748527527,
0.3226171135902405,
-0.014465343207120895,
0.052443619817495346,
0.07650910317897797,
0.23262743651866913,
-0.1332789808511734,
-0.09630491584539413,
-0.052550897002220154,
-0.2394360601902008,
-0.04272937774658203,
-0.058345720171928406,
-0.05071123689413071
] |
https://github.com/huggingface/datasets/issues/488 | issues with downloading datasets for wmt16 and wmt19 | I found `UNv1.0.en-ru.tar.gz` here: https://conferences.unite.un.org/uncorpus/en/downloadoverview, so it can be reconstructed with:
```
wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.00
wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.01
wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.02
cat UNv1.0.en-ru.tar.gz.0* > UNv1.0.en-ru.tar.gz
```
it has other languages as well, in case https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/ is gone | I have encountered multiple issues while trying to:
```
import nlp
dataset = nlp.load_dataset('wmt16', 'ru-en')
metric = nlp.load_metric('wmt16')
```
1. I had to do `pip install -e ".[dev]" ` on master, currently released nlp didn't work (sorry, didn't save the error) - I went back to the released version and now it worked. So it must have been some outdated dependencies that `pip install -e ".[dev]" ` fixed.
2. it was downloading at 60kbs - almost 5 hours to get the dataset. It was downloading all pairs and not just the one I asked for.
I tried the same code with `wmt19` in parallel and it took a few secs to download and it only fetched data for the requested pair. (but it failed too, see below)
3. my machine has crushed and when I retried I got:
```
Traceback (most recent call last):
File "./download.py", line 9, in <module>
dataset = nlp.load_dataset('wmt16', 'ru-en')
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 549, in load_dataset
download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications,
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 449, in download_and_prepare
with incomplete_dir(self._cache_dir) as tmp_data_dir:
File "/home/stas/anaconda3/envs/main/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 422, in incomplete_dir
os.makedirs(tmp_dir)
File "/home/stas/anaconda3/envs/main/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/stas/.cache/huggingface/datasets/wmt16/ru-en/1.0.0/4d8269cdd971ed26984a9c0e4a158e0c7afc8135fac8fb8ee43ceecf38fd422d.incomplete'
```
it can't handle resumes. but neither allows a new start. Had to delete it manually.
4. and finally when it downloaded the dataset, it then failed to fetch the metrics:
```
Traceback (most recent call last):
File "./download.py", line 15, in <module>
metric = nlp.load_metric('wmt16')
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 442, in load_metric
module_path, hash = prepare_module(path, download_config=download_config, dataset=False)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 258, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 198, in cached_path
local_files_only=download_config.local_files_only,
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 356, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://s3.amazonaws.com/datasets.huggingface.co/nlp/metrics/wmt16/wmt16.py
```
5. If I run the same code with `wmt19`, it fails too:
```
ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-ru.tar.gz
``` | 37 | issues with downloading datasets for wmt16 and wmt19
I have encountered multiple issues while trying to:
```
import nlp
dataset = nlp.load_dataset('wmt16', 'ru-en')
metric = nlp.load_metric('wmt16')
```
1. I had to do `pip install -e ".[dev]" ` on master, currently released nlp didn't work (sorry, didn't save the error) - I went back to the released version and now it worked. So it must have been some outdated dependencies that `pip install -e ".[dev]" ` fixed.
2. it was downloading at 60kbs - almost 5 hours to get the dataset. It was downloading all pairs and not just the one I asked for.
I tried the same code with `wmt19` in parallel and it took a few secs to download and it only fetched data for the requested pair. (but it failed too, see below)
3. my machine has crushed and when I retried I got:
```
Traceback (most recent call last):
File "./download.py", line 9, in <module>
dataset = nlp.load_dataset('wmt16', 'ru-en')
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 549, in load_dataset
download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications,
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 449, in download_and_prepare
with incomplete_dir(self._cache_dir) as tmp_data_dir:
File "/home/stas/anaconda3/envs/main/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 422, in incomplete_dir
os.makedirs(tmp_dir)
File "/home/stas/anaconda3/envs/main/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/stas/.cache/huggingface/datasets/wmt16/ru-en/1.0.0/4d8269cdd971ed26984a9c0e4a158e0c7afc8135fac8fb8ee43ceecf38fd422d.incomplete'
```
it can't handle resumes. but neither allows a new start. Had to delete it manually.
4. and finally when it downloaded the dataset, it then failed to fetch the metrics:
```
Traceback (most recent call last):
File "./download.py", line 15, in <module>
metric = nlp.load_metric('wmt16')
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 442, in load_metric
module_path, hash = prepare_module(path, download_config=download_config, dataset=False)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 258, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 198, in cached_path
local_files_only=download_config.local_files_only,
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 356, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://s3.amazonaws.com/datasets.huggingface.co/nlp/metrics/wmt16/wmt16.py
```
5. If I run the same code with `wmt19`, it fails too:
```
ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-ru.tar.gz
```
I found `UNv1.0.en-ru.tar.gz` here: https://conferences.unite.un.org/uncorpus/en/downloadoverview, so it can be reconstructed with:
```
wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.00
wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.01
wget -c https://stuncorpusprod.blob.core.windows.net/corpusfiles/UNv1.0.en-ru.tar.gz.02
cat UNv1.0.en-ru.tar.gz.0* > UNv1.0.en-ru.tar.gz
```
it has other languages as well, in case https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/ is gone | [
-0.2756028473377228,
-0.09381279349327087,
-0.016513371840119362,
0.5474306344985962,
0.07396072149276733,
-0.08159172534942627,
0.01840808242559433,
0.19257712364196777,
0.18017283082008362,
-0.07401451468467712,
-0.060842365026474,
0.022961871698498726,
-0.16825604438781738,
0.07069806009531021,
0.18128517270088196,
-0.010286867618560791,
-0.09827091544866562,
0.054642558097839355,
-0.5839903354644775,
-0.10661252588033676,
-0.25197872519493103,
0.15975411236286163,
-0.18899908661842346,
0.03162257373332977,
0.029160303995013237,
-0.14727185666561127,
-0.00567103736102581,
0.03388531878590584,
-0.4226701557636261,
-0.3919167220592499,
0.444661408662796,
0.17789006233215332,
0.04866548627614975,
0.2788916230201721,
-0.0001182757769129239,
-0.23902614414691925,
0.2288019061088562,
0.014683807268738747,
-0.3021409511566162,
-0.18836118280887604,
-0.2656500041484833,
-0.5416648983955383,
0.17962594330310822,
0.07939759641885757,
0.19057658314704895,
-0.2577366530895233,
-0.09633201360702515,
-0.1201573982834816,
0.3336130976676941,
0.15410920977592468,
0.1808847039937973,
0.4754360318183899,
0.18626752495765686,
0.018308866769075394,
0.14632011950016022,
0.18298795819282532,
-0.016182877123355865,
0.041413817554712296,
0.36834418773651123,
-0.1451101303100586,
0.30422982573509216,
0.26265132427215576,
-0.1972893625497818,
0.3405374586582184,
0.22545963525772095,
0.03429185226559639,
0.2514478266239166,
-0.32910099625587463,
-0.01042880117893219,
0.37390801310539246,
0.09193926304578781,
-0.018939971923828125,
-0.28330758213996887,
-0.332835853099823,
-0.060721345245838165,
-0.5919557213783264,
0.09150925278663635,
0.35544484853744507,
-0.3222121596336365,
-0.0712231695652008,
-0.518006443977356,
0.000827674986794591,
0.09451256692409515,
0.33948785066604614,
-0.10837045311927795,
0.34773871302604675,
0.032861970365047455,
0.14359432458877563,
0.18356335163116455,
-0.3430737257003784,
-0.1032525822520256,
-0.31443771719932556,
0.2530840337276459,
0.22122588753700256,
-0.25524845719337463,
0.08727741241455078,
0.010117243975400925,
0.008707419037818909,
0.0032322145998477936,
-0.09767915308475494,
-0.022341690957546234,
0.10394509881734848,
-0.1386573165655136,
0.03578021377325058,
0.1094086617231369,
0.21433094143867493,
-0.07633041590452194,
-0.09896811097860336,
0.26423346996307373,
-0.034821588546037674,
0.2747761011123657,
0.24339339137077332,
0.1871810108423233,
-0.1478896141052246,
-0.34707504510879517,
0.06968307495117188,
0.15432916581630707,
-0.24918919801712036,
-0.30244937539100647,
-0.08352440595626831,
0.06524182111024857,
-0.27302536368370056,
0.04082589969038963,
0.02576352283358574,
-0.2994418740272522,
0.21306437253952026,
0.06109222024679184,
0.164790540933609,
-0.24556250870227814,
-0.1874854415655136,
-0.12450959533452988,
-0.2107742875814438,
-0.09949562698602676,
0.11556368321180344,
0.6232811808586121,
0.06980190426111221,
0.20700617134571075,
0.10568460077047348,
-0.1488352119922638,
0.10954655706882477,
-0.019016779959201813,
-0.11890780925750732,
0.12226299941539764,
0.22211307287216187,
0.04510300233960152,
0.4238989055156708,
-0.11890934407711029,
0.0161675363779068,
-0.13158366084098816,
-0.12990567088127136,
-0.05838274210691452,
0.04347449913620949,
0.2906780540943146,
0.2067493051290512,
-0.3159322738647461,
-0.0533834844827652,
-0.2992134392261505,
0.09075523912906647,
-0.11520809680223465,
-0.03388112038373947,
-0.18860408663749695,
-0.24381978809833527,
-0.3752385377883911,
-0.25265762209892273,
0.37671777606010437,
0.27990514039993286,
-0.1666075438261032,
-0.16490647196769714,
-0.08377301692962646,
0.028943754732608795,
0.31235793232917786,
0.44450196623802185,
-0.2286306619644165,
0.04642285779118538,
-0.15888038277626038,
-0.05105512589216232,
0.3584412634372711,
-0.35001087188720703,
-0.14593389630317688,
0.014212661422789097,
-0.09080556780099869,
0.21179082989692688,
-0.03026861697435379,
0.08809260278940201,
0.2926703095436096,
-0.1595735251903534,
0.20961333811283112,
0.4093489646911621,
-0.08346915245056152,
-0.1281999945640564,
-0.2435818761587143,
-0.4912775456905365,
0.6207743287086487,
0.03236193582415581,
0.14470139145851135,
-0.34097611904144287,
-0.09997544437646866,
-0.15946348011493683,
0.4071715772151947,
0.10202987492084503,
0.13875164091587067,
-0.059701092541217804,
-0.049610886722803116,
-0.08257456123828888,
-0.07161235064268112,
-0.0022220630198717117,
-0.4874584674835205,
0.3761884570121765,
-0.24415969848632812,
0.13809871673583984,
0.02673812210559845,
0.2019912600517273,
-0.025263836607336998,
-0.1451205015182495,
-0.10933433473110199,
-0.16397450864315033,
0.037241630256175995,
0.019968856126070023,
0.09853437542915344,
-0.03973542898893356,
0.07811132073402405,
0.08207127451896667,
-0.04024805501103401,
0.13210144639015198,
-0.23356561362743378,
0.22221747040748596,
0.05466373264789581,
-0.02881094440817833,
0.35629498958587646,
0.2831985354423523,
0.17756187915802002,
-0.059604912996292114,
-0.027768686413764954,
-0.030302785336971283,
-0.006643340457230806,
0.49224281311035156,
-0.10419776290655136,
-0.014153152704238892,
0.33946335315704346,
-0.40422922372817993,
0.16557544469833374,
0.2719751298427582,
0.22127388417720795,
-0.3597029745578766,
0.01708948239684105,
0.2387666404247284,
-0.09157022833824158,
0.3743445873260498,
0.11003030836582184,
0.012318121269345284,
0.011362219229340553,
0.013947192579507828,
-0.08915426582098007,
-0.03414790332317352,
0.40796926617622375,
-0.09643882513046265,
0.022088605910539627,
0.09969902783632278,
-0.030334588140249252,
0.2387860119342804,
0.25191375613212585,
0.11789791285991669,
0.026823390275239944,
-0.03702418506145477,
-0.13331621885299683,
-0.13707247376441956,
-0.1800832897424698,
0.237972691655159,
0.5232083201408386,
0.18201491236686707,
0.19079697132110596,
0.09090644121170044,
0.08776778727769852,
-0.4019683003425598,
0.372639000415802,
0.2383785843849182,
-0.0019470204133540392,
0.13209563493728638,
0.04306938499212265,
-0.016369838267564774,
-0.11048386245965958,
0.4184352159500122,
0.09176319092512131,
0.1791210174560547,
-0.23239164054393768,
-0.24925483763217926,
-0.5810914039611816,
-0.4634239673614502,
-0.49405306577682495,
-0.3730905055999756,
-0.3810461759567261,
-0.3317371904850006,
-0.19376783072948456,
-0.06423598527908325,
-0.08164063096046448,
0.1759488582611084,
0.1689739227294922,
0.0007634460926055908,
-0.355763703584671,
0.45984798669815063,
-0.027881475165486336,
-0.04937422275543213,
-0.31010884046554565,
0.017224762588739395,
0.40098345279693604,
0.1410495787858963,
0.4067271947860718,
0.00042692385613918304,
-0.013198661617934704,
0.008104070089757442,
-0.3204094171524048,
-0.041983142495155334,
-0.07387973368167877,
0.26299774646759033,
0.13758370280265808,
0.28693103790283203,
0.2675924301147461,
-0.09402906894683838,
0.14898240566253662,
-0.21813653409481049,
-0.05148623138666153,
-0.17045938968658447,
-0.021549779921770096,
0.018739774823188782,
-0.22370630502700806,
-0.46808698773384094,
-0.7113643288612366,
-0.3568279445171356,
0.16624155640602112,
0.06435559689998627,
0.09640239924192429,
0.3763373792171478,
-0.26689958572387695,
-0.004824301227927208,
-0.043119825422763824,
0.18727898597717285,
-0.1405700445175171,
0.10587042570114136,
0.3484724760055542,
-0.0433359332382679,
-0.44636720418930054,
0.03501369431614876,
0.1576630175113678,
0.25085464119911194,
0.10075856000185013,
-0.42951494455337524,
0.36699211597442627,
-0.144282728433609,
-0.10735450685024261,
0.22402054071426392,
0.1611543893814087,
0.14359518885612488,
-0.005976981017738581,
-0.014870855025947094,
-0.03855986148118973,
-0.2719133496284485,
-0.04869363456964493,
-0.05593203008174896,
0.2735079526901245,
0.05504349619150162,
0.12212509661912918,
0.020820606499910355,
0.5913622379302979,
0.2570454180240631,
-0.08706766366958618,
0.1685410588979721,
0.22395475208759308,
0.06888128817081451,
0.3214879631996155,
-0.571362316608429,
0.06243906542658806,
0.014921069145202637,
0.26432764530181885,
0.2561018466949463,
-0.024555981159210205,
-0.07897099107503891,
-0.3335880935192108,
0.04560820385813713,
-0.2322385013103485,
-0.3285510241985321,
-0.04243098944425583,
0.22281187772750854,
0.2037612795829773,
0.3823133111000061,
0.1332700550556183,
-0.003663565032184124,
-0.3344189524650574,
-0.19215929508209229,
-0.07134240865707397,
-0.07959029823541641,
0.14106565713882446,
-0.3056291341781616,
-0.3055720627307892,
-0.3390577435493469,
0.18538020551204681,
0.012306255288422108,
0.6306856274604797,
-0.10046161711215973,
0.06025336682796478,
0.000357896089553833,
0.053595613688230515,
0.2863093614578247,
-0.014986546710133553,
0.22382211685180664,
-0.05500315874814987,
0.04186319559812546,
-0.7075551152229309,
-0.07884089648723602,
-0.14908340573310852,
-0.10244197398424149,
0.3979472815990448,
0.2676805853843689,
-0.3344469666481018,
-0.349764347076416,
0.12868791818618774,
0.46990451216697693,
-0.300204873085022,
-0.09026217460632324,
-0.00018440186977386475,
-0.1544872522354126,
-0.12563909590244293,
-0.15092018246650696,
-0.27894511818885803,
0.19254274666309357,
-0.34516841173171997,
0.04527127370238304,
0.18011388182640076,
0.068058080971241,
0.33994510769844055,
-0.02671384997665882,
0.09466612339019775,
0.18801210820674896,
0.42700037360191345,
0.33942967653274536,
0.10348951071500778,
0.09073583781719208,
0.3604840636253357,
-0.07484620809555054,
0.31059467792510986,
-0.10799842327833176,
-0.05819934606552124,
0.2565920650959015,
0.5723097324371338,
-0.08121033012866974,
0.26736950874328613,
0.02798745408654213,
0.07844719290733337,
-0.44922515749931335,
0.0794500932097435,
0.35881054401397705,
-0.13682514429092407,
-0.21599909663200378,
-0.2861741781234741,
0.3259079158306122,
0.2019692361354828,
-0.11094173789024353,
0.2802771031856537,
-0.11497201025485992,
-0.3127882480621338,
-0.1978132426738739,
0.04087752848863602,
0.9505406618118286,
0.23871783912181854,
0.22750012576580048,
-0.009548395872116089,
-0.40006327629089355,
0.4883541166782379,
0.4271095395088196,
-0.14363767206668854,
-0.04819582775235176,
0.3191532790660858,
-0.003990506753325462,
-0.11691373586654663,
0.07995440810918808,
-0.016356758773326874,
-0.15587566792964935,
0.5566449165344238,
0.3277592658996582,
0.19028852880001068,
0.06713634729385376,
0.3798558712005615,
0.00893730204552412,
-0.37730446457862854,
-0.2538492977619171,
0.06734471768140793,
-0.3593873977661133,
0.27832087874412537,
-0.13936862349510193,
-0.32526201009750366,
0.005306076258420944,
-0.20724272727966309,
-0.32059717178344727,
0.038354285061359406,
-0.4705601632595062,
0.1999380737543106,
-0.10842962563037872,
-0.048494916409254074,
0.1913115382194519,
-0.09392908215522766,
0.023355089128017426,
0.19398179650306702,
-0.34216588735580444,
0.047142256051301956,
-0.45834970474243164,
0.23518574237823486,
0.041799452155828476,
0.06990686804056168,
-0.001923736184835434,
-0.1840399205684662,
-0.11442629992961884,
-0.25358903408050537,
0.011525691486895084,
0.33709168434143066,
-0.0575810968875885,
0.025947604328393936,
0.1794763207435608,
0.1735762655735016,
-0.09339630603790283,
0.1255260705947876,
0.12402758002281189,
-0.13765621185302734,
0.10380895435810089,
0.2577846944332123,
-0.09410202503204346,
0.5929930210113525,
0.14469312131404877,
-0.08289994299411774,
-0.15289627015590668,
0.5256068706512451,
0.05211455374956131,
-0.14661890268325806,
0.4898708462715149,
0.5510692596435547,
-0.11435334384441376,
-0.24170294404029846,
-0.004162009805440903,
-0.3494569957256317,
-0.484569787979126,
-0.010519598610699177,
0.03293290734291077,
0.3049015998840332,
0.05599498376250267,
0.5251322388648987,
0.21824193000793457,
-0.278743177652359,
0.15703050792217255,
-0.4990168511867523,
-0.14112646877765656,
0.30060821771621704,
0.09301762282848358,
0.07044743001461029,
-0.11381857097148895,
0.05230661481618881,
0.07834575325250626,
0.315483957529068,
-0.2897268533706665,
0.19059891998767853,
-0.045121561735868454,
0.13441307842731476,
0.24833370745182037,
-0.24237558245658875,
0.10889307409524918,
-0.046525150537490845,
-0.06454246491193771,
-0.12677665054798126,
-0.44857606291770935,
-0.14715319871902466,
-0.22475898265838623,
0.14527826011180878,
-0.00368606299161911,
-0.4742395877838135,
0.0590282641351223,
-0.30708253383636475,
0.04878247156739235,
0.060766786336898804,
-0.1974308341741562,
0.09647921472787857,
0.01465151458978653,
0.12176759541034698,
0.13697591423988342,
0.1712830364704132,
0.030799120664596558,
0.42505332827568054,
-0.0532618910074234,
0.2902281880378723,
0.14366169273853302,
0.1730930060148239,
0.28011271357536316,
-0.1230008602142334,
-0.1648171991109848,
-0.18342119455337524,
-0.014928869903087616,
-0.22811585664749146,
0.2769263982772827,
-0.23831577599048615,
-0.0286652073264122,
0.18436750769615173,
0.38460075855255127,
0.5537837743759155,
0.15854844450950623,
0.008907590061426163,
-0.06640985608100891,
0.11203394085168839,
-0.1739787608385086,
0.03755880892276764,
0.20102940499782562,
0.4397960603237152,
-0.1216784417629242,
0.1304984986782074,
0.3467441201210022,
-0.23718556761741638,
-0.19276507198810577,
0.1611763834953308,
0.4595690667629242,
-0.1366930902004242,
0.03590593487024307,
0.1399310827255249,
0.054621029645204544,
-0.006956968456506729,
-0.1403510719537735,
0.12837277352809906,
0.02661171555519104,
0.046546656638383865,
-0.2296464443206787,
0.4097220003604889,
0.14295826852321625,
-0.08155529201030731,
0.15018677711486816,
-0.3475332260131836,
0.0019549503922462463,
0.34105563163757324,
-0.1524554193019867,
-0.045449450612068176,
0.10500248521566391,
0.6036854386329651,
-0.03999898582696915,
-0.34116435050964355,
-0.034307219088077545,
0.5274826884269714,
0.10173597931861877,
-0.10915873944759369,
-0.33690890669822693,
-0.2871399223804474,
-0.2651318907737732,
0.011788804084062576,
-0.11323191225528717,
-0.2011546939611435,
0.1153097152709961,
0.2378167062997818,
-0.20115576684474945,
-0.6774240732192993,
-0.29834967851638794,
0.022755121812224388,
-0.12410733848810196,
-0.14494898915290833,
0.20984211564064026,
0.4280455708503723,
-0.06404738128185272,
0.05026654899120331,
0.5844969153404236,
0.33799561858177185,
0.3474573493003845,
-0.20884524285793304,
-0.0027260519564151764,
0.11221779882907867,
0.011593585833907127,
-0.24575617909431458,
0.3455422818660736,
0.07481019198894501,
-0.0603158138692379,
0.38222619891166687,
0.09450595825910568,
-0.1459355354309082,
-0.2766555845737457,
0.12532642483711243,
-0.200828418135643,
-0.13046887516975403,
0.43201297521591187,
-0.21414661407470703,
0.04505901038646698,
-0.2039673924446106,
0.04483677074313164,
-0.3329178988933563,
0.16379223763942719,
0.5231642723083496,
0.05490177124738693,
0.1952824890613556,
-0.34269607067108154,
0.05930135399103165,
-0.07010111212730408,
0.7746466398239136,
0.32789677381515503,
0.1063382625579834,
-0.38104334473609924,
-0.2430896908044815,
-0.956947386264801,
-0.213681161403656,
-0.17363737523555756,
0.21157562732696533,
-0.06916133314371109,
0.21861569583415985,
0.1369340717792511,
0.23082014918327332,
0.07308290898799896,
0.4956243634223938,
0.018309935927391052,
-0.051279276609420776,
-0.4442256987094879,
0.026510048657655716,
0.10342809557914734,
-0.10298708081245422,
-0.021180827170610428,
-0.12843897938728333,
0.36814382672309875,
-0.5790628790855408,
-0.02931639552116394,
-0.3203980326652527,
0.06753765046596527,
-0.1546674370765686,
0.510782778263092,
0.1049056351184845,
0.29142603278160095,
0.48728734254837036,
0.1722448766231537,
-0.13654015958309174,
-0.245626300573349,
-0.18684208393096924,
0.07690924406051636,
0.212234765291214,
-0.1695900708436966,
0.24209973216056824,
-0.15480563044548035,
0.05637364834547043,
-0.25510722398757935,
-0.03781807795166969,
-0.26829034090042114,
-0.014333116821944714,
-0.025405220687389374,
0.08426828682422638,
-0.0810290277004242,
0.0937444195151329,
0.10314295440912247,
0.1714038848876953,
-0.12601232528686523,
0.16775035858154297,
-0.3540550470352173,
-0.40147799253463745,
0.45236098766326904,
-0.26610273122787476,
-0.19093386828899384,
-0.26786449551582336,
0.2520734667778015,
0.18846626579761505,
0.0888340100646019,
-0.5078631043434143,
-0.06870394945144653,
0.32837241888046265,
-0.22752249240875244,
-0.1473044604063034,
0.2823517322540283,
-0.19366183876991272,
-0.3195131719112396,
-0.00028815120458602905,
0.17415925860404968,
0.24863654375076294,
-0.36902564764022827,
0.06402412056922913,
-0.08805673569440842
] |
https://github.com/huggingface/datasets/issues/488 | issues with downloading datasets for wmt16 and wmt19 | Further, `nlp.load_dataset('wmt19', 'ru-en')` has only the `train` and `val` datasets. `test` is missing.
Fixed locally for summarization needs, by running:
```
pip install sacrebleu
sacrebleu -t wmt19 -l ru-en --echo src > test.source
sacrebleu -t wmt19 -l ru-en --echo ref > test.target
```
h/t @sshleifer | I have encountered multiple issues while trying to:
```
import nlp
dataset = nlp.load_dataset('wmt16', 'ru-en')
metric = nlp.load_metric('wmt16')
```
1. I had to do `pip install -e ".[dev]" ` on master, currently released nlp didn't work (sorry, didn't save the error) - I went back to the released version and now it worked. So it must have been some outdated dependencies that `pip install -e ".[dev]" ` fixed.
2. it was downloading at 60kbs - almost 5 hours to get the dataset. It was downloading all pairs and not just the one I asked for.
I tried the same code with `wmt19` in parallel and it took a few secs to download and it only fetched data for the requested pair. (but it failed too, see below)
3. my machine has crushed and when I retried I got:
```
Traceback (most recent call last):
File "./download.py", line 9, in <module>
dataset = nlp.load_dataset('wmt16', 'ru-en')
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 549, in load_dataset
download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications,
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 449, in download_and_prepare
with incomplete_dir(self._cache_dir) as tmp_data_dir:
File "/home/stas/anaconda3/envs/main/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 422, in incomplete_dir
os.makedirs(tmp_dir)
File "/home/stas/anaconda3/envs/main/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/stas/.cache/huggingface/datasets/wmt16/ru-en/1.0.0/4d8269cdd971ed26984a9c0e4a158e0c7afc8135fac8fb8ee43ceecf38fd422d.incomplete'
```
it can't handle resumes. but neither allows a new start. Had to delete it manually.
4. and finally when it downloaded the dataset, it then failed to fetch the metrics:
```
Traceback (most recent call last):
File "./download.py", line 15, in <module>
metric = nlp.load_metric('wmt16')
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 442, in load_metric
module_path, hash = prepare_module(path, download_config=download_config, dataset=False)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 258, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 198, in cached_path
local_files_only=download_config.local_files_only,
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 356, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://s3.amazonaws.com/datasets.huggingface.co/nlp/metrics/wmt16/wmt16.py
```
5. If I run the same code with `wmt19`, it fails too:
```
ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-ru.tar.gz
``` | 45 | issues with downloading datasets for wmt16 and wmt19
I have encountered multiple issues while trying to:
```
import nlp
dataset = nlp.load_dataset('wmt16', 'ru-en')
metric = nlp.load_metric('wmt16')
```
1. I had to do `pip install -e ".[dev]" ` on master, currently released nlp didn't work (sorry, didn't save the error) - I went back to the released version and now it worked. So it must have been some outdated dependencies that `pip install -e ".[dev]" ` fixed.
2. it was downloading at 60kbs - almost 5 hours to get the dataset. It was downloading all pairs and not just the one I asked for.
I tried the same code with `wmt19` in parallel and it took a few secs to download and it only fetched data for the requested pair. (but it failed too, see below)
3. my machine has crushed and when I retried I got:
```
Traceback (most recent call last):
File "./download.py", line 9, in <module>
dataset = nlp.load_dataset('wmt16', 'ru-en')
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 549, in load_dataset
download_config=download_config, download_mode=download_mode, ignore_verifications=ignore_verifications,
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 449, in download_and_prepare
with incomplete_dir(self._cache_dir) as tmp_data_dir:
File "/home/stas/anaconda3/envs/main/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/builder.py", line 422, in incomplete_dir
os.makedirs(tmp_dir)
File "/home/stas/anaconda3/envs/main/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/stas/.cache/huggingface/datasets/wmt16/ru-en/1.0.0/4d8269cdd971ed26984a9c0e4a158e0c7afc8135fac8fb8ee43ceecf38fd422d.incomplete'
```
it can't handle resumes. but neither allows a new start. Had to delete it manually.
4. and finally when it downloaded the dataset, it then failed to fetch the metrics:
```
Traceback (most recent call last):
File "./download.py", line 15, in <module>
metric = nlp.load_metric('wmt16')
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 442, in load_metric
module_path, hash = prepare_module(path, download_config=download_config, dataset=False)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/load.py", line 258, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 198, in cached_path
local_files_only=download_config.local_files_only,
File "/mnt/nvme1/code/huggingface/nlp-master/src/nlp/utils/file_utils.py", line 356, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://s3.amazonaws.com/datasets.huggingface.co/nlp/metrics/wmt16/wmt16.py
```
5. If I run the same code with `wmt19`, it fails too:
```
ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-ru.tar.gz
```
Further, `nlp.load_dataset('wmt19', 'ru-en')` has only the `train` and `val` datasets. `test` is missing.
Fixed locally for summarization needs, by running:
```
pip install sacrebleu
sacrebleu -t wmt19 -l ru-en --echo src > test.source
sacrebleu -t wmt19 -l ru-en --echo ref > test.target
```
h/t @sshleifer | [
-0.2756028473377228,
-0.09381279349327087,
-0.016513371840119362,
0.5474306344985962,
0.07396072149276733,
-0.08159172534942627,
0.01840808242559433,
0.19257712364196777,
0.18017283082008362,
-0.07401451468467712,
-0.060842365026474,
0.022961871698498726,
-0.16825604438781738,
0.07069806009531021,
0.18128517270088196,
-0.010286867618560791,
-0.09827091544866562,
0.054642558097839355,
-0.5839903354644775,
-0.10661252588033676,
-0.25197872519493103,
0.15975411236286163,
-0.18899908661842346,
0.03162257373332977,
0.029160303995013237,
-0.14727185666561127,
-0.00567103736102581,
0.03388531878590584,
-0.4226701557636261,
-0.3919167220592499,
0.444661408662796,
0.17789006233215332,
0.04866548627614975,
0.2788916230201721,
-0.0001182757769129239,
-0.23902614414691925,
0.2288019061088562,
0.014683807268738747,
-0.3021409511566162,
-0.18836118280887604,
-0.2656500041484833,
-0.5416648983955383,
0.17962594330310822,
0.07939759641885757,
0.19057658314704895,
-0.2577366530895233,
-0.09633201360702515,
-0.1201573982834816,
0.3336130976676941,
0.15410920977592468,
0.1808847039937973,
0.4754360318183899,
0.18626752495765686,
0.018308866769075394,
0.14632011950016022,
0.18298795819282532,
-0.016182877123355865,
0.041413817554712296,
0.36834418773651123,
-0.1451101303100586,
0.30422982573509216,
0.26265132427215576,
-0.1972893625497818,
0.3405374586582184,
0.22545963525772095,
0.03429185226559639,
0.2514478266239166,
-0.32910099625587463,
-0.01042880117893219,
0.37390801310539246,
0.09193926304578781,
-0.018939971923828125,
-0.28330758213996887,
-0.332835853099823,
-0.060721345245838165,
-0.5919557213783264,
0.09150925278663635,
0.35544484853744507,
-0.3222121596336365,
-0.0712231695652008,
-0.518006443977356,
0.000827674986794591,
0.09451256692409515,
0.33948785066604614,
-0.10837045311927795,
0.34773871302604675,
0.032861970365047455,
0.14359432458877563,
0.18356335163116455,
-0.3430737257003784,
-0.1032525822520256,
-0.31443771719932556,
0.2530840337276459,
0.22122588753700256,
-0.25524845719337463,
0.08727741241455078,
0.010117243975400925,
0.008707419037818909,
0.0032322145998477936,
-0.09767915308475494,
-0.022341690957546234,
0.10394509881734848,
-0.1386573165655136,
0.03578021377325058,
0.1094086617231369,
0.21433094143867493,
-0.07633041590452194,
-0.09896811097860336,
0.26423346996307373,
-0.034821588546037674,
0.2747761011123657,
0.24339339137077332,
0.1871810108423233,
-0.1478896141052246,
-0.34707504510879517,
0.06968307495117188,
0.15432916581630707,
-0.24918919801712036,
-0.30244937539100647,
-0.08352440595626831,
0.06524182111024857,
-0.27302536368370056,
0.04082589969038963,
0.02576352283358574,
-0.2994418740272522,
0.21306437253952026,
0.06109222024679184,
0.164790540933609,
-0.24556250870227814,
-0.1874854415655136,
-0.12450959533452988,
-0.2107742875814438,
-0.09949562698602676,
0.11556368321180344,
0.6232811808586121,
0.06980190426111221,
0.20700617134571075,
0.10568460077047348,
-0.1488352119922638,
0.10954655706882477,
-0.019016779959201813,
-0.11890780925750732,
0.12226299941539764,
0.22211307287216187,
0.04510300233960152,
0.4238989055156708,
-0.11890934407711029,
0.0161675363779068,
-0.13158366084098816,
-0.12990567088127136,
-0.05838274210691452,
0.04347449913620949,
0.2906780540943146,
0.2067493051290512,
-0.3159322738647461,
-0.0533834844827652,
-0.2992134392261505,
0.09075523912906647,
-0.11520809680223465,
-0.03388112038373947,
-0.18860408663749695,
-0.24381978809833527,
-0.3752385377883911,
-0.25265762209892273,
0.37671777606010437,
0.27990514039993286,
-0.1666075438261032,
-0.16490647196769714,
-0.08377301692962646,
0.028943754732608795,
0.31235793232917786,
0.44450196623802185,
-0.2286306619644165,
0.04642285779118538,
-0.15888038277626038,
-0.05105512589216232,
0.3584412634372711,
-0.35001087188720703,
-0.14593389630317688,
0.014212661422789097,
-0.09080556780099869,
0.21179082989692688,
-0.03026861697435379,
0.08809260278940201,
0.2926703095436096,
-0.1595735251903534,
0.20961333811283112,
0.4093489646911621,
-0.08346915245056152,
-0.1281999945640564,
-0.2435818761587143,
-0.4912775456905365,
0.6207743287086487,
0.03236193582415581,
0.14470139145851135,
-0.34097611904144287,
-0.09997544437646866,
-0.15946348011493683,
0.4071715772151947,
0.10202987492084503,
0.13875164091587067,
-0.059701092541217804,
-0.049610886722803116,
-0.08257456123828888,
-0.07161235064268112,
-0.0022220630198717117,
-0.4874584674835205,
0.3761884570121765,
-0.24415969848632812,
0.13809871673583984,
0.02673812210559845,
0.2019912600517273,
-0.025263836607336998,
-0.1451205015182495,
-0.10933433473110199,
-0.16397450864315033,
0.037241630256175995,
0.019968856126070023,
0.09853437542915344,
-0.03973542898893356,
0.07811132073402405,
0.08207127451896667,
-0.04024805501103401,
0.13210144639015198,
-0.23356561362743378,
0.22221747040748596,
0.05466373264789581,
-0.02881094440817833,
0.35629498958587646,
0.2831985354423523,
0.17756187915802002,
-0.059604912996292114,
-0.027768686413764954,
-0.030302785336971283,
-0.006643340457230806,
0.49224281311035156,
-0.10419776290655136,
-0.014153152704238892,
0.33946335315704346,
-0.40422922372817993,
0.16557544469833374,
0.2719751298427582,
0.22127388417720795,
-0.3597029745578766,
0.01708948239684105,
0.2387666404247284,
-0.09157022833824158,
0.3743445873260498,
0.11003030836582184,
0.012318121269345284,
0.011362219229340553,
0.013947192579507828,
-0.08915426582098007,
-0.03414790332317352,
0.40796926617622375,
-0.09643882513046265,
0.022088605910539627,
0.09969902783632278,
-0.030334588140249252,
0.2387860119342804,
0.25191375613212585,
0.11789791285991669,
0.026823390275239944,
-0.03702418506145477,
-0.13331621885299683,
-0.13707247376441956,
-0.1800832897424698,
0.237972691655159,
0.5232083201408386,
0.18201491236686707,
0.19079697132110596,
0.09090644121170044,
0.08776778727769852,
-0.4019683003425598,
0.372639000415802,
0.2383785843849182,
-0.0019470204133540392,
0.13209563493728638,
0.04306938499212265,
-0.016369838267564774,
-0.11048386245965958,
0.4184352159500122,
0.09176319092512131,
0.1791210174560547,
-0.23239164054393768,
-0.24925483763217926,
-0.5810914039611816,
-0.4634239673614502,
-0.49405306577682495,
-0.3730905055999756,
-0.3810461759567261,
-0.3317371904850006,
-0.19376783072948456,
-0.06423598527908325,
-0.08164063096046448,
0.1759488582611084,
0.1689739227294922,
0.0007634460926055908,
-0.355763703584671,
0.45984798669815063,
-0.027881475165486336,
-0.04937422275543213,
-0.31010884046554565,
0.017224762588739395,
0.40098345279693604,
0.1410495787858963,
0.4067271947860718,
0.00042692385613918304,
-0.013198661617934704,
0.008104070089757442,
-0.3204094171524048,
-0.041983142495155334,
-0.07387973368167877,
0.26299774646759033,
0.13758370280265808,
0.28693103790283203,
0.2675924301147461,
-0.09402906894683838,
0.14898240566253662,
-0.21813653409481049,
-0.05148623138666153,
-0.17045938968658447,
-0.021549779921770096,
0.018739774823188782,
-0.22370630502700806,
-0.46808698773384094,
-0.7113643288612366,
-0.3568279445171356,
0.16624155640602112,
0.06435559689998627,
0.09640239924192429,
0.3763373792171478,
-0.26689958572387695,
-0.004824301227927208,
-0.043119825422763824,
0.18727898597717285,
-0.1405700445175171,
0.10587042570114136,
0.3484724760055542,
-0.0433359332382679,
-0.44636720418930054,
0.03501369431614876,
0.1576630175113678,
0.25085464119911194,
0.10075856000185013,
-0.42951494455337524,
0.36699211597442627,
-0.144282728433609,
-0.10735450685024261,
0.22402054071426392,
0.1611543893814087,
0.14359518885612488,
-0.005976981017738581,
-0.014870855025947094,
-0.03855986148118973,
-0.2719133496284485,
-0.04869363456964493,
-0.05593203008174896,
0.2735079526901245,
0.05504349619150162,
0.12212509661912918,
0.020820606499910355,
0.5913622379302979,
0.2570454180240631,
-0.08706766366958618,
0.1685410588979721,
0.22395475208759308,
0.06888128817081451,
0.3214879631996155,
-0.571362316608429,
0.06243906542658806,
0.014921069145202637,
0.26432764530181885,
0.2561018466949463,
-0.024555981159210205,
-0.07897099107503891,
-0.3335880935192108,
0.04560820385813713,
-0.2322385013103485,
-0.3285510241985321,
-0.04243098944425583,
0.22281187772750854,
0.2037612795829773,
0.3823133111000061,
0.1332700550556183,
-0.003663565032184124,
-0.3344189524650574,
-0.19215929508209229,
-0.07134240865707397,
-0.07959029823541641,
0.14106565713882446,
-0.3056291341781616,
-0.3055720627307892,
-0.3390577435493469,
0.18538020551204681,
0.012306255288422108,
0.6306856274604797,
-0.10046161711215973,
0.06025336682796478,
0.000357896089553833,
0.053595613688230515,
0.2863093614578247,
-0.014986546710133553,
0.22382211685180664,
-0.05500315874814987,
0.04186319559812546,
-0.7075551152229309,
-0.07884089648723602,
-0.14908340573310852,
-0.10244197398424149,
0.3979472815990448,
0.2676805853843689,
-0.3344469666481018,
-0.349764347076416,
0.12868791818618774,
0.46990451216697693,
-0.300204873085022,
-0.09026217460632324,
-0.00018440186977386475,
-0.1544872522354126,
-0.12563909590244293,
-0.15092018246650696,
-0.27894511818885803,
0.19254274666309357,
-0.34516841173171997,
0.04527127370238304,
0.18011388182640076,
0.068058080971241,
0.33994510769844055,
-0.02671384997665882,
0.09466612339019775,
0.18801210820674896,
0.42700037360191345,
0.33942967653274536,
0.10348951071500778,
0.09073583781719208,
0.3604840636253357,
-0.07484620809555054,
0.31059467792510986,
-0.10799842327833176,
-0.05819934606552124,
0.2565920650959015,
0.5723097324371338,
-0.08121033012866974,
0.26736950874328613,
0.02798745408654213,
0.07844719290733337,
-0.44922515749931335,
0.0794500932097435,
0.35881054401397705,
-0.13682514429092407,
-0.21599909663200378,
-0.2861741781234741,
0.3259079158306122,
0.2019692361354828,
-0.11094173789024353,
0.2802771031856537,
-0.11497201025485992,
-0.3127882480621338,
-0.1978132426738739,
0.04087752848863602,
0.9505406618118286,
0.23871783912181854,
0.22750012576580048,
-0.009548395872116089,
-0.40006327629089355,
0.4883541166782379,
0.4271095395088196,
-0.14363767206668854,
-0.04819582775235176,
0.3191532790660858,
-0.003990506753325462,
-0.11691373586654663,
0.07995440810918808,
-0.016356758773326874,
-0.15587566792964935,
0.5566449165344238,
0.3277592658996582,
0.19028852880001068,
0.06713634729385376,
0.3798558712005615,
0.00893730204552412,
-0.37730446457862854,
-0.2538492977619171,
0.06734471768140793,
-0.3593873977661133,
0.27832087874412537,
-0.13936862349510193,
-0.32526201009750366,
0.005306076258420944,
-0.20724272727966309,
-0.32059717178344727,
0.038354285061359406,
-0.4705601632595062,
0.1999380737543106,
-0.10842962563037872,
-0.048494916409254074,
0.1913115382194519,
-0.09392908215522766,
0.023355089128017426,
0.19398179650306702,
-0.34216588735580444,
0.047142256051301956,
-0.45834970474243164,
0.23518574237823486,
0.041799452155828476,
0.06990686804056168,
-0.001923736184835434,
-0.1840399205684662,
-0.11442629992961884,
-0.25358903408050537,
0.011525691486895084,
0.33709168434143066,
-0.0575810968875885,
0.025947604328393936,
0.1794763207435608,
0.1735762655735016,
-0.09339630603790283,
0.1255260705947876,
0.12402758002281189,
-0.13765621185302734,
0.10380895435810089,
0.2577846944332123,
-0.09410202503204346,
0.5929930210113525,
0.14469312131404877,
-0.08289994299411774,
-0.15289627015590668,
0.5256068706512451,
0.05211455374956131,
-0.14661890268325806,
0.4898708462715149,
0.5510692596435547,
-0.11435334384441376,
-0.24170294404029846,
-0.004162009805440903,
-0.3494569957256317,
-0.484569787979126,
-0.010519598610699177,
0.03293290734291077,
0.3049015998840332,
0.05599498376250267,
0.5251322388648987,
0.21824193000793457,
-0.278743177652359,
0.15703050792217255,
-0.4990168511867523,
-0.14112646877765656,
0.30060821771621704,
0.09301762282848358,
0.07044743001461029,
-0.11381857097148895,
0.05230661481618881,
0.07834575325250626,
0.315483957529068,
-0.2897268533706665,
0.19059891998767853,
-0.045121561735868454,
0.13441307842731476,
0.24833370745182037,
-0.24237558245658875,
0.10889307409524918,
-0.046525150537490845,
-0.06454246491193771,
-0.12677665054798126,
-0.44857606291770935,
-0.14715319871902466,
-0.22475898265838623,
0.14527826011180878,
-0.00368606299161911,
-0.4742395877838135,
0.0590282641351223,
-0.30708253383636475,
0.04878247156739235,
0.060766786336898804,
-0.1974308341741562,
0.09647921472787857,
0.01465151458978653,
0.12176759541034698,
0.13697591423988342,
0.1712830364704132,
0.030799120664596558,
0.42505332827568054,
-0.0532618910074234,
0.2902281880378723,
0.14366169273853302,
0.1730930060148239,
0.28011271357536316,
-0.1230008602142334,
-0.1648171991109848,
-0.18342119455337524,
-0.014928869903087616,
-0.22811585664749146,
0.2769263982772827,
-0.23831577599048615,
-0.0286652073264122,
0.18436750769615173,
0.38460075855255127,
0.5537837743759155,
0.15854844450950623,
0.008907590061426163,
-0.06640985608100891,
0.11203394085168839,
-0.1739787608385086,
0.03755880892276764,
0.20102940499782562,
0.4397960603237152,
-0.1216784417629242,
0.1304984986782074,
0.3467441201210022,
-0.23718556761741638,
-0.19276507198810577,
0.1611763834953308,
0.4595690667629242,
-0.1366930902004242,
0.03590593487024307,
0.1399310827255249,
0.054621029645204544,
-0.006956968456506729,
-0.1403510719537735,
0.12837277352809906,
0.02661171555519104,
0.046546656638383865,
-0.2296464443206787,
0.4097220003604889,
0.14295826852321625,
-0.08155529201030731,
0.15018677711486816,
-0.3475332260131836,
0.0019549503922462463,
0.34105563163757324,
-0.1524554193019867,
-0.045449450612068176,
0.10500248521566391,
0.6036854386329651,
-0.03999898582696915,
-0.34116435050964355,
-0.034307219088077545,
0.5274826884269714,
0.10173597931861877,
-0.10915873944759369,
-0.33690890669822693,
-0.2871399223804474,
-0.2651318907737732,
0.011788804084062576,
-0.11323191225528717,
-0.2011546939611435,
0.1153097152709961,
0.2378167062997818,
-0.20115576684474945,
-0.6774240732192993,
-0.29834967851638794,
0.022755121812224388,
-0.12410733848810196,
-0.14494898915290833,
0.20984211564064026,
0.4280455708503723,
-0.06404738128185272,
0.05026654899120331,
0.5844969153404236,
0.33799561858177185,
0.3474573493003845,
-0.20884524285793304,
-0.0027260519564151764,
0.11221779882907867,
0.011593585833907127,
-0.24575617909431458,
0.3455422818660736,
0.07481019198894501,
-0.0603158138692379,
0.38222619891166687,
0.09450595825910568,
-0.1459355354309082,
-0.2766555845737457,
0.12532642483711243,
-0.200828418135643,
-0.13046887516975403,
0.43201297521591187,
-0.21414661407470703,
0.04505901038646698,
-0.2039673924446106,
0.04483677074313164,
-0.3329178988933563,
0.16379223763942719,
0.5231642723083496,
0.05490177124738693,
0.1952824890613556,
-0.34269607067108154,
0.05930135399103165,
-0.07010111212730408,
0.7746466398239136,
0.32789677381515503,
0.1063382625579834,
-0.38104334473609924,
-0.2430896908044815,
-0.956947386264801,
-0.213681161403656,
-0.17363737523555756,
0.21157562732696533,
-0.06916133314371109,
0.21861569583415985,
0.1369340717792511,
0.23082014918327332,
0.07308290898799896,
0.4956243634223938,
0.018309935927391052,
-0.051279276609420776,
-0.4442256987094879,
0.026510048657655716,
0.10342809557914734,
-0.10298708081245422,
-0.021180827170610428,
-0.12843897938728333,
0.36814382672309875,
-0.5790628790855408,
-0.02931639552116394,
-0.3203980326652527,
0.06753765046596527,
-0.1546674370765686,
0.510782778263092,
0.1049056351184845,
0.29142603278160095,
0.48728734254837036,
0.1722448766231537,
-0.13654015958309174,
-0.245626300573349,
-0.18684208393096924,
0.07690924406051636,
0.212234765291214,
-0.1695900708436966,
0.24209973216056824,
-0.15480563044548035,
0.05637364834547043,
-0.25510722398757935,
-0.03781807795166969,
-0.26829034090042114,
-0.014333116821944714,
-0.025405220687389374,
0.08426828682422638,
-0.0810290277004242,
0.0937444195151329,
0.10314295440912247,
0.1714038848876953,
-0.12601232528686523,
0.16775035858154297,
-0.3540550470352173,
-0.40147799253463745,
0.45236098766326904,
-0.26610273122787476,
-0.19093386828899384,
-0.26786449551582336,
0.2520734667778015,
0.18846626579761505,
0.0888340100646019,
-0.5078631043434143,
-0.06870394945144653,
0.32837241888046265,
-0.22752249240875244,
-0.1473044604063034,
0.2823517322540283,
-0.19366183876991272,
-0.3195131719112396,
-0.00028815120458602905,
0.17415925860404968,
0.24863654375076294,
-0.36902564764022827,
0.06402412056922913,
-0.08805673569440842
] |
https://github.com/huggingface/datasets/issues/486 | Bookcorpus data contains pretokenized text | Yes indeed it looks like some `'` and spaces are missing (for example in `dont` or `didnt`).
Do you know if there exist some copies without this issue ?
How would you fix this issue on the current data exactly ? I can see that the data is raw text (not tokenized) so I'm not sure I understand how you would do it. Could you provide more details ? | It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 | 69 | Bookcorpus data contains pretokenized text
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
Yes indeed it looks like some `'` and spaces are missing (for example in `dont` or `didnt`).
Do you know if there exist some copies without this issue ?
How would you fix this issue on the current data exactly ? I can see that the data is raw text (not tokenized) so I'm not sure I understand how you would do it. Could you provide more details ? | [
0.17118361592292786,
0.2254086434841156,
-0.06824129819869995,
0.34839797019958496,
-0.11431333422660828,
-0.25599414110183716,
-0.12094037234783173,
0.2354477047920227,
-0.4317489564418793,
0.1244581788778305,
-0.08785968273878098,
0.22662541270256042,
0.32321006059646606,
-0.19458550214767456,
-0.004641634412109852,
0.13638582825660706,
0.22122398018836975,
0.3154222071170807,
0.16316023468971252,
-0.2263965606689453,
-0.16098494827747345,
0.29126736521720886,
0.1281990110874176,
-0.03335047513246536,
-0.23828312754631042,
-0.33744925260543823,
-0.29229041934013367,
0.24946126341819763,
-0.13885708153247833,
-0.46922510862350464,
0.021963922306895256,
0.3137595057487488,
-0.04431428015232086,
0.3362239897251129,
-0.00011081570119131356,
-0.29525795578956604,
-0.056196458637714386,
-0.052477166056632996,
-0.2681583762168884,
-0.014224156737327576,
0.26467180252075195,
-0.055580899119377136,
0.3515130281448364,
-0.4346843361854553,
-0.35703787207603455,
0.09604662656784058,
-0.1705731600522995,
-0.054389674216508865,
0.30194395780563354,
0.18157170712947845,
0.20077329874038696,
0.22296059131622314,
-0.1164247989654541,
0.22348928451538086,
0.21983960270881653,
-0.006134621798992157,
-0.17325596511363983,
0.19436022639274597,
0.5178601741790771,
0.2606932520866394,
-0.08246298879384995,
0.3769718408584595,
-0.162688210606575,
-0.1177663803100586,
0.09060719609260559,
0.03418951854109764,
0.003802157938480377,
-0.18848153948783875,
0.14144384860992432,
0.16942012310028076,
0.2140863984823227,
-0.16073176264762878,
-0.12411808222532272,
-0.19977697730064392,
0.014902829192578793,
-0.14983966946601868,
0.32361307740211487,
-0.0014164960011839867,
0.13470491766929626,
0.07603998482227325,
-0.2752537429332733,
-0.14922747015953064,
-0.014261551201343536,
0.3484376072883606,
-0.057286083698272705,
0.35206279158592224,
-0.03889477625489235,
-0.03819131851196289,
-0.19728894531726837,
-0.14498232305049896,
-0.21617238223552704,
0.10242224484682083,
-0.36704739928245544,
-0.03384631499648094,
-0.015091802924871445,
-0.18529105186462402,
-0.10532563179731369,
0.3172922432422638,
-0.05130348354578018,
0.1927739530801773,
0.12943831086158752,
0.14396724104881287,
-0.10023292899131775,
-0.09022624045610428,
0.08091429620981216,
0.15941590070724487,
0.148637056350708,
0.28227823972702026,
0.060012008994817734,
0.0032301372848451138,
-0.3305779993534088,
-0.18974697589874268,
0.002567112911492586,
-0.027881253510713577,
-0.032455891370773315,
0.07323464751243591,
-0.03501415625214577,
-0.45014798641204834,
0.225494384765625,
0.18861594796180725,
-0.04305432736873627,
0.28077933192253113,
-0.007439860142767429,
0.10095773637294769,
-0.09653715044260025,
0.012218154966831207,
0.2783243656158447,
0.10339265316724777,
-0.1605127453804016,
-0.1804712414741516,
-0.17144563794136047,
-0.05017172917723656,
-0.3032013475894928,
0.09282433986663818,
0.18052524328231812,
0.04858417809009552,
0.18719501793384552,
0.08927343040704727,
-0.054096661508083344,
0.02023530751466751,
-0.12911899387836456,
-0.15833647549152374,
0.262541264295578,
0.055140767246484756,
-0.016298942267894745,
0.2405932992696762,
-0.04531254991889,
-0.004808962345123291,
-0.13403144478797913,
0.09758356213569641,
-0.33437004685401917,
0.2123454064130783,
-0.3812573254108429,
0.17351967096328735,
-0.3609200716018677,
-0.23680979013442993,
-0.09870711714029312,
-0.008843183517456055,
0.3678664565086365,
-0.34802737832069397,
0.3336295187473297,
0.06850602477788925,
-0.07814408838748932,
-0.021207597106695175,
-0.10761759430170059,
0.20464223623275757,
-0.10813410580158234,
-0.10038211941719055,
-0.16546297073364258,
0.24219641089439392,
0.426567941904068,
0.14529234170913696,
-0.08608599007129669,
0.013507522642612457,
0.1440582573413849,
0.8647382855415344,
0.13618053495883942,
-0.13566993176937103,
-0.4758003056049347,
0.30015313625335693,
0.018385447561740875,
0.04940111190080643,
-0.06477994471788406,
-0.16408531367778778,
0.3293260931968689,
0.027231959626078606,
-0.17554625868797302,
0.12067801505327225,
0.46758851408958435,
0.13785101473331451,
-0.6367678642272949,
-0.1789669245481491,
0.3183290958404541,
0.08004949986934662,
-0.047018591314554214,
-0.03162427246570587,
0.16900160908699036,
0.04191679507493973,
0.018509045243263245,
-0.23282146453857422,
0.2899686098098755,
0.4480457901954651,
0.2772979140281677,
0.34730714559555054,
0.18600259721279144,
-0.06614118814468384,
0.14706970751285553,
-0.026591740548610687,
-0.6945600509643555,
0.5669017434120178,
-0.22575484216213226,
-0.3093990087509155,
0.00044357310980558395,
-0.329888254404068,
-0.09854431450366974,
0.04076306149363518,
0.2374933362007141,
0.22251904010772705,
-0.059268705546855927,
0.33155375719070435,
0.1590389609336853,
-0.05706530064344406,
0.12348954379558563,
0.20145568251609802,
-0.2365749627351761,
0.1906152218580246,
-0.10246958583593369,
-0.309956818819046,
-0.08790720254182816,
0.4058854281902313,
0.4630974531173706,
-0.03857146203517914,
-0.2972504794597626,
0.606234073638916,
-0.3367239236831665,
0.22199752926826477,
-0.20775321125984192,
0.17258138954639435,
0.34214457869529724,
0.043218012899160385,
0.10045116394758224,
0.640265703201294,
0.2788158357143402,
-0.006632901728153229,
0.15007302165031433,
0.5099730491638184,
0.32251209020614624,
-0.0841202363371849,
0.005840938538312912,
-0.07009250670671463,
0.15789930522441864,
-0.3809228837490082,
0.20041035115718842,
-0.12491650879383087,
0.22033549845218658,
-0.04284114018082619,
0.12333059310913086,
0.3034806549549103,
-0.24066196382045746,
0.20804278552532196,
0.411153107881546,
-0.04950246587395668,
0.1402168571949005,
0.14523085951805115,
-0.22548288106918335,
-0.37577947974205017,
0.09676077216863632,
0.050388138741254807,
0.1027316153049469,
0.12099702656269073,
-0.08062037825584412,
-0.01655512861907482,
0.3039054870605469,
-0.35424891114234924,
0.23876047134399414,
0.11124996095895767,
-0.2931634783744812,
0.08046814054250717,
0.2978735864162445,
0.3431166112422943,
-0.36366984248161316,
0.012510854750871658,
-0.05807363986968994,
0.18919366598129272,
-0.10282342880964279,
0.2186201810836792,
-0.3165396749973297,
-0.7242134213447571,
0.045275017619132996,
0.011635667644441128,
-0.16499966382980347,
-0.22542791068553925,
0.3410964608192444,
-0.004055622965097427,
-0.14614354074001312,
0.0730765238404274,
0.22351542115211487,
0.33867186307907104,
-0.3230762183666229,
-0.1607569307088852,
-0.2665172815322876,
-0.3520280718803406,
-0.7646335959434509,
0.1563435047864914,
0.13348065316677094,
0.09108944982290268,
-0.09977464377880096,
-0.205094113945961,
0.049502864480018616,
-0.2066185474395752,
-0.28039270639419556,
0.05937286093831062,
-0.19303739070892334,
-0.1592741757631302,
0.06043984368443489,
-0.05132573843002319,
-0.37047624588012695,
-0.30636122822761536,
-0.06965851783752441,
-0.2150728702545166,
-0.12194526195526123,
0.23724812269210815,
-0.2543061673641205,
-0.4921053946018219,
-0.46567609906196594,
-0.4422762095928192,
-0.032248832285404205,
-0.12548567354679108,
0.2829439342021942,
0.18916578590869904,
0.01090160384774208,
0.30119267106056213,
-0.3569279611110687,
0.05097849294543266,
0.13357195258140564,
0.3939689099788666,
-0.2407728135585785,
-0.43490585684776306,
0.33193716406822205,
-0.04158754274249077,
-0.3880458474159241,
-0.01985199749469757,
0.1343088448047638,
0.012537095695734024,
-0.08096734434366226,
-0.4142773151397705,
0.2543451189994812,
-0.27463603019714355,
0.08997629582881927,
0.009953688830137253,
-0.01724749244749546,
0.39329326152801514,
0.05614274740219116,
-0.20752494037151337,
-0.09904055297374725,
-0.002055736258625984,
0.28081977367401123,
0.30536019802093506,
0.3586890399456024,
-0.3069499731063843,
-0.17001304030418396,
0.00909464806318283,
-0.06274740397930145,
-0.14063291251659393,
-0.18069131672382355,
0.48010846972465515,
-0.11870629340410233,
0.2573775351047516,
-0.15559574961662292,
-0.026078592985868454,
0.15320619940757751,
-0.1746578812599182,
-0.024370919913053513,
0.7594630122184753,
0.009868145920336246,
-0.3053728938102722,
-0.062355585396289825,
-0.496770441532135,
-0.6557124257087708,
-0.5054523348808289,
-0.07109972834587097,
-0.14721184968948364,
0.10287032276391983,
0.07569405436515808,
-0.028635486960411072,
0.06550782918930054,
-0.5048427581787109,
0.004891004413366318,
0.17839865386486053,
-0.018435873091220856,
-0.03032347932457924,
-0.44871824979782104,
0.25729334354400635,
-0.33117347955703735,
0.3807836174964905,
-0.04559142515063286,
0.01798553392291069,
-0.14064419269561768,
0.1126987412571907,
0.2615390419960022,
-0.12352936714887619,
0.1620296984910965,
0.00806421972811222,
0.010714694857597351,
0.1937720626592636,
-0.15265467762947083,
-0.002658192068338394,
-0.06766517460346222,
-0.1539682149887085,
0.16223955154418945,
0.3666578531265259,
0.21051403880119324,
-0.334077924489975,
-0.02061372436583042,
-0.36641812324523926,
0.1761319935321808,
-0.15872347354888916,
0.3018682897090912,
-0.025989843532443047,
-0.08753498643636703,
-0.3132629990577698,
0.04648172855377197,
0.13474388420581818,
0.541964590549469,
0.10586804151535034,
-0.006476353853940964,
0.04956653341650963,
0.16544431447982788,
0.24622996151447296,
0.2353479117155075,
0.5685104131698608,
-0.2812585234642029,
-0.10226024687290192,
-0.0955822616815567,
0.16997721791267395,
0.09806230664253235,
0.31548643112182617,
0.07306842505931854,
-0.007116422057151794,
-0.09596886485815048,
-0.31804606318473816,
-0.10726385563611984,
0.37945079803466797,
0.04904946684837341,
0.32086890935897827,
0.1861807405948639,
-0.018229782581329346,
0.0914769396185875,
0.13715332746505737,
-0.06026184558868408,
-0.09307114779949188,
-0.033560510724782944,
0.015178916975855827,
0.15167218446731567,
0.027231499552726746,
-0.03952024132013321,
-0.01809290051460266,
0.18679271638393402,
-0.5031009316444397,
0.6204190850257874,
-0.0008973851799964905,
1.261277198791504,
0.19324730336666107,
0.2816488444805145,
0.0721575990319252,
0.08778262138366699,
0.24465113878250122,
-0.514762282371521,
-0.11716748774051666,
-0.2032098025083542,
0.2356707602739334,
-0.04726631939411163,
0.4142565429210663,
-0.06212358921766281,
0.04431571066379547,
-0.3159232437610626,
0.1781926453113556,
-0.18729963898658752,
0.1955239176750183,
-0.035326339304447174,
-0.0026297569274902344,
0.13252316415309906,
-0.30063557624816895,
0.0733424723148346,
0.1304015964269638,
-0.13424740731716156,
0.06915552914142609,
0.028746750205755234,
-0.3014603853225708,
-0.38588547706604004,
-0.16886015236377716,
-0.33677107095718384,
0.15404725074768066,
-0.08421119302511215,
-0.04879998415708542,
0.29647135734558105,
-0.025513213127851486,
-0.09340561926364899,
0.26215460896492004,
0.44804877042770386,
0.35570254921913147,
-0.3563840091228485,
0.2410062998533249,
0.058600906282663345,
0.030322322621941566,
0.16753040254116058,
0.28087228536605835,
0.2103387713432312,
-0.18324220180511475,
0.04902336746454239,
-0.21443301439285278,
-0.14763204753398895,
-0.1443910002708435,
-0.18993183970451355,
-0.01503966748714447,
0.04747120290994644,
-0.3482376039028168,
-0.10985453426837921,
0.1363227665424347,
-0.3647046983242035,
-0.3153705298900604,
0.14734770357608795,
-0.1926613301038742,
-0.1967436671257019,
-0.032067425549030304,
0.06464069336652756,
-0.29079508781433105,
-0.1841214895248413,
0.3845703899860382,
0.1932663917541504,
-0.07763632386922836,
0.3896777331829071,
-0.07957449555397034,
-0.17727884650230408,
-0.3628852963447571,
-0.09672316908836365,
0.3678475320339203,
-0.5188494920730591,
0.27873921394348145,
-0.035192567855119705,
-0.29018479585647583,
0.277450293302536,
0.705849289894104,
0.08326414227485657,
0.30541205406188965,
-0.13914240896701813,
-0.3576368987560272,
0.0650562196969986,
0.08162065595388412,
0.01070370152592659,
0.11696882545948029,
0.38842710852622986,
0.4844403862953186,
-0.001832837238907814,
-0.2269231379032135,
-0.35125601291656494,
0.2829188406467438,
-0.33115801215171814,
0.29680368304252625,
-0.19830894470214844,
-0.059905119240283966,
-0.10909554362297058,
-0.10009829699993134,
0.029582200571894646,
0.2926211953163147,
0.07394067943096161,
-0.2269209623336792,
-0.353900283575058,
0.10855147242546082,
0.21406689286231995,
0.04867129772901535,
-0.07855327427387238,
0.03738822042942047,
0.09860251843929291,
-0.1802549511194229,
-0.045419611036777496,
-0.09311085939407349,
0.0363425686955452,
0.4058872163295746,
0.17282389104366302,
0.1893002986907959,
-0.4371964931488037,
-0.08336172997951508,
-0.1115269660949707,
-0.08583244681358337,
-0.18632344901561737,
0.057438258081674576,
-0.16230498254299164,
-0.1390863060951233,
0.016772810369729996,
0.027488943189382553,
0.0644908994436264,
0.33855295181274414,
0.23824945092201233,
0.13661107420921326,
0.012772317975759506,
0.2071964144706726,
0.18746422231197357,
0.2976185083389282,
-0.09233789891004562,
-0.39386430382728577,
0.2880013883113861,
0.2218122035264969,
-0.19305144250392914,
-0.31965741515159607,
-0.059345174580812454,
-0.30064916610717773,
-0.02585308812558651,
-0.005722008645534515,
0.5143334269523621,
-0.28407034277915955,
0.053010135889053345,
0.05429765582084656,
0.3861454129219055,
-0.03268316388130188,
0.2601009011268616,
0.3640582263469696,
-0.021533407270908356,
0.08412307500839233,
0.1158100962638855,
-0.052919041365385056,
-0.26349005103111267,
0.4093238115310669,
0.04347817599773407,
0.4805601239204407,
0.4735279679298401,
0.21811431646347046,
0.009259708225727081,
0.18579180538654327,
0.3121904134750366,
0.012344807386398315,
0.20014408230781555,
0.3483908772468567,
0.06536875665187836,
0.1877526342868805,
-0.07651201635599136,
-0.40066590905189514,
-0.051473356783390045,
0.17143769562244415,
-0.41958966851234436,
0.014513280242681503,
-0.2791679799556732,
-0.09214109182357788,
-0.15630674362182617,
-0.1374529004096985,
-0.25334349274635315,
0.13107164204120636,
0.03456120565533638,
-0.030694693326950073,
-0.026423990726470947,
-0.3715111017227173,
-0.12133599072694778,
-0.2162148654460907,
0.26715323328971863,
-0.24262771010398865,
0.40807950496673584,
0.11212939769029617,
-0.09163494408130646,
0.014258576557040215,
0.1875009387731552,
0.28885847330093384,
0.24177877604961395,
-0.08920183777809143,
-0.031666260212659836,
-0.024826642125844955,
-0.10280540585517883,
0.16050544381141663,
0.29880306124687195,
0.2712016999721527,
0.06292279809713364,
-0.013773204758763313,
0.043095655739307404,
-0.17884276807308197,
0.29971328377723694,
-0.13419246673583984,
0.18372094631195068,
0.15720583498477936,
0.12542054057121277,
0.13995139300823212,
-0.25288841128349304,
-0.26713496446609497,
-0.24666738510131836,
-0.3726024031639099,
0.02241084910929203,
0.09894604980945587,
0.013914095237851143,
0.13045832514762878,
-0.21829578280448914,
0.10712027549743652,
0.13185623288154602,
0.6128295660018921,
0.3352709710597992,
-0.1319619119167328,
-0.19835160672664642,
-0.21018636226654053,
-0.38651472330093384,
0.2486063838005066,
0.1450929343700409,
-0.2164662927389145,
-0.05581587553024292,
-0.16058528423309326,
0.022554971277713776,
-0.08820600807666779,
-0.328633189201355,
0.2831572890281677,
-0.14763705432415009,
-0.2638462483882904,
-0.4621172845363617,
0.319275438785553,
0.1612541675567627,
-0.13038793206214905,
-0.0027053523808717728,
-0.009303178638219833,
0.15703126788139343,
-0.03932963311672211,
0.08185014873743057,
-0.09571877121925354,
-0.5678965449333191,
-0.052193477749824524,
0.24631845951080322,
0.10988273471593857,
0.3386014401912689,
0.02944040298461914,
-0.29722437262535095,
0.15767958760261536,
0.030102603137493134,
-0.26719340682029724,
-0.08972130715847015,
0.06111178919672966,
0.2313506305217743,
0.27546226978302,
0.07426907867193222,
0.30542075634002686,
-0.12246225774288177,
0.10581573098897934,
0.1703944206237793,
0.20439815521240234,
-0.2765965461730957,
-0.015787294134497643,
-0.0840039998292923,
-0.062420621514320374,
0.1036127582192421,
0.5216318368911743,
0.0051865652203559875,
-0.09914224594831467,
-0.38135969638824463,
-0.5017684698104858,
0.4677009880542755,
-0.402833491563797,
-0.23142069578170776,
-0.007471152581274509,
0.17883923649787903,
0.5742588639259338,
-0.07908216863870621,
-0.6015178561210632,
-0.0861022025346756,
0.24204236268997192,
-0.0026646703481674194,
-0.46254006028175354,
0.2797016203403473,
-0.05545060709118843,
-0.09897113591432571,
-0.014088792726397514,
0.36031898856163025,
0.4206550419330597,
-0.09527468681335449,
0.12680476903915405,
-0.24330495297908783
] |
https://github.com/huggingface/datasets/issues/486 | Bookcorpus data contains pretokenized text | I'm afraid that I don't know how to obtain the original BookCorpus data. I believe this version came from an anonymous Google Drive link posted in another issue.
Going through the raw text in this version, it's apparent that NLTK's TreebankWordTokenizer was applied on it (I gave some examples in my original post), followed by:
`' '.join(tokens)`
You can retrieve the tokenization by splitting on whitespace. You can then "detokenize" it with TreebankWordDetokenizer class of NLTK (though, as I suggested, use the fixed version in my repo). This will bring the text closer to its original form, but some steps of TreebankWordTokenizer are destructive, so it wouldn't be one-to-one. Something along the lines of the following should work:
```
treebank_detokenizer = nltk.tokenize.treebank.TreebankWordDetokenizer()
db = nlp.load_dataset('bookcorpus', split=nlp.Split.TRAIN)
db = db.map(lambda x: treebank_detokenizer.detokenize(x['text'].split()))
```
Regarding other issues beyond the above, I'm afraid that I can't help with that. | It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 | 146 | Bookcorpus data contains pretokenized text
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
I'm afraid that I don't know how to obtain the original BookCorpus data. I believe this version came from an anonymous Google Drive link posted in another issue.
Going through the raw text in this version, it's apparent that NLTK's TreebankWordTokenizer was applied on it (I gave some examples in my original post), followed by:
`' '.join(tokens)`
You can retrieve the tokenization by splitting on whitespace. You can then "detokenize" it with TreebankWordDetokenizer class of NLTK (though, as I suggested, use the fixed version in my repo). This will bring the text closer to its original form, but some steps of TreebankWordTokenizer are destructive, so it wouldn't be one-to-one. Something along the lines of the following should work:
```
treebank_detokenizer = nltk.tokenize.treebank.TreebankWordDetokenizer()
db = nlp.load_dataset('bookcorpus', split=nlp.Split.TRAIN)
db = db.map(lambda x: treebank_detokenizer.detokenize(x['text'].split()))
```
Regarding other issues beyond the above, I'm afraid that I can't help with that. | [
0.05026829615235329,
0.32062387466430664,
-0.032077495008707047,
0.28562361001968384,
-0.11093926429748535,
-0.31413397192955017,
0.06598156690597534,
0.22920824587345123,
-0.37735459208488464,
0.1320856809616089,
-0.150407075881958,
0.3783097565174103,
0.20916619896888733,
-0.08471903204917908,
-0.053945206105709076,
0.05760088562965393,
0.16126829385757446,
0.18276163935661316,
0.19952687621116638,
-0.08467210829257965,
-0.12700864672660828,
0.3466220796108246,
0.09686566889286041,
0.09852749109268188,
-0.25594741106033325,
-0.30399230122566223,
-0.1721382737159729,
0.21064940094947815,
-0.11309946328401566,
-0.2921229600906372,
-0.05147390067577362,
0.2297891229391098,
-0.020597796887159348,
0.33930498361587524,
-0.00010254686640109867,
-0.2117830067873001,
-0.04155123978853226,
0.024881651625037193,
-0.2459975779056549,
-0.04219168424606323,
0.33182838559150696,
-0.058367058634757996,
0.31996437907218933,
-0.347976416349411,
-0.30737486481666565,
0.006019574590027332,
-0.1507444530725479,
0.0970793217420578,
0.28787630796432495,
0.286607027053833,
0.25621676445007324,
0.17280562222003937,
-0.14794407784938812,
0.2911147475242615,
0.22935202717781067,
-0.22855673730373383,
-0.17920517921447754,
0.11545853316783905,
0.3404254913330078,
0.15769869089126587,
-0.14799350500106812,
0.3168504238128662,
-0.11206147819757462,
-0.09936031699180603,
0.010764311999082565,
0.08660386502742767,
-0.04685266315937042,
-0.17492958903312683,
0.17413464188575745,
0.14108681678771973,
0.22538664937019348,
-0.29293420910835266,
-0.17603863775730133,
-0.25553104281425476,
0.06768537312746048,
-0.06270846724510193,
0.3575010895729065,
0.15976695716381073,
0.179701030254364,
0.09915247559547424,
-0.3076466917991638,
-0.11840837448835373,
0.00670710951089859,
0.1861817091703415,
-0.18903879821300507,
0.3517371714115143,
-0.027546588331460953,
-0.05215693265199661,
-0.04017229750752449,
-0.16718780994415283,
-0.2302844524383545,
0.04577678069472313,
-0.28395137190818787,
0.029054313898086548,
-0.019479375332593918,
-0.21483314037322998,
-0.03297688812017441,
0.26335927844047546,
0.05835510790348053,
0.20640338957309723,
0.13820359110832214,
0.21175304055213928,
-0.1937953382730484,
0.010467719286680222,
0.14194676280021667,
0.22371011972427368,
0.07222460955381393,
0.1600138396024704,
0.11117084324359894,
0.0893620178103447,
-0.2414986491203308,
-0.03208806365728378,
-0.01460091769695282,
-0.023749299347400665,
0.03967050090432167,
0.07287348806858063,
-0.03263668715953827,
-0.33739402890205383,
0.05465157330036163,
0.19935835897922516,
-0.2055111527442932,
0.30332958698272705,
-0.04166216775774956,
0.16585402190685272,
-0.05498025193810463,
-0.01205521821975708,
0.28289926052093506,
0.02069740742444992,
-0.17563828825950623,
-0.1595061719417572,
-0.19736039638519287,
0.038061678409576416,
-0.3233502209186554,
0.1083543598651886,
0.20315323770046234,
0.003549538552761078,
0.1434016227722168,
0.05393744260072708,
-0.18153227865695953,
-0.04332665354013443,
0.005220914259552956,
-0.19075201451778412,
0.1267918199300766,
-0.07005332410335541,
0.03324631229043007,
0.1602681428194046,
-0.09914654493331909,
-0.1501457691192627,
-0.2041984498500824,
0.02045140415430069,
-0.3056628108024597,
0.12981732189655304,
-0.36319220066070557,
0.23846402764320374,
-0.3120626211166382,
-0.2469172477722168,
-0.0951264277100563,
0.14024513959884644,
0.21681275963783264,
-0.21266408264636993,
0.20824062824249268,
0.0645192563533783,
-0.17969195544719696,
-0.013937054201960564,
-0.053215429186820984,
0.22236675024032593,
-0.1891808807849884,
-0.15397369861602783,
-0.03877510875463486,
0.03686707466840744,
0.2192966341972351,
0.20449666678905487,
-0.13982179760932922,
0.13162778317928314,
0.03686343878507614,
0.7144052982330322,
0.023887529969215393,
-0.1102675199508667,
-0.6006366014480591,
0.2778588533401489,
-0.16382813453674316,
0.07126349210739136,
-0.16919997334480286,
-0.2280033826828003,
0.15008090436458588,
0.1093694269657135,
0.011197425425052643,
0.3238183856010437,
0.47639036178588867,
0.1905878633260727,
-0.5679762959480286,
-0.27781692147254944,
0.23009365797042847,
0.08299839496612549,
-0.13155312836170197,
-0.015773408114910126,
0.1510695517063141,
-0.0035498500801622868,
0.07164094597101212,
-0.14479830861091614,
0.2080221325159073,
0.45612549781799316,
0.19454526901245117,
0.2754329442977905,
0.13792243599891663,
-0.1083601713180542,
-0.003532223403453827,
-0.028095439076423645,
-0.6072432994842529,
0.5558735728263855,
-0.27057963609695435,
-0.3538452982902527,
-0.043614137917757034,
-0.30357328057289124,
-0.08489139378070831,
-0.04260540381073952,
0.3206101059913635,
0.20685994625091553,
-0.06360012292861938,
0.3263256549835205,
0.1955289989709854,
-0.0546720027923584,
0.06109722703695297,
0.09851546585559845,
-0.4020553231239319,
0.03883879631757736,
-0.1572950929403305,
-0.24166414141654968,
-0.0188539307564497,
0.28596869111061096,
0.2576766610145569,
0.09642946720123291,
-0.16279616951942444,
0.5122166872024536,
-0.4067946970462799,
0.39545631408691406,
-0.10297327488660812,
0.2249748706817627,
0.24530677497386932,
0.036853838711977005,
0.14256131649017334,
0.5524893403053284,
0.2463424801826477,
-0.020252656191587448,
-0.010889992117881775,
0.5778493285179138,
0.32462263107299805,
-0.09023714810609818,
0.08854109048843384,
-0.11603653430938721,
0.1845521330833435,
-0.3483376204967499,
0.0513695627450943,
-0.16255280375480652,
0.12030313909053802,
0.250485897064209,
0.1890164017677307,
0.17932982742786407,
-0.20931610465049744,
0.36248594522476196,
0.44041070342063904,
-0.06982442736625671,
0.14541104435920715,
0.17193490266799927,
-0.3168785870075226,
-0.29775041341781616,
0.018455592915415764,
0.16940195858478546,
0.016635939478874207,
0.13542762398719788,
0.04644664004445076,
0.0763096809387207,
0.11184727400541306,
-0.28142353892326355,
0.24189630150794983,
0.08136753737926483,
-0.22023405134677887,
0.19636410474777222,
0.3998716175556183,
0.18253619968891144,
-0.464172899723053,
-0.0631452202796936,
-0.025216616690158844,
0.16237103939056396,
-0.17166952788829803,
0.32894623279571533,
-0.33004459738731384,
-0.6390394568443298,
-0.13278691470623016,
0.05476699024438858,
-0.11611643433570862,
-0.19893606007099152,
0.24697913229465485,
0.23475417494773865,
-0.1379941999912262,
0.04654555022716522,
0.3245830237865448,
0.37135931849479675,
-0.24695730209350586,
-0.14179037511348724,
-0.2285066694021225,
-0.3313559889793396,
-0.6871263980865479,
0.1878606379032135,
0.11137612164020538,
0.08611445873975754,
0.03771200776100159,
-0.14109303057193756,
0.016012098640203476,
-0.35927724838256836,
-0.30516719818115234,
0.07565775513648987,
-0.21787019073963165,
0.06637019664049149,
0.0628795474767685,
-0.098448246717453,
-0.357119619846344,
-0.268587589263916,
-0.02483278699219227,
-0.19887717068195343,
-0.16792193055152893,
0.08760948479175568,
-0.21118779480457306,
-0.27504780888557434,
-0.38889315724372864,
-0.4716964662075043,
-0.02158473990857601,
-0.12056000530719757,
0.3580132722854614,
0.22818882763385773,
0.04782857000827789,
0.2902408540248871,
-0.2424386888742447,
0.10593826323747635,
0.3240024447441101,
0.30397531390190125,
-0.31526631116867065,
-0.3232305943965912,
0.3678922653198242,
-0.08662459254264832,
-0.4257168769836426,
-0.03928106278181076,
0.09640427678823471,
-0.024030108004808426,
-0.0096901785582304,
-0.3700833320617676,
0.17111997306346893,
-0.2685035765171051,
0.08829230070114136,
0.07540725916624069,
-0.03198260813951492,
0.37506845593452454,
0.15378431975841522,
-0.23898769915103912,
-0.05232257395982742,
-0.1377875804901123,
0.25279322266578674,
0.28690123558044434,
0.3607078790664673,
-0.2157282829284668,
-0.046031638979911804,
0.09329082071781158,
0.10862739384174347,
-0.23048777878284454,
-0.1206873208284378,
0.39983388781547546,
-0.1271839141845703,
0.10414102673530579,
-0.17836987972259521,
0.011941341683268547,
0.004744543693959713,
-0.2672375738620758,
-0.05800100043416023,
0.7442838549613953,
-0.056202493607997894,
-0.3819237947463989,
-0.019486289471387863,
-0.4110419750213623,
-0.6470891237258911,
-0.451921284198761,
-0.05885918438434601,
-0.13190729916095734,
0.015158988535404205,
0.08250764012336731,
0.00606941431760788,
0.10756948590278625,
-0.4360053241252899,
0.0010974761098623276,
0.06724857538938522,
-0.07005742937326431,
0.023459425196051598,
-0.2529758810997009,
0.24678298830986023,
-0.4832002520561218,
0.27088218927383423,
-0.028091564774513245,
0.08483104407787323,
0.01599910482764244,
0.02606506273150444,
0.26591014862060547,
-0.33064112067222595,
0.13585683703422546,
0.04928574711084366,
0.06165871396660805,
0.23795190453529358,
-0.22201301157474518,
0.0675273984670639,
-0.09360800683498383,
-0.2850675880908966,
0.026858534663915634,
0.3058534264564514,
0.20776331424713135,
-0.4310358762741089,
-0.01044544018805027,
-0.25501877069473267,
0.12951822578907013,
-0.20207339525222778,
0.3922213315963745,
-0.05590926483273506,
-0.2724837064743042,
-0.4281615912914276,
0.0885956883430481,
0.08372621238231659,
0.5127238631248474,
0.002035117009654641,
0.037550922483205795,
0.09145740419626236,
0.06990137696266174,
0.28282564878463745,
0.20514658093452454,
0.5005569458007812,
-0.3195250928401947,
-0.028934763744473457,
-0.08673083782196045,
0.2290772795677185,
0.1046169251203537,
0.3962087631225586,
0.18425337970256805,
0.06875984370708466,
-0.0918969213962555,
-0.2497073858976364,
-0.10344558209180832,
0.4508931040763855,
0.09335994720458984,
0.2989099323749542,
0.10222967714071274,
-0.05042579770088196,
0.05685410276055336,
0.09369607269763947,
-0.03929977864027023,
-0.05230221897363663,
-0.08668318390846252,
-0.06880196928977966,
0.260787695646286,
0.06251263618469238,
-0.12825486063957214,
0.01603665202856064,
0.16894304752349854,
-0.5297272205352783,
0.6358737945556641,
0.08177222311496735,
1.2664071321487427,
0.1259850561618805,
0.2774372398853302,
0.12217633426189423,
0.10356634855270386,
0.2423628866672516,
-0.4548501968383789,
0.013038406148552895,
-0.3154565095901489,
0.19178225100040436,
-0.05022606998682022,
0.3567129075527191,
-0.17730143666267395,
0.18910205364227295,
-0.29838326573371887,
0.1576019823551178,
-0.14648360013961792,
0.09547324478626251,
0.1002281904220581,
0.20198437571525574,
0.05555599927902222,
-0.23592397570610046,
0.062262676656246185,
0.20067846775054932,
-0.12127269804477692,
0.09996627271175385,
-0.023080823943018913,
-0.2644634246826172,
-0.2481752336025238,
-0.12994948029518127,
-0.3037826120853424,
0.2492029070854187,
-0.13997629284858704,
0.007249708287417889,
0.1680198609828949,
-0.10972412675619125,
-0.1510293036699295,
0.20885153114795685,
0.31383049488067627,
0.2617882490158081,
-0.3833235800266266,
0.30852100253105164,
0.07705181837081909,
-0.14760711789131165,
0.2204047292470932,
0.16088005900382996,
0.3945510685443878,
-0.14882993698120117,
-0.02940751612186432,
-0.23541033267974854,
0.06303118914365768,
-0.2344522476196289,
-0.12901172041893005,
-0.05196857452392578,
-0.06921069324016571,
-0.28316187858581543,
-0.1294771283864975,
0.17222991585731506,
-0.39844828844070435,
-0.28901931643486023,
0.1957060545682907,
-0.23531977832317352,
-0.14184561371803284,
-0.14305278658866882,
0.08835607767105103,
-0.3133049011230469,
-0.1746407002210617,
0.49736931920051575,
0.27565646171569824,
-0.06916177272796631,
0.4139432907104492,
0.008349895477294922,
-0.15094763040542603,
-0.36156854033470154,
-0.2265954315662384,
0.26443955302238464,
-0.2990575432777405,
0.18905425071716309,
-0.1237005814909935,
-0.32791948318481445,
0.2532061040401459,
0.610733687877655,
-0.06460584700107574,
0.328861266374588,
-0.1273343861103058,
-0.3482034206390381,
-0.03889966011047363,
0.07967010140419006,
-0.032310646027326584,
0.19157353043556213,
0.37193840742111206,
0.36814990639686584,
-0.0934031531214714,
-0.14388594031333923,
-0.4209376871585846,
0.24882881343364716,
-0.3923133909702301,
0.23344600200653076,
-0.1301630735397339,
-0.08542143553495407,
-0.041408780962228775,
0.014372734352946281,
0.10044792294502258,
0.3575182557106018,
0.0731341540813446,
-0.3187495768070221,
-0.298866331577301,
0.07517241686582565,
0.16845685243606567,
-0.00978945568203926,
-0.18239639699459076,
0.06562826037406921,
0.020503070205450058,
-0.1436794549226761,
0.12601272761821747,
0.033082470297813416,
0.10860927402973175,
0.36339959502220154,
0.10740245133638382,
0.20649436116218567,
-0.2905074954032898,
-0.2369406521320343,
-0.08672159910202026,
0.015525177121162415,
-0.1578541398048401,
0.17501045763492584,
-0.19861921668052673,
-0.05382964760065079,
-0.18894842267036438,
0.061818577349185944,
0.17410781979560852,
0.5176963806152344,
0.26486846804618835,
0.17634671926498413,
-0.03390839323401451,
0.022254180163145065,
0.18659508228302002,
0.28375327587127686,
-0.22154834866523743,
-0.4664621353149414,
0.3147236406803131,
0.2928294837474823,
-0.17255783081054688,
-0.23237939178943634,
-0.09070339798927307,
-0.5723103880882263,
-0.0013674311339855194,
0.08930036425590515,
0.44839659333229065,
-0.07401435077190399,
-0.016207657754421234,
0.051758065819740295,
0.46216070652008057,
-0.11486898362636566,
0.021963726729154587,
0.33470577001571655,
-0.046840816736221313,
0.02399609237909317,
0.2213384062051773,
0.06552993506193161,
-0.06836261600255966,
0.41973209381103516,
0.07710198312997818,
0.36639896035194397,
0.40500205755233765,
0.26212170720100403,
-0.019311219453811646,
0.18599818646907806,
0.23092229664325714,
0.09411124885082245,
0.20742344856262207,
0.30011165142059326,
0.04196644946932793,
0.15856048464775085,
-0.20358821749687195,
-0.25478988885879517,
-0.08003849536180496,
0.3237064778804779,
-0.3548710346221924,
-0.10161174833774567,
-0.2776465117931366,
-0.21725696325302124,
-0.22274236381053925,
0.08892115950584412,
-0.17920014262199402,
0.12378141283988953,
-0.04739266633987427,
-0.006824031472206116,
-0.08870066702365875,
-0.33395975828170776,
-0.09681028872728348,
-0.25676605105400085,
0.3450832664966583,
-0.30813056230545044,
0.33536869287490845,
-0.023998558521270752,
-0.011740371584892273,
0.034499358385801315,
0.24440181255340576,
0.22802962362766266,
0.16606129705905914,
-0.2368101179599762,
0.008465730585157871,
-0.20227739214897156,
-0.06999596953392029,
0.07399842143058777,
0.30907174944877625,
0.25603899359703064,
-0.034952010959386826,
0.15196126699447632,
0.11864231526851654,
-0.2021940052509308,
0.1569802165031433,
-0.02055688574910164,
0.09069754183292389,
0.09127278625965118,
-0.00682096928358078,
0.0685005933046341,
-0.17795777320861816,
-0.27045679092407227,
-0.29432791471481323,
-0.21061858534812927,
-0.10271506011486053,
0.11026021838188171,
0.045000992715358734,
0.20790672302246094,
-0.22240567207336426,
0.1511448323726654,
0.23863214254379272,
0.5989449620246887,
0.38977211713790894,
0.02909734472632408,
-0.11354558914899826,
-0.1662546843290329,
-0.43770867586135864,
0.22826199233531952,
0.14930135011672974,
-0.2425403892993927,
-0.03234567493200302,
0.023569723591208458,
-0.004358343780040741,
-0.025783535093069077,
-0.4523445963859558,
0.36217403411865234,
-0.16751033067703247,
-0.18390916287899017,
-0.3424535393714905,
0.30022016167640686,
0.12957975268363953,
-0.10529153794050217,
-0.04131433740258217,
-0.1630314141511917,
0.09213253855705261,
-0.06776298582553864,
0.16628146171569824,
-0.1584756076335907,
-0.4944363236427307,
-0.09259086847305298,
0.2201499044895172,
0.1942610740661621,
0.3134509325027466,
-0.01235119253396988,
-0.34655722975730896,
0.05737295001745224,
-0.04881174489855766,
-0.0741131529211998,
-0.21417199075222015,
0.0072930119931697845,
0.1437651813030243,
0.23463937640190125,
0.2637174725532532,
0.3825135827064514,
-0.10252803564071655,
0.2364632785320282,
0.18432657420635223,
0.15778179466724396,
-0.33972105383872986,
-0.0682811364531517,
-0.0784967839717865,
-0.001087447628378868,
-0.07238248735666275,
0.6917639374732971,
0.06420419365167618,
0.07764526456594467,
-0.37172800302505493,
-0.4226442575454712,
0.422774076461792,
-0.3316352665424347,
-0.2500547170639038,
0.12231295555830002,
0.13930459320545197,
0.4561156630516052,
-0.04767385125160217,
-0.6378756165504456,
-0.05867797136306763,
0.1106196939945221,
-0.020351339131593704,
-0.6066349744796753,
0.21900568902492523,
-0.0008712811395525932,
-0.08707432448863983,
-0.10629980266094208,
0.28623923659324646,
0.4174635410308838,
0.013084998354315758,
-0.024456460028886795,
-0.17258189618587494
] |
https://github.com/huggingface/datasets/issues/486 | Bookcorpus data contains pretokenized text | Ok I get it, that would be very cool indeed
What kinds of patterns the detokenizer can't retrieve ? | It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 | 19 | Bookcorpus data contains pretokenized text
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
Ok I get it, that would be very cool indeed
What kinds of patterns the detokenizer can't retrieve ? | [
0.060403142124414444,
0.21129027009010315,
0.0049695223569869995,
0.46748971939086914,
-0.18656587600708008,
-0.3642665445804596,
0.03084583580493927,
0.24870437383651733,
-0.4858068823814392,
0.14313049614429474,
-0.17512661218643188,
0.4655148386955261,
0.18964844942092896,
-0.11763106286525726,
-0.126988023519516,
0.2603905200958252,
0.07077094167470932,
0.20801982283592224,
0.04441506043076515,
-0.17152321338653564,
-0.060596369206905365,
0.3185585141181946,
0.07350495457649231,
-0.0343128964304924,
-0.33406198024749756,
-0.2613663077354431,
-0.1723051816225052,
0.28711485862731934,
-0.15655793249607086,
-0.38854363560676575,
0.03946605324745178,
0.21475183963775635,
-0.029600217938423157,
0.3092275857925415,
-0.00011121356510557234,
-0.1212930902838707,
0.02670723758637905,
-0.11002720147371292,
-0.18162782490253448,
-0.09092451632022858,
0.12323866039514542,
-0.018554314970970154,
0.3582625091075897,
-0.5265984535217285,
-0.28227725625038147,
0.22616896033287048,
-0.14376038312911987,
0.14046503603458405,
0.2870264947414398,
0.4154464304447174,
0.18706108629703522,
0.264273464679718,
-0.15320928394794464,
0.16881020367145538,
0.32641464471817017,
-0.0386347696185112,
-0.2777247726917267,
0.0013346774503588676,
0.3864440619945526,
0.3084564805030823,
-0.1662810742855072,
0.24641405045986176,
-0.1460220068693161,
0.016974588856101036,
0.10815488547086716,
-0.049512848258018494,
0.15880557894706726,
-0.23490872979164124,
0.25532612204551697,
0.34788060188293457,
0.2573387324810028,
-0.038626253604888916,
0.008557308465242386,
-0.2316289246082306,
-0.13998116552829742,
0.20309169590473175,
0.27224022150039673,
0.12785211205482483,
0.0821160078048706,
0.15137705206871033,
-0.10621437430381775,
-0.07107813656330109,
-0.04992786422371864,
0.12703019380569458,
-0.11860595643520355,
0.351742148399353,
0.002636822871863842,
-0.02855299413204193,
-0.011560942977666855,
0.006697900593280792,
-0.17643703520298004,
0.09589318931102753,
-0.3348134458065033,
0.004322450142353773,
-0.004484768956899643,
-0.23231734335422516,
0.09739357233047485,
0.2527465522289276,
-0.04526557773351669,
0.40826547145843506,
0.34453901648521423,
0.2949660122394562,
-0.19664102792739868,
0.0793917253613472,
0.04032736271619797,
0.15730991959571838,
0.055543236434459686,
0.24308963119983673,
0.16652798652648926,
0.010750887915492058,
-0.3805956244468689,
-0.07430129498243332,
0.03179227560758591,
0.01895524188876152,
0.0036561600863933563,
0.06117714196443558,
0.037483781576156616,
-0.48321253061294556,
0.16326573491096497,
0.18533003330230713,
-0.21368494629859924,
0.1784505546092987,
0.05644693225622177,
0.08981052041053772,
-0.05153649300336838,
0.08803470432758331,
0.0918416976928711,
-0.0330607146024704,
-0.051797471940517426,
-0.19900965690612793,
-0.14955772459506989,
-0.10542191565036774,
-0.3613608777523041,
0.092912457883358,
0.22372595965862274,
0.0348394550383091,
0.14182829856872559,
-0.01735081523656845,
-0.17252187430858612,
0.0216432586312294,
0.02021894045174122,
-0.2706737816333771,
0.4571622908115387,
-0.025643091648817062,
-0.1910112053155899,
0.03240113705396652,
0.023685647174715996,
-0.11795275658369064,
-0.30310654640197754,
-0.024607084691524506,
-0.30035650730133057,
0.1305873543024063,
-0.21676026284694672,
0.18045105040073395,
-0.33900558948516846,
-0.12016043066978455,
0.004006579518318176,
0.2269221395254135,
0.1144157201051712,
-0.13000555336475372,
0.26406538486480713,
-0.007767513394355774,
-0.11307580769062042,
-0.08047797530889511,
-0.1571691632270813,
0.28683584928512573,
-0.2910618185997009,
-0.13243316113948822,
-0.07290878146886826,
-0.0038546081632375717,
0.29227107763290405,
0.1737479865550995,
-0.08038228750228882,
0.03852076455950737,
0.057106420397758484,
0.8963901400566101,
-0.033854417502880096,
-0.04747556895017624,
-0.5306514501571655,
0.2030210793018341,
-0.0835098922252655,
0.13096833229064941,
0.0783681571483612,
-0.10082671791315079,
0.2333674281835556,
-0.03870779275894165,
-0.12694832682609558,
0.13470493257045746,
0.5446134805679321,
-0.01599278301000595,
-0.5618400573730469,
-0.2940208315849304,
0.2203255593776703,
0.052336934953927994,
0.019799495115876198,
0.13366194069385529,
0.25314757227897644,
-0.021461302414536476,
0.08308394998311996,
-0.23071283102035522,
0.1561266928911209,
0.31365543603897095,
0.35938549041748047,
0.40662407875061035,
0.249467134475708,
-0.1262725591659546,
0.17092880606651306,
0.08558989316225052,
-0.7975937128067017,
0.4854721426963806,
-0.11004278063774109,
-0.2766064405441284,
0.031640056520700455,
-0.29769179224967957,
-0.13905027508735657,
-0.030880015343427658,
0.2581127882003784,
0.23489414155483246,
0.04653562232851982,
0.43428176641464233,
0.15887925028800964,
0.039086878299713135,
0.1868075430393219,
0.04124055057764053,
-0.40063410997390747,
0.14470338821411133,
-0.10059883445501328,
-0.27813321352005005,
-0.06287995725870132,
0.3709406852722168,
0.23605656623840332,
0.031216813251376152,
-0.07162895053625107,
0.289059579372406,
-0.3318713903427124,
0.11245465278625488,
-0.23242053389549255,
0.15949088335037231,
0.11414490640163422,
0.0137154720723629,
-0.017276166006922722,
0.6242748498916626,
0.2798287868499756,
-0.10081230103969574,
0.32389697432518005,
0.41589677333831787,
0.37767088413238525,
0.03623778373003006,
-0.00037403404712677,
-0.17020143568515778,
0.12612295150756836,
-0.3321751058101654,
0.045359060168266296,
-0.2139386534690857,
0.28070518374443054,
0.1363821178674698,
0.2800714671611786,
0.17330341041088104,
-0.21034513413906097,
0.28346309065818787,
0.3500041961669922,
-0.0286063514649868,
0.10284769535064697,
0.21678584814071655,
-0.24075984954833984,
-0.20149901509284973,
0.09187228977680206,
0.12664908170700073,
0.10897423326969147,
0.09980752319097519,
0.021567028015851974,
0.07222309708595276,
0.0722113773226738,
-0.38650813698768616,
0.1687372922897339,
0.2188989371061325,
-0.22398732602596283,
0.12964323163032532,
0.37180885672569275,
0.1892758309841156,
-0.44811585545539856,
-0.23088397085666656,
-0.11169837415218353,
0.08050238341093063,
0.02737109735608101,
0.2684744894504547,
-0.5430811047554016,
-0.6649031043052673,
0.03256712853908539,
0.06562972813844681,
-0.05010562762618065,
-0.23247113823890686,
0.2761964201927185,
0.14724767208099365,
-0.18757708370685577,
-0.20337675511837006,
0.2906617522239685,
0.3883591294288635,
-0.2766055762767792,
-0.08731702715158463,
-0.40018555521965027,
-0.4707959294319153,
-0.6657468676567078,
0.1560482680797577,
0.18208061158657074,
-0.024409951642155647,
-0.016522200778126717,
-0.17294256389141083,
0.06033553183078766,
-0.12725062668323517,
-0.2706119418144226,
0.06684792786836624,
-0.004266161471605301,
-0.0731109157204628,
0.07475098967552185,
-0.14440658688545227,
-0.4029605984687805,
-0.2654491066932678,
-0.027751989662647247,
-0.15479175746440887,
-0.23070171475410461,
0.28338736295700073,
-0.264617383480072,
-0.3121786117553711,
-0.34378719329833984,
-0.45222505927085876,
-0.1565515249967575,
-0.19839850068092346,
0.5167418718338013,
0.3702399730682373,
0.048146218061447144,
0.40644294023513794,
-0.3484724164009094,
0.1662021428346634,
-0.007828963920474052,
0.4200567603111267,
-0.29518502950668335,
-0.2476709485054016,
0.44947001338005066,
-0.09660809487104416,
-0.4395465552806854,
-0.00716303288936615,
0.09472066909074783,
0.1041143462061882,
-0.08382130414247513,
-0.43953007459640503,
0.23521478474140167,
-0.41477611660957336,
0.22148212790489197,
0.09197867661714554,
-0.0054008085280656815,
0.4141243100166321,
0.11761422455310822,
-0.18549969792366028,
-0.018492769449949265,
0.020053822547197342,
0.38923630118370056,
0.2683617174625397,
0.12201225757598877,
-0.12438903003931046,
-0.18524715304374695,
0.25295332074165344,
-0.00804843008518219,
-0.15440724790096283,
-0.08348482847213745,
0.5354866981506348,
-0.016632331535220146,
0.1233314722776413,
-0.2894327640533447,
0.08084976673126221,
0.03658219799399376,
-0.3634636700153351,
-0.018133440986275673,
0.6952676177024841,
-0.038720499724149704,
-0.42068591713905334,
-0.15251612663269043,
-0.36267000436782837,
-0.39470407366752625,
-0.5091344118118286,
-0.09472248703241348,
-0.08944600820541382,
-0.11035832017660141,
0.12200476229190826,
0.12271472066640854,
0.14849399030208588,
-0.37488195300102234,
-0.02941821701824665,
0.0291144996881485,
-0.05744258314371109,
0.10157205164432526,
-0.2822036147117615,
0.1459386795759201,
-0.5896181464195251,
0.21966177225112915,
-0.11757422983646393,
-0.056812360882759094,
-0.10424784570932388,
-0.013298891484737396,
0.25545793771743774,
-0.15498995780944824,
0.05969732254743576,
0.0823836475610733,
0.15718823671340942,
0.3531690239906311,
-0.4536795914173126,
0.04664357006549835,
-0.15976476669311523,
-0.32093727588653564,
0.014851212501525879,
0.22440020740032196,
0.19839346408843994,
-0.40084636211395264,
0.217360720038414,
-0.47082966566085815,
0.2582646906375885,
-0.1026698648929596,
0.3557087481021881,
-0.05272825434803963,
-0.1844116747379303,
-0.49087628722190857,
0.029621906578540802,
0.1442098468542099,
0.4182722270488739,
0.05075535923242569,
0.013121627271175385,
-0.007545003667473793,
0.07411190122365952,
0.2711832523345947,
0.32571306824684143,
0.41722530126571655,
-0.38028785586357117,
-0.050603196024894714,
0.016239652410149574,
0.2785225510597229,
-0.038680389523506165,
0.324065625667572,
0.1429879516363144,
-0.0012646764516830444,
-0.14501363039016724,
-0.2655172348022461,
-0.22257289290428162,
0.4299733638763428,
0.10318128019571304,
0.35102739930152893,
0.12966452538967133,
-0.02889217436313629,
0.027559276670217514,
0.2613201439380646,
-0.247695654630661,
-0.1647697240114212,
-0.11220400780439377,
-0.03712751716375351,
0.2096109390258789,
0.056874047964811325,
-0.08626353740692139,
-0.010132629424333572,
0.08337581157684326,
-0.4478071928024292,
0.5934382677078247,
0.14704526960849762,
1.3137547969818115,
0.25812286138534546,
0.37363383173942566,
0.12086740136146545,
0.06780398637056351,
0.1194818764925003,
-0.4052526354789734,
-0.013577191159129143,
-0.26068195700645447,
0.1679508239030838,
-0.08234437555074692,
0.235316663980484,
-0.10767542570829391,
0.20002219080924988,
-0.4066718816757202,
0.10322342813014984,
-0.15590828657150269,
0.2173665314912796,
0.10107272863388062,
-0.009281788021326065,
0.09067574143409729,
-0.13099001348018646,
0.230019211769104,
0.15247415006160736,
-0.005504895001649857,
0.15770477056503296,
-0.04764441028237343,
-0.36159181594848633,
-0.3194207549095154,
-0.0812910944223404,
-0.28026941418647766,
0.1858307123184204,
-0.14432121813297272,
0.11606872081756592,
0.3002597689628601,
-0.08022069931030273,
-0.2489444762468338,
0.28211525082588196,
0.31908708810806274,
0.24850095808506012,
-0.46528831124305725,
0.12210214138031006,
0.06499888002872467,
-0.13232702016830444,
0.30166134238243103,
-0.021849706768989563,
0.40992748737335205,
-0.2100420892238617,
-0.03125037997961044,
-0.0809151902794838,
-0.045329611748456955,
-0.25044119358062744,
-0.25051605701446533,
0.2192787379026413,
-0.1018666923046112,
-0.08660224825143814,
-0.12732690572738647,
0.1625172644853592,
-0.5676118731498718,
-0.2275833636522293,
0.1299806386232376,
-0.12297886610031128,
-0.2572294771671295,
0.03258144110441208,
0.04395103454589844,
-0.29699236154556274,
-0.21753375232219696,
0.49291813373565674,
0.12799493968486786,
0.1437835395336151,
0.26595818996429443,
0.015505913645029068,
-0.211887389421463,
-0.3199819028377533,
-0.06464900821447372,
0.30730319023132324,
-0.45133310556411743,
0.31425368785858154,
-0.052931543439626694,
-0.39125335216522217,
0.22024351358413696,
0.6401069164276123,
-0.06483613699674606,
0.23569589853286743,
-0.34329909086227417,
-0.33448755741119385,
-0.14284950494766235,
0.0723184272646904,
-0.07598835229873657,
0.12152031064033508,
0.3601950407028198,
0.3767554759979248,
-0.13182061910629272,
-0.10663102567195892,
-0.3545943796634674,
0.21682074666023254,
-0.42048144340515137,
0.2378803789615631,
-0.37477758526802063,
-0.2061503529548645,
-0.1499355286359787,
0.025923289358615875,
0.008120698854327202,
0.5068909525871277,
0.012905062176287174,
-0.2600455582141876,
-0.30139777064323425,
0.10992126166820526,
0.2588219940662384,
-0.02344493567943573,
-0.13581588864326477,
0.0719742402434349,
0.0002930387854576111,
-0.13046638667583466,
0.14539344608783722,
0.1555185616016388,
0.06073329597711563,
0.34662774205207825,
0.14903376996517181,
0.11226189881563187,
-0.41037553548812866,
-0.015256937593221664,
-0.1684703230857849,
-0.04852546751499176,
-0.2342359572649002,
0.12986308336257935,
-0.24546849727630615,
-0.0972142443060875,
-0.09063109010457993,
0.16643209755420685,
0.10938382148742676,
0.3238171637058258,
0.24059385061264038,
0.21468743681907654,
0.04954506829380989,
0.0479716956615448,
0.09192817658185959,
0.2279500812292099,
0.007284754421561956,
-0.4190811812877655,
0.4563714563846588,
0.22055096924304962,
-0.2072083204984665,
-0.36706405878067017,
0.026497021317481995,
-0.39922285079956055,
0.13423654437065125,
0.10303305834531784,
0.42568477988243103,
-0.3307788670063019,
0.044364187866449356,
0.07886288315057755,
0.25856930017471313,
-0.0978069007396698,
0.24585752189159393,
0.5149004459381104,
0.05799857899546623,
0.03070203959941864,
0.22236907482147217,
-0.07397867739200592,
-0.03049606829881668,
0.46792978048324585,
0.10135234892368317,
0.5709161162376404,
0.49259069561958313,
0.1582234501838684,
0.17541679739952087,
0.25029221177101135,
0.2761951982975006,
0.2544515132904053,
0.34637197852134705,
0.4401051700115204,
-0.027723021805286407,
0.08774587512016296,
-0.18204431235790253,
-0.18170659244060516,
-0.1663597971200943,
0.11847355961799622,
-0.4020210802555084,
-0.016203710809350014,
-0.20484833419322968,
-0.23119470477104187,
-0.19767677783966064,
0.014379680156707764,
-0.23635035753250122,
0.21800003945827484,
-0.10120244324207306,
-0.01926518976688385,
-0.10903866589069366,
-0.16489486396312714,
-0.05545319616794586,
-0.34570929408073425,
0.312629759311676,
-0.23681534826755524,
0.23677363991737366,
-0.02804902195930481,
-0.04912228137254715,
0.16895627975463867,
0.1625010073184967,
0.18554353713989258,
0.26873263716697693,
-0.16753512620925903,
-0.009834176860749722,
-0.16408458352088928,
-0.20723748207092285,
-0.007424531504511833,
0.43675848841667175,
0.1841111183166504,
-0.0729743093252182,
0.2002142369747162,
0.035290323197841644,
-0.16157305240631104,
0.27209606766700745,
-0.054075900465250015,
0.0946178287267685,
0.03943781182169914,
-0.045198701322078705,
0.12042012065649033,
-0.24972206354141235,
-0.1459224820137024,
-0.18335306644439697,
-0.25936776399612427,
0.03676694259047508,
0.02726755104959011,
-0.026410436257719994,
0.15671813488006592,
-0.18406127393245697,
0.09571901708841324,
0.09843899309635162,
0.5475634932518005,
0.30881237983703613,
-0.09218493849039078,
-0.0028420323505997658,
-0.08476543426513672,
-0.37624967098236084,
0.21236935257911682,
0.056920506060123444,
-0.32987040281295776,
-0.007231350988149643,
-0.01745002716779709,
0.03289075195789337,
0.09727069735527039,
-0.3886371850967407,
0.2236616313457489,
-0.18856142461299896,
-0.16681762039661407,
-0.35745686292648315,
0.28940415382385254,
0.17533791065216064,
-0.14922280609607697,
-0.03664540499448776,
-0.26438841223716736,
0.13961270451545715,
0.06477039307355881,
0.14359179139137268,
-0.0932575911283493,
-0.6359955668449402,
-0.1098388135433197,
0.33051934838294983,
0.18942472338676453,
0.388526052236557,
-0.02654808759689331,
-0.2530362606048584,
0.04737887531518936,
-0.06329183280467987,
-0.06746851652860641,
-0.0986114889383316,
-0.1176719143986702,
0.16150115430355072,
0.22373834252357483,
0.0077377017587423325,
0.40223872661590576,
0.005939246155321598,
0.3810948431491852,
0.19575783610343933,
0.3764247000217438,
-0.2912955582141876,
-0.06380942463874817,
-0.21826964616775513,
0.03476297855377197,
-0.06926575303077698,
0.5324453115463257,
0.06087346747517586,
-0.22264420986175537,
-0.27156490087509155,
-0.424226850271225,
0.5321038961410522,
-0.3395157754421234,
-0.2588922679424286,
-0.09949632734060287,
0.012507632374763489,
0.39027923345565796,
0.019565533846616745,
-0.4431242048740387,
-0.18753457069396973,
0.12186169624328613,
-0.07625798881053925,
-0.5258945226669312,
0.18291230499744415,
0.07516424357891083,
-0.13726063072681427,
-0.16072681546211243,
0.2755141854286194,
0.4468674957752228,
0.03164082020521164,
0.03599223122000694,
-0.25503647327423096
] |
https://github.com/huggingface/datasets/issues/486 | Bookcorpus data contains pretokenized text | The TreebankTokenizer makes some assumptions about whitespace, parentheses, quotation marks, etc. For instance, while tokenizing the following text:
```
Dwayne "The Rock" Johnson
```
will result in:
```
Dwayne `` The Rock '' Johnson
```
where the left and right quotation marks are turned into distinct symbols. Upon reconstruction, we can attach the left part to its token on the right, and respectively for the right part. However, the following texts would be tokenized exactly the same:
```
Dwayne " The Rock " Johnson
Dwayne " The Rock" Johnson
Dwayne " The Rock" Johnson
...
```
In the above examples, the detokenizer would correct these inputs into the canonical text
```
Dwayne "The Rock" Johnson
```
However, there are cases where there the solution cannot easily be inferred (at least without a true LM - this tokenizer is just a bunch of regexes). For instance, in cases where you have a fragment that contains the end of quote, but not its beginning, plus an accidental space:
```
... and it sounds fantastic, " he said.
```
In the above case, the tokenizer would assume that the quotes refer to the next token, and so upon detokenization it will result in the following mistake:
```
... and it sounds fantastic, "he said.
```
While these are all odd edge cases (the basic assumptions do make sense), in noisy data they can occur, which is why I mentioned that the detokenizer cannot restore the original perfectly.
| It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 | 244 | Bookcorpus data contains pretokenized text
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
The TreebankTokenizer makes some assumptions about whitespace, parentheses, quotation marks, etc. For instance, while tokenizing the following text:
```
Dwayne "The Rock" Johnson
```
will result in:
```
Dwayne `` The Rock '' Johnson
```
where the left and right quotation marks are turned into distinct symbols. Upon reconstruction, we can attach the left part to its token on the right, and respectively for the right part. However, the following texts would be tokenized exactly the same:
```
Dwayne " The Rock " Johnson
Dwayne " The Rock" Johnson
Dwayne " The Rock" Johnson
...
```
In the above examples, the detokenizer would correct these inputs into the canonical text
```
Dwayne "The Rock" Johnson
```
However, there are cases where there the solution cannot easily be inferred (at least without a true LM - this tokenizer is just a bunch of regexes). For instance, in cases where you have a fragment that contains the end of quote, but not its beginning, plus an accidental space:
```
... and it sounds fantastic, " he said.
```
In the above case, the tokenizer would assume that the quotes refer to the next token, and so upon detokenization it will result in the following mistake:
```
... and it sounds fantastic, "he said.
```
While these are all odd edge cases (the basic assumptions do make sense), in noisy data they can occur, which is why I mentioned that the detokenizer cannot restore the original perfectly.
| [
-0.013097185641527176,
0.20901453495025635,
-0.0026562586426734924,
0.31737446784973145,
-0.19569310545921326,
-0.29962366819381714,
-0.017301399260759354,
0.2006196528673172,
-0.4918517768383026,
0.08162175118923187,
-0.1720975786447525,
0.28427374362945557,
0.16366802155971527,
-0.23494043946266174,
-0.10716651380062103,
0.21117077767848969,
0.17927318811416626,
0.28239503502845764,
0.22024795413017273,
-0.1536702960729599,
-0.18232759833335876,
0.29157477617263794,
0.19049598276615143,
-0.003516659140586853,
-0.2633257210254669,
-0.26437869668006897,
-0.1785982996225357,
0.3562456965446472,
-0.1762152463197708,
-0.3386280834674835,
-0.1300116926431656,
0.2864886522293091,
-0.05676264688372612,
0.3584989905357361,
-0.00010621249384712428,
-0.2521668076515198,
-0.02375534176826477,
-0.08653678745031357,
-0.33630895614624023,
-0.07994607090950012,
0.26735198497772217,
-0.06494101136922836,
0.27852994203567505,
-0.37795212864875793,
-0.3191956579685211,
0.09469137340784073,
-0.15851081907749176,
0.020760856568813324,
0.2960726022720337,
0.23387321829795837,
0.21920937299728394,
0.18642182648181915,
-0.1193731427192688,
0.2506963610649109,
0.32353779673576355,
-0.10173442959785461,
-0.17021265625953674,
0.04355436563491821,
0.37039878964424133,
0.326097697019577,
-0.16622352600097656,
0.3166055679321289,
-0.15163977444171906,
0.028845317661762238,
0.06206679716706276,
-0.11975420266389847,
0.05882967263460159,
-0.1836252510547638,
0.18406662344932556,
0.23144826292991638,
0.25773611664772034,
-0.1910746991634369,
-0.1388310045003891,
-0.2062944769859314,
-0.0055130282416939735,
-0.08669976145029068,
0.2901032567024231,
0.16266568005084991,
0.10064350068569183,
0.11696229875087738,
-0.20360122621059418,
-0.12542758882045746,
0.1330467313528061,
0.2178182452917099,
-0.09394335746765137,
0.3291180431842804,
-0.09379913657903671,
-0.03155280649662018,
-0.06384782493114471,
-0.0639030933380127,
-0.27522334456443787,
0.07713302969932556,
-0.34663933515548706,
-0.04714252054691315,
-0.07168257236480713,
-0.22701473534107208,
0.009933706372976303,
0.3180495798587799,
-0.05233393609523773,
0.2914677858352661,
0.16566243767738342,
0.20682024955749512,
-0.11036944389343262,
0.0022941529750823975,
0.14288589358329773,
0.15206404030323029,
0.09510237723588943,
0.21862557530403137,
0.1616237759590149,
0.054711464792490005,
-0.27441656589508057,
-0.04498961567878723,
0.02620680257678032,
0.040951699018478394,
0.06731241941452026,
0.11758146435022354,
-0.09452173113822937,
-0.40920761227607727,
0.11048191040754318,
0.1627935767173767,
-0.17555806040763855,
0.351349413394928,
0.03049754723906517,
0.1711643934249878,
-0.12820827960968018,
0.10949990898370743,
0.23338814079761505,
0.01608736626803875,
-0.1464368999004364,
-0.1457030028104782,
-0.19493265450000763,
-0.02824382111430168,
-0.3139038383960724,
0.17498500645160675,
0.21655599772930145,
-0.024981625378131866,
0.17679883539676666,
0.015994664281606674,
-0.09004566073417664,
-0.07799182087182999,
-0.09373188763856888,
-0.139044851064682,
0.22568857669830322,
-0.09043742716312408,
0.00730191171169281,
0.2255372554063797,
-0.06704279780387878,
-0.010952051728963852,
-0.27288323640823364,
0.004835937172174454,
-0.3288038969039917,
0.10009600222110748,
-0.24060408771038055,
0.24921748042106628,
-0.3356083035469055,
-0.1833827793598175,
-0.13363376259803772,
0.09677925705909729,
0.2495669424533844,
-0.20578831434249878,
0.24614188075065613,
0.09526336938142776,
-0.08451484143733978,
0.03977597877383232,
-0.17006376385688782,
0.16735678911209106,
-0.17649933695793152,
-0.1662341058254242,
-0.02444368414580822,
0.2212653011083603,
0.2749221622943878,
0.10895416140556335,
-0.14209194481372833,
-0.00860411673784256,
0.08135175704956055,
0.7183501720428467,
-0.017418034374713898,
-0.04568084701895714,
-0.5037994980812073,
0.24383701384067535,
-0.050325658172369,
0.07348207384347916,
-0.04983954876661301,
-0.14787769317626953,
0.27219679951667786,
-0.025697089731693268,
-0.12849846482276917,
0.16946597397327423,
0.5301480293273926,
0.17673075199127197,
-0.5494853854179382,
-0.20974203944206238,
0.16372159123420715,
0.061738405376672745,
-0.18361859023571014,
-0.027241230010986328,
0.21192046999931335,
0.185792475938797,
0.04998122155666351,
-0.2376081943511963,
0.25875571370124817,
0.3918692469596863,
0.3059104084968567,
0.3005812466144562,
0.21359755098819733,
-0.11329677700996399,
0.1385641247034073,
-0.008467450737953186,
-0.5750658512115479,
0.5548723340034485,
-0.1922534555196762,
-0.3250688314437866,
0.025588326156139374,
-0.3308907747268677,
-0.10807746648788452,
-0.02028975635766983,
0.2663988769054413,
0.27014175057411194,
-0.02657499723136425,
0.22969497740268707,
0.10981859266757965,
-0.08872894942760468,
0.01388641633093357,
0.14455097913742065,
-0.2879343628883362,
0.00967041589319706,
-0.11620833724737167,
-0.2436329424381256,
-0.09139476716518402,
0.38830333948135376,
0.3055764138698578,
0.009523539803922176,
-0.12163008004426956,
0.5886526703834534,
-0.2743596136569977,
0.21163304150104523,
-0.34220126271247864,
0.19673608243465424,
0.22662869095802307,
0.09102834761142731,
0.10459057986736298,
0.6204180121421814,
0.313461035490036,
-0.06195187568664551,
0.12418317794799805,
0.4847058057785034,
0.538114070892334,
-0.03480175882577896,
0.1357635259628296,
-0.20976442098617554,
0.14076471328735352,
-0.277854859828949,
0.034924596548080444,
-0.16075123846530914,
0.18708766996860504,
0.22228838503360748,
0.22580362856388092,
0.25113755464553833,
-0.17977431416511536,
0.32166609168052673,
0.3824760615825653,
-0.1144578754901886,
0.12480160593986511,
0.1802482008934021,
-0.3248033821582794,
-0.3172590136528015,
0.061576373875141144,
0.07339192926883698,
0.02570546418428421,
0.13177230954170227,
0.07685241848230362,
0.04498109221458435,
0.10447689145803452,
-0.3250134587287903,
0.21663370728492737,
0.0959455817937851,
-0.32248654961586,
0.1516515016555786,
0.341475248336792,
0.17398495972156525,
-0.42226189374923706,
-0.08841514587402344,
-0.03666090965270996,
0.09306318312883377,
-0.14474716782569885,
0.26822805404663086,
-0.4251956641674042,
-0.6615484952926636,
-0.08930768817663193,
-0.06047442927956581,
-0.10131634771823883,
-0.24744689464569092,
0.3624100685119629,
0.21175247430801392,
-0.152985617518425,
-0.013780847191810608,
0.2746279835700989,
0.34623271226882935,
-0.30520784854888916,
-0.14057326316833496,
-0.1333601176738739,
-0.3698669970035553,
-0.6063697934150696,
0.17224666476249695,
0.0836453065276146,
0.0029904223047196865,
-0.10886099934577942,
-0.20524458587169647,
0.030443191528320312,
-0.3144643008708954,
-0.28173673152923584,
0.1259748786687851,
-0.1332968771457672,
-0.06187617778778076,
0.09892737865447998,
-0.20750080049037933,
-0.2802497148513794,
-0.3656509220600128,
-0.09157588332891464,
-0.1999155730009079,
-0.22075924277305603,
0.21582256257534027,
-0.2644091248512268,
-0.3948630690574646,
-0.3731861412525177,
-0.4336090385913849,
0.007393732666969299,
-0.1918855756521225,
0.3253256678581238,
0.3003256916999817,
0.015802979469299316,
0.3178786039352417,
-0.36542952060699463,
0.05701151862740517,
0.2947157621383667,
0.46804389357566833,
-0.2738645076751709,
-0.36970099806785583,
0.3797505497932434,
-0.08700770139694214,
-0.37375539541244507,
0.04513104632496834,
0.10641801357269287,
0.10119195282459259,
0.006233330816030502,
-0.3513375520706177,
0.2975461184978485,
-0.2787441313266754,
0.11822310090065002,
0.1003810316324234,
0.08571119606494904,
0.30267447233200073,
0.15896260738372803,
-0.2422175258398056,
-0.06510437279939651,
0.0182352177798748,
0.2500402629375458,
0.302548348903656,
0.33338144421577454,
-0.215423583984375,
-0.12982624769210815,
0.09651865065097809,
0.07749675214290619,
-0.17456617951393127,
-0.22445471584796906,
0.46462684869766235,
-0.05608080327510834,
0.15198184549808502,
-0.18688514828681946,
0.08254634588956833,
0.12569676339626312,
-0.2974066436290741,
-0.039785996079444885,
0.7535392642021179,
0.018461544066667557,
-0.44351693987846375,
-0.08140622079372406,
-0.3071739375591278,
-0.5265578031539917,
-0.46496522426605225,
-0.11818636953830719,
-0.0913817286491394,
-0.036273293197155,
0.08996599912643433,
0.034815847873687744,
0.18962056934833527,
-0.4391708970069885,
-0.011933703906834126,
0.14535090327262878,
-0.021862149238586426,
0.0675535649061203,
-0.24522164463996887,
0.2796765863895416,
-0.3746810555458069,
0.28672701120376587,
-0.018887711688876152,
-0.039088279008865356,
0.07341200113296509,
-0.06934370845556259,
0.16417431831359863,
-0.2702219784259796,
-0.04705411195755005,
0.1129208356142044,
0.12111876159906387,
0.18407860398292542,
-0.27329835295677185,
0.01200602762401104,
-0.045997023582458496,
-0.2533961832523346,
0.044019222259521484,
0.2973749339580536,
0.2621648907661438,
-0.4981846809387207,
0.07837364822626114,
-0.38451752066612244,
0.18324092030525208,
-0.077935129404068,
0.25104251503944397,
-0.0613875687122345,
-0.1280374825000763,
-0.4437139928340912,
0.05303068086504936,
0.13996298611164093,
0.4243899881839752,
0.05375419557094574,
-0.0306483693420887,
0.03387095034122467,
0.05210337042808533,
0.3206895589828491,
0.27674946188926697,
0.41864562034606934,
-0.3349754214286804,
-0.009322673082351685,
-0.10588835179805756,
0.31032535433769226,
0.13694699108600616,
0.32335442304611206,
0.04450834542512894,
0.056616850197315216,
-0.13232100009918213,
-0.23818370699882507,
-0.17039677500724792,
0.42610490322113037,
0.042484842240810394,
0.3148786425590515,
0.03645620122551918,
-0.04543595016002655,
0.061716001480817795,
0.13129614293575287,
-0.22177095711231232,
-0.002702169120311737,
-0.03127580136060715,
-0.1476115733385086,
0.14630311727523804,
0.10319387912750244,
-0.07466268539428711,
-0.0035032667219638824,
0.2231925129890442,
-0.4792093336582184,
0.5465052127838135,
0.024595685303211212,
1.2696267366409302,
0.3159293532371521,
0.32677704095840454,
0.04821597784757614,
0.12333427369594574,
0.20430898666381836,
-0.5028336644172668,
0.04503725469112396,
-0.2049012929201126,
0.20786002278327942,
-0.06927450001239777,
0.3685300052165985,
-0.1507876217365265,
0.23972831666469574,
-0.3311702013015747,
0.2369764745235443,
-0.20884159207344055,
0.07606684416532516,
-0.027517369017004967,
0.07539132982492447,
0.08343897014856339,
-0.3084035813808441,
0.03700229525566101,
0.2059899866580963,
-0.1129738986492157,
0.04705074429512024,
0.0031083375215530396,
-0.19536486268043518,
-0.2502886950969696,
-0.11697045713663101,
-0.28164637088775635,
0.21711498498916626,
-0.19921909272670746,
-0.02287418022751808,
0.24142467975616455,
-0.023762978613376617,
-0.17170536518096924,
0.12554258108139038,
0.22192338109016418,
0.3128902018070221,
-0.2807666063308716,
0.18463711440563202,
0.18541908264160156,
-0.04295908659696579,
0.2363811582326889,
0.08080841600894928,
0.4306319057941437,
-0.13590076565742493,
0.0029215142130851746,
-0.1516209840774536,
-0.020754653960466385,
-0.27044111490249634,
-0.022874072194099426,
-0.033770278096199036,
-0.0581846758723259,
-0.24069656431674957,
-0.08339178562164307,
0.28146249055862427,
-0.45523974299430847,
-0.27890264987945557,
0.17900048196315765,
-0.24040435254573822,
-0.22462257742881775,
-0.12543383240699768,
0.034924838691949844,
-0.3544527590274811,
-0.23541699349880219,
0.4743593633174896,
0.06592035293579102,
-0.030272211879491806,
0.2621460258960724,
-0.048276301473379135,
-0.2409835159778595,
-0.3099689483642578,
-0.1786750853061676,
0.300883412361145,
-0.3326336741447449,
0.18766869604587555,
-0.09161768853664398,
-0.38635188341140747,
0.34507882595062256,
0.7153207063674927,
0.018365345895290375,
0.3967466950416565,
-0.18480965495109558,
-0.32671135663986206,
-0.030163437128067017,
0.05706985667347908,
-0.03810553625226021,
0.1439882218837738,
0.2901443839073181,
0.3565283417701721,
-0.12296939641237259,
-0.1283668875694275,
-0.4049934148788452,
0.21452315151691437,
-0.3362371027469635,
0.2910213768482208,
-0.2069052755832672,
-0.1521967351436615,
-0.08055379241704941,
-0.022008109837770462,
0.08235739916563034,
0.4147500991821289,
-0.020556747913360596,
-0.2648276686668396,
-0.359421968460083,
0.08656450361013412,
0.26947858929634094,
-0.035266607999801636,
-0.233340784907341,
0.03583156317472458,
0.03735794872045517,
-0.21322797238826752,
0.09540426731109619,
0.017413415014743805,
0.08472251147031784,
0.30563002824783325,
0.14442569017410278,
0.16715003550052643,
-0.3926967978477478,
-0.046291954815387726,
-0.038390472531318665,
0.0012808740139007568,
-0.3028194308280945,
0.1512008160352707,
-0.20689409971237183,
-0.07108646631240845,
-0.0749293640255928,
0.19250410795211792,
0.21824495494365692,
0.40098118782043457,
0.27190715074539185,
0.21863502264022827,
0.016398917883634567,
0.08902107179164886,
0.29618072509765625,
0.291831910610199,
-0.026205506175756454,
-0.4860495328903198,
0.3494085371494293,
0.2846328616142273,
-0.15903720259666443,
-0.26437029242515564,
-0.08357034623622894,
-0.4274366796016693,
0.11943140625953674,
0.18452145159244537,
0.4698522388935089,
-0.25578945875167847,
0.09345102310180664,
0.026117663830518723,
0.40787461400032043,
-0.1422620713710785,
0.12019722163677216,
0.3639899790287018,
-0.035120442509651184,
0.0599592924118042,
0.26859715580940247,
0.038733284920454025,
-0.053502000868320465,
0.407972514629364,
0.0812920406460762,
0.4704858362674713,
0.5988804697990417,
0.2576119005680084,
0.0574813112616539,
0.27494046092033386,
0.3712730407714844,
0.09210392832756042,
0.2998259961605072,
0.34607601165771484,
-0.013370409607887268,
0.17802652716636658,
-0.22484718263149261,
-0.233568012714386,
-0.08088792115449905,
0.24836555123329163,
-0.3571588099002838,
-0.11919716000556946,
-0.21300676465034485,
-0.2445841133594513,
-0.2593751549720764,
-0.08405385911464691,
-0.2889247238636017,
0.06194641813635826,
-0.0790875107049942,
-0.027467742562294006,
-0.029448144137859344,
-0.28328150510787964,
-0.13346216082572937,
-0.2766896188259125,
0.36929938197135925,
-0.29434216022491455,
0.3083447813987732,
0.0762210264801979,
-0.0538068562746048,
0.17178212106227875,
0.09945975989103317,
0.18223361670970917,
0.215762197971344,
-0.20811022818088531,
0.030352260917425156,
-0.12221655249595642,
-0.13164761662483215,
0.034915704280138016,
0.3396194577217102,
0.10136224329471588,
-0.09373216331005096,
0.11281070113182068,
0.11676374077796936,
-0.23265011608600616,
0.20236675441265106,
-0.06299367547035217,
0.1703377068042755,
0.03023919090628624,
-0.010763928294181824,
0.04606775939464569,
-0.19495093822479248,
-0.26884782314300537,
-0.1722625494003296,
-0.2579215168952942,
-0.028886578977108,
0.14892417192459106,
-0.10030966252088547,
0.17578908801078796,
-0.223544180393219,
0.1416843682527542,
0.21622398495674133,
0.5997518301010132,
0.264531672000885,
-0.10043071955442429,
-0.04018453136086464,
-0.12882466614246368,
-0.40380245447158813,
0.2358361780643463,
0.21916483342647552,
-0.37146955728530884,
-0.09892266243696213,
-0.024552468210458755,
0.08472107350826263,
0.12782254815101624,
-0.4963518977165222,
0.3194301426410675,
-0.22768862545490265,
-0.1976344883441925,
-0.34773826599121094,
0.30868542194366455,
0.13430732488632202,
-0.17258667945861816,
0.03009827435016632,
-0.1894378364086151,
0.017439451068639755,
0.07812538743019104,
0.15500056743621826,
-0.0839313194155693,
-0.6021872758865356,
-0.034367144107818604,
0.19931992888450623,
0.12807944416999817,
0.2976602613925934,
0.05578095465898514,
-0.3549659252166748,
0.025613000616431236,
0.002307560294866562,
-0.14798854291439056,
-0.263609915971756,
-0.05026776343584061,
0.09625452011823654,
0.21915961802005768,
0.17507685720920563,
0.4257461726665497,
-0.11789363622665405,
0.26416704058647156,
0.2795373797416687,
0.07786251604557037,
-0.30490612983703613,
-0.005479041486978531,
-0.25720036029815674,
-0.013413738459348679,
-0.008337154984474182,
0.6562628149986267,
0.02884698659181595,
-0.03798781335353851,
-0.2665492296218872,
-0.4903169572353363,
0.4548587203025818,
-0.2702223062515259,
-0.16782881319522858,
-0.011059192940592766,
0.14265696704387665,
0.42601922154426575,
-0.02366960607469082,
-0.5835840702056885,
-0.10321104526519775,
0.13858409225940704,
-0.0550478994846344,
-0.5959926843643188,
0.1988401710987091,
-0.0829136073589325,
-0.159206822514534,
-0.12376868724822998,
0.3169109523296356,
0.40447041392326355,
-0.02475009113550186,
0.022683080285787582,
-0.23337146639823914
] |
https://github.com/huggingface/datasets/issues/486 | Bookcorpus data contains pretokenized text | To confirm, since this is preprocessed, this was not the exact version of the Book Corpus used to actually train the models described here (particularly Distilbert)? https://huggingface.co/datasets/bookcorpus
Or does this preprocessing exactly match that of the papers? | It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 | 37 | Bookcorpus data contains pretokenized text
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
To confirm, since this is preprocessed, this was not the exact version of the Book Corpus used to actually train the models described here (particularly Distilbert)? https://huggingface.co/datasets/bookcorpus
Or does this preprocessing exactly match that of the papers? | [
0.029665905982255936,
0.19844114780426025,
-0.019381705671548843,
0.3028748631477356,
-0.08007927983999252,
-0.22160989046096802,
0.1067400872707367,
0.15238459408283234,
-0.36693257093429565,
-0.007889822125434875,
-0.21422497928142548,
0.3167911469936371,
0.2326785922050476,
-0.11113735288381577,
0.019202392548322678,
0.06973981112241745,
0.2531399726867676,
0.21380820870399475,
0.03492644056677818,
-0.21718937158584595,
-0.14447396993637085,
0.23662474751472473,
0.05639323592185974,
0.11521312594413757,
-0.07269067317247391,
-0.3140859007835388,
-0.22799307107925415,
0.36093246936798096,
-0.2332175225019455,
-0.31834375858306885,
0.13858464360237122,
0.3533366918563843,
0.04915771633386612,
0.4791383743286133,
-0.00010636321530910209,
-0.07331885397434235,
-0.11080978810787201,
-0.021615123376250267,
-0.12692007422447205,
0.12788812816143036,
0.2702469825744629,
0.01590186357498169,
0.3585570156574249,
-0.47761672735214233,
-0.3692619204521179,
0.17812731862068176,
-0.22407008707523346,
0.1918199062347412,
0.22112669050693512,
0.31045225262641907,
0.24629221856594086,
0.09184350073337555,
0.022230621427297592,
0.26748040318489075,
0.1596524715423584,
-0.1338949054479599,
-0.22985108196735382,
0.08771127462387085,
0.5446920394897461,
0.216347336769104,
-0.1553094983100891,
0.3055979311466217,
-0.10811559855937958,
-0.044440124183893204,
0.025358546525239944,
-0.00491276104003191,
0.18997740745544434,
-0.32259202003479004,
0.14900749921798706,
0.26976415514945984,
0.27771875262260437,
-0.11947331577539444,
-0.1294754147529602,
-0.06019680202007294,
-0.09229611605405807,
0.12777893245220184,
0.24243760108947754,
0.08906494081020355,
0.04415109381079674,
0.20800013840198517,
-0.17432348430156708,
-0.14358071982860565,
-0.004782088100910187,
0.09869203716516495,
-0.1490664780139923,
0.39151301980018616,
-0.07016776502132416,
-0.06386645883321762,
-0.05090675130486488,
-0.06333082169294357,
-0.31806355714797974,
-0.03805359825491905,
-0.21570515632629395,
-0.035123374313116074,
-0.007307525724172592,
-0.21917609870433807,
-0.0236474871635437,
0.40033823251724243,
-0.10094993561506271,
0.21174000203609467,
0.15763583779335022,
0.11874213069677353,
-0.07703093439340591,
-0.17939218878746033,
0.13427796959877014,
0.24845387041568756,
0.10517668724060059,
0.25070300698280334,
0.03628537058830261,
0.3239164352416992,
-0.25629252195358276,
0.04121427237987518,
-0.13057075440883636,
-0.04805028438568115,
-0.10396052896976471,
-0.08611016720533371,
-0.09727165102958679,
-0.49108996987342834,
0.07034389674663544,
0.2772710621356964,
0.033331044018268585,
0.3170376420021057,
0.058380041271448135,
0.08656947314739227,
-0.20929402112960815,
0.037213925272226334,
0.23226450383663177,
0.018361929804086685,
-0.191355898976326,
-0.2068762332201004,
-0.22370119392871857,
0.007776118814945221,
-0.394884318113327,
0.006247015669941902,
0.11774785816669464,
-0.0474412776529789,
0.2660805583000183,
-0.03839126601815224,
-0.2094125896692276,
-0.10352011024951935,
-0.029000042006373405,
-0.1996835172176361,
0.26684990525245667,
0.019141193479299545,
-0.13669729232788086,
0.22831854224205017,
0.04931821674108505,
-0.14780908823013306,
-0.15075081586837769,
0.024690881371498108,
-0.3962160348892212,
0.03232024982571602,
-0.14932094514369965,
0.2326129674911499,
-0.26019513607025146,
-0.24919793009757996,
-0.03446153551340103,
0.2813068926334381,
0.407336950302124,
-0.15097054839134216,
0.3375006914138794,
-0.02439209818840027,
-0.13852167129516602,
0.0281357541680336,
0.020993104204535484,
0.4135785698890686,
-0.2282400131225586,
-0.14589419960975647,
-0.04866669327020645,
0.07284413278102875,
0.37529054284095764,
0.08832019567489624,
-0.2509768009185791,
0.06175421550869942,
0.26966723799705505,
0.6624369025230408,
0.18661187589168549,
-0.07795059680938721,
-0.4325423538684845,
0.21362259984016418,
-0.013836145401000977,
0.21174491941928864,
-0.19044411182403564,
-0.17001815140247345,
0.18013055622577667,
-0.05644379183650017,
-0.00007306039333343506,
0.03597106784582138,
0.4290820062160492,
0.17071694135665894,
-0.6041298508644104,
-0.30960386991500854,
0.3253694176673889,
0.251369446516037,
-0.12554897367954254,
-0.018941201269626617,
0.018453076481819153,
0.06256793439388275,
0.15163782238960266,
-0.16763748228549957,
0.157003253698349,
0.4770161509513855,
0.18046444654464722,
0.30321937799453735,
0.25850364565849304,
-0.005415556952357292,
0.23849457502365112,
-0.0026988647878170013,
-0.46340954303741455,
0.662825345993042,
0.03358187526464462,
-0.2584095001220703,
-0.06434257328510284,
-0.2789318561553955,
-0.17237046360969543,
-0.2421186864376068,
0.2739937901496887,
0.05564195662736893,
0.0018350891768932343,
0.28350839018821716,
0.038265351206064224,
-0.12103965133428574,
-0.2297671139240265,
0.14046667516231537,
-0.5065467357635498,
-0.06989751011133194,
-0.2286456972360611,
-0.03948044776916504,
-0.25638940930366516,
0.3594436049461365,
0.17865511775016785,
0.06261029839515686,
-0.1487026810646057,
0.4577593207359314,
-0.3280341625213623,
0.0037432387471199036,
-0.03261878341436386,
0.2570514678955078,
0.1916283220052719,
-0.08377732336521149,
0.08403398096561432,
0.46359556913375854,
0.26971080899238586,
-0.03925351798534393,
0.20762914419174194,
0.3762255311012268,
0.4181045889854431,
0.03583003580570221,
0.05664767324924469,
-0.11616375297307968,
0.044798336923122406,
-0.21192002296447754,
0.011556066572666168,
-0.137719988822937,
0.2113894373178482,
0.12417875230312347,
0.14860562980175018,
0.24208436906337738,
-0.23174838721752167,
0.38156601786613464,
0.2590775489807129,
-0.10923036932945251,
0.07980889081954956,
0.1837257444858551,
-0.3506711721420288,
-0.3496268689632416,
-0.015466103330254555,
0.18069787323474884,
0.10218258202075958,
0.07545153796672821,
0.007574908435344696,
0.07660305500030518,
-0.045308973640203476,
-0.3259962797164917,
0.28548693656921387,
0.1510799080133438,
-0.2582576870918274,
0.04378361254930496,
0.2345246970653534,
0.20174962282180786,
-0.43860113620758057,
-0.13850006461143494,
-0.04663028568029404,
0.18678739666938782,
-0.14898405969142914,
0.359169602394104,
-0.28625914454460144,
-0.4356800317764282,
-0.15124152600765228,
0.04865244776010513,
-0.009304426610469818,
-0.1176726371049881,
0.2985784411430359,
0.12137433886528015,
-0.09930984675884247,
0.05667085200548172,
0.149134561419487,
0.5113175511360168,
-0.23631273210048676,
-0.06505689769983292,
-0.1264054924249649,
-0.27297985553741455,
-0.7907335758209229,
0.18102768063545227,
0.10054653882980347,
-0.011797151528298855,
-0.1401488184928894,
-0.37211427092552185,
-0.147333562374115,
-0.12024355679750443,
-0.4255812466144562,
0.028755227103829384,
-0.14453274011611938,
0.05029332637786865,
0.15868182480335236,
-0.18263624608516693,
-0.25838690996170044,
-0.1930643916130066,
-0.024110745638608932,
-0.11139509826898575,
-0.18106240034103394,
0.10344599932432175,
-0.25220170617103577,
-0.4218704402446747,
-0.33651214838027954,
-0.5817198753356934,
-0.08938857167959213,
0.02374478429555893,
0.2863696217536926,
0.23275144398212433,
0.007716529071331024,
0.42354094982147217,
-0.19168272614479065,
-0.014036404900252819,
0.1494736522436142,
0.45245492458343506,
-0.275359183549881,
-0.292675256729126,
0.3957180678844452,
-0.03828122466802597,
-0.4434625208377838,
-0.1504344493150711,
0.07478577643632889,
0.08418973535299301,
-0.04166271165013313,
-0.33172690868377686,
0.11134988069534302,
-0.3541254699230194,
-0.08930015563964844,
0.03955279290676117,
0.08160852640867233,
0.28674522042274475,
0.031178755685687065,
-0.21259477734565735,
-0.11795422434806824,
-0.014080973342061043,
0.5295311808586121,
0.2311035692691803,
0.2775561511516571,
-0.31332793831825256,
-0.06071197986602783,
-0.08154276013374329,
0.0009640753269195557,
-0.021123941987752914,
-0.2409222275018692,
0.3181600868701935,
0.00158005952835083,
0.06365916877985,
-0.16066980361938477,
-0.03240607678890228,
0.08746150135993958,
-0.23429182171821594,
-0.14278237521648407,
0.671406626701355,
-0.006317541003227234,
-0.330232173204422,
-0.12654858827590942,
-0.29987749457359314,
-0.40625134110450745,
-0.34366104006767273,
-0.14503179490566254,
-0.08187468349933624,
0.05424913763999939,
0.1594569981098175,
0.05657842010259628,
0.12851738929748535,
-0.3857199549674988,
0.02795068919658661,
0.291181743144989,
-0.2177027463912964,
0.08442021906375885,
-0.055704809725284576,
0.22400130331516266,
-0.5900643467903137,
0.11022082716226578,
-0.11788450181484222,
-0.006159287877380848,
-0.007446121424436569,
-0.019210906699299812,
0.22190819680690765,
-0.25537028908729553,
0.11083773523569107,
-0.0913911685347557,
0.019613588228821754,
0.184254989027977,
-0.4195018410682678,
0.042929887771606445,
-0.17065033316612244,
-0.3483814597129822,
-0.016740698367357254,
0.2624337077140808,
0.21932411193847656,
-0.3960915505886078,
0.02590271644294262,
-0.20928232371807098,
-0.017423879355192184,
-0.1271578073501587,
0.34165793657302856,
-0.037645213305950165,
-0.30004456639289856,
-0.27756065130233765,
0.11998790502548218,
0.06438909471035004,
0.36767494678497314,
-0.10241477936506271,
-0.0005582384765148163,
0.09761834144592285,
0.4271939694881439,
0.2771628797054291,
0.32572227716445923,
0.3162810504436493,
-0.3522464632987976,
0.03342689946293831,
-0.14227452874183655,
0.2826836407184601,
0.2115713506937027,
0.39430564641952515,
-0.02313532680273056,
0.06529682874679565,
-0.05995451658964157,
-0.2926259934902191,
-0.3611947000026703,
0.3583040237426758,
-0.0038998613599687815,
0.357603520154953,
0.24196431040763855,
-0.035714827477931976,
0.021148715168237686,
0.1509302407503128,
0.09776762872934341,
0.04076572507619858,
-0.1922474354505539,
-0.23943622410297394,
0.23128807544708252,
0.09022654592990875,
-0.10458052903413773,
-0.017159290611743927,
0.20922669768333435,
-0.5008423328399658,
0.5596807599067688,
0.18024708330631256,
1.1709786653518677,
0.1551646739244461,
0.4108213186264038,
0.20560622215270996,
0.11320967972278595,
0.19776709377765656,
-0.506872296333313,
-0.07355297356843948,
-0.3077663481235504,
0.17281323671340942,
-0.0555337518453598,
0.4235355257987976,
-0.020059339702129364,
0.24934223294258118,
-0.26798921823501587,
0.19926150143146515,
-0.2963905334472656,
0.23665940761566162,
0.06456203758716583,
-0.13353994488716125,
0.24054495990276337,
-0.09450958669185638,
0.036356229335069656,
0.20815664529800415,
0.03978146240115166,
0.12890149652957916,
0.0057343654334545135,
-0.24613021314144135,
-0.28904417157173157,
-0.053196243941783905,
-0.23104865849018097,
0.24546581506729126,
-0.03318066522479057,
0.04940363019704819,
0.207969531416893,
-0.11068982630968094,
0.15751072764396667,
0.13824118673801422,
0.47180694341659546,
0.1743500977754593,
-0.39554065465927124,
0.24779099225997925,
0.17857131361961365,
-0.10375302284955978,
0.29845714569091797,
0.05121367797255516,
0.5131378769874573,
-0.09220147132873535,
-0.020327962934970856,
-0.22240513563156128,
-0.10070661455392838,
-0.1466461420059204,
-0.09926199167966843,
-0.02498895674943924,
0.13555121421813965,
-0.4075540602207184,
-0.008080175146460533,
0.3327297270298004,
-0.3182326853275299,
-0.3199116587638855,
0.1742996722459793,
-0.21922318637371063,
-0.19992847740650177,
0.08487413823604584,
0.13210931420326233,
-0.27959924936294556,
-0.10588353872299194,
0.3580375611782074,
0.2552376091480255,
-0.0036917217075824738,
0.42139962315559387,
-0.047894857823848724,
-0.23832011222839355,
-0.38949304819107056,
-0.3604235351085663,
0.5178195834159851,
-0.44997134804725647,
0.2662650942802429,
-0.07715127617120743,
-0.3334919214248657,
0.33606618642807007,
0.7329290509223938,
-0.014091815799474716,
0.19925886392593384,
-0.31259796023368835,
-0.25601086020469666,
-0.06078971177339554,
-0.03241966664791107,
-0.044700924307107925,
0.17475172877311707,
0.2742781937122345,
0.3117229640483856,
-0.14411158859729767,
-0.11824403703212738,
-0.3982655704021454,
0.24832765758037567,
-0.3359958827495575,
0.18908661603927612,
-0.16311845183372498,
-0.09821874648332596,
-0.13376623392105103,
0.07963214814662933,
0.04107612371444702,
0.25871336460113525,
-0.02459609881043434,
-0.2936258614063263,
-0.32752320170402527,
0.06882807612419128,
0.2236124873161316,
-0.21424129605293274,
-0.07237575203180313,
-0.033541012555360794,
-0.17705652117729187,
-0.11233831197023392,
-0.005561787635087967,
-0.0022376924753189087,
0.23315618932247162,
0.22660329937934875,
0.06251143664121628,
0.11658205091953278,
-0.41618025302886963,
-0.06622778624296188,
-0.12307770550251007,
-0.07746489346027374,
-0.15833629667758942,
0.07272499054670334,
-0.21338807046413422,
-0.12092773616313934,
-0.15502598881721497,
0.33767834305763245,
0.16406038403511047,
0.44202375411987305,
0.36062997579574585,
0.06936382502317429,
0.11093609035015106,
0.11511749774217606,
0.28915905952453613,
0.3181856870651245,
-0.11428234726190567,
-0.47198429703712463,
0.31000688672065735,
0.2804371118545532,
-0.18178482353687286,
-0.3593290150165558,
0.08264164626598358,
-0.5128976106643677,
0.000017240643501281738,
0.15912744402885437,
0.43051499128341675,
-0.11772508919239044,
0.14544329047203064,
0.05056650936603546,
0.33638423681259155,
0.023916136473417282,
0.2004486322402954,
0.4209347367286682,
0.06404252350330353,
0.1014031395316124,
0.2356196939945221,
-0.033527251332998276,
-0.0871533676981926,
0.46981292963027954,
0.1750521957874298,
0.5409210920333862,
0.44801563024520874,
0.22503109276294708,
-0.010108023881912231,
0.12496614456176758,
0.4259960651397705,
0.02216215431690216,
0.19731834530830383,
0.2906271517276764,
-0.09262266755104065,
0.2536984086036682,
-0.3461325764656067,
-0.31602856516838074,
-0.3414965569972992,
0.23134489357471466,
-0.44012612104415894,
-0.2124311625957489,
-0.20844759047031403,
-0.270687073469162,
-0.08487393707036972,
-0.011378031224012375,
-0.2570590674877167,
0.20902962982654572,
0.07661157846450806,
-0.23474164307117462,
-0.19472534954547882,
-0.49680274724960327,
-0.13061729073524475,
-0.13317221403121948,
0.4301263988018036,
-0.10129952430725098,
0.40152278542518616,
0.10304976999759674,
-0.1810586154460907,
0.02902836725115776,
0.3175079822540283,
0.08729219436645508,
0.19633904099464417,
0.013362514786422253,
-0.18890318274497986,
0.043126679956912994,
-0.1191529855132103,
0.07238298654556274,
0.317927747964859,
0.21344198286533356,
-0.07537515461444855,
0.16784125566482544,
0.06876444816589355,
-0.14671015739440918,
0.2038974016904831,
-0.04122969135642052,
0.24318207800388336,
0.09988254308700562,
0.027864158153533936,
0.18575419485569,
-0.054020099341869354,
-0.3054512143135071,
-0.14820030331611633,
-0.22583186626434326,
0.05096002668142319,
0.24989637732505798,
-0.008111167699098587,
0.18631517887115479,
-0.2863767147064209,
0.13359589874744415,
0.13577114045619965,
0.6176174283027649,
0.2860676348209381,
-0.1427043080329895,
-0.14300671219825745,
-0.15105241537094116,
-0.30491358041763306,
0.3031997084617615,
0.18568482995033264,
-0.34017306566238403,
-0.03256933391094208,
-0.07873723655939102,
0.05558336153626442,
-0.06719154119491577,
-0.3388926386833191,
0.17118382453918457,
-0.055458713322877884,
-0.11620938777923584,
-0.23999366164207458,
0.3016030788421631,
-0.10269631445407867,
-0.02564317174255848,
-0.02129920944571495,
-0.08383388817310333,
0.09584527462720871,
0.037011705338954926,
0.10947056859731674,
-0.038137663155794144,
-0.4150056540966034,
0.006134033203125,
-0.014030851423740387,
0.16819632053375244,
0.2728516161441803,
-0.05389454960823059,
-0.27415716648101807,
0.06484999507665634,
-0.06405919790267944,
-0.12241522967815399,
-0.24821794033050537,
-0.10938095301389694,
0.017588570713996887,
0.1900932341814041,
0.16692191362380981,
0.28372636437416077,
-0.06471937149763107,
0.045171111822128296,
0.35573339462280273,
0.04904486984014511,
-0.3398374617099762,
-0.09067632257938385,
-0.005301535129547119,
-0.12501130998134613,
0.23420290648937225,
0.655759334564209,
0.03752736747264862,
-0.0007673837244510651,
-0.27725750207901,
-0.5082749128341675,
0.5603708028793335,
-0.30090218782424927,
-0.18766146898269653,
-0.09939990937709808,
0.10738449543714523,
0.4117278456687927,
-0.07024623453617096,
-0.7056644558906555,
-0.18182691931724548,
0.12577636539936066,
-0.1075638011097908,
-0.5928041934967041,
0.30883917212486267,
-0.05926629528403282,
-0.061028752475976944,
-0.1592835932970047,
0.28102004528045654,
0.1327217072248459,
0.0317782461643219,
-0.016077077016234398,
-0.22023940086364746
] |
https://github.com/huggingface/datasets/issues/486 | Bookcorpus data contains pretokenized text | I believe these are just artifacts of this particular source. It might be better to crawl it again, or use another preprocessed source, as found here: https://github.com/soskek/bookcorpus | It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 | 27 | Bookcorpus data contains pretokenized text
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
I believe these are just artifacts of this particular source. It might be better to crawl it again, or use another preprocessed source, as found here: https://github.com/soskek/bookcorpus | [
0.044816333800554276,
0.14664506912231445,
-0.06266234815120697,
0.31894564628601074,
-0.04812796413898468,
-0.2803269624710083,
-0.0028589703142642975,
0.2543208599090576,
-0.42640528082847595,
0.09119775891304016,
-0.13541729748249054,
0.34924930334091187,
0.2933694124221802,
-0.11513465642929077,
-0.06403197348117828,
0.20691898465156555,
0.2553400993347168,
0.2440313994884491,
0.08130387961864471,
-0.19285941123962402,
-0.17573300004005432,
0.32189974188804626,
0.13537465035915375,
0.12956057488918304,
-0.19148777425289154,
-0.23169860243797302,
-0.13648496568202972,
0.29662591218948364,
-0.16972868144512177,
-0.36853688955307007,
0.04186750203371048,
0.23731563985347748,
-0.045746371150016785,
0.4200379252433777,
-0.00010429670510347933,
-0.1999749094247818,
-0.008552394807338715,
-0.0008110478520393372,
-0.2220442295074463,
0.039646975696086884,
0.24189552664756775,
-0.10471337288618088,
0.3316566050052643,
-0.42215654253959656,
-0.20508798956871033,
0.09909389913082123,
-0.19218772649765015,
0.11557154357433319,
0.13364917039871216,
0.29843994975090027,
0.26855096220970154,
0.24999579787254333,
-0.14472921192646027,
0.24058988690376282,
0.2765302360057831,
-0.10522900521755219,
-0.26803329586982727,
0.15415334701538086,
0.4808160960674286,
0.2871722877025604,
-0.11767106503248215,
0.325272798538208,
-0.14838264882564545,
-0.05509867146611214,
0.013953045010566711,
-0.06827975064516068,
0.1332596093416214,
-0.20303763449192047,
0.24491405487060547,
0.17434778809547424,
0.19781553745269775,
-0.17878201603889465,
-0.03741668164730072,
-0.07731873542070389,
-0.03178086131811142,
-0.030536696314811707,
0.3331262171268463,
0.19728140532970428,
0.19773142039775848,
0.08572328090667725,
-0.22891297936439514,
-0.10920834541320801,
0.03441115468740463,
0.1787559539079666,
-0.06967289000749588,
0.3172307014465332,
-0.12697355449199677,
-0.013959161937236786,
-0.07269367575645447,
-0.10282912850379944,
-0.20771318674087524,
0.029177747666835785,
-0.3983163833618164,
0.00029412098228931427,
-0.031008731573820114,
-0.13437598943710327,
-0.05261138081550598,
0.3532709777355194,
-0.029496928676962852,
0.18978947401046753,
0.1584525853395462,
0.2260873019695282,
-0.1797974854707718,
-0.018014095723628998,
0.1203734427690506,
0.1379707157611847,
0.1127830296754837,
0.24111320078372955,
0.06826655566692352,
0.06403858214616776,
-0.2253691703081131,
-0.03511571139097214,
0.039489150047302246,
0.014292499981820583,
0.02542925626039505,
0.03479122743010521,
-0.07370298355817795,
-0.4883926808834076,
0.19221749901771545,
0.20835265517234802,
-0.0955335944890976,
0.2945859134197235,
0.01662847399711609,
0.08612990379333496,
-0.10780669003725052,
0.02905246801674366,
0.21027623116970062,
0.013878747820854187,
-0.18058188259601593,
-0.16099253296852112,
-0.19739414751529694,
-0.0833950936794281,
-0.3167272210121155,
0.09785347431898117,
0.14982850849628448,
-0.06536713242530823,
0.21540644764900208,
0.06164582073688507,
-0.14524386823177338,
-0.08339095115661621,
0.013253409415483475,
-0.22872397303581238,
0.21268029510974884,
-0.008122723549604416,
-0.03530837967991829,
0.26136887073516846,
0.01313198171555996,
0.0074578747153282166,
-0.18860846757888794,
0.04369163140654564,
-0.370269238948822,
0.07491554319858551,
-0.29214179515838623,
0.26189643144607544,
-0.26819607615470886,
-0.22093579173088074,
-0.09183498471975327,
0.05289803817868233,
0.29580873250961304,
-0.2276177853345871,
0.31872010231018066,
0.0037581566721200943,
-0.0961417555809021,
0.013930728659033775,
-0.2106841653585434,
0.24040856957435608,
-0.13928534090518951,
-0.14979401230812073,
-0.02912667579948902,
0.012516756542026997,
0.2761661112308502,
0.10727238655090332,
-0.21232914924621582,
-0.00864514708518982,
0.10438770800828934,
0.7325605750083923,
0.04333558678627014,
-0.07783633470535278,
-0.47852107882499695,
0.28627005219459534,
-0.03925397992134094,
0.07498293370008469,
-0.1802365481853485,
-0.12135972082614899,
0.131268709897995,
0.044912081211805344,
-0.14061109721660614,
0.15116766095161438,
0.6003318428993225,
0.2346281111240387,
-0.6044291853904724,
-0.24239501357078552,
0.2666246294975281,
0.1318979114294052,
-0.13019400835037231,
-0.038273878395557404,
0.14331665635108948,
-0.008329961448907852,
0.09496710449457169,
-0.22242385149002075,
0.24345280230045319,
0.46175408363342285,
0.19766759872436523,
0.3330715298652649,
0.23231318593025208,
-0.07871529459953308,
0.1970961093902588,
-0.005559951066970825,
-0.6133105754852295,
0.6089826226234436,
-0.05900004506111145,
-0.29228878021240234,
-0.07878516614437103,
-0.3615654408931732,
-0.15256063640117645,
-0.011526491492986679,
0.2970631420612335,
0.18124505877494812,
-0.11708642542362213,
0.3826634883880615,
0.1691548377275467,
-0.02694462053477764,
-0.05331624299287796,
0.02364092506468296,
-0.33622878789901733,
0.043103478848934174,
-0.16817794740200043,
-0.19707483053207397,
-0.13904008269309998,
0.29373013973236084,
0.2984587550163269,
0.09362237900495529,
-0.26252222061157227,
0.502124547958374,
-0.4160389006137848,
0.246699258685112,
-0.16892313957214355,
0.1719900220632553,
0.2322179526090622,
-0.009272102266550064,
0.11168201267719269,
0.5388673543930054,
0.37868931889533997,
-0.05297388881444931,
0.21592801809310913,
0.3990841507911682,
0.44827041029930115,
-0.015595696866512299,
0.04306018352508545,
-0.19344772398471832,
0.14708825945854187,
-0.2783167362213135,
0.1191444918513298,
-0.1288461834192276,
0.23086300492286682,
0.09096170961856842,
0.0945122092962265,
0.20287397503852844,
-0.1953771710395813,
0.3303448557853699,
0.3287513852119446,
-0.09278298914432526,
0.09695516526699066,
0.2161506712436676,
-0.28309059143066406,
-0.2576102316379547,
0.011453141458332539,
0.1333329826593399,
0.08475546538829803,
0.05527181550860405,
-0.03309289738535881,
0.08759421110153198,
0.09445173293352127,
-0.3282378613948822,
0.23303622007369995,
0.1454980969429016,
-0.2436210662126541,
0.06427671760320663,
0.2809624671936035,
0.20064152777194977,
-0.47327637672424316,
-0.09615709632635117,
-0.05938982963562012,
0.13257651031017303,
-0.15903668105602264,
0.3321846127510071,
-0.32098791003227234,
-0.6278656125068665,
-0.09893403202295303,
0.038964904844760895,
-0.14982348680496216,
-0.21089380979537964,
0.2689697742462158,
0.18296626210212708,
-0.11704745888710022,
-0.024207348003983498,
0.185578852891922,
0.3524077534675598,
-0.2660961449146271,
-0.04163969308137894,
-0.1509881615638733,
-0.349187970161438,
-0.7120480537414551,
0.1918042004108429,
0.07326996326446533,
0.07964690029621124,
-0.041074007749557495,
-0.2622721791267395,
0.043561939150094986,
-0.30289319157600403,
-0.3058646321296692,
0.05772298201918602,
-0.16974344849586487,
-0.08107046037912369,
0.027201347053050995,
-0.1541401892900467,
-0.3781110644340515,
-0.27365800738334656,
-0.0023803971707820892,
-0.16365371644496918,
-0.14096596837043762,
0.11803305149078369,
-0.2873587906360626,
-0.43361714482307434,
-0.4267376661300659,
-0.4536300599575043,
-0.05308741331100464,
-0.1416698843240738,
0.31453657150268555,
0.2562347650527954,
0.06328403204679489,
0.3353785574436188,
-0.32957378029823303,
0.09301178902387619,
0.27805158495903015,
0.4002054035663605,
-0.35192736983299255,
-0.40992817282676697,
0.3584454357624054,
-0.13659490644931793,
-0.45289215445518494,
-0.02356487140059471,
0.14849428832530975,
0.0834878534078598,
-0.06923051178455353,
-0.49102097749710083,
0.20696492493152618,
-0.2885850965976715,
0.011330623179674149,
0.11985255777835846,
0.02676333114504814,
0.24222928285598755,
0.10119834542274475,
-0.2581208348274231,
-0.06392910331487656,
-0.09577226638793945,
0.2960178256034851,
0.25828859210014343,
0.2977919578552246,
-0.2564225494861603,
-0.2517825663089752,
-0.03183499723672867,
-0.02606968581676483,
-0.10210254788398743,
-0.14419879019260406,
0.45615503191947937,
-0.04423730820417404,
0.18772219121456146,
-0.16154080629348755,
-0.03918826952576637,
0.03143038600683212,
-0.3032161295413971,
-0.015090513974428177,
0.7271079421043396,
0.02126483991742134,
-0.4289526343345642,
-0.03323529660701752,
-0.3933037519454956,
-0.5735102295875549,
-0.43119552731513977,
-0.10014867037534714,
-0.04329819977283478,
0.09390521049499512,
0.12363600730895996,
-0.01784263178706169,
0.12077516317367554,
-0.44453588128089905,
0.0327545590698719,
0.15320953726768494,
-0.18364465236663818,
0.04786702245473862,
-0.3420102596282959,
0.16876500844955444,
-0.37172403931617737,
0.25530803203582764,
0.005262373946607113,
-0.0013446547091007233,
-0.04516585171222687,
0.05862594395875931,
0.26028019189834595,
-0.21680979430675507,
0.10640878975391388,
0.010294178500771523,
0.06532423943281174,
0.2743198871612549,
-0.3003893792629242,
-0.002709377557039261,
-0.12286826968193054,
-0.24209344387054443,
0.15312092006206512,
0.39136725664138794,
0.18506954610347748,
-0.31226617097854614,
0.08356669545173645,
-0.3329974114894867,
0.12830010056495667,
-0.1680288314819336,
0.31800514459609985,
-0.059293411672115326,
-0.21246784925460815,
-0.3637363910675049,
0.06564688682556152,
0.05306946486234665,
0.42738568782806396,
-0.1115669310092926,
-0.045570679008960724,
0.03304823115468025,
0.23244374990463257,
0.27903443574905396,
0.22803616523742676,
0.4632433354854584,
-0.27135351300239563,
0.03242432698607445,
-0.13449408113956451,
0.1827019453048706,
0.11381705105304718,
0.4114050269126892,
0.06951667368412018,
0.07344017922878265,
-0.08522919565439224,
-0.40198156237602234,
-0.2859329283237457,
0.39703354239463806,
0.1608572155237198,
0.29175153374671936,
0.20208635926246643,
-0.03278319537639618,
0.08001996576786041,
0.13238313794136047,
-0.005836177617311478,
-0.014479229226708412,
-0.0985422357916832,
-0.08093075454235077,
0.18799740076065063,
0.0858462005853653,
-0.0652608871459961,
-0.0130615234375,
0.15613029897212982,
-0.39439672231674194,
0.4994822144508362,
0.009107068181037903,
1.2245506048202515,
0.19141177833080292,
0.24731482565402985,
0.14750981330871582,
0.08288313448429108,
0.10945745557546616,
-0.5010138154029846,
-0.04627722501754761,
-0.30800530314445496,
0.1485586017370224,
-0.05973152071237564,
0.36750733852386475,
-0.09616561979055405,
0.11770017445087433,
-0.3358367681503296,
0.1413775533437729,
-0.2380874752998352,
0.094016894698143,
0.022675298154354095,
-0.021082408726215363,
0.10314631462097168,
-0.1923017054796219,
0.10858789831399918,
0.2364024817943573,
-0.0654325857758522,
0.10716754198074341,
0.01989252120256424,
-0.26306742429733276,
-0.23159749805927277,
-0.1430666744709015,
-0.2902023196220398,
0.23940759897232056,
0.05035673454403877,
0.05299585312604904,
0.28482991456985474,
-0.0000991523265838623,
-0.1121586412191391,
0.10712353885173798,
0.3068518042564392,
0.24903149902820587,
-0.361775279045105,
0.2733413875102997,
0.20502302050590515,
-0.10658055543899536,
0.24868741631507874,
0.19706115126609802,
0.32493820786476135,
-0.13911184668540955,
-0.12755624949932098,
-0.16754621267318726,
-0.0458948016166687,
-0.15576446056365967,
-0.05186380445957184,
0.02143251523375511,
0.046371109783649445,
-0.33361199498176575,
-0.07673552632331848,
0.2401326596736908,
-0.39261648058891296,
-0.26283860206604004,
0.19828002154827118,
-0.1990271657705307,
-0.15920628607273102,
-0.06917793303728104,
0.12852805852890015,
-0.3441813588142395,
-0.19760142266750336,
0.42205867171287537,
0.2594238817691803,
-0.11409740895032883,
0.28708386421203613,
-0.03806539997458458,
-0.24504463374614716,
-0.3479488492012024,
-0.15907301008701324,
0.2692510485649109,
-0.4661872088909149,
0.18229691684246063,
-0.07213956117630005,
-0.3561219573020935,
0.29494616389274597,
0.6725558042526245,
-0.08048130571842194,
0.3593216836452484,
-0.2375115007162094,
-0.35370469093322754,
0.016492171213030815,
-0.05833372473716736,
-0.02305973693728447,
0.12353731691837311,
0.36055147647857666,
0.22877807915210724,
-0.04499855637550354,
-0.12311872839927673,
-0.4092462658882141,
0.30931422114372253,
-0.403004914522171,
0.25770294666290283,
-0.19851240515708923,
-0.08553683012723923,
-0.10815411806106567,
-0.020687464624643326,
0.05100323259830475,
0.3924659490585327,
-0.05474817007780075,
-0.31722956895828247,
-0.35060375928878784,
0.07255672663450241,
0.23481595516204834,
-0.14168456196784973,
-0.17931848764419556,
0.011717218905687332,
0.07723361253738403,
-0.10792019218206406,
0.048268649727106094,
0.06595326960086823,
0.04200173169374466,
0.33060649037361145,
0.057971276342868805,
0.15907369554042816,
-0.33840906620025635,
-0.025762397795915604,
-0.07764074206352234,
0.007982932031154633,
-0.14628800749778748,
0.06454537063837051,
-0.2116556167602539,
-0.07690700143575668,
-0.11161240935325623,
0.13023000955581665,
0.14510434865951538,
0.45861172676086426,
0.2783309817314148,
0.11299954354763031,
0.16906173527240753,
0.1006910651922226,
0.14603978395462036,
0.25841400027275085,
-0.201593816280365,
-0.4826545715332031,
0.29021313786506653,
0.2997664511203766,
-0.09478437155485153,
-0.37482333183288574,
-0.05981754884123802,
-0.4852975308895111,
-0.022109681740403175,
0.0629764050245285,
0.4774009883403778,
-0.2948596477508545,
0.2269401252269745,
0.0935661643743515,
0.3392336666584015,
-0.0036566611379384995,
0.20500540733337402,
0.31654661893844604,
-0.08294329047203064,
0.018457531929016113,
0.18930122256278992,
-0.022432364523410797,
-0.1535358428955078,
0.4744413495063782,
0.12426530569791794,
0.42534059286117554,
0.5266221761703491,
0.2677660286426544,
-0.049602605402469635,
0.21884270012378693,
0.3550836145877838,
0.011899605393409729,
0.18060897290706635,
0.31601497530937195,
0.09881940484046936,
0.21785587072372437,
-0.27011337876319885,
-0.3222954273223877,
-0.17847765982151031,
0.17918071150779724,
-0.39178064465522766,
-0.044101908802986145,
-0.14666327834129333,
-0.15040868520736694,
-0.1310461163520813,
-0.030556688085198402,
-0.24647405743598938,
0.15948626399040222,
0.035263627767562866,
-0.07787981629371643,
-0.14394240081310272,
-0.39574557542800903,
-0.15193098783493042,
-0.19540613889694214,
0.30663925409317017,
-0.17401057481765747,
0.28783589601516724,
0.08502688258886337,
-0.004850246012210846,
0.08270326256752014,
0.21192574501037598,
0.19770300388336182,
0.29643726348876953,
-0.11730106174945831,
-0.03884002938866615,
-0.03742782026529312,
-0.09877482056617737,
0.15807192027568817,
0.27824974060058594,
0.18830478191375732,
-0.029579274356365204,
0.11614659428596497,
0.11480428278446198,
-0.20723627507686615,
0.20417819917201996,
-0.12793438136577606,
0.24164223670959473,
0.13358047604560852,
0.11907896399497986,
0.019586145877838135,
-0.1260523498058319,
-0.3083535134792328,
-0.22944754362106323,
-0.2746400237083435,
0.06708019226789474,
0.20773513615131378,
-0.05191906914114952,
0.18568319082260132,
-0.2875632643699646,
0.1513199657201767,
0.1411016583442688,
0.6888769268989563,
0.27810192108154297,
-0.0805138573050499,
-0.08426561951637268,
-0.1521545648574829,
-0.3064148426055908,
0.3324434161186218,
0.11669227480888367,
-0.27550074458122253,
-0.025246575474739075,
-0.08771060407161713,
-0.04429329186677933,
0.012835582718253136,
-0.38221240043640137,
0.22716176509857178,
-0.12777787446975708,
-0.28407251834869385,
-0.3597862124443054,
0.3236965239048004,
0.13038967549800873,
-0.11333352327346802,
0.020948857069015503,
-0.1534527838230133,
0.15447361767292023,
-0.07660327106714249,
0.1796649992465973,
-0.10366478562355042,
-0.5949349403381348,
-0.10305498540401459,
0.15790198743343353,
0.1936388611793518,
0.29183492064476013,
0.0025176405906677246,
-0.26152369379997253,
0.04349624365568161,
0.020493995398283005,
-0.22433580458164215,
-0.04267081245779991,
0.027820974588394165,
0.16929611563682556,
0.19753991067409515,
0.13636508584022522,
0.3651083707809448,
-0.07190587371587753,
0.2666304111480713,
0.2732155919075012,
0.19293048977851868,
-0.1848854273557663,
-0.08913347125053406,
-0.16581398248672485,
-0.05254417657852173,
-0.029555581510066986,
0.5959390997886658,
0.08992592245340347,
-0.007215525954961777,
-0.2557159960269928,
-0.4805971384048462,
0.5174431800842285,
-0.25704509019851685,
-0.18370378017425537,
-0.02973916009068489,
0.15268638730049133,
0.4775864779949188,
-0.08795668929815292,
-0.6576769948005676,
-0.10069376975297928,
0.14194677770137787,
-0.06590252369642258,
-0.5773207545280457,
0.295058935880661,
-0.15874643623828888,
-0.0939941257238388,
-0.07574339210987091,
0.2928362190723419,
0.33422428369522095,
-0.002744371071457863,
0.1261533945798874,
-0.1822182536125183
] |
https://github.com/huggingface/datasets/issues/486 | Bookcorpus data contains pretokenized text | Yes actually the BookCorpus on hugginface is based on [this](https://github.com/soskek/bookcorpus/issues/24#issuecomment-643933352). And I kind of regret naming it as "BookCorpus" instead of something like "BookCorpusLike".
But there is a good news ! @shawwn has replicated BookCorpus in his way, and also provided a link to download the plain text files. see [here](https://github.com/soskek/bookcorpus/issues/27). There is chance we can have a "OpenBookCorpus" ! | It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575 | 60 | Bookcorpus data contains pretokenized text
It seem that the bookcoprus data downloaded through the library was pretokenized with NLTK's Treebank tokenizer, which changes the text in incompatible ways to how, for instance, BERT's wordpiece tokenizer works. For example, "didn't" becomes "did" + "n't", and double quotes are changed to `` and '' for start and end quotes, respectively.
On my own projects, I just run the data through NLTK's TreebankWordDetokenizer to reverse the tokenization (as best as possible). I think it would be beneficial to apply this transformation directly on your remote cached copy of the dataset. If you choose to do so, I would also suggest to use my fork of NLTK that fixes several bugs in their detokenizer (I've opened a pull-request, but they've yet to respond): https://github.com/nltk/nltk/pull/2575
Yes actually the BookCorpus on hugginface is based on [this](https://github.com/soskek/bookcorpus/issues/24#issuecomment-643933352). And I kind of regret naming it as "BookCorpus" instead of something like "BookCorpusLike".
But there is a good news ! @shawwn has replicated BookCorpus in his way, and also provided a link to download the plain text files. see [here](https://github.com/soskek/bookcorpus/issues/27). There is chance we can have a "OpenBookCorpus" ! | [
0.09384399652481079,
-0.12072675675153732,
0.005747389048337936,
0.34772545099258423,
-0.04504957050085068,
-0.25748395919799805,
0.023119617253541946,
0.19239658117294312,
-0.3466646075248718,
0.1204393282532692,
-0.2318461835384369,
0.049843642860651016,
0.25082653760910034,
0.28113406896591187,
0.063364677131176,
0.13253754377365112,
0.2879849970340729,
0.14309515058994293,
-0.07848657667636871,
-0.159872367978096,
-0.2173703908920288,
0.43361374735832214,
0.11664682626724243,
0.1677405685186386,
-0.03888997063040733,
-0.12684251368045807,
-0.2003343552350998,
0.4001178443431854,
-0.20780260860919952,
-0.279116153717041,
0.1527043730020523,
0.22518882155418396,
-0.10807188600301743,
0.40118226408958435,
-0.00010668213508324698,
-0.15935620665550232,
-0.12299759685993195,
-0.015540476888418198,
-0.3229639232158661,
0.026789508759975433,
0.38880857825279236,
-0.10114660859107971,
0.1833067089319229,
-0.32434481382369995,
-0.3408607542514801,
0.18022432923316956,
-0.13508540391921997,
0.06202615797519684,
0.12491430342197418,
0.10396823287010193,
0.21362413465976715,
0.3086170554161072,
0.03719959035515785,
0.22255778312683105,
0.06962426006793976,
-0.037563078105449677,
-0.35279181599617004,
0.21019677817821503,
0.49129176139831543,
0.2205248475074768,
-0.06334833055734634,
0.29003292322158813,
-0.12769648432731628,
-0.11187243461608887,
0.03939901292324066,
-0.022118985652923584,
0.2333829402923584,
-0.11506693065166473,
0.20393800735473633,
0.3186214566230774,
-0.0194094181060791,
-0.2599663734436035,
-0.10645763576030731,
-0.19438016414642334,
-0.07610014081001282,
-0.07260078936815262,
0.33643388748168945,
0.28461164236068726,
0.2253698855638504,
0.09688298404216766,
-0.3741993308067322,
-0.227746844291687,
0.08119349181652069,
0.13138046860694885,
-0.04054698348045349,
0.03616310656070709,
-0.18460294604301453,
-0.02379848062992096,
0.07444463670253754,
0.013465510681271553,
-0.4897993803024292,
0.026941202580928802,
-0.3042087256908417,
0.035065822303295135,
-0.09749770164489746,
-0.14983505010604858,
-0.05388716608285904,
0.7010758519172668,
0.07469860464334488,
0.06936768442392349,
0.05307253450155258,
0.1078740581870079,
-0.3359385132789612,
-0.026554308831691742,
0.08207438141107559,
0.10076525807380676,
0.13695049285888672,
0.015608501620590687,
0.06788504123687744,
0.18433941900730133,
-0.0453091599047184,
0.03628090023994446,
0.043841879814863205,
0.10206083953380585,
-0.1639276146888733,
-0.0209338441491127,
-0.07247963547706604,
-0.39963075518608093,
0.1268751174211502,
0.1415814608335495,
-0.13349740207195282,
0.36421987414360046,
0.08795882761478424,
0.007630668580532074,
-0.25823745131492615,
-0.02107156440615654,
0.29647934436798096,
-0.010281112045049667,
-0.2136097550392151,
-0.22177864611148834,
-0.1615479290485382,
-0.09587158262729645,
-0.31911349296569824,
0.22648754715919495,
0.14647215604782104,
-0.39522725343704224,
0.1858624964952469,
0.04447619244456291,
-0.3081524968147278,
-0.01856340281665325,
-0.005698148161172867,
-0.090286985039711,
0.11936499923467636,
-0.14109884202480316,
-0.04668007045984268,
0.19803296029567719,
0.033311471343040466,
0.06042802333831787,
-0.23042914271354675,
-0.0702005997300148,
-0.2735205292701721,
0.012077610939741135,
-0.3084300458431244,
0.20194193720817566,
-0.33406585454940796,
-0.19739477336406708,
-0.20778638124465942,
0.0061913542449474335,
0.13897620141506195,
-0.24779392778873444,
0.3023015856742859,
0.1350104957818985,
-0.17678306996822357,
0.08769181370735168,
-0.14001087844371796,
0.2940989136695862,
-0.060480497777462006,
-0.24479864537715912,
0.2254450023174286,
0.03172808885574341,
0.15185484290122986,
0.10320989787578583,
-0.1967708021402359,
-0.04806970804929733,
0.06978148221969604,
0.6613709926605225,
-0.14486727118492126,
-0.18178385496139526,
-0.41489237546920776,
0.16827775537967682,
-0.11203720420598984,
0.1598672866821289,
-0.11146146804094315,
-0.16830208897590637,
-0.04646550118923187,
0.00639009103178978,
-0.26775383949279785,
0.1824931800365448,
0.5105288028717041,
0.2303016185760498,
-0.5244214534759521,
-0.3914473056793213,
0.2984270453453064,
0.12718214094638824,
-0.20670254528522491,
-0.053121380507946014,
-0.002029217779636383,
0.014039929024875164,
0.15548139810562134,
-0.21456381678581238,
0.16349253058433533,
0.35328060388565063,
0.20835687220096588,
0.39665770530700684,
0.2448134571313858,
-0.006198005750775337,
0.14572425186634064,
-0.00894886627793312,
-0.6330724954605103,
0.5566464066505432,
0.1423981785774231,
-0.37344563007354736,
-0.10404165834188461,
-0.347904771566391,
-0.09156171977519989,
-0.10566364228725433,
0.22247245907783508,
0.18752530217170715,
0.055978287011384964,
0.29859837889671326,
0.15249091386795044,
0.20285966992378235,
0.004320548847317696,
0.14458368718624115,
-0.6349846124649048,
-0.034098051488399506,
-0.15268059074878693,
-0.03189622238278389,
-0.12223479896783829,
0.31368154287338257,
0.19595065712928772,
0.0005568356718868017,
-0.08890442550182343,
0.5558329820632935,
-0.5106663107872009,
0.20364364981651306,
-0.1912868320941925,
0.26809990406036377,
0.2760772407054901,
0.1986156404018402,
0.0812508687376976,
0.47499263286590576,
0.3740748465061188,
0.006757259368896484,
0.12199704349040985,
0.3797280788421631,
0.4839079678058624,
-0.05987047404050827,
0.10765914618968964,
-0.15554113686084747,
0.03518321365118027,
-0.28178468346595764,
0.00040056556463241577,
0.03692765533924103,
0.2631745934486389,
-0.11146469414234161,
0.20403225719928741,
0.1861051470041275,
-0.3016120493412018,
0.2576790750026703,
0.4086393713951111,
-0.13206897675991058,
0.08948522806167603,
0.15428265929222107,
-0.3398968279361725,
-0.17769312858581543,
0.03464178740978241,
-0.1265438050031662,
0.018901251256465912,
0.06604471057653427,
-0.07931296527385712,
0.1490282416343689,
0.16613684594631195,
-0.2313828468322754,
0.3121625781059265,
0.10729629546403885,
-0.24849627912044525,
-0.033841438591480255,
0.21632832288742065,
0.15735232830047607,
-0.41629043221473694,
-0.0698956847190857,
-0.14702850580215454,
-0.06632963567972183,
-0.1102839857339859,
0.2880486845970154,
-0.26461315155029297,
-0.5740513205528259,
-0.1406419724225998,
-0.0019309129565954208,
-0.15946480631828308,
-0.11749352514743805,
0.31271737813949585,
0.38628050684928894,
-0.0017168372869491577,
-0.14912952482700348,
0.13770948350429535,
0.49586915969848633,
-0.3587917983531952,
-0.0933327004313469,
-0.12121110409498215,
-0.2203114628791809,
-0.640043318271637,
0.1287745088338852,
0.07952413707971573,
-0.13608092069625854,
0.017153434455394745,
-0.29818907380104065,
0.010307502001523972,
-0.32686930894851685,
-0.3456941545009613,
0.1376439929008484,
-0.24459411203861237,
-0.1988651305437088,
0.08227167278528214,
-0.19020719826221466,
-0.4083923101425171,
-0.19231362640857697,
0.01817985065281391,
-0.14325854182243347,
-0.2758738100528717,
0.16238699853420258,
-0.18349987268447876,
-0.3752991557121277,
-0.3884892165660858,
-0.3572833836078644,
-0.050576694309711456,
-0.1736682802438736,
0.57054203748703,
0.19189627468585968,
-0.006513930857181549,
0.5147128105163574,
-0.3683895468711853,
0.14963841438293457,
0.27252933382987976,
0.3947567641735077,
-0.3479956388473511,
-0.4685349762439728,
0.32253125309944153,
-0.0649404525756836,
-0.4029201865196228,
-0.01092969998717308,
0.09890518337488174,
0.045492179691791534,
-0.09202999621629715,
-0.4073904752731323,
0.09232588112354279,
-0.21198350191116333,
-0.015826933085918427,
0.1361180990934372,
0.1005614697933197,
0.44594499468803406,
0.1266246736049652,
-0.211758553981781,
-0.00105343759059906,
-0.20756101608276367,
0.32479944825172424,
0.34197068214416504,
0.3122250437736511,
-0.19321370124816895,
-0.30873990058898926,
0.037780921906232834,
-0.12085653841495514,
-0.0683811604976654,
-0.046939391642808914,
0.4255405068397522,
-0.018344538286328316,
0.23240146040916443,
-0.21101245284080505,
-0.09433992952108383,
-0.014486235566437244,
-0.3801889717578888,
0.031381916254758835,
0.6702111959457397,
0.19855594635009766,
-0.13692250847816467,
-0.05997779220342636,
-0.3689667582511902,
-0.6417495608329773,
-0.44246000051498413,
-0.22465194761753082,
0.1710260808467865,
0.06531611829996109,
0.0593961663544178,
0.06535286456346512,
0.1679581105709076,
-0.45231691002845764,
0.21609458327293396,
0.18803410232067108,
-0.11697646230459213,
0.1536765843629837,
-0.10435809195041656,
0.16650813817977905,
-0.35017383098602295,
0.32853031158447266,
-0.12172543257474899,
-0.13492096960544586,
-0.09237595647573471,
-0.0829191580414772,
0.25274020433425903,
-0.25159353017807007,
0.3255564570426941,
0.10498254746198654,
0.053981296718120575,
0.17833738029003143,
-0.4626269042491913,
-0.03151340037584305,
-0.10014152526855469,
-0.13856691122055054,
0.13590221107006073,
0.4657762348651886,
0.2852061986923218,
-0.46526774764060974,
0.05720009654760361,
-0.20357008278369904,
0.23591019213199615,
-0.1319594532251358,
0.2894382178783417,
-0.07654125988483429,
-0.26179131865501404,
-0.35900911688804626,
0.071407750248909,
-0.002796294167637825,
0.4658588171005249,
-0.06146310269832611,
0.08815373480319977,
0.042353130877017975,
0.07599402219057083,
0.3209172487258911,
0.15853391587734222,
0.3812204897403717,
-0.18160377442836761,
0.10328012704849243,
-0.0077861398458480835,
0.2582412362098694,
-0.01949439011514187,
0.42969611287117004,
0.28793078660964966,
0.033430032432079315,
-0.08159328997135162,
-0.2895697057247162,
-0.3119291067123413,
0.49155864119529724,
0.17871618270874023,
0.18901145458221436,
0.3776550590991974,
-0.08367598056793213,
-0.05049094185233116,
0.11218199878931046,
-0.06730452179908752,
0.0549025684595108,
-0.19720816612243652,
0.02846423350274563,
0.0690326914191246,
0.10820989310741425,
-0.07777170836925507,
0.09533201158046722,
0.35474318265914917,
-0.36932095885276794,
0.3874281644821167,
-0.1326042115688324,
1.2466685771942139,
0.061032529920339584,
0.3273182809352875,
0.2324030101299286,
0.22371439635753632,
0.05179029703140259,
-0.4737735390663147,
0.0959867611527443,
-0.3381621837615967,
0.21837781369686127,
-0.09652051329612732,
0.4169149398803711,
-0.10624461621046066,
0.040630098432302475,
-0.2432556450366974,
0.19635699689388275,
-0.09302890300750732,
0.1904982030391693,
-0.09169964492321014,
-0.007228996604681015,
-0.12024413794279099,
-0.3448232114315033,
0.009718838147819042,
0.19114339351654053,
0.014594696462154388,
0.3203693926334381,
0.14595794677734375,
-0.3317463994026184,
-0.21838988363742828,
-0.04077601432800293,
-0.1546417474746704,
0.31593701243400574,
-0.08544782549142838,
-0.08174338936805725,
0.4184538424015045,
0.043134018778800964,
-0.10744357109069824,
0.15730199217796326,
0.4088447690010071,
0.28633642196655273,
-0.4062109589576721,
0.06590919196605682,
0.02397572249174118,
-0.19142723083496094,
0.23012900352478027,
0.07923636585474014,
0.36032113432884216,
-0.054295919835567474,
-0.03405222296714783,
-0.16316619515419006,
0.001208985224366188,
-0.17126457393169403,
0.02852173149585724,
0.02736591547727585,
0.16064780950546265,
-0.39787760376930237,
-0.025506166741251945,
0.24875128269195557,
-0.331633061170578,
-0.23366855084896088,
0.14528077840805054,
-0.21102933585643768,
-0.1632935255765915,
-0.15140566229820251,
0.17202448844909668,
-0.2713448405265808,
-0.17321781814098358,
0.4485715627670288,
0.1804514229297638,
-0.1976034939289093,
0.25211378931999207,
-0.024278949946165085,
-0.2300773710012436,
-0.2597087323665619,
-0.1339484304189682,
0.3980848789215088,
-0.35194143652915955,
0.08630538731813431,
0.055134858936071396,
-0.3697420358657837,
0.19730395078659058,
0.7515904307365417,
-0.026074469089508057,
0.1744609773159027,
-0.21227362751960754,
-0.23878933489322662,
0.021794041618704796,
0.0409235842525959,
0.05668744444847107,
0.13642235100269318,
0.6430282592773438,
0.2666279971599579,
-0.03952154517173767,
-0.21417073905467987,
-0.38003644347190857,
0.27786073088645935,
-0.32007157802581787,
0.11240171641111374,
0.002933766692876816,
-0.066731296479702,
0.09164437651634216,
-0.08966825902462006,
0.04014526307582855,
0.34796345233917236,
-0.08525621145963669,
-0.25819697976112366,
-0.4077644944190979,
0.07729050517082214,
0.2306945025920868,
-0.23371641337871552,
-0.08895833045244217,
0.04378850758075714,
0.0584508441388607,
-0.10846419632434845,
0.07042580842971802,
0.10378583520650864,
0.12141676247119904,
0.1209271103143692,
-0.10241833329200745,
0.2657807171344757,
-0.4172893166542053,
-0.10447166860103607,
0.016920283436775208,
0.05427026376128197,
-0.0603356808423996,
-0.014917142689228058,
-0.25951263308525085,
-0.06748697906732559,
-0.06606339663267136,
0.21840626001358032,
0.33211955428123474,
0.43660876154899597,
0.3683239221572876,
0.13696712255477905,
0.01831476017832756,
0.10960789024829865,
0.2874644994735718,
0.1851903647184372,
-0.13285264372825623,
-0.35471445322036743,
0.34436461329460144,
0.2502983808517456,
0.0044990479946136475,
-0.29054951667785645,
0.11179663240909576,
-0.5064705014228821,
0.017764728516340256,
0.14816009998321533,
0.4995017349720001,
-0.07002168893814087,
0.30912691354751587,
0.029711905866861343,
0.29239562153816223,
0.12368590384721756,
0.16159434616565704,
0.2556520998477936,
-0.13143102824687958,
0.06871786713600159,
0.2706288695335388,
-0.0009666457772254944,
-0.03226444870233536,
0.2306300401687622,
0.07274486869573593,
0.31188201904296875,
0.35434749722480774,
0.37124064564704895,
-0.09124758094549179,
0.14934740960597992,
0.3343857228755951,
-0.1993267834186554,
0.22923608124256134,
0.24831196665763855,
-0.05213040113449097,
0.446384459733963,
-0.46793702244758606,
-0.3230537474155426,
-0.22967234253883362,
0.2725279927253723,
-0.31894025206565857,
-0.06216822564601898,
-0.16766926646232605,
-0.09240379184484482,
-0.14268365502357483,
0.07678757607936859,
-0.26980477571487427,
-0.00652950257062912,
0.18947991728782654,
-0.184235617518425,
-0.08565142750740051,
-0.45371782779693604,
-0.3113761246204376,
-0.16930001974105835,
0.3823491632938385,
-0.10741505026817322,
0.28466278314590454,
0.0380353182554245,
0.0034096166491508484,
-0.02383996918797493,
0.33465155959129333,
0.09620404243469238,
0.19809089601039886,
-0.060444097965955734,
0.021716758608818054,
-0.11305798590183258,
-0.007251700386404991,
0.03568641468882561,
0.2513357102870941,
0.13942275941371918,
0.004351498559117317,
0.0718948245048523,
0.08431195467710495,
-0.17426015436649323,
0.2088596075773239,
-0.21052564680576324,
0.2519863545894623,
0.07953517138957977,
-0.05903119593858719,
0.002321932464838028,
-0.061711568385362625,
-0.4243811070919037,
-0.25156593322753906,
-0.2580960988998413,
0.13773737847805023,
0.24468638002872467,
0.06735246628522873,
0.1199314072728157,
-0.3152996599674225,
0.13667689263820648,
0.29732534289360046,
0.49039074778556824,
0.26181161403656006,
-0.06958968192338943,
-0.08615237474441528,
0.029058143496513367,
-0.1447817087173462,
0.21381798386573792,
0.10831032693386078,
-0.34953808784484863,
-0.10553491115570068,
-0.07776222378015518,
0.07420250028371811,
0.14472803473472595,
-0.4900466799736023,
0.08824644237756729,
0.015952643007040024,
-0.29919856786727905,
-0.15237639844417572,
0.2757621109485626,
0.22430552542209625,
-0.11552758514881134,
0.10218317806720734,
-0.16758453845977783,
0.20226696133613586,
-0.0899585708975792,
0.09909441322088242,
-0.09472014755010605,
-0.5073535442352295,
-0.2690567672252655,
0.0019007213413715363,
0.17119437456130981,
0.23240108788013458,
-0.22986486554145813,
-0.2758556604385376,
-0.04604604095220566,
0.029614150524139404,
-0.09299372136592865,
-0.1754731982946396,
-0.0921415463089943,
0.04150480777025223,
0.1299179643392563,
0.10223440080881119,
0.05252288654446602,
-0.06415579468011856,
0.3429866433143616,
0.3477362394332886,
0.19087718427181244,
-0.10664622485637665,
0.001448359340429306,
-0.24164557456970215,
-0.10745623707771301,
0.05107463523745537,
0.7210325598716736,
-0.017765022814273834,
-0.0027941912412643433,
-0.2597799003124237,
-0.3887055814266205,
0.516632080078125,
-0.2793806791305542,
-0.0613863468170166,
0.00279761990532279,
0.17451253533363342,
0.6265734434127808,
-0.14335088431835175,
-0.6584721207618713,
0.015463851392269135,
-0.037990327924489975,
0.03672759234905243,
-0.3834739327430725,
0.30627042055130005,
-0.2717517614364624,
-0.06891172379255295,
-0.07055426388978958,
0.29271364212036133,
0.3333767056465149,
-0.10258227586746216,
0.16128186881542206,
-0.14878565073013306
] |
https://github.com/huggingface/datasets/issues/482 | Bugs : dataset.map() is frozen on ELI5 | This comes from an overflow in pyarrow's array.
It is stuck inside the loop that reduces the batch size to avoid the overflow.
I'll take a look | Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? | 27 | Bugs : dataset.map() is frozen on ELI5
Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
This comes from an overflow in pyarrow's array.
It is stuck inside the loop that reduces the batch size to avoid the overflow.
I'll take a look | [
0.005086589604616165,
-0.2545410394668579,
-0.0975886881351471,
0.10586283355951309,
0.1502094566822052,
-0.1698087453842163,
0.43429866433143616,
0.1180538684129715,
-0.28568220138549805,
0.24996572732925415,
-0.16753724217414856,
0.4118994176387787,
0.1468530148267746,
0.14851737022399902,
-0.08853156864643097,
0.19921892881393433,
-0.124599389731884,
-0.06924447417259216,
-0.1046515703201294,
-0.08540266752243042,
0.09940633177757263,
0.1942097246646881,
-0.25474515557289124,
0.0946517065167427,
-0.17530131340026855,
0.1913977563381195,
-0.04750201478600502,
0.013826791197061539,
-0.1394348442554474,
-0.3484271466732025,
0.10268799960613251,
-0.0013408400118350983,
-0.060191694647073746,
0.0998522937297821,
-0.00012873968807980418,
0.06669652462005615,
0.08527465909719467,
0.015190420672297478,
-0.032188087701797485,
0.11488963663578033,
0.34193772077560425,
-0.0924861803650856,
0.29417815804481506,
-0.22677859663963318,
0.29940274357795715,
0.20106156170368195,
0.3933568298816681,
0.29282161593437195,
0.5463505387306213,
-0.11319111287593842,
0.004286717623472214,
0.2285584956407547,
0.022993188351392746,
0.5134865641593933,
0.3447035253047943,
-0.15654173493385315,
-0.2626556158065796,
0.036051876842975616,
0.45494672656059265,
-0.24476869404315948,
0.02027139812707901,
-0.17351381480693817,
-0.14457213878631592,
-0.13096074759960175,
0.1657721996307373,
0.39255863428115845,
0.06446025520563126,
-0.6248465776443481,
0.005057141184806824,
0.1813289225101471,
0.3918077349662781,
-0.21953245997428894,
-0.05313427001237869,
-0.24844029545783997,
0.020669221878051758,
-0.3290589153766632,
0.4384993016719818,
-0.08012229204177856,
-0.16622154414653778,
0.02153783291578293,
-0.21999071538448334,
-0.038793448358774185,
-0.07636605203151703,
0.30753660202026367,
-0.009236983954906464,
0.0896170362830162,
0.10442850738763809,
0.13906435668468475,
0.036328934133052826,
0.028240913525223732,
-0.13589510321617126,
-0.1827153116464615,
0.010964866727590561,
0.33328765630722046,
-0.5986669659614563,
-0.16341650485992432,
-0.02712201327085495,
-0.06911718100309372,
0.2069692611694336,
-0.030786842107772827,
0.1467563807964325,
0.14315471053123474,
0.1338285654783249,
0.09123288094997406,
0.44367924332618713,
0.0077230799943208694,
0.1604892611503601,
0.044057995080947876,
0.27858179807662964,
-0.13720333576202393,
-0.3210589587688446,
0.1931505799293518,
-0.07008840888738632,
-0.24687960743904114,
0.08184464275836945,
-0.21113157272338867,
0.052881576120853424,
-0.2320258766412735,
0.20226038992404938,
0.1252010017633438,
-0.6203742623329163,
0.01762179285287857,
0.018280774354934692,
0.2910580337047577,
-0.07921212166547775,
-0.02182791754603386,
-0.08571402728557587,
0.04507558047771454,
-0.44828373193740845,
-0.12567424774169922,
0.09425238519906998,
-0.3879897892475128,
-0.18947985768318176,
-0.008715689182281494,
0.24952639639377594,
-0.2611214816570282,
0.14323599636554718,
-0.15229319036006927,
0.3228123188018799,
0.11615130305290222,
0.16298440098762512,
-0.06826871633529663,
0.23983237147331238,
0.0830463320016861,
0.17943179607391357,
0.153489887714386,
-0.21910490095615387,
-0.05661752074956894,
-0.0779639184474945,
0.4114333689212799,
0.023547600954771042,
-0.07278513163328171,
0.041201453655958176,
-0.027382798492908478,
-0.23596857488155365,
-0.06600093841552734,
-0.08882179111242294,
0.13083983957767487,
0.484425812959671,
-0.3778197467327118,
0.09100240468978882,
-0.2624392509460449,
-0.021513286978006363,
-0.09502816200256348,
0.33817607164382935,
0.19445252418518066,
-0.19403783977031708,
-0.02746748924255371,
-0.026571031659841537,
-0.041060920804739,
-0.11950770765542984,
0.42366957664489746,
0.003951454535126686,
0.1033085361123085,
-0.031886957585811615,
0.23161981999874115,
0.39551058411598206,
-0.20581111311912537,
-0.7310914993286133,
0.03964242711663246,
-0.2763487696647644,
-0.13628381490707397,
-0.2522527873516083,
0.06291590631008148,
0.24707546830177307,
-0.0630357414484024,
0.10724878311157227,
0.44683241844177246,
-0.2058177888393402,
0.06188373267650604,
-0.43136072158813477,
-0.2683357298374176,
-0.06334001570940018,
0.08626435697078705,
-0.14177969098091125,
-0.3473049998283386,
-0.13055670261383057,
0.18292583525180817,
-0.07555180042982101,
0.034951526671648026,
0.2099796086549759,
0.28658604621887207,
0.20293211936950684,
0.045646749436855316,
-0.03004581853747368,
-0.14397552609443665,
-0.46016180515289307,
0.026831649243831635,
-0.058640845119953156,
0.2615787386894226,
-0.12028832733631134,
0.06481797248125076,
0.23494482040405273,
0.011387547478079796,
-0.2129576951265335,
0.024354565888643265,
-0.07304796576499939,
-0.2284715473651886,
0.08371905982494354,
0.21125143766403198,
-0.001916550099849701,
-0.20659750699996948,
-0.0059792473912239075,
0.143118754029274,
-0.43884703516960144,
0.2543538808822632,
-0.1280646175146103,
-0.47701123356819153,
-0.2971021831035614,
-0.0658227726817131,
-0.38816627860069275,
-0.1865551918745041,
-0.11967092007398605,
0.10696570575237274,
-0.3498888909816742,
-0.16678990423679352,
-0.1609002649784088,
0.42712336778640747,
0.2303902506828308,
-0.35076484084129333,
0.13432537019252777,
-0.29316529631614685,
-0.029352933168411255,
-0.08422736823558807,
-0.07806981354951859,
0.22842827439308167,
-0.15942780673503876,
0.18335029482841492,
0.07038646936416626,
-0.016278255730867386,
-0.09385371208190918,
0.04679116979241371,
-0.12879055738449097,
0.12750153243541718,
0.10017825663089752,
0.3159773647785187,
0.34692901372909546,
-0.047695718705654144,
-0.08763764053583145,
0.3985716700553894,
0.8972317576408386,
0.14789022505283356,
0.049440957605838776,
0.14092405140399933,
-0.02172837406396866,
-0.12024623900651932,
-0.37467074394226074,
-0.2797940671443939,
0.24342340230941772,
0.005110473837703466,
0.02526753768324852,
-0.04283003509044647,
-0.09321409463882446,
-0.01646752655506134,
0.1810828298330307,
0.29454904794692993,
0.023980606347322464,
0.15513651072978973,
0.4825342297554016,
0.06777554750442505,
-0.11314976960420609,
-0.0568578764796257,
0.10127786546945572,
0.18298903107643127,
-0.17769406735897064,
0.10549228638410568,
0.02433404140174389,
-0.11703614145517349,
0.18922311067581177,
-0.014328218065202236,
-0.30847054719924927,
-0.3321070373058319,
0.23062483966350555,
0.17224788665771484,
-0.0961342453956604,
0.21715642511844635,
0.3602738678455353,
-0.05387623608112335,
0.14653080701828003,
-0.23797081410884857,
-0.01161876693367958,
-0.3989603519439697,
-0.4639267325401306,
-0.06463150680065155,
0.5152744650840759,
-0.09217958897352219,
-0.15297670662403107,
0.12840411067008972,
-0.42250388860702515,
0.0034481268376111984,
-0.5699741244316101,
0.28856635093688965,
-0.23673342168331146,
0.3893536925315857,
-0.08670055866241455,
0.27805230021476746,
-0.44146132469177246,
-0.1928228884935379,
0.27458006143569946,
-0.34480446577072144,
-0.3394556939601898,
0.14451822638511658,
0.0448552705347538,
0.008436527103185654,
-0.20662826299667358,
-0.5001220107078552,
-0.08403395861387253,
-0.18416880071163177,
0.3770564794540405,
-0.07467246055603027,
0.07555974274873734,
0.08479300141334534,
0.09672414511442184,
0.34397560358047485,
-0.03270924836397171,
-0.3106960952281952,
0.03953001648187637,
-0.11683068424463272,
0.3748584985733032,
-0.20844751596450806,
-0.32117950916290283,
-0.13575507700443268,
0.13084623217582703,
-0.15537713468074799,
0.02524220198392868,
-0.40531617403030396,
-0.2954767942428589,
-0.3072523772716522,
0.5448830723762512,
-0.1725352257490158,
0.03886345773935318,
0.33646833896636963,
0.27214515209198,
0.10907669365406036,
0.08709997683763504,
-0.28812772035598755,
0.3796556890010834,
0.6361579895019531,
0.06037065386772156,
-0.1144975945353508,
0.5326626896858215,
0.12682348489761353,
0.8650526404380798,
0.050132494419813156,
-0.09629051387310028,
0.18460118770599365,
0.05082093924283981,
-0.05242130532860756,
-0.4184015095233917,
0.10975220799446106,
0.15931804478168488,
-0.04449649155139923,
-0.0510261133313179,
0.2817860543727875,
-0.025239095091819763,
-0.27236437797546387,
-0.009989015758037567,
0.1290399730205536,
-0.27403905987739563,
-0.3053344488143921,
0.28337958455085754,
-0.1501798927783966,
-0.18474292755126953,
0.20238906145095825,
-0.12844902276992798,
-0.26755139231681824,
-0.38656169176101685,
-0.2657366693019867,
-0.26269692182540894,
0.3266679644584656,
-0.031001804396510124,
-0.5268402695655823,
-0.1693626195192337,
-0.45382243394851685,
0.30032557249069214,
0.2017197459936142,
0.18299558758735657,
-0.314950168132782,
-0.07964691519737244,
0.25958627462387085,
-0.35602977871894836,
0.5623478293418884,
-0.25011053681373596,
-0.007796809077262878,
0.06645931303501129,
0.16605888307094574,
-0.33648577332496643,
-0.10527487099170685,
-0.1529742330312729,
0.1791737824678421,
0.5655249357223511,
-0.2064903974533081,
-0.38480696082115173,
-0.17880095541477203,
0.3843323588371277,
0.09497439861297607,
-0.10835127532482147,
0.09490284323692322,
-0.30249112844467163,
-0.1956835389137268,
-0.3143537640571594,
-0.0694739893078804,
0.3912864029407501,
-0.008834989741444588,
-0.1087370440363884,
0.008465703576803207,
0.2198883593082428,
0.1827402412891388,
-0.07948429882526398,
0.23702101409435272,
-0.11834325641393661,
-0.17531000077724457,
0.3294096291065216,
0.2528039813041687,
-0.10599321126937866,
-0.18772101402282715,
0.29431432485580444,
-0.06273090839385986,
-0.29484158754348755,
0.48389989137649536,
-0.1536402702331543,
0.35580113530158997,
0.38291704654693604,
0.2371376007795334,
-0.08179601281881332,
-0.017795421183109283,
0.14876359701156616,
0.3896481990814209,
-0.07456105947494507,
0.49325087666511536,
0.3155471384525299,
-0.017719095572829247,
-0.16268032789230347,
0.14863860607147217,
-0.1034398227930069,
0.018936164677143097,
0.4798077940940857,
-0.14557774364948273,
-0.06431880593299866,
0.6060294508934021,
-0.03950952738523483,
0.9872859120368958,
-0.4438496232032776,
0.37686166167259216,
0.2483161985874176,
0.11661165952682495,
0.3669239282608032,
-0.2621616721153259,
0.2863929271697998,
-0.39739570021629333,
-0.2996113896369934,
0.23974652588367462,
-0.27317917346954346,
-0.24870693683624268,
0.31635457277297974,
-0.11446741223335266,
0.05103466287255287,
-0.05011014640331268,
0.22953839600086212,
0.014019420370459557,
0.23621568083763123,
0.15027621388435364,
-0.10151177644729614,
-0.442903995513916,
-0.028984762728214264,
0.03888887166976929,
0.06061698496341705,
-0.07241912931203842,
-0.16154156625270844,
-0.23183049261569977,
-0.13187852501869202,
-0.21559563279151917,
0.2171114981174469,
-0.13242067396640778,
0.09005437791347504,
0.31832560896873474,
0.004181712865829468,
0.20546595752239227,
0.6948332786560059,
0.025457635521888733,
-0.010364316403865814,
0.06926985085010529,
0.11600521206855774,
0.05540888383984566,
0.04551143944263458,
0.3793325126171112,
0.06869891285896301,
0.2638889253139496,
-0.17322948575019836,
-0.23704946041107178,
0.12127441167831421,
0.1692429780960083,
-0.24512377381324768,
-0.18218643963336945,
0.09054818749427795,
0.20083820819854736,
-0.19882506132125854,
0.08867989480495453,
-0.0004923045635223389,
-0.5018951296806335,
0.03659556433558464,
-0.04600970819592476,
-0.05205333232879639,
-0.03650616481900215,
0.38438308238983154,
-0.05958245322108269,
-0.11228606104850769,
0.07941518723964691,
0.6717554330825806,
-0.16741934418678284,
-0.1439264416694641,
0.7501493692398071,
0.26461926102638245,
-0.045282308012247086,
-0.01374419778585434,
0.1758430004119873,
-0.20189958810806274,
-0.5593944191932678,
0.060863301157951355,
-0.3067263960838318,
-0.11093199998140335,
0.1487201303243637,
0.21831001341342926,
-0.215574249625206,
-0.22422194480895996,
-0.21340201795101166,
-0.3311445116996765,
-0.30693385004997253,
0.24944448471069336,
0.05121585354208946,
-0.042965758591890335,
0.01934073492884636,
0.38123831152915955,
0.1493997573852539,
-0.09374837577342987,
-0.10940001159906387,
-0.09547651559114456,
-0.29701295495033264,
0.24600808322429657,
0.04717402160167694,
-0.4202588200569153,
0.3659627437591553,
-0.14238259196281433,
-0.04535970091819763,
0.2743968069553375,
-0.22312062978744507,
-0.09858810901641846,
0.10666142404079437,
0.21593926846981049,
-0.08182992786169052,
-0.07727045565843582,
-0.2459411770105362,
0.014640934765338898,
-0.008958648890256882,
-0.21891281008720398,
0.27811896800994873,
-0.28006887435913086,
-0.03167390078306198,
-0.032837577164173126,
-0.0027319304645061493,
0.26122739911079407,
0.0019770897924900055,
0.08468340337276459,
-0.031854815781116486,
0.030412942171096802,
0.3323303759098053,
0.3044145405292511,
0.06929081678390503,
-0.01511361449956894,
-0.269047349691391,
-0.007241211831569672,
0.10015944391489029,
0.08774830400943756,
0.2753632366657257,
-0.4385771155357361,
-0.17077161371707916,
-0.21072137355804443,
-0.11013572663068771,
0.5926232933998108,
-0.18956613540649414,
-0.38757750391960144,
0.2923758924007416,
0.017940104007720947,
0.057298704981803894,
0.12166761606931686,
0.5638591647148132,
0.04784875735640526,
-0.009114526212215424,
-0.0947175845503807,
-0.02078917995095253,
-0.08967475593090057,
0.02907611057162285,
0.2730596661567688,
0.33463239669799805,
-0.5037522315979004,
-0.008633687160909176,
0.358788400888443,
-0.060208167880773544,
0.06535214185714722,
0.08253743499517441,
-0.06080542132258415,
0.17849072813987732,
0.3039405047893524,
0.17081008851528168,
-0.21969793736934662,
-0.5023558735847473,
0.450533390045166,
0.24280241131782532,
-0.2482268065214157,
-0.3020806908607483,
0.5325146317481995,
0.31961122155189514,
0.528659462928772,
0.2846612334251404,
0.3522026538848877,
0.15086345374584198,
-0.27306708693504333,
-0.24146872758865356,
0.31654092669487,
-0.05525442212820053,
-0.07544223964214325,
-0.06735067069530487,
-0.052594199776649475,
0.0400400310754776,
0.3657519221305847,
-0.25800275802612305,
0.08492612838745117,
0.43354347348213196,
0.4367712140083313,
0.063236303627491,
-0.2560555636882782,
-0.15214130282402039,
-0.07327613979578018,
0.31500643491744995,
-0.03672380745410919,
0.39795351028442383,
-0.030454397201538086,
-0.13389341533184052,
-0.3677639663219452,
0.2811623215675354,
0.20636756718158722,
0.32324641942977905,
-0.5607473850250244,
0.4288630783557892,
0.05449460446834564,
0.02781916968524456,
-0.01978205516934395,
0.18505513668060303,
0.2880259156227112,
0.07568325102329254,
0.0303502157330513,
-0.07516659796237946,
0.003364243544638157,
-0.27478912472724915,
0.1871061474084854,
0.32223060727119446,
0.1376529186964035,
-0.2230949103832245,
0.2568221986293793,
-0.3423523008823395,
0.10554222762584686,
-0.14021074771881104,
-0.4819665849208832,
0.20168912410736084,
-0.03501533344388008,
0.020204592496156693,
0.03684135898947716,
-0.011075126938521862,
-0.005408597178757191,
0.09559647738933563,
0.6279258728027344,
0.3679855167865753,
0.23863863945007324,
-0.06410333514213562,
0.08855931460857391,
-0.4655943512916565,
0.2648676037788391,
-0.02976798638701439,
0.138942688703537,
0.3166322112083435,
0.33693474531173706,
0.15831220149993896,
0.32555097341537476,
0.2213917374610901,
-0.2028585523366928,
-0.4033806622028351,
0.56886887550354,
-0.5948472023010254,
-0.15914788842201233,
0.08633343875408173,
0.10695159435272217,
-0.11652907729148865,
-0.2735639810562134,
0.07811921089887619,
-0.22494885325431824,
-0.10059380531311035,
-0.2130751609802246,
-0.09739995747804642,
-0.058208316564559937,
0.16138869524002075,
0.24765580892562866,
0.28956711292266846,
0.1646668016910553,
0.007054973393678665,
-0.16172660887241364,
-0.12481135129928589,
-0.1267131119966507,
-0.07115170359611511,
0.09578179568052292,
0.04106990620493889,
0.050034135580062866,
-0.2549121081829071,
0.26135095953941345,
-0.2735886573791504,
0.016829809173941612,
-0.005997553467750549,
0.21234101057052612,
0.022847244516015053,
-0.30816593766212463,
0.4737381935119629,
0.2139338105916977,
-0.08597830682992935,
0.5660755038261414,
-0.06580941379070282,
-0.08027339726686478,
-0.6256959438323975,
0.13967649638652802,
0.2787378132343292,
-0.4091787040233612,
-0.1944168508052826,
0.14133049547672272,
0.10419075191020966,
0.25229912996292114,
-0.04746491461992264,
-0.4054488241672516,
-0.06264225393533707,
0.11132840812206268,
-0.13850700855255127,
-0.6580837965011597,
0.19095878303050995,
0.35451188683509827,
0.13917014002799988,
-0.2182254046201706,
0.09905785322189331,
-0.015247970819473267,
-0.10907769948244095,
-0.12036477029323578,
-0.28239428997039795
] |
https://github.com/huggingface/datasets/issues/482 | Bugs : dataset.map() is frozen on ELI5 | I created a PR to fix the issue.
It was due to an overflow check that handled badly an empty list.
You can try the changes by using
```
!pip install git+https://github.com/huggingface/nlp.git@fix-bad-type-in-overflow-check
```
Also I noticed that the first 1000 examples have an empty list in the `title_urls` field. The feature type inference in `.map` will consider it `null` because of that, and it will crash when it encounter the next example with a `title_urls` that is not empty.
Therefore to fix that, what you can do for now is increase the writer batch size so that the feature inference will take into account at least one example with a non-empty `title_urls`:
```python
# default batch size is 1_000 and it's not enough for feature type inference because of empty lists
valid_dataset = valid_dataset.map(make_input_target, writer_batch_size=3_000)
```
I was able to run the frozen cell with these changes. | Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? | 147 | Bugs : dataset.map() is frozen on ELI5
Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
I created a PR to fix the issue.
It was due to an overflow check that handled badly an empty list.
You can try the changes by using
```
!pip install git+https://github.com/huggingface/nlp.git@fix-bad-type-in-overflow-check
```
Also I noticed that the first 1000 examples have an empty list in the `title_urls` field. The feature type inference in `.map` will consider it `null` because of that, and it will crash when it encounter the next example with a `title_urls` that is not empty.
Therefore to fix that, what you can do for now is increase the writer batch size so that the feature inference will take into account at least one example with a non-empty `title_urls`:
```python
# default batch size is 1_000 and it's not enough for feature type inference because of empty lists
valid_dataset = valid_dataset.map(make_input_target, writer_batch_size=3_000)
```
I was able to run the frozen cell with these changes. | [
0.12892557680606842,
-0.3091128468513489,
-0.06825605779886246,
0.15724831819534302,
0.21350832283496857,
-0.1734551638364792,
0.35337650775909424,
0.15098926424980164,
-0.15824104845523834,
0.11419400572776794,
-0.23894557356834412,
0.45648980140686035,
0.10832149535417557,
0.12842516601085663,
-0.019269343465566635,
0.15804412961006165,
-0.1359720230102539,
0.02166666090488434,
-0.1383993774652481,
-0.12115729600191116,
0.12827275693416595,
0.3092678487300873,
-0.24753710627555847,
0.03752512112259865,
-0.1744517982006073,
0.20800988376140594,
-0.10167931765317917,
0.007208287715911865,
-0.1468411535024643,
-0.3405945897102356,
0.13644981384277344,
0.04549982398748398,
-0.1865527182817459,
0.14711008965969086,
-0.000125758713693358,
0.05471540987491608,
0.046348948031663895,
-0.03351706266403198,
-0.08429503440856934,
-0.07200285792350769,
0.30448752641677856,
-0.17940925061702728,
0.3073299527168274,
-0.1446629762649536,
0.12731972336769104,
0.3064393997192383,
0.3526679277420044,
0.2476818859577179,
0.647516131401062,
-0.10104438662528992,
0.014007851481437683,
0.34131455421447754,
0.02027735486626625,
0.5116379261016846,
0.24378779530525208,
-0.09827885031700134,
-0.34998348355293274,
0.033591996878385544,
0.3750882148742676,
-0.1832284927368164,
0.1367814987897873,
-0.06082683801651001,
-0.07392188906669617,
-0.08980488777160645,
0.19255748391151428,
0.40392667055130005,
-0.07413216680288315,
-0.6528962850570679,
-0.002179056406021118,
0.25722557306289673,
0.2794765532016754,
-0.16969695687294006,
-0.12002022564411163,
-0.3368324935436249,
0.014804837293922901,
-0.40799272060394287,
0.4944005012512207,
-0.07947053760290146,
-0.15302754938602448,
0.03170850872993469,
-0.18248970806598663,
-0.06522107124328613,
-0.013525351881980896,
0.2793024182319641,
0.059010058641433716,
0.12516945600509644,
-0.07254264503717422,
0.08671648800373077,
0.05877596139907837,
0.004024773836135864,
-0.3797970414161682,
-0.18106864392757416,
-0.011934559792280197,
0.3528052270412445,
-0.5798326134681702,
-0.2715928852558136,
-0.03273380547761917,
0.05947345867753029,
0.1253584325313568,
0.07629449665546417,
0.14301379024982452,
0.18276751041412354,
0.01882132887840271,
0.04145916923880577,
0.4148796498775482,
0.0017274711281061172,
0.2859441041946411,
0.039736244827508926,
0.26814761757850647,
-0.033296555280685425,
-0.26996326446533203,
0.16444185376167297,
-0.002388372551649809,
-0.14323098957538605,
-0.12913723289966583,
-0.20968151092529297,
0.14431683719158173,
-0.3338889479637146,
0.22385960817337036,
0.14005371928215027,
-0.52956622838974,
-0.02359655871987343,
0.04511309042572975,
0.3480333983898163,
-0.16450640559196472,
-0.01184699684381485,
-0.015461485832929611,
0.02865280769765377,
-0.4626116156578064,
-0.09209681302309036,
0.09605327993631363,
-0.4005873501300812,
-0.14622867107391357,
0.0067685311660170555,
0.2733539342880249,
-0.34866952896118164,
0.27134761214256287,
-0.14752276241779327,
0.2598331570625305,
0.10136240720748901,
0.1670905351638794,
-0.08704429864883423,
0.2051345854997635,
0.05245398357510567,
0.10028219223022461,
0.11819421499967575,
-0.13348859548568726,
-0.18945372104644775,
-0.09264081716537476,
0.20978456735610962,
0.14906910061836243,
0.015465062111616135,
0.08865126222372055,
-0.04083787649869919,
-0.24559156596660614,
-0.053561046719551086,
-0.04092971235513687,
0.2703980505466461,
0.35673484206199646,
-0.3351740837097168,
0.0605805404484272,
-0.1100202351808548,
-0.16547997295856476,
0.033664360642433167,
0.37992405891418457,
0.25181832909584045,
0.04831428453326225,
-0.2410937398672104,
0.007525802124291658,
-0.03591097518801689,
-0.2282194197177887,
0.4138219654560089,
0.06676303595304489,
-0.023256488144397736,
0.004858655855059624,
0.19884486496448517,
0.4201337397098541,
-0.21387262642383575,
-0.5843523740768433,
0.12279193848371506,
-0.2901557981967926,
-0.061170220375061035,
-0.3185208737850189,
0.057285092771053314,
0.18658408522605896,
-0.11325182020664215,
0.10861973464488983,
0.37442052364349365,
-0.1522413194179535,
0.05205786973237991,
-0.47705602645874023,
-0.22320197522640228,
-0.026508279144763947,
0.032768912613391876,
-0.1929166615009308,
-0.23366108536720276,
-0.19079649448394775,
0.297752320766449,
-0.05315665155649185,
0.04889339953660965,
0.1820814609527588,
0.356972873210907,
0.17730233073234558,
0.1362031102180481,
-0.10154370963573456,
-0.1310839056968689,
-0.5059303045272827,
0.03011368215084076,
-0.08267980813980103,
0.43688371777534485,
-0.07427826523780823,
0.04156719148159027,
0.21621492505073547,
-0.08628712594509125,
-0.20924921333789825,
-0.09071339666843414,
-0.047854892909526825,
-0.15113818645477295,
0.0789051502943039,
0.2883451581001282,
-0.07655797153711319,
-0.14627018570899963,
-0.06849626451730728,
0.229439377784729,
-0.5454392433166504,
0.2303234487771988,
-0.11011952906847,
-0.3616023361682892,
-0.2829393446445465,
0.052234165370464325,
-0.34809187054634094,
-0.19534631073474884,
-0.11996937543153763,
0.045764364302158356,
-0.40571123361587524,
-0.1182209700345993,
-0.07873757928609848,
0.3996136784553528,
0.3000272512435913,
-0.2792615592479706,
0.028800372034311295,
-0.17691390216350555,
0.05892982333898544,
-0.09941686689853668,
-0.16938981413841248,
0.30005067586898804,
-0.19115257263183594,
0.1421566605567932,
0.09374037384986877,
0.022183014079928398,
-0.07514888793230057,
0.013115141540765762,
-0.19914929568767548,
0.029185481369495392,
0.22711282968521118,
0.3052902817726135,
0.3777766525745392,
0.003916425630450249,
-0.20306359231472015,
0.28661954402923584,
0.8647704124450684,
0.2128254920244217,
0.09152304381132126,
0.14077883958816528,
0.04202516749501228,
-0.13112422823905945,
-0.33470121026039124,
-0.2349751740694046,
0.23530429601669312,
-0.036802638322114944,
0.010397370904684067,
0.047123268246650696,
-0.07231851667165756,
0.002258976921439171,
0.22686971724033356,
0.21806704998016357,
-0.07442221790552139,
0.11183778196573257,
0.40564829111099243,
0.10751298815011978,
-0.174820214509964,
0.04490376636385918,
0.07361213117837906,
0.1916545182466507,
-0.21826162934303284,
0.006442461162805557,
-0.07350225746631622,
-0.14463157951831818,
0.17908638715744019,
0.055761951953172684,
-0.4943913221359253,
-0.3087976574897766,
0.17943964898586273,
0.08684714138507843,
-0.017465397715568542,
0.2599860727787018,
0.3050742745399475,
-0.046121761202812195,
0.026666240766644478,
-0.16268612444400787,
-0.08237141370773315,
-0.37131959199905396,
-0.3768123984336853,
-0.06142336130142212,
0.48956483602523804,
0.06452441215515137,
-0.10842202603816986,
0.018737180158495903,
-0.5041586756706238,
-0.009482065215706825,
-0.6358899474143982,
0.34819212555885315,
-0.3971448540687561,
0.41285210847854614,
-0.07818278670310974,
0.2758352756500244,
-0.48644447326660156,
-0.09285037964582443,
0.3476948142051697,
-0.3571273982524872,
-0.3248540759086609,
0.064293771982193,
0.08457781374454498,
0.027451682835817337,
-0.2390640825033188,
-0.5075421929359436,
-0.07152566313743591,
-0.20047937333583832,
0.6052663922309875,
0.029333222657442093,
0.040465593338012695,
0.20196445286273956,
-0.03662634268403053,
0.42143937945365906,
-0.1367388665676117,
-0.1317186802625656,
-0.028818001970648766,
-0.15582703053951263,
0.33608758449554443,
-0.18498463928699493,
-0.32575681805610657,
-0.12655889987945557,
0.1665828377008438,
-0.12409576773643494,
-0.1564633548259735,
-0.3962709307670593,
-0.4087890684604645,
-0.35151001811027527,
0.41951656341552734,
-0.08567732572555542,
0.041609443724155426,
0.3636346161365509,
0.21455581486225128,
0.08938920497894287,
0.07691442221403122,
-0.3594811260700226,
0.41568589210510254,
0.5649591684341431,
0.08115284144878387,
-0.061819888651371,
0.5869220495223999,
0.12589778006076813,
0.7632538676261902,
0.1647181361913681,
-0.07773350179195404,
0.25830143690109253,
0.06227298080921173,
0.09869393706321716,
-0.38763168454170227,
-0.020706523209810257,
0.18241658806800842,
0.028672613203525543,
0.10558091104030609,
0.26203104853630066,
0.04949565976858139,
-0.1202005073428154,
-0.12153225392103195,
0.14443014562129974,
-0.2589602768421173,
-0.3341294527053833,
0.1795341521501541,
-0.11719962954521179,
-0.16045799851417542,
0.20354630053043365,
-0.07254654169082642,
-0.21229970455169678,
-0.40616756677627563,
-0.23262906074523926,
-0.07603903114795685,
0.3426361083984375,
-0.10498587787151337,
-0.6462792754173279,
-0.03492170572280884,
-0.5429955124855042,
0.29886072874069214,
0.1454877108335495,
0.1586165577173233,
-0.33729878067970276,
-0.07211892306804657,
0.22247368097305298,
-0.28792932629585266,
0.4114735722541809,
-0.1915261149406433,
-0.05162716656923294,
0.0511152409017086,
-0.03984501585364342,
-0.28408005833625793,
0.11399249732494354,
-0.19352513551712036,
0.13242432475090027,
0.6303718686103821,
-0.09463568031787872,
-0.5235412120819092,
-0.312153697013855,
0.3164807856082916,
0.05712082237005234,
-0.06888614594936371,
0.1559971421957016,
-0.3152287006378174,
-0.10217554867267609,
-0.4176950752735138,
-0.09692888706922531,
0.3561074137687683,
-0.07812920957803726,
-0.05426228791475296,
0.11258168518543243,
0.19858945906162262,
0.14709949493408203,
0.009738057851791382,
0.257927268743515,
-0.12695899605751038,
-0.09563782066106796,
0.3598088026046753,
0.2257261574268341,
-0.05730198323726654,
-0.38944539427757263,
0.4335393011569977,
-0.12995688617229462,
-0.37666067481040955,
0.3981061279773712,
-0.12007976323366165,
0.2812707722187042,
0.4696199297904968,
0.2516357898712158,
0.04019762948155403,
-0.04224972426891327,
0.21572503447532654,
0.3636831045150757,
-0.0476306714117527,
0.5195006728172302,
0.38408446311950684,
0.03576156497001648,
-0.1599830985069275,
0.19300970435142517,
-0.15794149041175842,
0.0557066947221756,
0.4740779399871826,
-0.004668183624744415,
0.010170651599764824,
0.488605260848999,
-0.09792055934667587,
1.0059657096862793,
-0.3302905559539795,
0.4059489071369171,
0.27139773964881897,
0.053978435695171356,
0.5820282697677612,
-0.16120868921279907,
0.22562240064144135,
-0.41887539625167847,
-0.3026840090751648,
0.20597241818904877,
-0.14480799436569214,
-0.18698081374168396,
0.22782178223133087,
-0.16913549602031708,
0.15289895236492157,
0.07528753578662872,
0.13671547174453735,
-0.03689468652009964,
0.28077688813209534,
0.03834611922502518,
-0.19777460396289825,
-0.6501986384391785,
0.00400833785533905,
-0.030605748295783997,
0.25073498487472534,
-0.043781593441963196,
-0.20377996563911438,
-0.23443906009197235,
-0.1280350387096405,
-0.1990261673927307,
0.23681476712226868,
-0.14237427711486816,
0.03589218109846115,
0.3933475911617279,
-0.030277378857135773,
0.2490171492099762,
0.7023184895515442,
0.15138337016105652,
0.05873987078666687,
-0.03257489204406738,
0.13261531293392181,
-0.11104703694581985,
0.07306971400976181,
0.36232322454452515,
0.09226499497890472,
0.24422387778759003,
-0.190202534198761,
-0.15168698132038116,
0.001315683126449585,
0.10614515841007233,
-0.21384412050247192,
-0.13222578167915344,
0.035818833857774734,
0.03918931633234024,
-0.11448843032121658,
-0.05180180445313454,
0.1280815601348877,
-0.4593140184879303,
0.00960187241435051,
-0.02411746233701706,
-0.034344688057899475,
-0.05225669965147972,
0.18234506249427795,
0.11093232035636902,
-0.12124720215797424,
0.0807991474866867,
0.6947206258773804,
-0.36716485023498535,
-0.18933852016925812,
0.7166757583618164,
0.25817564129829407,
-0.04773961380124092,
-0.05927007645368576,
0.17949995398521423,
-0.24383337795734406,
-0.6025192141532898,
0.0786593109369278,
-0.1984281837940216,
-0.21345752477645874,
0.1613488495349884,
0.3437252938747406,
-0.1560998260974884,
-0.17738643288612366,
-0.08074533939361572,
-0.21842868626117706,
-0.31174030900001526,
0.25422173738479614,
-0.0011973194777965546,
-0.030578095465898514,
-0.027650080621242523,
0.38998278975486755,
0.22049281001091003,
-0.059908248484134674,
-0.1270696222782135,
-0.030531426891684532,
-0.4184251129627228,
0.21843017637729645,
0.21046710014343262,
-0.5042172074317932,
0.4190065860748291,
-0.1174021065235138,
-0.026355808600783348,
0.2935330271720886,
-0.2947070002555847,
-0.09720536321401596,
0.04348414018750191,
0.19964370131492615,
-0.04169439524412155,
-0.09702154248952866,
-0.253835529088974,
0.09258702397346497,
-0.06535901129245758,
-0.29375702142715454,
0.20450282096862793,
-0.2466242015361786,
0.01948917657136917,
0.03614232689142227,
-0.07973247766494751,
0.3411547541618347,
0.024763569235801697,
0.03720355033874512,
-0.03880816698074341,
-0.026921704411506653,
0.32019686698913574,
0.1649169921875,
-0.007051950320601463,
0.022263720631599426,
-0.27119722962379456,
0.037297021597623825,
0.07455848157405853,
0.04698141664266586,
0.2867678105831146,
-0.32849931716918945,
-0.14813071489334106,
-0.12876059114933014,
-0.06387318670749664,
0.5036646723747253,
-0.09338796138763428,
-0.2509555518627167,
0.2977611720561981,
0.01911582611501217,
-0.01971524953842163,
0.19682590663433075,
0.5825092792510986,
0.10262860357761383,
0.06254465878009796,
-0.06727591902017593,
-0.015411723405122757,
-0.01104705035686493,
0.09162692725658417,
0.24950283765792847,
0.2788560688495636,
-0.6175307631492615,
0.05253773182630539,
0.25721776485443115,
-0.0248941108584404,
0.06494207680225372,
0.055732157081365585,
-0.04718886688351631,
0.1620466560125351,
0.15220755338668823,
0.11212308704853058,
-0.18641917407512665,
-0.5657681226730347,
0.590162992477417,
0.30839961767196655,
-0.23954762518405914,
-0.27789661288261414,
0.4732438325881958,
0.3027634620666504,
0.5327273607254028,
0.2283579558134079,
0.40410086512565613,
-0.02858293429017067,
-0.3256968855857849,
-0.23547972738742828,
0.4408736228942871,
-0.05011614412069321,
-0.14488287270069122,
-0.001507885754108429,
-0.0594525970518589,
-0.05729921534657478,
0.2851230800151825,
-0.24094516038894653,
0.06507577747106552,
0.3318474292755127,
0.4306078553199768,
0.09606949985027313,
-0.35288214683532715,
-0.2499442994594574,
-0.06059051305055618,
0.4490509331226349,
0.03334112837910652,
0.4102720320224762,
-0.04952035844326019,
-0.09782068431377411,
-0.34454283118247986,
0.3547849655151367,
0.15379668772220612,
0.25861918926239014,
-0.4484903812408447,
0.4428224265575409,
0.04770222678780556,
0.03210018575191498,
0.046963274478912354,
0.28414690494537354,
0.2792506814002991,
0.08613242954015732,
0.04262048378586769,
-0.08125632256269455,
-0.026466146111488342,
-0.27291566133499146,
0.03374728560447693,
0.2761289179325104,
0.07652588188648224,
-0.0008553862571716309,
0.19165192544460297,
-0.22939014434814453,
-0.055253684520721436,
-0.11044427007436752,
-0.5082322955131531,
0.2749863564968109,
-0.10054847598075867,
0.06653597950935364,
0.03395756334066391,
-0.09324640780687332,
0.0029775239527225494,
0.1635861098766327,
0.4926815330982208,
0.2839576005935669,
0.12275382876396179,
0.010010035708546638,
0.02887497842311859,
-0.6039531230926514,
0.15887002646923065,
0.12845028936862946,
0.11151009798049927,
0.22434832155704498,
0.29204732179641724,
0.21145538985729218,
0.35125595331192017,
0.08464005589485168,
-0.2181585431098938,
-0.21671485900878906,
0.32106083631515503,
-0.5578277707099915,
-0.07577285170555115,
0.006949968636035919,
0.07889103889465332,
-0.03570123016834259,
-0.15012113749980927,
-0.06478124856948853,
-0.08725415915250778,
-0.13532936573028564,
-0.20844271779060364,
-0.03886169195175171,
-0.22303181886672974,
0.18904083967208862,
0.09535504132509232,
0.3319295048713684,
0.09399306029081345,
-0.04536740481853485,
-0.3141002357006073,
-0.0758102685213089,
-0.1758025884628296,
-0.09343652427196503,
0.17463311553001404,
0.009501246735453606,
0.10477988421916962,
-0.23358233273029327,
0.24366231262683868,
-0.3363448679447174,
0.028992988169193268,
-0.0339806005358696,
0.2507982850074768,
-0.055337630212306976,
-0.266705721616745,
0.4273788630962372,
0.2657974362373352,
-0.07956196367740631,
0.6648863554000854,
-0.08608996868133545,
-0.08892372250556946,
-0.5790912508964539,
0.12717406451702118,
0.3910950720310211,
-0.417644202709198,
-0.09603928029537201,
0.12270059436559677,
0.11897897720336914,
0.3112988770008087,
-0.18138481676578522,
-0.5510280132293701,
-0.11442160606384277,
0.0826355367898941,
-0.20098143815994263,
-0.5723953247070312,
0.165261909365654,
0.26520904898643494,
0.09555372595787048,
-0.22204375267028809,
0.09186280518770218,
0.03566824272274971,
-0.04693244397640228,
0.021782707422971725,
-0.2249053716659546
] |
https://github.com/huggingface/datasets/issues/482 | Bugs : dataset.map() is frozen on ELI5 | @lhoestq mapping the function `make_input_target` was passed by your fixing.
However, there is another error in the final step of `valid_dataset.map(convert_to_features, batched=True)`
`ArrowInvalid: Could not convert Thepiratebay.vg with type str: converting to null type`
(The [same colab notebook above with new error message](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing#scrollTo=5sRrJ3_C8rLt))
Do you have some ideas? (I am really sorry I could not debug it by myself since I never used `pyarrow` before)
Note that `train_dataset.map(convert_to_features, batched=True)` can be run successfully even though train_dataset is 27x bigger than `valid_dataset` so I believe the problem lies in some field of `valid_dataset` again . | Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? | 94 | Bugs : dataset.map() is frozen on ELI5
Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
@lhoestq mapping the function `make_input_target` was passed by your fixing.
However, there is another error in the final step of `valid_dataset.map(convert_to_features, batched=True)`
`ArrowInvalid: Could not convert Thepiratebay.vg with type str: converting to null type`
(The [same colab notebook above with new error message](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing#scrollTo=5sRrJ3_C8rLt))
Do you have some ideas? (I am really sorry I could not debug it by myself since I never used `pyarrow` before)
Note that `train_dataset.map(convert_to_features, batched=True)` can be run successfully even though train_dataset is 27x bigger than `valid_dataset` so I believe the problem lies in some field of `valid_dataset` again . | [
0.05393783375620842,
-0.18700657784938812,
-0.07427817583084106,
0.06929221004247665,
0.18813231587409973,
-0.09184058755636215,
0.4278537631034851,
0.24305981397628784,
-0.3870013952255249,
0.12082351744174957,
-0.2542548179626465,
0.47243526577949524,
0.1759655922651291,
0.20339684188365936,
-0.1053895652294159,
0.10719273239374161,
-0.11483680456876755,
0.05791952461004257,
-0.09584151208400726,
-0.04912003129720688,
0.1031024158000946,
0.3184984028339386,
-0.25807735323905945,
0.16506341099739075,
-0.3105028569698334,
0.15009380877017975,
-0.09098537266254425,
-0.06323923170566559,
-0.2213093489408493,
-0.3299461603164673,
0.06688332557678223,
-0.04008104279637337,
-0.019135063514113426,
0.1387687623500824,
-0.000124253798276186,
0.04488983005285263,
0.048934340476989746,
-0.03960520029067993,
-0.11721839010715485,
0.051507651805877686,
0.281546950340271,
-0.09272231161594391,
0.3024715185165405,
-0.19938088953495026,
0.1215284988284111,
0.19087553024291992,
0.3395659625530243,
0.12501278519630432,
0.610243022441864,
0.007320967502892017,
0.055975671857595444,
0.269626647233963,
-0.03332056850194931,
0.40096455812454224,
0.23105964064598083,
-0.10573631525039673,
-0.4094342887401581,
-0.027909979224205017,
0.30573856830596924,
-0.07376470416784286,
0.09374234825372696,
-0.034554462879896164,
-0.004744071513414383,
-0.08903548121452332,
0.2041342854499817,
0.4473016560077667,
0.05439175292849541,
-0.7332029342651367,
0.0954589769244194,
0.14598414301872253,
0.4292941093444824,
-0.16367840766906738,
-0.08884429186582565,
-0.19961628317832947,
0.028584808111190796,
-0.43791159987449646,
0.4338603615760803,
-0.04371526837348938,
-0.15768176317214966,
0.01479727029800415,
-0.08965645730495453,
-0.06340351700782776,
-0.08217816799879074,
0.1596623659133911,
0.04510334134101868,
0.08215335011482239,
-0.010199510492384434,
0.08116340637207031,
-0.0007755309343338013,
-0.030690975487232208,
-0.2821885347366333,
-0.1224425882101059,
-0.03691582754254341,
0.3129148483276367,
-0.6525633931159973,
-0.2603001892566681,
-0.21119314432144165,
-0.012782424688339233,
0.009076066315174103,
0.048608988523483276,
0.17385782301425934,
0.14541369676589966,
0.09828250855207443,
0.03786557912826538,
0.3953721225261688,
-0.02347310073673725,
0.27440282702445984,
0.1286572962999344,
0.21450407803058624,
-0.10137522965669632,
-0.3396108150482178,
0.19721302390098572,
-0.006305327173322439,
-0.27734437584877014,
-0.004183681681752205,
-0.12965700030326843,
0.21340124309062958,
-0.3412666916847229,
0.20973370969295502,
0.06448844075202942,
-0.6048834919929504,
0.05435953289270401,
-0.030281540006399155,
0.2907118499279022,
-0.08185699582099915,
-0.0012986548244953156,
0.00036602839827537537,
0.11260685324668884,
-0.4264134168624878,
-0.10018772631883621,
0.09387185424566269,
-0.318990021944046,
-0.165936678647995,
0.025395400822162628,
0.29537779092788696,
-0.32514700293540955,
0.12666867673397064,
-0.167527973651886,
0.24119453132152557,
0.06764039397239685,
0.20050229132175446,
-0.04952869564294815,
0.1837719976902008,
0.025338945910334587,
0.042898718267679214,
0.1298454999923706,
-0.22542132437229156,
-0.1423175036907196,
-0.05210860073566437,
0.32054486870765686,
0.10217123478651047,
0.0004595443606376648,
0.05796698108315468,
-0.006416465155780315,
-0.11583644896745682,
-0.11429840326309204,
-0.09202807396650314,
0.2776230573654175,
0.3569953739643097,
-0.3189866840839386,
0.0056363120675086975,
-0.3019961714744568,
-0.0978623777627945,
0.007775620557367802,
0.4229872524738312,
0.22217237949371338,
-0.03938612341880798,
-0.18060238659381866,
0.00993417575955391,
-0.06706112623214722,
-0.163922518491745,
0.3881371021270752,
0.06714173406362534,
-0.06843278557062149,
0.048790402710437775,
0.26986658573150635,
0.5018536448478699,
-0.2360263168811798,
-0.5605533719062805,
0.0842086523771286,
-0.3151651620864868,
-0.2124069780111313,
-0.3700895309448242,
0.08822415769100189,
0.27617698907852173,
-0.10645875334739685,
0.05013549327850342,
0.3990454077720642,
-0.18929843604564667,
0.11656362563371658,
-0.4404367208480835,
-0.25468945503234863,
0.007192790508270264,
0.03879859670996666,
-0.03357278183102608,
-0.2508608102798462,
-0.14575111865997314,
0.3366515636444092,
-0.13752523064613342,
0.05088209733366966,
0.2727852761745453,
0.22175796329975128,
0.19350166618824005,
-0.07023388147354126,
-0.012520600110292435,
-0.06541939079761505,
-0.5470225214958191,
0.03469574451446533,
-0.0950000211596489,
0.42908692359924316,
-0.007294401526451111,
0.0913427323102951,
0.14630845189094543,
-0.05746830254793167,
-0.21942104399204254,
-0.11022630333900452,
0.0015855692327022552,
-0.22968566417694092,
-0.01813505031168461,
0.1705183982849121,
-0.09651710838079453,
-0.17476113140583038,
0.013686871156096458,
0.23032350838184357,
-0.41984137892723083,
0.21054872870445251,
-0.21021276712417603,
-0.43163013458251953,
-0.20279759168624878,
-0.12070801109075546,
-0.2658185064792633,
-0.13669641315937042,
-0.24712741374969482,
0.03174683451652527,
-0.29371628165245056,
-0.024292491376399994,
-0.021921396255493164,
0.44659578800201416,
0.3535357713699341,
-0.4185456931591034,
0.09606338292360306,
-0.20390404760837555,
0.05430006608366966,
-0.09442446380853653,
-0.17798221111297607,
0.19377198815345764,
-0.2655295729637146,
0.22186732292175293,
0.062249697744846344,
0.08454904705286026,
-0.0982314944267273,
0.08468601107597351,
-0.2007940262556076,
0.04031623154878616,
0.0268420297652483,
0.2826346755027771,
0.26173660159111023,
-0.03072824515402317,
-0.1640802025794983,
0.3843759000301361,
0.7712835073471069,
0.22006267309188843,
0.004162617027759552,
0.1855037808418274,
0.06849350780248642,
-0.13838833570480347,
-0.29198282957077026,
-0.2560809850692749,
0.18298926949501038,
-0.07922781258821487,
0.027756426483392715,
0.06917617470026016,
-0.11162310093641281,
0.036719031631946564,
0.2313179224729538,
0.27315282821655273,
-0.0039722854271531105,
0.08786460012197495,
0.3924006521701813,
0.12694807350635529,
-0.059685640037059784,
-0.07527010142803192,
0.14654862880706787,
0.16414199769496918,
-0.2193276584148407,
0.012542800977826118,
-0.13792668282985687,
-0.06505758315324783,
0.09025812149047852,
0.05965457111597061,
-0.31857120990753174,
-0.3496059775352478,
0.22237628698349,
0.11793088912963867,
-0.002653609961271286,
0.32696789503097534,
0.17222444713115692,
-0.022533252835273743,
0.052918627858161926,
-0.1150830015540123,
-0.0832120031118393,
-0.39234355092048645,
-0.4076898396015167,
-0.009523158892989159,
0.427797794342041,
0.1665220409631729,
-0.09663447737693787,
-0.05194670706987381,
-0.29060792922973633,
-0.11399123817682266,
-0.6097031235694885,
0.3551805317401886,
-0.37386059761047363,
0.42782872915267944,
-0.13681770861148834,
0.28604626655578613,
-0.4543642997741699,
-0.060718074440956116,
0.3598075807094574,
-0.3194214403629303,
-0.26857835054397583,
0.08633395284414291,
-0.019858038052916527,
-0.058055389672517776,
-0.15655577182769775,
-0.6044726967811584,
-0.1301189661026001,
-0.17163753509521484,
0.38831084966659546,
0.03776669129729271,
0.05772111192345619,
0.1623963713645935,
0.10009888559579849,
0.4368858337402344,
0.08363939821720123,
-0.13278476893901825,
0.07247357815504074,
-0.06842057406902313,
0.37809619307518005,
-0.23093977570533752,
-0.31763947010040283,
-0.09951348602771759,
0.21584570407867432,
-0.15009139478206635,
-0.10907406359910965,
-0.3428516387939453,
-0.3040423095226288,
-0.36142751574516296,
0.39319685101509094,
-0.08015444874763489,
-0.0459432452917099,
0.3395407497882843,
0.28749343752861023,
0.0575973242521286,
0.10201231390237808,
-0.4317057430744171,
0.4576953649520874,
0.7315329909324646,
0.07669956982135773,
-0.018351145088672638,
0.5675569772720337,
0.09972381591796875,
0.8816772103309631,
0.11158610880374908,
-0.16686473786830902,
0.2578699290752411,
0.036708198487758636,
0.04192301630973816,
-0.4832923710346222,
0.030324747785925865,
0.21135368943214417,
-0.06427799165248871,
0.02735920622944832,
0.19352802634239197,
-0.015292264521121979,
-0.19450441002845764,
-0.12089919298887253,
0.18149574100971222,
-0.22886699438095093,
-0.31780317425727844,
0.16049012541770935,
-0.223432719707489,
-0.16287687420845032,
0.16666114330291748,
-0.07318878173828125,
-0.189970925450325,
-0.3545716106891632,
-0.1877993494272232,
-0.08633993566036224,
0.3585197627544403,
-0.029125817120075226,
-0.6207334399223328,
-0.10963626950979233,
-0.43230724334716797,
0.33104056119918823,
0.1397511512041092,
0.2593168318271637,
-0.36840853095054626,
-0.07283580303192139,
0.225153848528862,
-0.2911626398563385,
0.22689637541770935,
-0.21276409924030304,
-0.09708826243877411,
0.1606951802968979,
0.04680739343166351,
-0.2511032521724701,
-0.07507234066724777,
-0.14351610839366913,
0.1912960261106491,
0.4949721097946167,
-0.12176647782325745,
-0.36681675910949707,
-0.29914557933807373,
0.3354329764842987,
0.11438479274511337,
-0.05475858971476555,
0.2381700724363327,
-0.262511670589447,
-0.06755029410123825,
-0.4722186326980591,
-0.07329178601503372,
0.40417012572288513,
-0.11681205779314041,
-0.058625176548957825,
0.06889882683753967,
0.18780039250850677,
0.13273733854293823,
0.006150700151920319,
0.3224445581436157,
-0.09954502433538437,
-0.07686783373355865,
0.404460608959198,
0.2092095911502838,
-0.0673903077840805,
-0.35263752937316895,
0.3883754014968872,
-0.06103326752781868,
-0.40783047676086426,
0.4994019865989685,
-0.14459320902824402,
0.3027718961238861,
0.4482410252094269,
0.19308136403560638,
-0.14041370153427124,
-0.006850102916359901,
0.18199318647384644,
0.37769725918769836,
0.012854496017098427,
0.5262819528579712,
0.29012373089790344,
-0.01979253627359867,
-0.12192477285861969,
0.16508591175079346,
-0.18743827939033508,
0.01833241432905197,
0.4783313572406769,
-0.028626367449760437,
0.03834187611937523,
0.5677271485328674,
0.038143206387758255,
0.9758559465408325,
-0.2699209451675415,
0.27438482642173767,
0.19873642921447754,
0.00930030643939972,
0.4218442142009735,
-0.14436206221580505,
0.26983165740966797,
-0.5266174674034119,
-0.2899625897407532,
0.24337665736675262,
-0.21693351864814758,
-0.25551530718803406,
0.1828203797340393,
-0.2217988669872284,
0.0740426704287529,
0.007711045444011688,
0.16222676634788513,
-0.011570746079087257,
0.2984125018119812,
0.11527648568153381,
-0.2819032371044159,
-0.4721389710903168,
0.048728570342063904,
-0.1049390584230423,
0.24904774129390717,
-0.0030684219673275948,
-0.1782492995262146,
-0.3353840410709381,
-0.09180830419063568,
-0.2292080670595169,
0.2933661639690399,
-0.11976222693920135,
0.10475275665521622,
0.23876389861106873,
-0.06027621030807495,
0.16003422439098358,
0.6947129368782043,
0.15007126331329346,
-0.08868451416492462,
0.016548216342926025,
0.164388507604599,
-0.0444902703166008,
0.06889689713716507,
0.4028811752796173,
0.03732798248529434,
0.2904091477394104,
-0.2089943289756775,
-0.2103516310453415,
0.07693525403738022,
0.15171504020690918,
-0.17903247475624084,
-0.15656065940856934,
-0.10596564412117004,
0.09318321943283081,
-0.0638352483510971,
0.0012964634224772453,
0.02565968781709671,
-0.5122880339622498,
0.03545869514346123,
0.015443104319274426,
-0.11626319587230682,
0.06674547493457794,
0.28268522024154663,
0.17469710111618042,
-0.10206134617328644,
0.12296521663665771,
0.6355884075164795,
-0.35032621026039124,
-0.11246711015701294,
0.7513545751571655,
0.227138951420784,
-0.03298274055123329,
-0.10538582503795624,
0.25585347414016724,
-0.30117106437683105,
-0.5768546462059021,
0.04150470346212387,
-0.3038915991783142,
-0.23068919777870178,
0.17521217465400696,
0.3404957354068756,
-0.13921910524368286,
-0.2399088442325592,
-0.07728192210197449,
-0.20007896423339844,
-0.3080742359161377,
0.21298304200172424,
-0.08999869227409363,
0.04863563925027847,
-0.10461502522230148,
0.3674401640892029,
0.18637040257453918,
-0.04124370962381363,
-0.15336653590202332,
0.012669059447944164,
-0.3003508746623993,
0.2798076272010803,
0.17588534951210022,
-0.4567359983921051,
0.27794888615608215,
-0.059913504868745804,
-0.03361601009964943,
0.31186509132385254,
-0.24658843874931335,
-0.10952126979827881,
0.017914704978466034,
0.1941848248243332,
-0.04064973443746567,
-0.09901855140924454,
-0.33050480484962463,
0.09809041768312454,
-0.14015066623687744,
-0.2644592821598053,
0.22349640727043152,
-0.249593585729599,
-0.025218196213245392,
0.10899072140455246,
-0.1077737957239151,
0.2229650318622589,
0.09805609285831451,
0.024152714759111404,
0.08002037554979324,
0.0913209319114685,
0.3303566575050354,
0.22631099820137024,
0.007386244833469391,
-0.02279496192932129,
-0.3700704574584961,
0.052556395530700684,
0.02091747522354126,
0.07196474075317383,
0.24834749102592468,
-0.33109331130981445,
-0.03879108652472496,
-0.17852933704853058,
-0.17309793829917908,
0.5225911140441895,
-0.12723782658576965,
-0.2101665437221527,
0.23996034264564514,
0.05576096475124359,
0.022592995315790176,
0.18834397196769714,
0.5434409379959106,
-0.04006414860486984,
-0.005035236477851868,
-0.08924347907304764,
0.008285339921712875,
0.03057926893234253,
0.14352662861347198,
0.24473127722740173,
0.31176260113716125,
-0.6137400269508362,
0.0980033427476883,
0.21734929084777832,
-0.06617987155914307,
0.11763057112693787,
0.06744122505187988,
-0.07327181100845337,
0.17858700454235077,
0.13441696763038635,
-0.037949055433273315,
-0.23058225214481354,
-0.4712119996547699,
0.5559192895889282,
0.42067837715148926,
-0.15224526822566986,
-0.3123299181461334,
0.44495970010757446,
0.28555959463119507,
0.47896552085876465,
0.3186172544956207,
0.3901509940624237,
-0.053782712668180466,
-0.3576964735984802,
-0.3769514858722687,
0.3257187604904175,
-0.09975650161504745,
-0.07643774151802063,
-0.017445873469114304,
-0.11039354652166367,
-0.11507675051689148,
0.2794763743877411,
-0.3362814784049988,
0.17151986062526703,
0.3045938014984131,
0.5075873136520386,
0.07873360067605972,
-0.24557997286319733,
-0.23726406693458557,
-0.07035274803638458,
0.4208487868309021,
0.03863358870148659,
0.40224748849868774,
-0.10574451088905334,
-0.10162585973739624,
-0.30666908621788025,
0.3072877526283264,
0.19769099354743958,
0.29351159930229187,
-0.6400927901268005,
0.3875576853752136,
0.13211394846439362,
-0.005911121144890785,
0.26383888721466064,
0.22802095115184784,
0.2538406252861023,
-0.05956171825528145,
0.1545858234167099,
-0.059281423687934875,
-0.02489001676440239,
-0.3027147352695465,
-0.0009211786091327667,
0.2783108949661255,
0.08328275382518768,
-0.06093239039182663,
0.21511295437812805,
-0.21643808484077454,
0.03760524094104767,
-0.12631621956825256,
-0.3947076201438904,
0.1769409477710724,
-0.13728094100952148,
-0.05082406848669052,
-0.038062162697315216,
-0.07983514666557312,
0.022410843521356583,
0.1355583816766739,
0.5751469731330872,
0.16749601066112518,
0.10273663699626923,
-0.07043010741472244,
0.1621207445859909,
-0.6096412539482117,
0.2065858542919159,
0.24510841071605682,
0.10280844569206238,
0.28632259368896484,
0.319343626499176,
0.2587866187095642,
0.4257710576057434,
0.2457888424396515,
-0.21196730434894562,
-0.15582877397537231,
0.43858519196510315,
-0.5146780610084534,
-0.03350857272744179,
0.08347383141517639,
0.16156050562858582,
-0.09928984194993973,
-0.20350876450538635,
-0.025434669107198715,
-0.12458141893148422,
-0.09277374297380447,
-0.2628902792930603,
-0.28070032596588135,
-0.06324156373739243,
0.1414945125579834,
0.22779250144958496,
0.2979293465614319,
0.12246204912662506,
-0.0314638689160347,
-0.2810342311859131,
-0.15682846307754517,
-0.21385659277439117,
-0.05363956838846207,
0.05132279545068741,
-0.031286995857954025,
0.12453630566596985,
-0.07997996360063553,
0.3601015508174896,
-0.42781776189804077,
-0.04019999876618385,
-0.0839041993021965,
0.281006783246994,
-0.07737019658088684,
-0.23695094883441925,
0.39890819787979126,
0.2445238083600998,
-0.03964141011238098,
0.5937415957450867,
-0.0521085187792778,
-0.030617941170930862,
-0.6759061217308044,
0.08819176256656647,
0.32995134592056274,
-0.3246210515499115,
-0.15717270970344543,
0.16680662333965302,
0.07937691360712051,
0.33830323815345764,
0.08518125116825104,
-0.45677971839904785,
-0.05004677549004555,
0.06780040264129639,
-0.25925764441490173,
-0.5594132542610168,
0.14714932441711426,
0.40320518612861633,
0.16898663341999054,
-0.22048640251159668,
0.13166114687919617,
-0.04635459929704666,
0.05226767063140869,
-0.26009035110473633,
-0.21892522275447845
] |
https://github.com/huggingface/datasets/issues/482 | Bugs : dataset.map() is frozen on ELI5 | I got this issue too and fixed it by specifying `writer_batch_size=3_000` in `.map`.
This is because Arrow didn't expect `Thepiratebay.vg` in `title_urls `, as all previous examples have empty lists in `title_urls ` | Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? | 33 | Bugs : dataset.map() is frozen on ELI5
Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
I got this issue too and fixed it by specifying `writer_batch_size=3_000` in `.map`.
This is because Arrow didn't expect `Thepiratebay.vg` in `title_urls `, as all previous examples have empty lists in `title_urls ` | [
0.08828788995742798,
-0.082216277718544,
-0.08991120755672455,
0.10879293084144592,
0.11859827488660812,
-0.08892400562763214,
0.47578760981559753,
0.20818977057933807,
-0.2753663957118988,
0.1408063769340515,
-0.21474117040634155,
0.4715830087661743,
0.1646786481142044,
0.06168188899755478,
-0.11624224483966827,
0.1537865400314331,
-0.15851420164108276,
0.03611043840646744,
-0.043518148362636566,
-0.09424857795238495,
0.0881529301404953,
0.30649733543395996,
-0.3244805932044983,
0.13710665702819824,
-0.24131296575069427,
0.20197537541389465,
-0.06759877502918243,
-0.04923345148563385,
-0.13386748731136322,
-0.3987387716770172,
0.09028970450162888,
0.0110530536621809,
-0.053994134068489075,
0.15215075016021729,
-0.00012681036605499685,
0.06411424279212952,
0.12590646743774414,
-0.04473869502544403,
-0.07887373864650726,
0.051874637603759766,
0.24802938103675842,
-0.03010989911854267,
0.38392215967178345,
-0.22320562601089478,
0.19976657629013062,
0.20427754521369934,
0.3820059597492218,
0.09851112961769104,
0.564493715763092,
-0.09399257600307465,
0.014540590345859528,
0.2681627571582794,
-0.08777265250682831,
0.4349066913127899,
0.29067134857177734,
-0.16804279386997223,
-0.3519190549850464,
-0.040006957948207855,
0.3742504119873047,
-0.09233428537845612,
0.0832194909453392,
-0.047949984669685364,
-0.02009011059999466,
-0.045948680490255356,
0.12649907171726227,
0.4776400029659271,
0.03314382955431938,
-0.7292938232421875,
0.11014845967292786,
0.23973819613456726,
0.459066241979599,
-0.16017872095108032,
-0.09122779965400696,
-0.1838965117931366,
0.00883348099887371,
-0.3579070270061493,
0.45059236884117126,
-0.029941784217953682,
-0.09013503789901733,
0.018538888543844223,
-0.07432162016630173,
-0.040401555597782135,
-0.08833947777748108,
0.2276087999343872,
0.10974064469337463,
0.11798146367073059,
0.02005423605442047,
0.1539660543203354,
-0.059044014662504196,
0.01568194478750229,
-0.18644337356090546,
-0.2057792842388153,
-0.1096617728471756,
0.32395341992378235,
-0.6241593956947327,
-0.2234712541103363,
-0.15155652165412903,
-0.07372821122407913,
0.03156276419758797,
0.06606841832399368,
0.23268669843673706,
0.21300426125526428,
0.10603062063455582,
0.05762249231338501,
0.40971487760543823,
-0.059415947645902634,
0.359440416097641,
0.15252597630023956,
0.29011455178260803,
-0.08995448052883148,
-0.3181605935096741,
0.1908804178237915,
-0.05225880444049835,
-0.23663094639778137,
0.001913897693157196,
-0.17777112126350403,
0.10454080998897552,
-0.29113250970840454,
0.26938772201538086,
0.07566546648740768,
-0.612269937992096,
-0.012722354382276535,
-0.03528476879000664,
0.3106814920902252,
-0.13874530792236328,
-0.01906539499759674,
-0.042042359709739685,
0.04419311136007309,
-0.371921569108963,
-0.05985812842845917,
0.086792953312397,
-0.445823073387146,
-0.12685196101665497,
0.029203809797763824,
0.2845354378223419,
-0.2773240804672241,
0.2217060625553131,
-0.23485854268074036,
0.20518648624420166,
0.06493864953517914,
0.28846269845962524,
-0.019945437088608742,
0.18998737633228302,
0.06483089923858643,
0.13713698089122772,
0.20411117374897003,
-0.27991020679473877,
-0.1149774119257927,
-0.09125850349664688,
0.3285953402519226,
0.053003981709480286,
-0.0008447654545307159,
0.08817119151353836,
-0.061569806188344955,
-0.14742892980575562,
-0.09721209108829498,
-0.032678715884685516,
0.15814845263957977,
0.35671982169151306,
-0.2990536093711853,
0.09318329393863678,
-0.16066691279411316,
-0.07425734400749207,
-0.01578635536134243,
0.36953800916671753,
0.24574299156665802,
-0.011289123445749283,
-0.18034309148788452,
-0.06444074958562851,
-0.0077453553676605225,
-0.21455621719360352,
0.3933410942554474,
0.017315855249762535,
-0.051456891000270844,
0.05834715813398361,
0.2661234736442566,
0.48616135120391846,
-0.22090895473957062,
-0.5594334602355957,
0.1241099163889885,
-0.2801664471626282,
-0.2539256811141968,
-0.3275471329689026,
0.07454974204301834,
0.29650983214378357,
-0.10458699613809586,
0.07226640731096268,
0.3634413480758667,
-0.09346749633550644,
0.033276356756687164,
-0.4079681634902954,
-0.3176833987236023,
-0.0736907348036766,
0.016757287085056305,
-0.10661043226718903,
-0.33475756645202637,
-0.1468246579170227,
0.21556729078292847,
-0.07632701843976974,
0.04715259373188019,
0.29311078786849976,
0.32030171155929565,
0.1911579966545105,
-0.012834273278713226,
0.009058065712451935,
-0.004215450957417488,
-0.5717057585716248,
0.09013890475034714,
-0.07802765816450119,
0.30076128244400024,
-0.0625002533197403,
0.04686225205659866,
0.23475438356399536,
-0.04515736550092697,
-0.22326095402240753,
-0.13619887828826904,
-0.06943339109420776,
-0.23991355299949646,
-0.010920222848653793,
0.23015792667865753,
-0.0736904889345169,
-0.31397390365600586,
-0.008087754249572754,
0.184016615152359,
-0.37488487362861633,
0.161441832780838,
-0.1260194033384323,
-0.3616594672203064,
-0.25819283723831177,
-0.0989924892783165,
-0.3698389530181885,
-0.16569416224956512,
-0.16134613752365112,
0.06326271593570709,
-0.3258746564388275,
-0.015322171151638031,
0.026987407356500626,
0.416450172662735,
0.2937580645084381,
-0.41947078704833984,
0.12388487905263901,
-0.1380821019411087,
0.09722387045621872,
-0.09550704061985016,
-0.186975359916687,
0.18914049863815308,
-0.2533552944660187,
0.2792418897151947,
0.09496916830539703,
0.03883867710828781,
-0.08843666315078735,
0.060059044510126114,
-0.15941469371318817,
-0.01192520186305046,
0.058818269520998,
0.30349990725517273,
0.3837774097919464,
0.0009231660515069962,
-0.08798354864120483,
0.3538544178009033,
0.8066470623016357,
0.22375425696372986,
0.0310286283493042,
0.15390360355377197,
-0.00205983966588974,
-0.11634502559900284,
-0.3227664828300476,
-0.24877586960792542,
0.17056655883789062,
-0.08707954734563828,
0.022992413491010666,
-0.0028442293405532837,
-0.06160314381122589,
-0.0714261382818222,
0.25231024622917175,
0.30503764748573303,
0.04145875573158264,
0.0712847039103508,
0.37090983986854553,
0.12042836099863052,
-0.05787132680416107,
-0.11692735552787781,
0.16720426082611084,
0.12589573860168457,
-0.1920570284128189,
0.01190473698079586,
-0.0655372217297554,
0.0032774433493614197,
0.18123599886894226,
0.03103618696331978,
-0.32197320461273193,
-0.2996348440647125,
0.20127737522125244,
0.04193734750151634,
-0.06657896935939789,
0.29934823513031006,
0.15964838862419128,
-0.07704873383045197,
0.05526282638311386,
-0.14538446068763733,
-0.05747932568192482,
-0.49031195044517517,
-0.3879301846027374,
-0.046106670051813126,
0.43493708968162537,
0.06950780004262924,
-0.15483416616916656,
-0.0031805727630853653,
-0.3482361435890198,
-0.05577721446752548,
-0.6003727316856384,
0.34529542922973633,
-0.31942301988601685,
0.3828045725822449,
-0.1645488142967224,
0.2790253758430481,
-0.46310222148895264,
-0.036703117191791534,
0.3109874427318573,
-0.3287285566329956,
-0.2486945539712906,
0.06507652997970581,
0.017602095380425453,
-0.07215689867734909,
-0.18474537134170532,
-0.5815077424049377,
-0.04769086092710495,
-0.15397895872592926,
0.45270222425460815,
-0.004160400480031967,
0.05964093655347824,
0.12430799007415771,
0.07470150291919708,
0.4305661916732788,
0.029844550415873528,
-0.19164294004440308,
0.1210583746433258,
-0.1054958701133728,
0.40083977580070496,
-0.21933521330356598,
-0.3028165102005005,
-0.07815087586641312,
0.16285336017608643,
-0.12729215621948242,
-0.09849513322114944,
-0.3735530972480774,
-0.19858473539352417,
-0.3790394067764282,
0.3669738173484802,
-0.07187432795763016,
-0.016755221411585808,
0.37938591837882996,
0.3064514696598053,
0.07222793996334076,
0.0580986887216568,
-0.38914456963539124,
0.5050686597824097,
0.6757677793502808,
0.009298168122768402,
-0.008965473622083664,
0.5026329159736633,
0.07091143727302551,
0.9094944596290588,
0.11675763130187988,
-0.088028684258461,
0.22450697422027588,
0.0675017237663269,
0.028424877673387527,
-0.3903765380382538,
0.1601771116256714,
0.1316402703523636,
-0.04012425243854523,
0.03880736231803894,
0.23642846941947937,
0.03804927319288254,
-0.24840493500232697,
-0.12274013459682465,
0.19511474668979645,
-0.28752782940864563,
-0.3168260157108307,
0.1847688853740692,
-0.2551834285259247,
-0.16882511973381042,
0.1740373820066452,
-0.07659807056188583,
-0.17800870537757874,
-0.37518200278282166,
-0.19984886050224304,
-0.19061075150966644,
0.3779658079147339,
-0.1055290549993515,
-0.6005117297172546,
-0.046304140239953995,
-0.4620147943496704,
0.31743156909942627,
0.12002619355916977,
0.22380080819129944,
-0.2955447733402252,
-0.05640662834048271,
0.24464529752731323,
-0.3228532075881958,
0.25903046131134033,
-0.2851577699184418,
-0.049256831407547,
0.16127294301986694,
0.06852158159017563,
-0.3726625442504883,
-0.0046677738428115845,
-0.17730793356895447,
0.17472071945667267,
0.4599044919013977,
-0.22815385460853577,
-0.39757558703422546,
-0.31053996086120605,
0.23595279455184937,
0.03750945255160332,
-0.06589967757463455,
0.17336466908454895,
-0.2594772279262543,
-0.018364356830716133,
-0.41758328676223755,
-0.1261865496635437,
0.3429458737373352,
-0.16509798169136047,
-0.06108006834983826,
0.011226754635572433,
0.17401453852653503,
0.13274401426315308,
-0.05990512669086456,
0.29885217547416687,
-0.11465558409690857,
-0.1276056170463562,
0.44246265292167664,
0.30409470200538635,
-0.06188410520553589,
-0.3205317258834839,
0.35525161027908325,
-0.09547753632068634,
-0.36605748534202576,
0.4882127046585083,
-0.2189038246870041,
0.3159548342227936,
0.4747319221496582,
0.21333009004592896,
-0.035787858068943024,
-0.02340642735362053,
0.144772469997406,
0.41863083839416504,
-0.06039944291114807,
0.5418789386749268,
0.2795417606830597,
-0.01612163335084915,
-0.12862730026245117,
0.17256638407707214,
-0.17083822190761566,
-0.035518381744623184,
0.6318179368972778,
-0.11379118263721466,
0.0038765231147408485,
0.5671451091766357,
0.06367005407810211,
0.937365710735321,
-0.2821105122566223,
0.3562493920326233,
0.1291276067495346,
-0.03945131599903107,
0.40747445821762085,
-0.12942709028720856,
0.26502010226249695,
-0.4918096959590912,
-0.21748502552509308,
0.2199116051197052,
-0.21496865153312683,
-0.2647094428539276,
0.27472054958343506,
-0.15673837065696716,
0.05069790035486221,
-0.0032424628734588623,
0.19922244548797607,
-0.026116469874978065,
0.29226231575012207,
0.11354411393404007,
-0.25822097063064575,
-0.39263784885406494,
-0.010196981951594353,
-0.005129396915435791,
0.17105633020401,
-0.06187452748417854,
-0.1705610603094101,
-0.34961408376693726,
-0.09659689664840698,
-0.1793382465839386,
0.2796676456928253,
-0.18149198591709137,
0.14459142088890076,
0.24556341767311096,
-0.03412199765443802,
0.17030413448810577,
0.7178614735603333,
0.06091513857245445,
-0.05059952661395073,
-0.030788389965891838,
0.2548999786376953,
-0.012406200170516968,
0.08873644471168518,
0.3964915871620178,
0.034457847476005554,
0.22118057310581207,
-0.18015068769454956,
-0.23988109827041626,
0.04774884134531021,
0.10241016000509262,
-0.23378892242908478,
-0.1609707474708557,
0.04781679809093475,
0.13982278108596802,
0.02270738035440445,
-0.06232487037777901,
0.07402069121599197,
-0.5765266418457031,
0.05392230674624443,
-0.01863294094800949,
-0.054705165326595306,
0.09971032291650772,
0.2908629775047302,
0.13462527096271515,
-0.17073719203472137,
0.11365748941898346,
0.6775933504104614,
-0.3244548439979553,
-0.10862624645233154,
0.7458803653717041,
0.17956335842609406,
0.001409582793712616,
-0.09491641819477081,
0.2476830780506134,
-0.24787107110023499,
-0.6283720135688782,
0.03375751152634621,
-0.24838878214359283,
-0.21200594305992126,
0.23437930643558502,
0.3080371022224426,
-0.19999809563159943,
-0.19756320118904114,
-0.1469414383172989,
-0.24123433232307434,
-0.2423957735300064,
0.24985283613204956,
-0.05834587290883064,
0.006816010922193527,
-0.1725539267063141,
0.2741122543811798,
0.20160768926143646,
-0.08816719055175781,
-0.10533538460731506,
0.07645249366760254,
-0.26921382546424866,
0.27434974908828735,
0.10369613766670227,
-0.36917659640312195,
0.41516971588134766,
-0.1232328861951828,
-0.07575532048940659,
0.27671629190444946,
-0.2741018831729889,
-0.08304675668478012,
-0.016344506293535233,
0.2227386236190796,
-0.0710495114326477,
-0.10543511062860489,
-0.3280332088470459,
0.04088439792394638,
-0.14281904697418213,
-0.28723248839378357,
0.21286708116531372,
-0.29004746675491333,
-0.04481493681669235,
0.004210359416902065,
-0.0880880206823349,
0.28889578580856323,
-0.06186796724796295,
0.10174498707056046,
-0.021791711449623108,
0.07685330510139465,
0.31403541564941406,
0.19666172564029694,
0.05446486920118332,
-0.007614590227603912,
-0.2682601511478424,
0.010535463690757751,
-0.05051469802856445,
0.09355171024799347,
0.29865577816963196,
-0.33370763063430786,
-0.0411006398499012,
-0.18842418491840363,
-0.14770767092704773,
0.595375657081604,
-0.09768112003803253,
-0.33530381321907043,
0.23714527487754822,
0.02605869621038437,
0.08232394605875015,
0.20018474757671356,
0.5208039879798889,
0.06389664113521576,
0.012135017663240433,
-0.13590377569198608,
-0.006377607583999634,
-0.03246370330452919,
0.10205492377281189,
0.3046659827232361,
0.2812546193599701,
-0.6254977583885193,
0.0814250111579895,
0.25584062933921814,
-0.02149927243590355,
0.1413768082857132,
0.04496392980217934,
-0.0664561539888382,
0.25021156668663025,
0.14686903357505798,
0.09697912633419037,
-0.22329263389110565,
-0.3549111783504486,
0.5749953389167786,
0.327297568321228,
-0.21096180379390717,
-0.2955942451953888,
0.39839500188827515,
0.29514646530151367,
0.5204440951347351,
0.3410266041755676,
0.4236568510532379,
0.03084617108106613,
-0.29346394538879395,
-0.3252938985824585,
0.28237539529800415,
-0.019791286438703537,
-0.12606780230998993,
-0.04599859565496445,
-0.11142981052398682,
-0.05307123810052872,
0.29950186610221863,
-0.30303141474723816,
0.1652936190366745,
0.3224516212940216,
0.49590981006622314,
0.04240243881940842,
-0.3634294867515564,
-0.19484815001487732,
-0.06756460666656494,
0.4407273232936859,
0.0173916257917881,
0.37312617897987366,
-0.10212951898574829,
-0.10704223811626434,
-0.3444981276988983,
0.2899489104747772,
0.11523542553186417,
0.2705463171005249,
-0.5767049193382263,
0.42797139286994934,
0.1324663907289505,
0.0330880805850029,
0.18973729014396667,
0.2066238969564438,
0.3099293112754822,
-0.11026453971862793,
0.09747321903705597,
-0.08491672575473785,
-0.0020610885694622993,
-0.28660696744918823,
0.07054940611124039,
0.3329073488712311,
0.1678404062986374,
-0.10490327328443527,
0.20679043233394623,
-0.279998779296875,
0.07624688744544983,
-0.09785331040620804,
-0.41347214579582214,
0.22586238384246826,
-0.11822792887687683,
-0.11131075769662857,
-0.05209046229720116,
-0.13249386847019196,
-0.0013125669211149216,
0.12766218185424805,
0.6129341125488281,
0.19306516647338867,
0.12462236732244492,
-0.026707831770181656,
0.08256040513515472,
-0.585353434085846,
0.19251933693885803,
0.13872338831424713,
0.20849044620990753,
0.2797999680042267,
0.31354230642318726,
0.2333827018737793,
0.3741554617881775,
0.2446383833885193,
-0.1770494282245636,
-0.24622152745723724,
0.41912132501602173,
-0.6102460026741028,
0.010173795744776726,
0.07435254007577896,
0.1879318207502365,
-0.10642549395561218,
-0.22507774829864502,
-0.023004259914159775,
-0.1562497913837433,
-0.13905364274978638,
-0.274395227432251,
-0.26823747158050537,
-0.023182332515716553,
0.1495165228843689,
0.3450479507446289,
0.23636479675769806,
0.06823588162660599,
-0.03001236543059349,
-0.2721799612045288,
-0.14449542760849,
-0.21297135949134827,
0.01347807701677084,
0.09942968934774399,
0.06853103637695312,
0.0575655996799469,
-0.19697411358356476,
0.2914000153541565,
-0.3510700762271881,
-0.017967380583286285,
-0.14659664034843445,
0.3190271556377411,
-0.03367193788290024,
-0.30934685468673706,
0.40596556663513184,
0.2705378234386444,
-0.08233235776424408,
0.592195451259613,
-0.1156926304101944,
-0.09279568493366241,
-0.6072291731834412,
0.1054435670375824,
0.31321877241134644,
-0.3774879276752472,
-0.13973672688007355,
0.16716311872005463,
0.14995016157627106,
0.33852311968803406,
0.04983486980199814,
-0.42704927921295166,
-0.027514971792697906,
0.11067193001508713,
-0.2297031581401825,
-0.6133557558059692,
0.061075370758771896,
0.4153716564178467,
0.1881696581840515,
-0.23352685570716858,
0.1861010193824768,
-0.04592675715684891,
-0.030169669538736343,
-0.2157278209924698,
-0.24376779794692993
] |
https://github.com/huggingface/datasets/issues/482 | Bugs : dataset.map() is frozen on ELI5 | I'm getting a hanging `dataset.map()` when running a gradio app with `gradio` for auto-reloading instead of `python` | Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? | 17 | Bugs : dataset.map() is frozen on ELI5
Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
I'm getting a hanging `dataset.map()` when running a gradio app with `gradio` for auto-reloading instead of `python` | [
0.054497335106134415,
-0.07225614786148071,
-0.09309417009353638,
0.07903148978948593,
0.23455432057380676,
-0.06257566809654236,
0.5091227293014526,
0.12650667130947113,
-0.24339497089385986,
0.11168356984853745,
-0.28477856516838074,
0.4507570266723633,
0.17645666003227234,
0.09461195021867752,
-0.10485225915908813,
0.13022834062576294,
-0.13070514798164368,
0.0047128647565841675,
-0.04245689511299133,
-0.06355461478233337,
0.08476826548576355,
0.3145501911640167,
-0.28321921825408936,
0.14630544185638428,
-0.29459041357040405,
0.15491601824760437,
-0.11281886696815491,
-0.002154707908630371,
-0.12175951153039932,
-0.3579419255256653,
0.1687871515750885,
0.1200094074010849,
-0.125459223985672,
0.17295263707637787,
-0.00012553657870739698,
0.05254192650318146,
0.03156864643096924,
0.03090864233672619,
-0.11298796534538269,
-0.004271194338798523,
0.256628155708313,
-0.047694168984889984,
0.34961646795272827,
-0.18032175302505493,
0.17937681078910828,
0.21715420484542847,
0.38894063234329224,
0.09541958570480347,
0.5674861669540405,
-0.10136488080024719,
0.029565317556262016,
0.18166474997997284,
-0.10847125947475433,
0.356180340051651,
0.1852222979068756,
-0.13966532051563263,
-0.3348250091075897,
0.024530023336410522,
0.38963520526885986,
-0.09872942417860031,
0.08671241253614426,
-0.10694313049316406,
-0.08691257983446121,
-0.0673028975725174,
0.15000306069850922,
0.40922075510025024,
-0.011439681053161621,
-0.7129092216491699,
0.161893829703331,
0.2158016562461853,
0.4515179991722107,
-0.18796685338020325,
-0.166402205824852,
-0.21903863549232483,
0.08513174951076508,
-0.3137134313583374,
0.493770033121109,
-0.07550603151321411,
-0.08814515173435211,
0.0547911711037159,
-0.11699120700359344,
-0.04595395177602768,
-0.026681743562221527,
0.1985570341348648,
0.01759304106235504,
0.20981904864311218,
0.0008769012056291103,
0.13297119736671448,
-0.029210593551397324,
-0.015313629060983658,
-0.2839999496936798,
-0.18192942440509796,
-0.031328316777944565,
0.29889798164367676,
-0.6530930995941162,
-0.18054012954235077,
-0.13464957475662231,
-0.0207320898771286,
0.07221265137195587,
0.12013644725084305,
0.13101938366889954,
0.2085181176662445,
0.046009551733732224,
0.02861625887453556,
0.47524669766426086,
-0.12125378847122192,
0.2550118565559387,
0.12970729172229767,
0.3095971345901489,
-0.11468734592199326,
-0.4120561182498932,
0.15879616141319275,
-0.05225614458322525,
-0.14728227257728577,
-0.011123597621917725,
-0.21787479519844055,
0.16683052480220795,
-0.333507776260376,
0.2733962833881378,
0.062459953129291534,
-0.6733739376068115,
0.037237633019685745,
0.018545877188444138,
0.3246661424636841,
-0.1916726976633072,
0.035985857248306274,
-0.048950690776109695,
0.012435805052518845,
-0.4313581585884094,
-0.07472687214612961,
0.10671507567167282,
-0.46692270040512085,
-0.12119263410568237,
-0.008174484595656395,
0.270600825548172,
-0.3708752989768982,
0.21129900217056274,
-0.17265532910823822,
0.22368258237838745,
0.13955295085906982,
0.2568874657154083,
-0.07654371857643127,
0.13104595243930817,
0.11149537563323975,
0.13864947855472565,
0.18794937431812286,
-0.2709677219390869,
-0.17551124095916748,
-0.09547161310911179,
0.24510124325752258,
0.21105358004570007,
0.041430409997701645,
0.13135969638824463,
-0.03968727961182594,
-0.11721676588058472,
-0.13018696010112762,
0.05226009339094162,
0.14677563309669495,
0.34194880723953247,
-0.35020965337753296,
0.02301647514104843,
-0.2578502893447876,
-0.1129959300160408,
-0.06150361895561218,
0.4537680149078369,
0.21140609681606293,
0.08073937892913818,
-0.2078695148229599,
-0.07184122502803802,
-0.07643315196037292,
-0.27347442507743835,
0.3795351982116699,
0.12468913197517395,
-0.03161081671714783,
0.05575107783079147,
0.17765609920024872,
0.4352814555168152,
-0.23869989812374115,
-0.6073096990585327,
0.13055382668972015,
-0.24851152300834656,
-0.09632150828838348,
-0.3433244526386261,
0.1428358256816864,
0.21864593029022217,
-0.07955087721347809,
0.15561798214912415,
0.4814532995223999,
-0.1824266016483307,
0.07493553310632706,
-0.35902678966522217,
-0.2095818668603897,
-0.040689922869205475,
0.17904996871948242,
-0.08345939218997955,
-0.2678963541984558,
-0.17776593565940857,
0.25935032963752747,
-0.12084614485502243,
0.09469090402126312,
0.19291040301322937,
0.21773743629455566,
0.23037214577198029,
0.011697128415107727,
-0.10489578545093536,
-0.03237210959196091,
-0.6175157427787781,
0.09138723462820053,
0.06441843509674072,
0.2624751925468445,
-0.04403470456600189,
0.05333927273750305,
0.25387972593307495,
-0.04517948254942894,
-0.2918040454387665,
-0.06322525441646576,
-0.061286866664886475,
-0.15887877345085144,
0.06798060238361359,
0.33050549030303955,
-0.034246042370796204,
-0.12518703937530518,
0.03911852091550827,
0.21545803546905518,
-0.401865154504776,
0.11903241276741028,
-0.09747489541769028,
-0.3909562826156616,
-0.23528191447257996,
-0.03185972571372986,
-0.42722782492637634,
-0.1894022822380066,
-0.17821219563484192,
0.09169560670852661,
-0.3079635798931122,
-0.10036042332649231,
-0.009550344198942184,
0.5108785629272461,
0.2671644389629364,
-0.22982391715049744,
0.10699208080768585,
-0.24084590375423431,
0.019388388842344284,
-0.12276145815849304,
-0.19504746794700623,
0.21234431862831116,
-0.21504510939121246,
0.19954657554626465,
0.10123187303543091,
0.05140870809555054,
-0.016317669302225113,
0.08215388655662537,
-0.2576178312301636,
0.03670299053192139,
0.07937247306108475,
0.2916323244571686,
0.4442119896411896,
-0.015099281445145607,
-0.20566341280937195,
0.33899012207984924,
0.8046047687530518,
0.23570549488067627,
0.05700388923287392,
0.08807916194200516,
0.04682563245296478,
-0.0985536053776741,
-0.4008285403251648,
-0.2299668788909912,
0.24503988027572632,
-0.05951441451907158,
0.04968658462166786,
0.08069976419210434,
-0.092063307762146,
-0.018501948565244675,
0.13360810279846191,
0.3757230043411255,
-0.08823388814926147,
0.08018418401479721,
0.36972546577453613,
0.11840464919805527,
-0.002301957458257675,
-0.07654714584350586,
0.08743094652891159,
0.1789618283510208,
-0.11305025219917297,
0.06450781226158142,
-0.09655194729566574,
-0.010858366265892982,
0.24801282584667206,
-0.011073802597820759,
-0.35838013887405396,
-0.3578299582004547,
0.1764552742242813,
0.09223954379558563,
-0.01714448444545269,
0.35338330268859863,
0.2032288759946823,
-0.02275332808494568,
0.0425548180937767,
-0.05890510231256485,
-0.07349000871181488,
-0.4095945656299591,
-0.3528536260128021,
-0.05389907956123352,
0.5127176642417908,
0.06682796776294708,
-0.005261747166514397,
0.006009532138705254,
-0.3383162021636963,
-0.06784303486347198,
-0.5485014319419861,
0.33648890256881714,
-0.35151755809783936,
0.4387178122997284,
-0.0879809707403183,
0.20612409710884094,
-0.4463616609573364,
-0.04972154647111893,
0.38077834248542786,
-0.3855527937412262,
-0.2085239589214325,
0.021952282637357712,
0.09701461344957352,
-0.002444231417030096,
-0.13794566690921783,
-0.5530946850776672,
-0.12575353682041168,
-0.21022753417491913,
0.4864751696586609,
0.028152164071798325,
0.007908686995506287,
0.14118613302707672,
0.06400062888860703,
0.4056236445903778,
0.01722208596765995,
-0.1268383413553238,
0.07051550596952438,
-0.19619575142860413,
0.31947246193885803,
-0.22609509527683258,
-0.285218209028244,
-0.07401680946350098,
0.2160913199186325,
-0.11207742989063263,
-0.08100373297929764,
-0.39719271659851074,
-0.25462251901626587,
-0.3252108693122864,
0.4345879852771759,
-0.09713682532310486,
-0.0946475937962532,
0.2809779644012451,
0.2524765729904175,
0.09074195474386215,
0.11761551350355148,
-0.3736536204814911,
0.40176740288734436,
0.6177229881286621,
0.015974916517734528,
-0.027450457215309143,
0.5758388638496399,
0.04848962649703026,
0.8476993441581726,
0.0977863073348999,
-0.19761520624160767,
0.17372356355190277,
0.0950784757733345,
0.07670725882053375,
-0.5221390128135681,
0.05186188220977783,
0.1041136085987091,
-0.007708922028541565,
0.041213907301425934,
0.2954598665237427,
0.050203852355480194,
-0.15337054431438446,
-0.1473139524459839,
0.17937052249908447,
-0.23388704657554626,
-0.36481547355651855,
0.13749949634075165,
-0.24699324369430542,
-0.1350526511669159,
0.1587195098400116,
-0.05015699565410614,
-0.1442885398864746,
-0.24400413036346436,
-0.1924576610326767,
-0.09562236070632935,
0.39381876587867737,
-0.11327886581420898,
-0.5820176005363464,
-0.08149528503417969,
-0.4093587398529053,
0.28530046343803406,
0.12510374188423157,
0.15843841433525085,
-0.4025498032569885,
-0.11174432188272476,
0.2524276375770569,
-0.3377258777618408,
0.2586723566055298,
-0.3265538215637207,
-0.1331227719783783,
0.24599960446357727,
-0.06270067393779755,
-0.23510149121284485,
-0.03804505988955498,
-0.15111061930656433,
0.14040140807628632,
0.5866971611976624,
-0.13488738238811493,
-0.39477935433387756,
-0.37686362862586975,
0.3178057074546814,
0.060668397694826126,
-0.054529543966054916,
0.12477409094572067,
-0.2635177969932556,
-0.08467435836791992,
-0.40832266211509705,
-0.11444594711065292,
0.2715440094470978,
-0.23662249743938446,
-0.07282757759094238,
0.06921607255935669,
0.10732944309711456,
0.14472553133964539,
-0.07644468545913696,
0.287929505109787,
-0.19032815098762512,
-0.1312548667192459,
0.5556663870811462,
0.32626545429229736,
-0.05868390202522278,
-0.30492284893989563,
0.32341456413269043,
-0.11388292908668518,
-0.32439810037612915,
0.4582008719444275,
-0.17817671597003937,
0.2976238429546356,
0.3392000198364258,
0.21923527121543884,
-0.08509249240159988,
-0.02038448303937912,
0.15270458161830902,
0.4060351252555847,
-0.03967082500457764,
0.598385214805603,
0.3412264585494995,
-0.11158617585897446,
-0.2217194139957428,
0.19194383919239044,
-0.12224186956882477,
-0.04761514067649841,
0.46400031447410583,
-0.20355726778507233,
0.08047428727149963,
0.5127977132797241,
-0.050449125468730927,
0.9096569418907166,
-0.3142613172531128,
0.37211692333221436,
0.1985044777393341,
-0.010263483971357346,
0.36964109539985657,
-0.1426318883895874,
0.18813326954841614,
-0.5020816326141357,
-0.352360337972641,
0.24569649994373322,
-0.20226545631885529,
-0.22665774822235107,
0.19292715191841125,
-0.23431019484996796,
0.009533802978694439,
-0.07473590224981308,
0.14287324249744415,
-0.040975749492645264,
0.2776971161365509,
0.10167799144983292,
-0.2562856674194336,
-0.5139927864074707,
0.031851522624492645,
-0.020094946026802063,
0.17739100754261017,
-0.09833366423845291,
-0.12248310446739197,
-0.24442517757415771,
0.015517648309469223,
-0.175907164812088,
0.3012740910053253,
-0.07196295261383057,
0.1449410766363144,
0.31541621685028076,
0.013096556067466736,
0.171569362282753,
0.682863175868988,
0.12862491607666016,
0.0415312759578228,
0.04426784813404083,
0.24872788786888123,
-0.10525304824113846,
0.12851692736148834,
0.438355028629303,
0.05732046067714691,
0.31600821018218994,
-0.1838531494140625,
-0.1541273295879364,
0.05582869052886963,
0.09811317920684814,
-0.23005570471286774,
-0.2583180069923401,
-0.09708838164806366,
0.16278035938739777,
-0.1029018685221672,
0.002471677027642727,
0.07130908966064453,
-0.5192984342575073,
-0.002362217754125595,
-0.006014501675963402,
-0.03556506335735321,
0.11361569166183472,
0.3305600583553314,
0.017582839354872704,
-0.13239333033561707,
0.07699885964393616,
0.6896514892578125,
-0.369249552488327,
-0.1378166824579239,
0.723328709602356,
0.23384706676006317,
-0.045004624873399734,
-0.11426003277301788,
0.24603942036628723,
-0.34636735916137695,
-0.43024832010269165,
0.08283963054418564,
-0.2697180509567261,
-0.1747506856918335,
0.19529306888580322,
0.2295706570148468,
-0.2102629393339157,
-0.3418881893157959,
-0.13249380886554718,
-0.2187538594007492,
-0.3072240352630615,
0.21386703848838806,
0.0049924105405807495,
0.07397545129060745,
-0.11236017942428589,
0.2638910114765167,
0.16524529457092285,
-0.08462736755609512,
-0.12829141318798065,
-0.061413370072841644,
-0.38031262159347534,
0.17660827934741974,
0.20345500111579895,
-0.4748997390270233,
0.3649587035179138,
-0.06474389135837555,
-0.041285909712314606,
0.21681645512580872,
-0.24995025992393494,
-0.09596586972475052,
0.056712787598371506,
0.20776423811912537,
0.025857042521238327,
-0.034837789833545685,
-0.2265300750732422,
0.0766349509358406,
-0.11777730286121368,
-0.2969019412994385,
0.29588016867637634,
-0.2165316641330719,
-0.027082011103630066,
-0.03918842598795891,
-0.13899728655815125,
0.42477166652679443,
0.01691916212439537,
0.14991500973701477,
-0.03283607214689255,
-0.07233653962612152,
0.39431944489479065,
0.15297523140907288,
0.00019977136980742216,
-0.02403516322374344,
-0.29763171076774597,
0.05687154829502106,
0.045041825622320175,
0.0373326875269413,
0.3460458517074585,
-0.32565778493881226,
0.013911169022321701,
-0.07735875248908997,
-0.1277717649936676,
0.5687569975852966,
-0.06896139681339264,
-0.3130596876144409,
0.24783265590667725,
0.04416736215353012,
0.03167213127017021,
0.18760140240192413,
0.4917139410972595,
0.04318995773792267,
0.02704615518450737,
-0.1282074749469757,
-0.1372070163488388,
-0.028431493788957596,
0.0625634416937828,
0.267483115196228,
0.38759201765060425,
-0.6062106490135193,
0.02422391064465046,
0.22643522918224335,
-0.03374851122498512,
0.08990421146154404,
0.017933426424860954,
-0.04736650362610817,
0.1533326953649521,
0.17764770984649658,
0.04626631736755371,
-0.199712872505188,
-0.4164629876613617,
0.5584697127342224,
0.3806148171424866,
-0.2426573932170868,
-0.2865813970565796,
0.4931342601776123,
0.20059505105018616,
0.45166873931884766,
0.2663338780403137,
0.2979908585548401,
-0.04168340563774109,
-0.28304919600486755,
-0.3698364496231079,
0.39568203687667847,
-0.0042739734053611755,
-0.1274716854095459,
0.003802049905061722,
-0.07953062653541565,
-0.032629646360874176,
0.3164074718952179,
-0.30121156573295593,
0.15978769958019257,
0.3023241460323334,
0.4757317304611206,
0.1266932487487793,
-0.32040655612945557,
-0.17852407693862915,
-0.13391593098640442,
0.4116199016571045,
0.03264176473021507,
0.3376334011554718,
-0.02229863405227661,
-0.06239652633666992,
-0.31460249423980713,
0.2995559275150299,
0.1363588571548462,
0.28115540742874146,
-0.6238769292831421,
0.4383189380168915,
0.02170063927769661,
0.05504675954580307,
0.1837342381477356,
0.23858368396759033,
0.22978976368904114,
-0.026216425001621246,
0.070961132645607,
-0.07287950813770294,
0.002688598819077015,
-0.2576388120651245,
0.03687302768230438,
0.3410298228263855,
0.05537789687514305,
0.012953244149684906,
0.28505003452301025,
-0.2818604111671448,
0.10829354077577591,
-0.04475785046815872,
-0.4614829421043396,
0.11042201519012451,
-0.15737931430339813,
0.021022295579314232,
-0.010875122621655464,
-0.05547470226883888,
0.012576010078191757,
0.1484641432762146,
0.6178311109542847,
0.20165881514549255,
0.11065664887428284,
0.00397977139800787,
0.10857029259204865,
-0.5415894985198975,
0.11626209318637848,
0.18920612335205078,
0.13658270239830017,
0.23610080778598785,
0.2436717003583908,
0.2792373299598694,
0.3548423647880554,
0.15625318884849548,
-0.1392212212085724,
-0.2937137484550476,
0.3893332779407501,
-0.5854655504226685,
-0.04772614315152168,
0.011841487139463425,
0.12335115671157837,
-0.08928591012954712,
-0.2111448347568512,
-0.06710653007030487,
-0.1111665815114975,
-0.08921089768409729,
-0.23355747759342194,
-0.22241510450839996,
-0.03944200649857521,
0.12460362911224365,
0.2244534194469452,
0.24257205426692963,
0.1048937439918518,
0.0351538211107254,
-0.2819530963897705,
-0.18025092780590057,
-0.20649182796478271,
-0.012291954830288887,
0.1289997547864914,
-0.00853930413722992,
0.07714078575372696,
-0.1486109346151352,
0.34426599740982056,
-0.34675538539886475,
-0.06209000200033188,
-0.11497582495212555,
0.2677699327468872,
0.0016706082969903946,
-0.30933478474617004,
0.5146887302398682,
0.2612819969654083,
-0.10212311893701553,
0.5869477987289429,
-0.08240212500095367,
-0.06616712361574173,
-0.6436589360237122,
0.1951868087053299,
0.32639646530151367,
-0.2713499367237091,
-0.15110935270786285,
0.0776108130812645,
0.08280104398727417,
0.16702023148536682,
0.019415060058236122,
-0.41661539673805237,
-0.053915977478027344,
0.1462439000606537,
-0.25535041093826294,
-0.5968244671821594,
0.15702372789382935,
0.4870105981826782,
0.06465612351894379,
-0.21391333639621735,
-0.011024244129657745,
-0.12080644816160202,
0.0006249621510505676,
-0.12189313769340515,
-0.1549290120601654
] |
https://github.com/huggingface/datasets/issues/482 | Bugs : dataset.map() is frozen on ELI5 | Maybe this is an issue with gradio, could you open an issue on their repo ? `Dataset.map` simply uses `multiprocess.Pool` for multiprocessing
If you interrupt the program mayeb the stack trace would give some information of where it was hanging in the code (maybe a lock somewhere ?) | Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ? | 48 | Bugs : dataset.map() is frozen on ELI5
Hi Huggingface Team!
Thank you guys once again for this amazing repo.
I have tried to prepare ELI5 to train with T5, based on [this wonderful notebook of Suraj Patil](https://github.com/patil-suraj/exploring-T5/blob/master/T5_on_TPU.ipynb)
However, when I run `dataset.map()` on ELI5 to prepare `input_text, target_text`, `dataset.map` is **frozen** in the first hundreds examples. On the contrary, this works totally fine on SQUAD (80,000 examples). Both `nlp` version 0.3.0 and 0.4.0 cause frozen process . Also try various `pyarrow` versions from 0.16.0 / 0.17.0 / 1.0.0 also have the same frozen process.
Reproducible code can be found on [this colab notebook ](https://colab.research.google.com/drive/14wttOTv3ky74B_c0kv5WrbgQjCF2fYQk?usp=sharing), where I also show that the same mapping function works fine on SQUAD, so the problem is likely due to ELI5 somehow.
----------------------------------------
**More Info :** instead of `map`, if I run `for` loop and apply function by myself, there's no error and can finish within 10 seconds. However, `nlp dataset` is immutable (I couldn't manually assign a new key-value to `dataset `object)
I also notice that SQUAD texts are quite clean while ELI5 texts contain many special characters, not sure if this is the cause ?
Maybe this is an issue with gradio, could you open an issue on their repo ? `Dataset.map` simply uses `multiprocess.Pool` for multiprocessing
If you interrupt the program mayeb the stack trace would give some information of where it was hanging in the code (maybe a lock somewhere ?) | [
0.014163214713335037,
-0.09230978786945343,
-0.10349489748477936,
0.1084483414888382,
0.24175092577934265,
-0.02995772659778595,
0.5163652300834656,
0.13419725000858307,
-0.24551646411418915,
0.1250046342611313,
-0.24439622461795807,
0.41496968269348145,
0.1784733682870865,
0.08136454224586487,
-0.08868344873189926,
0.10104674100875854,
-0.12665724754333496,
-0.006964780390262604,
-0.03492577373981476,
-0.05879222974181175,
0.1056528240442276,
0.36225223541259766,
-0.3580321669578552,
0.18229225277900696,
-0.36715203523635864,
0.109742172062397,
-0.13127641379833221,
-0.010286882519721985,
-0.11654344946146011,
-0.3009055554866791,
0.12255576252937317,
0.11800925433635712,
-0.1349565088748932,
0.24672603607177734,
-0.00012541990145109594,
0.018073491752147675,
0.0052781663835048676,
0.03690941631793976,
-0.01915229856967926,
-0.026424378156661987,
0.2761823534965515,
-0.013582736253738403,
0.28906846046447754,
-0.21941140294075012,
0.14613047242164612,
0.26042455434799194,
0.4261848032474518,
0.027977697551250458,
0.5609886050224304,
-0.054553110152482986,
0.037781260907649994,
0.1738320291042328,
-0.08709174394607544,
0.38293400406837463,
0.1987474113702774,
-0.18668965995311737,
-0.3355628550052643,
0.03686518222093582,
0.41159310936927795,
-0.15098942816257477,
0.10167587548494339,
-0.07949376106262207,
-0.1022559106349945,
-0.060787755995988846,
0.10494077205657959,
0.42417803406715393,
-0.005048021674156189,
-0.7492023706436157,
0.17395222187042236,
0.2080574333667755,
0.4229869246482849,
-0.18137821555137634,
-0.15920041501522064,
-0.18236662447452545,
0.0796499103307724,
-0.26183632016181946,
0.4839248061180115,
-0.011331288143992424,
-0.0906592309474945,
0.07707004249095917,
-0.11857728660106659,
-0.06597299128770828,
0.0025819391012191772,
0.1600915640592575,
0.04792734235525131,
0.25259530544281006,
0.01299729198217392,
0.14586663246154785,
-0.019473139196634293,
0.05176035314798355,
-0.2932280898094177,
-0.18036875128746033,
-0.04220881685614586,
0.33340340852737427,
-0.668370246887207,
-0.13465085625648499,
-0.1850309669971466,
-0.04384336620569229,
0.020414818078279495,
0.10875973105430603,
0.1078268364071846,
0.200606107711792,
0.061561647802591324,
0.04108405485749245,
0.47714465856552124,
-0.08142071962356567,
0.23104485869407654,
0.15472464263439178,
0.29576605558395386,
-0.15305045247077942,
-0.4789699614048004,
0.15114499628543854,
-0.07273785769939423,
-0.23088151216506958,
-0.027271315455436707,
-0.14163246750831604,
0.1610053926706314,
-0.3166678845882416,
0.29879215359687805,
0.04910381883382797,
-0.6920956373214722,
-0.031349338591098785,
0.013489034958183765,
0.30269405245780945,
-0.16712793707847595,
0.022052038460969925,
-0.022157376632094383,
0.05592555180191994,
-0.46860378980636597,
-0.10075496137142181,
0.08743394911289215,
-0.42407214641571045,
-0.14167846739292145,
-0.002570195123553276,
0.24172429740428925,
-0.3567615747451782,
0.19252316653728485,
-0.1497541218996048,
0.24730849266052246,
0.07292108237743378,
0.3252537250518799,
-0.14736109972000122,
0.1631946712732315,
0.10355889052152634,
0.1718038022518158,
0.21807053685188293,
-0.24931590259075165,
-0.23811869323253632,
-0.09200280159711838,
0.2821256220340729,
0.16164982318878174,
0.0168093703687191,
0.14324951171875,
-0.05284775421023369,
-0.11924976110458374,
-0.08840900659561157,
0.047587648034095764,
0.15529072284698486,
0.38930726051330566,
-0.31311869621276855,
0.048411667346954346,
-0.3119775652885437,
-0.14132313430309296,
-0.05619306489825249,
0.46982336044311523,
0.22462263703346252,
0.05398854240775108,
-0.15714623034000397,
-0.04755371809005737,
-0.10901182889938354,
-0.22345024347305298,
0.38461437821388245,
0.12707500159740448,
0.03353890776634216,
0.05349338799715042,
0.25039196014404297,
0.42323485016822815,
-0.24149325489997864,
-0.5587347149848938,
0.1382203847169876,
-0.2825414538383484,
-0.14215975999832153,
-0.3105699419975281,
0.10932879149913788,
0.20220550894737244,
-0.04087601974606514,
0.15969504415988922,
0.5057037472724915,
-0.18272443115711212,
0.10811635106801987,
-0.3385356068611145,
-0.17803692817687988,
-0.09597428143024445,
0.13755331933498383,
-0.08217903971672058,
-0.2520000636577606,
-0.19383150339126587,
0.241458460688591,
-0.03911273926496506,
0.11476676166057587,
0.2310718446969986,
0.23962029814720154,
0.27079543471336365,
0.04723004996776581,
-0.07669094204902649,
-0.06793389469385147,
-0.5497382283210754,
0.05909110605716705,
0.09721031785011292,
0.2598118185997009,
-0.06352803111076355,
0.06418811529874802,
0.2763215899467468,
-0.05511302500963211,
-0.28564906120300293,
-0.030771028250455856,
-0.07148566842079163,
-0.1143476814031601,
0.04785570129752159,
0.2753855288028717,
-0.04613330215215683,
-0.11228913813829422,
0.05728565901517868,
0.16616514325141907,
-0.38146552443504333,
0.13900874555110931,
-0.15951323509216309,
-0.42832085490226746,
-0.2204447090625763,
-0.04353722929954529,
-0.39284661412239075,
-0.20467132329940796,
-0.1763577163219452,
0.11081881076097488,
-0.318822979927063,
-0.1406266689300537,
0.022176481783390045,
0.4938584566116333,
0.17981792986392975,
-0.3142394423484802,
0.09563370794057846,
-0.287171870470047,
-0.009211426600813866,
-0.10324698686599731,
-0.11614201217889786,
0.2350679337978363,
-0.2548729181289673,
0.18242624402046204,
0.07399216294288635,
0.07282603532075882,
-0.011014876887202263,
0.05960622802376747,
-0.2014758139848709,
0.06704318523406982,
0.10302220284938812,
0.2578381597995758,
0.45418664813041687,
-0.014677377417683601,
-0.2806931436061859,
0.3174307644367218,
0.8531301617622375,
0.2632671892642975,
0.056618981063365936,
0.017518891021609306,
0.06540996581315994,
-0.07427449524402618,
-0.4360978901386261,
-0.24217568337917328,
0.27316388487815857,
-0.051049213856458664,
0.06449945271015167,
0.06459260731935501,
-0.10285972058773041,
-0.02163446508347988,
0.1453510820865631,
0.32719185948371887,
-0.04318215325474739,
0.06252609193325043,
0.32317373156547546,
0.09002842754125595,
0.02334648370742798,
-0.08603621274232864,
0.1359201967716217,
0.19319331645965576,
-0.15069453418254852,
0.08544059097766876,
-0.10837618261575699,
0.02608601748943329,
0.1329668015241623,
0.014307085424661636,
-0.37551558017730713,
-0.32364988327026367,
0.17489968240261078,
0.06789273768663406,
0.005045320838689804,
0.35185593366622925,
0.2070893943309784,
-0.09748159348964691,
0.018358850851655006,
-0.0334942564368248,
-0.0651293694972992,
-0.4590481221675873,
-0.3717232644557953,
-0.05897871404886246,
0.5518871545791626,
0.08367621898651123,
-0.055947087705135345,
0.04148755967617035,
-0.39677876234054565,
-0.0689765065908432,
-0.5021800398826599,
0.27858397364616394,
-0.36260586977005005,
0.4488263726234436,
-0.1341085135936737,
0.21304193139076233,
-0.4518551826477051,
-0.10981971025466919,
0.37396740913391113,
-0.3975735902786255,
-0.24950838088989258,
0.010602535679936409,
0.0964675024151802,
-0.04328538849949837,
-0.14753523468971252,
-0.6087766885757446,
-0.11990801244974136,
-0.1746775060892105,
0.458554208278656,
-0.030569162219762802,
0.044359978288412094,
0.10162146389484406,
0.011399869807064533,
0.38871559500694275,
-0.037720948457717896,
-0.1208508312702179,
0.07938928157091141,
-0.1884009689092636,
0.3047929108142853,
-0.23947840929031372,
-0.2854917347431183,
-0.04930965229868889,
0.2202066332101822,
-0.06948298215866089,
-0.09430065751075745,
-0.3583969473838806,
-0.20633794367313385,
-0.34052011370658875,
0.4015292525291443,
-0.12418052554130554,
-0.0654928907752037,
0.2565486431121826,
0.2565624713897705,
0.06986872851848602,
0.10330881923437119,
-0.38090643286705017,
0.40150779485702515,
0.6186989545822144,
0.0010946616530418396,
-0.033465005457401276,
0.5498825907707214,
0.06777559220790863,
0.84177166223526,
0.07942710816860199,
-0.14581775665283203,
0.18535646796226501,
0.08260598033666611,
0.019867554306983948,
-0.4973679482936859,
0.027627767994999886,
0.13384754955768585,
-0.009328290820121765,
0.06317129731178284,
0.2574818730354309,
0.025292841717600822,
-0.18827858567237854,
-0.14419107139110565,
0.22716283798217773,
-0.29202860593795776,
-0.3415435254573822,
0.16581298410892487,
-0.2489430010318756,
-0.10584104806184769,
0.1674778163433075,
-0.10675428807735443,
-0.1525459736585617,
-0.28701528906822205,
-0.24053271114826202,
-0.08685685694217682,
0.3255074918270111,
-0.0741603672504425,
-0.5767847895622253,
-0.13015975058078766,
-0.3932258188724518,
0.3105120062828064,
0.11320708692073822,
0.1548515409231186,
-0.4241724908351898,
-0.06620144844055176,
0.2917075753211975,
-0.3265107572078705,
0.32693779468536377,
-0.3166329860687256,
-0.11143116652965546,
0.2937321662902832,
-0.05741681903600693,
-0.1861797720193863,
-0.07393456995487213,
-0.2064686417579651,
0.16421931982040405,
0.6477139592170715,
-0.13059860467910767,
-0.37752050161361694,
-0.3817700743675232,
0.3389582335948944,
0.045405078679323196,
-0.08043903857469559,
0.12597231566905975,
-0.3325198292732239,
-0.09058172255754471,
-0.3964664041996002,
-0.05177246779203415,
0.3346680700778961,
-0.14292338490486145,
-0.06055774539709091,
0.06963437795639038,
0.12834493815898895,
0.1489666998386383,
-0.08318352699279785,
0.22640107572078705,
-0.18498048186302185,
-0.080935038626194,
0.5360678434371948,
0.3088357746601105,
-0.051479510962963104,
-0.3229534924030304,
0.3031286895275116,
-0.09856376051902771,
-0.24705666303634644,
0.48999133706092834,
-0.2540202736854553,
0.38449352979660034,
0.35999730229377747,
0.2159142643213272,
-0.08302206546068192,
0.005348788574337959,
0.18832463026046753,
0.41620898246765137,
-0.04476234316825867,
0.6215287446975708,
0.3844465911388397,
-0.12524031102657318,
-0.2483615130186081,
0.10786710679531097,
-0.08381208032369614,
-0.06578242778778076,
0.46711093187332153,
-0.2230769544839859,
0.07617665082216263,
0.48523908853530884,
-0.05616750568151474,
0.9844575524330139,
-0.44541501998901367,
0.33423659205436707,
0.1252763867378235,
-0.027391958981752396,
0.36230868101119995,
-0.14776983857154846,
0.2161967158317566,
-0.49857479333877563,
-0.39561727643013,
0.23840831220149994,
-0.22059915959835052,
-0.18786782026290894,
0.2764809727668762,
-0.25350305438041687,
0.018951088190078735,
-0.03559740260243416,
0.12601238489151,
-0.05864844471216202,
0.2935452163219452,
0.16656090319156647,
-0.2097489833831787,
-0.4477400481700897,
0.01812482625246048,
-0.01658831536769867,
0.19668935239315033,
-0.050651878118515015,
-0.10196241736412048,
-0.25861212611198425,
0.022909536957740784,
-0.23228590190410614,
0.304056316614151,
-0.10548733919858932,
0.12550893425941467,
0.29115375876426697,
0.0037531331181526184,
0.21895207464694977,
0.6895705461502075,
0.15124069154262543,
0.039187800139188766,
0.08647516369819641,
0.26942262053489685,
-0.053644776344299316,
0.08705318719148636,
0.4096229374408722,
0.042836423963308334,
0.2949690818786621,
-0.20665031671524048,
-0.23048818111419678,
0.0900445505976677,
0.122219979763031,
-0.23553606867790222,
-0.23381543159484863,
-0.06027251482009888,
0.13911119103431702,
-0.07355666905641556,
0.0033314255997538567,
0.1222669780254364,
-0.4425530731678009,
-0.01817862130701542,
-0.0035134926438331604,
-0.010145716369152069,
0.057128481566905975,
0.35023942589759827,
-0.04797642305493355,
-0.15978959202766418,
0.13011294603347778,
0.654229998588562,
-0.2891417145729065,
-0.10208874195814133,
0.7394058704376221,
0.26558414101600647,
-0.034659408032894135,
-0.13147953152656555,
0.1939774453639984,
-0.32369282841682434,
-0.4512908458709717,
0.09118044376373291,
-0.24608321487903595,
-0.157541424036026,
0.2135743647813797,
0.20156501233577728,
-0.24190156161785126,
-0.2984061539173126,
-0.14522230625152588,
-0.2173101007938385,
-0.29285135865211487,
0.1374206840991974,
-0.0007323063910007477,
0.0423896387219429,
-0.09983623027801514,
0.2999229431152344,
0.2130543291568756,
0.0228230319917202,
-0.12990857660770416,
-0.044471025466918945,
-0.4418638348579407,
0.2103510946035385,
0.18550267815589905,
-0.4601573050022125,
0.35037103295326233,
-0.06284064054489136,
-0.037563834339380264,
0.1994841992855072,
-0.2073724865913391,
-0.10228361934423447,
0.06331773102283478,
0.20068588852882385,
0.00018999166786670685,
-0.004094760864973068,
-0.19332543015480042,
0.07869472354650497,
-0.1332324892282486,
-0.2869910001754761,
0.2706405818462372,
-0.18056395649909973,
0.015060104429721832,
-0.054082565009593964,
-0.09780535101890564,
0.35621747374534607,
-0.009765079244971275,
0.1149691715836525,
-0.059996917843818665,
-0.07762083411216736,
0.4104063808917999,
0.18906287848949432,
0.06837161630392075,
-0.0392225943505764,
-0.3435050845146179,
-0.02611251175403595,
0.026570111513137817,
0.054552070796489716,
0.27153024077415466,
-0.297141432762146,
-0.05698283016681671,
-0.08097865432500839,
-0.11941184103488922,
0.48406168818473816,
-0.011592593975365162,
-0.29181867837905884,
0.23899585008621216,
0.026894040405750275,
0.019092340022325516,
0.1977560669183731,
0.518653392791748,
0.002149880863726139,
-0.002437349408864975,
-0.1239430382847786,
-0.11803478002548218,
0.06062701344490051,
0.010200053453445435,
0.2592850625514984,
0.383196622133255,
-0.5740816593170166,
0.04997531324625015,
0.16992144286632538,
0.02470611408352852,
0.10372649133205414,
0.017506930977106094,
-0.0840723067522049,
0.11911090463399887,
0.17523202300071716,
0.030865978449583054,
-0.20664390921592712,
-0.3828677833080292,
0.5371468663215637,
0.4048968553543091,
-0.2701438069343567,
-0.3123413920402527,
0.4900192618370056,
0.20939886569976807,
0.4108130633831024,
0.21809041500091553,
0.334879606962204,
-0.07546506077051163,
-0.2802630364894867,
-0.3440358340740204,
0.46718811988830566,
-0.035291582345962524,
-0.1100701093673706,
-0.032146256417036057,
-0.06601613759994507,
-0.07484977692365646,
0.31057295203208923,
-0.2515755295753479,
0.18243759870529175,
0.4038914740085602,
0.4929795265197754,
0.09976914525032043,
-0.2897583544254303,
-0.22385871410369873,
-0.1514219343662262,
0.37437188625335693,
-0.005492605268955231,
0.336925208568573,
-0.06123693287372589,
-0.09466913342475891,
-0.26963183283805847,
0.37224453687667847,
0.17027969658374786,
0.26349982619285583,
-0.5457268357276917,
0.43074294924736023,
0.02182459644973278,
0.05918697267770767,
0.16415226459503174,
0.27044612169265747,
0.22122927010059357,
0.03409569710493088,
0.041800349950790405,
-0.06876193732023239,
0.009191003628075123,
-0.31153807044029236,
0.06267781555652618,
0.3660144507884979,
0.09278866648674011,
0.03208072483539581,
0.2527359426021576,
-0.28503715991973877,
0.06498533487319946,
-0.007562011480331421,
-0.46110865473747253,
0.16114473342895508,
-0.1367885321378708,
-0.03992941230535507,
-0.05909813567996025,
-0.0666782557964325,
0.006948081776499748,
0.17815913259983063,
0.606914758682251,
0.2457120269536972,
0.11712340265512466,
-0.06374197453260422,
0.04211145639419556,
-0.5801321268081665,
0.17553111910820007,
0.1724880039691925,
0.1809278130531311,
0.20800542831420898,
0.29277223348617554,
0.25245651602745056,
0.317038357257843,
0.19758854806423187,
-0.13987571001052856,
-0.26581886410713196,
0.44028937816619873,
-0.6304970383644104,
0.033466886729002,
0.014413829892873764,
0.0899738073348999,
-0.07390260696411133,
-0.2070973515510559,
-0.03422408923506737,
-0.08439847081899643,
-0.10925495624542236,
-0.20786894857883453,
-0.21585169434547424,
-0.0330582931637764,
0.12149084359407425,
0.24836516380310059,
0.1955985277891159,
0.15160204470157623,
0.049341171979904175,
-0.1966457962989807,
-0.15039116144180298,
-0.18170051276683807,
-0.04384211078286171,
0.07053042948246002,
-0.012185923755168915,
0.08285528421401978,
-0.2031049132347107,
0.3642325699329376,
-0.3583925664424896,
-0.042932040989398956,
-0.13717810809612274,
0.3057015538215637,
0.027667323127388954,
-0.3541335165500641,
0.4994799494743347,
0.24652719497680664,
-0.07050374895334244,
0.5778440237045288,
-0.06004529446363449,
-0.09019067883491516,
-0.6865603923797607,
0.1929740458726883,
0.337234228849411,
-0.26657381653785706,
-0.18304501473903656,
-0.015170578844845295,
0.10632824152708054,
0.17448127269744873,
0.04722119867801666,
-0.3773699700832367,
-0.04941753298044205,
0.1535024344921112,
-0.19319278001785278,
-0.607753574848175,
0.1542533040046692,
0.451367050409317,
0.09429849684238434,
-0.19913089275360107,
-0.040372371673583984,
-0.11010953038930893,
-0.04163319990038872,
-0.15287156403064728,
-0.14478799700737
] |
https://github.com/huggingface/datasets/issues/478 | Export TFRecord to GCP bucket | Nevermind, I restarted my python session and it worked fine...
---
I had an authentification error, and I authenticated from another terminal. After that, no more error but it was not working. Restarting the sessions makes it work :) | Previously, I was writing TFRecords manually to GCP bucket with : `with tf.io.TFRecordWriter('gs://my_bucket/x.tfrecord')`
Since `0.4.0` is out with the `export()` function, I tried it. But it seems TFRecords cannot be directly written to GCP bucket.
`dataset.export('local.tfrecord')` works fine,
but `dataset.export('gs://my_bucket/x.tfrecord')` does not work.
There is no error message, I just can't find the file on my bucket...
---
Looking at the code, `nlp` is using `tf.data.experimental.TFRecordWriter`, while I was using `tf.io.TFRecordWriter`.
**What's the difference between those 2 ? How can I write TFRecords files directly to GCP bucket ?**
@jarednielsen @lhoestq | 39 | Export TFRecord to GCP bucket
Previously, I was writing TFRecords manually to GCP bucket with : `with tf.io.TFRecordWriter('gs://my_bucket/x.tfrecord')`
Since `0.4.0` is out with the `export()` function, I tried it. But it seems TFRecords cannot be directly written to GCP bucket.
`dataset.export('local.tfrecord')` works fine,
but `dataset.export('gs://my_bucket/x.tfrecord')` does not work.
There is no error message, I just can't find the file on my bucket...
---
Looking at the code, `nlp` is using `tf.data.experimental.TFRecordWriter`, while I was using `tf.io.TFRecordWriter`.
**What's the difference between those 2 ? How can I write TFRecords files directly to GCP bucket ?**
@jarednielsen @lhoestq
Nevermind, I restarted my python session and it worked fine...
---
I had an authentification error, and I authenticated from another terminal. After that, no more error but it was not working. Restarting the sessions makes it work :) | [
0.10430848598480225,
-0.01965492218732834,
0.041873034089803696,
0.11389331519603729,
0.03208306059241295,
-0.1475575864315033,
0.19832779467105865,
0.13782700896263123,
-0.42943891882896423,
0.10862095654010773,
-0.25990810990333557,
0.23671135306358337,
-0.2770299017429352,
0.19022056460380554,
0.4431501030921936,
0.045882970094680786,
-0.16244730353355408,
-0.08847509324550629,
-0.061361804604530334,
-0.24642746150493622,
-0.20780013501644135,
0.3399337828159332,
-0.16332373023033142,
0.12985652685165405,
-0.16363811492919922,
-0.32914263010025024,
-0.1392059326171875,
0.010079924017190933,
0.21589665114879608,
-0.08177500218153,
0.15312950313091278,
-0.1572723388671875,
0.2936231791973114,
0.35484692454338074,
-0.0001241776772076264,
0.05572420358657837,
0.03624919056892395,
-0.264289915561676,
-0.10047134757041931,
-0.15857823193073273,
-0.3611402213573456,
0.06759429723024368,
0.07434055954217911,
-0.23524606227874756,
0.03700340539216995,
0.13533172011375427,
0.5893598794937134,
0.25757601857185364,
-0.18711654841899872,
0.46288174390792847,
0.11160853505134583,
0.46207815408706665,
0.15331262350082397,
0.1713332086801529,
-0.11466256529092789,
-0.240670844912529,
-0.3874959647655487,
0.056643299758434296,
-0.15905512869358063,
0.1580323576927185,
0.14336544275283813,
-0.10983754694461823,
0.0033530984073877335,
-0.20574168860912323,
0.3163115680217743,
0.11105495691299438,
-0.10727448016405106,
-0.31202659010887146,
-0.003149591386318207,
0.19464269280433655,
0.6180033087730408,
-0.5000047087669373,
-0.5036107301712036,
0.06475373357534409,
-0.04920141026377678,
-0.20398935675621033,
0.3115357756614685,
0.42225635051727295,
0.35105225443840027,
0.15105478465557098,
-0.2972373962402344,
-0.16873803734779358,
-0.3058374524116516,
0.17910966277122498,
-0.09492684155702591,
0.6592955589294434,
-0.06307579576969147,
0.09788194298744202,
-0.24447815120220184,
0.06062346324324608,
0.1662687361240387,
-0.04854966700077057,
-0.13367751240730286,
0.36957618594169617,
-0.1432875394821167,
-0.34991633892059326,
0.2528572380542755,
0.4646782875061035,
-0.5515576004981995,
0.31661051511764526,
0.3559395968914032,
-0.19434040784835815,
-0.008994650095701218,
0.008427709341049194,
-0.0087086521089077,
0.043914489448070526,
0.35590922832489014,
0.4459596574306488,
0.0651988759636879,
-0.35676825046539307,
0.07061675190925598,
-0.17426159977912903,
-0.06491287797689438,
-0.28466135263442993,
-0.1426883041858673,
0.04462214186787605,
0.03793983906507492,
-0.13748353719711304,
0.09490234404802322,
-0.14904555678367615,
-0.09875860810279846,
0.10956157743930817,
-0.3324374258518219,
0.08815683424472809,
0.07842479646205902,
-0.2568150758743286,
0.27719956636428833,
-0.02669573202729225,
-0.6436523795127869,
0.052790362387895584,
-0.049550220370292664,
0.19584862887859344,
0.15716351568698883,
-0.041107177734375,
-0.04437708482146263,
0.03380410000681877,
0.022475099191069603,
-0.22910526394844055,
0.05098532885313034,
0.2616705000400543,
0.36016392707824707,
-0.04543794319033623,
-0.17356404662132263,
0.20356319844722748,
0.039008598774671555,
0.24622486531734467,
0.02277148701250553,
-0.14904403686523438,
-0.2866271138191223,
0.1152704656124115,
-0.2529260814189911,
-0.30678513646125793,
-0.06106513738632202,
0.04156064614653587,
-0.14842398464679718,
-0.3995211124420166,
-0.2166467010974884,
0.0019410178065299988,
0.12320566177368164,
-0.36842215061187744,
0.25909730792045593,
-0.3070383667945862,
-0.08569426089525223,
-0.32986342906951904,
-0.09418834745883942,
0.13326838612556458,
-0.42481309175491333,
-0.07912030816078186,
-0.01756051741540432,
0.038308024406433105,
0.29246971011161804,
0.2817414104938507,
0.13658477365970612,
0.18329855799674988,
0.06438995897769928,
0.3293117880821228,
0.38422513008117676,
-0.5604011416435242,
0.0358695387840271,
0.31707388162612915,
-0.37299925088882446,
-0.14659138023853302,
-0.22452959418296814,
-0.0009617728064768016,
0.30301687121391296,
-0.22778384387493134,
-0.036367498338222504,
0.36611759662628174,
0.021780021488666534,
0.17363673448562622,
-0.27711883187294006,
-0.10504291206598282,
0.02460573986172676,
-0.2779390513896942,
-0.015946459025144577,
-0.13104358315467834,
0.4008926749229431,
0.17576707899570465,
0.1823633313179016,
-0.07111743092536926,
0.21930120885372162,
0.40726447105407715,
0.36588752269744873,
0.02309248223900795,
-0.08362506330013275,
0.0767631083726883,
-0.5317695736885071,
0.0073544979095458984,
-0.22817936539649963,
0.18304981291294098,
0.34669631719589233,
0.058760084211826324,
0.19746065139770508,
-0.29215207695961,
0.17124538123607635,
-0.16418220102787018,
-0.09510429203510284,
0.12151750922203064,
0.1402531862258911,
0.3574545383453369,
-0.0441092848777771,
0.2640911042690277,
-0.13123436272144318,
-0.12293530255556107,
-0.2632273733615875,
0.3617302477359772,
0.1286933869123459,
-0.3282946050167084,
0.09454111754894257,
-0.11861344426870346,
0.08461491763591766,
-0.23267462849617004,
-0.2019331157207489,
0.3773418962955475,
-0.24738861620426178,
0.5208191871643066,
0.049507901072502136,
0.648716390132904,
0.13134083151817322,
-0.24971219897270203,
-0.10347477346658707,
0.3585962951183319,
-0.05316438153386116,
0.27566149830818176,
-0.1737523078918457,
0.5877635478973389,
0.15568754076957703,
-0.15259698033332825,
0.38691049814224243,
0.0487794503569603,
-0.2978125214576721,
-0.13408753275871277,
-0.012720523402094841,
0.18181242048740387,
0.12512803077697754,
-0.12217815220355988,
0.0884692519903183,
-0.12934908270835876,
-0.369716078042984,
0.38991639018058777,
0.6853582262992859,
-0.1292417347431183,
0.003588695079088211,
-0.10974863916635513,
0.09051228314638138,
-0.06755302846431732,
0.5124897956848145,
0.06257519125938416,
0.2000594437122345,
0.03574354946613312,
0.1346183717250824,
-0.11730524152517319,
-0.23657245934009552,
-0.10881786048412323,
0.3869112432003021,
-0.1922738403081894,
-0.2225838005542755,
-0.010299451649188995,
-0.008694810792803764,
0.2564801275730133,
-0.13294631242752075,
-0.060257188975811005,
0.08565355092287064,
0.38689959049224854,
-0.4979805052280426,
0.07024682313203812,
-0.44111499190330505,
-0.19884014129638672,
-0.10711616277694702,
0.34265848994255066,
-0.32053229212760925,
-0.32730892300605774,
0.036576442420482635,
0.04011030122637749,
-0.16477133333683014,
-0.004951381124556065,
-0.11512547731399536,
0.010328516364097595,
0.0407165065407753,
-0.14329561591148376,
-0.1063833087682724,
0.0423574298620224,
-0.21630719304084778,
-0.014421391300857067,
0.03004426509141922,
0.16565272212028503,
0.28826120495796204,
-0.03803345561027527,
-0.18323534727096558,
-0.0969584584236145,
-0.3768312335014343,
0.004122719168663025,
-0.15869463980197906,
0.10786999017000198,
0.010657526552677155,
0.04505659639835358,
-0.5808391571044922,
-0.13465869426727295,
-0.18100519478321075,
-0.4385960102081299,
-0.2040458619594574,
0.024680979549884796,
-0.08960006386041641,
-0.05343884229660034,
-0.2532159984111786,
-0.13351330161094666,
-0.2370140105485916,
-0.37571415305137634,
0.2796499729156494,
0.2792014479637146,
0.39792174100875854,
0.403666615486145,
-0.46494150161743164,
0.21927794814109802,
0.12813147902488708,
-0.26279500126838684,
0.27195173501968384,
-0.12346677482128143,
0.40037083625793457,
-0.5539551973342896,
-0.3774174153804779,
0.13609963655471802,
0.19782204926013947,
-0.00957736000418663,
0.06635122001171112,
-0.2033834308385849,
0.08647831529378891,
-0.34969067573547363,
-0.0653621107339859,
0.1325470209121704,
0.2524747848510742,
0.4491385519504547,
-0.21847330033779144,
0.1617979109287262,
-0.15439513325691223,
-0.10962854325771332,
0.0963791161775589,
0.9362363815307617,
0.02341533452272415,
-0.021911539137363434,
0.1153821274638176,
0.05807054415345192,
0.3341711759567261,
0.043501269072294235,
0.06770855188369751,
0.035796135663986206,
-0.37595897912979126,
0.19030259549617767,
-0.24924376606941223,
-0.14690910279750824,
0.6196635365486145,
0.46169689297676086,
-0.10183572769165039,
0.3610280156135559,
0.03759961947798729,
0.23655150830745697,
0.1718459278345108,
0.0989685207605362,
-0.06719106435775757,
-0.29509738087654114,
-0.006020590662956238,
0.2981245219707489,
0.3115379214286804,
-0.043010737746953964,
-0.05409105494618416,
-0.4550204873085022,
-0.3560129702091217,
-0.31578806042671204,
0.3434741497039795,
0.5764539837837219,
0.42971935868263245,
0.1184365451335907,
0.2611118257045746,
-0.5747961401939392,
0.24160611629486084,
0.09912829101085663,
-0.052656084299087524,
-0.16302981972694397,
-0.16409170627593994,
0.1973077356815338,
-0.09803852438926697,
0.06057727709412575,
-0.31112951040267944,
-0.03787916898727417,
0.29958435893058777,
-0.15188172459602356,
-0.5790771842002869,
0.06504705548286438,
-0.11858382821083069,
0.08333288878202438,
0.37484607100486755,
0.1614406555891037,
-0.05662694573402405,
-0.15304838120937347,
-0.0001293923705816269,
-0.1339467167854309,
-0.2941281497478485,
0.07890903949737549,
-0.12957367300987244,
-0.323782354593277,
-0.04563223943114281,
-0.20651990175247192,
-0.00023739971220493317,
0.1084330752491951,
0.029220907017588615,
0.33055514097213745,
0.3428135812282562,
0.019164185971021652,
0.2844891846179962,
-0.09256654977798462,
0.09210560470819473,
0.25973108410835266,
-0.04456944018602371,
0.14164850115776062,
-0.10347099602222443,
0.06860767304897308,
0.07905996590852737,
0.1394546777009964,
0.2667699158191681,
0.33389532566070557,
-0.015052019618451595,
0.1412460207939148,
0.3176977038383484,
0.1359124779701233,
0.1435520350933075,
-0.31870993971824646,
0.2108195722103119,
0.07071086764335632,
-0.08984346687793732,
-0.13690266013145447,
-0.219853475689888,
-0.5876247882843018,
-0.15345557034015656,
0.20624473690986633,
-0.14913547039031982,
0.0905933678150177,
0.48077553510665894,
0.24485929310321808,
-0.4734285771846771,
0.05074429512023926,
0.06189057603478432,
0.9134725332260132,
-0.39719247817993164,
0.3144843578338623,
0.4593326151371002,
-0.06592461466789246,
0.6889110803604126,
-0.24937693774700165,
0.28784191608428955,
-0.26024380326271057,
0.09699345380067825,
-0.004633491858839989,
0.024099987000226974,
0.18599119782447815,
0.29773813486099243,
-0.38699159026145935,
0.24368734657764435,
0.08006483316421509,
0.07832897454500198,
-0.10104762762784958,
0.1207975298166275,
0.07406090945005417,
-0.053705040365457535,
-0.004460800439119339,
0.03870878368616104,
0.14801561832427979,
0.1679355353116989,
-0.1008346900343895,
-0.26264071464538574,
-0.15066853165626526,
0.09758549928665161,
-0.03643234819173813,
0.10776600986719131,
-0.08587320148944855,
0.012595112435519695,
0.11538685858249664,
-0.2285216599702835,
0.17856086790561676,
0.04470754787325859,
0.2295646071434021,
0.1742630898952484,
-0.11651471257209778,
-0.11778552830219269,
0.11214537918567657,
0.0951121523976326,
0.047778740525245667,
0.26401054859161377,
0.05881411209702492,
-0.1901765763759613,
0.023881711065769196,
-0.01432298868894577,
-0.022932587191462517,
-0.6582651138305664,
-0.24259968101978302,
-0.019506655633449554,
-0.338309645652771,
0.04069412127137184,
-0.16901160776615143,
0.13149380683898926,
-0.3500053584575653,
0.07764865458011627,
0.04228450357913971,
-0.03170665353536606,
-0.007330026477575302,
0.1334017962217331,
-0.37641605734825134,
-0.10555568337440491,
-0.06965948641300201,
0.31788599491119385,
-0.1067606583237648,
0.026058807969093323,
0.2930837869644165,
0.13907849788665771,
-0.11546759307384491,
-0.19248142838478088,
0.1169000193476677,
0.26395025849342346,
-0.344268262386322,
0.350882351398468,
-0.09116555005311966,
0.3897700309753418,
0.2459411919116974,
0.4746270179748535,
-0.19226160645484924,
0.11660658568143845,
-0.26978543400764465,
0.13514739274978638,
-0.24636609852313995,
0.14445191621780396,
0.10615591704845428,
-0.0853370875120163,
-0.24147385358810425,
0.8087238669395447,
0.2888929843902588,
-0.16605104506015778,
-0.21043583750724792,
0.1199411004781723,
-0.29684680700302124,
0.28914251923561096,
0.4651014804840088,
0.0027300268411636353,
0.10732726752758026,
0.11665678024291992,
-0.02261471189558506,
-0.03546009212732315,
-0.1430862694978714,
-0.009373705834150314,
-0.44083812832832336,
0.23265440762043,
0.3971712589263916,
-0.2790674865245819,
0.016431279480457306,
-0.23745489120483398,
-0.3072780668735504,
-0.035257697105407715,
0.17813892662525177,
0.31601595878601074,
-0.11677804589271545,
0.28061342239379883,
0.3236218988895416,
0.042404428124427795,
-0.19242681562900543,
-0.053470462560653687,
0.2104383111000061,
0.3997376561164856,
-0.08669959008693695,
0.21496722102165222,
-0.03774455562233925,
0.08334104716777802,
-0.11071380972862244,
0.2121831476688385,
-0.18128331005573273,
0.20666080713272095,
0.14986062049865723,
-0.24462370574474335,
0.058737751096487045,
-0.2719554305076599,
0.07092072814702988,
-0.01873767375946045,
-0.15965591371059418,
-0.1105741411447525,
0.2401582896709442,
-0.014616558328270912,
0.26462462544441223,
0.19812330603599548,
0.15867683291435242,
0.16474217176437378,
-0.10077402740716934,
0.23786330223083496,
-0.15562111139297485,
-0.12995736300945282,
0.03402426466345787,
0.1847245991230011,
0.17663875222206116,
-0.30301082134246826,
0.04370785877108574,
0.2135515809059143,
-0.09563468396663666,
0.09006693214178085,
-0.04986773431301117,
-0.37523317337036133,
0.09360593557357788,
-0.1414039134979248,
0.06929564476013184,
-0.04264359176158905,
-0.01848485693335533,
-0.02632848545908928,
0.226089209318161,
-0.7964654564857483,
-0.4338703751564026,
-0.18805593252182007,
0.2785819470882416,
0.4275817275047302,
0.4440073072910309,
-0.14186319708824158,
-0.23455163836479187,
-0.16082815825939178,
-0.12478914111852646,
0.5020840764045715,
-0.10637832432985306,
0.034515444189310074,
-0.3078826367855072,
-0.06751219928264618,
0.172288715839386,
0.23607754707336426,
-0.16939248144626617,
0.022563543170690536,
-0.060897231101989746,
0.4165675640106201,
0.21647495031356812,
-0.04590201377868652,
-0.2489141821861267,
-0.11225716024637222,
0.22099709510803223,
-0.06831099092960358,
0.4019663333892822,
-0.4644498825073242,
-0.10364212095737457,
-0.3935956060886383,
0.18057511746883392,
0.1125631034374237,
0.03321167826652527,
0.2970167398452759,
0.521926760673523,
0.1952512264251709,
0.1929663121700287,
0.2672562301158905,
0.26387596130371094,
0.026286263018846512,
0.3219051659107208,
0.11985975503921509,
-0.09603586792945862,
-0.017840072512626648,
0.07835309207439423,
0.174567312002182,
-0.0004819631576538086,
-0.11138315498828888,
0.5997068285942078,
0.03137914091348648,
-0.004140473902225494,
-0.15818075835704803,
0.16553038358688354,
-0.3940219581127167,
0.19939643144607544,
0.1589348167181015,
0.032642483711242676,
0.03288302198052406,
-0.03321914002299309,
0.003634592518210411,
0.07548407465219498,
0.2761545181274414,
0.44864508509635925,
0.2513763904571533,
-0.2495189905166626,
-0.2027413547039032,
-0.25810253620147705,
0.3710935413837433,
-0.0538538359105587,
0.1372665911912918,
-0.061519429087638855,
0.3472931385040283,
-0.04965158551931381,
-0.2888675332069397,
0.10557705909013748,
-0.02859797701239586,
-0.02613968960940838,
0.04406313598155975,
-0.08287283778190613,
-0.06900689005851746,
-0.3028966188430786,
0.007268517278134823,
-0.16584128141403198,
-0.4282776415348053,
0.09053602069616318,
-0.0716683566570282,
-0.06309407949447632,
-0.23509268462657928,
0.028755277395248413,
0.24691209197044373,
0.10863979160785675,
0.269619345664978,
0.11325430124998093,
0.051067039370536804,
-0.081651970744133,
-0.08877579122781754,
-0.310107558965683,
-0.18050210177898407,
-0.33474940061569214,
-0.16824257373809814,
-0.29674631357192993,
0.518100380897522,
-0.08391523361206055,
-0.2681010663509369,
-0.3095506429672241,
0.30838659405708313,
-0.3641299605369568,
0.5591874718666077,
0.3405429422855377,
0.10700561851263046,
-0.4990779757499695,
-0.13243548572063446,
0.08937793225049973,
0.34568530321121216,
0.06991312652826309,
0.03133796900510788,
-0.4642443060874939,
-0.18105259537696838,
0.4082537293434143,
-0.8163281679153442,
-0.34000951051712036,
0.27739217877388,
0.20632657408714294,
-0.03038465976715088,
-0.2536894381046295,
-0.2889244854450226,
-0.10753221064805984,
0.3392098844051361,
-0.07219057530164719,
-0.08149783313274384,
0.0767049491405487,
-0.0421542227268219,
0.12348578870296478,
0.20677074790000916,
0.16607853770256042,
0.32750508189201355,
-0.21208378672599792,
-0.08517817407846451,
-0.14890271425247192
] |
https://github.com/huggingface/datasets/issues/477 | Overview.ipynb throws exceptions with nlp 0.4.0 | Thanks for reporting this issue
There was a bug where numpy arrays would get returned instead of tensorflow tensors.
This is fixed on master.
I tried to re-run the colab and encountered this error instead:
```
AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'to_tensor'
```
This is because the dataset returns a Tensor and not a RaggedTensor.
But I think we should always return a RaggedTensor unless the length of the sequence is fixed (it that case they can be stack into a Tensor). | with nlp 0.4.0, the TensorFlow example in Overview.ipynb throws the following exceptions:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-48907f2ad433> in <module>
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)
<ipython-input-5-48907f2ad433> in <dictcomp>(.0)
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)
AttributeError: 'numpy.ndarray' object has no attribute 'to_tensor' | 83 | Overview.ipynb throws exceptions with nlp 0.4.0
with nlp 0.4.0, the TensorFlow example in Overview.ipynb throws the following exceptions:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-48907f2ad433> in <module>
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)
<ipython-input-5-48907f2ad433> in <dictcomp>(.0)
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)
AttributeError: 'numpy.ndarray' object has no attribute 'to_tensor'
Thanks for reporting this issue
There was a bug where numpy arrays would get returned instead of tensorflow tensors.
This is fixed on master.
I tried to re-run the colab and encountered this error instead:
```
AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'to_tensor'
```
This is because the dataset returns a Tensor and not a RaggedTensor.
But I think we should always return a RaggedTensor unless the length of the sequence is fixed (it that case they can be stack into a Tensor). | [
-0.039148252457380295,
0.08251208066940308,
-0.0073068346828222275,
-0.05308020859956741,
0.03180362284183502,
-0.04821458458900452,
0.8157608509063721,
0.2792401611804962,
-0.06842269748449326,
0.17899100482463837,
0.031670019030570984,
0.20381894707679749,
-0.29703110456466675,
-0.05307316407561302,
0.02102244831621647,
-0.4359814524650574,
-0.10791072994470596,
0.286254346370697,
0.03368745744228363,
-0.056053824722766876,
-0.16838866472244263,
0.2695774734020233,
-0.48140352964401245,
0.0699898898601532,
-0.30096107721328735,
-0.22240406274795532,
-0.003462664783000946,
-0.118403859436512,
0.18055935204029083,
-0.32180795073509216,
0.2983434498310089,
-0.08530253171920776,
-0.07296624034643173,
0.21570435166358948,
-0.00010940736683551222,
0.1312539428472519,
0.22475115954875946,
0.039974845945835114,
-0.17447307705879211,
-0.32944256067276,
-0.18357136845588684,
-0.017578570172190666,
-0.04888416826725006,
-0.30774039030075073,
0.1411333680152893,
0.06957089155912399,
0.2543089985847473,
0.229320228099823,
0.18758684396743774,
0.4259968101978302,
0.23439043760299683,
0.3789537847042084,
0.06841546297073364,
0.03368014469742775,
0.05070444568991661,
-0.023137591779232025,
-0.09127485752105713,
0.11408843100070953,
-0.0621383935213089,
-0.19979919493198395,
-0.2145836353302002,
0.2809057831764221,
-0.008752813562750816,
0.09153430163860321,
-0.15836673974990845,
0.024195216596126556,
0.0742403194308281,
-0.2711646258831024,
-0.07119592279195786,
0.414010226726532,
-0.04029438644647598,
-0.04265153408050537,
-0.39282986521720886,
-0.37032365798950195,
0.06527161598205566,
-0.5704239010810852,
-0.060038648545742035,
0.10483477264642715,
-0.11185605823993683,
-0.016560986638069153,
-0.1545906364917755,
0.095753975212574,
-0.5827879905700684,
0.3474162817001343,
-0.19087791442871094,
0.14489996433258057,
0.008272157050669193,
0.08105738461017609,
-0.009435955435037613,
-0.09868015348911285,
-0.02545027807354927,
-0.008968055248260498,
0.17726027965545654,
0.001748508308082819,
-0.2649017870426178,
-0.22038108110427856,
0.1818949580192566,
-0.20658046007156372,
-0.16721272468566895,
-0.07757670432329178,
0.023322083055973053,
0.02680090069770813,
0.0007517682388424873,
0.3499961793422699,
-0.12209682166576385,
0.26106780767440796,
0.11832499504089355,
0.15766668319702148,
0.3323269486427307,
-0.005689303856343031,
-0.18588680028915405,
0.03124060109257698,
0.0496797114610672,
-0.14371845126152039,
-0.14087305963039398,
0.017316244542598724,
0.3466320037841797,
0.13341858983039856,
-0.5548803806304932,
0.038705796003341675,
-0.3659697473049164,
0.14091409742832184,
0.19201068580150604,
0.24507781863212585,
-0.08728031814098358,
0.25865915417671204,
0.2062358260154724,
0.17463968694210052,
-0.4506019651889801,
-0.020784903317689896,
-0.21614781022071838,
0.32153499126434326,
-0.05434573441743851,
-0.25000032782554626,
0.24105249345302582,
0.3272881507873535,
0.32264208793640137,
-0.08501960337162018,
0.08632458746433258,
0.08347266912460327,
0.32037994265556335,
-0.27398791909217834,
0.11138085275888443,
0.24617785215377808,
-0.08001835644245148,
-0.12071254104375839,
0.04642083868384361,
-0.15178582072257996,
-0.038319915533065796,
-0.05753272771835327,
-0.20809483528137207,
-0.3066110908985138,
-0.035625651478767395,
0.26758792996406555,
0.12015941739082336,
-0.06082608550786972,
-0.25942766666412354,
0.13650977611541748,
0.031639523804187775,
-0.19478793442249298,
-0.03508324176073074,
-0.36203306913375854,
-0.12599369883537292,
-0.06127852573990822,
0.04010692983865738,
0.1906767040491104,
0.13413532078266144,
-0.15668565034866333,
0.10435881465673447,
0.18020105361938477,
0.2523800730705261,
0.26964837312698364,
-0.20445437729358673,
0.2307109534740448,
-0.03619445860385895,
0.3748852014541626,
0.3027421832084656,
-0.2861010432243347,
-0.18795520067214966,
0.11537700146436691,
-0.051069267094135284,
0.05718177556991577,
-0.09152545779943466,
0.01973552815616131,
0.42298242449760437,
-0.03806651011109352,
0.3864847421646118,
0.29393064975738525,
-0.23051655292510986,
0.09854084998369217,
-0.08446793258190155,
0.11409495770931244,
0.2922216057777405,
-0.0645059198141098,
0.11692649126052856,
0.0630713403224945,
-0.19997969269752502,
0.5250785946846008,
0.03861984610557556,
-0.12062960863113403,
-0.027356810867786407,
0.028160402551293373,
0.025163549929857254,
-0.3499794006347656,
-0.1735030561685562,
-0.13496774435043335,
-0.3476234972476959,
0.07232965528964996,
0.0827101618051529,
0.21566680073738098,
0.3347970247268677,
-0.058471355587244034,
0.015278277918696404,
0.11865263432264328,
-0.07743008434772491,
-0.2848464250564575,
0.2511829435825348,
0.15638989210128784,
-0.1726754903793335,
0.07474644482135773,
-0.13705287873744965,
0.07789013534784317,
-0.38104790449142456,
0.1017816960811615,
-0.13996203243732452,
0.06893713772296906,
-0.098452128469944,
-0.19419701397418976,
-0.2610079050064087,
0.3692513704299927,
-0.07399291545152664,
-0.17859557271003723,
-0.06112522631883621,
0.2158331573009491,
0.18148234486579895,
0.22976575791835785,
-0.23061400651931763,
0.14139559864997864,
0.3241615891456604,
-0.057807501405477524,
-0.16012084484100342,
0.20857085287570953,
0.008381064981222153,
-0.17828401923179626,
0.1594434678554535,
0.48199522495269775,
0.2851333022117615,
0.17522089183330536,
0.4278372526168823,
0.13676206767559052,
0.206836998462677,
0.002374451607465744,
-0.19722695648670197,
0.08879826962947845,
0.36357617378234863,
-0.07122230529785156,
0.19735628366470337,
-0.29395538568496704,
-0.7215967178344727,
0.11180209368467331,
0.5496821403503418,
0.13436761498451233,
0.06597433239221573,
0.19627836346626282,
-0.0909680649638176,
0.1029394343495369,
0.38373062014579773,
-0.2072695642709732,
0.11102336645126343,
0.08644749224185944,
0.25277209281921387,
0.0789593905210495,
-0.37174075841903687,
-0.25218766927719116,
0.08088354021310806,
0.14149287343025208,
-0.102218858897686,
-0.022834397852420807,
0.27302858233451843,
0.2171439826488495,
-0.2615649700164795,
-0.34871023893356323,
-0.17015759646892548,
0.2663601338863373,
-0.33543139696121216,
0.3268648684024811,
-0.12055239081382751,
-0.274183988571167,
-0.08208134770393372,
-0.5632295608520508,
-0.14262984693050385,
-0.3243647813796997,
-0.01961352303624153,
0.6269508600234985,
-0.3355832099914551,
0.2322809398174286,
0.16799500584602356,
0.038532599806785583,
0.07346577942371368,
0.2469545602798462,
0.1575045883655548,
0.008954841643571854,
-0.31244003772735596,
0.13947968184947968,
0.1999259740114212,
-0.15033364295959473,
0.2847864627838135,
-0.08084449172019958,
-0.30653518438339233,
0.25946560502052307,
-0.5440362691879272,
0.11752739548683167,
-0.12583082914352417,
-0.0007881764322519302,
0.20608612895011902,
0.2676904797554016,
-0.2906230092048645,
-0.5785194039344788,
0.05554932355880737,
-0.11166862398386002,
-0.15757694840431213,
0.36485370993614197,
-0.037602391093969345,
-0.044479548931121826,
-0.36759814620018005,
-0.5435932278633118,
-0.17161321640014648,
-0.44467324018478394,
0.3616951107978821,
-0.08067688345909119,
0.3070824146270752,
0.7853786945343018,
-0.07303920388221741,
0.5275717377662659,
0.26959428191185,
0.18629351258277893,
0.21734203398227692,
-0.06824472546577454,
-0.008161041885614395,
-0.2857409417629242,
-0.3695431053638458,
-0.10630330443382263,
-0.28889721632003784,
0.18319541215896606,
0.12186133861541748,
-0.32980769872665405,
-0.05850497633218765,
-0.03481955826282501,
0.1349249929189682,
0.1361692249774933,
-0.17422360181808472,
0.3653981685638428,
-0.05630164593458176,
-0.03022165596485138,
-0.0342407189309597,
0.05736270174384117,
0.37216126918792725,
0.24515876173973083,
-0.062261633574962616,
-0.03946908563375473,
0.20594444870948792,
0.17548634111881256,
0.3692195415496826,
0.04247167333960533,
-0.242543026804924,
0.21845167875289917,
0.0004713144153356552,
0.034933753311634064,
-0.1755887269973755,
-0.2768710255622864,
0.23891153931617737,
-0.017198234796524048,
-0.07878956943750381,
0.07964477688074112,
-0.1992204487323761,
-0.29408228397369385,
-0.10448072850704193,
0.05837351456284523,
-0.20437464118003845,
-0.39955443143844604,
0.1599554419517517,
-0.32069551944732666,
0.1283506155014038,
-0.059703584760427475,
0.01568952202796936,
-0.21509432792663574,
0.06578206270933151,
-0.14750732481479645,
0.17151963710784912,
0.08613042533397675,
-0.25962966680526733,
-0.09385855495929718,
-0.5862795114517212,
-0.6067797541618347,
0.204632967710495,
0.24644257128238678,
0.5263920426368713,
-0.08701077848672867,
-0.018824206665158272,
-0.11416047811508179,
-0.04168391227722168,
0.44610708951950073,
0.10698521882295609,
-0.1425532102584839,
0.2608308792114258,
-0.13291925191879272,
-0.35782772302627563,
-0.12204830348491669,
-0.36927834153175354,
0.27198585867881775,
0.5299983024597168,
0.3015771806240082,
-0.20639365911483765,
0.0024215502198785543,
0.3558467924594879,
-0.04668718948960304,
0.12434613704681396,
0.1750926524400711,
0.041471030563116074,
-0.030086975544691086,
-0.141452357172966,
0.09089230000972748,
0.15869200229644775,
-0.041601236909627914,
-0.30869805812835693,
-0.058505989611148834,
0.023823844268918037,
-0.07467338442802429,
0.16841281950473785,
0.2123262584209442,
-0.19105777144432068,
-0.009006057865917683,
0.07701161503791809,
-0.2531859278678894,
-0.1229066401720047,
0.4033558666706085,
-0.08544448018074036,
-0.16120511293411255,
-0.29864540696144104,
-0.030026815831661224,
0.17723286151885986,
0.08640102297067642,
0.19853366911411285,
-0.026353836059570312,
0.044887032359838486,
-0.23023894429206848,
-0.044055208563804626,
-0.08602523803710938,
0.429545134305954,
0.5223544239997864,
0.06649709492921829,
-0.10003859549760818,
-0.16191282868385315,
0.2714982032775879,
-0.3283502757549286,
0.07145769894123077,
0.399015337228775,
-0.06086389720439911,
-0.35277706384658813,
0.280002236366272,
-0.2473480999469757,
0.47531217336654663,
0.4118618965148926,
0.21834352612495422,
0.6721667647361755,
0.3472309112548828,
0.6203200221061707,
0.12773127853870392,
0.47535520792007446,
-0.1620081067085266,
-0.01739543303847313,
-0.10052336752414703,
-0.07888659834861755,
0.027614053338766098,
0.1096019446849823,
-0.13197629153728485,
0.08895579725503922,
0.17672382295131683,
0.0960332378745079,
0.04636494070291519,
0.09851272404193878,
0.06118570268154144,
-0.24040552973747253,
-0.29009297490119934,
0.15395015478134155,
-0.1581515073776245,
0.15743622183799744,
-0.04821344092488289,
-0.1438087671995163,
-0.08243638277053833,
-0.32646214962005615,
-0.2867514491081238,
0.27549707889556885,
-0.1414872705936432,
0.1955626904964447,
0.20458181202411652,
-0.19718754291534424,
-0.039106957614421844,
-0.02875782921910286,
0.24093206226825714,
-0.07016980648040771,
-0.14558126032352448,
-0.20687253773212433,
-0.06926431506872177,
0.02802480012178421,
0.10321266949176788,
-0.13631819188594818,
0.5273315906524658,
-0.14863380789756775,
-0.13759905099868774,
-0.00979524850845337,
-0.09550393372774124,
-0.21735264360904694,
0.26215866208076477,
0.11525601148605347,
0.09076294302940369,
0.14732405543327332,
0.02498776838183403,
0.1188034862279892,
-0.45234811305999756,
-0.2321522831916809,
0.17034289240837097,
-0.134919673204422,
-0.3381381928920746,
0.21342706680297852,
-0.1455640345811844,
-0.022663269191980362,
0.0562407448887825,
0.24977990984916687,
-0.05926795303821564,
0.23416930437088013,
0.6033890247344971,
-0.021193182095885277,
-0.09155330061912537,
-0.14357341825962067,
-0.21654221415519714,
0.054151926189661026,
-0.1071857213973999,
0.1656973958015442,
-0.14930160343647003,
0.0013680607080459595,
0.052545901387929916,
0.15750420093536377,
0.008193247020244598,
0.28586289286613464,
-0.16629701852798462,
-0.32248127460479736,
-0.3871930241584778,
0.21804939210414886,
-0.14019924402236938,
0.21347154676914215,
0.16304779052734375,
0.6170103549957275,
0.08566633611917496,
-0.12599818408489227,
-0.32188791036605835,
0.032127443701028824,
-0.26771223545074463,
0.3241804540157318,
0.03891389071941376,
-0.2092728316783905,
0.15032540261745453,
-0.0048057762905955315,
0.11322200298309326,
0.13612374663352966,
-0.10977046936750412,
-0.2583741843700409,
-0.19174028933048248,
0.07140308618545532,
0.18571457266807556,
-0.3465096354484558,
0.16616295278072357,
0.0046598706394433975,
-0.15571840107440948,
-0.12303246557712555,
0.11720077693462372,
-0.056309618055820465,
-0.2534218430519104,
0.5090378522872925,
0.1321457028388977,
0.6595728993415833,
0.2523021101951599,
0.04575406759977341,
-0.17820554971694946,
0.16866567730903625,
-0.08894885331392288,
0.19712921977043152,
-0.010023527778685093,
-0.041321903467178345,
-0.33868664503097534,
-0.033177636563777924,
-0.4179776906967163,
-0.11482692509889603,
0.22043102979660034,
-0.3328478932380676,
-0.037738047540187836,
-0.24887029826641083,
0.04293714463710785,
0.13501083850860596,
-0.11346342414617538,
0.026608379557728767,
-0.006043711677193642,
0.2527722418308258,
-0.07410392165184021,
0.16230672597885132,
0.24985887110233307,
-0.03205079957842827,
0.21617823839187622,
0.10435110330581665,
0.1092672348022461,
-0.09028369188308716,
0.10970747470855713,
0.1391165554523468,
-0.19794492423534393,
-0.3117925524711609,
0.24128027260303497,
0.32604697346687317,
-0.361628919839859,
0.11626708507537842,
-0.18294331431388855,
0.0854911133646965,
0.42220622301101685,
-0.05156338959932327,
0.016601242125034332,
0.2456997185945511,
0.0994253158569336,
-0.1708700954914093,
0.22370341420173645,
-0.39966025948524475,
-0.2821907699108124,
-0.03170883655548096,
0.19268758594989777,
0.27797791361808777,
0.10087109357118607,
0.029756031930446625,
-0.2888757884502411,
-0.15922793745994568,
-0.0015651397407054901,
0.20955322682857513,
-0.3970543444156647,
0.014734521508216858,
-0.3463863134384155,
0.15735697746276855,
0.057484835386276245,
-0.3433610200881958,
-0.03770243003964424,
0.044532328844070435,
0.17233657836914062,
0.1850244104862213,
-0.2280973345041275,
-0.0942428782582283,
-0.13565218448638916,
0.01578103005886078,
0.21791142225265503,
-0.06114176660776138,
0.32296741008758545,
0.36759525537490845,
-0.01892666518688202,
-0.276544988155365,
0.5054781436920166,
0.435751736164093,
0.24003557860851288,
-0.37852782011032104,
0.010465141385793686,
0.12376669049263,
-0.10977984964847565,
-0.02724858745932579,
0.09683844447135925,
0.10764651000499725,
0.20096230506896973,
0.22501759231090546,
0.13058990240097046,
-0.17860448360443115,
0.3606995642185211,
0.13612620532512665,
-0.045332737267017365,
-0.2492053061723709,
0.3173817992210388,
0.12193849682807922,
-0.13876578211784363,
-0.18310540914535522,
-0.05192979425191879,
-0.3085251450538635,
0.1512971669435501,
0.3084790110588074,
-0.10380877554416656,
0.13198232650756836,
0.1568075567483902,
0.08414843678474426,
-0.09370031952857971,
0.38242611289024353,
0.2785469591617584,
0.3412991166114807,
-0.23918339610099792,
-0.053266506642103195,
-0.13953232765197754,
0.1518152356147766,
-0.10916389524936676,
0.3494440019130707,
0.13355380296707153,
0.1528654545545578,
-0.20132771134376526,
-0.055490896105766296,
-0.17580269277095795,
-0.48665788769721985,
0.0382891409099102,
0.014096945524215698,
-0.5309222340583801,
-0.06776505708694458,
0.21672378480434418,
-0.29952844977378845,
0.08093005418777466,
-0.29191717505455017,
0.1038765013217926,
-0.021671921014785767,
0.05827075242996216,
-0.024385519325733185,
0.2547588050365448,
0.05807569995522499,
0.4695751368999481,
-0.1598595678806305,
0.2173871248960495,
0.35234907269477844,
-0.03992747887969017,
-0.2264605462551117,
0.015534330159425735,
-0.12886828184127808,
-0.3512553572654724,
0.0623173713684082,
0.0021561160683631897,
0.6310626268386841,
0.03080183081328869,
-0.3426465392112732,
-0.0471835732460022,
0.29666760563850403,
0.07446373999118805,
-0.22585377097129822,
-0.2897467613220215,
0.5159018635749817,
-0.3268096148967743,
0.12090504169464111,
-0.035534560680389404,
0.22577068209648132,
0.046970050781965256,
0.1271173357963562,
-0.4208706021308899,
-0.5104085206985474,
0.45898646116256714,
-0.6723724007606506,
-0.2989535331726074,
-0.1500108242034912,
0.3177681565284729,
-0.17841485142707825,
0.15415197610855103,
-0.7014426589012146,
-0.1308531016111374,
0.32142242789268494,
-0.30686330795288086,
-0.37376144528388977,
0.11707913875579834,
0.2110433429479599,
0.016910571604967117,
0.03593798354268074,
0.5025028586387634,
0.05190780758857727,
-0.30458682775497437,
0.09043362736701965,
-0.3307107090950012
] |
https://github.com/huggingface/datasets/issues/477 | Overview.ipynb throws exceptions with nlp 0.4.0 | Hi, I got another error (on Colab):
```python
# You can read a few attributes of the datasets before loading them (they are python dataclasses)
from dataclasses import asdict
for key, value in asdict(datasets[6]).items():
print('👉 ' + key + ': ' + str(value))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-b8ace6c227a2> in <module>()
2 from dataclasses import asdict
3
----> 4 for key, value in asdict(datasets[6]).items():
5 print('👉 ' + key + ': ' + str(value))
/usr/local/lib/python3.6/dist-packages/dataclasses.py in asdict(obj, dict_factory)
1008 """
1009 if not _is_dataclass_instance(obj):
-> 1010 raise TypeError("asdict() should be called on dataclass instances")
1011 return _asdict_inner(obj, dict_factory)
1012
TypeError: asdict() should be called on dataclass instances
``` | with nlp 0.4.0, the TensorFlow example in Overview.ipynb throws the following exceptions:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-48907f2ad433> in <module>
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)
<ipython-input-5-48907f2ad433> in <dictcomp>(.0)
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)
AttributeError: 'numpy.ndarray' object has no attribute 'to_tensor' | 110 | Overview.ipynb throws exceptions with nlp 0.4.0
with nlp 0.4.0, the TensorFlow example in Overview.ipynb throws the following exceptions:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-48907f2ad433> in <module>
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)
<ipython-input-5-48907f2ad433> in <dictcomp>(.0)
----> 1 features = {x: train_tf_dataset[x].to_tensor(default_value=0, shape=[None, tokenizer.max_len]) for x in columns[:3]}
2 labels = {"output_1": train_tf_dataset["start_positions"].to_tensor(default_value=0, shape=[None, 1])}
3 labels["output_2"] = train_tf_dataset["end_positions"].to_tensor(default_value=0, shape=[None, 1])
4 tfdataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(8)
AttributeError: 'numpy.ndarray' object has no attribute 'to_tensor'
Hi, I got another error (on Colab):
```python
# You can read a few attributes of the datasets before loading them (they are python dataclasses)
from dataclasses import asdict
for key, value in asdict(datasets[6]).items():
print('👉 ' + key + ': ' + str(value))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-b8ace6c227a2> in <module>()
2 from dataclasses import asdict
3
----> 4 for key, value in asdict(datasets[6]).items():
5 print('👉 ' + key + ': ' + str(value))
/usr/local/lib/python3.6/dist-packages/dataclasses.py in asdict(obj, dict_factory)
1008 """
1009 if not _is_dataclass_instance(obj):
-> 1010 raise TypeError("asdict() should be called on dataclass instances")
1011 return _asdict_inner(obj, dict_factory)
1012
TypeError: asdict() should be called on dataclass instances
``` | [
-0.039148252457380295,
0.08251208066940308,
-0.0073068346828222275,
-0.05308020859956741,
0.03180362284183502,
-0.04821458458900452,
0.8157608509063721,
0.2792401611804962,
-0.06842269748449326,
0.17899100482463837,
0.031670019030570984,
0.20381894707679749,
-0.29703110456466675,
-0.05307316407561302,
0.02102244831621647,
-0.4359814524650574,
-0.10791072994470596,
0.286254346370697,
0.03368745744228363,
-0.056053824722766876,
-0.16838866472244263,
0.2695774734020233,
-0.48140352964401245,
0.0699898898601532,
-0.30096107721328735,
-0.22240406274795532,
-0.003462664783000946,
-0.118403859436512,
0.18055935204029083,
-0.32180795073509216,
0.2983434498310089,
-0.08530253171920776,
-0.07296624034643173,
0.21570435166358948,
-0.00010940736683551222,
0.1312539428472519,
0.22475115954875946,
0.039974845945835114,
-0.17447307705879211,
-0.32944256067276,
-0.18357136845588684,
-0.017578570172190666,
-0.04888416826725006,
-0.30774039030075073,
0.1411333680152893,
0.06957089155912399,
0.2543089985847473,
0.229320228099823,
0.18758684396743774,
0.4259968101978302,
0.23439043760299683,
0.3789537847042084,
0.06841546297073364,
0.03368014469742775,
0.05070444568991661,
-0.023137591779232025,
-0.09127485752105713,
0.11408843100070953,
-0.0621383935213089,
-0.19979919493198395,
-0.2145836353302002,
0.2809057831764221,
-0.008752813562750816,
0.09153430163860321,
-0.15836673974990845,
0.024195216596126556,
0.0742403194308281,
-0.2711646258831024,
-0.07119592279195786,
0.414010226726532,
-0.04029438644647598,
-0.04265153408050537,
-0.39282986521720886,
-0.37032365798950195,
0.06527161598205566,
-0.5704239010810852,
-0.060038648545742035,
0.10483477264642715,
-0.11185605823993683,
-0.016560986638069153,
-0.1545906364917755,
0.095753975212574,
-0.5827879905700684,
0.3474162817001343,
-0.19087791442871094,
0.14489996433258057,
0.008272157050669193,
0.08105738461017609,
-0.009435955435037613,
-0.09868015348911285,
-0.02545027807354927,
-0.008968055248260498,
0.17726027965545654,
0.001748508308082819,
-0.2649017870426178,
-0.22038108110427856,
0.1818949580192566,
-0.20658046007156372,
-0.16721272468566895,
-0.07757670432329178,
0.023322083055973053,
0.02680090069770813,
0.0007517682388424873,
0.3499961793422699,
-0.12209682166576385,
0.26106780767440796,
0.11832499504089355,
0.15766668319702148,
0.3323269486427307,
-0.005689303856343031,
-0.18588680028915405,
0.03124060109257698,
0.0496797114610672,
-0.14371845126152039,
-0.14087305963039398,
0.017316244542598724,
0.3466320037841797,
0.13341858983039856,
-0.5548803806304932,
0.038705796003341675,
-0.3659697473049164,
0.14091409742832184,
0.19201068580150604,
0.24507781863212585,
-0.08728031814098358,
0.25865915417671204,
0.2062358260154724,
0.17463968694210052,
-0.4506019651889801,
-0.020784903317689896,
-0.21614781022071838,
0.32153499126434326,
-0.05434573441743851,
-0.25000032782554626,
0.24105249345302582,
0.3272881507873535,
0.32264208793640137,
-0.08501960337162018,
0.08632458746433258,
0.08347266912460327,
0.32037994265556335,
-0.27398791909217834,
0.11138085275888443,
0.24617785215377808,
-0.08001835644245148,
-0.12071254104375839,
0.04642083868384361,
-0.15178582072257996,
-0.038319915533065796,
-0.05753272771835327,
-0.20809483528137207,
-0.3066110908985138,
-0.035625651478767395,
0.26758792996406555,
0.12015941739082336,
-0.06082608550786972,
-0.25942766666412354,
0.13650977611541748,
0.031639523804187775,
-0.19478793442249298,
-0.03508324176073074,
-0.36203306913375854,
-0.12599369883537292,
-0.06127852573990822,
0.04010692983865738,
0.1906767040491104,
0.13413532078266144,
-0.15668565034866333,
0.10435881465673447,
0.18020105361938477,
0.2523800730705261,
0.26964837312698364,
-0.20445437729358673,
0.2307109534740448,
-0.03619445860385895,
0.3748852014541626,
0.3027421832084656,
-0.2861010432243347,
-0.18795520067214966,
0.11537700146436691,
-0.051069267094135284,
0.05718177556991577,
-0.09152545779943466,
0.01973552815616131,
0.42298242449760437,
-0.03806651011109352,
0.3864847421646118,
0.29393064975738525,
-0.23051655292510986,
0.09854084998369217,
-0.08446793258190155,
0.11409495770931244,
0.2922216057777405,
-0.0645059198141098,
0.11692649126052856,
0.0630713403224945,
-0.19997969269752502,
0.5250785946846008,
0.03861984610557556,
-0.12062960863113403,
-0.027356810867786407,
0.028160402551293373,
0.025163549929857254,
-0.3499794006347656,
-0.1735030561685562,
-0.13496774435043335,
-0.3476234972476959,
0.07232965528964996,
0.0827101618051529,
0.21566680073738098,
0.3347970247268677,
-0.058471355587244034,
0.015278277918696404,
0.11865263432264328,
-0.07743008434772491,
-0.2848464250564575,
0.2511829435825348,
0.15638989210128784,
-0.1726754903793335,
0.07474644482135773,
-0.13705287873744965,
0.07789013534784317,
-0.38104790449142456,
0.1017816960811615,
-0.13996203243732452,
0.06893713772296906,
-0.098452128469944,
-0.19419701397418976,
-0.2610079050064087,
0.3692513704299927,
-0.07399291545152664,
-0.17859557271003723,
-0.06112522631883621,
0.2158331573009491,
0.18148234486579895,
0.22976575791835785,
-0.23061400651931763,
0.14139559864997864,
0.3241615891456604,
-0.057807501405477524,
-0.16012084484100342,
0.20857085287570953,
0.008381064981222153,
-0.17828401923179626,
0.1594434678554535,
0.48199522495269775,
0.2851333022117615,
0.17522089183330536,
0.4278372526168823,
0.13676206767559052,
0.206836998462677,
0.002374451607465744,
-0.19722695648670197,
0.08879826962947845,
0.36357617378234863,
-0.07122230529785156,
0.19735628366470337,
-0.29395538568496704,
-0.7215967178344727,
0.11180209368467331,
0.5496821403503418,
0.13436761498451233,
0.06597433239221573,
0.19627836346626282,
-0.0909680649638176,
0.1029394343495369,
0.38373062014579773,
-0.2072695642709732,
0.11102336645126343,
0.08644749224185944,
0.25277209281921387,
0.0789593905210495,
-0.37174075841903687,
-0.25218766927719116,
0.08088354021310806,
0.14149287343025208,
-0.102218858897686,
-0.022834397852420807,
0.27302858233451843,
0.2171439826488495,
-0.2615649700164795,
-0.34871023893356323,
-0.17015759646892548,
0.2663601338863373,
-0.33543139696121216,
0.3268648684024811,
-0.12055239081382751,
-0.274183988571167,
-0.08208134770393372,
-0.5632295608520508,
-0.14262984693050385,
-0.3243647813796997,
-0.01961352303624153,
0.6269508600234985,
-0.3355832099914551,
0.2322809398174286,
0.16799500584602356,
0.038532599806785583,
0.07346577942371368,
0.2469545602798462,
0.1575045883655548,
0.008954841643571854,
-0.31244003772735596,
0.13947968184947968,
0.1999259740114212,
-0.15033364295959473,
0.2847864627838135,
-0.08084449172019958,
-0.30653518438339233,
0.25946560502052307,
-0.5440362691879272,
0.11752739548683167,
-0.12583082914352417,
-0.0007881764322519302,
0.20608612895011902,
0.2676904797554016,
-0.2906230092048645,
-0.5785194039344788,
0.05554932355880737,
-0.11166862398386002,
-0.15757694840431213,
0.36485370993614197,
-0.037602391093969345,
-0.044479548931121826,
-0.36759814620018005,
-0.5435932278633118,
-0.17161321640014648,
-0.44467324018478394,
0.3616951107978821,
-0.08067688345909119,
0.3070824146270752,
0.7853786945343018,
-0.07303920388221741,
0.5275717377662659,
0.26959428191185,
0.18629351258277893,
0.21734203398227692,
-0.06824472546577454,
-0.008161041885614395,
-0.2857409417629242,
-0.3695431053638458,
-0.10630330443382263,
-0.28889721632003784,
0.18319541215896606,
0.12186133861541748,
-0.32980769872665405,
-0.05850497633218765,
-0.03481955826282501,
0.1349249929189682,
0.1361692249774933,
-0.17422360181808472,
0.3653981685638428,
-0.05630164593458176,
-0.03022165596485138,
-0.0342407189309597,
0.05736270174384117,
0.37216126918792725,
0.24515876173973083,
-0.062261633574962616,
-0.03946908563375473,
0.20594444870948792,
0.17548634111881256,
0.3692195415496826,
0.04247167333960533,
-0.242543026804924,
0.21845167875289917,
0.0004713144153356552,
0.034933753311634064,
-0.1755887269973755,
-0.2768710255622864,
0.23891153931617737,
-0.017198234796524048,
-0.07878956943750381,
0.07964477688074112,
-0.1992204487323761,
-0.29408228397369385,
-0.10448072850704193,
0.05837351456284523,
-0.20437464118003845,
-0.39955443143844604,
0.1599554419517517,
-0.32069551944732666,
0.1283506155014038,
-0.059703584760427475,
0.01568952202796936,
-0.21509432792663574,
0.06578206270933151,
-0.14750732481479645,
0.17151963710784912,
0.08613042533397675,
-0.25962966680526733,
-0.09385855495929718,
-0.5862795114517212,
-0.6067797541618347,
0.204632967710495,
0.24644257128238678,
0.5263920426368713,
-0.08701077848672867,
-0.018824206665158272,
-0.11416047811508179,
-0.04168391227722168,
0.44610708951950073,
0.10698521882295609,
-0.1425532102584839,
0.2608308792114258,
-0.13291925191879272,
-0.35782772302627563,
-0.12204830348491669,
-0.36927834153175354,
0.27198585867881775,
0.5299983024597168,
0.3015771806240082,
-0.20639365911483765,
0.0024215502198785543,
0.3558467924594879,
-0.04668718948960304,
0.12434613704681396,
0.1750926524400711,
0.041471030563116074,
-0.030086975544691086,
-0.141452357172966,
0.09089230000972748,
0.15869200229644775,
-0.041601236909627914,
-0.30869805812835693,
-0.058505989611148834,
0.023823844268918037,
-0.07467338442802429,
0.16841281950473785,
0.2123262584209442,
-0.19105777144432068,
-0.009006057865917683,
0.07701161503791809,
-0.2531859278678894,
-0.1229066401720047,
0.4033558666706085,
-0.08544448018074036,
-0.16120511293411255,
-0.29864540696144104,
-0.030026815831661224,
0.17723286151885986,
0.08640102297067642,
0.19853366911411285,
-0.026353836059570312,
0.044887032359838486,
-0.23023894429206848,
-0.044055208563804626,
-0.08602523803710938,
0.429545134305954,
0.5223544239997864,
0.06649709492921829,
-0.10003859549760818,
-0.16191282868385315,
0.2714982032775879,
-0.3283502757549286,
0.07145769894123077,
0.399015337228775,
-0.06086389720439911,
-0.35277706384658813,
0.280002236366272,
-0.2473480999469757,
0.47531217336654663,
0.4118618965148926,
0.21834352612495422,
0.6721667647361755,
0.3472309112548828,
0.6203200221061707,
0.12773127853870392,
0.47535520792007446,
-0.1620081067085266,
-0.01739543303847313,
-0.10052336752414703,
-0.07888659834861755,
0.027614053338766098,
0.1096019446849823,
-0.13197629153728485,
0.08895579725503922,
0.17672382295131683,
0.0960332378745079,
0.04636494070291519,
0.09851272404193878,
0.06118570268154144,
-0.24040552973747253,
-0.29009297490119934,
0.15395015478134155,
-0.1581515073776245,
0.15743622183799744,
-0.04821344092488289,
-0.1438087671995163,
-0.08243638277053833,
-0.32646214962005615,
-0.2867514491081238,
0.27549707889556885,
-0.1414872705936432,
0.1955626904964447,
0.20458181202411652,
-0.19718754291534424,
-0.039106957614421844,
-0.02875782921910286,
0.24093206226825714,
-0.07016980648040771,
-0.14558126032352448,
-0.20687253773212433,
-0.06926431506872177,
0.02802480012178421,
0.10321266949176788,
-0.13631819188594818,
0.5273315906524658,
-0.14863380789756775,
-0.13759905099868774,
-0.00979524850845337,
-0.09550393372774124,
-0.21735264360904694,
0.26215866208076477,
0.11525601148605347,
0.09076294302940369,
0.14732405543327332,
0.02498776838183403,
0.1188034862279892,
-0.45234811305999756,
-0.2321522831916809,
0.17034289240837097,
-0.134919673204422,
-0.3381381928920746,
0.21342706680297852,
-0.1455640345811844,
-0.022663269191980362,
0.0562407448887825,
0.24977990984916687,
-0.05926795303821564,
0.23416930437088013,
0.6033890247344971,
-0.021193182095885277,
-0.09155330061912537,
-0.14357341825962067,
-0.21654221415519714,
0.054151926189661026,
-0.1071857213973999,
0.1656973958015442,
-0.14930160343647003,
0.0013680607080459595,
0.052545901387929916,
0.15750420093536377,
0.008193247020244598,
0.28586289286613464,
-0.16629701852798462,
-0.32248127460479736,
-0.3871930241584778,
0.21804939210414886,
-0.14019924402236938,
0.21347154676914215,
0.16304779052734375,
0.6170103549957275,
0.08566633611917496,
-0.12599818408489227,
-0.32188791036605835,
0.032127443701028824,
-0.26771223545074463,
0.3241804540157318,
0.03891389071941376,
-0.2092728316783905,
0.15032540261745453,
-0.0048057762905955315,
0.11322200298309326,
0.13612374663352966,
-0.10977046936750412,
-0.2583741843700409,
-0.19174028933048248,
0.07140308618545532,
0.18571457266807556,
-0.3465096354484558,
0.16616295278072357,
0.0046598706394433975,
-0.15571840107440948,
-0.12303246557712555,
0.11720077693462372,
-0.056309618055820465,
-0.2534218430519104,
0.5090378522872925,
0.1321457028388977,
0.6595728993415833,
0.2523021101951599,
0.04575406759977341,
-0.17820554971694946,
0.16866567730903625,
-0.08894885331392288,
0.19712921977043152,
-0.010023527778685093,
-0.041321903467178345,
-0.33868664503097534,
-0.033177636563777924,
-0.4179776906967163,
-0.11482692509889603,
0.22043102979660034,
-0.3328478932380676,
-0.037738047540187836,
-0.24887029826641083,
0.04293714463710785,
0.13501083850860596,
-0.11346342414617538,
0.026608379557728767,
-0.006043711677193642,
0.2527722418308258,
-0.07410392165184021,
0.16230672597885132,
0.24985887110233307,
-0.03205079957842827,
0.21617823839187622,
0.10435110330581665,
0.1092672348022461,
-0.09028369188308716,
0.10970747470855713,
0.1391165554523468,
-0.19794492423534393,
-0.3117925524711609,
0.24128027260303497,
0.32604697346687317,
-0.361628919839859,
0.11626708507537842,
-0.18294331431388855,
0.0854911133646965,
0.42220622301101685,
-0.05156338959932327,
0.016601242125034332,
0.2456997185945511,
0.0994253158569336,
-0.1708700954914093,
0.22370341420173645,
-0.39966025948524475,
-0.2821907699108124,
-0.03170883655548096,
0.19268758594989777,
0.27797791361808777,
0.10087109357118607,
0.029756031930446625,
-0.2888757884502411,
-0.15922793745994568,
-0.0015651397407054901,
0.20955322682857513,
-0.3970543444156647,
0.014734521508216858,
-0.3463863134384155,
0.15735697746276855,
0.057484835386276245,
-0.3433610200881958,
-0.03770243003964424,
0.044532328844070435,
0.17233657836914062,
0.1850244104862213,
-0.2280973345041275,
-0.0942428782582283,
-0.13565218448638916,
0.01578103005886078,
0.21791142225265503,
-0.06114176660776138,
0.32296741008758545,
0.36759525537490845,
-0.01892666518688202,
-0.276544988155365,
0.5054781436920166,
0.435751736164093,
0.24003557860851288,
-0.37852782011032104,
0.010465141385793686,
0.12376669049263,
-0.10977984964847565,
-0.02724858745932579,
0.09683844447135925,
0.10764651000499725,
0.20096230506896973,
0.22501759231090546,
0.13058990240097046,
-0.17860448360443115,
0.3606995642185211,
0.13612620532512665,
-0.045332737267017365,
-0.2492053061723709,
0.3173817992210388,
0.12193849682807922,
-0.13876578211784363,
-0.18310540914535522,
-0.05192979425191879,
-0.3085251450538635,
0.1512971669435501,
0.3084790110588074,
-0.10380877554416656,
0.13198232650756836,
0.1568075567483902,
0.08414843678474426,
-0.09370031952857971,
0.38242611289024353,
0.2785469591617584,
0.3412991166114807,
-0.23918339610099792,
-0.053266506642103195,
-0.13953232765197754,
0.1518152356147766,
-0.10916389524936676,
0.3494440019130707,
0.13355380296707153,
0.1528654545545578,
-0.20132771134376526,
-0.055490896105766296,
-0.17580269277095795,
-0.48665788769721985,
0.0382891409099102,
0.014096945524215698,
-0.5309222340583801,
-0.06776505708694458,
0.21672378480434418,
-0.29952844977378845,
0.08093005418777466,
-0.29191717505455017,
0.1038765013217926,
-0.021671921014785767,
0.05827075242996216,
-0.024385519325733185,
0.2547588050365448,
0.05807569995522499,
0.4695751368999481,
-0.1598595678806305,
0.2173871248960495,
0.35234907269477844,
-0.03992747887969017,
-0.2264605462551117,
0.015534330159425735,
-0.12886828184127808,
-0.3512553572654724,
0.0623173713684082,
0.0021561160683631897,
0.6310626268386841,
0.03080183081328869,
-0.3426465392112732,
-0.0471835732460022,
0.29666760563850403,
0.07446373999118805,
-0.22585377097129822,
-0.2897467613220215,
0.5159018635749817,
-0.3268096148967743,
0.12090504169464111,
-0.035534560680389404,
0.22577068209648132,
0.046970050781965256,
0.1271173357963562,
-0.4208706021308899,
-0.5104085206985474,
0.45898646116256714,
-0.6723724007606506,
-0.2989535331726074,
-0.1500108242034912,
0.3177681565284729,
-0.17841485142707825,
0.15415197610855103,
-0.7014426589012146,
-0.1308531016111374,
0.32142242789268494,
-0.30686330795288086,
-0.37376144528388977,
0.11707913875579834,
0.2110433429479599,
0.016910571604967117,
0.03593798354268074,
0.5025028586387634,
0.05190780758857727,
-0.30458682775497437,
0.09043362736701965,
-0.3307107090950012
] |
https://github.com/huggingface/datasets/issues/474 | test_load_real_dataset when config has BUILDER_CONFIGS that matter | The `data_dir` parameter has been removed. Now the error is `ValueError: Config name is missing`
As mentioned in #470 I think we can have one test with the first config of BUILDER_CONFIGS, and another test that runs all of the configs in BUILDER_CONFIGS | It a dataset has custom `BUILDER_CONFIGS` with non-keyword arguments (or keyword arguments with non default values), the config is not loaded during the test and causes an error.
I think the problem is that `test_load_real_dataset` calls `load_dataset` with `data_dir=temp_data_dir` ([here](https://github.com/huggingface/nlp/blob/master/tests/test_dataset_common.py#L200)). This causes [this line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L201) to always be false because `config_kwargs` is not `None`. [This line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L222) will be run instead, which doesn't use `BUILDER_CONFIGS`.
For an example, you can try running the test for lince:
` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_lince`
which yields
> E TypeError: __init__() missing 3 required positional arguments: 'colnames', 'classes', and 'label_column' | 43 | test_load_real_dataset when config has BUILDER_CONFIGS that matter
It a dataset has custom `BUILDER_CONFIGS` with non-keyword arguments (or keyword arguments with non default values), the config is not loaded during the test and causes an error.
I think the problem is that `test_load_real_dataset` calls `load_dataset` with `data_dir=temp_data_dir` ([here](https://github.com/huggingface/nlp/blob/master/tests/test_dataset_common.py#L200)). This causes [this line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L201) to always be false because `config_kwargs` is not `None`. [This line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L222) will be run instead, which doesn't use `BUILDER_CONFIGS`.
For an example, you can try running the test for lince:
` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_lince`
which yields
> E TypeError: __init__() missing 3 required positional arguments: 'colnames', 'classes', and 'label_column'
The `data_dir` parameter has been removed. Now the error is `ValueError: Config name is missing`
As mentioned in #470 I think we can have one test with the first config of BUILDER_CONFIGS, and another test that runs all of the configs in BUILDER_CONFIGS | [
-0.280812531709671,
0.03864893317222595,
0.01634419709444046,
0.17772124707698822,
0.05833278223872185,
0.20165887475013733,
0.0901036188006401,
0.31950512528419495,
-0.16773612797260284,
0.05236160755157471,
0.04207318276166916,
0.35784322023391724,
-0.16560383141040802,
-0.06543854624032974,
0.17205528914928436,
0.022249184548854828,
-0.3066466748714447,
0.3548322021961212,
0.10011284053325653,
0.10283984243869781,
-0.1480749249458313,
0.16933275759220123,
0.023726724088191986,
0.027557674795389175,
-0.17530077695846558,
-0.02504887618124485,
-0.2061968296766281,
0.31406763195991516,
0.2690214514732361,
-0.5922113656997681,
0.4257380962371826,
0.12974244356155396,
-0.16124600172042847,
0.123127780854702,
-0.00011306419764878228,
0.11078110337257385,
0.24722693860530853,
-0.11574062705039978,
-0.5981777906417847,
-0.1378035992383957,
0.06403210014104843,
-0.23300816118717194,
0.2686038613319397,
-0.3578184247016907,
-0.2629135549068451,
-0.26913008093833923,
-0.0671393945813179,
0.09140697121620178,
0.10896669328212738,
0.3557491600513458,
0.22398704290390015,
0.26172342896461487,
-0.43008479475975037,
-0.11371903121471405,
-0.17659282684326172,
-0.05112776160240173,
0.05758625268936157,
0.3311010003089905,
0.05368208885192871,
0.052656084299087524,
0.11690415441989899,
-0.14234653115272522,
-0.0944499745965004,
0.10721683502197266,
0.00863669067621231,
-0.025585956871509552,
0.06884124130010605,
-0.05367047339677811,
-0.0848882719874382,
0.282616525888443,
0.19150708615779877,
-0.45124635100364685,
-0.00907243974506855,
-0.35964688658714294,
0.2316243201494217,
-0.09074994921684265,
0.3416336178779602,
-0.1556084305047989,
-0.4267595410346985,
0.013168169185519218,
-0.4288165271282196,
-0.2629850506782532,
0.13049648702144623,
0.09266004711389542,
0.10093030333518982,
0.020959295332431793,
0.02910059690475464,
0.24189811944961548,
-0.08917880058288574,
0.16155962646007538,
-0.10710453242063522,
-0.3283270001411438,
-0.10133619606494904,
0.016952017322182655,
-0.045678120106458664,
-0.2923913896083832,
0.20844349265098572,
0.09931051731109619,
0.2808902859687805,
-0.053351715207099915,
-0.03853935748338699,
-0.12339022010564804,
0.2437746524810791,
0.17747695744037628,
-0.11939537525177002,
0.3732142150402069,
0.43420445919036865,
0.05925273150205612,
0.18180175125598907,
-0.0008897879160940647,
-0.11975337564945221,
0.06591536849737167,
0.1539161652326584,
-0.3203544616699219,
-0.10546734929084778,
-0.012628823518753052,
0.3360985517501831,
-0.340119868516922,
-0.34687748551368713,
-0.061261072754859924,
-0.06229989975690842,
0.10999477654695511,
0.3181948661804199,
0.3967020809650421,
-0.005703119561076164,
-0.1252385377883911,
-0.015960272401571274,
0.25396105647087097,
-0.06744466722011566,
-0.08371864259243011,
-0.32944467663764954,
-0.04842198267579079,
-0.06656189262866974,
0.13661454617977142,
0.4345744550228119,
-0.3286033868789673,
0.6601088047027588,
0.22064514458179474,
0.06090172007679939,
0.04241778701543808,
0.0439312681555748,
-0.042502082884311676,
-0.04508066922426224,
0.37627974152565,
-0.13788671791553497,
0.03469059616327286,
0.0766119435429573,
-0.1368463933467865,
-0.4026351273059845,
0.2292720377445221,
-0.14437159895896912,
-0.5251880288124084,
0.34829771518707275,
0.17902667820453644,
-0.3709743618965149,
0.027520228177309036,
0.013929061591625214,
0.07342740893363953,
0.06928455829620361,
-0.20428083837032318,
-0.17418712377548218,
-0.3507987856864929,
0.02379370853304863,
-0.2072620987892151,
0.25250548124313354,
0.3057614266872406,
-0.13141825795173645,
-0.2009168565273285,
0.18669842183589935,
-0.09900666773319244,
0.11711136996746063,
-0.17234361171722412,
-0.30420735478401184,
0.22748735547065735,
-0.27899420261383057,
0.02820722758769989,
0.64266037940979,
-0.3164255619049072,
-0.07497747987508774,
0.329894483089447,
-0.003159046173095703,
0.16436387598514557,
0.004576727747917175,
-0.037365589290857315,
-0.21503132581710815,
-0.1312565803527832,
0.07815629243850708,
0.2976284623146057,
-0.06222271919250488,
-0.04548329859972,
-0.3610290586948395,
-0.15312649309635162,
0.1661147177219391,
0.0698527842760086,
-0.24927152693271637,
-0.03401799499988556,
-0.2962556481361389,
-0.06730397790670395,
0.2288816273212433,
-0.04258714243769646,
-0.22393310070037842,
0.08620813488960266,
-0.08869501948356628,
-0.12049797177314758,
-0.00625953171402216,
0.10139439254999161,
-0.611118495464325,
0.4612477123737335,
0.051044151186943054,
0.16733711957931519,
0.1060817539691925,
-0.08087462186813354,
-0.22163668274879456,
-0.06502392143011093,
-0.27548548579216003,
-0.37863409519195557,
0.12590143084526062,
0.43418511748313904,
0.10422244668006897,
-0.20896629989147186,
-0.1609918177127838,
-0.09815733134746552,
-0.31743741035461426,
-0.037504229694604874,
-0.04071086272597313,
0.0693354532122612,
-0.005705399438738823,
-0.02555587887763977,
-0.13669182360172272,
0.13858217000961304,
0.13883984088897705,
-0.2931467890739441,
-0.08651436865329742,
0.5086605548858643,
-0.10052714496850967,
-0.11352233588695526,
0.06704794615507126,
-0.04921752214431763,
0.014428460970520973,
-0.026890236884355545,
-0.04011211544275284,
0.139164999127388,
-0.02280718833208084,
-0.15250182151794434,
0.01168784499168396,
0.4082339406013489,
0.15215203166007996,
0.2619357407093048,
-0.003957469016313553,
-0.0580005943775177,
0.2521718740463257,
-0.24024924635887146,
-0.08837331086397171,
-0.151228666305542,
0.43942245841026306,
0.10594978928565979,
0.4570346474647522,
0.03230981528759003,
-0.3409214913845062,
-0.04862704128026962,
0.22731225192546844,
-0.008617939427495003,
-0.1118609830737114,
0.16717922687530518,
-0.13148993253707886,
0.011845659464597702,
0.07436808943748474,
-0.0071036480367183685,
0.673156201839447,
0.19361113011837006,
0.03278084099292755,
0.11031491309404373,
-0.5834099650382996,
-0.2602226138114929,
0.30168068408966064,
-0.03575867414474487,
0.2742643356323242,
0.1225181445479393,
0.2030341625213623,
-0.07320692390203476,
-0.41600924730300903,
-0.3327856659889221,
0.21953560411930084,
0.22615957260131836,
-0.3869551122188568,
0.14080031216144562,
-0.08010163903236389,
-0.0013915598392486572,
-0.2797279953956604,
-0.31394004821777344,
-0.07238084077835083,
-0.3478245139122009,
0.21411937475204468,
-0.08900091052055359,
-0.21318963170051575,
0.2064431607723236,
-0.048937708139419556,
0.22714854776859283,
-0.2309505194425583,
-0.5881281495094299,
-0.30205613374710083,
-0.14580917358398438,
-0.4142385721206665,
0.04143316671252251,
0.1540946215391159,
-0.020457375794649124,
0.29492318630218506,
-0.1228465884923935,
-0.544880211353302,
0.10329072922468185,
-0.3132394850254059,
0.20912840962409973,
-0.04272473603487015,
0.7572258114814758,
0.30805373191833496,
0.10657251626253128,
0.4649317264556885,
-0.2761744558811188,
0.45192667841911316,
0.1219882220029831,
-0.11669238656759262,
0.20487849414348602,
0.1077319085597992,
-0.08622696995735168,
-0.3488544225692749,
-0.4813721477985382,
-0.011597603559494019,
-0.22669565677642822,
-0.11766915023326874,
0.12485355138778687,
0.16423535346984863,
0.4464901387691498,
0.1673840582370758,
0.20236197113990784,
-0.19383308291435242,
0.46602341532707214,
-0.07983461767435074,
-0.19491004943847656,
-0.12844958901405334,
-0.07451964169740677,
-0.18093691766262054,
-0.38768571615219116,
-0.13724061846733093,
0.3511221408843994,
-0.11213977634906769,
-0.49868446588516235,
-0.25279930233955383,
-0.12081363797187805,
0.49191176891326904,
-0.2137342095375061,
-0.20256739854812622,
0.2597005367279053,
0.31002703309059143,
-0.08420423418283463,
-0.18845823407173157,
0.04138987883925438,
0.28891852498054504,
0.11171235889196396,
0.2339569330215454,
0.0027119629085063934,
0.2264728844165802,
-0.1682235300540924,
0.33771800994873047,
0.3033349812030792,
-0.295026034116745,
0.14549854397773743,
-0.253892719745636,
0.2515290677547455,
-0.18264245986938477,
-0.30442938208580017,
0.16866770386695862,
0.13079360127449036,
-0.1615765392780304,
0.3201492428779602,
-0.14148035645484924,
-0.04429405927658081,
-0.13233309984207153,
0.01625213772058487,
0.039427801966667175,
-0.14944514632225037,
0.22985844314098358,
-0.1908065676689148,
0.00860103964805603,
0.04781277850270271,
0.04118357598781586,
-0.08099627494812012,
0.04664407670497894,
0.042565878480672836,
0.2682788670063019,
-0.05437958985567093,
-0.09271895885467529,
-0.20883138477802277,
-0.3003644347190857,
-0.4212281107902527,
0.16446247696876526,
-0.09914425760507584,
0.3014190196990967,
-0.046743243932724,
-0.026560313999652863,
0.1795356273651123,
0.0005331991706043482,
0.4785413146018982,
-0.0032719504088163376,
0.17001859843730927,
0.48711445927619934,
0.06599479913711548,
-0.3755957782268524,
-0.13305887579917908,
-0.2954862415790558,
0.1635189950466156,
0.37882134318351746,
0.6604264378547668,
-0.35504865646362305,
-0.4132326543331146,
0.09957863390445709,
0.42101073265075684,
-0.10649601370096207,
-0.30358776450157166,
-0.2665136456489563,
-0.34963640570640564,
-0.14673364162445068,
0.07017965614795685,
-0.3176824450492859,
0.3553074300289154,
-0.30389946699142456,
0.05683130398392677,
-0.06539247930049896,
-0.08979903161525726,
0.0434088408946991,
0.36185362935066223,
0.25496339797973633,
-0.12906944751739502,
0.21329230070114136,
0.007791198790073395,
0.19983239471912384,
0.0466914027929306,
0.40593409538269043,
-0.06838135421276093,
0.28327178955078125,
-0.07794423401355743,
0.18657949566841125,
0.5016235709190369,
0.2776152193546295,
-0.12417664378881454,
-0.05618145316839218,
-0.39908915758132935,
0.173640638589859,
-0.2655561566352844,
0.2824919521808624,
0.3087882101535797,
0.04393148049712181,
0.00817287527024746,
-0.2562389075756073,
0.5897766947746277,
-0.026384716853499413,
-0.2228998988866806,
0.4522739052772522,
-0.09373991191387177,
-0.46369755268096924,
0.3889222741127014,
-0.030023515224456787,
0.7602946162223816,
0.3173414468765259,
0.22749583423137665,
0.608638346195221,
0.21187250316143036,
0.1707533448934555,
0.1247127503156662,
0.1548667848110199,
-0.27309879660606384,
-0.08457794040441513,
0.2797223925590515,
-0.1793150007724762,
0.19647201895713806,
0.2276955097913742,
-0.2754836976528168,
0.2837623953819275,
-0.06385375559329987,
-0.04491976276040077,
0.13810424506664276,
0.22042453289031982,
-0.04807068407535553,
-0.03736073523759842,
-0.40180933475494385,
0.15811847150325775,
0.0321195051074028,
0.28685370087623596,
0.030063774436712265,
0.053051747381687164,
0.05242443457245827,
-0.2552853226661682,
0.05078685283660889,
0.1388700306415558,
-0.33158576488494873,
-0.0008890535682439804,
0.1234666109085083,
-0.19478349387645721,
0.013105735182762146,
0.15384870767593384,
0.12855105102062225,
0.27662110328674316,
-0.12902988493442535,
0.1358102411031723,
0.013700436800718307,
0.1033773347735405,
0.1839091181755066,
-0.08964760601520538,
0.2951236367225647,
-0.17040133476257324,
-0.2964976727962494,
0.06020122021436691,
-0.38013431429862976,
-0.0585324652493,
0.27864235639572144,
-0.16151857376098633,
-0.06616482138633728,
-0.32923322916030884,
-0.3309016227722168,
0.08692024648189545,
0.11807554960250854,
-0.21449337899684906,
0.13619987666606903,
-0.02825344353914261,
-0.36461812257766724,
0.1135280430316925,
-0.07675409317016602,
-0.3893275260925293,
-0.07563666999340057,
-0.10694382339715958,
0.0940748080611229,
0.20950084924697876,
0.6270077228546143,
-0.33517295122146606,
0.24775026738643646,
-0.16182252764701843,
0.03794261813163757,
0.15120036900043488,
-0.17006823420524597,
0.15997585654258728,
0.22010986506938934,
-0.21479438245296478,
0.011386214755475521,
0.4493313729763031,
0.13105300068855286,
0.19799908995628357,
-0.15199904143810272,
-0.2812601923942566,
-0.18718555569648743,
0.035702452063560486,
0.22326134145259857,
0.31444329023361206,
-0.04073404520750046,
0.5240078568458557,
-0.09779525548219681,
0.289699524641037,
-0.36935487389564514,
-0.03611431270837784,
-0.43623486161231995,
0.36078721284866333,
-0.08451136201620102,
0.21699297428131104,
0.26129040122032166,
0.14142419397830963,
0.1556660234928131,
-0.2430790811777115,
-0.05758238583803177,
-0.29001978039741516,
-0.19189102947711945,
0.12625199556350708,
0.04455404356122017,
0.15275515615940094,
0.007316171191632748,
-0.13331478834152222,
0.10839387774467468,
-0.10338122397661209,
0.13819453120231628,
-0.33291929960250854,
-0.006425507366657257,
0.2893799841403961,
0.2476063221693039,
0.1590154767036438,
-0.052115023136138916,
0.21659919619560242,
-0.20682966709136963,
-0.05280403792858124,
-0.054747145622968674,
0.22936107218265533,
-0.4055798351764679,
-0.13913339376449585,
-0.06392138451337814,
0.04806674271821976,
-0.29432451725006104,
0.16066375374794006,
-0.15723320841789246,
0.015028685331344604,
0.045196156948804855,
0.07038448005914688,
0.2515392005443573,
0.5024477243423462,
-0.0749000757932663,
0.05642189085483551,
0.13746240735054016,
0.23012804985046387,
-0.3603683412075043,
-0.050131987780332565,
0.056546006351709366,
-0.12268304079771042,
0.3516511917114258,
0.1919918954372406,
0.11364161968231201,
-0.05241653323173523,
0.21141701936721802,
-0.11124439537525177,
0.11735029518604279,
-0.15137025713920593,
-0.06251265108585358,
0.37826067209243774,
-0.10772718489170074,
0.13774363696575165,
0.2817506790161133,
-0.03364630416035652,
0.15107949078083038,
0.0710999071598053,
-0.21788865327835083,
0.3636239171028137,
0.0021120384335517883,
-0.16389155387878418,
0.19929301738739014,
-0.12429365515708923,
0.4478605091571808,
0.05786889046430588,
0.08502523601055145,
-0.11521821469068527,
-0.16631221771240234,
0.5778757333755493,
-0.5218057036399841,
-0.2537316381931305,
-0.04460567981004715,
0.19630326330661774,
-0.15041232109069824,
-0.2721489667892456,
-0.4087143540382385,
-0.10993193089962006,
0.008978776633739471,
-0.1395120471715927,
-0.08937090635299683,
-0.2711932063102722,
0.07496945559978485,
-0.039052270352840424,
-0.17970798909664154,
-0.41261211037635803,
-0.0326087549328804,
0.33419176936149597,
-0.09303898364305496,
-0.15969786047935486,
0.4812891483306885,
0.21378615498542786,
-0.018597327172756195,
0.08960190415382385,
0.462169349193573,
0.5086624026298523,
0.1307404339313507,
-0.07807369530200958,
-0.18867811560630798,
-0.0380982905626297,
0.05254548788070679,
-0.20509029924869537,
0.1065390408039093,
0.024030610918998718,
-0.2988905608654022,
0.4634019434452057,
0.20072175562381744,
-0.1836307793855667,
-0.11763088405132294,
0.10815496742725372,
-0.16759268939495087,
-0.17079274356365204,
0.5300664305686951,
0.19583143293857574,
-0.0978410542011261,
-0.03810469061136246,
0.16722768545150757,
-0.2096354365348816,
0.07161157578229904,
0.44974562525749207,
0.1866224706172943,
0.10080257803201675,
0.12618854641914368,
0.11340950429439545,
-0.13225524127483368,
0.5245950818061829,
0.0897296890616417,
-0.043654099106788635,
-0.5897711515426636,
-0.16354809701442719,
-0.6522300243377686,
0.1591012179851532,
-0.029481779783964157,
-0.22466643154621124,
0.29346200823783875,
0.02482314594089985,
0.20016255974769592,
-0.03796347975730896,
-0.1583327203989029,
0.27338555455207825,
0.30988043546676636,
-0.14151035249233246,
-0.31428560614585876,
-0.2356008142232895,
-0.26427537202835083,
-0.025527043268084526,
0.06405995041131973,
-0.2706093490123749,
0.021101530641317368,
-0.19634900987148285,
0.049455881118774414,
0.11046505719423294,
0.11455942690372467,
0.5461162328720093,
0.11877455562353134,
0.24516190588474274,
-0.005592580884695053,
0.5098610520362854,
0.03375624120235443,
-0.14793488383293152,
-0.008398022502660751,
-0.18266642093658447,
-0.16009733080863953,
-0.10345026105642319,
-0.09309490025043488,
0.0018280316144227982,
-0.1612287163734436,
0.11691519618034363,
-0.23329554498195648,
0.062234826385974884,
0.16860738396644592,
-0.20843420922756195,
0.10383102297782898,
0.10844647139310837,
-0.160091370344162,
0.22720658779144287,
0.22556574642658234,
0.464965283870697,
-0.10665947198867798,
0.10993596911430359,
-0.3157237470149994,
-0.35657110810279846,
0.7502678036689758,
-0.1635056734085083,
-0.20161524415016174,
-0.03266529738903046,
0.16704556345939636,
-0.19024363160133362,
0.07059509307146072,
-0.3250296413898468,
-0.20042939484119415,
0.41165366768836975,
-0.11689665168523788,
-0.2372821569442749,
0.335803747177124,
0.18969236314296722,
0.0820225179195404,
0.06551642715930939,
0.3776125907897949,
0.07576552033424377,
-0.20502910017967224,
-0.17307011783123016,
-0.3017948865890503
] |
https://github.com/huggingface/datasets/issues/474 | test_load_real_dataset when config has BUILDER_CONFIGS that matter | This was fixed in #527
Closing this one, but feel free to re-open if you have other questions | It a dataset has custom `BUILDER_CONFIGS` with non-keyword arguments (or keyword arguments with non default values), the config is not loaded during the test and causes an error.
I think the problem is that `test_load_real_dataset` calls `load_dataset` with `data_dir=temp_data_dir` ([here](https://github.com/huggingface/nlp/blob/master/tests/test_dataset_common.py#L200)). This causes [this line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L201) to always be false because `config_kwargs` is not `None`. [This line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L222) will be run instead, which doesn't use `BUILDER_CONFIGS`.
For an example, you can try running the test for lince:
` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_lince`
which yields
> E TypeError: __init__() missing 3 required positional arguments: 'colnames', 'classes', and 'label_column' | 18 | test_load_real_dataset when config has BUILDER_CONFIGS that matter
It a dataset has custom `BUILDER_CONFIGS` with non-keyword arguments (or keyword arguments with non default values), the config is not loaded during the test and causes an error.
I think the problem is that `test_load_real_dataset` calls `load_dataset` with `data_dir=temp_data_dir` ([here](https://github.com/huggingface/nlp/blob/master/tests/test_dataset_common.py#L200)). This causes [this line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L201) to always be false because `config_kwargs` is not `None`. [This line](https://github.com/huggingface/nlp/blob/master/src/nlp/builder.py#L222) will be run instead, which doesn't use `BUILDER_CONFIGS`.
For an example, you can try running the test for lince:
` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_real_dataset_lince`
which yields
> E TypeError: __init__() missing 3 required positional arguments: 'colnames', 'classes', and 'label_column'
This was fixed in #527
Closing this one, but feel free to re-open if you have other questions | [
-0.3385564386844635,
-0.05364672839641571,
0.042427610605955124,
0.11086258292198181,
0.163441002368927,
0.07833614200353622,
0.1228838562965393,
0.3306731581687927,
-0.09733147919178009,
-0.004030302166938782,
0.05377386510372162,
0.4402480721473694,
-0.15711864829063416,
0.04146141558885574,
0.16436509788036346,
0.04439188167452812,
-0.26825854182243347,
0.27697035670280457,
0.09802582859992981,
-0.0319092720746994,
-0.18790169060230255,
0.15795765817165375,
-0.09730711579322815,
0.09491181373596191,
-0.298676073551178,
0.03403088077902794,
-0.1379249393939972,
0.29867008328437805,
0.19901539385318756,
-0.5106945037841797,
0.44617733359336853,
0.09386798739433289,
-0.08595796674489975,
0.14318892359733582,
-0.00010831592226168141,
0.08014892041683197,
0.3250584602355957,
-0.08392083644866943,
-0.6371139883995056,
-0.06256961822509766,
0.14054524898529053,
-0.29291290044784546,
0.2855111062526703,
-0.32827115058898926,
-0.321266770362854,
-0.24112842977046967,
-0.12703858315944672,
0.07364827394485474,
0.07250305265188217,
0.3807225525379181,
0.2747090458869934,
0.363616019487381,
-0.2297530472278595,
-0.14858810603618622,
-0.16209256649017334,
-0.02588716149330139,
-0.04371041804552078,
0.3394280970096588,
0.16886208951473236,
0.018341241404414177,
0.05271109566092491,
-0.12174239754676819,
-0.06410514563322067,
0.09162099659442902,
0.04952649027109146,
-0.11772064119577408,
-0.07736761122941971,
-0.06861789524555206,
-0.020173218101263046,
0.27876582741737366,
0.2818543612957001,
-0.43294262886047363,
-0.021179135888814926,
-0.2513439953327179,
0.1685001254081726,
-0.14982570707798004,
0.35197949409484863,
-0.081268809735775,
-0.40761908888816833,
0.04266218841075897,
-0.4676850438117981,
-0.19004282355308533,
0.06581346690654755,
0.11043035984039307,
0.09508433938026428,
-0.041498735547065735,
-0.010846768505871296,
0.20070448517799377,
0.0036653392016887665,
0.10422520339488983,
-0.13867051899433136,
-0.17610064148902893,
-0.1310180127620697,
0.1279081255197525,
-0.13914349675178528,
-0.3100568652153015,
0.24682363867759705,
0.21676093339920044,
0.2853587865829468,
0.004345964640378952,
-0.027389686554670334,
0.0024011842906475067,
0.23107336461544037,
0.22410356998443604,
-0.13746681809425354,
0.369854599237442,
0.36224398016929626,
-0.011629132553935051,
0.19817589223384857,
0.010260548442602158,
-0.19063179194927216,
0.048440221697092056,
0.11538559198379517,
-0.3490093946456909,
-0.008367395028471947,
-0.06287860870361328,
0.2651873826980591,
-0.4105989336967468,
-0.3491714894771576,
0.029395371675491333,
-0.055791474878787994,
0.16557778418064117,
0.33758386969566345,
0.41993385553359985,
-0.032466087490320206,
-0.19706028699874878,
0.02375514805316925,
0.32018762826919556,
-0.19128011167049408,
-0.10859686881303787,
-0.3206711411476135,
-0.021812908351421356,
-0.13242107629776,
0.05237160623073578,
0.46881529688835144,
-0.27279236912727356,
0.6226428151130676,
0.1460936814546585,
0.021684080362319946,
0.016543813049793243,
0.07464040070772171,
-0.0024738702923059464,
-0.05686084181070328,
0.378587543964386,
-0.16059306263923645,
-0.07643316686153412,
0.23291638493537903,
-0.15365999937057495,
-0.3517065942287445,
0.20449364185333252,
-0.08849620074033737,
-0.5394571423530579,
0.24014145135879517,
0.22857604920864105,
-0.30292725563049316,
-0.07362247258424759,
0.009451396763324738,
0.0187687948346138,
0.05770602449774742,
-0.1259177178144455,
-0.1104714646935463,
-0.3919752240180969,
0.0619845949113369,
-0.1528330296278,
0.2685030996799469,
0.28127819299697876,
-0.1850990504026413,
-0.13221475481987,
0.11886882781982422,
-0.1435093879699707,
0.19526860117912292,
-0.09705327451229095,
-0.238148495554924,
0.15000568330287933,
-0.17378273606300354,
0.10724093019962311,
0.5219540596008301,
-0.2305842787027359,
-0.11802086234092712,
0.29014214873313904,
-0.008415177464485168,
0.057363539934158325,
-0.13728195428848267,
0.077370785176754,
-0.15167082846164703,
-0.03738358989357948,
0.059637151658535004,
0.34093040227890015,
0.04085356742143631,
0.034127287566661835,
-0.44096794724464417,
-0.13543428480625153,
0.15708588063716888,
0.14548234641551971,
-0.34637361764907837,
-0.04750040918588638,
-0.14694157242774963,
-0.06017692759633064,
0.19908496737480164,
-0.08269761502742767,
-0.2510530352592468,
0.061964698135852814,
0.041999056935310364,
-0.09674529731273651,
0.04219425469636917,
0.0955781415104866,
-0.5564900636672974,
0.41915562748908997,
0.08335717022418976,
0.2934088706970215,
0.15815570950508118,
-0.08356330543756485,
-0.271879643201828,
0.04565078765153885,
-0.2793191373348236,
-0.3855575621128082,
0.1636400669813156,
0.21975336968898773,
0.1555459052324295,
-0.1151786744594574,
-0.14252470433712006,
-0.09535757452249527,
-0.33426517248153687,
0.010867592878639698,
-0.05607784166932106,
0.06789036095142365,
-0.016808921471238136,
-0.06256923079490662,
-0.07485697418451309,
0.2662241756916046,
0.13720321655273438,
-0.29549938440322876,
-0.20364266633987427,
0.47473466396331787,
0.013857429847121239,
-0.096108078956604,
0.1071806252002716,
-0.041377320885658264,
-0.07194685935974121,
-0.09768456220626831,
0.007897995412349701,
0.1678728461265564,
-0.01735343411564827,
-0.11231401562690735,
-0.046283185482025146,
0.38525331020355225,
0.19476927816867828,
0.17417345941066742,
-0.08175018429756165,
0.025837989524006844,
0.3416345715522766,
-0.16749858856201172,
-0.0014191092923283577,
-0.10943616926670074,
0.4954260587692261,
0.12825284898281097,
0.45954373478889465,
0.05737175792455673,
-0.3472211956977844,
0.010890059173107147,
0.2799534797668457,
0.014718793332576752,
-0.030605681240558624,
0.3178577125072479,
-0.15618950128555298,
-0.07454664260149002,
0.13919883966445923,
-0.0617586225271225,
0.5611637234687805,
0.18055370450019836,
-0.02919464185833931,
0.13633443415164948,
-0.6024137735366821,
-0.28294214606285095,
0.3375747501850128,
-0.15079189836978912,
0.2357175350189209,
0.01742750033736229,
0.1795162856578827,
-0.10595761984586716,
-0.5612170100212097,
-0.26910915970802307,
0.06005292385816574,
0.34446877241134644,
-0.3191835284233093,
0.10424458235502243,
-0.12190178036689758,
0.0684499591588974,
-0.11203926801681519,
-0.22307977080345154,
-0.15250833332538605,
-0.37973999977111816,
0.20660008490085602,
0.019258854910731316,
-0.0720108151435852,
0.2248980849981308,
-0.06452178955078125,
0.2702755928039551,
-0.1633850783109665,
-0.5609423518180847,
-0.30937641859054565,
-0.24416100978851318,
-0.5122613310813904,
0.08240751922130585,
0.17111451923847198,
-0.011970478110015392,
0.31322014331817627,
-0.08254867047071457,
-0.3603595495223999,
0.1028655618429184,
-0.32953688502311707,
0.12904886901378632,
-0.09005460143089294,
0.7290679216384888,
0.27067625522613525,
0.19401150941848755,
0.3838447332382202,
-0.11422903090715408,
0.5275808572769165,
0.01003304310142994,
-0.127510204911232,
0.2818482518196106,
0.1550063043832779,
-0.16159240901470184,
-0.39508694410324097,
-0.46033975481987,
-0.044956453144550323,
-0.2517784535884857,
0.039245352149009705,
0.14564938843250275,
0.0847621038556099,
0.4176318347454071,
0.2565798759460449,
0.25453057885169983,
-0.10593704134225845,
0.37794944643974304,
-0.16282707452774048,
-0.2203240841627121,
-0.09693382680416107,
-0.0557347908616066,
-0.3735412061214447,
-0.30660441517829895,
-0.09914899617433548,
0.3467925786972046,
-0.1125309020280838,
-0.48031944036483765,
-0.24757929146289825,
-0.20523814857006073,
0.4086897075176239,
-0.0434771403670311,
-0.20149622857570648,
0.2554354667663574,
0.24728256464004517,
-0.11515499651432037,
-0.16704952716827393,
0.04052632674574852,
0.26647135615348816,
0.03645780310034752,
0.12487810105085373,
-0.01175638660788536,
0.31331363320350647,
-0.18551699817180634,
0.29493701457977295,
0.29428574442863464,
-0.33948761224746704,
0.2867257595062256,
-0.2529636323451996,
0.3277393877506256,
-0.2344418466091156,
-0.3229248821735382,
0.24631331861019135,
0.08712106198072433,
-0.19734378159046173,
0.2904694974422455,
-0.0703136995434761,
-0.17444543540477753,
-0.13090308010578156,
0.08233502507209778,
0.0625959187746048,
-0.14580030739307404,
0.17594511806964874,
-0.05434475094079971,
0.027656909078359604,
0.018071893602609634,
0.1418789029121399,
-0.09791359305381775,
-0.0989709421992302,
0.02572833001613617,
0.2842668890953064,
-0.07896449416875839,
-0.12293558567762375,
-0.2561395764350891,
-0.31282415986061096,
-0.46679431200027466,
0.23274576663970947,
-0.12511585652828217,
0.38889002799987793,
-0.16967423260211945,
-0.05311241373419762,
0.19998595118522644,
-0.06482265889644623,
0.46618854999542236,
-0.06254114955663681,
0.17528411746025085,
0.4553384780883789,
0.06480477750301361,
-0.414945125579834,
-0.09804500639438629,
-0.3053015470504761,
0.14924663305282593,
0.3097376227378845,
0.6342877149581909,
-0.29311659932136536,
-0.3505544364452362,
0.08781787753105164,
0.3865189850330353,
-0.08533430844545364,
-0.2622833549976349,
-0.2818940579891205,
-0.33662518858909607,
-0.1886923909187317,
0.15183451771736145,
-0.31224673986434937,
0.3926036059856415,
-0.30935344099998474,
0.04175962880253792,
-0.09656587988138199,
-0.0768509954214096,
0.07461211830377579,
0.4339577853679657,
0.21328943967819214,
-0.12934619188308716,
0.15322425961494446,
-0.0502421110868454,
0.16600601375102997,
0.05197789520025253,
0.38486170768737793,
-0.0900920033454895,
0.2654481530189514,
-0.12434255331754684,
0.08787243813276291,
0.487684428691864,
0.22032655775547028,
-0.1677979677915573,
-0.11084779351949692,
-0.38512545824050903,
0.20152190327644348,
-0.3323497474193573,
0.21475905179977417,
0.33901453018188477,
0.13252688944339752,
0.0496404729783535,
-0.23704080283641815,
0.5995288491249084,
-0.025544332340359688,
-0.10070998221635818,
0.37546947598457336,
-0.06494612991809845,
-0.3394945561885834,
0.3482232093811035,
0.08024081587791443,
0.7891103625297546,
0.2262750267982483,
0.21271367371082306,
0.6046991944313049,
0.22906650602817535,
0.14933551847934723,
0.0640857145190239,
0.1478569656610489,
-0.3400282561779022,
-0.08236231654882431,
0.2297734171152115,
-0.19541242718696594,
0.20353642106056213,
0.18532755970954895,
-0.2958565354347229,
0.15743792057037354,
-0.11543945223093033,
-0.136489599943161,
0.13251681625843048,
0.2557709813117981,
-0.061523474752902985,
-0.07256615161895752,
-0.3598591983318329,
0.2513633966445923,
0.030787626281380653,
0.3629925847053528,
0.045326847583055496,
0.06425371766090393,
0.0008849091827869415,
-0.2537645101547241,
-0.09297176450490952,
0.18886658549308777,
-0.21715371310710907,
-0.017451200634241104,
0.14722467958927155,
-0.19676078855991364,
0.051648836582899094,
0.07822633534669876,
0.17517493665218353,
0.29048705101013184,
-0.1754976511001587,
0.052409425377845764,
0.045955363661050797,
0.07073932886123657,
0.2827409505844116,
0.007389497943222523,
0.31729328632354736,
-0.1767939031124115,
-0.27129480242729187,
0.052704114466905594,
-0.3210826814174652,
-0.05091788247227669,
0.284885048866272,
-0.23734866082668304,
-0.03673470765352249,
-0.39119407534599304,
-0.39044666290283203,
-0.04227258265018463,
-0.006826857104897499,
-0.18892423808574677,
0.17135865986347198,
0.025708802044391632,
-0.24600572884082794,
0.1252576857805252,
0.03368561714887619,
-0.36549532413482666,
-0.06399074196815491,
-0.03012564778327942,
0.025730878114700317,
0.2625960111618042,
0.6146230697631836,
-0.20571303367614746,
0.1340370923280716,
-0.23027905821800232,
0.02498435229063034,
0.18055595457553864,
-0.21689951419830322,
0.11048944294452667,
0.2585729956626892,
-0.2201315015554428,
0.06462094932794571,
0.4208984076976776,
0.08966811001300812,
0.10692635923624039,
-0.11089494824409485,
-0.3891233503818512,
-0.2301577925682068,
0.04640722647309303,
0.13630640506744385,
0.3031691610813141,
-0.05484677851200104,
0.5074742436408997,
0.049008287489414215,
0.1555221676826477,
-0.4011349380016327,
-0.0861843004822731,
-0.43931570649147034,
0.21758878231048584,
-0.018011070787906647,
0.12399013340473175,
0.25803622603416443,
0.06693819165229797,
0.17212225496768951,
-0.18513527512550354,
-0.17333216965198517,
-0.3309587240219116,
-0.21682466566562653,
0.09496283531188965,
0.10975978523492813,
0.09174844622612,
-0.041518598794937134,
-0.17172127962112427,
-0.02493949979543686,
-0.18459777534008026,
-0.0612855926156044,
-0.37755486369132996,
-0.0767609030008316,
0.27727556228637695,
0.26822131872177124,
0.1808113157749176,
-0.03270432725548744,
0.11791827529668808,
-0.16160039603710175,
-0.0552700012922287,
-0.14417888224124908,
0.03264378756284714,
-0.3144241273403168,
-0.13293738663196564,
-0.10577774792909622,
0.09057178348302841,
-0.20271684229373932,
0.1687101125717163,
-0.064882792532444,
0.005315762013196945,
0.061397116631269455,
0.023536987602710724,
0.279796838760376,
0.40927451848983765,
-0.06311280280351639,
-0.03127012029290199,
0.23440232872962952,
0.260090172290802,
-0.41623079776763916,
-0.007146728690713644,
0.10636073350906372,
-0.07792350649833679,
0.33180612325668335,
0.132298544049263,
0.07698704302310944,
-0.011564895510673523,
0.16148966550827026,
-0.07460590451955795,
0.1683531254529953,
-0.20329801738262177,
-0.10429705679416656,
0.30181044340133667,
-0.1390679031610489,
0.176089808344841,
0.31383368372917175,
-0.017744392156600952,
0.13566240668296814,
0.12557768821716309,
-0.11947967857122421,
0.35163456201553345,
0.07690378278493881,
-0.011893142014741898,
0.08882738649845123,
-0.15622544288635254,
0.4014153480529785,
0.009034469723701477,
0.12108565866947174,
-0.08612088114023209,
-0.18692761659622192,
0.6330310702323914,
-0.5700563192367554,
-0.277411550283432,
-0.12217548489570618,
0.18777306377887726,
-0.22501727938652039,
-0.16616696119308472,
-0.3115479052066803,
-0.07108853757381439,
-0.03744158893823624,
-0.197128027677536,
-0.08773171901702881,
-0.18835888803005219,
0.03917442262172699,
-0.05811527371406555,
-0.08820106089115143,
-0.4211508333683014,
-0.10799060016870499,
0.3032979667186737,
-0.049965910613536835,
-0.0625259280204773,
0.4666862487792969,
0.09076260775327682,
0.06655280292034149,
0.012910326942801476,
0.45042189955711365,
0.5012667775154114,
0.2217962145805359,
-0.1015421450138092,
-0.14008870720863342,
-0.15862292051315308,
0.05152447521686554,
-0.14985503256320953,
0.22920560836791992,
0.046956051141023636,
-0.2733753025531769,
0.4103943407535553,
0.2153732031583786,
-0.20121195912361145,
-0.12905876338481903,
0.060739923268556595,
-0.0885230004787445,
-0.12099461257457733,
0.4698435366153717,
0.20860552787780762,
-0.1601247787475586,
-0.16434983909130096,
0.08713436126708984,
-0.2041846513748169,
0.14905071258544922,
0.4095197021961212,
0.196895033121109,
0.12606871128082275,
-0.05183186009526253,
0.13990049064159393,
-0.08446325361728668,
0.6105007529258728,
0.11930279433727264,
-0.03504042327404022,
-0.504011869430542,
-0.15531235933303833,
-0.710889458656311,
0.199166938662529,
-0.14371344447135925,
-0.33851826190948486,
0.26488587260246277,
-0.06150687485933304,
0.20100408792495728,
-0.010558880865573883,
-0.1847461611032486,
0.29632866382598877,
0.2760753929615021,
-0.1557745337486267,
-0.29495933651924133,
-0.14011536538600922,
-0.2625840902328491,
-0.07806367427110672,
0.031190551817417145,
-0.3317849636077881,
0.05861886218190193,
-0.23890797793865204,
0.09397199004888535,
0.06483166664838791,
0.07648599147796631,
0.42122340202331543,
0.21436244249343872,
0.16417089104652405,
-0.04290444403886795,
0.48373907804489136,
0.04387352615594864,
-0.07266198843717575,
-0.08290049433708191,
-0.23325978219509125,
-0.13371606171131134,
-0.03500372916460037,
-0.1012425422668457,
-0.019826766103506088,
-0.05538490414619446,
0.07092219591140747,
-0.3084036707878113,
0.19509024918079376,
0.14933738112449646,
-0.20647785067558289,
0.08727118372917175,
0.10544460266828537,
-0.13670533895492554,
0.17680005729198456,
0.21287482976913452,
0.455737829208374,
-0.1234283447265625,
0.18403615057468414,
-0.26462283730506897,
-0.4019244909286499,
0.7486211657524109,
-0.2990206182003021,
-0.19545255601406097,
0.06540316343307495,
0.13902907073497772,
-0.1361292600631714,
-0.02320634014904499,
-0.23104098439216614,
-0.11565590649843216,
0.3482370972633362,
-0.12598422169685364,
-0.15096160769462585,
0.3325616419315338,
0.10501821339130402,
0.08156704902648926,
0.05889889970421791,
0.4525282084941864,
0.02714090794324875,
-0.08065791428089142,
-0.1114688515663147,
-0.25225716829299927
] |
https://github.com/huggingface/datasets/issues/469 | invalid data type 'str' at _convert_outputs in arrow_dataset.py | Hi ! Did you try to set the output format to pytorch ? (or tensorflow if you're using tensorflow)
It can be done with `dataset.set_format("torch", columns=columns)` (or "tensorflow").
Note that for pytorch, string columns can't be converted to `torch.Tensor`, so you have to specify in `columns=` the list of columns you want to keep (`input_ids` for example) | I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
| 57 | invalid data type 'str' at _convert_outputs in arrow_dataset.py
I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
Hi ! Did you try to set the output format to pytorch ? (or tensorflow if you're using tensorflow)
It can be done with `dataset.set_format("torch", columns=columns)` (or "tensorflow").
Note that for pytorch, string columns can't be converted to `torch.Tensor`, so you have to specify in `columns=` the list of columns you want to keep (`input_ids` for example) | [
-0.22282423079013824,
0.0242498517036438,
0.10737143456935883,
0.23030735552310944,
0.5109532475471497,
-0.10725988447666168,
0.5323296785354614,
0.07759007066488266,
-0.3410622179508209,
-0.12477622926235199,
0.03665751963853836,
0.3864072561264038,
-0.36969560384750366,
0.04221787303686142,
0.044361963868141174,
-0.20246389508247375,
-0.08803478628396988,
0.009990029036998749,
-0.023253224790096283,
-0.053638752549886703,
0.048243701457977295,
0.1829802691936493,
-0.15682613849639893,
0.41447722911834717,
-0.6451312303543091,
-0.18357887864112854,
0.1746635138988495,
-0.09639310091733932,
-0.09922074526548386,
-0.4487784206867218,
0.220274418592453,
-0.10204379260540009,
0.4976370632648468,
0.3472318649291992,
-0.00012417120160534978,
0.1380361169576645,
0.10928584635257721,
0.10169471800327301,
-0.29087236523628235,
-0.30163735151290894,
0.1341148316860199,
-0.059384919703006744,
0.4149942100048065,
-0.20153865218162537,
-0.05718964338302612,
-0.2600911855697632,
-0.060625821352005005,
0.26176899671554565,
0.38377517461776733,
0.50169837474823,
0.11732207238674164,
0.1685168743133545,
0.24648545682430267,
0.0738130733370781,
0.25956377387046814,
0.3155062198638916,
0.07547704875469208,
0.20712392032146454,
0.016833975911140442,
0.02660526894032955,
-0.08569470793008804,
0.07480783760547638,
-0.07012821733951569,
-0.1997741311788559,
0.21665853261947632,
0.22728331387043,
0.17457899451255798,
-0.1476219743490219,
-0.2287851870059967,
0.1198839545249939,
0.43321576714515686,
-0.3214258551597595,
-0.1559446156024933,
0.007921472191810608,
-0.011162050068378448,
-0.2727990746498108,
-0.006166972219944,
0.2483309805393219,
-0.427776962518692,
0.1667020469903946,
-0.16226062178611755,
-0.025466760620474815,
-0.37924978137016296,
0.19955646991729736,
-0.09251793473958969,
0.5032633543014526,
0.1183696985244751,
0.15681657195091248,
0.18424028158187866,
-0.014435779303312302,
0.3717096149921417,
0.08763837814331055,
0.13975468277931213,
0.06214795634150505,
-0.3116944134235382,
-0.030463935807347298,
-0.4463334083557129,
-0.6483628749847412,
-0.26851481199264526,
-0.21252353489398956,
0.1655777245759964,
-0.07115250825881958,
0.20472681522369385,
0.20295047760009766,
0.23332253098487854,
0.1388004571199417,
-0.21012336015701294,
0.5648383498191833,
0.10009295493364334,
-0.15525054931640625,
-0.133545383810997,
-0.025088563561439514,
-0.328238844871521,
-0.09228966385126114,
0.5121245384216309,
0.16284039616584778,
0.1257425993680954,
-0.005032282322645187,
-0.055022820830345154,
-0.14883305132389069,
-0.2688642144203186,
-0.08821725845336914,
0.2847146987915039,
0.18506914377212524,
0.0958356037735939,
0.383222371339798,
0.21541951596736908,
0.11113576591014862,
0.0493788868188858,
-0.13524369895458221,
0.03532237187027931,
0.08555611968040466,
-0.21797096729278564,
-0.11981739848852158,
0.1821131706237793,
0.32819798588752747,
-0.269904226064682,
0.12150130420923233,
-0.14253613352775574,
-0.208536759018898,
0.0015713851898908615,
-0.2935895323753357,
-0.005307510495185852,
0.013497423380613327,
-0.25748389959335327,
0.309787392616272,
0.09357458353042603,
-0.30359354615211487,
0.019634298980236053,
0.46777206659317017,
-0.4638134241104126,
-0.4341682493686676,
-0.4358201026916504,
0.08996038138866425,
0.3708471655845642,
-0.11298754811286926,
-0.09231018275022507,
0.05973508208990097,
0.4520862400531769,
-0.18882568180561066,
0.10294705629348755,
-0.579759955406189,
0.3521028161048889,
-0.015292652882635593,
-0.08329926431179047,
0.09054681658744812,
-0.4035293161869049,
-0.18164736032485962,
0.16967111825942993,
-0.15330366790294647,
0.31111302971839905,
0.4423997104167938,
-0.38276052474975586,
0.29479148983955383,
0.07952729612588882,
0.01669318974018097,
0.8023683428764343,
-0.3571903705596924,
-0.21795889735221863,
0.13225509226322174,
-0.17044910788536072,
-0.3259192109107971,
-0.07707250863313675,
0.27369797229766846,
0.09063044935464859,
0.07179877161979675,
-0.009402886033058167,
0.391426682472229,
-0.09331520646810532,
0.2531605660915375,
-0.3342474102973938,
-0.07499263435602188,
0.3700166344642639,
0.3320883810520172,
0.2507389783859253,
-0.03353755176067352,
0.06653157621622086,
0.342216432094574,
0.2596173882484436,
-0.14549671113491058,
0.2384006530046463,
0.16183403134346008,
0.018355172127485275,
-0.1759248524904251,
-0.10522495955228806,
-0.16064628958702087,
-0.30508846044540405,
-0.20202073454856873,
-0.3353252112865448,
0.4843747913837433,
-0.23949791491031647,
0.08094942569732666,
-0.16291120648384094,
-0.07293787598609924,
-0.1123218983411789,
0.23905354738235474,
0.10807839035987854,
0.08143849670886993,
-0.14365513622760773,
-0.0689878836274147,
-0.1000492125749588,
-0.06188848614692688,
-0.05237250775098801,
0.1880999505519867,
0.02513740211725235,
0.27322739362716675,
-0.16910044848918915,
-0.1986376792192459,
-0.26017463207244873,
0.05643289163708687,
0.2558158338069916,
0.09606233239173889,
-0.2582111656665802,
0.2561085820198059,
-0.14479242265224457,
-0.2581230401992798,
-0.30881190299987793,
0.3103089928627014,
0.15540990233421326,
-0.5250990986824036,
0.03694210946559906,
0.16145145893096924,
0.16632096469402313,
-0.0896117314696312,
0.14196765422821045,
0.13636313378810883,
0.06864230334758759,
0.13800722360610962,
-0.004035290330648422,
0.36933788657188416,
0.2155340313911438,
-0.04095647484064102,
0.2696603834629059,
0.049553148448467255,
-0.12011763453483582,
-0.16362632811069489,
0.11930280923843384,
0.03172415867447853,
-0.290544718503952,
-0.019627436995506287,
0.4356467127799988,
-0.15255612134933472,
0.24142277240753174,
0.44143083691596985,
-0.11877404898405075,
-0.02535412088036537,
-0.18716178834438324,
0.21855880320072174,
0.14079920947551727,
-0.026811841875314713,
-0.08513769507408142,
-0.005383547395467758,
-0.2538854777812958,
-0.06525124609470367,
0.3296319842338562,
-0.1268233209848404,
0.4315141439437866,
0.1532037854194641,
0.2892070412635803,
-0.01847047731280327,
-0.05140719190239906,
-0.2919021248817444,
0.2905481159687042,
0.25433409214019775,
-0.23410165309906006,
0.415740430355072,
-0.10252450406551361,
-0.21352696418762207,
-0.6377741694450378,
-0.37067940831184387,
-0.08373959362506866,
-0.13306309282779694,
-0.04485947638750076,
-0.0630304217338562,
0.16435343027114868,
0.061436109244823456,
0.07715995609760284,
-0.06676118075847626,
0.2787645757198334,
-0.18456237018108368,
0.10622963309288025,
-0.33188295364379883,
-0.3990285396575928,
-0.019308118149638176,
0.23811917006969452,
0.01827249489724636,
-0.11488112807273865,
0.0174302589148283,
-0.046467944979667664,
-0.07560288161039352,
-0.1490136682987213,
0.11283780634403229,
-0.01411139965057373,
-0.1526143103837967,
0.13773296773433685,
-0.02533257007598877,
-0.2624073028564453,
-0.22783571481704712,
0.3238840103149414,
-0.32887303829193115,
0.004554146900773048,
0.45673561096191406,
-0.18968376517295837,
-0.05533435568213463,
-0.05129353702068329,
-0.3140719532966614,
-0.581460177898407,
-0.053909800946712494,
0.017290711402893066,
0.034301478415727615,
0.32963305711746216,
0.34804239869117737,
0.030773989856243134,
0.1842593550682068,
0.03400556370615959,
-0.0598001703619957,
0.08541790395975113,
0.11920306086540222,
0.31462550163269043,
-0.03845174238085747,
-0.2886618971824646,
-0.34714624285697937,
-0.11079138517379761,
0.07097923755645752,
0.07621534913778305,
-0.3193144202232361,
0.1262015849351883,
-0.12603750824928284,
0.05120332911610603,
-0.2906244993209839,
0.022035159170627594,
0.448099285364151,
0.11024507135152817,
-0.008791772648692131,
0.21246546506881714,
0.013971421867609024,
0.30608829855918884,
0.04166557267308235,
0.21448448300361633,
-0.03469454124569893,
0.17872604727745056,
-0.045640990138053894,
0.6495579481124878,
-0.14180046319961548,
-0.38593488931655884,
0.1767016500234604,
-0.1262180656194687,
-0.17933616042137146,
-0.00940673053264618,
-0.3002760112285614,
-0.003125453134998679,
-0.2587316632270813,
-0.0353839248418808,
0.0021562501788139343,
-0.2854905128479004,
-0.32541418075561523,
-0.18113823235034943,
0.13426688313484192,
-0.1632562279701233,
-0.3281495273113251,
0.3672776222229004,
-0.2507420778274536,
0.2550690174102783,
-0.15651372075080872,
-0.14477157592773438,
-0.1669241487979889,
-0.4364984631538391,
-0.03023330681025982,
0.19782334566116333,
-0.2999420762062073,
0.02716180309653282,
-0.5152041912078857,
-0.236068457365036,
-0.1595631241798401,
0.08459796011447906,
0.3666800260543823,
0.5396208763122559,
0.030301038175821304,
0.034953273832798004,
0.08058568835258484,
0.10107032209634781,
0.41064178943634033,
0.18398244678974152,
-0.07503245770931244,
0.18558603525161743,
0.1655878722667694,
-0.35793617367744446,
-0.28352120518684387,
-0.5400987267494202,
-0.08220431953668594,
0.252879798412323,
0.09672657400369644,
-0.2896074950695038,
-0.24265071749687195,
0.22253456711769104,
0.04142904654145241,
-0.2890588343143463,
-0.04357591271400452,
0.01720919832587242,
-0.23117303848266602,
-0.20426009595394135,
0.10622568428516388,
0.2091032862663269,
0.38879045844078064,
-0.2306029349565506,
-0.10891975462436676,
0.018064573407173157,
0.20605623722076416,
0.17588120698928833,
-0.0173781868070364,
0.12107264995574951,
-0.12726356089115143,
-0.2719097137451172,
-0.2843085825443268,
0.22120030224323273,
0.12467492371797562,
0.4509957730770111,
0.11753085255622864,
-0.3715094029903412,
0.1879754364490509,
-0.057256538420915604,
0.340912789106369,
0.007406607270240784,
-0.11040902882814407,
0.34728294610977173,
0.1715257316827774,
0.3176766633987427,
0.09935840219259262,
-0.028953395783901215,
0.26587313413619995,
-0.07713234424591064,
-0.4949769079685211,
-0.04186218976974487,
0.27453336119651794,
-0.07302429527044296,
-0.0733686238527298,
-0.02415122091770172,
-0.209478959441185,
-0.2615412771701813,
0.4185965657234192,
0.3421195447444916,
1.0206489562988281,
-0.2603800296783447,
0.3446720540523529,
0.10921036452054977,
-0.060601480305194855,
0.49505680799484253,
-0.15399694442749023,
0.1934904009103775,
-0.5524522662162781,
0.04724026843905449,
-0.11169172078371048,
-0.19717247784137726,
-0.1783650815486908,
0.34370511770248413,
-0.3830956220626831,
0.13299895823001862,
-0.09648330509662628,
0.1960601955652237,
0.14222756028175354,
0.31962889432907104,
0.20939426124095917,
-0.20901517570018768,
-0.23682478070259094,
-0.003560660406947136,
-0.4814990758895874,
-0.09908919036388397,
-0.03797366842627525,
-0.2874804735183716,
-0.00013706833124160767,
-0.3918529152870178,
-0.20003628730773926,
0.19048914313316345,
-0.29227739572525024,
0.3384348750114441,
0.5059813261032104,
-0.10644374787807465,
0.22281327843666077,
0.19872711598873138,
0.3068525195121765,
-0.045633796602487564,
0.06118910014629364,
-0.27032405138015747,
-0.06260416656732559,
0.11660388112068176,
-0.057284824550151825,
-0.05342921242117882,
0.4100272059440613,
-0.04768291488289833,
-0.3138558864593506,
0.3178364634513855,
0.014437335543334484,
-0.17577092349529266,
0.15726935863494873,
-0.067201629281044,
0.08750443160533905,
-0.41170570254325867,
0.27144864201545715,
-0.21885740756988525,
-0.31851083040237427,
-0.26868340373039246,
0.003916214220225811,
0.018921010196208954,
-0.12270354479551315,
0.10436993837356567,
0.31816980242729187,
0.014800339937210083,
0.14292530715465546,
0.16663622856140137,
0.2979535758495331,
0.22282752394676208,
0.5636559724807739,
0.3159727454185486,
0.011753320693969727,
-0.20831474661827087,
0.1311718225479126,
0.006909423507750034,
-0.8838167786598206,
0.19761759042739868,
-0.03138064220547676,
-0.2637524902820587,
0.21239115297794342,
0.37532779574394226,
0.1270447075366974,
0.4987851083278656,
-0.17407982051372528,
-0.424702525138855,
-0.3973771333694458,
0.006599500775337219,
0.174264058470726,
0.0011970847845077515,
0.0514228418469429,
0.5306834578514099,
0.19821935892105103,
0.15471722185611725,
-0.2049756944179535,
0.18318019807338715,
-0.3399905264377594,
0.25543928146362305,
-0.11082524061203003,
-0.41956207156181335,
-0.03815194219350815,
0.12543199956417084,
0.04387335479259491,
0.0017527155578136444,
0.09149196743965149,
-0.054966703057289124,
-0.18266500532627106,
0.17931437492370605,
0.27356216311454773,
-0.20960849523544312,
-0.20473991334438324,
-0.004650816321372986,
-0.02193005383014679,
0.10297376662492752,
-0.0729960948228836,
0.00789722055196762,
-0.15854842960834503,
0.549696683883667,
-0.09683722257614136,
-0.07829498499631882,
-0.321249783039093,
0.03207146376371384,
-0.23294594883918762,
-0.05529676377773285,
0.17893609404563904,
0.2310502976179123,
0.14143411815166473,
-0.16718903183937073,
-0.7330247163772583,
0.14692364633083344,
0.2807041108608246,
-0.07894819974899292,
0.2824501097202301,
-0.6361717581748962,
-0.2515563666820526,
-0.12406904995441437,
0.058936625719070435,
0.01782314106822014,
-0.29064345359802246,
-0.11902442574501038,
0.15008515119552612,
0.07920800894498825,
-0.22283446788787842,
-0.21998175978660583,
-0.007126742973923683,
-0.15680719912052155,
-0.18953169882297516,
0.4388341009616852,
0.05041131004691124,
-0.17817392945289612,
-0.09514656662940979,
0.020867332816123962,
0.1502608209848404,
-0.10834331810474396,
0.0020460509695112705,
0.5980406999588013,
-0.13318146765232086,
-0.02910071238875389,
0.456070214509964,
-0.001709073781967163,
-0.08082757145166397,
0.011111222207546234,
-0.24031901359558105,
0.10640877485275269,
-0.1864721179008484,
0.028415899723768234,
0.2730589210987091,
0.0053153447806835175,
-0.16144342720508575,
0.11166632175445557,
0.01803424209356308,
-0.14061081409454346,
-0.20857888460159302,
0.5285695791244507,
-0.1294042468070984,
-0.11113128066062927,
-0.20984983444213867,
0.25221896171569824,
-0.2701117694377899,
0.004977590404450893,
-0.13915228843688965,
-0.07524175196886063,
-0.17433515191078186,
-0.21616902947425842,
-0.19599811732769012,
0.10436327755451202,
0.2675894796848297,
0.2678266167640686,
0.17319387197494507,
-0.292314350605011,
0.010725192725658417,
0.4745837152004242,
0.08574096858501434,
-0.2254718691110611,
0.4008435904979706,
0.32856231927871704,
-0.09891852736473083,
0.024350197985768318,
0.34102532267570496,
0.5116844177246094,
0.5268765091896057,
-0.27554047107696533,
0.029622260481119156,
0.09985306859016418,
-0.1723218411207199,
0.3009313642978668,
0.12202691286802292,
0.5902808904647827,
0.15899984538555145,
0.13224413990974426,
-0.023708293214440346,
-0.02508227899670601,
0.23306448757648468,
-0.036525119096040726,
0.19096454977989197,
0.08038115501403809,
0.6249294281005859,
0.23981918394565582,
-0.35915854573249817,
-0.1490706205368042,
0.08431816846132278,
-0.4341332018375397,
0.005539947655051947,
0.46048471331596375,
-0.049365922808647156,
0.28800010681152344,
-0.06462600827217102,
-0.026343977078795433,
0.15817265212535858,
0.6270228624343872,
0.23330338299274445,
0.2689681649208069,
-0.34173452854156494,
0.11560580134391785,
-0.32565122842788696,
0.30072662234306335,
-0.0014743059873580933,
-0.08987303078174591,
0.07919662445783615,
0.0009102541953325272,
0.05939766392111778,
0.1766049563884735,
0.1285301148891449,
0.07680471986532211,
-0.14709264039993286,
0.23895122110843658,
-0.16914226114749908,
0.02404322475194931,
0.0808025449514389,
0.22791309654712677,
-0.0594039112329483,
-0.32999187707901,
0.217532217502594,
0.10713180899620056,
-0.019447198137640953,
-0.07325653731822968,
0.054049037396907806,
0.12301939725875854,
0.1730819195508957,
0.10390540212392807,
0.034520141780376434,
0.5826875567436218,
0.12415967136621475,
-0.06382731348276138,
0.3305566608905792,
-0.1148175522685051,
-0.17466218769550323,
0.16456231474876404,
0.24761907756328583,
0.6241377592086792,
-0.03434651345014572,
0.25568875670433044,
-0.44834673404693604,
-0.21278731524944305,
-0.026163244619965553,
0.07279698550701141,
-0.25804615020751953,
0.2388155460357666,
-0.2617354393005371,
-0.03231417015194893,
0.3202947974205017,
-0.006378062069416046,
0.29820191860198975,
0.09396368265151978,
-0.4200735092163086,
-0.46412184834480286,
0.3670327067375183,
-0.2881059944629669,
-0.23062849044799805,
-0.14516982436180115,
0.11228165775537491,
0.03078039363026619,
0.08315202593803406,
-0.6610729694366455,
-0.009856000542640686,
0.33231374621391296,
-0.026302561163902283,
-0.22136369347572327,
-0.1205214411020279,
0.01226385124027729,
0.18510191142559052,
-0.0976044237613678,
0.27065566182136536,
-0.09607880562543869,
-0.06466731429100037,
-0.45411038398742676,
-0.1759287714958191
] |
https://github.com/huggingface/datasets/issues/469 | invalid data type 'str' at _convert_outputs in arrow_dataset.py | Hello . Yes, I did set the output format as below for the two columns
`train_dataset.set_format('torch',columns=['Text','Label'])`
| I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
| 16 | invalid data type 'str' at _convert_outputs in arrow_dataset.py
I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
Hello . Yes, I did set the output format as below for the two columns
`train_dataset.set_format('torch',columns=['Text','Label'])`
| [
-0.22282423079013824,
0.0242498517036438,
0.10737143456935883,
0.23030735552310944,
0.5109532475471497,
-0.10725988447666168,
0.5323296785354614,
0.07759007066488266,
-0.3410622179508209,
-0.12477622926235199,
0.03665751963853836,
0.3864072561264038,
-0.36969560384750366,
0.04221787303686142,
0.044361963868141174,
-0.20246389508247375,
-0.08803478628396988,
0.009990029036998749,
-0.023253224790096283,
-0.053638752549886703,
0.048243701457977295,
0.1829802691936493,
-0.15682613849639893,
0.41447722911834717,
-0.6451312303543091,
-0.18357887864112854,
0.1746635138988495,
-0.09639310091733932,
-0.09922074526548386,
-0.4487784206867218,
0.220274418592453,
-0.10204379260540009,
0.4976370632648468,
0.3472318649291992,
-0.00012417120160534978,
0.1380361169576645,
0.10928584635257721,
0.10169471800327301,
-0.29087236523628235,
-0.30163735151290894,
0.1341148316860199,
-0.059384919703006744,
0.4149942100048065,
-0.20153865218162537,
-0.05718964338302612,
-0.2600911855697632,
-0.060625821352005005,
0.26176899671554565,
0.38377517461776733,
0.50169837474823,
0.11732207238674164,
0.1685168743133545,
0.24648545682430267,
0.0738130733370781,
0.25956377387046814,
0.3155062198638916,
0.07547704875469208,
0.20712392032146454,
0.016833975911140442,
0.02660526894032955,
-0.08569470793008804,
0.07480783760547638,
-0.07012821733951569,
-0.1997741311788559,
0.21665853261947632,
0.22728331387043,
0.17457899451255798,
-0.1476219743490219,
-0.2287851870059967,
0.1198839545249939,
0.43321576714515686,
-0.3214258551597595,
-0.1559446156024933,
0.007921472191810608,
-0.011162050068378448,
-0.2727990746498108,
-0.006166972219944,
0.2483309805393219,
-0.427776962518692,
0.1667020469903946,
-0.16226062178611755,
-0.025466760620474815,
-0.37924978137016296,
0.19955646991729736,
-0.09251793473958969,
0.5032633543014526,
0.1183696985244751,
0.15681657195091248,
0.18424028158187866,
-0.014435779303312302,
0.3717096149921417,
0.08763837814331055,
0.13975468277931213,
0.06214795634150505,
-0.3116944134235382,
-0.030463935807347298,
-0.4463334083557129,
-0.6483628749847412,
-0.26851481199264526,
-0.21252353489398956,
0.1655777245759964,
-0.07115250825881958,
0.20472681522369385,
0.20295047760009766,
0.23332253098487854,
0.1388004571199417,
-0.21012336015701294,
0.5648383498191833,
0.10009295493364334,
-0.15525054931640625,
-0.133545383810997,
-0.025088563561439514,
-0.328238844871521,
-0.09228966385126114,
0.5121245384216309,
0.16284039616584778,
0.1257425993680954,
-0.005032282322645187,
-0.055022820830345154,
-0.14883305132389069,
-0.2688642144203186,
-0.08821725845336914,
0.2847146987915039,
0.18506914377212524,
0.0958356037735939,
0.383222371339798,
0.21541951596736908,
0.11113576591014862,
0.0493788868188858,
-0.13524369895458221,
0.03532237187027931,
0.08555611968040466,
-0.21797096729278564,
-0.11981739848852158,
0.1821131706237793,
0.32819798588752747,
-0.269904226064682,
0.12150130420923233,
-0.14253613352775574,
-0.208536759018898,
0.0015713851898908615,
-0.2935895323753357,
-0.005307510495185852,
0.013497423380613327,
-0.25748389959335327,
0.309787392616272,
0.09357458353042603,
-0.30359354615211487,
0.019634298980236053,
0.46777206659317017,
-0.4638134241104126,
-0.4341682493686676,
-0.4358201026916504,
0.08996038138866425,
0.3708471655845642,
-0.11298754811286926,
-0.09231018275022507,
0.05973508208990097,
0.4520862400531769,
-0.18882568180561066,
0.10294705629348755,
-0.579759955406189,
0.3521028161048889,
-0.015292652882635593,
-0.08329926431179047,
0.09054681658744812,
-0.4035293161869049,
-0.18164736032485962,
0.16967111825942993,
-0.15330366790294647,
0.31111302971839905,
0.4423997104167938,
-0.38276052474975586,
0.29479148983955383,
0.07952729612588882,
0.01669318974018097,
0.8023683428764343,
-0.3571903705596924,
-0.21795889735221863,
0.13225509226322174,
-0.17044910788536072,
-0.3259192109107971,
-0.07707250863313675,
0.27369797229766846,
0.09063044935464859,
0.07179877161979675,
-0.009402886033058167,
0.391426682472229,
-0.09331520646810532,
0.2531605660915375,
-0.3342474102973938,
-0.07499263435602188,
0.3700166344642639,
0.3320883810520172,
0.2507389783859253,
-0.03353755176067352,
0.06653157621622086,
0.342216432094574,
0.2596173882484436,
-0.14549671113491058,
0.2384006530046463,
0.16183403134346008,
0.018355172127485275,
-0.1759248524904251,
-0.10522495955228806,
-0.16064628958702087,
-0.30508846044540405,
-0.20202073454856873,
-0.3353252112865448,
0.4843747913837433,
-0.23949791491031647,
0.08094942569732666,
-0.16291120648384094,
-0.07293787598609924,
-0.1123218983411789,
0.23905354738235474,
0.10807839035987854,
0.08143849670886993,
-0.14365513622760773,
-0.0689878836274147,
-0.1000492125749588,
-0.06188848614692688,
-0.05237250775098801,
0.1880999505519867,
0.02513740211725235,
0.27322739362716675,
-0.16910044848918915,
-0.1986376792192459,
-0.26017463207244873,
0.05643289163708687,
0.2558158338069916,
0.09606233239173889,
-0.2582111656665802,
0.2561085820198059,
-0.14479242265224457,
-0.2581230401992798,
-0.30881190299987793,
0.3103089928627014,
0.15540990233421326,
-0.5250990986824036,
0.03694210946559906,
0.16145145893096924,
0.16632096469402313,
-0.0896117314696312,
0.14196765422821045,
0.13636313378810883,
0.06864230334758759,
0.13800722360610962,
-0.004035290330648422,
0.36933788657188416,
0.2155340313911438,
-0.04095647484064102,
0.2696603834629059,
0.049553148448467255,
-0.12011763453483582,
-0.16362632811069489,
0.11930280923843384,
0.03172415867447853,
-0.290544718503952,
-0.019627436995506287,
0.4356467127799988,
-0.15255612134933472,
0.24142277240753174,
0.44143083691596985,
-0.11877404898405075,
-0.02535412088036537,
-0.18716178834438324,
0.21855880320072174,
0.14079920947551727,
-0.026811841875314713,
-0.08513769507408142,
-0.005383547395467758,
-0.2538854777812958,
-0.06525124609470367,
0.3296319842338562,
-0.1268233209848404,
0.4315141439437866,
0.1532037854194641,
0.2892070412635803,
-0.01847047731280327,
-0.05140719190239906,
-0.2919021248817444,
0.2905481159687042,
0.25433409214019775,
-0.23410165309906006,
0.415740430355072,
-0.10252450406551361,
-0.21352696418762207,
-0.6377741694450378,
-0.37067940831184387,
-0.08373959362506866,
-0.13306309282779694,
-0.04485947638750076,
-0.0630304217338562,
0.16435343027114868,
0.061436109244823456,
0.07715995609760284,
-0.06676118075847626,
0.2787645757198334,
-0.18456237018108368,
0.10622963309288025,
-0.33188295364379883,
-0.3990285396575928,
-0.019308118149638176,
0.23811917006969452,
0.01827249489724636,
-0.11488112807273865,
0.0174302589148283,
-0.046467944979667664,
-0.07560288161039352,
-0.1490136682987213,
0.11283780634403229,
-0.01411139965057373,
-0.1526143103837967,
0.13773296773433685,
-0.02533257007598877,
-0.2624073028564453,
-0.22783571481704712,
0.3238840103149414,
-0.32887303829193115,
0.004554146900773048,
0.45673561096191406,
-0.18968376517295837,
-0.05533435568213463,
-0.05129353702068329,
-0.3140719532966614,
-0.581460177898407,
-0.053909800946712494,
0.017290711402893066,
0.034301478415727615,
0.32963305711746216,
0.34804239869117737,
0.030773989856243134,
0.1842593550682068,
0.03400556370615959,
-0.0598001703619957,
0.08541790395975113,
0.11920306086540222,
0.31462550163269043,
-0.03845174238085747,
-0.2886618971824646,
-0.34714624285697937,
-0.11079138517379761,
0.07097923755645752,
0.07621534913778305,
-0.3193144202232361,
0.1262015849351883,
-0.12603750824928284,
0.05120332911610603,
-0.2906244993209839,
0.022035159170627594,
0.448099285364151,
0.11024507135152817,
-0.008791772648692131,
0.21246546506881714,
0.013971421867609024,
0.30608829855918884,
0.04166557267308235,
0.21448448300361633,
-0.03469454124569893,
0.17872604727745056,
-0.045640990138053894,
0.6495579481124878,
-0.14180046319961548,
-0.38593488931655884,
0.1767016500234604,
-0.1262180656194687,
-0.17933616042137146,
-0.00940673053264618,
-0.3002760112285614,
-0.003125453134998679,
-0.2587316632270813,
-0.0353839248418808,
0.0021562501788139343,
-0.2854905128479004,
-0.32541418075561523,
-0.18113823235034943,
0.13426688313484192,
-0.1632562279701233,
-0.3281495273113251,
0.3672776222229004,
-0.2507420778274536,
0.2550690174102783,
-0.15651372075080872,
-0.14477157592773438,
-0.1669241487979889,
-0.4364984631538391,
-0.03023330681025982,
0.19782334566116333,
-0.2999420762062073,
0.02716180309653282,
-0.5152041912078857,
-0.236068457365036,
-0.1595631241798401,
0.08459796011447906,
0.3666800260543823,
0.5396208763122559,
0.030301038175821304,
0.034953273832798004,
0.08058568835258484,
0.10107032209634781,
0.41064178943634033,
0.18398244678974152,
-0.07503245770931244,
0.18558603525161743,
0.1655878722667694,
-0.35793617367744446,
-0.28352120518684387,
-0.5400987267494202,
-0.08220431953668594,
0.252879798412323,
0.09672657400369644,
-0.2896074950695038,
-0.24265071749687195,
0.22253456711769104,
0.04142904654145241,
-0.2890588343143463,
-0.04357591271400452,
0.01720919832587242,
-0.23117303848266602,
-0.20426009595394135,
0.10622568428516388,
0.2091032862663269,
0.38879045844078064,
-0.2306029349565506,
-0.10891975462436676,
0.018064573407173157,
0.20605623722076416,
0.17588120698928833,
-0.0173781868070364,
0.12107264995574951,
-0.12726356089115143,
-0.2719097137451172,
-0.2843085825443268,
0.22120030224323273,
0.12467492371797562,
0.4509957730770111,
0.11753085255622864,
-0.3715094029903412,
0.1879754364490509,
-0.057256538420915604,
0.340912789106369,
0.007406607270240784,
-0.11040902882814407,
0.34728294610977173,
0.1715257316827774,
0.3176766633987427,
0.09935840219259262,
-0.028953395783901215,
0.26587313413619995,
-0.07713234424591064,
-0.4949769079685211,
-0.04186218976974487,
0.27453336119651794,
-0.07302429527044296,
-0.0733686238527298,
-0.02415122091770172,
-0.209478959441185,
-0.2615412771701813,
0.4185965657234192,
0.3421195447444916,
1.0206489562988281,
-0.2603800296783447,
0.3446720540523529,
0.10921036452054977,
-0.060601480305194855,
0.49505680799484253,
-0.15399694442749023,
0.1934904009103775,
-0.5524522662162781,
0.04724026843905449,
-0.11169172078371048,
-0.19717247784137726,
-0.1783650815486908,
0.34370511770248413,
-0.3830956220626831,
0.13299895823001862,
-0.09648330509662628,
0.1960601955652237,
0.14222756028175354,
0.31962889432907104,
0.20939426124095917,
-0.20901517570018768,
-0.23682478070259094,
-0.003560660406947136,
-0.4814990758895874,
-0.09908919036388397,
-0.03797366842627525,
-0.2874804735183716,
-0.00013706833124160767,
-0.3918529152870178,
-0.20003628730773926,
0.19048914313316345,
-0.29227739572525024,
0.3384348750114441,
0.5059813261032104,
-0.10644374787807465,
0.22281327843666077,
0.19872711598873138,
0.3068525195121765,
-0.045633796602487564,
0.06118910014629364,
-0.27032405138015747,
-0.06260416656732559,
0.11660388112068176,
-0.057284824550151825,
-0.05342921242117882,
0.4100272059440613,
-0.04768291488289833,
-0.3138558864593506,
0.3178364634513855,
0.014437335543334484,
-0.17577092349529266,
0.15726935863494873,
-0.067201629281044,
0.08750443160533905,
-0.41170570254325867,
0.27144864201545715,
-0.21885740756988525,
-0.31851083040237427,
-0.26868340373039246,
0.003916214220225811,
0.018921010196208954,
-0.12270354479551315,
0.10436993837356567,
0.31816980242729187,
0.014800339937210083,
0.14292530715465546,
0.16663622856140137,
0.2979535758495331,
0.22282752394676208,
0.5636559724807739,
0.3159727454185486,
0.011753320693969727,
-0.20831474661827087,
0.1311718225479126,
0.006909423507750034,
-0.8838167786598206,
0.19761759042739868,
-0.03138064220547676,
-0.2637524902820587,
0.21239115297794342,
0.37532779574394226,
0.1270447075366974,
0.4987851083278656,
-0.17407982051372528,
-0.424702525138855,
-0.3973771333694458,
0.006599500775337219,
0.174264058470726,
0.0011970847845077515,
0.0514228418469429,
0.5306834578514099,
0.19821935892105103,
0.15471722185611725,
-0.2049756944179535,
0.18318019807338715,
-0.3399905264377594,
0.25543928146362305,
-0.11082524061203003,
-0.41956207156181335,
-0.03815194219350815,
0.12543199956417084,
0.04387335479259491,
0.0017527155578136444,
0.09149196743965149,
-0.054966703057289124,
-0.18266500532627106,
0.17931437492370605,
0.27356216311454773,
-0.20960849523544312,
-0.20473991334438324,
-0.004650816321372986,
-0.02193005383014679,
0.10297376662492752,
-0.0729960948228836,
0.00789722055196762,
-0.15854842960834503,
0.549696683883667,
-0.09683722257614136,
-0.07829498499631882,
-0.321249783039093,
0.03207146376371384,
-0.23294594883918762,
-0.05529676377773285,
0.17893609404563904,
0.2310502976179123,
0.14143411815166473,
-0.16718903183937073,
-0.7330247163772583,
0.14692364633083344,
0.2807041108608246,
-0.07894819974899292,
0.2824501097202301,
-0.6361717581748962,
-0.2515563666820526,
-0.12406904995441437,
0.058936625719070435,
0.01782314106822014,
-0.29064345359802246,
-0.11902442574501038,
0.15008515119552612,
0.07920800894498825,
-0.22283446788787842,
-0.21998175978660583,
-0.007126742973923683,
-0.15680719912052155,
-0.18953169882297516,
0.4388341009616852,
0.05041131004691124,
-0.17817392945289612,
-0.09514656662940979,
0.020867332816123962,
0.1502608209848404,
-0.10834331810474396,
0.0020460509695112705,
0.5980406999588013,
-0.13318146765232086,
-0.02910071238875389,
0.456070214509964,
-0.001709073781967163,
-0.08082757145166397,
0.011111222207546234,
-0.24031901359558105,
0.10640877485275269,
-0.1864721179008484,
0.028415899723768234,
0.2730589210987091,
0.0053153447806835175,
-0.16144342720508575,
0.11166632175445557,
0.01803424209356308,
-0.14061081409454346,
-0.20857888460159302,
0.5285695791244507,
-0.1294042468070984,
-0.11113128066062927,
-0.20984983444213867,
0.25221896171569824,
-0.2701117694377899,
0.004977590404450893,
-0.13915228843688965,
-0.07524175196886063,
-0.17433515191078186,
-0.21616902947425842,
-0.19599811732769012,
0.10436327755451202,
0.2675894796848297,
0.2678266167640686,
0.17319387197494507,
-0.292314350605011,
0.010725192725658417,
0.4745837152004242,
0.08574096858501434,
-0.2254718691110611,
0.4008435904979706,
0.32856231927871704,
-0.09891852736473083,
0.024350197985768318,
0.34102532267570496,
0.5116844177246094,
0.5268765091896057,
-0.27554047107696533,
0.029622260481119156,
0.09985306859016418,
-0.1723218411207199,
0.3009313642978668,
0.12202691286802292,
0.5902808904647827,
0.15899984538555145,
0.13224413990974426,
-0.023708293214440346,
-0.02508227899670601,
0.23306448757648468,
-0.036525119096040726,
0.19096454977989197,
0.08038115501403809,
0.6249294281005859,
0.23981918394565582,
-0.35915854573249817,
-0.1490706205368042,
0.08431816846132278,
-0.4341332018375397,
0.005539947655051947,
0.46048471331596375,
-0.049365922808647156,
0.28800010681152344,
-0.06462600827217102,
-0.026343977078795433,
0.15817265212535858,
0.6270228624343872,
0.23330338299274445,
0.2689681649208069,
-0.34173452854156494,
0.11560580134391785,
-0.32565122842788696,
0.30072662234306335,
-0.0014743059873580933,
-0.08987303078174591,
0.07919662445783615,
0.0009102541953325272,
0.05939766392111778,
0.1766049563884735,
0.1285301148891449,
0.07680471986532211,
-0.14709264039993286,
0.23895122110843658,
-0.16914226114749908,
0.02404322475194931,
0.0808025449514389,
0.22791309654712677,
-0.0594039112329483,
-0.32999187707901,
0.217532217502594,
0.10713180899620056,
-0.019447198137640953,
-0.07325653731822968,
0.054049037396907806,
0.12301939725875854,
0.1730819195508957,
0.10390540212392807,
0.034520141780376434,
0.5826875567436218,
0.12415967136621475,
-0.06382731348276138,
0.3305566608905792,
-0.1148175522685051,
-0.17466218769550323,
0.16456231474876404,
0.24761907756328583,
0.6241377592086792,
-0.03434651345014572,
0.25568875670433044,
-0.44834673404693604,
-0.21278731524944305,
-0.026163244619965553,
0.07279698550701141,
-0.25804615020751953,
0.2388155460357666,
-0.2617354393005371,
-0.03231417015194893,
0.3202947974205017,
-0.006378062069416046,
0.29820191860198975,
0.09396368265151978,
-0.4200735092163086,
-0.46412184834480286,
0.3670327067375183,
-0.2881059944629669,
-0.23062849044799805,
-0.14516982436180115,
0.11228165775537491,
0.03078039363026619,
0.08315202593803406,
-0.6610729694366455,
-0.009856000542640686,
0.33231374621391296,
-0.026302561163902283,
-0.22136369347572327,
-0.1205214411020279,
0.01226385124027729,
0.18510191142559052,
-0.0976044237613678,
0.27065566182136536,
-0.09607880562543869,
-0.06466731429100037,
-0.45411038398742676,
-0.1759287714958191
] |
https://github.com/huggingface/datasets/issues/469 | invalid data type 'str' at _convert_outputs in arrow_dataset.py | I think you're having this issue because you try to format strings as pytorch tensors, which is not possible.
Indeed by having "Text" in `columns=['Text','Label']`, you try to convert the text values to pytorch tensors.
Instead I recommend you to first tokenize your dataset using a tokenizer from transformers. For example
```python
from transformers import BertTokenizer
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
train_dataset.map(lambda x: tokenizer(x["Text"]), batched=True)
train_dataset.set_format("torch", column=["input_ids"])
```
Another way to fix your issue would be to not set the format to pytorch, and leave the dataset as it is by default. In that case, the strings are returned normally when you get examples from your dataloader. It means that you would have to tokenize the examples in the training loop (or using a data collator) though.
Let me know if you have other questions | I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
| 133 | invalid data type 'str' at _convert_outputs in arrow_dataset.py
I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I think you're having this issue because you try to format strings as pytorch tensors, which is not possible.
Indeed by having "Text" in `columns=['Text','Label']`, you try to convert the text values to pytorch tensors.
Instead I recommend you to first tokenize your dataset using a tokenizer from transformers. For example
```python
from transformers import BertTokenizer
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
train_dataset.map(lambda x: tokenizer(x["Text"]), batched=True)
train_dataset.set_format("torch", column=["input_ids"])
```
Another way to fix your issue would be to not set the format to pytorch, and leave the dataset as it is by default. In that case, the strings are returned normally when you get examples from your dataloader. It means that you would have to tokenize the examples in the training loop (or using a data collator) though.
Let me know if you have other questions | [
-0.22282423079013824,
0.0242498517036438,
0.10737143456935883,
0.23030735552310944,
0.5109532475471497,
-0.10725988447666168,
0.5323296785354614,
0.07759007066488266,
-0.3410622179508209,
-0.12477622926235199,
0.03665751963853836,
0.3864072561264038,
-0.36969560384750366,
0.04221787303686142,
0.044361963868141174,
-0.20246389508247375,
-0.08803478628396988,
0.009990029036998749,
-0.023253224790096283,
-0.053638752549886703,
0.048243701457977295,
0.1829802691936493,
-0.15682613849639893,
0.41447722911834717,
-0.6451312303543091,
-0.18357887864112854,
0.1746635138988495,
-0.09639310091733932,
-0.09922074526548386,
-0.4487784206867218,
0.220274418592453,
-0.10204379260540009,
0.4976370632648468,
0.3472318649291992,
-0.00012417120160534978,
0.1380361169576645,
0.10928584635257721,
0.10169471800327301,
-0.29087236523628235,
-0.30163735151290894,
0.1341148316860199,
-0.059384919703006744,
0.4149942100048065,
-0.20153865218162537,
-0.05718964338302612,
-0.2600911855697632,
-0.060625821352005005,
0.26176899671554565,
0.38377517461776733,
0.50169837474823,
0.11732207238674164,
0.1685168743133545,
0.24648545682430267,
0.0738130733370781,
0.25956377387046814,
0.3155062198638916,
0.07547704875469208,
0.20712392032146454,
0.016833975911140442,
0.02660526894032955,
-0.08569470793008804,
0.07480783760547638,
-0.07012821733951569,
-0.1997741311788559,
0.21665853261947632,
0.22728331387043,
0.17457899451255798,
-0.1476219743490219,
-0.2287851870059967,
0.1198839545249939,
0.43321576714515686,
-0.3214258551597595,
-0.1559446156024933,
0.007921472191810608,
-0.011162050068378448,
-0.2727990746498108,
-0.006166972219944,
0.2483309805393219,
-0.427776962518692,
0.1667020469903946,
-0.16226062178611755,
-0.025466760620474815,
-0.37924978137016296,
0.19955646991729736,
-0.09251793473958969,
0.5032633543014526,
0.1183696985244751,
0.15681657195091248,
0.18424028158187866,
-0.014435779303312302,
0.3717096149921417,
0.08763837814331055,
0.13975468277931213,
0.06214795634150505,
-0.3116944134235382,
-0.030463935807347298,
-0.4463334083557129,
-0.6483628749847412,
-0.26851481199264526,
-0.21252353489398956,
0.1655777245759964,
-0.07115250825881958,
0.20472681522369385,
0.20295047760009766,
0.23332253098487854,
0.1388004571199417,
-0.21012336015701294,
0.5648383498191833,
0.10009295493364334,
-0.15525054931640625,
-0.133545383810997,
-0.025088563561439514,
-0.328238844871521,
-0.09228966385126114,
0.5121245384216309,
0.16284039616584778,
0.1257425993680954,
-0.005032282322645187,
-0.055022820830345154,
-0.14883305132389069,
-0.2688642144203186,
-0.08821725845336914,
0.2847146987915039,
0.18506914377212524,
0.0958356037735939,
0.383222371339798,
0.21541951596736908,
0.11113576591014862,
0.0493788868188858,
-0.13524369895458221,
0.03532237187027931,
0.08555611968040466,
-0.21797096729278564,
-0.11981739848852158,
0.1821131706237793,
0.32819798588752747,
-0.269904226064682,
0.12150130420923233,
-0.14253613352775574,
-0.208536759018898,
0.0015713851898908615,
-0.2935895323753357,
-0.005307510495185852,
0.013497423380613327,
-0.25748389959335327,
0.309787392616272,
0.09357458353042603,
-0.30359354615211487,
0.019634298980236053,
0.46777206659317017,
-0.4638134241104126,
-0.4341682493686676,
-0.4358201026916504,
0.08996038138866425,
0.3708471655845642,
-0.11298754811286926,
-0.09231018275022507,
0.05973508208990097,
0.4520862400531769,
-0.18882568180561066,
0.10294705629348755,
-0.579759955406189,
0.3521028161048889,
-0.015292652882635593,
-0.08329926431179047,
0.09054681658744812,
-0.4035293161869049,
-0.18164736032485962,
0.16967111825942993,
-0.15330366790294647,
0.31111302971839905,
0.4423997104167938,
-0.38276052474975586,
0.29479148983955383,
0.07952729612588882,
0.01669318974018097,
0.8023683428764343,
-0.3571903705596924,
-0.21795889735221863,
0.13225509226322174,
-0.17044910788536072,
-0.3259192109107971,
-0.07707250863313675,
0.27369797229766846,
0.09063044935464859,
0.07179877161979675,
-0.009402886033058167,
0.391426682472229,
-0.09331520646810532,
0.2531605660915375,
-0.3342474102973938,
-0.07499263435602188,
0.3700166344642639,
0.3320883810520172,
0.2507389783859253,
-0.03353755176067352,
0.06653157621622086,
0.342216432094574,
0.2596173882484436,
-0.14549671113491058,
0.2384006530046463,
0.16183403134346008,
0.018355172127485275,
-0.1759248524904251,
-0.10522495955228806,
-0.16064628958702087,
-0.30508846044540405,
-0.20202073454856873,
-0.3353252112865448,
0.4843747913837433,
-0.23949791491031647,
0.08094942569732666,
-0.16291120648384094,
-0.07293787598609924,
-0.1123218983411789,
0.23905354738235474,
0.10807839035987854,
0.08143849670886993,
-0.14365513622760773,
-0.0689878836274147,
-0.1000492125749588,
-0.06188848614692688,
-0.05237250775098801,
0.1880999505519867,
0.02513740211725235,
0.27322739362716675,
-0.16910044848918915,
-0.1986376792192459,
-0.26017463207244873,
0.05643289163708687,
0.2558158338069916,
0.09606233239173889,
-0.2582111656665802,
0.2561085820198059,
-0.14479242265224457,
-0.2581230401992798,
-0.30881190299987793,
0.3103089928627014,
0.15540990233421326,
-0.5250990986824036,
0.03694210946559906,
0.16145145893096924,
0.16632096469402313,
-0.0896117314696312,
0.14196765422821045,
0.13636313378810883,
0.06864230334758759,
0.13800722360610962,
-0.004035290330648422,
0.36933788657188416,
0.2155340313911438,
-0.04095647484064102,
0.2696603834629059,
0.049553148448467255,
-0.12011763453483582,
-0.16362632811069489,
0.11930280923843384,
0.03172415867447853,
-0.290544718503952,
-0.019627436995506287,
0.4356467127799988,
-0.15255612134933472,
0.24142277240753174,
0.44143083691596985,
-0.11877404898405075,
-0.02535412088036537,
-0.18716178834438324,
0.21855880320072174,
0.14079920947551727,
-0.026811841875314713,
-0.08513769507408142,
-0.005383547395467758,
-0.2538854777812958,
-0.06525124609470367,
0.3296319842338562,
-0.1268233209848404,
0.4315141439437866,
0.1532037854194641,
0.2892070412635803,
-0.01847047731280327,
-0.05140719190239906,
-0.2919021248817444,
0.2905481159687042,
0.25433409214019775,
-0.23410165309906006,
0.415740430355072,
-0.10252450406551361,
-0.21352696418762207,
-0.6377741694450378,
-0.37067940831184387,
-0.08373959362506866,
-0.13306309282779694,
-0.04485947638750076,
-0.0630304217338562,
0.16435343027114868,
0.061436109244823456,
0.07715995609760284,
-0.06676118075847626,
0.2787645757198334,
-0.18456237018108368,
0.10622963309288025,
-0.33188295364379883,
-0.3990285396575928,
-0.019308118149638176,
0.23811917006969452,
0.01827249489724636,
-0.11488112807273865,
0.0174302589148283,
-0.046467944979667664,
-0.07560288161039352,
-0.1490136682987213,
0.11283780634403229,
-0.01411139965057373,
-0.1526143103837967,
0.13773296773433685,
-0.02533257007598877,
-0.2624073028564453,
-0.22783571481704712,
0.3238840103149414,
-0.32887303829193115,
0.004554146900773048,
0.45673561096191406,
-0.18968376517295837,
-0.05533435568213463,
-0.05129353702068329,
-0.3140719532966614,
-0.581460177898407,
-0.053909800946712494,
0.017290711402893066,
0.034301478415727615,
0.32963305711746216,
0.34804239869117737,
0.030773989856243134,
0.1842593550682068,
0.03400556370615959,
-0.0598001703619957,
0.08541790395975113,
0.11920306086540222,
0.31462550163269043,
-0.03845174238085747,
-0.2886618971824646,
-0.34714624285697937,
-0.11079138517379761,
0.07097923755645752,
0.07621534913778305,
-0.3193144202232361,
0.1262015849351883,
-0.12603750824928284,
0.05120332911610603,
-0.2906244993209839,
0.022035159170627594,
0.448099285364151,
0.11024507135152817,
-0.008791772648692131,
0.21246546506881714,
0.013971421867609024,
0.30608829855918884,
0.04166557267308235,
0.21448448300361633,
-0.03469454124569893,
0.17872604727745056,
-0.045640990138053894,
0.6495579481124878,
-0.14180046319961548,
-0.38593488931655884,
0.1767016500234604,
-0.1262180656194687,
-0.17933616042137146,
-0.00940673053264618,
-0.3002760112285614,
-0.003125453134998679,
-0.2587316632270813,
-0.0353839248418808,
0.0021562501788139343,
-0.2854905128479004,
-0.32541418075561523,
-0.18113823235034943,
0.13426688313484192,
-0.1632562279701233,
-0.3281495273113251,
0.3672776222229004,
-0.2507420778274536,
0.2550690174102783,
-0.15651372075080872,
-0.14477157592773438,
-0.1669241487979889,
-0.4364984631538391,
-0.03023330681025982,
0.19782334566116333,
-0.2999420762062073,
0.02716180309653282,
-0.5152041912078857,
-0.236068457365036,
-0.1595631241798401,
0.08459796011447906,
0.3666800260543823,
0.5396208763122559,
0.030301038175821304,
0.034953273832798004,
0.08058568835258484,
0.10107032209634781,
0.41064178943634033,
0.18398244678974152,
-0.07503245770931244,
0.18558603525161743,
0.1655878722667694,
-0.35793617367744446,
-0.28352120518684387,
-0.5400987267494202,
-0.08220431953668594,
0.252879798412323,
0.09672657400369644,
-0.2896074950695038,
-0.24265071749687195,
0.22253456711769104,
0.04142904654145241,
-0.2890588343143463,
-0.04357591271400452,
0.01720919832587242,
-0.23117303848266602,
-0.20426009595394135,
0.10622568428516388,
0.2091032862663269,
0.38879045844078064,
-0.2306029349565506,
-0.10891975462436676,
0.018064573407173157,
0.20605623722076416,
0.17588120698928833,
-0.0173781868070364,
0.12107264995574951,
-0.12726356089115143,
-0.2719097137451172,
-0.2843085825443268,
0.22120030224323273,
0.12467492371797562,
0.4509957730770111,
0.11753085255622864,
-0.3715094029903412,
0.1879754364490509,
-0.057256538420915604,
0.340912789106369,
0.007406607270240784,
-0.11040902882814407,
0.34728294610977173,
0.1715257316827774,
0.3176766633987427,
0.09935840219259262,
-0.028953395783901215,
0.26587313413619995,
-0.07713234424591064,
-0.4949769079685211,
-0.04186218976974487,
0.27453336119651794,
-0.07302429527044296,
-0.0733686238527298,
-0.02415122091770172,
-0.209478959441185,
-0.2615412771701813,
0.4185965657234192,
0.3421195447444916,
1.0206489562988281,
-0.2603800296783447,
0.3446720540523529,
0.10921036452054977,
-0.060601480305194855,
0.49505680799484253,
-0.15399694442749023,
0.1934904009103775,
-0.5524522662162781,
0.04724026843905449,
-0.11169172078371048,
-0.19717247784137726,
-0.1783650815486908,
0.34370511770248413,
-0.3830956220626831,
0.13299895823001862,
-0.09648330509662628,
0.1960601955652237,
0.14222756028175354,
0.31962889432907104,
0.20939426124095917,
-0.20901517570018768,
-0.23682478070259094,
-0.003560660406947136,
-0.4814990758895874,
-0.09908919036388397,
-0.03797366842627525,
-0.2874804735183716,
-0.00013706833124160767,
-0.3918529152870178,
-0.20003628730773926,
0.19048914313316345,
-0.29227739572525024,
0.3384348750114441,
0.5059813261032104,
-0.10644374787807465,
0.22281327843666077,
0.19872711598873138,
0.3068525195121765,
-0.045633796602487564,
0.06118910014629364,
-0.27032405138015747,
-0.06260416656732559,
0.11660388112068176,
-0.057284824550151825,
-0.05342921242117882,
0.4100272059440613,
-0.04768291488289833,
-0.3138558864593506,
0.3178364634513855,
0.014437335543334484,
-0.17577092349529266,
0.15726935863494873,
-0.067201629281044,
0.08750443160533905,
-0.41170570254325867,
0.27144864201545715,
-0.21885740756988525,
-0.31851083040237427,
-0.26868340373039246,
0.003916214220225811,
0.018921010196208954,
-0.12270354479551315,
0.10436993837356567,
0.31816980242729187,
0.014800339937210083,
0.14292530715465546,
0.16663622856140137,
0.2979535758495331,
0.22282752394676208,
0.5636559724807739,
0.3159727454185486,
0.011753320693969727,
-0.20831474661827087,
0.1311718225479126,
0.006909423507750034,
-0.8838167786598206,
0.19761759042739868,
-0.03138064220547676,
-0.2637524902820587,
0.21239115297794342,
0.37532779574394226,
0.1270447075366974,
0.4987851083278656,
-0.17407982051372528,
-0.424702525138855,
-0.3973771333694458,
0.006599500775337219,
0.174264058470726,
0.0011970847845077515,
0.0514228418469429,
0.5306834578514099,
0.19821935892105103,
0.15471722185611725,
-0.2049756944179535,
0.18318019807338715,
-0.3399905264377594,
0.25543928146362305,
-0.11082524061203003,
-0.41956207156181335,
-0.03815194219350815,
0.12543199956417084,
0.04387335479259491,
0.0017527155578136444,
0.09149196743965149,
-0.054966703057289124,
-0.18266500532627106,
0.17931437492370605,
0.27356216311454773,
-0.20960849523544312,
-0.20473991334438324,
-0.004650816321372986,
-0.02193005383014679,
0.10297376662492752,
-0.0729960948228836,
0.00789722055196762,
-0.15854842960834503,
0.549696683883667,
-0.09683722257614136,
-0.07829498499631882,
-0.321249783039093,
0.03207146376371384,
-0.23294594883918762,
-0.05529676377773285,
0.17893609404563904,
0.2310502976179123,
0.14143411815166473,
-0.16718903183937073,
-0.7330247163772583,
0.14692364633083344,
0.2807041108608246,
-0.07894819974899292,
0.2824501097202301,
-0.6361717581748962,
-0.2515563666820526,
-0.12406904995441437,
0.058936625719070435,
0.01782314106822014,
-0.29064345359802246,
-0.11902442574501038,
0.15008515119552612,
0.07920800894498825,
-0.22283446788787842,
-0.21998175978660583,
-0.007126742973923683,
-0.15680719912052155,
-0.18953169882297516,
0.4388341009616852,
0.05041131004691124,
-0.17817392945289612,
-0.09514656662940979,
0.020867332816123962,
0.1502608209848404,
-0.10834331810474396,
0.0020460509695112705,
0.5980406999588013,
-0.13318146765232086,
-0.02910071238875389,
0.456070214509964,
-0.001709073781967163,
-0.08082757145166397,
0.011111222207546234,
-0.24031901359558105,
0.10640877485275269,
-0.1864721179008484,
0.028415899723768234,
0.2730589210987091,
0.0053153447806835175,
-0.16144342720508575,
0.11166632175445557,
0.01803424209356308,
-0.14061081409454346,
-0.20857888460159302,
0.5285695791244507,
-0.1294042468070984,
-0.11113128066062927,
-0.20984983444213867,
0.25221896171569824,
-0.2701117694377899,
0.004977590404450893,
-0.13915228843688965,
-0.07524175196886063,
-0.17433515191078186,
-0.21616902947425842,
-0.19599811732769012,
0.10436327755451202,
0.2675894796848297,
0.2678266167640686,
0.17319387197494507,
-0.292314350605011,
0.010725192725658417,
0.4745837152004242,
0.08574096858501434,
-0.2254718691110611,
0.4008435904979706,
0.32856231927871704,
-0.09891852736473083,
0.024350197985768318,
0.34102532267570496,
0.5116844177246094,
0.5268765091896057,
-0.27554047107696533,
0.029622260481119156,
0.09985306859016418,
-0.1723218411207199,
0.3009313642978668,
0.12202691286802292,
0.5902808904647827,
0.15899984538555145,
0.13224413990974426,
-0.023708293214440346,
-0.02508227899670601,
0.23306448757648468,
-0.036525119096040726,
0.19096454977989197,
0.08038115501403809,
0.6249294281005859,
0.23981918394565582,
-0.35915854573249817,
-0.1490706205368042,
0.08431816846132278,
-0.4341332018375397,
0.005539947655051947,
0.46048471331596375,
-0.049365922808647156,
0.28800010681152344,
-0.06462600827217102,
-0.026343977078795433,
0.15817265212535858,
0.6270228624343872,
0.23330338299274445,
0.2689681649208069,
-0.34173452854156494,
0.11560580134391785,
-0.32565122842788696,
0.30072662234306335,
-0.0014743059873580933,
-0.08987303078174591,
0.07919662445783615,
0.0009102541953325272,
0.05939766392111778,
0.1766049563884735,
0.1285301148891449,
0.07680471986532211,
-0.14709264039993286,
0.23895122110843658,
-0.16914226114749908,
0.02404322475194931,
0.0808025449514389,
0.22791309654712677,
-0.0594039112329483,
-0.32999187707901,
0.217532217502594,
0.10713180899620056,
-0.019447198137640953,
-0.07325653731822968,
0.054049037396907806,
0.12301939725875854,
0.1730819195508957,
0.10390540212392807,
0.034520141780376434,
0.5826875567436218,
0.12415967136621475,
-0.06382731348276138,
0.3305566608905792,
-0.1148175522685051,
-0.17466218769550323,
0.16456231474876404,
0.24761907756328583,
0.6241377592086792,
-0.03434651345014572,
0.25568875670433044,
-0.44834673404693604,
-0.21278731524944305,
-0.026163244619965553,
0.07279698550701141,
-0.25804615020751953,
0.2388155460357666,
-0.2617354393005371,
-0.03231417015194893,
0.3202947974205017,
-0.006378062069416046,
0.29820191860198975,
0.09396368265151978,
-0.4200735092163086,
-0.46412184834480286,
0.3670327067375183,
-0.2881059944629669,
-0.23062849044799805,
-0.14516982436180115,
0.11228165775537491,
0.03078039363026619,
0.08315202593803406,
-0.6610729694366455,
-0.009856000542640686,
0.33231374621391296,
-0.026302561163902283,
-0.22136369347572327,
-0.1205214411020279,
0.01226385124027729,
0.18510191142559052,
-0.0976044237613678,
0.27065566182136536,
-0.09607880562543869,
-0.06466731429100037,
-0.45411038398742676,
-0.1759287714958191
] |
https://github.com/huggingface/datasets/issues/469 | invalid data type 'str' at _convert_outputs in arrow_dataset.py | Hi, actually the thing is I am getting the same error and even after tokenizing them I am passing them through batch_encode_plus.
I dont know what seems to be the problem is. I even converted it into 'pt' while passing them through batch_encode_plus but when I am evaluating my model , i am getting this error
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-145-ca218223c9fc> in <module>()
----> 1 val_loss, predictions, true_val = evaluate(dataloader_validation)
2 val_f1 = f1_score_func(predictions, true_val)
3 tqdm.write(f'Validation loss: {val_loss}')
4 tqdm.write(f'F1 Score (Weighted): {val_f1}')
6 frames
/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py in <genexpr>(.0)
160
161 def __getitem__(self, index):
--> 162 return tuple(tensor[index] for tensor in self.tensors)
163
164 def __len__(self):
TypeError: new(): invalid data type 'str' | I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
| 115 | invalid data type 'str' at _convert_outputs in arrow_dataset.py
I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
Hi, actually the thing is I am getting the same error and even after tokenizing them I am passing them through batch_encode_plus.
I dont know what seems to be the problem is. I even converted it into 'pt' while passing them through batch_encode_plus but when I am evaluating my model , i am getting this error
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-145-ca218223c9fc> in <module>()
----> 1 val_loss, predictions, true_val = evaluate(dataloader_validation)
2 val_f1 = f1_score_func(predictions, true_val)
3 tqdm.write(f'Validation loss: {val_loss}')
4 tqdm.write(f'F1 Score (Weighted): {val_f1}')
6 frames
/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py in <genexpr>(.0)
160
161 def __getitem__(self, index):
--> 162 return tuple(tensor[index] for tensor in self.tensors)
163
164 def __len__(self):
TypeError: new(): invalid data type 'str' | [
-0.22282423079013824,
0.0242498517036438,
0.10737143456935883,
0.23030735552310944,
0.5109532475471497,
-0.10725988447666168,
0.5323296785354614,
0.07759007066488266,
-0.3410622179508209,
-0.12477622926235199,
0.03665751963853836,
0.3864072561264038,
-0.36969560384750366,
0.04221787303686142,
0.044361963868141174,
-0.20246389508247375,
-0.08803478628396988,
0.009990029036998749,
-0.023253224790096283,
-0.053638752549886703,
0.048243701457977295,
0.1829802691936493,
-0.15682613849639893,
0.41447722911834717,
-0.6451312303543091,
-0.18357887864112854,
0.1746635138988495,
-0.09639310091733932,
-0.09922074526548386,
-0.4487784206867218,
0.220274418592453,
-0.10204379260540009,
0.4976370632648468,
0.3472318649291992,
-0.00012417120160534978,
0.1380361169576645,
0.10928584635257721,
0.10169471800327301,
-0.29087236523628235,
-0.30163735151290894,
0.1341148316860199,
-0.059384919703006744,
0.4149942100048065,
-0.20153865218162537,
-0.05718964338302612,
-0.2600911855697632,
-0.060625821352005005,
0.26176899671554565,
0.38377517461776733,
0.50169837474823,
0.11732207238674164,
0.1685168743133545,
0.24648545682430267,
0.0738130733370781,
0.25956377387046814,
0.3155062198638916,
0.07547704875469208,
0.20712392032146454,
0.016833975911140442,
0.02660526894032955,
-0.08569470793008804,
0.07480783760547638,
-0.07012821733951569,
-0.1997741311788559,
0.21665853261947632,
0.22728331387043,
0.17457899451255798,
-0.1476219743490219,
-0.2287851870059967,
0.1198839545249939,
0.43321576714515686,
-0.3214258551597595,
-0.1559446156024933,
0.007921472191810608,
-0.011162050068378448,
-0.2727990746498108,
-0.006166972219944,
0.2483309805393219,
-0.427776962518692,
0.1667020469903946,
-0.16226062178611755,
-0.025466760620474815,
-0.37924978137016296,
0.19955646991729736,
-0.09251793473958969,
0.5032633543014526,
0.1183696985244751,
0.15681657195091248,
0.18424028158187866,
-0.014435779303312302,
0.3717096149921417,
0.08763837814331055,
0.13975468277931213,
0.06214795634150505,
-0.3116944134235382,
-0.030463935807347298,
-0.4463334083557129,
-0.6483628749847412,
-0.26851481199264526,
-0.21252353489398956,
0.1655777245759964,
-0.07115250825881958,
0.20472681522369385,
0.20295047760009766,
0.23332253098487854,
0.1388004571199417,
-0.21012336015701294,
0.5648383498191833,
0.10009295493364334,
-0.15525054931640625,
-0.133545383810997,
-0.025088563561439514,
-0.328238844871521,
-0.09228966385126114,
0.5121245384216309,
0.16284039616584778,
0.1257425993680954,
-0.005032282322645187,
-0.055022820830345154,
-0.14883305132389069,
-0.2688642144203186,
-0.08821725845336914,
0.2847146987915039,
0.18506914377212524,
0.0958356037735939,
0.383222371339798,
0.21541951596736908,
0.11113576591014862,
0.0493788868188858,
-0.13524369895458221,
0.03532237187027931,
0.08555611968040466,
-0.21797096729278564,
-0.11981739848852158,
0.1821131706237793,
0.32819798588752747,
-0.269904226064682,
0.12150130420923233,
-0.14253613352775574,
-0.208536759018898,
0.0015713851898908615,
-0.2935895323753357,
-0.005307510495185852,
0.013497423380613327,
-0.25748389959335327,
0.309787392616272,
0.09357458353042603,
-0.30359354615211487,
0.019634298980236053,
0.46777206659317017,
-0.4638134241104126,
-0.4341682493686676,
-0.4358201026916504,
0.08996038138866425,
0.3708471655845642,
-0.11298754811286926,
-0.09231018275022507,
0.05973508208990097,
0.4520862400531769,
-0.18882568180561066,
0.10294705629348755,
-0.579759955406189,
0.3521028161048889,
-0.015292652882635593,
-0.08329926431179047,
0.09054681658744812,
-0.4035293161869049,
-0.18164736032485962,
0.16967111825942993,
-0.15330366790294647,
0.31111302971839905,
0.4423997104167938,
-0.38276052474975586,
0.29479148983955383,
0.07952729612588882,
0.01669318974018097,
0.8023683428764343,
-0.3571903705596924,
-0.21795889735221863,
0.13225509226322174,
-0.17044910788536072,
-0.3259192109107971,
-0.07707250863313675,
0.27369797229766846,
0.09063044935464859,
0.07179877161979675,
-0.009402886033058167,
0.391426682472229,
-0.09331520646810532,
0.2531605660915375,
-0.3342474102973938,
-0.07499263435602188,
0.3700166344642639,
0.3320883810520172,
0.2507389783859253,
-0.03353755176067352,
0.06653157621622086,
0.342216432094574,
0.2596173882484436,
-0.14549671113491058,
0.2384006530046463,
0.16183403134346008,
0.018355172127485275,
-0.1759248524904251,
-0.10522495955228806,
-0.16064628958702087,
-0.30508846044540405,
-0.20202073454856873,
-0.3353252112865448,
0.4843747913837433,
-0.23949791491031647,
0.08094942569732666,
-0.16291120648384094,
-0.07293787598609924,
-0.1123218983411789,
0.23905354738235474,
0.10807839035987854,
0.08143849670886993,
-0.14365513622760773,
-0.0689878836274147,
-0.1000492125749588,
-0.06188848614692688,
-0.05237250775098801,
0.1880999505519867,
0.02513740211725235,
0.27322739362716675,
-0.16910044848918915,
-0.1986376792192459,
-0.26017463207244873,
0.05643289163708687,
0.2558158338069916,
0.09606233239173889,
-0.2582111656665802,
0.2561085820198059,
-0.14479242265224457,
-0.2581230401992798,
-0.30881190299987793,
0.3103089928627014,
0.15540990233421326,
-0.5250990986824036,
0.03694210946559906,
0.16145145893096924,
0.16632096469402313,
-0.0896117314696312,
0.14196765422821045,
0.13636313378810883,
0.06864230334758759,
0.13800722360610962,
-0.004035290330648422,
0.36933788657188416,
0.2155340313911438,
-0.04095647484064102,
0.2696603834629059,
0.049553148448467255,
-0.12011763453483582,
-0.16362632811069489,
0.11930280923843384,
0.03172415867447853,
-0.290544718503952,
-0.019627436995506287,
0.4356467127799988,
-0.15255612134933472,
0.24142277240753174,
0.44143083691596985,
-0.11877404898405075,
-0.02535412088036537,
-0.18716178834438324,
0.21855880320072174,
0.14079920947551727,
-0.026811841875314713,
-0.08513769507408142,
-0.005383547395467758,
-0.2538854777812958,
-0.06525124609470367,
0.3296319842338562,
-0.1268233209848404,
0.4315141439437866,
0.1532037854194641,
0.2892070412635803,
-0.01847047731280327,
-0.05140719190239906,
-0.2919021248817444,
0.2905481159687042,
0.25433409214019775,
-0.23410165309906006,
0.415740430355072,
-0.10252450406551361,
-0.21352696418762207,
-0.6377741694450378,
-0.37067940831184387,
-0.08373959362506866,
-0.13306309282779694,
-0.04485947638750076,
-0.0630304217338562,
0.16435343027114868,
0.061436109244823456,
0.07715995609760284,
-0.06676118075847626,
0.2787645757198334,
-0.18456237018108368,
0.10622963309288025,
-0.33188295364379883,
-0.3990285396575928,
-0.019308118149638176,
0.23811917006969452,
0.01827249489724636,
-0.11488112807273865,
0.0174302589148283,
-0.046467944979667664,
-0.07560288161039352,
-0.1490136682987213,
0.11283780634403229,
-0.01411139965057373,
-0.1526143103837967,
0.13773296773433685,
-0.02533257007598877,
-0.2624073028564453,
-0.22783571481704712,
0.3238840103149414,
-0.32887303829193115,
0.004554146900773048,
0.45673561096191406,
-0.18968376517295837,
-0.05533435568213463,
-0.05129353702068329,
-0.3140719532966614,
-0.581460177898407,
-0.053909800946712494,
0.017290711402893066,
0.034301478415727615,
0.32963305711746216,
0.34804239869117737,
0.030773989856243134,
0.1842593550682068,
0.03400556370615959,
-0.0598001703619957,
0.08541790395975113,
0.11920306086540222,
0.31462550163269043,
-0.03845174238085747,
-0.2886618971824646,
-0.34714624285697937,
-0.11079138517379761,
0.07097923755645752,
0.07621534913778305,
-0.3193144202232361,
0.1262015849351883,
-0.12603750824928284,
0.05120332911610603,
-0.2906244993209839,
0.022035159170627594,
0.448099285364151,
0.11024507135152817,
-0.008791772648692131,
0.21246546506881714,
0.013971421867609024,
0.30608829855918884,
0.04166557267308235,
0.21448448300361633,
-0.03469454124569893,
0.17872604727745056,
-0.045640990138053894,
0.6495579481124878,
-0.14180046319961548,
-0.38593488931655884,
0.1767016500234604,
-0.1262180656194687,
-0.17933616042137146,
-0.00940673053264618,
-0.3002760112285614,
-0.003125453134998679,
-0.2587316632270813,
-0.0353839248418808,
0.0021562501788139343,
-0.2854905128479004,
-0.32541418075561523,
-0.18113823235034943,
0.13426688313484192,
-0.1632562279701233,
-0.3281495273113251,
0.3672776222229004,
-0.2507420778274536,
0.2550690174102783,
-0.15651372075080872,
-0.14477157592773438,
-0.1669241487979889,
-0.4364984631538391,
-0.03023330681025982,
0.19782334566116333,
-0.2999420762062073,
0.02716180309653282,
-0.5152041912078857,
-0.236068457365036,
-0.1595631241798401,
0.08459796011447906,
0.3666800260543823,
0.5396208763122559,
0.030301038175821304,
0.034953273832798004,
0.08058568835258484,
0.10107032209634781,
0.41064178943634033,
0.18398244678974152,
-0.07503245770931244,
0.18558603525161743,
0.1655878722667694,
-0.35793617367744446,
-0.28352120518684387,
-0.5400987267494202,
-0.08220431953668594,
0.252879798412323,
0.09672657400369644,
-0.2896074950695038,
-0.24265071749687195,
0.22253456711769104,
0.04142904654145241,
-0.2890588343143463,
-0.04357591271400452,
0.01720919832587242,
-0.23117303848266602,
-0.20426009595394135,
0.10622568428516388,
0.2091032862663269,
0.38879045844078064,
-0.2306029349565506,
-0.10891975462436676,
0.018064573407173157,
0.20605623722076416,
0.17588120698928833,
-0.0173781868070364,
0.12107264995574951,
-0.12726356089115143,
-0.2719097137451172,
-0.2843085825443268,
0.22120030224323273,
0.12467492371797562,
0.4509957730770111,
0.11753085255622864,
-0.3715094029903412,
0.1879754364490509,
-0.057256538420915604,
0.340912789106369,
0.007406607270240784,
-0.11040902882814407,
0.34728294610977173,
0.1715257316827774,
0.3176766633987427,
0.09935840219259262,
-0.028953395783901215,
0.26587313413619995,
-0.07713234424591064,
-0.4949769079685211,
-0.04186218976974487,
0.27453336119651794,
-0.07302429527044296,
-0.0733686238527298,
-0.02415122091770172,
-0.209478959441185,
-0.2615412771701813,
0.4185965657234192,
0.3421195447444916,
1.0206489562988281,
-0.2603800296783447,
0.3446720540523529,
0.10921036452054977,
-0.060601480305194855,
0.49505680799484253,
-0.15399694442749023,
0.1934904009103775,
-0.5524522662162781,
0.04724026843905449,
-0.11169172078371048,
-0.19717247784137726,
-0.1783650815486908,
0.34370511770248413,
-0.3830956220626831,
0.13299895823001862,
-0.09648330509662628,
0.1960601955652237,
0.14222756028175354,
0.31962889432907104,
0.20939426124095917,
-0.20901517570018768,
-0.23682478070259094,
-0.003560660406947136,
-0.4814990758895874,
-0.09908919036388397,
-0.03797366842627525,
-0.2874804735183716,
-0.00013706833124160767,
-0.3918529152870178,
-0.20003628730773926,
0.19048914313316345,
-0.29227739572525024,
0.3384348750114441,
0.5059813261032104,
-0.10644374787807465,
0.22281327843666077,
0.19872711598873138,
0.3068525195121765,
-0.045633796602487564,
0.06118910014629364,
-0.27032405138015747,
-0.06260416656732559,
0.11660388112068176,
-0.057284824550151825,
-0.05342921242117882,
0.4100272059440613,
-0.04768291488289833,
-0.3138558864593506,
0.3178364634513855,
0.014437335543334484,
-0.17577092349529266,
0.15726935863494873,
-0.067201629281044,
0.08750443160533905,
-0.41170570254325867,
0.27144864201545715,
-0.21885740756988525,
-0.31851083040237427,
-0.26868340373039246,
0.003916214220225811,
0.018921010196208954,
-0.12270354479551315,
0.10436993837356567,
0.31816980242729187,
0.014800339937210083,
0.14292530715465546,
0.16663622856140137,
0.2979535758495331,
0.22282752394676208,
0.5636559724807739,
0.3159727454185486,
0.011753320693969727,
-0.20831474661827087,
0.1311718225479126,
0.006909423507750034,
-0.8838167786598206,
0.19761759042739868,
-0.03138064220547676,
-0.2637524902820587,
0.21239115297794342,
0.37532779574394226,
0.1270447075366974,
0.4987851083278656,
-0.17407982051372528,
-0.424702525138855,
-0.3973771333694458,
0.006599500775337219,
0.174264058470726,
0.0011970847845077515,
0.0514228418469429,
0.5306834578514099,
0.19821935892105103,
0.15471722185611725,
-0.2049756944179535,
0.18318019807338715,
-0.3399905264377594,
0.25543928146362305,
-0.11082524061203003,
-0.41956207156181335,
-0.03815194219350815,
0.12543199956417084,
0.04387335479259491,
0.0017527155578136444,
0.09149196743965149,
-0.054966703057289124,
-0.18266500532627106,
0.17931437492370605,
0.27356216311454773,
-0.20960849523544312,
-0.20473991334438324,
-0.004650816321372986,
-0.02193005383014679,
0.10297376662492752,
-0.0729960948228836,
0.00789722055196762,
-0.15854842960834503,
0.549696683883667,
-0.09683722257614136,
-0.07829498499631882,
-0.321249783039093,
0.03207146376371384,
-0.23294594883918762,
-0.05529676377773285,
0.17893609404563904,
0.2310502976179123,
0.14143411815166473,
-0.16718903183937073,
-0.7330247163772583,
0.14692364633083344,
0.2807041108608246,
-0.07894819974899292,
0.2824501097202301,
-0.6361717581748962,
-0.2515563666820526,
-0.12406904995441437,
0.058936625719070435,
0.01782314106822014,
-0.29064345359802246,
-0.11902442574501038,
0.15008515119552612,
0.07920800894498825,
-0.22283446788787842,
-0.21998175978660583,
-0.007126742973923683,
-0.15680719912052155,
-0.18953169882297516,
0.4388341009616852,
0.05041131004691124,
-0.17817392945289612,
-0.09514656662940979,
0.020867332816123962,
0.1502608209848404,
-0.10834331810474396,
0.0020460509695112705,
0.5980406999588013,
-0.13318146765232086,
-0.02910071238875389,
0.456070214509964,
-0.001709073781967163,
-0.08082757145166397,
0.011111222207546234,
-0.24031901359558105,
0.10640877485275269,
-0.1864721179008484,
0.028415899723768234,
0.2730589210987091,
0.0053153447806835175,
-0.16144342720508575,
0.11166632175445557,
0.01803424209356308,
-0.14061081409454346,
-0.20857888460159302,
0.5285695791244507,
-0.1294042468070984,
-0.11113128066062927,
-0.20984983444213867,
0.25221896171569824,
-0.2701117694377899,
0.004977590404450893,
-0.13915228843688965,
-0.07524175196886063,
-0.17433515191078186,
-0.21616902947425842,
-0.19599811732769012,
0.10436327755451202,
0.2675894796848297,
0.2678266167640686,
0.17319387197494507,
-0.292314350605011,
0.010725192725658417,
0.4745837152004242,
0.08574096858501434,
-0.2254718691110611,
0.4008435904979706,
0.32856231927871704,
-0.09891852736473083,
0.024350197985768318,
0.34102532267570496,
0.5116844177246094,
0.5268765091896057,
-0.27554047107696533,
0.029622260481119156,
0.09985306859016418,
-0.1723218411207199,
0.3009313642978668,
0.12202691286802292,
0.5902808904647827,
0.15899984538555145,
0.13224413990974426,
-0.023708293214440346,
-0.02508227899670601,
0.23306448757648468,
-0.036525119096040726,
0.19096454977989197,
0.08038115501403809,
0.6249294281005859,
0.23981918394565582,
-0.35915854573249817,
-0.1490706205368042,
0.08431816846132278,
-0.4341332018375397,
0.005539947655051947,
0.46048471331596375,
-0.049365922808647156,
0.28800010681152344,
-0.06462600827217102,
-0.026343977078795433,
0.15817265212535858,
0.6270228624343872,
0.23330338299274445,
0.2689681649208069,
-0.34173452854156494,
0.11560580134391785,
-0.32565122842788696,
0.30072662234306335,
-0.0014743059873580933,
-0.08987303078174591,
0.07919662445783615,
0.0009102541953325272,
0.05939766392111778,
0.1766049563884735,
0.1285301148891449,
0.07680471986532211,
-0.14709264039993286,
0.23895122110843658,
-0.16914226114749908,
0.02404322475194931,
0.0808025449514389,
0.22791309654712677,
-0.0594039112329483,
-0.32999187707901,
0.217532217502594,
0.10713180899620056,
-0.019447198137640953,
-0.07325653731822968,
0.054049037396907806,
0.12301939725875854,
0.1730819195508957,
0.10390540212392807,
0.034520141780376434,
0.5826875567436218,
0.12415967136621475,
-0.06382731348276138,
0.3305566608905792,
-0.1148175522685051,
-0.17466218769550323,
0.16456231474876404,
0.24761907756328583,
0.6241377592086792,
-0.03434651345014572,
0.25568875670433044,
-0.44834673404693604,
-0.21278731524944305,
-0.026163244619965553,
0.07279698550701141,
-0.25804615020751953,
0.2388155460357666,
-0.2617354393005371,
-0.03231417015194893,
0.3202947974205017,
-0.006378062069416046,
0.29820191860198975,
0.09396368265151978,
-0.4200735092163086,
-0.46412184834480286,
0.3670327067375183,
-0.2881059944629669,
-0.23062849044799805,
-0.14516982436180115,
0.11228165775537491,
0.03078039363026619,
0.08315202593803406,
-0.6610729694366455,
-0.009856000542640686,
0.33231374621391296,
-0.026302561163902283,
-0.22136369347572327,
-0.1205214411020279,
0.01226385124027729,
0.18510191142559052,
-0.0976044237613678,
0.27065566182136536,
-0.09607880562543869,
-0.06466731429100037,
-0.45411038398742676,
-0.1759287714958191
] |
https://github.com/huggingface/datasets/issues/469 | invalid data type 'str' at _convert_outputs in arrow_dataset.py | > Hi, actually the thing is I am getting the same error and even after tokenizing them I am passing them through batch_encode_plus.
> I dont know what seems to be the problem is. I even converted it into 'pt' while passing them through batch_encode_plus but when I am evaluating my model , i am getting this error
>
> TypeError Traceback (most recent call last)
> in ()
> ----> 1 val_loss, predictions, true_val = evaluate(dataloader_validation)
> 2 val_f1 = f1_score_func(predictions, true_val)
> 3 tqdm.write(f'Validation loss: {val_loss}')
> 4 tqdm.write(f'F1 Score (Weighted): {val_f1}')
>
> 6 frames
> /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py in (.0)
> 160
> 161 def **getitem**(self, index):
> --> 162 return tuple(tensor[index] for tensor in self.tensors)
> 163
> 164 def **len**(self):
>
> TypeError: new(): invalid data type 'str'
I got the same error and fix it .
you can check your input where there may be string contained.
such as
```
a = [1,2,3,4,'<unk>']
torch.tensor(a)
``` | I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
| 160 | invalid data type 'str' at _convert_outputs in arrow_dataset.py
I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
> Hi, actually the thing is I am getting the same error and even after tokenizing them I am passing them through batch_encode_plus.
> I dont know what seems to be the problem is. I even converted it into 'pt' while passing them through batch_encode_plus but when I am evaluating my model , i am getting this error
>
> TypeError Traceback (most recent call last)
> in ()
> ----> 1 val_loss, predictions, true_val = evaluate(dataloader_validation)
> 2 val_f1 = f1_score_func(predictions, true_val)
> 3 tqdm.write(f'Validation loss: {val_loss}')
> 4 tqdm.write(f'F1 Score (Weighted): {val_f1}')
>
> 6 frames
> /usr/local/lib/python3.6/dist-packages/torch/utils/data/dataset.py in (.0)
> 160
> 161 def **getitem**(self, index):
> --> 162 return tuple(tensor[index] for tensor in self.tensors)
> 163
> 164 def **len**(self):
>
> TypeError: new(): invalid data type 'str'
I got the same error and fix it .
you can check your input where there may be string contained.
such as
```
a = [1,2,3,4,'<unk>']
torch.tensor(a)
``` | [
-0.22282423079013824,
0.0242498517036438,
0.10737143456935883,
0.23030735552310944,
0.5109532475471497,
-0.10725988447666168,
0.5323296785354614,
0.07759007066488266,
-0.3410622179508209,
-0.12477622926235199,
0.03665751963853836,
0.3864072561264038,
-0.36969560384750366,
0.04221787303686142,
0.044361963868141174,
-0.20246389508247375,
-0.08803478628396988,
0.009990029036998749,
-0.023253224790096283,
-0.053638752549886703,
0.048243701457977295,
0.1829802691936493,
-0.15682613849639893,
0.41447722911834717,
-0.6451312303543091,
-0.18357887864112854,
0.1746635138988495,
-0.09639310091733932,
-0.09922074526548386,
-0.4487784206867218,
0.220274418592453,
-0.10204379260540009,
0.4976370632648468,
0.3472318649291992,
-0.00012417120160534978,
0.1380361169576645,
0.10928584635257721,
0.10169471800327301,
-0.29087236523628235,
-0.30163735151290894,
0.1341148316860199,
-0.059384919703006744,
0.4149942100048065,
-0.20153865218162537,
-0.05718964338302612,
-0.2600911855697632,
-0.060625821352005005,
0.26176899671554565,
0.38377517461776733,
0.50169837474823,
0.11732207238674164,
0.1685168743133545,
0.24648545682430267,
0.0738130733370781,
0.25956377387046814,
0.3155062198638916,
0.07547704875469208,
0.20712392032146454,
0.016833975911140442,
0.02660526894032955,
-0.08569470793008804,
0.07480783760547638,
-0.07012821733951569,
-0.1997741311788559,
0.21665853261947632,
0.22728331387043,
0.17457899451255798,
-0.1476219743490219,
-0.2287851870059967,
0.1198839545249939,
0.43321576714515686,
-0.3214258551597595,
-0.1559446156024933,
0.007921472191810608,
-0.011162050068378448,
-0.2727990746498108,
-0.006166972219944,
0.2483309805393219,
-0.427776962518692,
0.1667020469903946,
-0.16226062178611755,
-0.025466760620474815,
-0.37924978137016296,
0.19955646991729736,
-0.09251793473958969,
0.5032633543014526,
0.1183696985244751,
0.15681657195091248,
0.18424028158187866,
-0.014435779303312302,
0.3717096149921417,
0.08763837814331055,
0.13975468277931213,
0.06214795634150505,
-0.3116944134235382,
-0.030463935807347298,
-0.4463334083557129,
-0.6483628749847412,
-0.26851481199264526,
-0.21252353489398956,
0.1655777245759964,
-0.07115250825881958,
0.20472681522369385,
0.20295047760009766,
0.23332253098487854,
0.1388004571199417,
-0.21012336015701294,
0.5648383498191833,
0.10009295493364334,
-0.15525054931640625,
-0.133545383810997,
-0.025088563561439514,
-0.328238844871521,
-0.09228966385126114,
0.5121245384216309,
0.16284039616584778,
0.1257425993680954,
-0.005032282322645187,
-0.055022820830345154,
-0.14883305132389069,
-0.2688642144203186,
-0.08821725845336914,
0.2847146987915039,
0.18506914377212524,
0.0958356037735939,
0.383222371339798,
0.21541951596736908,
0.11113576591014862,
0.0493788868188858,
-0.13524369895458221,
0.03532237187027931,
0.08555611968040466,
-0.21797096729278564,
-0.11981739848852158,
0.1821131706237793,
0.32819798588752747,
-0.269904226064682,
0.12150130420923233,
-0.14253613352775574,
-0.208536759018898,
0.0015713851898908615,
-0.2935895323753357,
-0.005307510495185852,
0.013497423380613327,
-0.25748389959335327,
0.309787392616272,
0.09357458353042603,
-0.30359354615211487,
0.019634298980236053,
0.46777206659317017,
-0.4638134241104126,
-0.4341682493686676,
-0.4358201026916504,
0.08996038138866425,
0.3708471655845642,
-0.11298754811286926,
-0.09231018275022507,
0.05973508208990097,
0.4520862400531769,
-0.18882568180561066,
0.10294705629348755,
-0.579759955406189,
0.3521028161048889,
-0.015292652882635593,
-0.08329926431179047,
0.09054681658744812,
-0.4035293161869049,
-0.18164736032485962,
0.16967111825942993,
-0.15330366790294647,
0.31111302971839905,
0.4423997104167938,
-0.38276052474975586,
0.29479148983955383,
0.07952729612588882,
0.01669318974018097,
0.8023683428764343,
-0.3571903705596924,
-0.21795889735221863,
0.13225509226322174,
-0.17044910788536072,
-0.3259192109107971,
-0.07707250863313675,
0.27369797229766846,
0.09063044935464859,
0.07179877161979675,
-0.009402886033058167,
0.391426682472229,
-0.09331520646810532,
0.2531605660915375,
-0.3342474102973938,
-0.07499263435602188,
0.3700166344642639,
0.3320883810520172,
0.2507389783859253,
-0.03353755176067352,
0.06653157621622086,
0.342216432094574,
0.2596173882484436,
-0.14549671113491058,
0.2384006530046463,
0.16183403134346008,
0.018355172127485275,
-0.1759248524904251,
-0.10522495955228806,
-0.16064628958702087,
-0.30508846044540405,
-0.20202073454856873,
-0.3353252112865448,
0.4843747913837433,
-0.23949791491031647,
0.08094942569732666,
-0.16291120648384094,
-0.07293787598609924,
-0.1123218983411789,
0.23905354738235474,
0.10807839035987854,
0.08143849670886993,
-0.14365513622760773,
-0.0689878836274147,
-0.1000492125749588,
-0.06188848614692688,
-0.05237250775098801,
0.1880999505519867,
0.02513740211725235,
0.27322739362716675,
-0.16910044848918915,
-0.1986376792192459,
-0.26017463207244873,
0.05643289163708687,
0.2558158338069916,
0.09606233239173889,
-0.2582111656665802,
0.2561085820198059,
-0.14479242265224457,
-0.2581230401992798,
-0.30881190299987793,
0.3103089928627014,
0.15540990233421326,
-0.5250990986824036,
0.03694210946559906,
0.16145145893096924,
0.16632096469402313,
-0.0896117314696312,
0.14196765422821045,
0.13636313378810883,
0.06864230334758759,
0.13800722360610962,
-0.004035290330648422,
0.36933788657188416,
0.2155340313911438,
-0.04095647484064102,
0.2696603834629059,
0.049553148448467255,
-0.12011763453483582,
-0.16362632811069489,
0.11930280923843384,
0.03172415867447853,
-0.290544718503952,
-0.019627436995506287,
0.4356467127799988,
-0.15255612134933472,
0.24142277240753174,
0.44143083691596985,
-0.11877404898405075,
-0.02535412088036537,
-0.18716178834438324,
0.21855880320072174,
0.14079920947551727,
-0.026811841875314713,
-0.08513769507408142,
-0.005383547395467758,
-0.2538854777812958,
-0.06525124609470367,
0.3296319842338562,
-0.1268233209848404,
0.4315141439437866,
0.1532037854194641,
0.2892070412635803,
-0.01847047731280327,
-0.05140719190239906,
-0.2919021248817444,
0.2905481159687042,
0.25433409214019775,
-0.23410165309906006,
0.415740430355072,
-0.10252450406551361,
-0.21352696418762207,
-0.6377741694450378,
-0.37067940831184387,
-0.08373959362506866,
-0.13306309282779694,
-0.04485947638750076,
-0.0630304217338562,
0.16435343027114868,
0.061436109244823456,
0.07715995609760284,
-0.06676118075847626,
0.2787645757198334,
-0.18456237018108368,
0.10622963309288025,
-0.33188295364379883,
-0.3990285396575928,
-0.019308118149638176,
0.23811917006969452,
0.01827249489724636,
-0.11488112807273865,
0.0174302589148283,
-0.046467944979667664,
-0.07560288161039352,
-0.1490136682987213,
0.11283780634403229,
-0.01411139965057373,
-0.1526143103837967,
0.13773296773433685,
-0.02533257007598877,
-0.2624073028564453,
-0.22783571481704712,
0.3238840103149414,
-0.32887303829193115,
0.004554146900773048,
0.45673561096191406,
-0.18968376517295837,
-0.05533435568213463,
-0.05129353702068329,
-0.3140719532966614,
-0.581460177898407,
-0.053909800946712494,
0.017290711402893066,
0.034301478415727615,
0.32963305711746216,
0.34804239869117737,
0.030773989856243134,
0.1842593550682068,
0.03400556370615959,
-0.0598001703619957,
0.08541790395975113,
0.11920306086540222,
0.31462550163269043,
-0.03845174238085747,
-0.2886618971824646,
-0.34714624285697937,
-0.11079138517379761,
0.07097923755645752,
0.07621534913778305,
-0.3193144202232361,
0.1262015849351883,
-0.12603750824928284,
0.05120332911610603,
-0.2906244993209839,
0.022035159170627594,
0.448099285364151,
0.11024507135152817,
-0.008791772648692131,
0.21246546506881714,
0.013971421867609024,
0.30608829855918884,
0.04166557267308235,
0.21448448300361633,
-0.03469454124569893,
0.17872604727745056,
-0.045640990138053894,
0.6495579481124878,
-0.14180046319961548,
-0.38593488931655884,
0.1767016500234604,
-0.1262180656194687,
-0.17933616042137146,
-0.00940673053264618,
-0.3002760112285614,
-0.003125453134998679,
-0.2587316632270813,
-0.0353839248418808,
0.0021562501788139343,
-0.2854905128479004,
-0.32541418075561523,
-0.18113823235034943,
0.13426688313484192,
-0.1632562279701233,
-0.3281495273113251,
0.3672776222229004,
-0.2507420778274536,
0.2550690174102783,
-0.15651372075080872,
-0.14477157592773438,
-0.1669241487979889,
-0.4364984631538391,
-0.03023330681025982,
0.19782334566116333,
-0.2999420762062073,
0.02716180309653282,
-0.5152041912078857,
-0.236068457365036,
-0.1595631241798401,
0.08459796011447906,
0.3666800260543823,
0.5396208763122559,
0.030301038175821304,
0.034953273832798004,
0.08058568835258484,
0.10107032209634781,
0.41064178943634033,
0.18398244678974152,
-0.07503245770931244,
0.18558603525161743,
0.1655878722667694,
-0.35793617367744446,
-0.28352120518684387,
-0.5400987267494202,
-0.08220431953668594,
0.252879798412323,
0.09672657400369644,
-0.2896074950695038,
-0.24265071749687195,
0.22253456711769104,
0.04142904654145241,
-0.2890588343143463,
-0.04357591271400452,
0.01720919832587242,
-0.23117303848266602,
-0.20426009595394135,
0.10622568428516388,
0.2091032862663269,
0.38879045844078064,
-0.2306029349565506,
-0.10891975462436676,
0.018064573407173157,
0.20605623722076416,
0.17588120698928833,
-0.0173781868070364,
0.12107264995574951,
-0.12726356089115143,
-0.2719097137451172,
-0.2843085825443268,
0.22120030224323273,
0.12467492371797562,
0.4509957730770111,
0.11753085255622864,
-0.3715094029903412,
0.1879754364490509,
-0.057256538420915604,
0.340912789106369,
0.007406607270240784,
-0.11040902882814407,
0.34728294610977173,
0.1715257316827774,
0.3176766633987427,
0.09935840219259262,
-0.028953395783901215,
0.26587313413619995,
-0.07713234424591064,
-0.4949769079685211,
-0.04186218976974487,
0.27453336119651794,
-0.07302429527044296,
-0.0733686238527298,
-0.02415122091770172,
-0.209478959441185,
-0.2615412771701813,
0.4185965657234192,
0.3421195447444916,
1.0206489562988281,
-0.2603800296783447,
0.3446720540523529,
0.10921036452054977,
-0.060601480305194855,
0.49505680799484253,
-0.15399694442749023,
0.1934904009103775,
-0.5524522662162781,
0.04724026843905449,
-0.11169172078371048,
-0.19717247784137726,
-0.1783650815486908,
0.34370511770248413,
-0.3830956220626831,
0.13299895823001862,
-0.09648330509662628,
0.1960601955652237,
0.14222756028175354,
0.31962889432907104,
0.20939426124095917,
-0.20901517570018768,
-0.23682478070259094,
-0.003560660406947136,
-0.4814990758895874,
-0.09908919036388397,
-0.03797366842627525,
-0.2874804735183716,
-0.00013706833124160767,
-0.3918529152870178,
-0.20003628730773926,
0.19048914313316345,
-0.29227739572525024,
0.3384348750114441,
0.5059813261032104,
-0.10644374787807465,
0.22281327843666077,
0.19872711598873138,
0.3068525195121765,
-0.045633796602487564,
0.06118910014629364,
-0.27032405138015747,
-0.06260416656732559,
0.11660388112068176,
-0.057284824550151825,
-0.05342921242117882,
0.4100272059440613,
-0.04768291488289833,
-0.3138558864593506,
0.3178364634513855,
0.014437335543334484,
-0.17577092349529266,
0.15726935863494873,
-0.067201629281044,
0.08750443160533905,
-0.41170570254325867,
0.27144864201545715,
-0.21885740756988525,
-0.31851083040237427,
-0.26868340373039246,
0.003916214220225811,
0.018921010196208954,
-0.12270354479551315,
0.10436993837356567,
0.31816980242729187,
0.014800339937210083,
0.14292530715465546,
0.16663622856140137,
0.2979535758495331,
0.22282752394676208,
0.5636559724807739,
0.3159727454185486,
0.011753320693969727,
-0.20831474661827087,
0.1311718225479126,
0.006909423507750034,
-0.8838167786598206,
0.19761759042739868,
-0.03138064220547676,
-0.2637524902820587,
0.21239115297794342,
0.37532779574394226,
0.1270447075366974,
0.4987851083278656,
-0.17407982051372528,
-0.424702525138855,
-0.3973771333694458,
0.006599500775337219,
0.174264058470726,
0.0011970847845077515,
0.0514228418469429,
0.5306834578514099,
0.19821935892105103,
0.15471722185611725,
-0.2049756944179535,
0.18318019807338715,
-0.3399905264377594,
0.25543928146362305,
-0.11082524061203003,
-0.41956207156181335,
-0.03815194219350815,
0.12543199956417084,
0.04387335479259491,
0.0017527155578136444,
0.09149196743965149,
-0.054966703057289124,
-0.18266500532627106,
0.17931437492370605,
0.27356216311454773,
-0.20960849523544312,
-0.20473991334438324,
-0.004650816321372986,
-0.02193005383014679,
0.10297376662492752,
-0.0729960948228836,
0.00789722055196762,
-0.15854842960834503,
0.549696683883667,
-0.09683722257614136,
-0.07829498499631882,
-0.321249783039093,
0.03207146376371384,
-0.23294594883918762,
-0.05529676377773285,
0.17893609404563904,
0.2310502976179123,
0.14143411815166473,
-0.16718903183937073,
-0.7330247163772583,
0.14692364633083344,
0.2807041108608246,
-0.07894819974899292,
0.2824501097202301,
-0.6361717581748962,
-0.2515563666820526,
-0.12406904995441437,
0.058936625719070435,
0.01782314106822014,
-0.29064345359802246,
-0.11902442574501038,
0.15008515119552612,
0.07920800894498825,
-0.22283446788787842,
-0.21998175978660583,
-0.007126742973923683,
-0.15680719912052155,
-0.18953169882297516,
0.4388341009616852,
0.05041131004691124,
-0.17817392945289612,
-0.09514656662940979,
0.020867332816123962,
0.1502608209848404,
-0.10834331810474396,
0.0020460509695112705,
0.5980406999588013,
-0.13318146765232086,
-0.02910071238875389,
0.456070214509964,
-0.001709073781967163,
-0.08082757145166397,
0.011111222207546234,
-0.24031901359558105,
0.10640877485275269,
-0.1864721179008484,
0.028415899723768234,
0.2730589210987091,
0.0053153447806835175,
-0.16144342720508575,
0.11166632175445557,
0.01803424209356308,
-0.14061081409454346,
-0.20857888460159302,
0.5285695791244507,
-0.1294042468070984,
-0.11113128066062927,
-0.20984983444213867,
0.25221896171569824,
-0.2701117694377899,
0.004977590404450893,
-0.13915228843688965,
-0.07524175196886063,
-0.17433515191078186,
-0.21616902947425842,
-0.19599811732769012,
0.10436327755451202,
0.2675894796848297,
0.2678266167640686,
0.17319387197494507,
-0.292314350605011,
0.010725192725658417,
0.4745837152004242,
0.08574096858501434,
-0.2254718691110611,
0.4008435904979706,
0.32856231927871704,
-0.09891852736473083,
0.024350197985768318,
0.34102532267570496,
0.5116844177246094,
0.5268765091896057,
-0.27554047107696533,
0.029622260481119156,
0.09985306859016418,
-0.1723218411207199,
0.3009313642978668,
0.12202691286802292,
0.5902808904647827,
0.15899984538555145,
0.13224413990974426,
-0.023708293214440346,
-0.02508227899670601,
0.23306448757648468,
-0.036525119096040726,
0.19096454977989197,
0.08038115501403809,
0.6249294281005859,
0.23981918394565582,
-0.35915854573249817,
-0.1490706205368042,
0.08431816846132278,
-0.4341332018375397,
0.005539947655051947,
0.46048471331596375,
-0.049365922808647156,
0.28800010681152344,
-0.06462600827217102,
-0.026343977078795433,
0.15817265212535858,
0.6270228624343872,
0.23330338299274445,
0.2689681649208069,
-0.34173452854156494,
0.11560580134391785,
-0.32565122842788696,
0.30072662234306335,
-0.0014743059873580933,
-0.08987303078174591,
0.07919662445783615,
0.0009102541953325272,
0.05939766392111778,
0.1766049563884735,
0.1285301148891449,
0.07680471986532211,
-0.14709264039993286,
0.23895122110843658,
-0.16914226114749908,
0.02404322475194931,
0.0808025449514389,
0.22791309654712677,
-0.0594039112329483,
-0.32999187707901,
0.217532217502594,
0.10713180899620056,
-0.019447198137640953,
-0.07325653731822968,
0.054049037396907806,
0.12301939725875854,
0.1730819195508957,
0.10390540212392807,
0.034520141780376434,
0.5826875567436218,
0.12415967136621475,
-0.06382731348276138,
0.3305566608905792,
-0.1148175522685051,
-0.17466218769550323,
0.16456231474876404,
0.24761907756328583,
0.6241377592086792,
-0.03434651345014572,
0.25568875670433044,
-0.44834673404693604,
-0.21278731524944305,
-0.026163244619965553,
0.07279698550701141,
-0.25804615020751953,
0.2388155460357666,
-0.2617354393005371,
-0.03231417015194893,
0.3202947974205017,
-0.006378062069416046,
0.29820191860198975,
0.09396368265151978,
-0.4200735092163086,
-0.46412184834480286,
0.3670327067375183,
-0.2881059944629669,
-0.23062849044799805,
-0.14516982436180115,
0.11228165775537491,
0.03078039363026619,
0.08315202593803406,
-0.6610729694366455,
-0.009856000542640686,
0.33231374621391296,
-0.026302561163902283,
-0.22136369347572327,
-0.1205214411020279,
0.01226385124027729,
0.18510191142559052,
-0.0976044237613678,
0.27065566182136536,
-0.09607880562543869,
-0.06466731429100037,
-0.45411038398742676,
-0.1759287714958191
] |
https://github.com/huggingface/datasets/issues/469 | invalid data type 'str' at _convert_outputs in arrow_dataset.py | I didn't know tokenizers could return strings in the token ids. Which tokenizer are you using to get this @Doragd ? | I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
| 21 | invalid data type 'str' at _convert_outputs in arrow_dataset.py
I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I didn't know tokenizers could return strings in the token ids. Which tokenizer are you using to get this @Doragd ? | [
-0.22282423079013824,
0.0242498517036438,
0.10737143456935883,
0.23030735552310944,
0.5109532475471497,
-0.10725988447666168,
0.5323296785354614,
0.07759007066488266,
-0.3410622179508209,
-0.12477622926235199,
0.03665751963853836,
0.3864072561264038,
-0.36969560384750366,
0.04221787303686142,
0.044361963868141174,
-0.20246389508247375,
-0.08803478628396988,
0.009990029036998749,
-0.023253224790096283,
-0.053638752549886703,
0.048243701457977295,
0.1829802691936493,
-0.15682613849639893,
0.41447722911834717,
-0.6451312303543091,
-0.18357887864112854,
0.1746635138988495,
-0.09639310091733932,
-0.09922074526548386,
-0.4487784206867218,
0.220274418592453,
-0.10204379260540009,
0.4976370632648468,
0.3472318649291992,
-0.00012417120160534978,
0.1380361169576645,
0.10928584635257721,
0.10169471800327301,
-0.29087236523628235,
-0.30163735151290894,
0.1341148316860199,
-0.059384919703006744,
0.4149942100048065,
-0.20153865218162537,
-0.05718964338302612,
-0.2600911855697632,
-0.060625821352005005,
0.26176899671554565,
0.38377517461776733,
0.50169837474823,
0.11732207238674164,
0.1685168743133545,
0.24648545682430267,
0.0738130733370781,
0.25956377387046814,
0.3155062198638916,
0.07547704875469208,
0.20712392032146454,
0.016833975911140442,
0.02660526894032955,
-0.08569470793008804,
0.07480783760547638,
-0.07012821733951569,
-0.1997741311788559,
0.21665853261947632,
0.22728331387043,
0.17457899451255798,
-0.1476219743490219,
-0.2287851870059967,
0.1198839545249939,
0.43321576714515686,
-0.3214258551597595,
-0.1559446156024933,
0.007921472191810608,
-0.011162050068378448,
-0.2727990746498108,
-0.006166972219944,
0.2483309805393219,
-0.427776962518692,
0.1667020469903946,
-0.16226062178611755,
-0.025466760620474815,
-0.37924978137016296,
0.19955646991729736,
-0.09251793473958969,
0.5032633543014526,
0.1183696985244751,
0.15681657195091248,
0.18424028158187866,
-0.014435779303312302,
0.3717096149921417,
0.08763837814331055,
0.13975468277931213,
0.06214795634150505,
-0.3116944134235382,
-0.030463935807347298,
-0.4463334083557129,
-0.6483628749847412,
-0.26851481199264526,
-0.21252353489398956,
0.1655777245759964,
-0.07115250825881958,
0.20472681522369385,
0.20295047760009766,
0.23332253098487854,
0.1388004571199417,
-0.21012336015701294,
0.5648383498191833,
0.10009295493364334,
-0.15525054931640625,
-0.133545383810997,
-0.025088563561439514,
-0.328238844871521,
-0.09228966385126114,
0.5121245384216309,
0.16284039616584778,
0.1257425993680954,
-0.005032282322645187,
-0.055022820830345154,
-0.14883305132389069,
-0.2688642144203186,
-0.08821725845336914,
0.2847146987915039,
0.18506914377212524,
0.0958356037735939,
0.383222371339798,
0.21541951596736908,
0.11113576591014862,
0.0493788868188858,
-0.13524369895458221,
0.03532237187027931,
0.08555611968040466,
-0.21797096729278564,
-0.11981739848852158,
0.1821131706237793,
0.32819798588752747,
-0.269904226064682,
0.12150130420923233,
-0.14253613352775574,
-0.208536759018898,
0.0015713851898908615,
-0.2935895323753357,
-0.005307510495185852,
0.013497423380613327,
-0.25748389959335327,
0.309787392616272,
0.09357458353042603,
-0.30359354615211487,
0.019634298980236053,
0.46777206659317017,
-0.4638134241104126,
-0.4341682493686676,
-0.4358201026916504,
0.08996038138866425,
0.3708471655845642,
-0.11298754811286926,
-0.09231018275022507,
0.05973508208990097,
0.4520862400531769,
-0.18882568180561066,
0.10294705629348755,
-0.579759955406189,
0.3521028161048889,
-0.015292652882635593,
-0.08329926431179047,
0.09054681658744812,
-0.4035293161869049,
-0.18164736032485962,
0.16967111825942993,
-0.15330366790294647,
0.31111302971839905,
0.4423997104167938,
-0.38276052474975586,
0.29479148983955383,
0.07952729612588882,
0.01669318974018097,
0.8023683428764343,
-0.3571903705596924,
-0.21795889735221863,
0.13225509226322174,
-0.17044910788536072,
-0.3259192109107971,
-0.07707250863313675,
0.27369797229766846,
0.09063044935464859,
0.07179877161979675,
-0.009402886033058167,
0.391426682472229,
-0.09331520646810532,
0.2531605660915375,
-0.3342474102973938,
-0.07499263435602188,
0.3700166344642639,
0.3320883810520172,
0.2507389783859253,
-0.03353755176067352,
0.06653157621622086,
0.342216432094574,
0.2596173882484436,
-0.14549671113491058,
0.2384006530046463,
0.16183403134346008,
0.018355172127485275,
-0.1759248524904251,
-0.10522495955228806,
-0.16064628958702087,
-0.30508846044540405,
-0.20202073454856873,
-0.3353252112865448,
0.4843747913837433,
-0.23949791491031647,
0.08094942569732666,
-0.16291120648384094,
-0.07293787598609924,
-0.1123218983411789,
0.23905354738235474,
0.10807839035987854,
0.08143849670886993,
-0.14365513622760773,
-0.0689878836274147,
-0.1000492125749588,
-0.06188848614692688,
-0.05237250775098801,
0.1880999505519867,
0.02513740211725235,
0.27322739362716675,
-0.16910044848918915,
-0.1986376792192459,
-0.26017463207244873,
0.05643289163708687,
0.2558158338069916,
0.09606233239173889,
-0.2582111656665802,
0.2561085820198059,
-0.14479242265224457,
-0.2581230401992798,
-0.30881190299987793,
0.3103089928627014,
0.15540990233421326,
-0.5250990986824036,
0.03694210946559906,
0.16145145893096924,
0.16632096469402313,
-0.0896117314696312,
0.14196765422821045,
0.13636313378810883,
0.06864230334758759,
0.13800722360610962,
-0.004035290330648422,
0.36933788657188416,
0.2155340313911438,
-0.04095647484064102,
0.2696603834629059,
0.049553148448467255,
-0.12011763453483582,
-0.16362632811069489,
0.11930280923843384,
0.03172415867447853,
-0.290544718503952,
-0.019627436995506287,
0.4356467127799988,
-0.15255612134933472,
0.24142277240753174,
0.44143083691596985,
-0.11877404898405075,
-0.02535412088036537,
-0.18716178834438324,
0.21855880320072174,
0.14079920947551727,
-0.026811841875314713,
-0.08513769507408142,
-0.005383547395467758,
-0.2538854777812958,
-0.06525124609470367,
0.3296319842338562,
-0.1268233209848404,
0.4315141439437866,
0.1532037854194641,
0.2892070412635803,
-0.01847047731280327,
-0.05140719190239906,
-0.2919021248817444,
0.2905481159687042,
0.25433409214019775,
-0.23410165309906006,
0.415740430355072,
-0.10252450406551361,
-0.21352696418762207,
-0.6377741694450378,
-0.37067940831184387,
-0.08373959362506866,
-0.13306309282779694,
-0.04485947638750076,
-0.0630304217338562,
0.16435343027114868,
0.061436109244823456,
0.07715995609760284,
-0.06676118075847626,
0.2787645757198334,
-0.18456237018108368,
0.10622963309288025,
-0.33188295364379883,
-0.3990285396575928,
-0.019308118149638176,
0.23811917006969452,
0.01827249489724636,
-0.11488112807273865,
0.0174302589148283,
-0.046467944979667664,
-0.07560288161039352,
-0.1490136682987213,
0.11283780634403229,
-0.01411139965057373,
-0.1526143103837967,
0.13773296773433685,
-0.02533257007598877,
-0.2624073028564453,
-0.22783571481704712,
0.3238840103149414,
-0.32887303829193115,
0.004554146900773048,
0.45673561096191406,
-0.18968376517295837,
-0.05533435568213463,
-0.05129353702068329,
-0.3140719532966614,
-0.581460177898407,
-0.053909800946712494,
0.017290711402893066,
0.034301478415727615,
0.32963305711746216,
0.34804239869117737,
0.030773989856243134,
0.1842593550682068,
0.03400556370615959,
-0.0598001703619957,
0.08541790395975113,
0.11920306086540222,
0.31462550163269043,
-0.03845174238085747,
-0.2886618971824646,
-0.34714624285697937,
-0.11079138517379761,
0.07097923755645752,
0.07621534913778305,
-0.3193144202232361,
0.1262015849351883,
-0.12603750824928284,
0.05120332911610603,
-0.2906244993209839,
0.022035159170627594,
0.448099285364151,
0.11024507135152817,
-0.008791772648692131,
0.21246546506881714,
0.013971421867609024,
0.30608829855918884,
0.04166557267308235,
0.21448448300361633,
-0.03469454124569893,
0.17872604727745056,
-0.045640990138053894,
0.6495579481124878,
-0.14180046319961548,
-0.38593488931655884,
0.1767016500234604,
-0.1262180656194687,
-0.17933616042137146,
-0.00940673053264618,
-0.3002760112285614,
-0.003125453134998679,
-0.2587316632270813,
-0.0353839248418808,
0.0021562501788139343,
-0.2854905128479004,
-0.32541418075561523,
-0.18113823235034943,
0.13426688313484192,
-0.1632562279701233,
-0.3281495273113251,
0.3672776222229004,
-0.2507420778274536,
0.2550690174102783,
-0.15651372075080872,
-0.14477157592773438,
-0.1669241487979889,
-0.4364984631538391,
-0.03023330681025982,
0.19782334566116333,
-0.2999420762062073,
0.02716180309653282,
-0.5152041912078857,
-0.236068457365036,
-0.1595631241798401,
0.08459796011447906,
0.3666800260543823,
0.5396208763122559,
0.030301038175821304,
0.034953273832798004,
0.08058568835258484,
0.10107032209634781,
0.41064178943634033,
0.18398244678974152,
-0.07503245770931244,
0.18558603525161743,
0.1655878722667694,
-0.35793617367744446,
-0.28352120518684387,
-0.5400987267494202,
-0.08220431953668594,
0.252879798412323,
0.09672657400369644,
-0.2896074950695038,
-0.24265071749687195,
0.22253456711769104,
0.04142904654145241,
-0.2890588343143463,
-0.04357591271400452,
0.01720919832587242,
-0.23117303848266602,
-0.20426009595394135,
0.10622568428516388,
0.2091032862663269,
0.38879045844078064,
-0.2306029349565506,
-0.10891975462436676,
0.018064573407173157,
0.20605623722076416,
0.17588120698928833,
-0.0173781868070364,
0.12107264995574951,
-0.12726356089115143,
-0.2719097137451172,
-0.2843085825443268,
0.22120030224323273,
0.12467492371797562,
0.4509957730770111,
0.11753085255622864,
-0.3715094029903412,
0.1879754364490509,
-0.057256538420915604,
0.340912789106369,
0.007406607270240784,
-0.11040902882814407,
0.34728294610977173,
0.1715257316827774,
0.3176766633987427,
0.09935840219259262,
-0.028953395783901215,
0.26587313413619995,
-0.07713234424591064,
-0.4949769079685211,
-0.04186218976974487,
0.27453336119651794,
-0.07302429527044296,
-0.0733686238527298,
-0.02415122091770172,
-0.209478959441185,
-0.2615412771701813,
0.4185965657234192,
0.3421195447444916,
1.0206489562988281,
-0.2603800296783447,
0.3446720540523529,
0.10921036452054977,
-0.060601480305194855,
0.49505680799484253,
-0.15399694442749023,
0.1934904009103775,
-0.5524522662162781,
0.04724026843905449,
-0.11169172078371048,
-0.19717247784137726,
-0.1783650815486908,
0.34370511770248413,
-0.3830956220626831,
0.13299895823001862,
-0.09648330509662628,
0.1960601955652237,
0.14222756028175354,
0.31962889432907104,
0.20939426124095917,
-0.20901517570018768,
-0.23682478070259094,
-0.003560660406947136,
-0.4814990758895874,
-0.09908919036388397,
-0.03797366842627525,
-0.2874804735183716,
-0.00013706833124160767,
-0.3918529152870178,
-0.20003628730773926,
0.19048914313316345,
-0.29227739572525024,
0.3384348750114441,
0.5059813261032104,
-0.10644374787807465,
0.22281327843666077,
0.19872711598873138,
0.3068525195121765,
-0.045633796602487564,
0.06118910014629364,
-0.27032405138015747,
-0.06260416656732559,
0.11660388112068176,
-0.057284824550151825,
-0.05342921242117882,
0.4100272059440613,
-0.04768291488289833,
-0.3138558864593506,
0.3178364634513855,
0.014437335543334484,
-0.17577092349529266,
0.15726935863494873,
-0.067201629281044,
0.08750443160533905,
-0.41170570254325867,
0.27144864201545715,
-0.21885740756988525,
-0.31851083040237427,
-0.26868340373039246,
0.003916214220225811,
0.018921010196208954,
-0.12270354479551315,
0.10436993837356567,
0.31816980242729187,
0.014800339937210083,
0.14292530715465546,
0.16663622856140137,
0.2979535758495331,
0.22282752394676208,
0.5636559724807739,
0.3159727454185486,
0.011753320693969727,
-0.20831474661827087,
0.1311718225479126,
0.006909423507750034,
-0.8838167786598206,
0.19761759042739868,
-0.03138064220547676,
-0.2637524902820587,
0.21239115297794342,
0.37532779574394226,
0.1270447075366974,
0.4987851083278656,
-0.17407982051372528,
-0.424702525138855,
-0.3973771333694458,
0.006599500775337219,
0.174264058470726,
0.0011970847845077515,
0.0514228418469429,
0.5306834578514099,
0.19821935892105103,
0.15471722185611725,
-0.2049756944179535,
0.18318019807338715,
-0.3399905264377594,
0.25543928146362305,
-0.11082524061203003,
-0.41956207156181335,
-0.03815194219350815,
0.12543199956417084,
0.04387335479259491,
0.0017527155578136444,
0.09149196743965149,
-0.054966703057289124,
-0.18266500532627106,
0.17931437492370605,
0.27356216311454773,
-0.20960849523544312,
-0.20473991334438324,
-0.004650816321372986,
-0.02193005383014679,
0.10297376662492752,
-0.0729960948228836,
0.00789722055196762,
-0.15854842960834503,
0.549696683883667,
-0.09683722257614136,
-0.07829498499631882,
-0.321249783039093,
0.03207146376371384,
-0.23294594883918762,
-0.05529676377773285,
0.17893609404563904,
0.2310502976179123,
0.14143411815166473,
-0.16718903183937073,
-0.7330247163772583,
0.14692364633083344,
0.2807041108608246,
-0.07894819974899292,
0.2824501097202301,
-0.6361717581748962,
-0.2515563666820526,
-0.12406904995441437,
0.058936625719070435,
0.01782314106822014,
-0.29064345359802246,
-0.11902442574501038,
0.15008515119552612,
0.07920800894498825,
-0.22283446788787842,
-0.21998175978660583,
-0.007126742973923683,
-0.15680719912052155,
-0.18953169882297516,
0.4388341009616852,
0.05041131004691124,
-0.17817392945289612,
-0.09514656662940979,
0.020867332816123962,
0.1502608209848404,
-0.10834331810474396,
0.0020460509695112705,
0.5980406999588013,
-0.13318146765232086,
-0.02910071238875389,
0.456070214509964,
-0.001709073781967163,
-0.08082757145166397,
0.011111222207546234,
-0.24031901359558105,
0.10640877485275269,
-0.1864721179008484,
0.028415899723768234,
0.2730589210987091,
0.0053153447806835175,
-0.16144342720508575,
0.11166632175445557,
0.01803424209356308,
-0.14061081409454346,
-0.20857888460159302,
0.5285695791244507,
-0.1294042468070984,
-0.11113128066062927,
-0.20984983444213867,
0.25221896171569824,
-0.2701117694377899,
0.004977590404450893,
-0.13915228843688965,
-0.07524175196886063,
-0.17433515191078186,
-0.21616902947425842,
-0.19599811732769012,
0.10436327755451202,
0.2675894796848297,
0.2678266167640686,
0.17319387197494507,
-0.292314350605011,
0.010725192725658417,
0.4745837152004242,
0.08574096858501434,
-0.2254718691110611,
0.4008435904979706,
0.32856231927871704,
-0.09891852736473083,
0.024350197985768318,
0.34102532267570496,
0.5116844177246094,
0.5268765091896057,
-0.27554047107696533,
0.029622260481119156,
0.09985306859016418,
-0.1723218411207199,
0.3009313642978668,
0.12202691286802292,
0.5902808904647827,
0.15899984538555145,
0.13224413990974426,
-0.023708293214440346,
-0.02508227899670601,
0.23306448757648468,
-0.036525119096040726,
0.19096454977989197,
0.08038115501403809,
0.6249294281005859,
0.23981918394565582,
-0.35915854573249817,
-0.1490706205368042,
0.08431816846132278,
-0.4341332018375397,
0.005539947655051947,
0.46048471331596375,
-0.049365922808647156,
0.28800010681152344,
-0.06462600827217102,
-0.026343977078795433,
0.15817265212535858,
0.6270228624343872,
0.23330338299274445,
0.2689681649208069,
-0.34173452854156494,
0.11560580134391785,
-0.32565122842788696,
0.30072662234306335,
-0.0014743059873580933,
-0.08987303078174591,
0.07919662445783615,
0.0009102541953325272,
0.05939766392111778,
0.1766049563884735,
0.1285301148891449,
0.07680471986532211,
-0.14709264039993286,
0.23895122110843658,
-0.16914226114749908,
0.02404322475194931,
0.0808025449514389,
0.22791309654712677,
-0.0594039112329483,
-0.32999187707901,
0.217532217502594,
0.10713180899620056,
-0.019447198137640953,
-0.07325653731822968,
0.054049037396907806,
0.12301939725875854,
0.1730819195508957,
0.10390540212392807,
0.034520141780376434,
0.5826875567436218,
0.12415967136621475,
-0.06382731348276138,
0.3305566608905792,
-0.1148175522685051,
-0.17466218769550323,
0.16456231474876404,
0.24761907756328583,
0.6241377592086792,
-0.03434651345014572,
0.25568875670433044,
-0.44834673404693604,
-0.21278731524944305,
-0.026163244619965553,
0.07279698550701141,
-0.25804615020751953,
0.2388155460357666,
-0.2617354393005371,
-0.03231417015194893,
0.3202947974205017,
-0.006378062069416046,
0.29820191860198975,
0.09396368265151978,
-0.4200735092163086,
-0.46412184834480286,
0.3670327067375183,
-0.2881059944629669,
-0.23062849044799805,
-0.14516982436180115,
0.11228165775537491,
0.03078039363026619,
0.08315202593803406,
-0.6610729694366455,
-0.009856000542640686,
0.33231374621391296,
-0.026302561163902283,
-0.22136369347572327,
-0.1205214411020279,
0.01226385124027729,
0.18510191142559052,
-0.0976044237613678,
0.27065566182136536,
-0.09607880562543869,
-0.06466731429100037,
-0.45411038398742676,
-0.1759287714958191
] |
https://github.com/huggingface/datasets/issues/469 | invalid data type 'str' at _convert_outputs in arrow_dataset.py | > I didn't know tokenizers could return strings in the token ids. Which tokenizer are you using to get this @Doragd ?
i'm sorry that i met this issue in another place (not in huggingface repo). | I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
| 36 | invalid data type 'str' at _convert_outputs in arrow_dataset.py
I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
> I didn't know tokenizers could return strings in the token ids. Which tokenizer are you using to get this @Doragd ?
i'm sorry that i met this issue in another place (not in huggingface repo). | [
-0.22282423079013824,
0.0242498517036438,
0.10737143456935883,
0.23030735552310944,
0.5109532475471497,
-0.10725988447666168,
0.5323296785354614,
0.07759007066488266,
-0.3410622179508209,
-0.12477622926235199,
0.03665751963853836,
0.3864072561264038,
-0.36969560384750366,
0.04221787303686142,
0.044361963868141174,
-0.20246389508247375,
-0.08803478628396988,
0.009990029036998749,
-0.023253224790096283,
-0.053638752549886703,
0.048243701457977295,
0.1829802691936493,
-0.15682613849639893,
0.41447722911834717,
-0.6451312303543091,
-0.18357887864112854,
0.1746635138988495,
-0.09639310091733932,
-0.09922074526548386,
-0.4487784206867218,
0.220274418592453,
-0.10204379260540009,
0.4976370632648468,
0.3472318649291992,
-0.00012417120160534978,
0.1380361169576645,
0.10928584635257721,
0.10169471800327301,
-0.29087236523628235,
-0.30163735151290894,
0.1341148316860199,
-0.059384919703006744,
0.4149942100048065,
-0.20153865218162537,
-0.05718964338302612,
-0.2600911855697632,
-0.060625821352005005,
0.26176899671554565,
0.38377517461776733,
0.50169837474823,
0.11732207238674164,
0.1685168743133545,
0.24648545682430267,
0.0738130733370781,
0.25956377387046814,
0.3155062198638916,
0.07547704875469208,
0.20712392032146454,
0.016833975911140442,
0.02660526894032955,
-0.08569470793008804,
0.07480783760547638,
-0.07012821733951569,
-0.1997741311788559,
0.21665853261947632,
0.22728331387043,
0.17457899451255798,
-0.1476219743490219,
-0.2287851870059967,
0.1198839545249939,
0.43321576714515686,
-0.3214258551597595,
-0.1559446156024933,
0.007921472191810608,
-0.011162050068378448,
-0.2727990746498108,
-0.006166972219944,
0.2483309805393219,
-0.427776962518692,
0.1667020469903946,
-0.16226062178611755,
-0.025466760620474815,
-0.37924978137016296,
0.19955646991729736,
-0.09251793473958969,
0.5032633543014526,
0.1183696985244751,
0.15681657195091248,
0.18424028158187866,
-0.014435779303312302,
0.3717096149921417,
0.08763837814331055,
0.13975468277931213,
0.06214795634150505,
-0.3116944134235382,
-0.030463935807347298,
-0.4463334083557129,
-0.6483628749847412,
-0.26851481199264526,
-0.21252353489398956,
0.1655777245759964,
-0.07115250825881958,
0.20472681522369385,
0.20295047760009766,
0.23332253098487854,
0.1388004571199417,
-0.21012336015701294,
0.5648383498191833,
0.10009295493364334,
-0.15525054931640625,
-0.133545383810997,
-0.025088563561439514,
-0.328238844871521,
-0.09228966385126114,
0.5121245384216309,
0.16284039616584778,
0.1257425993680954,
-0.005032282322645187,
-0.055022820830345154,
-0.14883305132389069,
-0.2688642144203186,
-0.08821725845336914,
0.2847146987915039,
0.18506914377212524,
0.0958356037735939,
0.383222371339798,
0.21541951596736908,
0.11113576591014862,
0.0493788868188858,
-0.13524369895458221,
0.03532237187027931,
0.08555611968040466,
-0.21797096729278564,
-0.11981739848852158,
0.1821131706237793,
0.32819798588752747,
-0.269904226064682,
0.12150130420923233,
-0.14253613352775574,
-0.208536759018898,
0.0015713851898908615,
-0.2935895323753357,
-0.005307510495185852,
0.013497423380613327,
-0.25748389959335327,
0.309787392616272,
0.09357458353042603,
-0.30359354615211487,
0.019634298980236053,
0.46777206659317017,
-0.4638134241104126,
-0.4341682493686676,
-0.4358201026916504,
0.08996038138866425,
0.3708471655845642,
-0.11298754811286926,
-0.09231018275022507,
0.05973508208990097,
0.4520862400531769,
-0.18882568180561066,
0.10294705629348755,
-0.579759955406189,
0.3521028161048889,
-0.015292652882635593,
-0.08329926431179047,
0.09054681658744812,
-0.4035293161869049,
-0.18164736032485962,
0.16967111825942993,
-0.15330366790294647,
0.31111302971839905,
0.4423997104167938,
-0.38276052474975586,
0.29479148983955383,
0.07952729612588882,
0.01669318974018097,
0.8023683428764343,
-0.3571903705596924,
-0.21795889735221863,
0.13225509226322174,
-0.17044910788536072,
-0.3259192109107971,
-0.07707250863313675,
0.27369797229766846,
0.09063044935464859,
0.07179877161979675,
-0.009402886033058167,
0.391426682472229,
-0.09331520646810532,
0.2531605660915375,
-0.3342474102973938,
-0.07499263435602188,
0.3700166344642639,
0.3320883810520172,
0.2507389783859253,
-0.03353755176067352,
0.06653157621622086,
0.342216432094574,
0.2596173882484436,
-0.14549671113491058,
0.2384006530046463,
0.16183403134346008,
0.018355172127485275,
-0.1759248524904251,
-0.10522495955228806,
-0.16064628958702087,
-0.30508846044540405,
-0.20202073454856873,
-0.3353252112865448,
0.4843747913837433,
-0.23949791491031647,
0.08094942569732666,
-0.16291120648384094,
-0.07293787598609924,
-0.1123218983411789,
0.23905354738235474,
0.10807839035987854,
0.08143849670886993,
-0.14365513622760773,
-0.0689878836274147,
-0.1000492125749588,
-0.06188848614692688,
-0.05237250775098801,
0.1880999505519867,
0.02513740211725235,
0.27322739362716675,
-0.16910044848918915,
-0.1986376792192459,
-0.26017463207244873,
0.05643289163708687,
0.2558158338069916,
0.09606233239173889,
-0.2582111656665802,
0.2561085820198059,
-0.14479242265224457,
-0.2581230401992798,
-0.30881190299987793,
0.3103089928627014,
0.15540990233421326,
-0.5250990986824036,
0.03694210946559906,
0.16145145893096924,
0.16632096469402313,
-0.0896117314696312,
0.14196765422821045,
0.13636313378810883,
0.06864230334758759,
0.13800722360610962,
-0.004035290330648422,
0.36933788657188416,
0.2155340313911438,
-0.04095647484064102,
0.2696603834629059,
0.049553148448467255,
-0.12011763453483582,
-0.16362632811069489,
0.11930280923843384,
0.03172415867447853,
-0.290544718503952,
-0.019627436995506287,
0.4356467127799988,
-0.15255612134933472,
0.24142277240753174,
0.44143083691596985,
-0.11877404898405075,
-0.02535412088036537,
-0.18716178834438324,
0.21855880320072174,
0.14079920947551727,
-0.026811841875314713,
-0.08513769507408142,
-0.005383547395467758,
-0.2538854777812958,
-0.06525124609470367,
0.3296319842338562,
-0.1268233209848404,
0.4315141439437866,
0.1532037854194641,
0.2892070412635803,
-0.01847047731280327,
-0.05140719190239906,
-0.2919021248817444,
0.2905481159687042,
0.25433409214019775,
-0.23410165309906006,
0.415740430355072,
-0.10252450406551361,
-0.21352696418762207,
-0.6377741694450378,
-0.37067940831184387,
-0.08373959362506866,
-0.13306309282779694,
-0.04485947638750076,
-0.0630304217338562,
0.16435343027114868,
0.061436109244823456,
0.07715995609760284,
-0.06676118075847626,
0.2787645757198334,
-0.18456237018108368,
0.10622963309288025,
-0.33188295364379883,
-0.3990285396575928,
-0.019308118149638176,
0.23811917006969452,
0.01827249489724636,
-0.11488112807273865,
0.0174302589148283,
-0.046467944979667664,
-0.07560288161039352,
-0.1490136682987213,
0.11283780634403229,
-0.01411139965057373,
-0.1526143103837967,
0.13773296773433685,
-0.02533257007598877,
-0.2624073028564453,
-0.22783571481704712,
0.3238840103149414,
-0.32887303829193115,
0.004554146900773048,
0.45673561096191406,
-0.18968376517295837,
-0.05533435568213463,
-0.05129353702068329,
-0.3140719532966614,
-0.581460177898407,
-0.053909800946712494,
0.017290711402893066,
0.034301478415727615,
0.32963305711746216,
0.34804239869117737,
0.030773989856243134,
0.1842593550682068,
0.03400556370615959,
-0.0598001703619957,
0.08541790395975113,
0.11920306086540222,
0.31462550163269043,
-0.03845174238085747,
-0.2886618971824646,
-0.34714624285697937,
-0.11079138517379761,
0.07097923755645752,
0.07621534913778305,
-0.3193144202232361,
0.1262015849351883,
-0.12603750824928284,
0.05120332911610603,
-0.2906244993209839,
0.022035159170627594,
0.448099285364151,
0.11024507135152817,
-0.008791772648692131,
0.21246546506881714,
0.013971421867609024,
0.30608829855918884,
0.04166557267308235,
0.21448448300361633,
-0.03469454124569893,
0.17872604727745056,
-0.045640990138053894,
0.6495579481124878,
-0.14180046319961548,
-0.38593488931655884,
0.1767016500234604,
-0.1262180656194687,
-0.17933616042137146,
-0.00940673053264618,
-0.3002760112285614,
-0.003125453134998679,
-0.2587316632270813,
-0.0353839248418808,
0.0021562501788139343,
-0.2854905128479004,
-0.32541418075561523,
-0.18113823235034943,
0.13426688313484192,
-0.1632562279701233,
-0.3281495273113251,
0.3672776222229004,
-0.2507420778274536,
0.2550690174102783,
-0.15651372075080872,
-0.14477157592773438,
-0.1669241487979889,
-0.4364984631538391,
-0.03023330681025982,
0.19782334566116333,
-0.2999420762062073,
0.02716180309653282,
-0.5152041912078857,
-0.236068457365036,
-0.1595631241798401,
0.08459796011447906,
0.3666800260543823,
0.5396208763122559,
0.030301038175821304,
0.034953273832798004,
0.08058568835258484,
0.10107032209634781,
0.41064178943634033,
0.18398244678974152,
-0.07503245770931244,
0.18558603525161743,
0.1655878722667694,
-0.35793617367744446,
-0.28352120518684387,
-0.5400987267494202,
-0.08220431953668594,
0.252879798412323,
0.09672657400369644,
-0.2896074950695038,
-0.24265071749687195,
0.22253456711769104,
0.04142904654145241,
-0.2890588343143463,
-0.04357591271400452,
0.01720919832587242,
-0.23117303848266602,
-0.20426009595394135,
0.10622568428516388,
0.2091032862663269,
0.38879045844078064,
-0.2306029349565506,
-0.10891975462436676,
0.018064573407173157,
0.20605623722076416,
0.17588120698928833,
-0.0173781868070364,
0.12107264995574951,
-0.12726356089115143,
-0.2719097137451172,
-0.2843085825443268,
0.22120030224323273,
0.12467492371797562,
0.4509957730770111,
0.11753085255622864,
-0.3715094029903412,
0.1879754364490509,
-0.057256538420915604,
0.340912789106369,
0.007406607270240784,
-0.11040902882814407,
0.34728294610977173,
0.1715257316827774,
0.3176766633987427,
0.09935840219259262,
-0.028953395783901215,
0.26587313413619995,
-0.07713234424591064,
-0.4949769079685211,
-0.04186218976974487,
0.27453336119651794,
-0.07302429527044296,
-0.0733686238527298,
-0.02415122091770172,
-0.209478959441185,
-0.2615412771701813,
0.4185965657234192,
0.3421195447444916,
1.0206489562988281,
-0.2603800296783447,
0.3446720540523529,
0.10921036452054977,
-0.060601480305194855,
0.49505680799484253,
-0.15399694442749023,
0.1934904009103775,
-0.5524522662162781,
0.04724026843905449,
-0.11169172078371048,
-0.19717247784137726,
-0.1783650815486908,
0.34370511770248413,
-0.3830956220626831,
0.13299895823001862,
-0.09648330509662628,
0.1960601955652237,
0.14222756028175354,
0.31962889432907104,
0.20939426124095917,
-0.20901517570018768,
-0.23682478070259094,
-0.003560660406947136,
-0.4814990758895874,
-0.09908919036388397,
-0.03797366842627525,
-0.2874804735183716,
-0.00013706833124160767,
-0.3918529152870178,
-0.20003628730773926,
0.19048914313316345,
-0.29227739572525024,
0.3384348750114441,
0.5059813261032104,
-0.10644374787807465,
0.22281327843666077,
0.19872711598873138,
0.3068525195121765,
-0.045633796602487564,
0.06118910014629364,
-0.27032405138015747,
-0.06260416656732559,
0.11660388112068176,
-0.057284824550151825,
-0.05342921242117882,
0.4100272059440613,
-0.04768291488289833,
-0.3138558864593506,
0.3178364634513855,
0.014437335543334484,
-0.17577092349529266,
0.15726935863494873,
-0.067201629281044,
0.08750443160533905,
-0.41170570254325867,
0.27144864201545715,
-0.21885740756988525,
-0.31851083040237427,
-0.26868340373039246,
0.003916214220225811,
0.018921010196208954,
-0.12270354479551315,
0.10436993837356567,
0.31816980242729187,
0.014800339937210083,
0.14292530715465546,
0.16663622856140137,
0.2979535758495331,
0.22282752394676208,
0.5636559724807739,
0.3159727454185486,
0.011753320693969727,
-0.20831474661827087,
0.1311718225479126,
0.006909423507750034,
-0.8838167786598206,
0.19761759042739868,
-0.03138064220547676,
-0.2637524902820587,
0.21239115297794342,
0.37532779574394226,
0.1270447075366974,
0.4987851083278656,
-0.17407982051372528,
-0.424702525138855,
-0.3973771333694458,
0.006599500775337219,
0.174264058470726,
0.0011970847845077515,
0.0514228418469429,
0.5306834578514099,
0.19821935892105103,
0.15471722185611725,
-0.2049756944179535,
0.18318019807338715,
-0.3399905264377594,
0.25543928146362305,
-0.11082524061203003,
-0.41956207156181335,
-0.03815194219350815,
0.12543199956417084,
0.04387335479259491,
0.0017527155578136444,
0.09149196743965149,
-0.054966703057289124,
-0.18266500532627106,
0.17931437492370605,
0.27356216311454773,
-0.20960849523544312,
-0.20473991334438324,
-0.004650816321372986,
-0.02193005383014679,
0.10297376662492752,
-0.0729960948228836,
0.00789722055196762,
-0.15854842960834503,
0.549696683883667,
-0.09683722257614136,
-0.07829498499631882,
-0.321249783039093,
0.03207146376371384,
-0.23294594883918762,
-0.05529676377773285,
0.17893609404563904,
0.2310502976179123,
0.14143411815166473,
-0.16718903183937073,
-0.7330247163772583,
0.14692364633083344,
0.2807041108608246,
-0.07894819974899292,
0.2824501097202301,
-0.6361717581748962,
-0.2515563666820526,
-0.12406904995441437,
0.058936625719070435,
0.01782314106822014,
-0.29064345359802246,
-0.11902442574501038,
0.15008515119552612,
0.07920800894498825,
-0.22283446788787842,
-0.21998175978660583,
-0.007126742973923683,
-0.15680719912052155,
-0.18953169882297516,
0.4388341009616852,
0.05041131004691124,
-0.17817392945289612,
-0.09514656662940979,
0.020867332816123962,
0.1502608209848404,
-0.10834331810474396,
0.0020460509695112705,
0.5980406999588013,
-0.13318146765232086,
-0.02910071238875389,
0.456070214509964,
-0.001709073781967163,
-0.08082757145166397,
0.011111222207546234,
-0.24031901359558105,
0.10640877485275269,
-0.1864721179008484,
0.028415899723768234,
0.2730589210987091,
0.0053153447806835175,
-0.16144342720508575,
0.11166632175445557,
0.01803424209356308,
-0.14061081409454346,
-0.20857888460159302,
0.5285695791244507,
-0.1294042468070984,
-0.11113128066062927,
-0.20984983444213867,
0.25221896171569824,
-0.2701117694377899,
0.004977590404450893,
-0.13915228843688965,
-0.07524175196886063,
-0.17433515191078186,
-0.21616902947425842,
-0.19599811732769012,
0.10436327755451202,
0.2675894796848297,
0.2678266167640686,
0.17319387197494507,
-0.292314350605011,
0.010725192725658417,
0.4745837152004242,
0.08574096858501434,
-0.2254718691110611,
0.4008435904979706,
0.32856231927871704,
-0.09891852736473083,
0.024350197985768318,
0.34102532267570496,
0.5116844177246094,
0.5268765091896057,
-0.27554047107696533,
0.029622260481119156,
0.09985306859016418,
-0.1723218411207199,
0.3009313642978668,
0.12202691286802292,
0.5902808904647827,
0.15899984538555145,
0.13224413990974426,
-0.023708293214440346,
-0.02508227899670601,
0.23306448757648468,
-0.036525119096040726,
0.19096454977989197,
0.08038115501403809,
0.6249294281005859,
0.23981918394565582,
-0.35915854573249817,
-0.1490706205368042,
0.08431816846132278,
-0.4341332018375397,
0.005539947655051947,
0.46048471331596375,
-0.049365922808647156,
0.28800010681152344,
-0.06462600827217102,
-0.026343977078795433,
0.15817265212535858,
0.6270228624343872,
0.23330338299274445,
0.2689681649208069,
-0.34173452854156494,
0.11560580134391785,
-0.32565122842788696,
0.30072662234306335,
-0.0014743059873580933,
-0.08987303078174591,
0.07919662445783615,
0.0009102541953325272,
0.05939766392111778,
0.1766049563884735,
0.1285301148891449,
0.07680471986532211,
-0.14709264039993286,
0.23895122110843658,
-0.16914226114749908,
0.02404322475194931,
0.0808025449514389,
0.22791309654712677,
-0.0594039112329483,
-0.32999187707901,
0.217532217502594,
0.10713180899620056,
-0.019447198137640953,
-0.07325653731822968,
0.054049037396907806,
0.12301939725875854,
0.1730819195508957,
0.10390540212392807,
0.034520141780376434,
0.5826875567436218,
0.12415967136621475,
-0.06382731348276138,
0.3305566608905792,
-0.1148175522685051,
-0.17466218769550323,
0.16456231474876404,
0.24761907756328583,
0.6241377592086792,
-0.03434651345014572,
0.25568875670433044,
-0.44834673404693604,
-0.21278731524944305,
-0.026163244619965553,
0.07279698550701141,
-0.25804615020751953,
0.2388155460357666,
-0.2617354393005371,
-0.03231417015194893,
0.3202947974205017,
-0.006378062069416046,
0.29820191860198975,
0.09396368265151978,
-0.4200735092163086,
-0.46412184834480286,
0.3670327067375183,
-0.2881059944629669,
-0.23062849044799805,
-0.14516982436180115,
0.11228165775537491,
0.03078039363026619,
0.08315202593803406,
-0.6610729694366455,
-0.009856000542640686,
0.33231374621391296,
-0.026302561163902283,
-0.22136369347572327,
-0.1205214411020279,
0.01226385124027729,
0.18510191142559052,
-0.0976044237613678,
0.27065566182136536,
-0.09607880562543869,
-0.06466731429100037,
-0.45411038398742676,
-0.1759287714958191
] |
https://github.com/huggingface/datasets/issues/469 | invalid data type 'str' at _convert_outputs in arrow_dataset.py | @akhilkapil do you have strings in your dataset ? When you set the dataset format to "pytorch" you should exclude columns with strings as pytorch can't make tensors out of strings | I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
| 31 | invalid data type 'str' at _convert_outputs in arrow_dataset.py
I trying to build multi label text classifier model using Transformers lib.
I'm using Transformers NLP to load the data set, while calling trainer.train() method. It throws the following error
File "C:\***\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
I'm using pyarrow 1.0.0. And I have simple custom data set with Text and Integer Label.
Ex: Data
Text , Label #Column Header
I'm facing an Network issue, 1
I forgot my password, 2
Error StackTrace:
File "C:\**\transformers\trainer.py", line 492, in train
for step, inputs in enumerate(epoch_iterator):
File "C:\**\tqdm\std.py", line 1104, in __iter__
for obj in iterable:
File "C:\**\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\**\torch\utils\data\dataloader.py", line 385, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\**\nlp\arrow_dataset.py", line 414, in __getitem__
output_all_columns=self._output_all_columns,
File "C:\**\nlp\arrow_dataset.py", line 403, in _getitem
outputs, format_type=format_type, format_columns=format_columns, output_all_columns=output_all_columns
File "C:\**\nlp\arrow_dataset.py", line 343, in _convert_outputs
v = command(v)
TypeError: new(): invalid data type 'str'
@akhilkapil do you have strings in your dataset ? When you set the dataset format to "pytorch" you should exclude columns with strings as pytorch can't make tensors out of strings | [
-0.22282423079013824,
0.0242498517036438,
0.10737143456935883,
0.23030735552310944,
0.5109532475471497,
-0.10725988447666168,
0.5323296785354614,
0.07759007066488266,
-0.3410622179508209,
-0.12477622926235199,
0.03665751963853836,
0.3864072561264038,
-0.36969560384750366,
0.04221787303686142,
0.044361963868141174,
-0.20246389508247375,
-0.08803478628396988,
0.009990029036998749,
-0.023253224790096283,
-0.053638752549886703,
0.048243701457977295,
0.1829802691936493,
-0.15682613849639893,
0.41447722911834717,
-0.6451312303543091,
-0.18357887864112854,
0.1746635138988495,
-0.09639310091733932,
-0.09922074526548386,
-0.4487784206867218,
0.220274418592453,
-0.10204379260540009,
0.4976370632648468,
0.3472318649291992,
-0.00012417120160534978,
0.1380361169576645,
0.10928584635257721,
0.10169471800327301,
-0.29087236523628235,
-0.30163735151290894,
0.1341148316860199,
-0.059384919703006744,
0.4149942100048065,
-0.20153865218162537,
-0.05718964338302612,
-0.2600911855697632,
-0.060625821352005005,
0.26176899671554565,
0.38377517461776733,
0.50169837474823,
0.11732207238674164,
0.1685168743133545,
0.24648545682430267,
0.0738130733370781,
0.25956377387046814,
0.3155062198638916,
0.07547704875469208,
0.20712392032146454,
0.016833975911140442,
0.02660526894032955,
-0.08569470793008804,
0.07480783760547638,
-0.07012821733951569,
-0.1997741311788559,
0.21665853261947632,
0.22728331387043,
0.17457899451255798,
-0.1476219743490219,
-0.2287851870059967,
0.1198839545249939,
0.43321576714515686,
-0.3214258551597595,
-0.1559446156024933,
0.007921472191810608,
-0.011162050068378448,
-0.2727990746498108,
-0.006166972219944,
0.2483309805393219,
-0.427776962518692,
0.1667020469903946,
-0.16226062178611755,
-0.025466760620474815,
-0.37924978137016296,
0.19955646991729736,
-0.09251793473958969,
0.5032633543014526,
0.1183696985244751,
0.15681657195091248,
0.18424028158187866,
-0.014435779303312302,
0.3717096149921417,
0.08763837814331055,
0.13975468277931213,
0.06214795634150505,
-0.3116944134235382,
-0.030463935807347298,
-0.4463334083557129,
-0.6483628749847412,
-0.26851481199264526,
-0.21252353489398956,
0.1655777245759964,
-0.07115250825881958,
0.20472681522369385,
0.20295047760009766,
0.23332253098487854,
0.1388004571199417,
-0.21012336015701294,
0.5648383498191833,
0.10009295493364334,
-0.15525054931640625,
-0.133545383810997,
-0.025088563561439514,
-0.328238844871521,
-0.09228966385126114,
0.5121245384216309,
0.16284039616584778,
0.1257425993680954,
-0.005032282322645187,
-0.055022820830345154,
-0.14883305132389069,
-0.2688642144203186,
-0.08821725845336914,
0.2847146987915039,
0.18506914377212524,
0.0958356037735939,
0.383222371339798,
0.21541951596736908,
0.11113576591014862,
0.0493788868188858,
-0.13524369895458221,
0.03532237187027931,
0.08555611968040466,
-0.21797096729278564,
-0.11981739848852158,
0.1821131706237793,
0.32819798588752747,
-0.269904226064682,
0.12150130420923233,
-0.14253613352775574,
-0.208536759018898,
0.0015713851898908615,
-0.2935895323753357,
-0.005307510495185852,
0.013497423380613327,
-0.25748389959335327,
0.309787392616272,
0.09357458353042603,
-0.30359354615211487,
0.019634298980236053,
0.46777206659317017,
-0.4638134241104126,
-0.4341682493686676,
-0.4358201026916504,
0.08996038138866425,
0.3708471655845642,
-0.11298754811286926,
-0.09231018275022507,
0.05973508208990097,
0.4520862400531769,
-0.18882568180561066,
0.10294705629348755,
-0.579759955406189,
0.3521028161048889,
-0.015292652882635593,
-0.08329926431179047,
0.09054681658744812,
-0.4035293161869049,
-0.18164736032485962,
0.16967111825942993,
-0.15330366790294647,
0.31111302971839905,
0.4423997104167938,
-0.38276052474975586,
0.29479148983955383,
0.07952729612588882,
0.01669318974018097,
0.8023683428764343,
-0.3571903705596924,
-0.21795889735221863,
0.13225509226322174,
-0.17044910788536072,
-0.3259192109107971,
-0.07707250863313675,
0.27369797229766846,
0.09063044935464859,
0.07179877161979675,
-0.009402886033058167,
0.391426682472229,
-0.09331520646810532,
0.2531605660915375,
-0.3342474102973938,
-0.07499263435602188,
0.3700166344642639,
0.3320883810520172,
0.2507389783859253,
-0.03353755176067352,
0.06653157621622086,
0.342216432094574,
0.2596173882484436,
-0.14549671113491058,
0.2384006530046463,
0.16183403134346008,
0.018355172127485275,
-0.1759248524904251,
-0.10522495955228806,
-0.16064628958702087,
-0.30508846044540405,
-0.20202073454856873,
-0.3353252112865448,
0.4843747913837433,
-0.23949791491031647,
0.08094942569732666,
-0.16291120648384094,
-0.07293787598609924,
-0.1123218983411789,
0.23905354738235474,
0.10807839035987854,
0.08143849670886993,
-0.14365513622760773,
-0.0689878836274147,
-0.1000492125749588,
-0.06188848614692688,
-0.05237250775098801,
0.1880999505519867,
0.02513740211725235,
0.27322739362716675,
-0.16910044848918915,
-0.1986376792192459,
-0.26017463207244873,
0.05643289163708687,
0.2558158338069916,
0.09606233239173889,
-0.2582111656665802,
0.2561085820198059,
-0.14479242265224457,
-0.2581230401992798,
-0.30881190299987793,
0.3103089928627014,
0.15540990233421326,
-0.5250990986824036,
0.03694210946559906,
0.16145145893096924,
0.16632096469402313,
-0.0896117314696312,
0.14196765422821045,
0.13636313378810883,
0.06864230334758759,
0.13800722360610962,
-0.004035290330648422,
0.36933788657188416,
0.2155340313911438,
-0.04095647484064102,
0.2696603834629059,
0.049553148448467255,
-0.12011763453483582,
-0.16362632811069489,
0.11930280923843384,
0.03172415867447853,
-0.290544718503952,
-0.019627436995506287,
0.4356467127799988,
-0.15255612134933472,
0.24142277240753174,
0.44143083691596985,
-0.11877404898405075,
-0.02535412088036537,
-0.18716178834438324,
0.21855880320072174,
0.14079920947551727,
-0.026811841875314713,
-0.08513769507408142,
-0.005383547395467758,
-0.2538854777812958,
-0.06525124609470367,
0.3296319842338562,
-0.1268233209848404,
0.4315141439437866,
0.1532037854194641,
0.2892070412635803,
-0.01847047731280327,
-0.05140719190239906,
-0.2919021248817444,
0.2905481159687042,
0.25433409214019775,
-0.23410165309906006,
0.415740430355072,
-0.10252450406551361,
-0.21352696418762207,
-0.6377741694450378,
-0.37067940831184387,
-0.08373959362506866,
-0.13306309282779694,
-0.04485947638750076,
-0.0630304217338562,
0.16435343027114868,
0.061436109244823456,
0.07715995609760284,
-0.06676118075847626,
0.2787645757198334,
-0.18456237018108368,
0.10622963309288025,
-0.33188295364379883,
-0.3990285396575928,
-0.019308118149638176,
0.23811917006969452,
0.01827249489724636,
-0.11488112807273865,
0.0174302589148283,
-0.046467944979667664,
-0.07560288161039352,
-0.1490136682987213,
0.11283780634403229,
-0.01411139965057373,
-0.1526143103837967,
0.13773296773433685,
-0.02533257007598877,
-0.2624073028564453,
-0.22783571481704712,
0.3238840103149414,
-0.32887303829193115,
0.004554146900773048,
0.45673561096191406,
-0.18968376517295837,
-0.05533435568213463,
-0.05129353702068329,
-0.3140719532966614,
-0.581460177898407,
-0.053909800946712494,
0.017290711402893066,
0.034301478415727615,
0.32963305711746216,
0.34804239869117737,
0.030773989856243134,
0.1842593550682068,
0.03400556370615959,
-0.0598001703619957,
0.08541790395975113,
0.11920306086540222,
0.31462550163269043,
-0.03845174238085747,
-0.2886618971824646,
-0.34714624285697937,
-0.11079138517379761,
0.07097923755645752,
0.07621534913778305,
-0.3193144202232361,
0.1262015849351883,
-0.12603750824928284,
0.05120332911610603,
-0.2906244993209839,
0.022035159170627594,
0.448099285364151,
0.11024507135152817,
-0.008791772648692131,
0.21246546506881714,
0.013971421867609024,
0.30608829855918884,
0.04166557267308235,
0.21448448300361633,
-0.03469454124569893,
0.17872604727745056,
-0.045640990138053894,
0.6495579481124878,
-0.14180046319961548,
-0.38593488931655884,
0.1767016500234604,
-0.1262180656194687,
-0.17933616042137146,
-0.00940673053264618,
-0.3002760112285614,
-0.003125453134998679,
-0.2587316632270813,
-0.0353839248418808,
0.0021562501788139343,
-0.2854905128479004,
-0.32541418075561523,
-0.18113823235034943,
0.13426688313484192,
-0.1632562279701233,
-0.3281495273113251,
0.3672776222229004,
-0.2507420778274536,
0.2550690174102783,
-0.15651372075080872,
-0.14477157592773438,
-0.1669241487979889,
-0.4364984631538391,
-0.03023330681025982,
0.19782334566116333,
-0.2999420762062073,
0.02716180309653282,
-0.5152041912078857,
-0.236068457365036,
-0.1595631241798401,
0.08459796011447906,
0.3666800260543823,
0.5396208763122559,
0.030301038175821304,
0.034953273832798004,
0.08058568835258484,
0.10107032209634781,
0.41064178943634033,
0.18398244678974152,
-0.07503245770931244,
0.18558603525161743,
0.1655878722667694,
-0.35793617367744446,
-0.28352120518684387,
-0.5400987267494202,
-0.08220431953668594,
0.252879798412323,
0.09672657400369644,
-0.2896074950695038,
-0.24265071749687195,
0.22253456711769104,
0.04142904654145241,
-0.2890588343143463,
-0.04357591271400452,
0.01720919832587242,
-0.23117303848266602,
-0.20426009595394135,
0.10622568428516388,
0.2091032862663269,
0.38879045844078064,
-0.2306029349565506,
-0.10891975462436676,
0.018064573407173157,
0.20605623722076416,
0.17588120698928833,
-0.0173781868070364,
0.12107264995574951,
-0.12726356089115143,
-0.2719097137451172,
-0.2843085825443268,
0.22120030224323273,
0.12467492371797562,
0.4509957730770111,
0.11753085255622864,
-0.3715094029903412,
0.1879754364490509,
-0.057256538420915604,
0.340912789106369,
0.007406607270240784,
-0.11040902882814407,
0.34728294610977173,
0.1715257316827774,
0.3176766633987427,
0.09935840219259262,
-0.028953395783901215,
0.26587313413619995,
-0.07713234424591064,
-0.4949769079685211,
-0.04186218976974487,
0.27453336119651794,
-0.07302429527044296,
-0.0733686238527298,
-0.02415122091770172,
-0.209478959441185,
-0.2615412771701813,
0.4185965657234192,
0.3421195447444916,
1.0206489562988281,
-0.2603800296783447,
0.3446720540523529,
0.10921036452054977,
-0.060601480305194855,
0.49505680799484253,
-0.15399694442749023,
0.1934904009103775,
-0.5524522662162781,
0.04724026843905449,
-0.11169172078371048,
-0.19717247784137726,
-0.1783650815486908,
0.34370511770248413,
-0.3830956220626831,
0.13299895823001862,
-0.09648330509662628,
0.1960601955652237,
0.14222756028175354,
0.31962889432907104,
0.20939426124095917,
-0.20901517570018768,
-0.23682478070259094,
-0.003560660406947136,
-0.4814990758895874,
-0.09908919036388397,
-0.03797366842627525,
-0.2874804735183716,
-0.00013706833124160767,
-0.3918529152870178,
-0.20003628730773926,
0.19048914313316345,
-0.29227739572525024,
0.3384348750114441,
0.5059813261032104,
-0.10644374787807465,
0.22281327843666077,
0.19872711598873138,
0.3068525195121765,
-0.045633796602487564,
0.06118910014629364,
-0.27032405138015747,
-0.06260416656732559,
0.11660388112068176,
-0.057284824550151825,
-0.05342921242117882,
0.4100272059440613,
-0.04768291488289833,
-0.3138558864593506,
0.3178364634513855,
0.014437335543334484,
-0.17577092349529266,
0.15726935863494873,
-0.067201629281044,
0.08750443160533905,
-0.41170570254325867,
0.27144864201545715,
-0.21885740756988525,
-0.31851083040237427,
-0.26868340373039246,
0.003916214220225811,
0.018921010196208954,
-0.12270354479551315,
0.10436993837356567,
0.31816980242729187,
0.014800339937210083,
0.14292530715465546,
0.16663622856140137,
0.2979535758495331,
0.22282752394676208,
0.5636559724807739,
0.3159727454185486,
0.011753320693969727,
-0.20831474661827087,
0.1311718225479126,
0.006909423507750034,
-0.8838167786598206,
0.19761759042739868,
-0.03138064220547676,
-0.2637524902820587,
0.21239115297794342,
0.37532779574394226,
0.1270447075366974,
0.4987851083278656,
-0.17407982051372528,
-0.424702525138855,
-0.3973771333694458,
0.006599500775337219,
0.174264058470726,
0.0011970847845077515,
0.0514228418469429,
0.5306834578514099,
0.19821935892105103,
0.15471722185611725,
-0.2049756944179535,
0.18318019807338715,
-0.3399905264377594,
0.25543928146362305,
-0.11082524061203003,
-0.41956207156181335,
-0.03815194219350815,
0.12543199956417084,
0.04387335479259491,
0.0017527155578136444,
0.09149196743965149,
-0.054966703057289124,
-0.18266500532627106,
0.17931437492370605,
0.27356216311454773,
-0.20960849523544312,
-0.20473991334438324,
-0.004650816321372986,
-0.02193005383014679,
0.10297376662492752,
-0.0729960948228836,
0.00789722055196762,
-0.15854842960834503,
0.549696683883667,
-0.09683722257614136,
-0.07829498499631882,
-0.321249783039093,
0.03207146376371384,
-0.23294594883918762,
-0.05529676377773285,
0.17893609404563904,
0.2310502976179123,
0.14143411815166473,
-0.16718903183937073,
-0.7330247163772583,
0.14692364633083344,
0.2807041108608246,
-0.07894819974899292,
0.2824501097202301,
-0.6361717581748962,
-0.2515563666820526,
-0.12406904995441437,
0.058936625719070435,
0.01782314106822014,
-0.29064345359802246,
-0.11902442574501038,
0.15008515119552612,
0.07920800894498825,
-0.22283446788787842,
-0.21998175978660583,
-0.007126742973923683,
-0.15680719912052155,
-0.18953169882297516,
0.4388341009616852,
0.05041131004691124,
-0.17817392945289612,
-0.09514656662940979,
0.020867332816123962,
0.1502608209848404,
-0.10834331810474396,
0.0020460509695112705,
0.5980406999588013,
-0.13318146765232086,
-0.02910071238875389,
0.456070214509964,
-0.001709073781967163,
-0.08082757145166397,
0.011111222207546234,
-0.24031901359558105,
0.10640877485275269,
-0.1864721179008484,
0.028415899723768234,
0.2730589210987091,
0.0053153447806835175,
-0.16144342720508575,
0.11166632175445557,
0.01803424209356308,
-0.14061081409454346,
-0.20857888460159302,
0.5285695791244507,
-0.1294042468070984,
-0.11113128066062927,
-0.20984983444213867,
0.25221896171569824,
-0.2701117694377899,
0.004977590404450893,
-0.13915228843688965,
-0.07524175196886063,
-0.17433515191078186,
-0.21616902947425842,
-0.19599811732769012,
0.10436327755451202,
0.2675894796848297,
0.2678266167640686,
0.17319387197494507,
-0.292314350605011,
0.010725192725658417,
0.4745837152004242,
0.08574096858501434,
-0.2254718691110611,
0.4008435904979706,
0.32856231927871704,
-0.09891852736473083,
0.024350197985768318,
0.34102532267570496,
0.5116844177246094,
0.5268765091896057,
-0.27554047107696533,
0.029622260481119156,
0.09985306859016418,
-0.1723218411207199,
0.3009313642978668,
0.12202691286802292,
0.5902808904647827,
0.15899984538555145,
0.13224413990974426,
-0.023708293214440346,
-0.02508227899670601,
0.23306448757648468,
-0.036525119096040726,
0.19096454977989197,
0.08038115501403809,
0.6249294281005859,
0.23981918394565582,
-0.35915854573249817,
-0.1490706205368042,
0.08431816846132278,
-0.4341332018375397,
0.005539947655051947,
0.46048471331596375,
-0.049365922808647156,
0.28800010681152344,
-0.06462600827217102,
-0.026343977078795433,
0.15817265212535858,
0.6270228624343872,
0.23330338299274445,
0.2689681649208069,
-0.34173452854156494,
0.11560580134391785,
-0.32565122842788696,
0.30072662234306335,
-0.0014743059873580933,
-0.08987303078174591,
0.07919662445783615,
0.0009102541953325272,
0.05939766392111778,
0.1766049563884735,
0.1285301148891449,
0.07680471986532211,
-0.14709264039993286,
0.23895122110843658,
-0.16914226114749908,
0.02404322475194931,
0.0808025449514389,
0.22791309654712677,
-0.0594039112329483,
-0.32999187707901,
0.217532217502594,
0.10713180899620056,
-0.019447198137640953,
-0.07325653731822968,
0.054049037396907806,
0.12301939725875854,
0.1730819195508957,
0.10390540212392807,
0.034520141780376434,
0.5826875567436218,
0.12415967136621475,
-0.06382731348276138,
0.3305566608905792,
-0.1148175522685051,
-0.17466218769550323,
0.16456231474876404,
0.24761907756328583,
0.6241377592086792,
-0.03434651345014572,
0.25568875670433044,
-0.44834673404693604,
-0.21278731524944305,
-0.026163244619965553,
0.07279698550701141,
-0.25804615020751953,
0.2388155460357666,
-0.2617354393005371,
-0.03231417015194893,
0.3202947974205017,
-0.006378062069416046,
0.29820191860198975,
0.09396368265151978,
-0.4200735092163086,
-0.46412184834480286,
0.3670327067375183,
-0.2881059944629669,
-0.23062849044799805,
-0.14516982436180115,
0.11228165775537491,
0.03078039363026619,
0.08315202593803406,
-0.6610729694366455,
-0.009856000542640686,
0.33231374621391296,
-0.026302561163902283,
-0.22136369347572327,
-0.1205214411020279,
0.01226385124027729,
0.18510191142559052,
-0.0976044237613678,
0.27065566182136536,
-0.09607880562543869,
-0.06466731429100037,
-0.45411038398742676,
-0.1759287714958191
] |
https://github.com/huggingface/datasets/issues/468 | UnicodeDecodeError while loading PAN-X task of XTREME dataset | Indeed. Solution 1 is the simplest.
This is actually a recurring problem.
I think we should scan all the datasets with regexpr to fix the use of `open()` without encodings.
And probably add a test in the CI to forbid using this in the future. | Hi 🤗 team!
## Description of the problem
I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset:
```
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-5-1d61f439b843> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
528 ignore_verifications = ignore_verifications or save_infos
529 # Download/copy dataset processing script
--> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True)
531
532 # Get dataset builder class from the processing script
/usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs)
265
266 # Download external imports if needed
--> 267 imports = get_imports(local_path)
268 local_imports = []
269 library_imports = []
/usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path)
156 lines = []
157 with open(file_path, mode="r") as f:
--> 158 lines.extend(f.readlines())
159
160 logger.info("Checking %s for additional imports.", file_path)
/usr/lib/python3.6/encodings/ascii.py in decode(self, input, final)
24 class IncrementalDecoder(codecs.IncrementalDecoder):
25 def decode(self, input, final=False):
---> 26 return codecs.ascii_decode(input, self.errors)[0]
27
28 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128)
```
## Steps to reproduce
Install from nlp's master branch
```python
pip install git+https://github.com/huggingface/nlp.git
```
then run
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
```
## OS / platform details
- `nlp` version: latest from master
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: True
- Using distributed or parallel set-up in script?: False
## Proposed solution
Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding:
```
# old
with open(filepath) as f
# new
with open(filepath, encoding='utf-8') as f
```
or raise a warning that suggests setting the locale explicitly, e.g.
```python
import locale
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
```
I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix! | 45 | UnicodeDecodeError while loading PAN-X task of XTREME dataset
Hi 🤗 team!
## Description of the problem
I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset:
```
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-5-1d61f439b843> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
528 ignore_verifications = ignore_verifications or save_infos
529 # Download/copy dataset processing script
--> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True)
531
532 # Get dataset builder class from the processing script
/usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs)
265
266 # Download external imports if needed
--> 267 imports = get_imports(local_path)
268 local_imports = []
269 library_imports = []
/usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path)
156 lines = []
157 with open(file_path, mode="r") as f:
--> 158 lines.extend(f.readlines())
159
160 logger.info("Checking %s for additional imports.", file_path)
/usr/lib/python3.6/encodings/ascii.py in decode(self, input, final)
24 class IncrementalDecoder(codecs.IncrementalDecoder):
25 def decode(self, input, final=False):
---> 26 return codecs.ascii_decode(input, self.errors)[0]
27
28 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128)
```
## Steps to reproduce
Install from nlp's master branch
```python
pip install git+https://github.com/huggingface/nlp.git
```
then run
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
```
## OS / platform details
- `nlp` version: latest from master
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: True
- Using distributed or parallel set-up in script?: False
## Proposed solution
Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding:
```
# old
with open(filepath) as f
# new
with open(filepath, encoding='utf-8') as f
```
or raise a warning that suggests setting the locale explicitly, e.g.
```python
import locale
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
```
I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix!
Indeed. Solution 1 is the simplest.
This is actually a recurring problem.
I think we should scan all the datasets with regexpr to fix the use of `open()` without encodings.
And probably add a test in the CI to forbid using this in the future. | [
-0.33260098099708557,
-0.09301108866930008,
-0.133647620677948,
0.25542962551116943,
0.3521755337715149,
-0.027749501168727875,
0.22498297691345215,
0.3496464192867279,
-0.02869960106909275,
0.03822866082191467,
-0.09041059762239456,
0.15027828514575958,
-0.07617486268281937,
-0.1970372051000595,
0.18910594284534454,
-0.2467028796672821,
-0.07382670789957047,
0.1824580729007721,
0.10780707001686096,
0.006992027163505554,
-0.3558880388736725,
0.11441248655319214,
-0.1869959533214569,
0.26370924711227417,
-0.3771475553512573,
0.08108232170343399,
0.29786545038223267,
0.32046517729759216,
-0.1932806670665741,
-0.6116119623184204,
0.4130364954471588,
-0.05366411432623863,
0.4325029253959656,
0.3163451850414276,
-0.00010860414477065206,
0.08258548378944397,
0.392910897731781,
-0.13196976482868195,
-0.33467841148376465,
-0.19399715960025787,
-0.5915248990058899,
-0.18125174939632416,
-0.009823616594076157,
-0.25958719849586487,
0.1902405023574829,
0.05620782822370529,
-0.06423614174127579,
-0.3830474615097046,
0.18113359808921814,
0.20718979835510254,
0.241638645529747,
0.37056347727775574,
0.0213380865752697,
0.09122849255800247,
-0.04557503014802933,
0.10742630064487457,
-0.15425586700439453,
0.24941876530647278,
0.43462446331977844,
0.06277500838041306,
-0.019149228930473328,
0.2926936745643616,
-0.04861623793840408,
0.24812065064907074,
-0.10235550254583359,
0.13064594566822052,
0.13999056816101074,
-0.466004878282547,
0.1134835034608841,
0.0036376267671585083,
0.2718747854232788,
-0.36644530296325684,
-0.2865583896636963,
-0.22526556253433228,
-0.1094699501991272,
-0.5443438291549683,
0.26449522376060486,
0.0905640497803688,
-0.15965981781482697,
-0.021132033318281174,
0.11315922439098358,
-0.042386993765830994,
-0.17351946234703064,
0.03912118077278137,
0.05435924977064133,
0.3878183960914612,
-0.060074225068092346,
-0.051322609186172485,
-0.0941760241985321,
-0.17860223352909088,
0.40828460454940796,
-0.14587882161140442,
-0.1436944305896759,
0.3246290981769562,
-0.2863636016845703,
0.07242228835821152,
-0.05504607409238815,
-0.3371773660182953,
0.06681638956069946,
-0.046310193836688995,
-0.07882300764322281,
0.2744791507720947,
-0.04955583065748215,
0.053195495158433914,
0.30930662155151367,
0.15567508339881897,
0.20950737595558167,
0.22455669939517975,
0.1834983378648758,
0.1982240229845047,
0.08294433355331421,
-0.0012046098709106445,
-0.17585384845733643,
-0.17713144421577454,
0.36548373103141785,
0.1934712827205658,
0.5531741976737976,
-0.3191606104373932,
-0.12211527675390244,
0.008484024554491043,
0.17288550734519958,
-0.1787235140800476,
0.044403038918972015,
0.014408290386199951,
0.2223310023546219,
0.5070412158966064,
-0.22240717709064484,
0.21857374906539917,
-0.46227431297302246,
-0.12834762036800385,
-0.13588926196098328,
0.17961016297340393,
-0.14607806503772736,
-0.07831306755542755,
0.09638944268226624,
0.12528914213180542,
0.16314320266246796,
-0.14224091172218323,
0.3579082489013672,
-0.06938047707080841,
0.03964921087026596,
-0.20392775535583496,
-0.22019460797309875,
0.013781052082777023,
0.13078288733959198,
0.10396286100149155,
0.055150412023067474,
-0.17533551156520844,
-0.036968011409044266,
0.21710968017578125,
-0.1871834397315979,
-0.2070104330778122,
-0.07155454158782959,
0.2629821300506592,
0.02677338197827339,
0.02515391632914543,
-0.41346678137779236,
-0.0887361466884613,
0.3430744707584381,
0.06208816543221474,
0.11399125307798386,
-0.2957776188850403,
0.040442053228616714,
-0.08587624132633209,
0.20371173322200775,
0.3430534601211548,
-0.1321643739938736,
0.04646320641040802,
0.17790473997592926,
-0.15501092374324799,
0.22462794184684753,
0.2967447340488434,
-0.19222788512706757,
0.09375277906656265,
-0.09892179816961288,
0.553920328617096,
0.5879886746406555,
-0.41023945808410645,
-0.4520799517631531,
0.16967923939228058,
-0.25889748334884644,
0.19520168006420135,
-0.11641528457403183,
0.1070554107427597,
0.3267495632171631,
-0.11743243038654327,
0.3066207766532898,
0.6193358898162842,
-0.11055196821689606,
0.11103122681379318,
-0.21586331725120544,
0.02458210475742817,
0.0014835931360721588,
0.27852481603622437,
0.2359105944633484,
-0.19382062554359436,
0.11450494825839996,
0.2641793191432953,
0.24365150928497314,
-0.3050077259540558,
0.14345334470272064,
0.2776196002960205,
0.09951163828372955,
0.050675563514232635,
-0.15964531898498535,
-0.3252388536930084,
-0.2702021300792694,
0.2318238914012909,
-0.13834625482559204,
0.1085471510887146,
-0.3714391589164734,
0.040146760642528534,
-0.29631999135017395,
0.044794537127017975,
-0.5638593435287476,
-0.12139414250850677,
0.16307000815868378,
0.20128172636032104,
0.07950983941555023,
0.06130913272500038,
-0.3085089325904846,
0.27930691838264465,
-0.10502622276544571,
-0.056554000824689865,
-0.5994642972946167,
0.25911927223205566,
-0.06749255210161209,
-0.3134036660194397,
-0.07478661835193634,
0.3225340247154236,
0.08286814391613007,
-0.13501960039138794,
-0.33673977851867676,
0.2787977457046509,
-0.08552542328834534,
0.014384575188159943,
0.06644332408905029,
-0.17046625912189484,
0.24252080917358398,
-0.4210939109325409,
0.1616300791501999,
0.07192573696374893,
0.12785376608371735,
0.015130721032619476,
0.1468046009540558,
0.3288504481315613,
0.00963975116610527,
0.00022079050540924072,
-0.0022293701767921448,
-0.042643509805202484,
0.4274258315563202,
-0.002031709998846054,
0.08647046983242035,
-0.25726062059402466,
0.2339753359556198,
-0.023823481053113937,
0.16265755891799927,
-0.05638095736503601,
-0.19473148882389069,
-0.08841415494680405,
0.5688617825508118,
-0.13657227158546448,
0.19616389274597168,
0.12719951570034027,
-0.02231171727180481,
0.09121914952993393,
-0.0803106501698494,
0.01614014431834221,
0.2614571452140808,
0.018195442855358124,
0.05557040125131607,
0.006880804896354675,
0.10758980363607407,
0.029095187783241272,
0.14123885333538055,
-0.08436723053455353,
-0.08641378581523895,
-0.07107733935117722,
-0.08670374751091003,
-0.03006673976778984,
-0.3335585296154022,
-0.192359060049057,
-0.10553695261478424,
0.3316015899181366,
-0.16600339114665985,
-0.05351978540420532,
-0.17444312572479248,
-0.1915304958820343,
0.03737371414899826,
-0.1773100048303604,
-0.1640254259109497,
-0.23624418675899506,
-0.23185931146144867,
0.02553541027009487,
0.12546774744987488,
0.32209619879722595,
-0.4353751540184021,
-0.3569747805595398,
0.12765586376190186,
-0.3397228717803955,
0.031621530652046204,
-0.2119198441505432,
-0.25463706254959106,
0.10599657893180847,
0.3112894892692566,
0.17804701626300812,
0.07554084062576294,
-0.3896883428096771,
0.11556941270828247,
-0.24738848209381104,
-0.07559006661176682,
0.05932851508259773,
-0.316318154335022,
0.1726503074169159,
-0.03935787081718445,
0.08392184972763062,
-0.05629659444093704,
-0.18118701875209808,
0.29167136549949646,
-0.2333993762731552,
-0.1716850996017456,
0.20625829696655273,
0.001939201494678855,
-0.19655901193618774,
0.0024222880601882935,
-0.11964767426252365,
-0.32808569073677063,
-0.3669332265853882,
0.0012899115681648254,
-0.07779887318611145,
0.18527908623218536,
0.14429742097854614,
-0.2602289617061615,
-0.11823469400405884,
0.11433817446231842,
-0.13347364962100983,
-0.15365855395793915,
-0.40957146883010864,
0.48747438192367554,
-0.3722843527793884,
-0.21433435380458832,
-0.021901249885559082,
-0.17569243907928467,
0.47819796204566956,
0.13080373406410217,
-0.22841086983680725,
-0.0028278129175305367,
-0.32693690061569214,
0.2939240038394928,
0.007002424448728561,
0.018922314047813416,
0.13988308608531952,
0.000427943654358387,
0.00585930235683918,
0.04151807725429535,
-0.0540437251329422,
-0.19609925150871277,
0.27664613723754883,
0.17084331810474396,
0.10095490515232086,
0.383543998003006,
-0.12196768820285797,
0.180129274725914,
-0.049235809594392776,
0.3242916464805603,
0.547832190990448,
0.0955018624663353,
0.06512799113988876,
-0.023380249738693237,
-0.42218080163002014,
-0.04895912855863571,
-0.05510711669921875,
0.04864010959863663,
0.007995657622814178,
-0.03251409903168678,
-0.10515645146369934,
-0.07105549424886703,
-0.18580934405326843,
-0.15421748161315918,
-0.2681569457054138,
0.14978891611099243,
-0.2403445839881897,
0.24493879079818726,
-0.116439089179039,
0.007654182612895966,
-0.3299107551574707,
0.02378528192639351,
-0.07131938636302948,
0.13502591848373413,
0.21469265222549438,
0.07934644818305969,
-0.1952008605003357,
0.36819472908973694,
-0.4347114562988281,
0.0998159870505333,
0.32494664192199707,
0.703830897808075,
0.032696787267923355,
0.053937964141368866,
0.04143955558538437,
-0.04729267582297325,
-0.05771559476852417,
-0.11163102835416794,
0.1558760404586792,
0.16669584810733795,
-0.2209492027759552,
-0.24022158980369568,
-0.03959894925355911,
-0.1052684634923935,
0.3003044128417969,
0.22276070713996887,
-0.035434603691101074,
-0.34227004647254944,
-0.10957249999046326,
0.3165018558502197,
0.1825249344110489,
-0.17803196609020233,
-0.0400574654340744,
-0.41105619072914124,
-0.592824399471283,
-0.4134848415851593,
0.0432141087949276,
0.24060727655887604,
0.42734572291374207,
0.33781611919403076,
0.16509868204593658,
-0.20482514798641205,
-0.20787930488586426,
0.22172480821609497,
0.3031235933303833,
0.09479022771120071,
0.06851078569889069,
0.07181994616985321,
-0.23382365703582764,
-0.3942338526248932,
0.1363065540790558,
0.5306171178817749,
0.10898473858833313,
-0.7092877626419067,
-0.07845313102006912,
-0.20329409837722778,
0.25113075971603394,
0.05987712740898132,
-0.05416963994503021,
0.11218804866075516,
-0.18269965052604675,
0.09386283904314041,
0.04371870309114456,
0.10918404906988144,
0.14487411081790924,
0.2128843367099762,
-0.602143406867981,
-0.4522859752178192,
0.1971874088048935,
0.0163845494389534,
0.2952749729156494,
0.3392186462879181,
-0.16427762806415558,
-0.31643712520599365,
-0.0895475298166275,
0.16283614933490753,
0.5518425703048706,
0.049916546791791916,
0.11469338834285736,
0.34666746854782104,
0.041342541575431824,
0.05823948606848717,
0.04596014320850372,
0.18356652557849884,
-0.2096625417470932,
-0.23826633393764496,
-0.05438000708818436,
-0.025275610387325287,
0.1658082902431488,
-0.054314613342285156,
0.08720235526561737,
0.2775222063064575,
0.07343289256095886,
0.03513317555189133,
0.24590958654880524,
0.19846267998218536,
-0.2746991515159607,
-0.4539572596549988,
-0.5819119215011597,
0.1532522290945053,
-0.32202017307281494,
-0.03099871799349785,
-0.19672676920890808,
-0.25224393606185913,
0.026722829788923264,
-0.22272512316703796,
0.04419519007205963,
0.22485888004302979,
-0.15571437776088715,
0.2739734649658203,
-0.16501717269420624,
-0.5444103479385376,
0.20623189210891724,
0.088070809841156,
0.30158451199531555,
-0.07060115039348602,
0.13508127629756927,
0.17312993109226227,
0.17696818709373474,
-0.021634168922901154,
-0.08284440636634827,
-0.02537570521235466,
0.017396528273820877,
-0.031031344085931778,
-0.2499276101589203,
0.06988708674907684,
-0.0188625305891037,
-0.3566620945930481,
-0.22131794691085815,
0.20036813616752625,
-0.002419024705886841,
-0.08731714636087418,
-0.20539490878582,
-0.19939345121383667,
0.017507318407297134,
-0.18964843451976776,
0.15942025184631348,
0.062168411910533905,
-0.2342938780784607,
0.08306241780519485,
0.03206104785203934,
-0.3447245657444,
0.01833963207900524,
0.0949898511171341,
0.17935916781425476,
-0.40320318937301636,
0.5781168937683105,
0.1079864352941513,
-0.08765583485364914,
-0.12300549447536469,
0.05097751319408417,
0.1880122721195221,
-0.5171359181404114,
0.04440772905945778,
-0.0069697266444563866,
0.09803532063961029,
-0.1275516003370285,
0.09850449860095978,
0.010874319821596146,
-0.09612957388162613,
0.16773653030395508,
-0.41631880402565,
-0.5901713371276855,
0.11634618043899536,
-0.12011624872684479,
0.21328657865524292,
0.08907879143953323,
0.14830614626407623,
-0.10831815004348755,
-0.04774218797683716,
-0.3042505979537964,
0.1132214292883873,
-0.3167766332626343,
0.21988222002983093,
0.20840170979499817,
-0.07896415144205093,
0.04661058634519577,
0.05502822622656822,
0.20114333927631378,
0.32812029123306274,
-0.07663973420858383,
-0.19023799896240234,
0.034061677753925323,
0.08731214702129364,
-0.08670421689748764,
-0.4576304852962494,
-0.01823599822819233,
0.222219780087471,
-0.05974303558468819,
-0.1353599578142166,
0.11677533388137817,
0.18542104959487915,
-0.06264901161193848,
0.07207011431455612,
0.13729839026927948,
0.10723067820072174,
-0.12613773345947266,
0.2981205880641937,
-0.2095629870891571,
0.43480902910232544,
0.03867272660136223,
0.26519256830215454,
0.08830615878105164,
0.07211799919605255,
-0.23118364810943604,
-0.10483049601316452,
0.11809711903333664,
0.18147170543670654,
0.14326252043247223,
-0.5272979736328125,
0.17888127267360687,
0.2601991891860962,
-0.04611834138631821,
0.3760097026824951,
-0.18355287611484528,
-0.016538744792342186,
0.12088922411203384,
0.24170240759849548,
-0.14114518463611603,
-0.06865859031677246,
0.3440244197845459,
-0.2144445925951004,
0.00010620057582855225,
0.44602522253990173,
0.15173204243183136,
0.11513565480709076,
0.2358342558145523,
0.10733192414045334,
0.28256118297576904,
-0.006898723542690277,
0.29593876004219055,
0.47516414523124695,
-0.10158661007881165,
-0.047653067857027054,
0.23228371143341064,
0.1343567818403244,
0.0184188112616539,
0.6424046158790588,
-0.4427739381790161,
0.5353492498397827,
-0.05050397664308548,
0.2583872377872467,
-0.32247164845466614,
-0.37954092025756836,
-0.2869463860988617,
-0.1631641387939453,
-0.014801569283008575,
0.23669812083244324,
0.16034863889217377,
-0.3238866925239563,
-0.1891298145055771,
0.004872444085776806,
-0.04392464458942413,
0.1654580682516098,
-0.22765904664993286,
0.13106276094913483,
-0.05016561597585678,
-0.018656820058822632,
-0.13772036135196686,
-0.01875671185553074,
0.011308975517749786,
0.1884765625,
-0.0382179319858551,
0.23339776694774628,
-0.10125680267810822,
-0.08609102666378021,
0.1590767800807953,
0.27966415882110596,
-0.06504090875387192,
-0.2643451690673828,
0.46347326040267944,
0.501072108745575,
-0.011483527719974518,
-0.020963963121175766,
0.189084991812706,
0.3574218153953552,
0.4347184896469116,
-0.22350433468818665,
0.10345914959907532,
0.0009247642010450363,
0.018582439050078392,
0.05001348257064819,
0.14360801875591278,
0.014055013656616211,
0.6835598349571228,
0.1786808967590332,
0.2524062395095825,
-0.12520286440849304,
-0.01675385609269142,
0.09701904654502869,
-0.2486756443977356,
0.03302709758281708,
0.26611414551734924,
0.13703563809394836,
-0.03237311169505119,
-0.27013787627220154,
-0.09492401033639908,
-0.2792065143585205,
0.006541822105646133,
0.384693443775177,
0.021352777257561684,
0.10605386644601822,
-0.1315310150384903,
0.07637830823659897,
0.002045411616563797,
0.47455501556396484,
0.34034550189971924,
-0.014447726309299469,
-0.3034822940826416,
-0.2072485387325287,
-0.7285953760147095,
0.19436097145080566,
-0.19841518998146057,
-0.32850322127342224,
0.24970830976963043,
-0.08271027356386185,
-0.07339558750391006,
0.33604830503463745,
0.21812883019447327,
0.39876189827919006,
0.07366002351045609,
0.13134360313415527,
-0.3173837959766388,
-0.03503231331706047,
0.44393837451934814,
0.07822857052087784,
-0.08435741811990738,
-0.34023603796958923,
0.10982957482337952,
0.07426823675632477,
0.10897888988256454,
-0.19356796145439148,
-0.020789235830307007,
-0.0690448060631752,
-0.13243688642978668,
0.3674144446849823,
0.280542254447937,
0.3930171728134155,
-0.1928330361843109,
-0.12261831760406494,
-0.1714552342891693,
-0.3176397979259491,
-0.08104847371578217,
0.3091653883457184,
0.0883629322052002,
0.5725005865097046,
0.01040768250823021,
-0.08740879595279694,
-0.6893696188926697,
0.32239535450935364,
-0.1301129311323166,
0.0926101952791214,
0.003372740000486374,
0.14715854823589325,
-0.07455084472894669,
0.06257171928882599,
0.0069270385429263115,
0.1489863395690918,
0.04574793204665184,
0.40576833486557007,
-0.17091837525367737,
-0.5643860697746277,
0.39667654037475586,
-0.08558877557516098,
-0.6857155561447144,
-0.11039163917303085,
0.01079423725605011,
-0.0288262739777565,
-0.051724858582019806,
-0.3539995849132538,
0.3004589378833771,
0.23698002099990845,
-0.007976841181516647,
-0.17235015332698822,
0.20726726949214935,
0.032172612845897675,
0.04026266559958458,
-0.004320818930864334,
0.44646701216697693,
-0.1106189414858818,
-0.06295508146286011,
0.13786877691745758,
-0.2023230642080307
] |
https://github.com/huggingface/datasets/issues/468 | UnicodeDecodeError while loading PAN-X task of XTREME dataset | I've created a simple function that seems to do the trick:
```python
def apply_encoding_on_file_open(filepath: str):
"""Apply UTF-8 encoding for all instances where a non-binary file is opened."""
with open(filepath, 'r', encoding='utf-8') as input_file:
regexp = re.compile(r"""
(?!.*\b(?:encoding|rb|wb|wb+|ab|ab+)\b)
(open)
\((.*)\)
""")
input_text = input_file.read()
match = regexp.search(input_text)
if match:
print('Found match!', match.group())
# append utf-8 encoding to matching groups in-place
output = regexp.sub(lambda m: m.group()[:-1]+', encoding="utf-8")', input_text)
with open(filepath, 'w', encoding='utf-8') as output_file:
output_file.write(output)
else:
print("No match found!")
```
The regexp does a negative lookahead to avoid matching on cases where the encoding is already specified or when binary files are involved.
From an implementation perspective:
* Would it make sense to include this function in `nlp-cli` so that we can run something like
```
nlp-cli fix_encoding path/to/folder
```
and the command recursively fixes all files in the target?
* What is the desired behaviour in the CI test? Here we could either have a simple script that we run as a `job` in the CI and raises an error if a missing encoding is detected. Alternatively we could incorporate this behaviour into the CLI and run that in the CI.
Please let me know what you prefer among the alternatives.
| Hi 🤗 team!
## Description of the problem
I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset:
```
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-5-1d61f439b843> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
528 ignore_verifications = ignore_verifications or save_infos
529 # Download/copy dataset processing script
--> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True)
531
532 # Get dataset builder class from the processing script
/usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs)
265
266 # Download external imports if needed
--> 267 imports = get_imports(local_path)
268 local_imports = []
269 library_imports = []
/usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path)
156 lines = []
157 with open(file_path, mode="r") as f:
--> 158 lines.extend(f.readlines())
159
160 logger.info("Checking %s for additional imports.", file_path)
/usr/lib/python3.6/encodings/ascii.py in decode(self, input, final)
24 class IncrementalDecoder(codecs.IncrementalDecoder):
25 def decode(self, input, final=False):
---> 26 return codecs.ascii_decode(input, self.errors)[0]
27
28 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128)
```
## Steps to reproduce
Install from nlp's master branch
```python
pip install git+https://github.com/huggingface/nlp.git
```
then run
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
```
## OS / platform details
- `nlp` version: latest from master
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: True
- Using distributed or parallel set-up in script?: False
## Proposed solution
Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding:
```
# old
with open(filepath) as f
# new
with open(filepath, encoding='utf-8') as f
```
or raise a warning that suggests setting the locale explicitly, e.g.
```python
import locale
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
```
I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix! | 200 | UnicodeDecodeError while loading PAN-X task of XTREME dataset
Hi 🤗 team!
## Description of the problem
I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset:
```
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-5-1d61f439b843> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
528 ignore_verifications = ignore_verifications or save_infos
529 # Download/copy dataset processing script
--> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True)
531
532 # Get dataset builder class from the processing script
/usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs)
265
266 # Download external imports if needed
--> 267 imports = get_imports(local_path)
268 local_imports = []
269 library_imports = []
/usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path)
156 lines = []
157 with open(file_path, mode="r") as f:
--> 158 lines.extend(f.readlines())
159
160 logger.info("Checking %s for additional imports.", file_path)
/usr/lib/python3.6/encodings/ascii.py in decode(self, input, final)
24 class IncrementalDecoder(codecs.IncrementalDecoder):
25 def decode(self, input, final=False):
---> 26 return codecs.ascii_decode(input, self.errors)[0]
27
28 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128)
```
## Steps to reproduce
Install from nlp's master branch
```python
pip install git+https://github.com/huggingface/nlp.git
```
then run
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
```
## OS / platform details
- `nlp` version: latest from master
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: True
- Using distributed or parallel set-up in script?: False
## Proposed solution
Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding:
```
# old
with open(filepath) as f
# new
with open(filepath, encoding='utf-8') as f
```
or raise a warning that suggests setting the locale explicitly, e.g.
```python
import locale
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
```
I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix!
I've created a simple function that seems to do the trick:
```python
def apply_encoding_on_file_open(filepath: str):
"""Apply UTF-8 encoding for all instances where a non-binary file is opened."""
with open(filepath, 'r', encoding='utf-8') as input_file:
regexp = re.compile(r"""
(?!.*\b(?:encoding|rb|wb|wb+|ab|ab+)\b)
(open)
\((.*)\)
""")
input_text = input_file.read()
match = regexp.search(input_text)
if match:
print('Found match!', match.group())
# append utf-8 encoding to matching groups in-place
output = regexp.sub(lambda m: m.group()[:-1]+', encoding="utf-8")', input_text)
with open(filepath, 'w', encoding='utf-8') as output_file:
output_file.write(output)
else:
print("No match found!")
```
The regexp does a negative lookahead to avoid matching on cases where the encoding is already specified or when binary files are involved.
From an implementation perspective:
* Would it make sense to include this function in `nlp-cli` so that we can run something like
```
nlp-cli fix_encoding path/to/folder
```
and the command recursively fixes all files in the target?
* What is the desired behaviour in the CI test? Here we could either have a simple script that we run as a `job` in the CI and raises an error if a missing encoding is detected. Alternatively we could incorporate this behaviour into the CLI and run that in the CI.
Please let me know what you prefer among the alternatives.
| [
-0.33260098099708557,
-0.09301108866930008,
-0.133647620677948,
0.25542962551116943,
0.3521755337715149,
-0.027749501168727875,
0.22498297691345215,
0.3496464192867279,
-0.02869960106909275,
0.03822866082191467,
-0.09041059762239456,
0.15027828514575958,
-0.07617486268281937,
-0.1970372051000595,
0.18910594284534454,
-0.2467028796672821,
-0.07382670789957047,
0.1824580729007721,
0.10780707001686096,
0.006992027163505554,
-0.3558880388736725,
0.11441248655319214,
-0.1869959533214569,
0.26370924711227417,
-0.3771475553512573,
0.08108232170343399,
0.29786545038223267,
0.32046517729759216,
-0.1932806670665741,
-0.6116119623184204,
0.4130364954471588,
-0.05366411432623863,
0.4325029253959656,
0.3163451850414276,
-0.00010860414477065206,
0.08258548378944397,
0.392910897731781,
-0.13196976482868195,
-0.33467841148376465,
-0.19399715960025787,
-0.5915248990058899,
-0.18125174939632416,
-0.009823616594076157,
-0.25958719849586487,
0.1902405023574829,
0.05620782822370529,
-0.06423614174127579,
-0.3830474615097046,
0.18113359808921814,
0.20718979835510254,
0.241638645529747,
0.37056347727775574,
0.0213380865752697,
0.09122849255800247,
-0.04557503014802933,
0.10742630064487457,
-0.15425586700439453,
0.24941876530647278,
0.43462446331977844,
0.06277500838041306,
-0.019149228930473328,
0.2926936745643616,
-0.04861623793840408,
0.24812065064907074,
-0.10235550254583359,
0.13064594566822052,
0.13999056816101074,
-0.466004878282547,
0.1134835034608841,
0.0036376267671585083,
0.2718747854232788,
-0.36644530296325684,
-0.2865583896636963,
-0.22526556253433228,
-0.1094699501991272,
-0.5443438291549683,
0.26449522376060486,
0.0905640497803688,
-0.15965981781482697,
-0.021132033318281174,
0.11315922439098358,
-0.042386993765830994,
-0.17351946234703064,
0.03912118077278137,
0.05435924977064133,
0.3878183960914612,
-0.060074225068092346,
-0.051322609186172485,
-0.0941760241985321,
-0.17860223352909088,
0.40828460454940796,
-0.14587882161140442,
-0.1436944305896759,
0.3246290981769562,
-0.2863636016845703,
0.07242228835821152,
-0.05504607409238815,
-0.3371773660182953,
0.06681638956069946,
-0.046310193836688995,
-0.07882300764322281,
0.2744791507720947,
-0.04955583065748215,
0.053195495158433914,
0.30930662155151367,
0.15567508339881897,
0.20950737595558167,
0.22455669939517975,
0.1834983378648758,
0.1982240229845047,
0.08294433355331421,
-0.0012046098709106445,
-0.17585384845733643,
-0.17713144421577454,
0.36548373103141785,
0.1934712827205658,
0.5531741976737976,
-0.3191606104373932,
-0.12211527675390244,
0.008484024554491043,
0.17288550734519958,
-0.1787235140800476,
0.044403038918972015,
0.014408290386199951,
0.2223310023546219,
0.5070412158966064,
-0.22240717709064484,
0.21857374906539917,
-0.46227431297302246,
-0.12834762036800385,
-0.13588926196098328,
0.17961016297340393,
-0.14607806503772736,
-0.07831306755542755,
0.09638944268226624,
0.12528914213180542,
0.16314320266246796,
-0.14224091172218323,
0.3579082489013672,
-0.06938047707080841,
0.03964921087026596,
-0.20392775535583496,
-0.22019460797309875,
0.013781052082777023,
0.13078288733959198,
0.10396286100149155,
0.055150412023067474,
-0.17533551156520844,
-0.036968011409044266,
0.21710968017578125,
-0.1871834397315979,
-0.2070104330778122,
-0.07155454158782959,
0.2629821300506592,
0.02677338197827339,
0.02515391632914543,
-0.41346678137779236,
-0.0887361466884613,
0.3430744707584381,
0.06208816543221474,
0.11399125307798386,
-0.2957776188850403,
0.040442053228616714,
-0.08587624132633209,
0.20371173322200775,
0.3430534601211548,
-0.1321643739938736,
0.04646320641040802,
0.17790473997592926,
-0.15501092374324799,
0.22462794184684753,
0.2967447340488434,
-0.19222788512706757,
0.09375277906656265,
-0.09892179816961288,
0.553920328617096,
0.5879886746406555,
-0.41023945808410645,
-0.4520799517631531,
0.16967923939228058,
-0.25889748334884644,
0.19520168006420135,
-0.11641528457403183,
0.1070554107427597,
0.3267495632171631,
-0.11743243038654327,
0.3066207766532898,
0.6193358898162842,
-0.11055196821689606,
0.11103122681379318,
-0.21586331725120544,
0.02458210475742817,
0.0014835931360721588,
0.27852481603622437,
0.2359105944633484,
-0.19382062554359436,
0.11450494825839996,
0.2641793191432953,
0.24365150928497314,
-0.3050077259540558,
0.14345334470272064,
0.2776196002960205,
0.09951163828372955,
0.050675563514232635,
-0.15964531898498535,
-0.3252388536930084,
-0.2702021300792694,
0.2318238914012909,
-0.13834625482559204,
0.1085471510887146,
-0.3714391589164734,
0.040146760642528534,
-0.29631999135017395,
0.044794537127017975,
-0.5638593435287476,
-0.12139414250850677,
0.16307000815868378,
0.20128172636032104,
0.07950983941555023,
0.06130913272500038,
-0.3085089325904846,
0.27930691838264465,
-0.10502622276544571,
-0.056554000824689865,
-0.5994642972946167,
0.25911927223205566,
-0.06749255210161209,
-0.3134036660194397,
-0.07478661835193634,
0.3225340247154236,
0.08286814391613007,
-0.13501960039138794,
-0.33673977851867676,
0.2787977457046509,
-0.08552542328834534,
0.014384575188159943,
0.06644332408905029,
-0.17046625912189484,
0.24252080917358398,
-0.4210939109325409,
0.1616300791501999,
0.07192573696374893,
0.12785376608371735,
0.015130721032619476,
0.1468046009540558,
0.3288504481315613,
0.00963975116610527,
0.00022079050540924072,
-0.0022293701767921448,
-0.042643509805202484,
0.4274258315563202,
-0.002031709998846054,
0.08647046983242035,
-0.25726062059402466,
0.2339753359556198,
-0.023823481053113937,
0.16265755891799927,
-0.05638095736503601,
-0.19473148882389069,
-0.08841415494680405,
0.5688617825508118,
-0.13657227158546448,
0.19616389274597168,
0.12719951570034027,
-0.02231171727180481,
0.09121914952993393,
-0.0803106501698494,
0.01614014431834221,
0.2614571452140808,
0.018195442855358124,
0.05557040125131607,
0.006880804896354675,
0.10758980363607407,
0.029095187783241272,
0.14123885333538055,
-0.08436723053455353,
-0.08641378581523895,
-0.07107733935117722,
-0.08670374751091003,
-0.03006673976778984,
-0.3335585296154022,
-0.192359060049057,
-0.10553695261478424,
0.3316015899181366,
-0.16600339114665985,
-0.05351978540420532,
-0.17444312572479248,
-0.1915304958820343,
0.03737371414899826,
-0.1773100048303604,
-0.1640254259109497,
-0.23624418675899506,
-0.23185931146144867,
0.02553541027009487,
0.12546774744987488,
0.32209619879722595,
-0.4353751540184021,
-0.3569747805595398,
0.12765586376190186,
-0.3397228717803955,
0.031621530652046204,
-0.2119198441505432,
-0.25463706254959106,
0.10599657893180847,
0.3112894892692566,
0.17804701626300812,
0.07554084062576294,
-0.3896883428096771,
0.11556941270828247,
-0.24738848209381104,
-0.07559006661176682,
0.05932851508259773,
-0.316318154335022,
0.1726503074169159,
-0.03935787081718445,
0.08392184972763062,
-0.05629659444093704,
-0.18118701875209808,
0.29167136549949646,
-0.2333993762731552,
-0.1716850996017456,
0.20625829696655273,
0.001939201494678855,
-0.19655901193618774,
0.0024222880601882935,
-0.11964767426252365,
-0.32808569073677063,
-0.3669332265853882,
0.0012899115681648254,
-0.07779887318611145,
0.18527908623218536,
0.14429742097854614,
-0.2602289617061615,
-0.11823469400405884,
0.11433817446231842,
-0.13347364962100983,
-0.15365855395793915,
-0.40957146883010864,
0.48747438192367554,
-0.3722843527793884,
-0.21433435380458832,
-0.021901249885559082,
-0.17569243907928467,
0.47819796204566956,
0.13080373406410217,
-0.22841086983680725,
-0.0028278129175305367,
-0.32693690061569214,
0.2939240038394928,
0.007002424448728561,
0.018922314047813416,
0.13988308608531952,
0.000427943654358387,
0.00585930235683918,
0.04151807725429535,
-0.0540437251329422,
-0.19609925150871277,
0.27664613723754883,
0.17084331810474396,
0.10095490515232086,
0.383543998003006,
-0.12196768820285797,
0.180129274725914,
-0.049235809594392776,
0.3242916464805603,
0.547832190990448,
0.0955018624663353,
0.06512799113988876,
-0.023380249738693237,
-0.42218080163002014,
-0.04895912855863571,
-0.05510711669921875,
0.04864010959863663,
0.007995657622814178,
-0.03251409903168678,
-0.10515645146369934,
-0.07105549424886703,
-0.18580934405326843,
-0.15421748161315918,
-0.2681569457054138,
0.14978891611099243,
-0.2403445839881897,
0.24493879079818726,
-0.116439089179039,
0.007654182612895966,
-0.3299107551574707,
0.02378528192639351,
-0.07131938636302948,
0.13502591848373413,
0.21469265222549438,
0.07934644818305969,
-0.1952008605003357,
0.36819472908973694,
-0.4347114562988281,
0.0998159870505333,
0.32494664192199707,
0.703830897808075,
0.032696787267923355,
0.053937964141368866,
0.04143955558538437,
-0.04729267582297325,
-0.05771559476852417,
-0.11163102835416794,
0.1558760404586792,
0.16669584810733795,
-0.2209492027759552,
-0.24022158980369568,
-0.03959894925355911,
-0.1052684634923935,
0.3003044128417969,
0.22276070713996887,
-0.035434603691101074,
-0.34227004647254944,
-0.10957249999046326,
0.3165018558502197,
0.1825249344110489,
-0.17803196609020233,
-0.0400574654340744,
-0.41105619072914124,
-0.592824399471283,
-0.4134848415851593,
0.0432141087949276,
0.24060727655887604,
0.42734572291374207,
0.33781611919403076,
0.16509868204593658,
-0.20482514798641205,
-0.20787930488586426,
0.22172480821609497,
0.3031235933303833,
0.09479022771120071,
0.06851078569889069,
0.07181994616985321,
-0.23382365703582764,
-0.3942338526248932,
0.1363065540790558,
0.5306171178817749,
0.10898473858833313,
-0.7092877626419067,
-0.07845313102006912,
-0.20329409837722778,
0.25113075971603394,
0.05987712740898132,
-0.05416963994503021,
0.11218804866075516,
-0.18269965052604675,
0.09386283904314041,
0.04371870309114456,
0.10918404906988144,
0.14487411081790924,
0.2128843367099762,
-0.602143406867981,
-0.4522859752178192,
0.1971874088048935,
0.0163845494389534,
0.2952749729156494,
0.3392186462879181,
-0.16427762806415558,
-0.31643712520599365,
-0.0895475298166275,
0.16283614933490753,
0.5518425703048706,
0.049916546791791916,
0.11469338834285736,
0.34666746854782104,
0.041342541575431824,
0.05823948606848717,
0.04596014320850372,
0.18356652557849884,
-0.2096625417470932,
-0.23826633393764496,
-0.05438000708818436,
-0.025275610387325287,
0.1658082902431488,
-0.054314613342285156,
0.08720235526561737,
0.2775222063064575,
0.07343289256095886,
0.03513317555189133,
0.24590958654880524,
0.19846267998218536,
-0.2746991515159607,
-0.4539572596549988,
-0.5819119215011597,
0.1532522290945053,
-0.32202017307281494,
-0.03099871799349785,
-0.19672676920890808,
-0.25224393606185913,
0.026722829788923264,
-0.22272512316703796,
0.04419519007205963,
0.22485888004302979,
-0.15571437776088715,
0.2739734649658203,
-0.16501717269420624,
-0.5444103479385376,
0.20623189210891724,
0.088070809841156,
0.30158451199531555,
-0.07060115039348602,
0.13508127629756927,
0.17312993109226227,
0.17696818709373474,
-0.021634168922901154,
-0.08284440636634827,
-0.02537570521235466,
0.017396528273820877,
-0.031031344085931778,
-0.2499276101589203,
0.06988708674907684,
-0.0188625305891037,
-0.3566620945930481,
-0.22131794691085815,
0.20036813616752625,
-0.002419024705886841,
-0.08731714636087418,
-0.20539490878582,
-0.19939345121383667,
0.017507318407297134,
-0.18964843451976776,
0.15942025184631348,
0.062168411910533905,
-0.2342938780784607,
0.08306241780519485,
0.03206104785203934,
-0.3447245657444,
0.01833963207900524,
0.0949898511171341,
0.17935916781425476,
-0.40320318937301636,
0.5781168937683105,
0.1079864352941513,
-0.08765583485364914,
-0.12300549447536469,
0.05097751319408417,
0.1880122721195221,
-0.5171359181404114,
0.04440772905945778,
-0.0069697266444563866,
0.09803532063961029,
-0.1275516003370285,
0.09850449860095978,
0.010874319821596146,
-0.09612957388162613,
0.16773653030395508,
-0.41631880402565,
-0.5901713371276855,
0.11634618043899536,
-0.12011624872684479,
0.21328657865524292,
0.08907879143953323,
0.14830614626407623,
-0.10831815004348755,
-0.04774218797683716,
-0.3042505979537964,
0.1132214292883873,
-0.3167766332626343,
0.21988222002983093,
0.20840170979499817,
-0.07896415144205093,
0.04661058634519577,
0.05502822622656822,
0.20114333927631378,
0.32812029123306274,
-0.07663973420858383,
-0.19023799896240234,
0.034061677753925323,
0.08731214702129364,
-0.08670421689748764,
-0.4576304852962494,
-0.01823599822819233,
0.222219780087471,
-0.05974303558468819,
-0.1353599578142166,
0.11677533388137817,
0.18542104959487915,
-0.06264901161193848,
0.07207011431455612,
0.13729839026927948,
0.10723067820072174,
-0.12613773345947266,
0.2981205880641937,
-0.2095629870891571,
0.43480902910232544,
0.03867272660136223,
0.26519256830215454,
0.08830615878105164,
0.07211799919605255,
-0.23118364810943604,
-0.10483049601316452,
0.11809711903333664,
0.18147170543670654,
0.14326252043247223,
-0.5272979736328125,
0.17888127267360687,
0.2601991891860962,
-0.04611834138631821,
0.3760097026824951,
-0.18355287611484528,
-0.016538744792342186,
0.12088922411203384,
0.24170240759849548,
-0.14114518463611603,
-0.06865859031677246,
0.3440244197845459,
-0.2144445925951004,
0.00010620057582855225,
0.44602522253990173,
0.15173204243183136,
0.11513565480709076,
0.2358342558145523,
0.10733192414045334,
0.28256118297576904,
-0.006898723542690277,
0.29593876004219055,
0.47516414523124695,
-0.10158661007881165,
-0.047653067857027054,
0.23228371143341064,
0.1343567818403244,
0.0184188112616539,
0.6424046158790588,
-0.4427739381790161,
0.5353492498397827,
-0.05050397664308548,
0.2583872377872467,
-0.32247164845466614,
-0.37954092025756836,
-0.2869463860988617,
-0.1631641387939453,
-0.014801569283008575,
0.23669812083244324,
0.16034863889217377,
-0.3238866925239563,
-0.1891298145055771,
0.004872444085776806,
-0.04392464458942413,
0.1654580682516098,
-0.22765904664993286,
0.13106276094913483,
-0.05016561597585678,
-0.018656820058822632,
-0.13772036135196686,
-0.01875671185553074,
0.011308975517749786,
0.1884765625,
-0.0382179319858551,
0.23339776694774628,
-0.10125680267810822,
-0.08609102666378021,
0.1590767800807953,
0.27966415882110596,
-0.06504090875387192,
-0.2643451690673828,
0.46347326040267944,
0.501072108745575,
-0.011483527719974518,
-0.020963963121175766,
0.189084991812706,
0.3574218153953552,
0.4347184896469116,
-0.22350433468818665,
0.10345914959907532,
0.0009247642010450363,
0.018582439050078392,
0.05001348257064819,
0.14360801875591278,
0.014055013656616211,
0.6835598349571228,
0.1786808967590332,
0.2524062395095825,
-0.12520286440849304,
-0.01675385609269142,
0.09701904654502869,
-0.2486756443977356,
0.03302709758281708,
0.26611414551734924,
0.13703563809394836,
-0.03237311169505119,
-0.27013787627220154,
-0.09492401033639908,
-0.2792065143585205,
0.006541822105646133,
0.384693443775177,
0.021352777257561684,
0.10605386644601822,
-0.1315310150384903,
0.07637830823659897,
0.002045411616563797,
0.47455501556396484,
0.34034550189971924,
-0.014447726309299469,
-0.3034822940826416,
-0.2072485387325287,
-0.7285953760147095,
0.19436097145080566,
-0.19841518998146057,
-0.32850322127342224,
0.24970830976963043,
-0.08271027356386185,
-0.07339558750391006,
0.33604830503463745,
0.21812883019447327,
0.39876189827919006,
0.07366002351045609,
0.13134360313415527,
-0.3173837959766388,
-0.03503231331706047,
0.44393837451934814,
0.07822857052087784,
-0.08435741811990738,
-0.34023603796958923,
0.10982957482337952,
0.07426823675632477,
0.10897888988256454,
-0.19356796145439148,
-0.020789235830307007,
-0.0690448060631752,
-0.13243688642978668,
0.3674144446849823,
0.280542254447937,
0.3930171728134155,
-0.1928330361843109,
-0.12261831760406494,
-0.1714552342891693,
-0.3176397979259491,
-0.08104847371578217,
0.3091653883457184,
0.0883629322052002,
0.5725005865097046,
0.01040768250823021,
-0.08740879595279694,
-0.6893696188926697,
0.32239535450935364,
-0.1301129311323166,
0.0926101952791214,
0.003372740000486374,
0.14715854823589325,
-0.07455084472894669,
0.06257171928882599,
0.0069270385429263115,
0.1489863395690918,
0.04574793204665184,
0.40576833486557007,
-0.17091837525367737,
-0.5643860697746277,
0.39667654037475586,
-0.08558877557516098,
-0.6857155561447144,
-0.11039163917303085,
0.01079423725605011,
-0.0288262739777565,
-0.051724858582019806,
-0.3539995849132538,
0.3004589378833771,
0.23698002099990845,
-0.007976841181516647,
-0.17235015332698822,
0.20726726949214935,
0.032172612845897675,
0.04026266559958458,
-0.004320818930864334,
0.44646701216697693,
-0.1106189414858818,
-0.06295508146286011,
0.13786877691745758,
-0.2023230642080307
] |
https://github.com/huggingface/datasets/issues/468 | UnicodeDecodeError while loading PAN-X task of XTREME dataset | I realised I was overthinking the problem, so decided to just run the regexp over the codebase and make the PR. In other words, we can ignore my comments about using the CLI 😸 | Hi 🤗 team!
## Description of the problem
I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset:
```
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-5-1d61f439b843> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
528 ignore_verifications = ignore_verifications or save_infos
529 # Download/copy dataset processing script
--> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True)
531
532 # Get dataset builder class from the processing script
/usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs)
265
266 # Download external imports if needed
--> 267 imports = get_imports(local_path)
268 local_imports = []
269 library_imports = []
/usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path)
156 lines = []
157 with open(file_path, mode="r") as f:
--> 158 lines.extend(f.readlines())
159
160 logger.info("Checking %s for additional imports.", file_path)
/usr/lib/python3.6/encodings/ascii.py in decode(self, input, final)
24 class IncrementalDecoder(codecs.IncrementalDecoder):
25 def decode(self, input, final=False):
---> 26 return codecs.ascii_decode(input, self.errors)[0]
27
28 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128)
```
## Steps to reproduce
Install from nlp's master branch
```python
pip install git+https://github.com/huggingface/nlp.git
```
then run
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
```
## OS / platform details
- `nlp` version: latest from master
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: True
- Using distributed or parallel set-up in script?: False
## Proposed solution
Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding:
```
# old
with open(filepath) as f
# new
with open(filepath, encoding='utf-8') as f
```
or raise a warning that suggests setting the locale explicitly, e.g.
```python
import locale
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
```
I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix! | 34 | UnicodeDecodeError while loading PAN-X task of XTREME dataset
Hi 🤗 team!
## Description of the problem
I'm running into a `UnicodeDecodeError` while trying to load the PAN-X subset the XTREME dataset:
```
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-5-1d61f439b843> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
528 ignore_verifications = ignore_verifications or save_infos
529 # Download/copy dataset processing script
--> 530 module_path, hash = prepare_module(path, download_config=download_config, dataset=True)
531
532 # Get dataset builder class from the processing script
/usr/local/lib/python3.6/dist-packages/nlp/load.py in prepare_module(path, download_config, dataset, force_local_path, **download_kwargs)
265
266 # Download external imports if needed
--> 267 imports = get_imports(local_path)
268 local_imports = []
269 library_imports = []
/usr/local/lib/python3.6/dist-packages/nlp/load.py in get_imports(file_path)
156 lines = []
157 with open(file_path, mode="r") as f:
--> 158 lines.extend(f.readlines())
159
160 logger.info("Checking %s for additional imports.", file_path)
/usr/lib/python3.6/encodings/ascii.py in decode(self, input, final)
24 class IncrementalDecoder(codecs.IncrementalDecoder):
25 def decode(self, input, final=False):
---> 26 return codecs.ascii_decode(input, self.errors)[0]
27
28 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128)
```
## Steps to reproduce
Install from nlp's master branch
```python
pip install git+https://github.com/huggingface/nlp.git
```
then run
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
```
## OS / platform details
- `nlp` version: latest from master
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: True
- Using distributed or parallel set-up in script?: False
## Proposed solution
Either change [line 762](https://github.com/huggingface/nlp/blob/7ada00b1d62f94eee22a7df38c6b01e3f27194b7/datasets/xtreme/xtreme.py#L762) in `xtreme.py` to include UTF-8 encoding:
```
# old
with open(filepath) as f
# new
with open(filepath, encoding='utf-8') as f
```
or raise a warning that suggests setting the locale explicitly, e.g.
```python
import locale
locale.setlocale(locale.LC_ALL, 'C.UTF-8')
```
I have a preference for the first solution. Let me know if you agree and I'll be happy to implement the simple fix!
I realised I was overthinking the problem, so decided to just run the regexp over the codebase and make the PR. In other words, we can ignore my comments about using the CLI 😸 | [
-0.33260098099708557,
-0.09301108866930008,
-0.133647620677948,
0.25542962551116943,
0.3521755337715149,
-0.027749501168727875,
0.22498297691345215,
0.3496464192867279,
-0.02869960106909275,
0.03822866082191467,
-0.09041059762239456,
0.15027828514575958,
-0.07617486268281937,
-0.1970372051000595,
0.18910594284534454,
-0.2467028796672821,
-0.07382670789957047,
0.1824580729007721,
0.10780707001686096,
0.006992027163505554,
-0.3558880388736725,
0.11441248655319214,
-0.1869959533214569,
0.26370924711227417,
-0.3771475553512573,
0.08108232170343399,
0.29786545038223267,
0.32046517729759216,
-0.1932806670665741,
-0.6116119623184204,
0.4130364954471588,
-0.05366411432623863,
0.4325029253959656,
0.3163451850414276,
-0.00010860414477065206,
0.08258548378944397,
0.392910897731781,
-0.13196976482868195,
-0.33467841148376465,
-0.19399715960025787,
-0.5915248990058899,
-0.18125174939632416,
-0.009823616594076157,
-0.25958719849586487,
0.1902405023574829,
0.05620782822370529,
-0.06423614174127579,
-0.3830474615097046,
0.18113359808921814,
0.20718979835510254,
0.241638645529747,
0.37056347727775574,
0.0213380865752697,
0.09122849255800247,
-0.04557503014802933,
0.10742630064487457,
-0.15425586700439453,
0.24941876530647278,
0.43462446331977844,
0.06277500838041306,
-0.019149228930473328,
0.2926936745643616,
-0.04861623793840408,
0.24812065064907074,
-0.10235550254583359,
0.13064594566822052,
0.13999056816101074,
-0.466004878282547,
0.1134835034608841,
0.0036376267671585083,
0.2718747854232788,
-0.36644530296325684,
-0.2865583896636963,
-0.22526556253433228,
-0.1094699501991272,
-0.5443438291549683,
0.26449522376060486,
0.0905640497803688,
-0.15965981781482697,
-0.021132033318281174,
0.11315922439098358,
-0.042386993765830994,
-0.17351946234703064,
0.03912118077278137,
0.05435924977064133,
0.3878183960914612,
-0.060074225068092346,
-0.051322609186172485,
-0.0941760241985321,
-0.17860223352909088,
0.40828460454940796,
-0.14587882161140442,
-0.1436944305896759,
0.3246290981769562,
-0.2863636016845703,
0.07242228835821152,
-0.05504607409238815,
-0.3371773660182953,
0.06681638956069946,
-0.046310193836688995,
-0.07882300764322281,
0.2744791507720947,
-0.04955583065748215,
0.053195495158433914,
0.30930662155151367,
0.15567508339881897,
0.20950737595558167,
0.22455669939517975,
0.1834983378648758,
0.1982240229845047,
0.08294433355331421,
-0.0012046098709106445,
-0.17585384845733643,
-0.17713144421577454,
0.36548373103141785,
0.1934712827205658,
0.5531741976737976,
-0.3191606104373932,
-0.12211527675390244,
0.008484024554491043,
0.17288550734519958,
-0.1787235140800476,
0.044403038918972015,
0.014408290386199951,
0.2223310023546219,
0.5070412158966064,
-0.22240717709064484,
0.21857374906539917,
-0.46227431297302246,
-0.12834762036800385,
-0.13588926196098328,
0.17961016297340393,
-0.14607806503772736,
-0.07831306755542755,
0.09638944268226624,
0.12528914213180542,
0.16314320266246796,
-0.14224091172218323,
0.3579082489013672,
-0.06938047707080841,
0.03964921087026596,
-0.20392775535583496,
-0.22019460797309875,
0.013781052082777023,
0.13078288733959198,
0.10396286100149155,
0.055150412023067474,
-0.17533551156520844,
-0.036968011409044266,
0.21710968017578125,
-0.1871834397315979,
-0.2070104330778122,
-0.07155454158782959,
0.2629821300506592,
0.02677338197827339,
0.02515391632914543,
-0.41346678137779236,
-0.0887361466884613,
0.3430744707584381,
0.06208816543221474,
0.11399125307798386,
-0.2957776188850403,
0.040442053228616714,
-0.08587624132633209,
0.20371173322200775,
0.3430534601211548,
-0.1321643739938736,
0.04646320641040802,
0.17790473997592926,
-0.15501092374324799,
0.22462794184684753,
0.2967447340488434,
-0.19222788512706757,
0.09375277906656265,
-0.09892179816961288,
0.553920328617096,
0.5879886746406555,
-0.41023945808410645,
-0.4520799517631531,
0.16967923939228058,
-0.25889748334884644,
0.19520168006420135,
-0.11641528457403183,
0.1070554107427597,
0.3267495632171631,
-0.11743243038654327,
0.3066207766532898,
0.6193358898162842,
-0.11055196821689606,
0.11103122681379318,
-0.21586331725120544,
0.02458210475742817,
0.0014835931360721588,
0.27852481603622437,
0.2359105944633484,
-0.19382062554359436,
0.11450494825839996,
0.2641793191432953,
0.24365150928497314,
-0.3050077259540558,
0.14345334470272064,
0.2776196002960205,
0.09951163828372955,
0.050675563514232635,
-0.15964531898498535,
-0.3252388536930084,
-0.2702021300792694,
0.2318238914012909,
-0.13834625482559204,
0.1085471510887146,
-0.3714391589164734,
0.040146760642528534,
-0.29631999135017395,
0.044794537127017975,
-0.5638593435287476,
-0.12139414250850677,
0.16307000815868378,
0.20128172636032104,
0.07950983941555023,
0.06130913272500038,
-0.3085089325904846,
0.27930691838264465,
-0.10502622276544571,
-0.056554000824689865,
-0.5994642972946167,
0.25911927223205566,
-0.06749255210161209,
-0.3134036660194397,
-0.07478661835193634,
0.3225340247154236,
0.08286814391613007,
-0.13501960039138794,
-0.33673977851867676,
0.2787977457046509,
-0.08552542328834534,
0.014384575188159943,
0.06644332408905029,
-0.17046625912189484,
0.24252080917358398,
-0.4210939109325409,
0.1616300791501999,
0.07192573696374893,
0.12785376608371735,
0.015130721032619476,
0.1468046009540558,
0.3288504481315613,
0.00963975116610527,
0.00022079050540924072,
-0.0022293701767921448,
-0.042643509805202484,
0.4274258315563202,
-0.002031709998846054,
0.08647046983242035,
-0.25726062059402466,
0.2339753359556198,
-0.023823481053113937,
0.16265755891799927,
-0.05638095736503601,
-0.19473148882389069,
-0.08841415494680405,
0.5688617825508118,
-0.13657227158546448,
0.19616389274597168,
0.12719951570034027,
-0.02231171727180481,
0.09121914952993393,
-0.0803106501698494,
0.01614014431834221,
0.2614571452140808,
0.018195442855358124,
0.05557040125131607,
0.006880804896354675,
0.10758980363607407,
0.029095187783241272,
0.14123885333538055,
-0.08436723053455353,
-0.08641378581523895,
-0.07107733935117722,
-0.08670374751091003,
-0.03006673976778984,
-0.3335585296154022,
-0.192359060049057,
-0.10553695261478424,
0.3316015899181366,
-0.16600339114665985,
-0.05351978540420532,
-0.17444312572479248,
-0.1915304958820343,
0.03737371414899826,
-0.1773100048303604,
-0.1640254259109497,
-0.23624418675899506,
-0.23185931146144867,
0.02553541027009487,
0.12546774744987488,
0.32209619879722595,
-0.4353751540184021,
-0.3569747805595398,
0.12765586376190186,
-0.3397228717803955,
0.031621530652046204,
-0.2119198441505432,
-0.25463706254959106,
0.10599657893180847,
0.3112894892692566,
0.17804701626300812,
0.07554084062576294,
-0.3896883428096771,
0.11556941270828247,
-0.24738848209381104,
-0.07559006661176682,
0.05932851508259773,
-0.316318154335022,
0.1726503074169159,
-0.03935787081718445,
0.08392184972763062,
-0.05629659444093704,
-0.18118701875209808,
0.29167136549949646,
-0.2333993762731552,
-0.1716850996017456,
0.20625829696655273,
0.001939201494678855,
-0.19655901193618774,
0.0024222880601882935,
-0.11964767426252365,
-0.32808569073677063,
-0.3669332265853882,
0.0012899115681648254,
-0.07779887318611145,
0.18527908623218536,
0.14429742097854614,
-0.2602289617061615,
-0.11823469400405884,
0.11433817446231842,
-0.13347364962100983,
-0.15365855395793915,
-0.40957146883010864,
0.48747438192367554,
-0.3722843527793884,
-0.21433435380458832,
-0.021901249885559082,
-0.17569243907928467,
0.47819796204566956,
0.13080373406410217,
-0.22841086983680725,
-0.0028278129175305367,
-0.32693690061569214,
0.2939240038394928,
0.007002424448728561,
0.018922314047813416,
0.13988308608531952,
0.000427943654358387,
0.00585930235683918,
0.04151807725429535,
-0.0540437251329422,
-0.19609925150871277,
0.27664613723754883,
0.17084331810474396,
0.10095490515232086,
0.383543998003006,
-0.12196768820285797,
0.180129274725914,
-0.049235809594392776,
0.3242916464805603,
0.547832190990448,
0.0955018624663353,
0.06512799113988876,
-0.023380249738693237,
-0.42218080163002014,
-0.04895912855863571,
-0.05510711669921875,
0.04864010959863663,
0.007995657622814178,
-0.03251409903168678,
-0.10515645146369934,
-0.07105549424886703,
-0.18580934405326843,
-0.15421748161315918,
-0.2681569457054138,
0.14978891611099243,
-0.2403445839881897,
0.24493879079818726,
-0.116439089179039,
0.007654182612895966,
-0.3299107551574707,
0.02378528192639351,
-0.07131938636302948,
0.13502591848373413,
0.21469265222549438,
0.07934644818305969,
-0.1952008605003357,
0.36819472908973694,
-0.4347114562988281,
0.0998159870505333,
0.32494664192199707,
0.703830897808075,
0.032696787267923355,
0.053937964141368866,
0.04143955558538437,
-0.04729267582297325,
-0.05771559476852417,
-0.11163102835416794,
0.1558760404586792,
0.16669584810733795,
-0.2209492027759552,
-0.24022158980369568,
-0.03959894925355911,
-0.1052684634923935,
0.3003044128417969,
0.22276070713996887,
-0.035434603691101074,
-0.34227004647254944,
-0.10957249999046326,
0.3165018558502197,
0.1825249344110489,
-0.17803196609020233,
-0.0400574654340744,
-0.41105619072914124,
-0.592824399471283,
-0.4134848415851593,
0.0432141087949276,
0.24060727655887604,
0.42734572291374207,
0.33781611919403076,
0.16509868204593658,
-0.20482514798641205,
-0.20787930488586426,
0.22172480821609497,
0.3031235933303833,
0.09479022771120071,
0.06851078569889069,
0.07181994616985321,
-0.23382365703582764,
-0.3942338526248932,
0.1363065540790558,
0.5306171178817749,
0.10898473858833313,
-0.7092877626419067,
-0.07845313102006912,
-0.20329409837722778,
0.25113075971603394,
0.05987712740898132,
-0.05416963994503021,
0.11218804866075516,
-0.18269965052604675,
0.09386283904314041,
0.04371870309114456,
0.10918404906988144,
0.14487411081790924,
0.2128843367099762,
-0.602143406867981,
-0.4522859752178192,
0.1971874088048935,
0.0163845494389534,
0.2952749729156494,
0.3392186462879181,
-0.16427762806415558,
-0.31643712520599365,
-0.0895475298166275,
0.16283614933490753,
0.5518425703048706,
0.049916546791791916,
0.11469338834285736,
0.34666746854782104,
0.041342541575431824,
0.05823948606848717,
0.04596014320850372,
0.18356652557849884,
-0.2096625417470932,
-0.23826633393764496,
-0.05438000708818436,
-0.025275610387325287,
0.1658082902431488,
-0.054314613342285156,
0.08720235526561737,
0.2775222063064575,
0.07343289256095886,
0.03513317555189133,
0.24590958654880524,
0.19846267998218536,
-0.2746991515159607,
-0.4539572596549988,
-0.5819119215011597,
0.1532522290945053,
-0.32202017307281494,
-0.03099871799349785,
-0.19672676920890808,
-0.25224393606185913,
0.026722829788923264,
-0.22272512316703796,
0.04419519007205963,
0.22485888004302979,
-0.15571437776088715,
0.2739734649658203,
-0.16501717269420624,
-0.5444103479385376,
0.20623189210891724,
0.088070809841156,
0.30158451199531555,
-0.07060115039348602,
0.13508127629756927,
0.17312993109226227,
0.17696818709373474,
-0.021634168922901154,
-0.08284440636634827,
-0.02537570521235466,
0.017396528273820877,
-0.031031344085931778,
-0.2499276101589203,
0.06988708674907684,
-0.0188625305891037,
-0.3566620945930481,
-0.22131794691085815,
0.20036813616752625,
-0.002419024705886841,
-0.08731714636087418,
-0.20539490878582,
-0.19939345121383667,
0.017507318407297134,
-0.18964843451976776,
0.15942025184631348,
0.062168411910533905,
-0.2342938780784607,
0.08306241780519485,
0.03206104785203934,
-0.3447245657444,
0.01833963207900524,
0.0949898511171341,
0.17935916781425476,
-0.40320318937301636,
0.5781168937683105,
0.1079864352941513,
-0.08765583485364914,
-0.12300549447536469,
0.05097751319408417,
0.1880122721195221,
-0.5171359181404114,
0.04440772905945778,
-0.0069697266444563866,
0.09803532063961029,
-0.1275516003370285,
0.09850449860095978,
0.010874319821596146,
-0.09612957388162613,
0.16773653030395508,
-0.41631880402565,
-0.5901713371276855,
0.11634618043899536,
-0.12011624872684479,
0.21328657865524292,
0.08907879143953323,
0.14830614626407623,
-0.10831815004348755,
-0.04774218797683716,
-0.3042505979537964,
0.1132214292883873,
-0.3167766332626343,
0.21988222002983093,
0.20840170979499817,
-0.07896415144205093,
0.04661058634519577,
0.05502822622656822,
0.20114333927631378,
0.32812029123306274,
-0.07663973420858383,
-0.19023799896240234,
0.034061677753925323,
0.08731214702129364,
-0.08670421689748764,
-0.4576304852962494,
-0.01823599822819233,
0.222219780087471,
-0.05974303558468819,
-0.1353599578142166,
0.11677533388137817,
0.18542104959487915,
-0.06264901161193848,
0.07207011431455612,
0.13729839026927948,
0.10723067820072174,
-0.12613773345947266,
0.2981205880641937,
-0.2095629870891571,
0.43480902910232544,
0.03867272660136223,
0.26519256830215454,
0.08830615878105164,
0.07211799919605255,
-0.23118364810943604,
-0.10483049601316452,
0.11809711903333664,
0.18147170543670654,
0.14326252043247223,
-0.5272979736328125,
0.17888127267360687,
0.2601991891860962,
-0.04611834138631821,
0.3760097026824951,
-0.18355287611484528,
-0.016538744792342186,
0.12088922411203384,
0.24170240759849548,
-0.14114518463611603,
-0.06865859031677246,
0.3440244197845459,
-0.2144445925951004,
0.00010620057582855225,
0.44602522253990173,
0.15173204243183136,
0.11513565480709076,
0.2358342558145523,
0.10733192414045334,
0.28256118297576904,
-0.006898723542690277,
0.29593876004219055,
0.47516414523124695,
-0.10158661007881165,
-0.047653067857027054,
0.23228371143341064,
0.1343567818403244,
0.0184188112616539,
0.6424046158790588,
-0.4427739381790161,
0.5353492498397827,
-0.05050397664308548,
0.2583872377872467,
-0.32247164845466614,
-0.37954092025756836,
-0.2869463860988617,
-0.1631641387939453,
-0.014801569283008575,
0.23669812083244324,
0.16034863889217377,
-0.3238866925239563,
-0.1891298145055771,
0.004872444085776806,
-0.04392464458942413,
0.1654580682516098,
-0.22765904664993286,
0.13106276094913483,
-0.05016561597585678,
-0.018656820058822632,
-0.13772036135196686,
-0.01875671185553074,
0.011308975517749786,
0.1884765625,
-0.0382179319858551,
0.23339776694774628,
-0.10125680267810822,
-0.08609102666378021,
0.1590767800807953,
0.27966415882110596,
-0.06504090875387192,
-0.2643451690673828,
0.46347326040267944,
0.501072108745575,
-0.011483527719974518,
-0.020963963121175766,
0.189084991812706,
0.3574218153953552,
0.4347184896469116,
-0.22350433468818665,
0.10345914959907532,
0.0009247642010450363,
0.018582439050078392,
0.05001348257064819,
0.14360801875591278,
0.014055013656616211,
0.6835598349571228,
0.1786808967590332,
0.2524062395095825,
-0.12520286440849304,
-0.01675385609269142,
0.09701904654502869,
-0.2486756443977356,
0.03302709758281708,
0.26611414551734924,
0.13703563809394836,
-0.03237311169505119,
-0.27013787627220154,
-0.09492401033639908,
-0.2792065143585205,
0.006541822105646133,
0.384693443775177,
0.021352777257561684,
0.10605386644601822,
-0.1315310150384903,
0.07637830823659897,
0.002045411616563797,
0.47455501556396484,
0.34034550189971924,
-0.014447726309299469,
-0.3034822940826416,
-0.2072485387325287,
-0.7285953760147095,
0.19436097145080566,
-0.19841518998146057,
-0.32850322127342224,
0.24970830976963043,
-0.08271027356386185,
-0.07339558750391006,
0.33604830503463745,
0.21812883019447327,
0.39876189827919006,
0.07366002351045609,
0.13134360313415527,
-0.3173837959766388,
-0.03503231331706047,
0.44393837451934814,
0.07822857052087784,
-0.08435741811990738,
-0.34023603796958923,
0.10982957482337952,
0.07426823675632477,
0.10897888988256454,
-0.19356796145439148,
-0.020789235830307007,
-0.0690448060631752,
-0.13243688642978668,
0.3674144446849823,
0.280542254447937,
0.3930171728134155,
-0.1928330361843109,
-0.12261831760406494,
-0.1714552342891693,
-0.3176397979259491,
-0.08104847371578217,
0.3091653883457184,
0.0883629322052002,
0.5725005865097046,
0.01040768250823021,
-0.08740879595279694,
-0.6893696188926697,
0.32239535450935364,
-0.1301129311323166,
0.0926101952791214,
0.003372740000486374,
0.14715854823589325,
-0.07455084472894669,
0.06257171928882599,
0.0069270385429263115,
0.1489863395690918,
0.04574793204665184,
0.40576833486557007,
-0.17091837525367737,
-0.5643860697746277,
0.39667654037475586,
-0.08558877557516098,
-0.6857155561447144,
-0.11039163917303085,
0.01079423725605011,
-0.0288262739777565,
-0.051724858582019806,
-0.3539995849132538,
0.3004589378833771,
0.23698002099990845,
-0.007976841181516647,
-0.17235015332698822,
0.20726726949214935,
0.032172612845897675,
0.04026266559958458,
-0.004320818930864334,
0.44646701216697693,
-0.1106189414858818,
-0.06295508146286011,
0.13786877691745758,
-0.2023230642080307
] |
https://github.com/huggingface/datasets/issues/444 | Keep loading old file even I specify a new file in load_dataset | This is the only fix I could come up with without touching the repo's code.
```python
from nlp.builder import FORCE_REDOWNLOAD
dataset = load_dataset('csv', data_file='./a.csv', download_mode=FORCE_REDOWNLOAD, version='0.0.1')
```
You'll have to change the version each time you want to load a different csv file.
If you're willing to add a ```print```, you can go to ```nlp.load``` and add ```print(builder_instance.cache_dir)``` right before the ```return ds``` in the ```load_dataset``` method. It'll print the cache folder, and you'll just have to erase it (and then you won't need the change here above). | I used load a file called 'a.csv' by
```
dataset = load_dataset('csv', data_file='./a.csv')
```
And after a while, I tried to load another csv called 'b.csv'
```
dataset = load_dataset('csv', data_file='./b.csv')
```
However, the new dataset seems to remain the old 'a.csv' and not loading new csv file.
Even worse, after I load a.csv, the load_dataset function keeps loading the 'a.csv' afterward.
Is this a cache problem?
| 88 | Keep loading old file even I specify a new file in load_dataset
I used load a file called 'a.csv' by
```
dataset = load_dataset('csv', data_file='./a.csv')
```
And after a while, I tried to load another csv called 'b.csv'
```
dataset = load_dataset('csv', data_file='./b.csv')
```
However, the new dataset seems to remain the old 'a.csv' and not loading new csv file.
Even worse, after I load a.csv, the load_dataset function keeps loading the 'a.csv' afterward.
Is this a cache problem?
This is the only fix I could come up with without touching the repo's code.
```python
from nlp.builder import FORCE_REDOWNLOAD
dataset = load_dataset('csv', data_file='./a.csv', download_mode=FORCE_REDOWNLOAD, version='0.0.1')
```
You'll have to change the version each time you want to load a different csv file.
If you're willing to add a ```print```, you can go to ```nlp.load``` and add ```print(builder_instance.cache_dir)``` right before the ```return ds``` in the ```load_dataset``` method. It'll print the cache folder, and you'll just have to erase it (and then you won't need the change here above). | [
-0.08887578547000885,
0.28238043189048767,
-0.0012338664382696152,
0.16190096735954285,
-0.16254721581935883,
0.07773343473672867,
0.1432162970304489,
0.2737467586994171,
0.3626851737499237,
-0.11332888901233673,
0.11638197302818298,
0.18982991576194763,
0.1802760660648346,
-0.08212967216968536,
0.19507674872875214,
0.3331557512283325,
-0.06305467337369919,
0.5072543621063232,
0.13660746812820435,
-0.01468239352107048,
-0.3488633334636688,
0.11073276400566101,
-0.09431535005569458,
-0.07250228524208069,
-0.1926434189081192,
0.14694833755493164,
-0.04384363815188408,
0.1396532654762268,
-0.205696702003479,
-0.48881465196609497,
0.3809182941913605,
0.35738152265548706,
0.25810855627059937,
0.4660641551017761,
-0.00011529822222655639,
-0.011941224336624146,
0.24764853715896606,
0.0682443305850029,
-0.5148969292640686,
-0.3869974613189697,
0.03146704286336899,
-0.5372774600982666,
0.3891555964946747,
-0.18417814373970032,
-0.10161486268043518,
-0.08597798645496368,
0.18401050567626953,
-0.05013127252459526,
0.5789192914962769,
0.21383629739284515,
0.1951671987771988,
-0.1492292284965515,
0.01713639870285988,
-0.013008992187678814,
0.11139483749866486,
-0.2091117650270462,
0.16253544390201569,
0.35356342792510986,
0.11168977618217468,
-0.26942315697669983,
-0.2668691873550415,
0.03428955003619194,
-0.26633408665657043,
0.2355276346206665,
0.27717047929763794,
0.008172573521733284,
0.2694095969200134,
-0.051689766347408295,
0.029786765575408936,
-0.03891380876302719,
0.660361647605896,
-0.033709920942783356,
-0.12314818054437637,
-0.26261553168296814,
0.028601698577404022,
-0.5128677487373352,
0.13469266891479492,
0.1874411404132843,
-0.08094713091850281,
-0.046117011457681656,
-0.20426779985427856,
-0.4057561457157135,
-0.018811434507369995,
0.25345808267593384,
0.11124253273010254,
0.12345470488071442,
-0.06472015380859375,
0.22892272472381592,
0.2850896120071411,
0.17470809817314148,
0.2771393656730652,
-0.11666923761367798,
-0.2123602032661438,
0.24478377401828766,
-0.48857033252716064,
-0.020118534564971924,
0.11230610311031342,
0.12820756435394287,
-0.11361561715602875,
0.13729210197925568,
0.23208777606487274,
0.010971326380968094,
-0.14968906342983246,
0.16233879327774048,
0.32796263694763184,
0.30425623059272766,
0.27172282338142395,
-0.14691513776779175,
0.1787359118461609,
0.15810540318489075,
-0.3821917176246643,
-0.09424234181642532,
-0.042104125022888184,
-0.27118492126464844,
0.2378883808851242,
-0.1810324788093567,
0.3370938301086426,
-0.16682644188404083,
-0.05085230618715286,
0.04000060260295868,
0.11585953086614609,
-0.22638025879859924,
0.01725521869957447,
0.48450255393981934,
-0.18688833713531494,
0.1356285810470581,
0.15831230580806732,
0.0463617742061615,
-0.5059083104133606,
-0.16128408908843994,
-0.08984978497028351,
-0.1798776090145111,
-0.33857423067092896,
0.072650246322155,
0.4552694857120514,
-0.20724248886108398,
0.3022790849208832,
0.33588892221450806,
-0.2005404680967331,
-0.35714203119277954,
0.07426723092794418,
0.12003232538700104,
-0.025085024535655975,
0.05151081830263138,
0.09026342630386353,
0.31809473037719727,
0.02414216659963131,
-0.5446966290473938,
-0.17386195063591003,
0.15585844218730927,
-0.5722794532775879,
-0.3847285509109497,
0.03768758848309517,
0.17738769948482513,
-0.15083369612693787,
-0.12424889206886292,
-0.0813758447766304,
-0.05496053025126457,
0.1526688188314438,
-0.44056496024131775,
-0.22408011555671692,
-0.16031578183174133,
-0.23024283349514008,
-0.20561181008815765,
-0.060312867164611816,
0.5919481515884399,
-0.10798709839582443,
-0.006906390190124512,
-0.17320425808429718,
0.10789550840854645,
-0.13072702288627625,
0.11004705727100372,
-0.196630597114563,
-0.0026774704456329346,
-0.22927117347717285,
-0.5279223918914795,
0.6706697344779968,
-0.09091271460056305,
-0.4825632870197296,
0.21087494492530823,
-0.16274505853652954,
0.14707526564598083,
0.15838485956192017,
0.2092549353837967,
-0.16600443422794342,
-0.1586555391550064,
0.04425617679953575,
0.26861274242401123,
0.11366065591573715,
0.011196067556738853,
-0.13442018628120422,
-0.2561929523944855,
0.23144744336605072,
0.031455084681510925,
-0.16900499165058136,
0.2235097587108612,
-0.02484820783138275,
0.13542528450489044,
0.27361398935317993,
0.028125539422035217,
0.037286318838596344,
-0.021175086498260498,
-0.018825385719537735,
0.09387850761413574,
-0.0387784019112587,
0.207421213388443,
-0.6352770328521729,
0.21080511808395386,
-0.18574656546115875,
-0.3761030435562134,
0.1938498318195343,
-0.06488363444805145,
-0.29428938031196594,
-0.22551196813583374,
-0.4506821930408478,
-0.2055746465921402,
0.018885057419538498,
0.35006821155548096,
0.09249898791313171,
-0.1076362282037735,
-0.15275155007839203,
0.37228381633758545,
-0.07438246160745621,
-0.06785250455141068,
-0.510214626789093,
0.11390672624111176,
0.019745104014873505,
-0.06366293132305145,
0.11345422267913818,
0.29778170585632324,
0.34517621994018555,
-0.02301630564033985,
-0.11211343109607697,
0.24231982231140137,
-0.08024469017982483,
0.304334819316864,
0.006246611475944519,
-0.34746164083480835,
0.000454045832157135,
0.2994799315929413,
0.13328084349632263,
0.10172079503536224,
-0.008398042060434818,
-0.016877438873052597,
-0.07999800890684128,
0.33223599195480347,
-0.05603429302573204,
0.30851513147354126,
0.06339437514543533,
-0.16733218729496002,
0.2275238335132599,
-0.392799437046051,
0.2067200392484665,
-0.17773613333702087,
0.26281633973121643,
0.2479509711265564,
0.19531258940696716,
0.26465070247650146,
-0.08291067183017731,
0.06501907855272293,
0.4671655595302582,
-0.046981632709503174,
-0.29236292839050293,
0.16428320109844208,
-0.08411776274442673,
-0.1841219663619995,
-0.12369866669178009,
0.3632369935512543,
0.4298819899559021,
0.14775055646896362,
-0.1818338930606842,
0.08226696401834488,
-0.06678292155265808,
-0.2304430454969406,
0.11016520857810974,
-0.2013234943151474,
0.28533926606178284,
0.23997697234153748,
0.2579449415206909,
-0.0999959409236908,
-0.3501329720020294,
0.33810654282569885,
0.22406981885433197,
0.11032696068286896,
-0.07968929409980774,
0.20684343576431274,
-0.5125059485435486,
-0.19354644417762756,
-0.5543271899223328,
0.006186342798173428,
-0.24691283702850342,
-0.09692223370075226,
-0.0754554346203804,
0.6249865889549255,
0.22461828589439392,
0.1039891466498375,
0.052642155438661575,
0.3406603932380676,
-0.14747297763824463,
-0.30656009912490845,
0.029103033244609833,
-0.33412525057792664,
-0.38120898604393005,
-0.04564531147480011,
0.29316413402557373,
-0.07421599328517914,
0.2642596960067749,
0.04023044556379318,
-0.14073872566223145,
-0.2185640037059784,
-0.13378575444221497,
-0.09872335195541382,
0.12718942761421204,
0.2915703356266022,
-0.18332940340042114,
0.16283422708511353,
0.13835029304027557,
-0.25921592116355896,
0.1522708684206009,
-0.4241511821746826,
-0.025113586336374283,
0.1721184104681015,
-0.08598004281520844,
0.1537036895751953,
-0.01182425208389759,
-0.42260316014289856,
-0.222503200173378,
-0.2736026644706726,
0.13907542824745178,
0.1597258299589157,
0.15198352932929993,
0.35980334877967834,
-0.1087850034236908,
-0.15248242020606995,
-0.10719826817512512,
0.233839750289917,
-0.3367558717727661,
-0.2792283594608307,
0.28583261370658875,
-0.18889863789081573,
-0.2545824646949768,
0.2504896819591522,
-0.015304048545658588,
0.20397229492664337,
-0.1013496071100235,
-0.6121989488601685,
-0.0707021951675415,
-0.009309826418757439,
-0.027773167937994003,
0.09585888683795929,
0.05533836781978607,
0.19284918904304504,
-0.1464695781469345,
-0.05042658746242523,
-0.03921332582831383,
-0.18028391897678375,
-0.008839637041091919,
0.25556668639183044,
0.40610066056251526,
0.2051306664943695,
0.15472489595413208,
-0.29639336466789246,
0.5076718330383301,
0.3996002972126007,
-0.12590807676315308,
0.41051343083381653,
-0.00766892172396183,
0.45292988419532776,
-0.33990469574928284,
-0.17431272566318512,
-0.10874124616384506,
-0.15069162845611572,
-0.07751590013504028,
0.18826648592948914,
0.04596063122153282,
-0.17702148854732513,
-0.21230950951576233,
-0.08545960485935211,
-0.042878199368715286,
-0.33249619603157043,
0.1021440327167511,
-0.13242660462856293,
0.028549011796712875,
0.4036845266819,
-0.2121608853340149,
-0.2638759911060333,
-0.41085007786750793,
-0.3645504415035248,
0.3081258237361908,
0.08579312264919281,
0.026967205107212067,
-0.06448109447956085,
-0.030478641390800476,
-0.312412828207016,
0.21003392338752747,
-0.03347402438521385,
0.1108688935637474,
0.11701633036136627,
0.07382494956254959,
0.2352377474308014,
0.024618273600935936,
0.6076548099517822,
-0.03614233434200287,
0.14421090483665466,
0.15105187892913818,
0.05633607506752014,
-0.13860268890857697,
-0.05425864830613136,
0.29573220014572144,
0.4776979386806488,
0.20105266571044922,
0.0684836134314537,
-0.015031598508358002,
-0.4613935649394989,
0.12720879912376404,
0.3126033842563629,
-0.3689418137073517,
-0.4041786193847656,
-0.45481300354003906,
0.15235519409179688,
-0.31053659319877625,
-0.2186829149723053,
-0.45363348722457886,
0.18927879631519318,
-0.23441269993782043,
-0.1143864244222641,
-0.14086681604385376,
0.033992890268564224,
-0.026930958032608032,
0.0028765201568603516,
0.30911174416542053,
0.42050620913505554,
-0.05214190483093262,
0.19258137047290802,
0.24097684025764465,
-0.17990224063396454,
0.49599316716194153,
-0.036460284143686295,
0.004345342516899109,
0.0109087023884058,
0.0607554130256176,
0.27481362223625183,
0.27712708711624146,
0.0029777903109788895,
0.15325775742530823,
-0.088836669921875,
-0.09547854959964752,
-0.1706479787826538,
-0.12723039090633392,
0.17460709810256958,
-0.019298916682600975,
-0.24304726719856262,
-0.6247789859771729,
0.5867571234703064,
-0.22819893062114716,
-0.09580190479755402,
0.07712003588676453,
-0.4297848343849182,
0.0043202899396419525,
0.3284890055656433,
-0.33285626769065857,
0.7670223116874695,
0.013623055070638657,
0.25842350721359253,
0.06887569278478622,
0.08579501509666443,
0.7262020111083984,
-0.3534882068634033,
0.15852878987789154,
-0.24063852429389954,
0.026877902448177338,
0.06710106134414673,
-0.015693388879299164,
-0.03736978769302368,
0.061100900173187256,
-0.23648066818714142,
0.5385795831680298,
0.19413019716739655,
0.2164652794599533,
0.1895301192998886,
0.5119625329971313,
-0.013974757865071297,
-0.17160600423812866,
-0.3886816203594208,
0.06553561985492706,
-0.11316166818141937,
0.26261502504348755,
-0.15087398886680603,
-0.16216664016246796,
0.3213566839694977,
-0.07852453738451004,
0.1230565756559372,
0.2460942268371582,
0.06875189393758774,
0.2204844355583191,
-0.10854381322860718,
-0.399133563041687,
-0.03350505977869034,
0.18648797273635864,
-0.03183016926050186,
-0.004057776182889938,
-0.2104969620704651,
0.24326187372207642,
0.0758460983633995,
0.10488142818212509,
-0.2682753801345825,
-0.09885042905807495,
0.30145886540412903,
0.03775252401828766,
-0.3364529311656952,
0.1117607057094574,
-0.10592420399188995,
-0.40963631868362427,
0.11024811863899231,
0.3318061828613281,
0.07653996348381042,
-0.15328149497509003,
-0.23519805073738098,
0.19308288395404816,
0.08148296177387238,
-0.09873875975608826,
0.1244102418422699,
0.03878891468048096,
-0.05303376540541649,
-0.04135835915803909,
0.026092052459716797,
-0.4763900637626648,
0.06090441346168518,
0.38724440336227417,
0.26438575983047485,
-0.09106758236885071,
0.6199370622634888,
-0.05440814420580864,
0.10097472369670868,
-0.138475701212883,
-0.1553153395652771,
0.003982855938374996,
-0.3479214608669281,
0.07350966334342957,
0.30344924330711365,
0.22194035351276398,
0.33850014209747314,
0.07014880329370499,
-0.17256376147270203,
0.18922197818756104,
0.022978175431489944,
-0.4424037039279938,
-0.20975129306316376,
-0.18008626997470856,
-0.24896793067455292,
0.14253361523151398,
0.3069705069065094,
-0.018287502229213715,
0.17661945521831512,
0.42217016220092773,
-0.24226438999176025,
0.21792392432689667,
0.03638823330402374,
0.28371915221214294,
0.1794683039188385,
-0.14550358057022095,
-0.27600106596946716,
-0.22384491562843323,
-0.039757564663887024,
-0.12760785222053528,
-0.3365159332752228,
-0.21146628260612488,
-0.2694690525531769,
0.17385174334049225,
0.05608232691884041,
0.24058547616004944,
-0.3486264646053314,
-0.3961256146430969,
0.24734488129615784,
-0.16708628833293915,
0.11387002468109131,
-0.25561586022377014,
0.05199328064918518,
0.05673707649111748,
0.027337461709976196,
0.1373145580291748,
-0.11268648505210876,
0.12047556787729263,
-0.28193944692611694,
0.30322498083114624,
0.1721116602420807,
0.02678411640226841,
-0.2301599234342575,
0.20229515433311462,
-0.4627673923969269,
-0.10689004510641098,
-0.049671292304992676,
0.04684717208147049,
0.12885408103466034,
-0.3395737409591675,
-0.04164047911763191,
0.013372112065553665,
0.1993759125471115,
0.5579801797866821,
0.009369179606437683,
-0.05097220838069916,
0.2949979603290558,
0.13519656658172607,
-0.27856773138046265,
0.13795903325080872,
0.43740442395210266,
0.06193731725215912,
-0.048948273062705994,
0.12740187346935272,
0.22592470049858093,
-0.2998078465461731,
0.20561450719833374,
0.26487141847610474,
0.35711607336997986,
-0.43295830488204956,
0.34504133462905884,
0.1510659009218216,
0.2942138910293579,
-0.04522320255637169,
0.4577884078025818,
0.267368882894516,
-0.001188516616821289,
0.3178560733795166,
-0.11510077863931656,
-0.0553443506360054,
0.08979515731334686,
0.20917260646820068,
-0.29686039686203003,
-0.36258500814437866,
0.10967116057872772,
0.5631206035614014,
-0.049652099609375,
0.17451342940330505,
0.17605724930763245,
0.5881572961807251,
-0.08914519101381302,
-0.10319533199071884,
-0.40321218967437744,
0.40810438990592957,
-0.10669773072004318,
-0.2956744134426117,
-0.11007983237504959,
-0.01774130016565323,
-0.1267821490764618,
0.2605084776878357,
-0.09651564061641693,
0.0007645487785339355,
0.054717596620321274,
0.11652650684118271,
-0.25320887565612793,
-0.6731389760971069,
0.1490391194820404,
0.09119060635566711,
0.07184650003910065,
-0.1221194714307785,
0.39668312668800354,
-0.10086582601070404,
0.0015584006905555725,
0.1063883900642395,
0.15154725313186646,
0.2985386550426483,
0.2616477608680725,
-0.02611931785941124,
0.2150191366672516,
0.09842976927757263,
-0.09906572103500366,
-0.27250534296035767,
0.15221041440963745,
0.1588628888130188,
0.07352474331855774,
0.07372486591339111,
0.1271308958530426,
-0.14563171565532684,
0.1910417079925537,
0.2808288633823395,
0.017797300592064857,
-0.4239732027053833,
0.2723127603530884,
0.49101096391677856,
-0.10041439533233643,
-0.13471463322639465,
0.15018564462661743,
-0.508378803730011,
0.0870211198925972,
0.2666010856628418,
-0.0274722371250391,
0.15719592571258545,
-0.26147863268852234,
0.06476178020238876,
-0.09933887422084808,
0.4398810863494873,
-0.061391156166791916,
0.030148938298225403,
-0.2412990927696228,
-0.21176645159721375,
-1.033940315246582,
0.11084188520908356,
-0.08598649501800537,
0.06751745194196701,
0.02985556237399578,
0.16386394202709198,
-0.13249239325523376,
-0.019904866814613342,
-0.033339112997055054,
-0.006898447405546904,
0.20878824591636658,
-0.06339007616043091,
-0.24287329614162445,
-0.12441672384738922,
0.18829315900802612,
0.1633121371269226,
-0.15821748971939087,
-0.12727132439613342,
0.03620920702815056,
-0.2769183814525604,
-0.016972191631793976,
0.06820134818553925,
0.0450558140873909,
0.22701355814933777,
0.3052160143852234,
0.4869484603404999,
-0.04799544811248779,
0.15294335782527924,
-0.05268869549036026,
0.14031118154525757,
-0.4018559157848358,
-0.1542680263519287,
-0.11856134235858917,
-0.2395343780517578,
0.014692680910229683,
0.20927278697490692,
-0.3926819860935211,
0.3989506959915161,
-0.34082987904548645,
0.05816921964287758,
-0.1670539677143097,
-0.10508883744478226,
0.08831232041120529,
-0.11838310211896896,
0.0023444145917892456,
0.3344604969024658,
0.05446882173418999,
0.539054811000824,
-0.07186518609523773,
0.20237040519714355,
-0.30118608474731445,
0.019257722422480583,
0.3384815454483032,
-0.44516241550445557,
-0.22496257722377777,
0.1939319223165512,
0.32094624638557434,
-0.08093848079442978,
-0.011181751266121864,
-0.20960167050361633,
0.1600850224494934,
0.2623906135559082,
0.049774810671806335,
-0.17163829505443573,
0.3985258936882019,
-0.1940021812915802,
0.033989403396844864,
-0.0756104439496994,
0.20515567064285278,
0.4144532382488251,
-0.48788824677467346,
0.020220819860696793,
-0.26169177889823914
] |
https://github.com/huggingface/datasets/issues/443 | Cannot unpickle saved .pt dataset with torch.save()/load() | This seems to be fixed in a non-released version.
Installing nlp from source
```
git clone https://github.com/huggingface/nlp
cd nlp
pip install .
```
solves the issue. | Saving a formatted torch dataset to file using `torch.save()`. Loading the same file fails during unpickling:
```python
>>> import torch
>>> import nlp
>>> squad = nlp.load_dataset("squad.py", split="train")
>>> squad
Dataset(features: {'source_text': Value(dtype='string', id=None), 'target_text': Value(dtype='string', id=None)}, num_rows: 87599)
>>> squad = squad.map(create_features, batched=True)
>>> squad.set_format(type="torch", columns=["source_ids", "target_ids", "attention_mask"])
>>> torch.save(squad, "squad.pt")
>>> squad_pt = torch.load("squad.pt")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/torch/serialization.py", line 773, in _legacy_load
result = unpickler.load()
File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/nlp/splits.py", line 493, in __setitem__
raise ValueError("Cannot add elem. Use .add() instead.")
ValueError: Cannot add elem. Use .add() instead.
```
where `create_features` is a function that tokenizes the data using `batch_encode_plus` and returns a Dict with `input_ids`, `target_ids` and `attention_mask`.
```python
def create_features(batch):
source_text_encoding = tokenizer.batch_encode_plus(
batch["source_text"],
max_length=max_source_length,
pad_to_max_length=True,
truncation=True)
target_text_encoding = tokenizer.batch_encode_plus(
batch["target_text"],
max_length=max_target_length,
pad_to_max_length=True,
truncation=True)
features = {
"source_ids": source_text_encoding["input_ids"],
"target_ids": target_text_encoding["input_ids"],
"attention_mask": source_text_encoding["attention_mask"]
}
return features
```
I found a similar issue in [issue 5267 in the huggingface/transformers repo](https://github.com/huggingface/transformers/issues/5267) which was solved by downgrading to `nlp==0.2.0`. That did not solve this problem, however. | 26 | Cannot unpickle saved .pt dataset with torch.save()/load()
Saving a formatted torch dataset to file using `torch.save()`. Loading the same file fails during unpickling:
```python
>>> import torch
>>> import nlp
>>> squad = nlp.load_dataset("squad.py", split="train")
>>> squad
Dataset(features: {'source_text': Value(dtype='string', id=None), 'target_text': Value(dtype='string', id=None)}, num_rows: 87599)
>>> squad = squad.map(create_features, batched=True)
>>> squad.set_format(type="torch", columns=["source_ids", "target_ids", "attention_mask"])
>>> torch.save(squad, "squad.pt")
>>> squad_pt = torch.load("squad.pt")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/torch/serialization.py", line 773, in _legacy_load
result = unpickler.load()
File "/home/vegarab/.conda/envs/torch/lib/python3.7/site-packages/nlp/splits.py", line 493, in __setitem__
raise ValueError("Cannot add elem. Use .add() instead.")
ValueError: Cannot add elem. Use .add() instead.
```
where `create_features` is a function that tokenizes the data using `batch_encode_plus` and returns a Dict with `input_ids`, `target_ids` and `attention_mask`.
```python
def create_features(batch):
source_text_encoding = tokenizer.batch_encode_plus(
batch["source_text"],
max_length=max_source_length,
pad_to_max_length=True,
truncation=True)
target_text_encoding = tokenizer.batch_encode_plus(
batch["target_text"],
max_length=max_target_length,
pad_to_max_length=True,
truncation=True)
features = {
"source_ids": source_text_encoding["input_ids"],
"target_ids": target_text_encoding["input_ids"],
"attention_mask": source_text_encoding["attention_mask"]
}
return features
```
I found a similar issue in [issue 5267 in the huggingface/transformers repo](https://github.com/huggingface/transformers/issues/5267) which was solved by downgrading to `nlp==0.2.0`. That did not solve this problem, however.
This seems to be fixed in a non-released version.
Installing nlp from source
```
git clone https://github.com/huggingface/nlp
cd nlp
pip install .
```
solves the issue. | [
-0.13867305219173431,
-0.18403729796409607,
0.14232319593429565,
0.28548914194107056,
0.38725894689559937,
0.07398731261491776,
0.4242345988750458,
0.15449456870555878,
-0.1818622350692749,
0.008898809552192688,
-0.25410932302474976,
0.7546940445899963,
-0.3429298996925354,
-0.16272057592868805,
-0.008775859139859676,
-0.27070435881614685,
-0.022457100450992584,
-0.09998214244842529,
0.16354060173034668,
0.004866950213909149,
-0.12398120015859604,
0.17104926705360413,
-0.29789412021636963,
-0.06453068554401398,
-0.20809748768806458,
-0.20489835739135742,
-0.0015914365649223328,
0.3980632722377777,
0.06511050462722778,
-0.34063565731048584,
0.19455035030841827,
-0.15630148351192474,
0.0915544331073761,
0.4689871668815613,
-0.00012176983000244945,
-0.03822437673807144,
0.12661626935005188,
-0.22940348088741302,
-0.42217519879341125,
-0.10443361103534698,
0.41673243045806885,
-0.1648721694946289,
0.2794100344181061,
-0.3884229063987732,
-0.046777233481407166,
0.1305871158838272,
0.014289367944002151,
-0.3021170496940613,
0.17801465094089508,
0.09917791187763214,
0.14521968364715576,
0.6736470460891724,
0.028920162469148636,
-0.02808842994272709,
0.24414688348770142,
0.1641829013824463,
-0.24867533147335052,
0.2910863757133484,
0.10413777828216553,
0.08430613577365875,
-0.19184046983718872,
0.06325967609882355,
-0.31680014729499817,
-0.1475125551223755,
0.11342882364988327,
-0.06229144334793091,
-0.6752684712409973,
-0.2057643085718155,
0.20551297068595886,
0.17675071954727173,
0.27032703161239624,
-0.3025210499763489,
-0.3350047469139099,
-0.1799493134021759,
0.19474327564239502,
-0.3114590048789978,
0.15611231327056885,
0.30044957995414734,
-0.11588576436042786,
-0.08643928170204163,
-0.14569243788719177,
-0.029998313635587692,
0.02588985115289688,
0.2111271321773529,
0.43048709630966187,
-0.03533020615577698,
-0.09989848732948303,
0.3880561888217926,
0.09980131685733795,
-0.04815936088562012,
0.00784237589687109,
-0.10471740365028381,
0.10411844402551651,
0.009272721596062183,
-0.27110007405281067,
0.096437469124794,
-0.036419905722141266,
-0.06963003426790237,
-0.07938618957996368,
0.3811095952987671,
0.5383774042129517,
0.11459160596132278,
0.23110593855381012,
0.22592902183532715,
0.212776780128479,
0.05712536349892616,
0.25543585419654846,
0.3450387418270111,
0.017732910811901093,
-0.3164452910423279,
-0.08452512323856354,
0.059880487620830536,
0.14685410261154175,
-0.21134638786315918,
0.18736936151981354,
0.09211672842502594,
0.01156676560640335,
-0.07376694679260254,
-0.2611566483974457,
-0.07327612489461899,
-0.1164809986948967,
-0.22302839159965515,
-0.03871248662471771,
0.15215803682804108,
-0.007468033116310835,
0.08857138454914093,
0.003715161234140396,
0.32094281911849976,
-0.34400811791419983,
-0.02277422696352005,
-0.05241471901535988,
0.08578123152256012,
-0.172223761677742,
-0.05388694256544113,
0.3327816128730774,
-0.43294334411621094,
0.29676663875579834,
-0.02948581427335739,
-0.1854732483625412,
-0.07067383825778961,
-0.060614682734012604,
-0.25707247853279114,
0.19942891597747803,
-0.15854637324810028,
0.2861682176589966,
0.15995652973651886,
0.10739807784557343,
0.026673249900341034,
-0.0570051483809948,
0.12782610952854156,
-0.20868703722953796,
-0.2174159288406372,
-0.2217051237821579,
0.06415046006441116,
-0.14224886894226074,
-0.16118766367435455,
-0.1856590211391449,
-0.07413716614246368,
0.152124285697937,
-0.15531988441944122,
0.195633202791214,
-0.192991241812706,
-0.16050049662590027,
-0.39366790652275085,
0.056231945753097534,
0.38690119981765747,
-0.238797128200531,
-0.13306236267089844,
0.4711282253265381,
-0.16884812712669373,
0.18276558816432953,
0.25573354959487915,
-0.2038460522890091,
0.20762458443641663,
-0.2920518219470978,
0.13001956045627594,
0.5466670393943787,
-0.4901280701160431,
-0.29357945919036865,
0.16813857853412628,
0.010487467050552368,
0.08904990553855896,
-0.008172854781150818,
0.1268036812543869,
0.011718186549842358,
-0.03032560460269451,
0.10826315730810165,
0.359255313873291,
-0.024015067145228386,
-0.19204522669315338,
-0.3910906910896301,
-0.06721342355012894,
0.5623102188110352,
0.10396960377693176,
-0.04508272185921669,
0.005122959613800049,
0.1489916443824768,
0.16436226665973663,
0.2806616723537445,
-0.13351942598819733,
0.07904139161109924,
0.22754068672657013,
0.047926273196935654,
-0.047930121421813965,
-0.06142710521817207,
-0.11174893379211426,
-0.7583850622177124,
0.14257407188415527,
-0.4217595160007477,
-0.20415762066841125,
0.046004705131053925,
0.019434303045272827,
-0.009685603901743889,
-0.26996299624443054,
-0.46728917956352234,
-0.2535906136035919,
-0.07019443809986115,
0.035056229680776596,
-0.0027192048728466034,
-0.10186614096164703,
-0.2882671654224396,
-0.05869973450899124,
0.017073309049010277,
0.09495025873184204,
-0.4358219802379608,
0.03511139750480652,
-0.10083597153425217,
-0.6016008853912354,
0.07889755070209503,
0.3346043527126312,
0.19922122359275818,
-0.21353720128536224,
-0.1547766923904419,
0.5112802982330322,
-0.1878477931022644,
0.04584331810474396,
-0.09114817529916763,
-0.39622461795806885,
-0.02576856128871441,
-0.38737228512763977,
-0.1387776881456375,
0.3057425618171692,
0.16510286927223206,
-0.1439482867717743,
-0.44069215655326843,
0.47397661209106445,
-0.1370311677455902,
-0.06940674036741257,
0.14283104240894318,
-0.17712882161140442,
-0.04021160304546356,
-0.12989464402198792,
-0.08502307534217834,
-0.007481284439563751,
0.04417544603347778,
0.250083327293396,
0.44932812452316284,
-0.05994372069835663,
-0.43877729773521423,
-0.06660833209753036,
0.2690039873123169,
0.18277853727340698,
0.1510503590106964,
0.0907958447933197,
-0.0865505263209343,
-0.1462567150592804,
-0.09943661838769913,
-0.5965250730514526,
0.46997612714767456,
0.007956188172101974,
-0.09643557667732239,
-0.07733342051506042,
0.16179898381233215,
-0.1623530238866806,
0.024681590497493744,
0.02924187108874321,
0.021561408415436745,
0.5249429941177368,
0.3105396628379822,
0.17774175107479095,
-0.3436541259288788,
0.09389759600162506,
-0.00829794630408287,
-0.015436088666319847,
-0.2287289947271347,
0.20084361732006073,
-0.2161107361316681,
-0.00776803120970726,
-0.29324930906295776,
0.022531941533088684,
-0.41345515847206116,
-0.26591092348098755,
-0.02041257917881012,
0.4188214838504791,
0.16916611790657043,
0.213191419839859,
0.03270420432090759,
0.08867001533508301,
0.1502596139907837,
-0.28739508986473083,
0.0878559798002243,
-0.16567988693714142,
-0.1369887888431549,
-0.036617688834667206,
0.09889689832925797,
-0.13913048803806305,
0.5425934791564941,
0.24885083734989166,
0.09854556620121002,
-0.25400060415267944,
0.13229340314865112,
0.1986367106437683,
0.04051489010453224,
0.028331631794571877,
0.15830284357070923,
0.07732599973678589,
-0.24818731844425201,
-0.2664537727832794,
0.2911868691444397,
-0.11914510279893875,
-0.18611784279346466,
0.08011829107999802,
0.010900767520070076,
-0.022456608712673187,
-0.0050232894718647,
-0.6097723841667175,
-0.22468404471874237,
-0.22414429485797882,
0.22703225910663605,
-0.04911723732948303,
0.08155257999897003,
0.17417506873607635,
0.004866339266300201,
0.2601938843727112,
0.06243468448519707,
-0.10017990320920944,
-0.012651903554797173,
-0.25333383679389954,
0.21581006050109863,
-0.14608393609523773,
-0.43765583634376526,
0.027398671954870224,
0.09299930185079575,
-0.10166239738464355,
0.11422394216060638,
-0.040671855211257935,
0.02339448779821396,
0.14105194807052612,
0.29242902994155884,
-0.26558437943458557,
0.11492297053337097,
0.34433501958847046,
0.04301675781607628,
0.07788464426994324,
-0.03066311776638031,
-0.24570752680301666,
0.059696827083826065,
0.1554536521434784,
0.35132721066474915,
-0.020624153316020966,
0.03923596441745758,
0.1629589945077896,
0.8619161248207092,
0.1855267882347107,
-0.27948635816574097,
0.3941228687763214,
-0.02922915108501911,
0.2752990424633026,
-0.23778530955314636,
-0.4469306766986847,
0.44601789116859436,
-0.1733708381652832,
0.3204520344734192,
0.06073242053389549,
-0.2573387026786804,
-0.011322453618049622,
-0.06358620524406433,
0.2717909514904022,
-0.1492326259613037,
-0.2496083378791809,
0.2806573808193207,
-0.23851776123046875,
0.10495218634605408,
-0.18145741522312164,
0.22750601172447205,
-0.07110846787691116,
-0.3509441912174225,
-0.003261697944253683,
0.1643669307231903,
0.4109751284122467,
0.16167089343070984,
-0.41561582684516907,
0.0040467772632837296,
-0.40421485900878906,
0.39570313692092896,
0.1615811586380005,
0.40105247497558594,
-0.09907873719930649,
-0.21936893463134766,
0.13325555622577667,
0.11809979379177094,
0.4137418270111084,
0.009663526900112629,
-0.060722604393959045,
0.30612272024154663,
-0.16282597184181213,
-0.5174526572227478,
0.012781832367181778,
0.022016335278749466,
0.41534051299095154,
0.16185148060321808,
0.25481539964675903,
-0.1388515830039978,
-0.15108610689640045,
0.16360019147396088,
0.3699420094490051,
-0.1934053897857666,
-0.11400264501571655,
-0.05749902501702309,
-0.14289973676204681,
-0.442739337682724,
-0.06167422980070114,
-0.0853109061717987,
0.2670447528362274,
-0.001704866299405694,
0.24922995269298553,
-0.16721321642398834,
-0.21094995737075806,
0.09363069385290146,
-0.38074013590812683,
0.28511086106300354,
-0.002985923085361719,
0.06523633003234863,
0.023420406505465508,
0.4080888628959656,
0.03735028952360153,
0.25157949328422546,
-0.294590562582016,
0.27424871921539307,
0.19884321093559265,
-0.07042425870895386,
0.16915734112262726,
0.23722197115421295,
0.052140068262815475,
0.11209878325462341,
-0.3705202639102936,
-0.06679290533065796,
0.1262664943933487,
-0.0717889815568924,
0.08333680778741837,
-0.33042699098587036,
-0.27194657921791077,
-0.029230710119009018,
0.23215782642364502,
0.030072156339883804,
0.2362711876630783,
0.11663167178630829,
-0.5146974325180054,
-0.09241484105587006,
0.5315946936607361,
0.05635309964418411,
0.9179931282997131,
-0.17723873257637024,
0.3260866403579712,
-0.03212670236825943,
0.14012280106544495,
0.22176063060760498,
0.05998482555150986,
0.1831366866827011,
-0.5430384874343872,
0.18568436801433563,
0.07395988702774048,
-0.05242237076163292,
0.07436016201972961,
0.19414034485816956,
-0.10640214383602142,
0.35492798686027527,
-0.2108064889907837,
0.028527231886982918,
-0.15037821233272552,
0.3296603262424469,
0.0767175480723381,
-0.23524680733680725,
-0.21082572638988495,
0.007741749286651611,
-0.21418572962284088,
0.47853541374206543,
0.10973066091537476,
-0.09008271992206573,
0.09945298731327057,
-0.1806672364473343,
-0.08637487143278122,
0.13818266987800598,
-0.19731299579143524,
0.5574908256530762,
0.12916170060634613,
-0.8781002759933472,
-0.059126611799001694,
0.671816885471344,
-0.011832170188426971,
-0.23207707703113556,
0.05497468635439873,
0.16008751094341278,
0.29593929648399353,
-0.12298235297203064,
-0.20977100729942322,
0.11900702118873596,
0.485968679189682,
-0.09892502427101135,
0.06464847177267075,
0.17700450122356415,
-0.11379250138998032,
-0.328330397605896,
-0.15561293065547943,
0.29935920238494873,
0.3328757882118225,
-0.4707872271537781,
-0.42732515931129456,
-0.22042495012283325,
-0.23645685613155365,
-0.15102019906044006,
-0.021564606577157974,
0.09503743052482605,
0.17878516018390656,
0.17005833983421326,
0.14842002093791962,
-0.14621829986572266,
0.015676477923989296,
0.8382956385612488,
-0.23448359966278076,
-0.343226820230484,
0.5526182651519775,
0.2660035490989685,
-0.13670745491981506,
-0.20859703421592712,
0.19266116619110107,
0.0007458266336470842,
-0.32806897163391113,
0.12508822977542877,
-0.07697831839323044,
0.33517205715179443,
0.1462392359972,
0.22127017378807068,
-0.09757323563098907,
-0.03879766911268234,
0.012082539498806,
-0.0563085712492466,
-0.48432984948158264,
-0.1846662014722824,
0.18597501516342163,
0.0648798868060112,
0.04868430644273758,
0.4098494350910187,
0.30816489458084106,
0.03420719876885414,
-0.18434032797813416,
0.3117743134498596,
-0.030766287818551064,
0.2121683806180954,
0.4773925244808197,
-0.1358633041381836,
-0.09036112576723099,
-0.006337878759950399,
0.03052959404885769,
0.07703769952058792,
-0.11193345487117767,
-0.1447267085313797,
-0.22197191417217255,
0.17349514365196228,
0.18601137399673462,
-0.2156839519739151,
-0.2647041380405426,
-0.009541410952806473,
0.19226212799549103,
-0.226073756814003,
0.18102554976940155,
0.388967365026474,
0.02241266891360283,
0.15938305854797363,
-0.2167811542749405,
0.2523556351661682,
-0.05278393626213074,
-0.07522979378700256,
-0.10531403124332428,
0.10623189061880112,
0.12379570305347443,
-0.073668472468853,
0.028034044429659843,
-0.035149529576301575,
-0.2667634189128876,
-0.14142227172851562,
0.47921526432037354,
0.20845666527748108,
0.018606673926115036,
-0.3838421702384949,
-0.09467622637748718,
-0.34315693378448486,
0.011434417217969894,
0.163090318441391,
-0.2923072278499603,
-0.13631173968315125,
0.10539072006940842,
0.015487400814890862,
0.0025634504854679108,
0.02115681953728199,
0.25023743510246277,
0.047483984380960464,
-0.09921513497829437,
0.09059323370456696,
-0.00508841872215271,
0.09054479002952576,
-0.23944894969463348,
0.09692799299955368,
0.2744240462779999,
-0.3339275121688843,
0.13985611498355865,
0.10694946348667145,
0.08653727173805237,
-0.002140827476978302,
0.1351282000541687,
-0.12573625147342682,
0.23607876896858215,
0.14828070998191833,
-0.011764824390411377,
0.6780450344085693,
0.11480115354061127,
0.0790787935256958,
0.2390659749507904,
-0.48527824878692627,
-0.29170504212379456,
-0.06726662814617157,
0.2548893094062805,
0.3690401315689087,
0.0166793093085289,
0.8710458278656006,
-0.4937479496002197,
-0.4484519064426422,
0.23436161875724792,
0.5710663795471191,
-0.1630052924156189,
-0.23349830508232117,
-0.11919274181127548,
-0.056972429156303406,
0.03929164260625839,
0.21502140164375305,
-0.4183962941169739,
0.1941181868314743,
0.20406179130077362,
0.23102156817913055,
-0.26080822944641113,
-0.157181054353714,
0.045593731105327606,
0.0524480938911438,
0.05397535860538483,
0.010928351432085037,
-0.07490270584821701,
-0.015289939939975739,
-0.0038118287920951843,
-0.04219956323504448,
0.2800781726837158,
0.2520418167114258,
0.2627360224723816,
-0.21058419346809387,
0.003433563280850649,
0.05936669558286667,
0.11378934979438782,
0.0121134202927351,
-0.04184649884700775,
-0.023741818964481354,
-0.29867467284202576,
0.39945223927497864,
0.008803796023130417,
-0.09232102334499359,
0.030779309570789337,
0.2637253701686859,
0.10433506965637207,
-0.1144673079252243,
-0.006140060722827911,
-0.069676972925663,
-0.3914429545402527,
-0.2446209192276001,
-0.014636225998401642,
-0.09809063374996185,
0.09523000568151474,
0.26056936383247375,
0.406426340341568,
0.15911337733268738,
-0.0512998029589653,
0.04664759337902069,
0.08264759182929993,
0.5026724338531494,
0.1973206251859665,
-0.43501344323158264,
-0.28003475069999695,
0.12747056782245636,
-0.4370203912258148,
0.0792032927274704,
0.1688423454761505,
0.10760872066020966,
-0.015812180936336517,
0.2462877780199051,
-0.04971934109926224,
0.13739898800849915,
-0.05687257647514343,
-0.022941242903470993,
0.40122559666633606,
0.30322301387786865,
-0.35616859793663025,
-0.06887473165988922,
-0.17657144367694855,
0.10892367362976074,
0.12259085476398468,
-0.3322434723377228,
-0.0499974749982357,
0.19903239607810974,
0.06444505602121353,
-0.3312883973121643,
-0.5067589282989502,
0.053967226296663284,
0.2614977955818176,
0.2660621702671051,
-0.06596951186656952,
0.3709561824798584,
-0.04396263137459755,
-0.3260207772254944,
0.03450670838356018,
-0.1666184812784195,
0.17275193333625793,
0.1132427230477333,
0.15739014744758606,
0.4533775746822357,
0.01611480675637722,
0.13690444827079773,
-0.44552746415138245,
0.5350660085678101,
-0.05194811522960663,
0.12403763830661774,
-0.10020988434553146,
0.16670480370521545,
0.07703008502721786,
0.23014625906944275,
0.08320305496454239,
0.584636390209198,
-0.1828306019306183,
0.32718104124069214,
-0.6916032433509827,
-0.3220062851905823,
0.5005273818969727,
-0.2176014631986618,
-0.16314950585365295,
0.024639315903186798,
0.13235746324062347,
0.2069169282913208,
0.1832207590341568,
-0.6202585101127625,
-0.07626756280660629,
0.21320012211799622,
-0.24264433979988098,
-0.16371674835681915,
-0.018550336360931396,
-0.31846991181373596,
-0.022340383380651474,
0.058059122413396835,
0.35369712114334106,
0.2758468985557556,
-0.03695502132177353,
0.04760768637061119,
-0.15222325921058655
] |
https://github.com/huggingface/datasets/issues/439 | Issues: Adding a FAISS or Elastic Search index to a Dataset | `DPRContextEncoder` and `DPRContextEncoderTokenizer` will be available in the next release of `transformers`.
Right now you can experiment with it by installing `transformers` from the master branch.
You can also check the docs of DPR [here](https://huggingface.co/transformers/master/model_doc/dpr.html).
Moreover all the indexing features will also be available in the next release of `nlp`. | It seems the DPRContextEncoder, DPRContextEncoderTokenizer cited[ in this documentation](https://huggingface.co/nlp/faiss_and_ea.html) is not implemented ? It didnot work with the standard nlp installation . Also, I couldn't find or use it with the latest nlp install from github in Colab. Is there any dependency on the latest PyArrow 1.0.0 ? Is it yet to be made generally available ? | 50 | Issues: Adding a FAISS or Elastic Search index to a Dataset
It seems the DPRContextEncoder, DPRContextEncoderTokenizer cited[ in this documentation](https://huggingface.co/nlp/faiss_and_ea.html) is not implemented ? It didnot work with the standard nlp installation . Also, I couldn't find or use it with the latest nlp install from github in Colab. Is there any dependency on the latest PyArrow 1.0.0 ? Is it yet to be made generally available ?
`DPRContextEncoder` and `DPRContextEncoderTokenizer` will be available in the next release of `transformers`.
Right now you can experiment with it by installing `transformers` from the master branch.
You can also check the docs of DPR [here](https://huggingface.co/transformers/master/model_doc/dpr.html).
Moreover all the indexing features will also be available in the next release of `nlp`. | [
0.03650255128741264,
-0.1409243941307068,
-0.07937212288379669,
-0.13696245849132538,
-0.15599042177200317,
-0.32423287630081177,
-0.1591322124004364,
0.18218731880187988,
-0.34619370102882385,
0.015833906829357147,
-0.06638793647289276,
0.32067567110061646,
-0.11251870542764664,
-0.04429614916443825,
0.04479075223207474,
-0.24587467312812805,
0.24759560823440552,
0.4139312207698822,
0.14823658764362335,
-0.15518301725387573,
-0.05327596142888069,
0.21911194920539856,
-0.2554687261581421,
0.04670519754290581,
-0.45061197876930237,
0.12170170992612839,
-0.4123185873031616,
-0.26256027817726135,
-0.15364815294742584,
-0.5197568535804749,
0.47824257612228394,
0.12435942888259888,
0.2678399384021759,
0.07432393729686737,
-0.00011794934835052118,
-0.022440746426582336,
0.5727149844169617,
0.06420892477035522,
-0.10993102192878723,
0.10773995518684387,
0.04505913704633713,
-0.012622380629181862,
0.5089786052703857,
-0.06820906698703766,
-0.04915304481983185,
-0.3134191930294037,
0.20579667389392853,
0.5061596035957336,
0.3378700613975525,
0.06751900911331177,
0.12060330808162689,
-0.017822179943323135,
0.34980130195617676,
-0.021093469113111496,
0.49447089433670044,
0.10880327224731445,
-0.18794913589954376,
-0.06029314175248146,
0.41116902232170105,
0.016482030972838402,
-0.036928676068782806,
0.0635465532541275,
0.16237537562847137,
-0.23191697895526886,
0.11691011488437653,
0.21940746903419495,
0.14129021763801575,
-0.37003427743911743,
-0.010380759835243225,
0.12500472366809845,
0.2487775683403015,
-0.16830149292945862,
-0.4690057039260864,
-0.1358833611011505,
0.01314425840973854,
-0.35541966557502747,
0.37282076478004456,
-0.2848741114139557,
-0.12118498980998993,
0.16367439925670624,
-0.0299985371530056,
-0.25092652440071106,
-0.16113115847110748,
0.32470715045928955,
-0.18132248520851135,
0.5299851894378662,
0.060514308512210846,
-0.2540729343891144,
0.23101919889450073,
-0.24157382547855377,
0.18071526288986206,
0.10006406903266907,
0.017225362360477448,
0.36743301153182983,
-0.13819348812103271,
-0.27747732400894165,
0.22773948311805725,
0.11339445412158966,
-0.16070014238357544,
0.03225077688694,
-0.4091065526008606,
0.14597314596176147,
0.14597678184509277,
0.08799950033426285,
-0.16911935806274414,
0.25710293650627136,
0.108583003282547,
-0.08994509279727936,
0.24590009450912476,
-0.4051271975040436,
0.11257460713386536,
0.13783077895641327,
0.046692367643117905,
0.1622927188873291,
-0.3634463846683502,
-0.3564532995223999,
-0.15489251911640167,
-0.1499224603176117,
0.05513668805360794,
-0.2625110149383545,
-0.22479352355003357,
-0.3351932764053345,
-0.1180674359202385,
0.2978421747684479,
0.12532922625541687,
-0.3970757722854614,
0.07241293042898178,
0.1841655671596527,
-0.13411660492420197,
0.0026779957115650177,
-0.06408660113811493,
-0.15699853003025055,
-0.17554433643817902,
0.2645491063594818,
0.2724648118019104,
-0.3028460741043091,
0.16282117366790771,
-0.19748961925506592,
-0.22745777666568756,
0.29450997710227966,
-0.27959033846855164,
0.12166354060173035,
-0.008027568459510803,
0.22580499947071075,
-0.16846394538879395,
-0.10235870629549026,
-0.46556052565574646,
-0.16203583776950836,
-0.240361750125885,
0.06331977993249893,
-0.06468484550714493,
-0.28112566471099854,
-0.33238595724105835,
0.11537321656942368,
-0.27237266302108765,
-0.27523964643478394,
0.36536502838134766,
0.6273084282875061,
-0.10543326288461685,
-0.1463753581047058,
0.03708243370056152,
0.11171714216470718,
0.2649068236351013,
-0.0908321738243103,
0.12790115177631378,
-0.06697499752044678,
-0.23927389085292816,
-0.3873830735683441,
-0.11928899586200714,
0.13798333704471588,
0.027055740356445312,
0.2212781310081482,
-0.2794346511363983,
0.24512848258018494,
0.029139263555407524,
0.5474948883056641,
0.6518900990486145,
-0.20999272167682648,
-0.1275743544101715,
0.060761336237192154,
0.12204501032829285,
-0.24432823061943054,
-0.002263695001602173,
-0.18389472365379333,
0.1356992870569229,
-0.03075236827135086,
-0.020036771893501282,
0.25759297609329224,
0.05760066211223602,
-0.30254992842674255,
-0.2730575203895569,
-0.3634372353553772,
0.327467143535614,
0.37708258628845215,
0.1571434587240219,
-0.07950372248888016,
0.23274457454681396,
-0.3032669723033905,
-0.09905786067247391,
-0.07009877264499664,
-0.0342257097363472,
0.1696014553308487,
0.16778092086315155,
0.07993904501199722,
0.3260696530342102,
-0.2400517761707306,
-0.10483934730291367,
-0.03886696323752403,
-0.6121019124984741,
0.5534068942070007,
-0.10131743550300598,
0.026140183210372925,
0.03577558323740959,
0.01371113769710064,
0.00580495223402977,
-0.3206297755241394,
0.01615070551633835,
-0.11234045028686523,
0.28143972158432007,
0.14606095850467682,
-0.3020932674407959,
-0.06395651400089264,
0.38132256269454956,
0.08597440272569656,
-0.2923620343208313,
0.40718597173690796,
-0.2209591269493103,
-0.533846378326416,
0.049761444330215454,
0.2604348659515381,
0.09687217324972153,
-0.14648160338401794,
-0.01700613461434841,
0.10787978768348694,
-0.30018407106399536,
-0.12107226252555847,
0.25466886162757874,
0.18516743183135986,
0.20655129849910736,
-0.47209256887435913,
0.011244140565395355,
0.08189237862825394,
-0.003651371691375971,
-0.01615336909890175,
-0.09213528782129288,
0.24161797761917114,
0.4846394956111908,
0.09552028775215149,
0.23774860799312592,
-0.12935343384742737,
0.27882590889930725,
-0.19300000369548798,
0.04592890292406082,
0.08984987437725067,
0.15394063293933868,
-0.08096574246883392,
0.20042207837104797,
0.04852299392223358,
-0.20477019250392914,
0.14113174378871918,
0.28661635518074036,
-0.21455922722816467,
0.03367902711033821,
0.5055500268936157,
-0.20395934581756592,
-0.2953154742717743,
0.0027818549424409866,
-0.46231380105018616,
0.21440798044204712,
0.37368276715278625,
-0.09189040958881378,
-0.125300332903862,
-0.2086355984210968,
-0.2770306468009949,
0.25864720344543457,
0.09222974628210068,
-0.07395204901695251,
-0.07278365641832352,
0.3840749263763428,
0.16887058317661285,
-0.2430408000946045,
-0.41807782649993896,
-0.07684318721294403,
-0.09940651059150696,
-0.027301646769046783,
-0.003420427441596985,
-0.2512783706188202,
-0.4178163707256317,
0.06910338997840881,
-0.1639861762523651,
-0.43511849641799927,
-0.19907616078853607,
0.4360973834991455,
-0.22164267301559448,
-0.06735485792160034,
0.47329992055892944,
0.1288900375366211,
0.2370728701353073,
-0.14314322173595428,
0.007104856893420219,
-0.4106120765209198,
-0.21033287048339844,
-0.5618732571601868,
0.01920843869447708,
-0.10013347864151001,
0.22543688118457794,
0.0012148711830377579,
0.06464561074972153,
0.21621477603912354,
0.2121959626674652,
-0.702400267124176,
0.39886021614074707,
-0.08643649518489838,
0.2627841830253601,
-0.1488773375749588,
-0.5324492454528809,
-0.2267729640007019,
-0.4946577548980713,
0.0077942777425050735,
-0.19521692395210266,
-0.10206597298383713,
0.08822895586490631,
-0.06025543436408043,
-0.22693130373954773,
-0.10903501510620117,
-0.38140714168548584,
-0.5280782580375671,
-0.15704655647277832,
0.20401310920715332,
-0.0679100826382637,
0.10738962143659592,
0.3181125223636627,
-0.050650548189878464,
0.11002205312252045,
-0.21289417147636414,
0.0045776935294270515,
-0.02352568320930004,
0.3745414614677429,
0.6374517679214478,
-0.06003865599632263,
-0.3186371624469757,
-0.27630603313446045,
-0.31812816858291626,
-0.05936108157038689,
0.14653050899505615,
-0.11406849324703217,
0.11440964788198471,
-0.21334843337535858,
0.09330727159976959,
0.28978246450424194,
0.22703194618225098,
0.5762736797332764,
0.1408129632472992,
-0.11085913330316544,
0.05716291069984436,
-0.24298343062400818,
0.14318513870239258,
0.1934714913368225,
0.3914708197116852,
-0.1920497715473175,
-0.05818670988082886,
-0.25782105326652527,
0.7521785497665405,
-0.1656469702720642,
-0.30046939849853516,
0.3863735496997833,
0.07965265959501266,
0.12357649207115173,
0.024982374161481857,
-0.11620362102985382,
0.2011025846004486,
0.031102776527404785,
0.09220056980848312,
0.4274142384529114,
0.06002438813447952,
-0.717354416847229,
-0.2091352492570877,
-0.07137371599674225,
-0.3607712388038635,
-0.07381860911846161,
0.010172175243496895,
0.2364363968372345,
0.3325146734714508,
-0.009452391415834427,
0.05436976999044418,
-0.12515424191951752,
-0.2496008276939392,
0.09134306013584137,
0.015642888844013214,
0.04759489744901657,
-0.1001979410648346,
0.07039587199687958,
-0.39651069045066833,
-0.27997806668281555,
0.31305307149887085,
0.27752333879470825,
0.12955297529697418,
-0.0985507220029831,
0.014091730117797852,
0.30316129326820374,
0.0464337021112442,
0.47329431772232056,
-0.09710674732923508,
-0.2817869186401367,
0.30347564816474915,
0.18763943016529083,
-0.36343440413475037,
-0.06936095654964447,
-0.4106270670890808,
0.1294396072626114,
0.4587593078613281,
0.2216700166463852,
-0.22736656665802002,
-0.02559512108564377,
0.11462994664907455,
-0.3202497363090515,
-0.12481188774108887,
-0.35082584619522095,
-0.13689082860946655,
-0.16140243411064148,
-0.048022352159023285,
0.008690960705280304,
-0.03886837139725685,
0.12234870344400406,
-0.1172255352139473,
-0.1230459064245224,
-0.14394161105155945,
-0.01519080065190792,
-0.05308838188648224,
0.37895679473876953,
-0.01070157065987587,
-0.2664448022842407,
0.06140393391251564,
0.12204894423484802,
-0.06385932117700577,
0.06914282590150833,
0.06675393134355545,
0.10882429778575897,
0.05505739152431488,
0.21268564462661743,
0.05443933233618736,
0.4107649028301239,
0.2898603677749634,
0.04063026234507561,
0.3420206904411316,
-0.1964227259159088,
0.03814823925495148,
-0.09502528607845306,
-0.18676289916038513,
0.3242318034172058,
-0.016346389427781105,
-0.07340371608734131,
0.1530245542526245,
0.6108980774879456,
0.04100746288895607,
-0.24921344220638275,
-0.29419469833374023,
0.49489277601242065,
-0.202175110578537,
0.9087719321250916,
0.01703285425901413,
1.1333740949630737,
0.13969218730926514,
0.06110427528619766,
0.2462550699710846,
-0.08421275019645691,
0.6033170223236084,
-0.407970666885376,
0.3965849280357361,
-0.18738418817520142,
0.14779876172542572,
0.045442380011081696,
-0.15106424689292908,
0.0959806889295578,
0.12722817063331604,
-0.4280599057674408,
0.27062517404556274,
0.5491981506347656,
-0.30832862854003906,
0.19350846111774445,
0.4062754511833191,
0.2713349461555481,
-0.1410003900527954,
-0.31170982122421265,
0.04274240881204605,
0.13936489820480347,
0.3951956331729889,
0.01570073887705803,
-0.46535903215408325,
-0.18145586550235748,
-0.16942086815834045,
-0.1713797152042389,
0.27713102102279663,
0.1936979442834854,
0.10361722111701965,
0.6412376165390015,
-0.01077163964509964,
0.3417341411113739,
-0.14037112891674042,
0.14610764384269714,
-0.22616232931613922,
-0.31707099080085754,
0.3154676556587219,
-0.17126017808914185,
-0.07215359807014465,
0.14936859905719757,
0.0974322259426117,
0.42822760343551636,
-0.08954548835754395,
-0.27885371446609497,
0.1490696221590042,
0.022095326334238052,
-0.1760280281305313,
-0.23147842288017273,
-0.22736214101314545,
-0.42445772886276245,
-0.059706807136535645,
0.3894456923007965,
0.1086546778678894,
-0.04487377032637596,
-0.08189579844474792,
0.1337122917175293,
0.0657280758023262,
-0.060847148299217224,
0.3853733241558075,
0.16242046654224396,
0.10915867984294891,
-0.11785344779491425,
0.42346513271331787,
0.11166602373123169,
-0.04485616087913513,
0.2996021807193756,
0.08489017188549042,
-0.34864217042922974,
0.007348503917455673,
-0.545636773109436,
-0.016850344836711884,
-0.4922614097595215,
-0.0559060238301754,
0.028559530153870583,
-0.2865236699581146,
0.0879119411110878,
0.2721903920173645,
0.16716554760932922,
-0.05020240694284439,
-0.411750853061676,
0.06142546236515045,
-0.13049329817295074,
0.4549986720085144,
0.009422700852155685,
0.1388646513223648,
-0.05783366784453392,
0.23275050520896912,
0.25301769375801086,
0.42215755581855774,
-0.283944696187973,
-0.14414796233177185,
-0.14752542972564697,
0.23860029876232147,
-0.2370142638683319,
-0.4023136496543884,
0.14791658520698547,
0.02381989359855652,
0.011410551145672798,
0.08194240927696228,
-0.09606210142374039,
-0.07423275709152222,
-0.039261769503355026,
0.13499999046325684,
0.26215219497680664,
-0.14028695225715637,
-0.32607242465019226,
-0.00022829324007034302,
0.10002739727497101,
-0.09544603526592255,
-0.098367840051651,
-0.2853766977787018,
0.003975920379161835,
0.26886069774627686,
0.31016483902931213,
-0.19687420129776,
0.23461179435253143,
0.12851132452487946,
0.1994066685438156,
0.406838595867157,
0.2551558017730713,
0.2564772963523865,
-0.14162082970142365,
-0.07473745942115784,
0.13879789412021637,
0.13740533590316772,
0.12610067427158356,
0.05891752243041992,
0.25287675857543945,
-0.32561373710632324,
-0.24020014703273773,
-0.2625836133956909,
0.13549232482910156,
0.24620462954044342,
-0.11962883919477463,
-0.11887536942958832,
0.42869165539741516,
0.09114066511392593,
-0.3163747489452362,
-0.0043920488096773624,
0.3697551190853119,
0.20833373069763184,
-0.07832866907119751,
-0.09643758088350296,
0.5143990516662598,
0.027367956936359406,
0.11320292949676514,
0.15600621700286865,
0.1627744734287262,
0.3030827045440674,
-0.31915533542633057,
-0.019468311220407486,
0.09856557846069336,
0.05244472995400429,
0.4392344057559967,
0.053686484694480896,
0.17938455939292908,
0.19577167928218842,
-0.12822523713111877,
0.22073757648468018,
-0.25645771622657776,
0.2605249285697937,
0.2463691532611847,
0.09807099401950836,
0.02928481064736843,
0.04171106219291687,
0.692581295967102,
0.013314537703990936,
0.1029680073261261,
0.3768160939216614,
0.4046403765678406,
-0.14693304896354675,
-0.1315658986568451,
0.3730296790599823,
0.03919323533773422,
-0.3156321942806244,
0.3761722445487976,
-0.03640972450375557,
-0.2104443460702896,
-0.02567330002784729,
-0.06675733625888824,
-0.17850612103939056,
0.04510771110653877,
0.04483265429735184,
-0.13648837804794312,
-0.28027772903442383,
0.197108656167984,
0.1187317743897438,
0.33547231554985046,
0.18927019834518433,
0.3666146993637085,
-0.2245606929063797,
-0.23135998845100403,
0.042457856237888336,
0.4983377754688263,
0.2246091514825821,
0.1280280351638794,
-0.6307690739631653,
0.06057463958859444,
-0.09176890552043915,
-0.16266290843486786,
-0.03577446937561035,
0.34764984250068665,
0.1403847336769104,
0.297137051820755,
-0.14981849491596222,
-0.009017227217555046,
-0.09437647461891174,
-0.12138862907886505,
0.009582404047250748,
0.26881060004234314,
-0.0016040769405663013,
0.17078855633735657,
0.23495374619960785,
-0.22774788737297058,
0.09783388674259186,
-0.16150137782096863,
-0.4631527364253998,
0.20859673619270325,
0.21343715488910675,
-0.13207605481147766,
-0.05965174734592438,
0.009456289000809193,
0.06106935441493988,
0.11103686690330505,
0.4639391005039215,
0.5046032071113586,
0.4634212553501129,
0.05345170199871063,
-0.10978387296199799,
-0.06321676075458527,
0.06615057587623596,
-0.004286963492631912,
0.00656888447701931,
0.24613238871097565,
0.16954205930233002,
-0.013082414865493774,
0.04586905986070633,
-0.01643848419189453,
0.22428978979587555,
0.009720814414322376,
-0.027951456606388092,
-0.3346087634563446,
0.2038649171590805,
-0.30204784870147705,
-0.06167963147163391,
-0.12211645394563675,
0.25290629267692566,
0.04355406016111374,
-0.12629199028015137,
-0.07403748482465744,
-0.24738971889019012,
-0.006357621401548386,
0.13672059774398804,
0.07003049552440643,
0.4863365590572357,
0.2643502354621887,
0.2858443856239319,
-0.16854026913642883,
0.3572314977645874,
-0.1491304486989975,
-0.26840856671333313,
-0.03692370280623436,
-0.0944070890545845,
-0.04096804931759834,
-0.0880129337310791,
-0.23587185144424438,
-0.20330338180065155,
-0.1965104043483734,
0.055808451026678085,
-0.2785724401473999,
-0.06346584856510162,
-0.11411486566066742,
-0.054798923432826996,
-0.2686128616333008,
0.032119739800691605,
-0.03867112100124359,
0.0790921077132225,
-0.07982946932315826,
0.1704723984003067,
-0.269162118434906,
-0.2769067585468292,
0.4201648235321045,
-0.42253249883651733,
0.008115049451589584,
0.0434490330517292,
0.0265989750623703,
0.6671048402786255,
0.11056682467460632,
-0.5503882765769958,
-0.24025321006774902,
0.0807974636554718,
0.023899715393781662,
-0.11518515646457672,
0.08765007555484772,
0.3364039957523346,
-0.19654983282089233,
-0.20176836848258972,
0.0055700913071632385,
0.2425360381603241,
0.09386066347360611,
-0.37592843174934387,
-0.22070488333702087
] |
https://github.com/huggingface/datasets/issues/439 | Issues: Adding a FAISS or Elastic Search index to a Dataset | @lhoestq I tried installing transformer from the master branch. Python imports for DPR again didnt' work. Anyways, Looking forward to trying it in the next release of nlp | It seems the DPRContextEncoder, DPRContextEncoderTokenizer cited[ in this documentation](https://huggingface.co/nlp/faiss_and_ea.html) is not implemented ? It didnot work with the standard nlp installation . Also, I couldn't find or use it with the latest nlp install from github in Colab. Is there any dependency on the latest PyArrow 1.0.0 ? Is it yet to be made generally available ? | 28 | Issues: Adding a FAISS or Elastic Search index to a Dataset
It seems the DPRContextEncoder, DPRContextEncoderTokenizer cited[ in this documentation](https://huggingface.co/nlp/faiss_and_ea.html) is not implemented ? It didnot work with the standard nlp installation . Also, I couldn't find or use it with the latest nlp install from github in Colab. Is there any dependency on the latest PyArrow 1.0.0 ? Is it yet to be made generally available ?
@lhoestq I tried installing transformer from the master branch. Python imports for DPR again didnt' work. Anyways, Looking forward to trying it in the next release of nlp | [
0.059243638068437576,
-0.014179795980453491,
-0.1230471134185791,
-0.1746847778558731,
-0.2136998474597931,
-0.3094339668750763,
-0.20244036614894867,
0.18782293796539307,
-0.273127943277359,
-0.01800234615802765,
0.12586186826229095,
0.4488860070705414,
-0.12000551074743271,
0.012809129431843758,
0.02721238136291504,
-0.20129042863845825,
0.2756509780883789,
0.4141331613063812,
0.18807801604270935,
-0.18029673397541046,
-0.06394673883914948,
0.2660611867904663,
-0.37574881315231323,
0.10842926800251007,
-0.37333881855010986,
0.11951275914907455,
-0.4001513719558716,
-0.17946761846542358,
-0.20722974836826324,
-0.5200275778770447,
0.4982813000679016,
0.12001337110996246,
0.16777028143405914,
-0.005416408181190491,
-0.0001168644885183312,
-0.08343777060508728,
0.5949623584747314,
0.04677535593509674,
-0.06841833889484406,
0.0520082488656044,
0.04760044068098068,
-0.11528383195400238,
0.5010396838188171,
-0.047822628170251846,
0.01645234227180481,
-0.3274894952774048,
0.20202071964740753,
0.4445808529853821,
0.27675729990005493,
0.14241480827331543,
0.13963589072227478,
-0.14050209522247314,
0.3247392475605011,
-0.03974451497197151,
0.4015783667564392,
-0.04425012320280075,
-0.12420042604207993,
-0.08190993964672089,
0.44570034742355347,
-0.07743220776319504,
0.006358511745929718,
-0.04404527321457863,
0.09880566596984863,
-0.18190664052963257,
0.10662185400724411,
0.13192763924598694,
0.23206499218940735,
-0.38284754753112793,
-0.022904470562934875,
0.049776770174503326,
0.13739731907844543,
-0.08453723043203354,
-0.3730431795120239,
-0.12819337844848633,
0.10723131895065308,
-0.45728957653045654,
0.40092164278030396,
-0.2419738471508026,
-0.2164808064699173,
0.10593836009502411,
-0.027304325252771378,
-0.3213633894920349,
-0.20799317955970764,
0.3174881935119629,
-0.21342182159423828,
0.46975138783454895,
0.05147046595811844,
-0.22006931900978088,
0.23390692472457886,
-0.22005312144756317,
0.20911972224712372,
0.16142132878303528,
0.004657674580812454,
0.35249173641204834,
-0.07364144921302795,
-0.208027184009552,
0.26469019055366516,
0.23311883211135864,
-0.1770542860031128,
0.08179576694965363,
-0.4286388158798218,
0.1595921814441681,
0.09531549364328384,
0.08150404691696167,
-0.1969234198331833,
0.20004558563232422,
0.0850960835814476,
-0.17733050882816315,
0.2752017378807068,
-0.3191646337509155,
0.09640292823314667,
0.22662466764450073,
-0.021394409239292145,
0.07575816661119461,
-0.49909719824790955,
-0.3258013129234314,
-0.16402751207351685,
-0.1835734248161316,
-0.07183040678501129,
-0.16958078742027283,
-0.30820512771606445,
-0.2747519314289093,
-0.1742536872625351,
0.20967137813568115,
0.07247046381235123,
-0.21161261200904846,
0.20052580535411835,
0.2056862711906433,
-0.16658344864845276,
-0.09481935203075409,
-0.022423820570111275,
-0.040351297706365585,
-0.2784212827682495,
0.20055606961250305,
0.2567540109157562,
-0.2662539780139923,
0.2235688716173172,
-0.16831879317760468,
-0.2347903996706009,
0.3373524844646454,
-0.27140188217163086,
0.14394450187683105,
-0.034864671528339386,
0.13483880460262299,
-0.12386493384838104,
-0.12862518429756165,
-0.48713919520378113,
-0.20919539034366608,
-0.17409393191337585,
0.04997057467699051,
-0.012679539620876312,
-0.16846910119056702,
-0.3270566463470459,
0.14551125466823578,
-0.22880879044532776,
-0.3878192603588104,
0.43840306997299194,
0.6058789491653442,
-0.1549188494682312,
-0.09165079891681671,
0.003691338002681732,
0.0008421391248703003,
0.31485697627067566,
-0.10323044657707214,
0.10832133144140244,
-0.12961100041866302,
-0.32055267691612244,
-0.3506699502468109,
-0.11140168458223343,
0.13021987676620483,
0.08366941660642624,
0.20017114281654358,
-0.20397669076919556,
0.2088032066822052,
0.08425663411617279,
0.5598309636116028,
0.7137583494186401,
-0.24940501153469086,
-0.08256847411394119,
0.0901605486869812,
0.13994143903255463,
-0.23110578954219818,
0.0015103742480278015,
-0.1959901750087738,
0.12997989356517792,
-0.03486374020576477,
0.0693841353058815,
0.36182135343551636,
0.08507036417722702,
-0.38515061140060425,
-0.2908700704574585,
-0.40745124220848083,
0.34963732957839966,
0.33681240677833557,
0.23581528663635254,
-0.0990300104022026,
0.14160367846488953,
-0.29387369751930237,
-0.035972222685813904,
-0.12763920426368713,
0.005338665563613176,
0.09211236238479614,
0.09348605573177338,
0.14972668886184692,
0.24798429012298584,
-0.22447627782821655,
0.061038076877593994,
-0.05967119336128235,
-0.5969667434692383,
0.5358673334121704,
0.03154540807008743,
0.10641564428806305,
0.02171935886144638,
-0.030488476157188416,
-0.04218895360827446,
-0.3593739867210388,
0.04651501029729843,
-0.05844317376613617,
0.34877556562423706,
0.23408760130405426,
-0.2853090763092041,
-0.08359845727682114,
0.2847380042076111,
0.049227140843868256,
-0.20900508761405945,
0.3189229667186737,
-0.2638419568538666,
-0.5850794315338135,
0.13591168820858002,
0.37341856956481934,
0.07519152015447617,
-0.07196886092424393,
0.061221927404403687,
0.07646483182907104,
-0.3600914478302002,
-0.15456463396549225,
0.1580304354429245,
0.024552777409553528,
0.21976715326309204,
-0.3405785858631134,
0.04945741966366768,
0.0365094318985939,
-0.010200864635407925,
0.028203286230564117,
0.04330631345510483,
0.20373395085334778,
0.527144193649292,
0.04295448586344719,
0.2765481472015381,
-0.015038661658763885,
0.304686963558197,
-0.21036116778850555,
0.0834926962852478,
0.12266853451728821,
0.1765890121459961,
-0.15016309916973114,
0.14757908880710602,
-0.06685683876276016,
-0.33272555470466614,
0.22879397869110107,
0.29196295142173767,
-0.18529412150382996,
0.006952691823244095,
0.4050532281398773,
-0.168533056974411,
-0.3128301799297333,
0.03233105316758156,
-0.5013382434844971,
0.30176109075546265,
0.36702051758766174,
-0.12852320075035095,
-0.07405795156955719,
-0.3326500356197357,
-0.3564533293247223,
0.2985062897205353,
0.005344018340110779,
-0.10359145700931549,
-0.10531461983919144,
0.3690222501754761,
0.1527138650417328,
-0.24607720971107483,
-0.38542911410331726,
-0.047854140400886536,
-0.08223387598991394,
-0.02340967021882534,
-0.006143627688288689,
-0.41744956374168396,
-0.5681113600730896,
0.09786927700042725,
-0.1454336941242218,
-0.309906929731369,
-0.2747802734375,
0.4315381646156311,
-0.15528880059719086,
-0.0024640262126922607,
0.45692023634910583,
0.08840799331665039,
0.27360984683036804,
-0.1515216827392578,
0.10129299759864807,
-0.40354123711586,
-0.25608912110328674,
-0.5996538400650024,
0.046174827963113785,
-0.0070878020487725735,
0.2701752185821533,
0.08834999054670334,
0.027943545952439308,
0.12300951778888702,
0.16593395173549652,
-0.6194007992744446,
0.3482748568058014,
-0.1487368941307068,
0.28564581274986267,
-0.09405404329299927,
-0.5511428117752075,
-0.20576730370521545,
-0.4268229007720947,
-0.0547475628554821,
-0.22710846364498138,
-0.1468820720911026,
0.018862906843423843,
-0.057291820645332336,
-0.32295650243759155,
-0.148023322224617,
-0.40843334794044495,
-0.43515732884407043,
-0.1401524394750595,
0.21424193680286407,
0.039538923650979996,
0.058851227164268494,
0.19757458567619324,
-0.0757116973400116,
0.18707731366157532,
-0.17902030050754547,
0.07745186984539032,
-0.04847194626927376,
0.4085979759693146,
0.5637874603271484,
-0.08563514798879623,
-0.4115508496761322,
-0.1669468730688095,
-0.2422400414943695,
0.02851814776659012,
0.1471630334854126,
-0.1828508973121643,
0.05803430452942848,
-0.14036139845848083,
0.16326431930065155,
0.2589235007762909,
0.25892120599746704,
0.5880924463272095,
0.07343477010726929,
-0.11345505714416504,
0.03051268309354782,
-0.21203236281871796,
0.14386554062366486,
0.08834846317768097,
0.3923083245754242,
-0.11755164712667465,
-0.022172249853610992,
-0.20292417705059052,
0.6386982798576355,
-0.15494082868099213,
-0.3184787631034851,
0.39308246970176697,
0.06978876888751984,
0.1298815757036209,
0.005490213632583618,
-0.08381187915802002,
0.2943470776081085,
0.050558656454086304,
0.20660702884197235,
0.3836003541946411,
-0.021629344671964645,
-0.69134521484375,
-0.21003800630569458,
-0.011665431782603264,
-0.30254241824150085,
0.007762860506772995,
-0.1039872020483017,
0.06149371713399887,
0.32844746112823486,
0.012121357023715973,
0.05339692533016205,
0.007418274879455566,
-0.21606236696243286,
0.09847667813301086,
-0.011918209493160248,
0.09436877071857452,
-0.08914615213871002,
0.042969655245542526,
-0.44136011600494385,
-0.23400914669036865,
0.3478420674800873,
0.1716235727071762,
0.1526614874601364,
-0.1299135833978653,
-0.0009567365050315857,
0.29922914505004883,
-0.024338651448488235,
0.33167576789855957,
-0.12494639307260513,
-0.3391495943069458,
0.4021452069282532,
0.30339452624320984,
-0.37244653701782227,
-0.111972376704216,
-0.3990403115749359,
0.1747426688671112,
0.49073120951652527,
0.2035348266363144,
-0.11726725846529007,
-0.046310801059007645,
0.18986649811267853,
-0.33916065096855164,
-0.057077981531620026,
-0.24670913815498352,
-0.11301890015602112,
-0.2649116516113281,
-0.08472687005996704,
0.00744987279176712,
-0.07211928814649582,
0.13369342684745789,
-0.18442144989967346,
-0.05504462495446205,
-0.13494625687599182,
-0.015063500963151455,
-0.04776126146316528,
0.335649698972702,
-0.11102768778800964,
-0.22251532971858978,
0.07345134019851685,
0.012491349130868912,
0.05516931414604187,
0.032075434923172,
0.011698398739099503,
0.19283413887023926,
0.12640130519866943,
0.23781424760818481,
-0.0401197150349617,
0.4711703360080719,
0.31583526730537415,
0.04173777252435684,
0.30171096324920654,
-0.3949316740036011,
0.037477459758520126,
-0.07485402375459671,
-0.14432033896446228,
0.3766116201877594,
-0.054148171097040176,
-0.012925407849252224,
0.12146119773387909,
0.4406949281692505,
0.11192931234836578,
-0.2288442850112915,
-0.2961525619029999,
0.4306166172027588,
-0.20710042119026184,
0.8095924854278564,
0.041699573397636414,
1.063124656677246,
0.20753249526023865,
0.10212843120098114,
0.3214932978153229,
-0.07763814926147461,
0.6415959596633911,
-0.35276681184768677,
0.38482582569122314,
-0.20348115265369415,
0.36403802037239075,
0.05026830732822418,
-0.10639128088951111,
0.2313319444656372,
0.06510741263628006,
-0.4607386589050293,
0.3050267994403839,
0.6316837072372437,
-0.5515393018722534,
0.23874440789222717,
0.2986888587474823,
0.22887524962425232,
-0.10006876289844513,
-0.3262152671813965,
0.06511152535676956,
0.14588308334350586,
0.3255534768104553,
0.02994588017463684,
-0.39020437002182007,
-0.24257539212703705,
-0.1544918417930603,
-0.18282699584960938,
0.30708637833595276,
0.2162061482667923,
0.02566428855061531,
0.5504887104034424,
-0.04805237054824829,
0.3429054021835327,
-0.18307606875896454,
0.20199450850486755,
-0.22145207226276398,
-0.27952462434768677,
0.20592764019966125,
-0.18066424131393433,
-0.18639083206653595,
0.2789829671382904,
0.110855832695961,
0.478303998708725,
-0.178526371717453,
-0.24716654419898987,
0.22735118865966797,
-0.011985228396952152,
-0.10216224193572998,
-0.4108911156654358,
-0.17237801849842072,
-0.38012319803237915,
0.031451497226953506,
0.2445613592863083,
0.13891653716564178,
0.07636973261833191,
-0.039064113050699234,
0.14760297536849976,
0.027572743594646454,
-0.03040476329624653,
0.4520757794380188,
0.09785859286785126,
0.14626340568065643,
-0.07964451611042023,
0.3522554934024811,
0.08280496299266815,
-0.1016988754272461,
0.336019366979599,
0.039118241518735886,
-0.31506627798080444,
-0.03595009073615074,
-0.5736923217773438,
-0.05913911387324333,
-0.33881327509880066,
-0.10817410796880722,
0.07872594892978668,
-0.295143723487854,
0.09354522824287415,
0.2771795988082886,
0.05423827841877937,
-0.03784593194723129,
-0.29327619075775146,
0.001648440957069397,
-0.008524666540324688,
0.4036150574684143,
-0.09167706966400146,
0.048351217061281204,
-0.03716960921883583,
0.3229560852050781,
0.31996017694473267,
0.3426148295402527,
-0.27772921323776245,
-0.07343395054340363,
-0.16369988024234772,
0.2091832160949707,
-0.16363084316253662,
-0.3471164405345917,
-0.016034811735153198,
0.046045102179050446,
0.031934745609760284,
0.09298935532569885,
-0.02887900546193123,
-0.08721190690994263,
-0.006376335397362709,
0.11653895676136017,
0.35041043162345886,
-0.15077437460422516,
-0.18288031220436096,
-0.0751940906047821,
0.0393705777823925,
0.058101411908864975,
-0.11206498742103577,
-0.30366480350494385,
-0.10696527361869812,
0.3208751380443573,
0.2055809646844864,
-0.06684305518865585,
0.3638151288032532,
0.16546159982681274,
0.16320113837718964,
0.49543583393096924,
0.17438101768493652,
0.2557825446128845,
-0.006273345090448856,
-0.03771677613258362,
0.117835633456707,
0.10684062540531158,
-0.0002790391445159912,
0.11375764012336731,
0.2845737934112549,
-0.3544379472732544,
-0.23787550628185272,
-0.32080334424972534,
0.12122130393981934,
0.3710857927799225,
-0.17730191349983215,
-0.10210605710744858,
0.5498787760734558,
0.1040198877453804,
-0.3391268849372864,
0.04483677074313164,
0.37764933705329895,
0.18362228572368622,
-0.17825008928775787,
-0.16130584478378296,
0.5033265948295593,
-0.1237194761633873,
0.06557317078113556,
0.1693844199180603,
0.028103061020374298,
0.19257032871246338,
-0.32022279500961304,
-0.11766667664051056,
0.12803831696510315,
-0.02565990760922432,
0.2917709946632385,
0.06848762929439545,
0.14585372805595398,
0.22147810459136963,
-0.03405106067657471,
0.16997124254703522,
-0.13142529129981995,
0.2671312093734741,
0.20831719040870667,
0.10475298762321472,
-0.045194629579782486,
0.018086180090904236,
0.643656849861145,
-0.0035915374755859375,
0.09949802607297897,
0.44992151856422424,
0.35442906618118286,
-0.19105519354343414,
-0.09708697348833084,
0.44148412346839905,
0.017757507041096687,
-0.32827603816986084,
0.2047422081232071,
-0.046588316559791565,
-0.20827388763427734,
-0.0006450079381465912,
-0.047201093286275864,
-0.10114666819572449,
0.12033659219741821,
0.0842989981174469,
-0.19946448504924774,
-0.34899288415908813,
0.14375832676887512,
0.028549470007419586,
0.34821227192878723,
0.2354932725429535,
0.381344199180603,
-0.29063689708709717,
-0.20810556411743164,
0.06291727721691132,
0.5100592374801636,
0.31988197565078735,
0.24819433689117432,
-0.6800205707550049,
-0.06428799033164978,
-0.1547391414642334,
-0.13073061406612396,
-0.11884867399930954,
0.4470877945423126,
0.2539401650428772,
0.30181121826171875,
-0.10083141922950745,
0.0009343698620796204,
-0.09103825688362122,
0.012265708297491074,
0.07309747487306595,
0.15656352043151855,
-0.10251444578170776,
0.18448801338672638,
0.2533717453479767,
-0.1798570156097412,
0.07383960485458374,
-0.1097608283162117,
-0.5304478406906128,
0.20427997410297394,
0.1903689056634903,
-0.004752912558615208,
-0.06751449406147003,
-0.12933841347694397,
0.06477146595716476,
0.08524784445762634,
0.4504697024822235,
0.5197365283966064,
0.39639708399772644,
0.14085760712623596,
-0.22113274037837982,
-0.047336477786302567,
0.11545226722955704,
-0.0504339225590229,
-0.11426959931850433,
0.13081178069114685,
0.24895437061786652,
0.009740009903907776,
0.04869277402758598,
-0.05113549530506134,
0.2500566244125366,
0.030924677848815918,
-0.009007513523101807,
-0.3527624309062958,
0.21270102262496948,
-0.19865913689136505,
-0.05649571120738983,
-0.11718764156103134,
0.2376614212989807,
0.0571974515914917,
-0.21423371136188507,
-0.03268682584166527,
-0.16929641366004944,
0.023371301591396332,
0.1450863927602768,
0.20617571473121643,
0.47722020745277405,
0.3472391366958618,
0.3181161880493164,
-0.08006954193115234,
0.2827460467815399,
-0.26546791195869446,
-0.23036091029644012,
-0.10086988657712936,
-0.01566658914089203,
-0.07276090979576111,
-0.1788678914308548,
-0.19098864495754242,
-0.1551167070865631,
-0.1508612334728241,
0.08010367304086685,
-0.3075988292694092,
0.030420243740081787,
-0.11233498901128769,
-0.06186901777982712,
-0.2379010021686554,
0.11161158978939056,
-0.11982693523168564,
0.10636210441589355,
-0.14968611299991608,
0.2067834436893463,
-0.3719472289085388,
-0.22879283130168915,
0.33464792370796204,
-0.49122172594070435,
-0.029172677546739578,
0.061373986303806305,
0.032963551580905914,
0.524091899394989,
0.052261918783187866,
-0.4273993670940399,
-0.31507256627082825,
0.08837982267141342,
0.022030234336853027,
-0.11358098685741425,
0.1176474541425705,
0.2750375270843506,
-0.2203361839056015,
-0.13016459345817566,
-0.03673762083053589,
0.18774035573005676,
0.056921519339084625,
-0.26481348276138306,
-0.2374383807182312
] |
https://github.com/huggingface/datasets/issues/438 | New Datasets: IWSLT15+, ITTB | Thanks Sam, we now have a very detailed tutorial and template on how to add a new dataset to the library. It typically take 1-2 hours to add one. Do you want to give it a try ?
The tutorial on writing a new dataset loading script is here: https://huggingface.co/nlp/add_dataset.html
And the part on how to share a new dataset is here: https://huggingface.co/nlp/share_dataset.html | **Links:**
[iwslt](https://pytorchnlp.readthedocs.io/en/latest/_modules/torchnlp/datasets/iwslt.html)
Don't know if that link is up to date.
[ittb](http://www.cfilt.iitb.ac.in/iitb_parallel/)
**Motivation**: replicate mbart finetuning results (table below)

For future readers, we already have the following language pairs in the wmt namespaces:
```
wmt14: ['cs-en', 'de-en', 'fr-en', 'hi-en', 'ru-en']
wmt15: ['cs-en', 'de-en', 'fi-en', 'fr-en', 'ru-en']
wmt16: ['cs-en', 'de-en', 'fi-en', 'ro-en', 'ru-en', 'tr-en']
wmt17: ['cs-en', 'de-en', 'fi-en', 'lv-en', 'ru-en', 'tr-en', 'zh-en']
wmt18: ['cs-en', 'de-en', 'et-en', 'fi-en', 'kk-en', 'ru-en', 'tr-en', 'zh-en']
wmt19: ['cs-en', 'de-en', 'fi-en', 'gu-en', 'kk-en', 'lt-en', 'ru-en', 'zh-en', 'fr-de']
``` | 63 | New Datasets: IWSLT15+, ITTB
**Links:**
[iwslt](https://pytorchnlp.readthedocs.io/en/latest/_modules/torchnlp/datasets/iwslt.html)
Don't know if that link is up to date.
[ittb](http://www.cfilt.iitb.ac.in/iitb_parallel/)
**Motivation**: replicate mbart finetuning results (table below)

For future readers, we already have the following language pairs in the wmt namespaces:
```
wmt14: ['cs-en', 'de-en', 'fr-en', 'hi-en', 'ru-en']
wmt15: ['cs-en', 'de-en', 'fi-en', 'fr-en', 'ru-en']
wmt16: ['cs-en', 'de-en', 'fi-en', 'ro-en', 'ru-en', 'tr-en']
wmt17: ['cs-en', 'de-en', 'fi-en', 'lv-en', 'ru-en', 'tr-en', 'zh-en']
wmt18: ['cs-en', 'de-en', 'et-en', 'fi-en', 'kk-en', 'ru-en', 'tr-en', 'zh-en']
wmt19: ['cs-en', 'de-en', 'fi-en', 'gu-en', 'kk-en', 'lt-en', 'ru-en', 'zh-en', 'fr-de']
```
Thanks Sam, we now have a very detailed tutorial and template on how to add a new dataset to the library. It typically take 1-2 hours to add one. Do you want to give it a try ?
The tutorial on writing a new dataset loading script is here: https://huggingface.co/nlp/add_dataset.html
And the part on how to share a new dataset is here: https://huggingface.co/nlp/share_dataset.html | [
-0.3334825932979584,
-0.3722025454044342,
-0.09247694909572601,
0.017886769026517868,
-0.18269960582256317,
0.10935261100530624,
0.36885184049606323,
0.26437315344810486,
-0.1256050020456314,
0.3148256540298462,
-0.461334228515625,
-0.07764031738042831,
-0.06480321288108826,
0.18055394291877747,
0.10165277123451233,
0.15591388940811157,
0.013673737645149231,
-0.023578748106956482,
-0.18101635575294495,
-0.05436458811163902,
-0.265277624130249,
0.2664155662059784,
-0.1272367238998413,
-0.18157581984996796,
-0.32803863286972046,
0.04832083359360695,
-0.3616866171360016,
0.14814786612987518,
-0.1781800240278244,
-0.31792736053466797,
-0.09628338366746902,
0.20186775922775269,
0.004357537254691124,
0.2368449866771698,
-0.00010703555017244071,
-0.19055229425430298,
-0.07628190517425537,
-0.09083712846040726,
-0.35100215673446655,
0.10066196322441101,
-0.26467302441596985,
-0.26511436700820923,
-0.12639427185058594,
-0.28936636447906494,
-0.3872862458229065,
-0.06718016415834427,
-0.11511468887329102,
-0.3258390724658966,
0.04245658963918686,
0.20007626712322235,
0.2592928409576416,
0.25198814272880554,
-0.363966166973114,
-0.23191837966442108,
0.020440559834241867,
-0.172586590051651,
-0.19831885397434235,
-0.06941930949687958,
0.5608642101287842,
0.2720471918582916,
-0.2547258138656616,
0.22210344672203064,
-0.0003465954214334488,
0.19211652874946594,
-0.004892557859420776,
0.12117833644151688,
0.32462456822395325,
-0.006518103182315826,
-0.15935340523719788,
0.40869393944740295,
0.37406137585639954,
-0.11641449481248856,
-0.283005952835083,
-0.059364087879657745,
-0.1900772899389267,
-0.23035137355327606,
-0.21050870418548584,
0.0816253200173378,
-0.11966805160045624,
0.12493011355400085,
-0.0415160246193409,
0.08680155873298645,
-0.2472943663597107,
0.11618275940418243,
-0.09231176972389221,
0.978451132774353,
-0.00900490302592516,
-0.08942235261201859,
-0.03425950929522514,
-0.2545595169067383,
-0.045578714460134506,
-0.11304523050785065,
0.016510719433426857,
-0.06012899801135063,
-0.08616334199905396,
-0.27448028326034546,
0.2924726605415344,
0.043469272553920746,
-0.06222494691610336,
0.05904058367013931,
0.102975033223629,
0.07115226984024048,
0.3325046896934509,
-0.0934901162981987,
-0.25170207023620605,
0.05512369051575661,
-0.13442182540893555,
-0.4063027501106262,
0.09298701584339142,
-0.1309961974620819,
0.04916330799460411,
0.13832050561904907,
0.12215328216552734,
-0.19842788577079773,
-0.501650869846344,
0.00562556367367506,
-0.10080663114786148,
0.008308906108140945,
-0.18516011536121368,
-0.06333599239587784,
0.15198487043380737,
-0.2173837125301361,
-0.09835822135210037,
0.15660300850868225,
0.03310417756438255,
0.012134213000535965,
0.14112623035907745,
-0.010137159377336502,
-0.24066060781478882,
-0.23220765590667725,
-0.15205909311771393,
0.10093039274215698,
-0.20264503359794617,
0.028397943824529648,
0.38009655475616455,
0.5238037705421448,
-0.041899003088474274,
-0.01897217333316803,
0.21955075860023499,
0.4000495970249176,
-0.06965301185846329,
0.10283300280570984,
0.7088282704353333,
0.15784849226474762,
-0.09993001818656921,
0.08301257342100143,
-0.09320056438446045,
0.10642066597938538,
-0.28862276673316956,
-0.0697040781378746,
0.22612500190734863,
-0.1155593991279602,
-0.09219460189342499,
0.271384596824646,
-0.1784690022468567,
-0.23678696155548096,
0.5732966661453247,
0.4183844029903412,
-0.09489315003156662,
-0.009186770766973495,
-0.05276108533143997,
0.08094517141580582,
-0.31009840965270996,
-0.12586158514022827,
0.08374729007482529,
0.22885960340499878,
-0.5910979509353638,
-0.11008259654045105,
-0.13145075738430023,
0.21896646916866302,
0.22305551171302795,
0.11253121495246887,
-0.04302453622221947,
0.16504770517349243,
-0.22226309776306152,
0.31101733446121216,
-0.01647614687681198,
0.010654952377080917,
0.11348175257444382,
-0.03927501291036606,
-0.13101822137832642,
-0.13343800604343414,
0.4240180253982544,
0.1913648396730423,
0.23226404190063477,
-0.11365173012018204,
-0.1647874414920807,
0.20352771878242493,
-0.2517417371273041,
0.04210834950208664,
-0.24513839185237885,
-0.2300683557987213,
0.5268056988716125,
0.11101776361465454,
0.19245408475399017,
-0.37253516912460327,
0.09998783469200134,
0.1659073382616043,
0.46895474195480347,
-0.27739161252975464,
0.13454271852970123,
-0.1531641185283661,
0.3069570064544678,
-0.06783376634120941,
0.16365371644496918,
-0.20835161209106445,
-0.015486113727092743,
0.14241355657577515,
-0.17549417912960052,
0.6150252819061279,
0.21487513184547424,
0.3419877290725708,
0.01767260581254959,
-0.06503047794103622,
-0.2481764703989029,
-0.2017676681280136,
0.28063446283340454,
0.2754365801811218,
-0.12053264677524567,
-0.2836521565914154,
-0.12000340223312378,
-0.014104267582297325,
-0.07942354679107666,
-0.11260884255170822,
-0.37511947751045227,
0.041333816945552826,
-0.1244366392493248,
-0.023078080266714096,
0.11000590026378632,
0.43840235471725464,
0.05606771260499954,
-0.11760292947292328,
-0.08887971937656403,
0.09165318310260773,
-0.20732302963733673,
0.28064173460006714,
0.2597605586051941,
0.5066602230072021,
0.1799168586730957,
-0.3302953243255615,
0.2640105187892914,
-0.03704501688480377,
0.0020617651753127575,
-0.14708542823791504,
0.24588048458099365,
0.4308543801307678,
-0.14140541851520538,
0.2891124188899994,
0.03221985697746277,
-0.12047303467988968,
0.15305308997631073,
-0.14072109758853912,
-0.17740534245967865,
-0.26463615894317627,
0.2876602113246918,
-0.02832639217376709,
0.030748475342988968,
-0.037250272929668427,
0.3311656713485718,
0.3989814817905426,
0.4106968641281128,
0.10123991966247559,
0.03744198754429817,
-0.12338275462388992,
-0.08567237108945847,
-0.11400969326496124,
0.1963426023721695,
-0.14813974499702454,
0.1982419788837433,
0.39412733912467957,
0.2930687665939331,
-0.006303852424025536,
-0.008145214058458805,
-0.26745346188545227,
0.36823225021362305,
0.08316025137901306,
-0.08061305433511734,
0.3035696744918823,
-0.10257291048765182,
-0.07970057427883148,
-0.3303622305393219,
0.046430837363004684,
0.000444718636572361,
-0.04679081588983536,
0.04908892884850502,
0.017367148771882057,
-0.23491431772708893,
-0.16081061959266663,
-0.2334723174571991,
-0.3551645576953888,
-0.08006240427494049,
-0.39917662739753723,
0.2940744161605835,
-0.009190663695335388,
-0.2574591040611267,
0.1491001546382904,
0.09345102310180664,
0.5956986546516418,
-0.16471588611602783,
0.3882248103618622,
-0.20319999754428864,
-0.2412426918745041,
-0.2354210615158081,
0.30347293615341187,
0.10659027844667435,
0.03333262354135513,
0.5829254984855652,
-0.2871759235858917,
0.16920989751815796,
-0.08150675892829895,
-0.47287020087242126,
0.17431962490081787,
0.015183970332145691,
0.0840853825211525,
0.2246304452419281,
0.00639265775680542,
0.19072940945625305,
-0.2680404484272003,
0.14731714129447937,
-0.12819117307662964,
-0.07342105358839035,
-0.0660984218120575,
-0.27810630202293396,
-0.35670650005340576,
-0.010130716487765312,
-0.8072675466537476,
-0.4668087661266327,
-0.22721673548221588,
-0.00124465674161911,
-0.2746879756450653,
0.0771183967590332,
0.2422078549861908,
-0.11273756623268127,
0.19350063800811768,
-0.14838455617427826,
0.12133031338453293,
-0.2372911274433136,
-0.07256851345300674,
0.23383496701717377,
-0.33336979150772095,
-0.1917577087879181,
0.07687965035438538,
-0.0045276060700416565,
0.32150137424468994,
-0.1392311453819275,
-0.02569890394806862,
0.40026533603668213,
0.04844070225954056,
0.2887956202030182,
0.3326585292816162,
0.4452301263809204,
0.21244153380393982,
0.21431861817836761,
-0.2785193920135498,
-0.3447280526161194,
-0.07808014750480652,
0.02775021642446518,
0.18799206614494324,
0.2707400918006897,
0.12328268587589264,
-0.04487394541501999,
0.136518195271492,
0.42998331785202026,
0.1162663996219635,
-0.1589791178703308,
0.21096956729888916,
0.09021846950054169,
-0.017117630690336227,
0.054747503250837326,
-0.46090173721313477,
0.4322130084037781,
-0.0753142386674881,
-0.09087283164262772,
0.6659477353096008,
-0.0355999581515789,
-0.0778801441192627,
-0.1606561839580536,
0.4709334671497345,
-0.06695117801427841,
-0.2566488981246948,
0.0866398960351944,
-0.047385603189468384,
0.27230769395828247,
0.15393610298633575,
-0.34493303298950195,
-0.35758712887763977,
-0.2558019757270813,
0.04799798130989075,
0.055306270718574524,
-0.18117594718933105,
-0.11241458356380463,
0.017226766794919968,
0.05087912082672119,
-0.4486730098724365,
0.174812451004982,
0.24145656824111938,
0.31683194637298584,
-0.21653741598129272,
-0.11818467080593109,
-0.05176730453968048,
0.15438510477542877,
0.15417411923408508,
-0.337696373462677,
-0.0922999382019043,
0.18632499873638153,
-0.1468844711780548,
-0.055648259818553925,
0.06421706080436707,
-0.48842230439186096,
0.01656705141067505,
0.4068894386291504,
0.002917468547821045,
-0.09577853977680206,
-0.24740642309188843,
0.08395393937826157,
0.35825860500335693,
-0.2509700357913971,
-0.05927156284451485,
0.060035791248083115,
-0.016442246735095978,
-0.05806760489940643,
0.08678919821977615,
0.0004032980650663376,
0.12734971940517426,
0.010226547718048096,
0.08212220668792725,
0.1796136051416397,
-0.08332353830337524,
0.2549474239349365,
0.18051449954509735,
-0.14192304015159607,
0.26168447732925415,
-0.019486384466290474,
0.055165693163871765,
0.3926154673099518,
0.10417941212654114,
0.2982865571975708,
-0.23776212334632874,
-0.016803719103336334,
0.12319042533636093,
-0.2735191285610199,
0.36504238843917847,
0.5031781196594238,
0.05421683192253113,
0.06836999952793121,
0.13485834002494812,
0.035611044615507126,
-0.3472725450992584,
0.18988893926143646,
-0.15379425883293152,
0.22925075888633728,
-0.12347138673067093,
0.16084511578083038,
0.004397571086883545,
-0.13183335959911346,
-0.1393219381570816,
0.17646288871765137,
0.036996982991695404,
-0.4177049696445465,
0.08131987601518631,
0.2697204053401947,
0.9081618189811707,
0.11663875728845596,
0.15859904885292053,
0.24794146418571472,
-0.10695560276508331,
-0.12356816977262497,
-0.08718715608119965,
0.016408337280154228,
-0.22271575033664703,
0.07238650321960449,
-0.0025103744119405746,
0.08840876817703247,
-0.003757387399673462,
0.4009155035018921,
-0.05515822395682335,
0.1393926590681076,
0.5569097399711609,
0.10163091123104095,
0.15859495103359222,
0.2449045479297638,
0.13263875246047974,
-0.4203200340270996,
-0.010384241119027138,
0.24843618273735046,
-0.07077836990356445,
-0.15530535578727722,
-0.1357744038105011,
-0.11431422084569931,
0.08530288934707642,
0.05399945378303528,
-0.28075504302978516,
-0.04070277512073517,
-0.5479025840759277,
0.13623012602329254,
-0.42969417572021484,
-0.17376364767551422,
0.1124769002199173,
-0.27673912048339844,
0.3626977205276489,
-0.0050138309597969055,
-0.1961691677570343,
-0.08847050368785858,
-0.15991055965423584,
0.1444288045167923,
-0.23475435376167297,
-0.002288735006004572,
0.34366682171821594,
-0.22971060872077942,
-0.21897658705711365,
-0.185214102268219,
0.154443621635437,
-0.1659737229347229,
0.036970704793930054,
0.0560201033949852,
0.426452100276947,
-0.12476804107427597,
0.24012090265750885,
0.30042630434036255,
-0.18643154203891754,
-0.2889263331890106,
0.1699923723936081,
0.05301965773105621,
-0.4662046432495117,
0.4557075798511505,
0.010396942496299744,
-0.10185684263706207,
-0.20588995516300201,
0.14221031963825226,
0.16399401426315308,
0.10202422738075256,
0.08893196284770966,
0.4726659655570984,
-0.24445749819278717,
-0.33370527625083923,
0.10857721418142319,
0.2642265260219574,
-0.21226021647453308,
0.04644665867090225,
0.2941996157169342,
-0.245159313082695,
0.03277646750211716,
0.5464957356452942,
0.40805584192276,
0.09270134568214417,
-0.2307901382446289,
-0.06317377835512161,
-0.1403227150440216,
0.19812077283859253,
0.011873759329319,
0.5117026567459106,
-0.026591885834932327,
0.20048251748085022,
-0.11856571584939957,
-0.03412899374961853,
-0.46523183584213257,
-0.04020018130540848,
0.0808376744389534,
0.0937296524643898,
-0.10193023085594177,
-0.27512070536613464,
-0.1194092184305191,
0.17396605014801025,
0.12880145013332367,
-0.1284705549478531,
-0.25715771317481995,
-0.2986704111099243,
-0.2605070173740387,
0.08467162400484085,
0.0810299888253212,
-0.2016497254371643,
0.09106605499982834,
0.047358088195323944,
-0.0333053283393383,
-0.17218029499053955,
0.11912015080451965,
-0.024366719648241997,
-0.07949921488761902,
0.33104580640792847,
0.39112231135368347,
-0.42664477229118347,
-0.06465122848749161,
0.01873091608285904,
0.37070173025131226,
0.006019078195095062,
0.12508845329284668,
0.23503980040550232,
0.1173316016793251,
-0.19711577892303467,
0.34612956643104553,
0.2029721438884735,
0.16627921164035797,
-0.0980646088719368,
0.11627402901649475,
-0.010769732296466827,
-0.13710801303386688,
0.27115675806999207,
0.2495613396167755,
0.06444261223077774,
0.0991470217704773,
-0.37541064620018005,
0.0503888875246048,
0.28744062781333923,
-0.4011572599411011,
-0.07833976298570633,
-0.007847322151064873,
-0.01782648265361786,
0.3304080665111542,
0.2903860807418823,
0.42992380261421204,
-0.07865540683269501,
0.1788141429424286,
-0.016787517815828323,
-0.264840692281723,
-0.12440557777881622,
0.0836111307144165,
0.10680647194385529,
-0.05988902971148491,
0.155177503824234,
0.1306484490633011,
-0.19347849488258362,
0.008346088230609894,
0.06590579450130463,
-0.07721387594938278,
0.930954098701477,
-0.02501816302537918,
0.032941680401563644,
0.2934620678424835,
-0.09050691872835159,
0.136129230260849,
-0.35874634981155396,
0.10307759791612625,
0.22929221391677856,
0.13882340490818024,
0.27204641699790955,
0.06963921338319778,
-0.3048447370529175,
-0.23122432827949524,
0.2099304497241974,
-0.3689032793045044,
-0.06488639116287231,
0.04710668325424194,
-0.27885910868644714,
-0.24599997699260712,
-0.12394022941589355,
-0.0792434960603714,
0.06448773294687271,
0.3866288363933563,
0.06306222081184387,
0.1302511841058731,
-0.1684918850660324,
-0.09244848042726517,
-0.08439559489488602,
0.02184261381626129,
-0.18032336235046387,
0.300291508436203,
0.402987003326416,
-0.24648797512054443,
-0.07923915982246399,
0.42371082305908203,
0.06257808953523636,
-0.024885334074497223,
-0.1714932769536972,
0.1750069558620453,
-0.2262554168701172,
-0.14026319980621338,
-0.19072699546813965,
0.24005205929279327,
-0.018945544958114624,
-0.2605823874473572,
0.2505829632282257,
0.13172926008701324,
-0.12625929713249207,
-0.16686414182186127,
0.16348618268966675,
-0.5733738541603088,
-0.025980738922953606,
0.0337551087141037,
0.15636903047561646,
-0.08798050135374069,
-0.14323166012763977,
0.2840709388256073,
-0.30455389618873596,
0.02793079987168312,
0.2656623125076294,
-0.39113569259643555,
0.04527289420366287,
0.0023919735103845596,
0.11173266172409058,
-0.04168178513646126,
0.7474101781845093,
0.14179982244968414,
-0.1485963761806488,
-0.34993478655815125,
-0.2589431405067444,
-0.37208256125450134,
-0.08151676505804062,
0.10009443759918213,
0.38155966997146606,
-0.35380786657333374,
0.10647749155759811,
0.29084640741348267,
0.12034537643194199,
0.17830486595630646,
0.11558458209037781,
-0.10992391407489777,
0.11226405203342438,
-0.5181722640991211,
-0.00415525957942009,
0.3043668866157532,
0.28145235776901245,
-0.020270060747861862,
0.07760963588953018,
0.00006526336073875427,
-0.07395778596401215,
0.13148233294487,
-0.17225247621536255,
-0.17675700783729553,
0.31353893876075745,
0.2274092435836792,
-0.06413964927196503,
0.2742761969566345,
0.353069543838501,
-0.3639170229434967,
-0.1765119880437851,
-0.25513800978660583,
-0.19289658963680267,
-0.03121473267674446,
0.2922404110431671,
0.09067919850349426,
0.30553871393203735,
0.011188555508852005,
-0.17741627991199493,
-0.046042073518037796,
-0.2982519567012787,
-0.007424518465995789,
-0.027695467695593834,
-0.24275723099708557,
0.20529180765151978,
-0.17474186420440674,
0.3201979994773865,
0.09318863600492477,
0.531569242477417,
-0.06532111763954163,
0.2351931482553482,
-0.1621200144290924,
-0.3991537094116211,
0.30554890632629395,
0.09068843722343445,
-0.34302905201911926,
-0.27229487895965576,
0.1945735514163971,
-0.04639563709497452,
0.29409661889076233,
-0.38026195764541626,
-0.19472132623195648,
0.1568620353937149,
0.0015755034983158112,
0.10563810169696808,
0.5220998525619507,
0.31713274121284485,
-0.15150633454322815,
-0.12471090257167816,
-0.0763130635023117,
0.4320124387741089,
-0.2402193695306778,
-0.31149157881736755,
-0.21364142000675201
] |
https://github.com/huggingface/datasets/issues/438 | New Datasets: IWSLT15+, ITTB | Hi @sshleifer, I'm trying to add IWSLT using the link you provided but the download urls are not working. Only `[en, de]` pair is working. For others language pairs it throws a `404` error.
| **Links:**
[iwslt](https://pytorchnlp.readthedocs.io/en/latest/_modules/torchnlp/datasets/iwslt.html)
Don't know if that link is up to date.
[ittb](http://www.cfilt.iitb.ac.in/iitb_parallel/)
**Motivation**: replicate mbart finetuning results (table below)

For future readers, we already have the following language pairs in the wmt namespaces:
```
wmt14: ['cs-en', 'de-en', 'fr-en', 'hi-en', 'ru-en']
wmt15: ['cs-en', 'de-en', 'fi-en', 'fr-en', 'ru-en']
wmt16: ['cs-en', 'de-en', 'fi-en', 'ro-en', 'ru-en', 'tr-en']
wmt17: ['cs-en', 'de-en', 'fi-en', 'lv-en', 'ru-en', 'tr-en', 'zh-en']
wmt18: ['cs-en', 'de-en', 'et-en', 'fi-en', 'kk-en', 'ru-en', 'tr-en', 'zh-en']
wmt19: ['cs-en', 'de-en', 'fi-en', 'gu-en', 'kk-en', 'lt-en', 'ru-en', 'zh-en', 'fr-de']
``` | 34 | New Datasets: IWSLT15+, ITTB
**Links:**
[iwslt](https://pytorchnlp.readthedocs.io/en/latest/_modules/torchnlp/datasets/iwslt.html)
Don't know if that link is up to date.
[ittb](http://www.cfilt.iitb.ac.in/iitb_parallel/)
**Motivation**: replicate mbart finetuning results (table below)

For future readers, we already have the following language pairs in the wmt namespaces:
```
wmt14: ['cs-en', 'de-en', 'fr-en', 'hi-en', 'ru-en']
wmt15: ['cs-en', 'de-en', 'fi-en', 'fr-en', 'ru-en']
wmt16: ['cs-en', 'de-en', 'fi-en', 'ro-en', 'ru-en', 'tr-en']
wmt17: ['cs-en', 'de-en', 'fi-en', 'lv-en', 'ru-en', 'tr-en', 'zh-en']
wmt18: ['cs-en', 'de-en', 'et-en', 'fi-en', 'kk-en', 'ru-en', 'tr-en', 'zh-en']
wmt19: ['cs-en', 'de-en', 'fi-en', 'gu-en', 'kk-en', 'lt-en', 'ru-en', 'zh-en', 'fr-de']
```
Hi @sshleifer, I'm trying to add IWSLT using the link you provided but the download urls are not working. Only `[en, de]` pair is working. For others language pairs it throws a `404` error.
| [
-0.3510954976081848,
-0.42015689611434937,
-0.0554756261408329,
0.0014695003628730774,
-0.2052137404680252,
0.16779601573944092,
0.30961447954177856,
0.23120103776454926,
-0.10787878930568695,
0.3268697261810303,
-0.4746788442134857,
-0.07170853763818741,
-0.053031302988529205,
0.07614380866289139,
0.11264847218990326,
0.2031460553407669,
-0.041597880423069,
0.006205946207046509,
-0.20500344038009644,
-0.03675650805234909,
-0.28118959069252014,
0.2966846823692322,
-0.15657809376716614,
-0.16284798085689545,
-0.30493709444999695,
0.10755915939807892,
-0.3232410252094269,
0.12899771332740784,
-0.08640885353088379,
-0.2628644108772278,
-0.07100377976894379,
0.18117274343967438,
-0.0486798956990242,
0.09398441761732101,
-0.00011271286348346621,
-0.11369453370571136,
0.011658947914838791,
-0.10167596489191055,
-0.3240739703178406,
0.04581250250339508,
-0.36654308438301086,
-0.2639515697956085,
-0.21428923308849335,
-0.30623939633369446,
-0.43678656220436096,
0.02722397819161415,
-0.18319976329803467,
-0.3564964830875397,
-0.005296468734741211,
0.19451314210891724,
0.22358877956867218,
0.3457287847995758,
-0.31439971923828125,
-0.28226691484451294,
0.056738659739494324,
-0.2643658518791199,
-0.18386229872703552,
-0.026663638651371002,
0.4762517511844635,
0.33213064074516296,
-0.05312172323465347,
0.2584945261478424,
0.027002794668078423,
0.1334303915500641,
-0.03490956127643585,
0.14281271398067474,
0.36493101716041565,
0.017394574359059334,
-0.07273558527231216,
0.33252501487731934,
0.4082351326942444,
-0.05556046962738037,
-0.2953054904937744,
0.024360112845897675,
-0.18667136132717133,
-0.1836409568786621,
-0.1656772792339325,
-0.015044603496789932,
-0.06909121572971344,
0.18003106117248535,
-0.08244676887989044,
0.07074901461601257,
-0.23179377615451813,
0.2495974749326706,
-0.05819610506296158,
0.9896835088729858,
0.026857785880565643,
-0.02730637788772583,
0.06274339556694031,
-0.2822175621986389,
-0.12784983217716217,
-0.10189452767372131,
0.034972820430994034,
-0.05354634299874306,
-0.0472450889647007,
-0.16557171940803528,
0.33466050028800964,
0.12153300642967224,
-0.11511308699846268,
0.03738340735435486,
0.026279067620635033,
0.018119901418685913,
0.3821304142475128,
-0.10263668745756149,
-0.3399942219257355,
0.14682160317897797,
-0.13713929057121277,
-0.357686311006546,
0.06766882538795471,
-0.08888541907072067,
0.08499787747859955,
0.12745416164398193,
0.09897435456514359,
-0.23523497581481934,
-0.5490626692771912,
-0.02749788388609886,
-0.14317616820335388,
-0.024916652590036392,
-0.3145839273929596,
-0.0480165034532547,
0.023061595857143402,
-0.2022247165441513,
-0.08351635187864304,
0.22775474190711975,
0.0744658038020134,
-0.010636940598487854,
0.2954711318016052,
0.05560196936130524,
-0.26348623633384705,
-0.1860876828432083,
-0.1568222939968109,
0.22142431139945984,
-0.18611232936382294,
0.0067124986089766026,
0.357688307762146,
0.5407783389091492,
-0.09047913551330566,
-0.07710813730955124,
0.230404332280159,
0.3313213586807251,
-0.2134871631860733,
0.08810973167419434,
0.6882415413856506,
0.17617234587669373,
-0.05308523029088974,
0.1961776465177536,
-0.12713216245174408,
0.12903772294521332,
-0.2528001368045807,
0.03500965237617493,
0.18687140941619873,
-0.11659140139818192,
-0.08311041444540024,
0.23089304566383362,
-0.18850184977054596,
-0.2557544708251953,
0.601392388343811,
0.2973760664463043,
0.02879844605922699,
-0.05968313664197922,
-0.08149989694356918,
0.09768987447023392,
-0.33477434515953064,
-0.030104469507932663,
0.18009501695632935,
0.2333528697490692,
-0.6572205424308777,
-0.16652792692184448,
-0.20681948959827423,
0.2950185239315033,
0.36934247612953186,
0.1796913594007492,
-0.045350950211286545,
0.2924354076385498,
-0.2584976255893707,
0.41988933086395264,
0.010149024426937103,
-0.004905816167593002,
-0.006970450282096863,
-0.1160338893532753,
-0.14948657155036926,
-0.07442566007375717,
0.4314526617527008,
0.24106641113758087,
0.14578019082546234,
-0.03486011549830437,
-0.14433793723583221,
0.17641104757785797,
-0.1311490386724472,
-0.031832434237003326,
-0.22741688787937164,
-0.17845146358013153,
0.5984975695610046,
0.10685460269451141,
0.1780122071504593,
-0.30742669105529785,
0.1291627287864685,
0.23626576364040375,
0.46517646312713623,
-0.3246690034866333,
0.22008059918880463,
-0.13108937442302704,
0.3670406639575958,
-0.04527589678764343,
0.1571963131427765,
-0.16882306337356567,
0.07657641917467117,
0.18469971418380737,
-0.14894598722457886,
0.6234956383705139,
0.15399058163166046,
0.387357234954834,
-0.0878155380487442,
-0.04497726261615753,
-0.3361414670944214,
-0.17874474823474884,
0.2085515409708023,
0.3206881880760193,
-0.18278242647647858,
-0.3383510410785675,
-0.02872362919151783,
-0.03905687481164932,
-0.04809294641017914,
-0.20650805532932281,
-0.4026568531990051,
0.13540330529212952,
-0.21295079588890076,
-0.052169665694236755,
0.10302050411701202,
0.5125247836112976,
0.10337518155574799,
-0.06996490061283112,
-0.12445401400327682,
0.09624446928501129,
-0.3203602433204651,
0.303958535194397,
0.2060096263885498,
0.3942106366157532,
0.1310863196849823,
-0.38351449370384216,
0.1998651623725891,
0.023783527314662933,
0.023818165063858032,
-0.15495218336582184,
0.3204905390739441,
0.34415218234062195,
-0.0772998183965683,
0.30105170607566833,
-0.03378903865814209,
-0.14547498524188995,
0.14178571105003357,
-0.15349534153938293,
-0.14547458291053772,
-0.3616621792316437,
0.3138565123081207,
-0.033794693648815155,
0.04718582704663277,
-0.11389689147472382,
0.3828153908252716,
0.401687890291214,
0.3852694630622864,
0.11359931528568268,
0.10793149471282959,
-0.08444835990667343,
-0.04367637634277344,
-0.04926282912492752,
0.22826269268989563,
-0.21011270582675934,
0.23383164405822754,
0.34308841824531555,
0.27654534578323364,
0.018329542130231857,
-0.008296282030642033,
-0.22463610768318176,
0.3973415195941925,
0.07747067511081696,
-0.12213963270187378,
0.2896921634674072,
-0.10761579871177673,
-0.045698124915361404,
-0.2772288918495178,
0.1048431396484375,
0.01166202686727047,
-0.0693206861615181,
-0.10930932313203812,
-0.04163241386413574,
-0.3411889374256134,
-0.2628677785396576,
-0.23888036608695984,
-0.3346976339817047,
-0.0919712632894516,
-0.4030735194683075,
0.24178943037986755,
-0.04800829663872719,
-0.2613852024078369,
0.2518022358417511,
0.10390129685401917,
0.5412730574607849,
-0.1396019607782364,
0.2570074200630188,
-0.20988865196704865,
-0.16344648599624634,
-0.3350362479686737,
0.2615451514720917,
0.07148049026727676,
-0.009689508937299252,
0.6337122321128845,
-0.2877264618873596,
0.22851616144180298,
-0.03711339831352234,
-0.467182993888855,
0.11310461163520813,
0.08340699970722198,
0.02887153998017311,
0.22166697680950165,
0.01384231448173523,
0.2017315775156021,
-0.3470592498779297,
0.22137923538684845,
-0.060305602848529816,
-0.06532084196805954,
-0.17382922768592834,
-0.2651668190956116,
-0.44497576355934143,
-0.03218413516879082,
-0.7677299976348877,
-0.4418914020061493,
-0.2651734948158264,
-0.0865011215209961,
-0.3642120659351349,
0.07672902196645737,
0.2934865653514862,
-0.1501423567533493,
0.21956653892993927,
-0.07298769056797028,
0.11997608840465546,
-0.28608307242393494,
0.09947289526462555,
0.38716572523117065,
-0.2667452096939087,
-0.2149740308523178,
0.14250226318836212,
0.010607607662677765,
0.3104972839355469,
-0.15210570394992828,
0.0015579164028167725,
0.4561629295349121,
0.0843992605805397,
0.2617936134338379,
0.32644250988960266,
0.5436168909072876,
0.19780245423316956,
0.15101641416549683,
-0.24131223559379578,
-0.37306782603263855,
-0.18423964083194733,
0.1567745804786682,
0.16195839643478394,
0.4169941246509552,
0.1445743441581726,
0.06452789902687073,
0.15117092430591583,
0.4219459295272827,
0.11032775044441223,
-0.1442938894033432,
0.29311680793762207,
0.04830697923898697,
-0.02653701975941658,
-0.03889454901218414,
-0.5767915844917297,
0.4208674132823944,
-0.025616377592086792,
-0.10823312401771545,
0.6724063754081726,
-0.06650390475988388,
-0.05110727250576019,
-0.2036520093679428,
0.4617724120616913,
-0.05096547305583954,
-0.2799992561340332,
-0.00897277146577835,
0.04421849921345711,
0.2523651123046875,
0.18769706785678864,
-0.33716583251953125,
-0.33109429478645325,
-0.34796142578125,
0.15936797857284546,
0.08009780943393707,
-0.224238783121109,
-0.08493613451719284,
0.061280664056539536,
-0.07109203189611435,
-0.4463781714439392,
0.2790629267692566,
0.33625328540802,
0.34297308325767517,
-0.21306844055652618,
-0.15206290781497955,
-0.00808204710483551,
0.15164679288864136,
0.2631422281265259,
-0.3619677424430847,
0.03872765600681305,
0.19359810650348663,
-0.0585508868098259,
-0.03560129553079605,
-0.003346417099237442,
-0.4417620301246643,
0.009729068726301193,
0.5186336636543274,
-0.0517323762178421,
-0.13013873994350433,
-0.089586041867733,
0.10409224778413773,
0.2793542146682739,
-0.2680599093437195,
-0.11816252022981644,
0.03539608046412468,
-0.053472720086574554,
-0.08410675078630447,
-0.010659262537956238,
0.01633450575172901,
0.2835977077484131,
0.06650009006261826,
0.11807917058467865,
0.2026331126689911,
-0.23887762427330017,
0.2810305058956146,
0.09621034562587738,
-0.06501571834087372,
0.3816201984882355,
-0.03991968184709549,
0.06556989997625351,
0.35263073444366455,
0.020625123754143715,
0.2904701232910156,
-0.3022008240222931,
0.014808036386966705,
0.1298609972000122,
-0.3256891071796417,
0.32355794310569763,
0.505484938621521,
-0.018840651959180832,
0.02471432089805603,
0.13842430710792542,
-0.03179142624139786,
-0.20047089457511902,
0.23711678385734558,
-0.1519356667995453,
0.2129073590040207,
-0.09472986310720444,
0.18407656252384186,
0.05507723614573479,
-0.11664450168609619,
-0.10405505448579788,
0.1748671531677246,
0.1363048106431961,
-0.4941786527633667,
-0.07324080169200897,
0.22961711883544922,
0.9664260149002075,
0.19048845767974854,
0.13841263949871063,
0.2758406102657318,
-0.033501606434583664,
-0.06578484177589417,
0.04821135103702545,
0.0508120022714138,
-0.1869107484817505,
0.1847466230392456,
-0.03069705329835415,
0.0752532035112381,
-0.021773003041744232,
0.43145567178726196,
-0.03693358600139618,
0.1354796588420868,
0.515626847743988,
0.13836261630058289,
0.2337649017572403,
0.22053784132003784,
0.2501477003097534,
-0.4087953269481659,
-0.07564732432365417,
0.17379668354988098,
-0.09410935640335083,
-0.028672102838754654,
-0.1461779773235321,
-0.15361806750297546,
0.03461026772856712,
-0.004264678806066513,
-0.2722618281841278,
0.07897078990936279,
-0.5890011787414551,
0.27493464946746826,
-0.4028260409832001,
-0.11980115622282028,
0.17472337186336517,
-0.3142209053039551,
0.30088603496551514,
0.056546181440353394,
-0.22697684168815613,
-0.06261038780212402,
-0.15545740723609924,
0.0963049978017807,
-0.2385854870080948,
0.020742986351251602,
0.292378306388855,
-0.30633172392845154,
-0.19596408307552338,
-0.16129687428474426,
0.16492854058742523,
-0.24511998891830444,
0.09035095572471619,
0.0248103104531765,
0.371493399143219,
-0.0985419750213623,
0.1155400425195694,
0.33948805928230286,
-0.08723153173923492,
-0.2886784076690674,
0.10704691708087921,
-0.019257962703704834,
-0.5331570506095886,
0.3946985900402069,
-0.07654662430286407,
-0.07478327304124832,
-0.12778456509113312,
0.273950457572937,
0.0700785368680954,
0.10948777198791504,
0.20581288635730743,
0.44491344690322876,
-0.2676800489425659,
-0.21781682968139648,
0.043520957231521606,
0.20484934747219086,
-0.21411502361297607,
0.008880035020411015,
0.318126916885376,
-0.23867416381835938,
-0.054053205996751785,
0.6365104913711548,
0.406830370426178,
0.17382049560546875,
-0.19674023985862732,
-0.15196286141872406,
-0.1225925162434578,
0.1349281221628189,
0.06225372478365898,
0.49297896027565,
-0.04790778458118439,
0.28130635619163513,
-0.04941972345113754,
-0.14672069251537323,
-0.39664342999458313,
-0.10324680805206299,
0.03902314603328705,
0.10376431792974472,
-0.014900099486112595,
-0.2560126781463623,
-0.06677675247192383,
0.20313584804534912,
0.09047107398509979,
-0.15507203340530396,
-0.2829785645008087,
-0.22000417113304138,
-0.2144644409418106,
0.08864230662584305,
0.11741296201944351,
-0.24404925107955933,
0.10411283373832703,
-0.027158653363585472,
0.05352663993835449,
-0.10229775309562683,
0.1413942277431488,
-0.12613680958747864,
-0.15799638628959656,
0.22468747198581696,
0.38016268610954285,
-0.512062132358551,
-0.12454506754875183,
0.07053951919078827,
0.3344877362251282,
-0.004978954792022705,
0.15002384781837463,
0.2852223515510559,
0.11694291234016418,
-0.1642131209373474,
0.3835922181606293,
0.11379552632570267,
0.15234942734241486,
-0.0438055619597435,
0.11363178491592407,
-0.12485525012016296,
-0.17118103802204132,
0.2598100006580353,
0.302360475063324,
0.0808526873588562,
0.02304430492222309,
-0.40586578845977783,
-0.03520582988858223,
0.21593384444713593,
-0.44224482774734497,
-0.07636316865682602,
-0.04546242579817772,
-0.04313546419143677,
0.28904321789741516,
0.29463282227516174,
0.3833942115306854,
-0.09361254423856735,
0.21464718878269196,
0.00915021076798439,
-0.23179976642131805,
-0.10631226003170013,
-0.04980853199958801,
0.12427690625190735,
-0.12738101184368134,
0.2068745493888855,
0.07056119292974472,
-0.252233624458313,
-0.012562841176986694,
0.035778310149908066,
-0.03932827711105347,
0.9443345069885254,
0.055424343794584274,
0.1277291476726532,
0.26078441739082336,
-0.15259777009487152,
0.14440838992595673,
-0.4156579375267029,
0.0907362550497055,
0.22287344932556152,
0.0885285958647728,
0.16590091586112976,
0.10513998568058014,
-0.309865266084671,
-0.18881328403949738,
0.323490172624588,
-0.352739542722702,
-0.10414327681064606,
0.03361647576093674,
-0.2721531093120575,
-0.2560219466686249,
-0.17531746625900269,
-0.04851739481091499,
0.07555002719163895,
0.31666699051856995,
0.03225439414381981,
0.1280556619167328,
-0.16003070771694183,
-0.15471836924552917,
-0.11637852340936661,
0.009621359407901764,
-0.21666906774044037,
0.29533302783966064,
0.3576921820640564,
-0.21178677678108215,
-0.051791924983263016,
0.3719337582588196,
0.11565151810646057,
0.02777387574315071,
-0.0507839061319828,
0.128289133310318,
-0.22016410529613495,
-0.1960471272468567,
-0.17853128910064697,
0.3015793561935425,
0.028173547238111496,
-0.2969711124897003,
0.28752925992012024,
0.05890914052724838,
-0.10923732072114944,
-0.15998509526252747,
0.17985951900482178,
-0.4980977177619934,
-0.05898728594183922,
0.08350540697574615,
0.03081331215798855,
-0.11729307472705841,
-0.19617348909378052,
0.2696996331214905,
-0.23497605323791504,
0.052969031035900116,
0.23625268042087555,
-0.4396250545978546,
0.005742670968174934,
0.026364579796791077,
0.08010350912809372,
-0.07496027648448944,
0.7365744113922119,
0.09806646406650543,
-0.13629314303398132,
-0.36671459674835205,
-0.22925405204296112,
-0.41237226128578186,
-0.11632593721151352,
0.1767958402633667,
0.3161047697067261,
-0.3612353801727295,
0.07957328855991364,
0.20179374516010284,
-0.03293011337518692,
0.24646225571632385,
0.141008198261261,
-0.05734630301594734,
0.0953294113278389,
-0.42171427607536316,
-0.028654959052801132,
0.271857887506485,
0.21048849821090698,
-0.018213775008916855,
0.07031803578138351,
-0.03462577238678932,
-0.08342595398426056,
0.08494902402162552,
-0.14495348930358887,
-0.21168816089630127,
0.2417704463005066,
0.26134926080703735,
-0.04415102303028107,
0.2784499526023865,
0.4927442967891693,
-0.3866878151893616,
-0.058778442442417145,
-0.2552831470966339,
-0.22771741449832916,
0.021143022924661636,
0.29913240671157837,
0.018877727910876274,
0.3166448473930359,
0.06031403690576553,
-0.12281493842601776,
-0.06442458182573318,
-0.32329991459846497,
0.05117609351873398,
-0.02162916399538517,
-0.2860196828842163,
0.24486148357391357,
-0.29567399621009827,
0.39966273307800293,
0.12117183208465576,
0.4754553437232971,
-0.03919728845357895,
0.2557384669780731,
-0.27012526988983154,
-0.4410146474838257,
0.3719325661659241,
0.003664625808596611,
-0.37971651554107666,
-0.30958178639411926,
0.2952936887741089,
-0.1029626801609993,
0.21302609145641327,
-0.40638312697410583,
-0.3061915934085846,
0.20614269375801086,
0.03288636356592178,
0.060114938765764236,
0.5993670225143433,
0.31198200583457947,
-0.0803835317492485,
-0.08604928106069565,
-0.13945521414279938,
0.47704407572746277,
-0.23248541355133057,
-0.29416996240615845,
-0.24479132890701294
] |
https://github.com/huggingface/datasets/issues/436 | Google Colab - load_dataset - PyArrow exception | +1! this is the reason our tests are failing at [TextAttack](https://github.com/QData/TextAttack)
(Though it's worth noting if we fixed the version number of pyarrow to 0.16.0 that would fix our problem too. But in this case we'll just wait for you all to update) | With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue
ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`.
The error goes only when I install version 0.16.0
i.e. !pip install pyarrow==0.16.0 | 43 | Google Colab - load_dataset - PyArrow exception
With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue
ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`.
The error goes only when I install version 0.16.0
i.e. !pip install pyarrow==0.16.0
+1! this is the reason our tests are failing at [TextAttack](https://github.com/QData/TextAttack)
(Though it's worth noting if we fixed the version number of pyarrow to 0.16.0 that would fix our problem too. But in this case we'll just wait for you all to update) | [
-0.36298081278800964,
0.2522222101688385,
0.029282812029123306,
0.06686627864837646,
-0.06560620665550232,
-0.3179527521133423,
0.3687325716018677,
0.14556469023227692,
-0.1377859115600586,
0.15375658869743347,
-0.093441441655159,
0.42297062277793884,
-0.11837070435285568,
0.023922136053442955,
0.19161148369312286,
-0.046091996133327484,
0.04540567100048065,
0.3213040828704834,
-0.10093337297439575,
0.21287398040294647,
-0.13278116285800934,
0.3483654856681824,
-0.5873017311096191,
0.2542971968650818,
-0.2375737726688385,
-0.06989249587059021,
-0.011701766401529312,
-0.02216898649930954,
-0.1265796720981598,
-0.7411338090896606,
0.3176330029964447,
-0.07895667850971222,
0.07641354948282242,
0.3993418216705322,
-0.00011734930740203708,
0.014425486326217651,
0.48224425315856934,
0.0728602483868599,
-0.20693445205688477,
-0.3872157335281372,
0.03867556154727936,
-0.22775129973888397,
0.31386440992355347,
0.037371642887592316,
0.035888321697711945,
0.15121181309223175,
0.22121503949165344,
0.445300817489624,
0.3842616081237793,
0.49771180748939514,
0.14085204899311066,
0.14632441103458405,
0.23708786070346832,
0.06509310752153397,
0.5099895000457764,
-0.28108614683151245,
-0.15134300291538239,
0.4955286979675293,
0.31797024607658386,
-0.1587512046098709,
-0.03686735779047012,
0.10349161922931671,
-0.15345950424671173,
0.08655980974435806,
0.0030836574733257294,
0.10412143170833588,
-0.2000461220741272,
-0.1258920282125473,
-0.036021582782268524,
0.27567893266677856,
0.37685948610305786,
-0.4508688747882843,
-0.24919816851615906,
-0.013175901025533676,
0.1185370534658432,
-0.6331679821014404,
0.2870851159095764,
0.11609911173582077,
-0.2995826005935669,
0.26484981179237366,
-0.11152429133653641,
0.010753946378827095,
-0.1450328826904297,
0.11355257034301758,
-0.023642491549253464,
0.6451189517974854,
0.012620307505130768,
0.12861350178718567,
0.16339421272277832,
-0.04055339843034744,
0.452458918094635,
0.19528405368328094,
-0.027437400072813034,
0.1291082352399826,
-0.07823486626148224,
0.09924831986427307,
-0.18887892365455627,
0.09849578142166138,
0.18031007051467896,
-0.1165359765291214,
0.024916518479585648,
0.04849420115351677,
-0.0032618436962366104,
0.35483527183532715,
-0.04180511459708214,
0.19820909202098846,
0.17644663155078888,
-0.07546238601207733,
0.400010883808136,
0.21956264972686768,
-0.15643757581710815,
0.10642288625240326,
0.0805542916059494,
-0.3143375515937805,
0.01167767122387886,
-0.0923808366060257,
0.24312300980091095,
-0.33422088623046875,
-0.4480621814727783,
-0.2376209795475006,
-0.5925034284591675,
-0.0588284432888031,
-0.0057861777022480965,
0.3084496259689331,
-0.1026286631822586,
-0.2543330788612366,
0.04405403137207031,
0.36275625228881836,
-0.3065458834171295,
-0.10348307341337204,
-0.04444943368434906,
0.1358824521303177,
-0.19138965010643005,
0.09981711953878403,
0.31353986263275146,
-0.19872258603572845,
0.24184070527553558,
0.06004032492637634,
-0.06561082601547241,
0.11172616481781006,
-0.14277920126914978,
-0.1940474957227707,
-0.08098413795232773,
0.2763291001319885,
0.12912048399448395,
-0.16307972371578217,
-0.1771034449338913,
-0.43459606170654297,
-0.19286978244781494,
0.34116268157958984,
-0.14027518033981323,
-0.22191478312015533,
0.03383449465036392,
0.1234435960650444,
-0.31553399562835693,
-0.2954394519329071,
-0.29150670766830444,
0.24210625886917114,
-0.11541729420423508,
-0.33251500129699707,
0.0051548779010772705,
-0.33832454681396484,
-0.254937082529068,
-0.0052291471511125565,
0.10198665410280228,
0.31704044342041016,
-0.33841443061828613,
-0.03783775493502617,
-0.07165311276912689,
-0.1312974989414215,
0.17591652274131775,
0.11953015625476837,
-0.13562841713428497,
0.05288863927125931,
-0.08104764670133591,
0.37073618173599243,
0.10331548750400543,
-0.08004153519868851,
-0.3151877224445343,
-0.1095571368932724,
-0.0785585343837738,
-0.12707041203975677,
-0.05616704374551773,
-0.21934261918067932,
-0.2982596158981323,
-0.04506068304181099,
0.20913107693195343,
0.21972762048244476,
0.0764506608247757,
0.0485544428229332,
-0.31252551078796387,
-0.28325605392456055,
0.2770364284515381,
0.13662908971309662,
0.04367475584149361,
-0.23767510056495667,
-0.004484154284000397,
-0.3707580864429474,
0.018956389278173447,
-0.17225545644760132,
-0.25146040320396423,
-0.03751517832279205,
0.30370768904685974,
-0.2670266628265381,
-0.07092920690774918,
-0.004937233403325081,
-0.25133493542671204,
0.09999088197946548,
-0.19867506623268127,
0.33062535524368286,
-0.21120329201221466,
-0.10168459266424179,
-0.3360033631324768,
0.24268965423107147,
0.15683570504188538,
-0.07571792602539062,
0.05374286323785782,
0.013993971049785614,
0.12949024140834808,
0.44556185603141785,
-0.034287724643945694,
0.18795201182365417,
-0.005991943180561066,
0.14840763807296753,
0.25854191184043884,
0.18226025998592377,
-0.3008643388748169,
-0.5154078006744385,
0.20872855186462402,
0.17767730355262756,
0.08947432041168213,
0.0034554500598460436,
-0.07240165770053864,
0.1765434741973877,
-0.009275192394852638,
0.07639410346746445,
-0.26712504029273987,
-0.28466784954071045,
0.10674219578504562,
-0.468156099319458,
-0.004474056884646416,
0.025846291333436966,
-0.03971876576542854,
0.0368182510137558,
0.34394145011901855,
0.19390136003494263,
0.08609844744205475,
-0.0027804598212242126,
0.1075400859117508,
-0.08369351178407669,
0.12145380675792694,
-0.10254091024398804,
0.18624767661094666,
0.15550664067268372,
0.18888439238071442,
0.18044635653495789,
0.35165953636169434,
-0.08173695206642151,
-0.19290587306022644,
0.02094642072916031,
0.5004721879959106,
-0.01041560247540474,
0.39686354994773865,
0.2594713866710663,
-0.13919919729232788,
-0.22496914863586426,
0.19842949509620667,
-0.2625120282173157,
0.3533538579940796,
0.1530499905347824,
-0.0697852224111557,
0.32675254344940186,
-0.26910534501075745,
-0.35534369945526123,
0.19394361972808838,
0.040157243609428406,
0.22294026613235474,
-0.016499564051628113,
0.3850227892398834,
-0.0000719735398888588,
-0.44638335704803467,
-0.2158684879541397,
-0.024114344269037247,
0.2902511656284332,
-0.195781871676445,
0.23334653675556183,
-0.2788991332054138,
-0.4786578118801117,
-0.3216550052165985,
-0.37461602687835693,
-0.2644892632961273,
-0.11391817033290863,
0.1861754208803177,
0.087578184902668,
0.02091388776898384,
0.2171657830476761,
0.3065680265426636,
0.25341859459877014,
-0.24055710434913635,
-0.2795981168746948,
-0.293327271938324,
-0.2630251944065094,
-0.6036447882652283,
0.040145184844732285,
0.3904753625392914,
0.17002254724502563,
0.16200372576713562,
-0.1685163974761963,
-0.06093793734908104,
0.41202887892723083,
-0.5072563290596008,
0.06287720054388046,
-0.18831698596477509,
0.3759163022041321,
0.025406718254089355,
-0.1615849882364273,
-0.49566787481307983,
-0.4668342173099518,
0.07762517035007477,
-0.3616185188293457,
-0.27190789580345154,
0.09473224729299545,
-0.0823628231883049,
-0.053325213491916656,
-0.21266792714595795,
-0.4288897216320038,
-0.43347570300102234,
-0.17621813714504242,
0.2912442684173584,
0.11143110692501068,
0.08758623152971268,
0.4321458637714386,
0.1826333850622177,
0.3838970363140106,
-0.07881384342908859,
-0.01564815081655979,
0.05687357485294342,
0.15797999501228333,
0.17090119421482086,
-0.11303495615720749,
-0.28631794452667236,
0.08400177955627441,
-0.05555751174688339,
0.12503750622272491,
-0.13184592127799988,
-0.5317516922950745,
-0.2815965414047241,
-0.056102506816387177,
0.12255185842514038,
0.2538725733757019,
0.023475581780076027,
0.33967357873916626,
0.06294912844896317,
-0.031977780163288116,
0.07321882247924805,
-0.40392765402793884,
0.03386284410953522,
-0.05149049311876297,
-0.028492175042629242,
0.08025051653385162,
0.10639877617359161,
-0.06779206544160843,
0.7185685038566589,
-0.13019411265850067,
-0.10918556153774261,
0.397230327129364,
-0.10397958010435104,
0.16486768424510956,
-0.23605617880821228,
-0.02348516695201397,
0.10256442427635193,
-0.01778082549571991,
-0.16063381731510162,
0.2749057412147522,
-0.16227680444717407,
-0.4740837812423706,
-0.19053460657596588,
-0.19896379113197327,
-0.25411123037338257,
-0.2911301255226135,
0.12633445858955383,
0.3540947735309601,
0.04269248992204666,
0.050140973180532455,
-0.12410170584917068,
0.10966399312019348,
-0.3338995575904846,
-0.07629378139972687,
-0.046139881014823914,
-0.10303326696157455,
-0.03807607293128967,
0.04964153841137886,
-0.4655982553958893,
-0.45658230781555176,
0.3199998736381531,
0.42372533679008484,
0.22643068432807922,
-0.06852734088897705,
0.003459058701992035,
-0.07610900700092316,
-0.22048428654670715,
-0.07254697382450104,
0.017899343743920326,
-0.014448333531618118,
0.3299289643764496,
0.12919820845127106,
-0.07896330952644348,
-0.1727336049079895,
-0.32895350456237793,
-0.08921485394239426,
0.30470335483551025,
-0.08361038565635681,
-0.32408198714256287,
0.15374252200126648,
0.46838563680648804,
0.348138689994812,
0.21292370557785034,
0.19878508150577545,
-0.3215838074684143,
-0.3988630473613739,
-0.13834314048290253,
0.23975211381912231,
0.0547618493437767,
0.3466656804084778,
-0.17574961483478546,
0.2279437929391861,
0.09482111036777496,
-0.13611704111099243,
0.02705329656600952,
0.420095831155777,
-0.007374286651611328,
-0.0413125604391098,
-0.012785505503416061,
-0.18985722959041595,
-0.40064695477485657,
0.12304288148880005,
0.6168134808540344,
0.13522522151470184,
-0.24127408862113953,
-0.2904059886932373,
0.1564190685749054,
0.4171554744243622,
0.1968611627817154,
-0.09511981159448624,
0.08530855178833008,
-0.29087480902671814,
-0.12725740671157837,
0.17971482872962952,
0.09007836878299713,
0.14242735505104065,
0.13469958305358887,
-0.014332116581499577,
0.13342972099781036,
0.6629955768585205,
0.0605979822576046,
-0.019560672342777252,
0.18408428132534027,
-0.003989018499851227,
-0.35961735248565674,
0.4945670962333679,
-0.016560882329940796,
0.9023061990737915,
0.00527779757976532,
0.10251351445913315,
0.5774897933006287,
-0.01071113720536232,
0.3412156105041504,
0.08777490258216858,
0.23455944657325745,
-0.4027547538280487,
-0.09810860455036163,
0.0909469872713089,
-0.16327863931655884,
0.14618521928787231,
-0.13111712038516998,
-0.5301914215087891,
0.23455239832401276,
0.35082435607910156,
0.07679114490747452,
0.378078818321228,
0.1693219393491745,
-0.16867686808109283,
-0.008612090721726418,
-0.4974406957626343,
0.07248849421739578,
-0.07946163415908813,
0.18585672974586487,
-0.20106399059295654,
0.025602148845791817,
0.01261848583817482,
-0.27724242210388184,
-0.4413926601409912,
0.34477218985557556,
-0.4248204231262207,
-0.11896267533302307,
0.43661031126976013,
-0.23452848196029663,
0.2927360534667969,
0.11342860013246536,
0.23669782280921936,
0.14305175840854645,
-0.19893738627433777,
0.20383945107460022,
-0.17900800704956055,
-0.21647971868515015,
0.19338327646255493,
0.10814983397722244,
0.2353772222995758,
-0.19601690769195557,
-0.2463551163673401,
0.14337864518165588,
0.028234880417585373,
-0.2993829846382141,
0.27501019835472107,
0.031736161559820175,
-0.04795987159013748,
-0.04971500113606453,
0.08182471990585327,
0.12914860248565674,
0.10139001905918121,
-0.17262443900108337,
0.09945239126682281,
-0.014350667595863342,
-0.09686382114887238,
0.18499363958835602,
0.02562311850488186,
-0.2739037871360779,
-0.08566346764564514,
0.3191241919994354,
-0.11602479964494705,
0.12270019948482513,
0.6109797954559326,
0.3582257330417633,
-0.013536361977458,
-0.14397458732128143,
-0.19544082880020142,
-0.19763301312923431,
-0.3472585082054138,
0.1349239945411682,
-0.08934812992811203,
-0.08295543491840363,
0.20653273165225983,
0.6358376145362854,
0.032133571803569794,
0.03425954282283783,
0.032236095517873764,
-0.43785762786865234,
-0.10010992735624313,
0.29359859228134155,
0.3192722797393799,
0.0036184005439281464,
0.33271524310112,
0.2987149953842163,
0.23752468824386597,
-0.0031668413430452347,
-0.24295558035373688,
0.12840674817562103,
-0.2802465856075287,
0.1713702231645584,
-0.29919877648353577,
-0.14533936977386475,
0.27839195728302,
0.09766383469104767,
0.02925603650510311,
0.20570030808448792,
-0.07731448858976364,
-0.22132205963134766,
-0.16462156176567078,
0.10921935737133026,
0.11798974871635437,
-0.25784581899642944,
-0.09890330582857132,
-0.06654432415962219,
0.23094859719276428,
0.04041006788611412,
0.08348977565765381,
-0.11753764748573303,
-0.22245918214321136,
0.2460852712392807,
0.08182933181524277,
0.3629995286464691,
-0.17287760972976685,
-0.0356266051530838,
-0.40943223237991333,
0.3783412575721741,
0.2551015615463257,
0.22783216834068298,
0.1126708909869194,
-0.004937194287776947,
0.19827957451343536,
-0.05324774235486984,
-0.1598258763551712,
0.058852724730968475,
0.05493300408124924,
-0.4088420271873474,
-0.0978536456823349,
-0.3386639654636383,
0.16938182711601257,
0.3265039026737213,
-0.17327408492565155,
-0.17915424704551697,
0.4539535641670227,
0.11843468993902206,
-0.4062667489051819,
-0.00429058400914073,
0.15416592359542847,
0.12956662476062775,
-0.00789300724864006,
0.26040467619895935,
0.22045567631721497,
-0.1430950164794922,
0.0729011669754982,
0.20423394441604614,
0.29348024725914,
0.0710899606347084,
-0.18082329630851746,
0.22781720757484436,
-0.21069975197315216,
0.09912226349115372,
0.18737275898456573,
0.04731803759932518,
0.42229798436164856,
0.1560610830783844,
-0.2856239378452301,
0.20942561328411102,
-0.27419257164001465,
0.24128513038158417,
0.12571868300437927,
-0.19850578904151917,
0.096461720764637,
0.45088455080986023,
0.2907314598560333,
-0.10116187483072281,
0.21075130999088287,
0.5228333473205566,
-0.1316390037536621,
0.09808727353811264,
-0.1857365220785141,
0.26798439025878906,
-0.017108775675296783,
-0.12364576756954193,
-0.068799689412117,
0.03553076833486557,
-0.18546000123023987,
0.15018780529499054,
-0.14708052575588226,
-0.009516030550003052,
0.39605239033699036,
0.21031908690929413,
-0.2445913404226303,
-0.07838836312294006,
0.014613654464483261,
0.11553774774074554,
0.06769298017024994,
-0.17532892525196075,
0.3981393575668335,
0.09470183402299881,
-0.18716078996658325,
-0.09087637066841125,
0.6913028955459595,
0.5602604746818542,
0.14604239165782928,
-0.3398175537586212,
-0.12166643887758255,
-0.3152950704097748,
0.010718313977122307,
-0.10497705638408661,
0.2884892523288727,
0.3598891794681549,
0.4698311686515808,
0.25051504373550415,
0.07437621057033539,
-0.09025763720273972,
0.302650511264801,
0.164470374584198,
-0.17919787764549255,
-0.07828487455844879,
0.03112587332725525,
0.1242983490228653,
-0.1412469446659088,
-0.3082647919654846,
0.027674995362758636,
-0.10408787429332733,
0.38284340500831604,
0.18283239006996155,
-0.02762977033853531,
-0.022052042186260223,
-0.10876090824604034,
0.04219875484704971,
0.23381976783275604,
0.5969293117523193,
0.466042697429657,
0.5083937644958496,
-0.36440151929855347,
-0.17659226059913635,
-0.5498262643814087,
0.1105111762881279,
-0.33756163716316223,
-0.019114859402179718,
0.04307093843817711,
-0.13093778491020203,
-0.12243049591779709,
0.36556529998779297,
-0.23737375438213348,
0.43229061365127563,
-0.34099048376083374,
-0.18122598528862,
-0.4165714979171753,
0.0285931546241045,
0.015204433351755142,
-0.2957242727279663,
-0.132924422621727,
-0.24557682871818542,
0.240043506026268,
-0.6261112093925476,
-0.06808477640151978,
-0.11214636266231537,
-0.22245880961418152,
0.17805415391921997,
0.11088000982999802,
0.4410927891731262,
0.11554297059774399,
0.5288137197494507,
0.006033439189195633,
0.0991591289639473,
-0.11563295125961304,
-0.32686835527420044,
-0.1695927232503891,
0.15659841895103455,
0.08985248953104019,
0.18258316814899445,
0.002996130846440792,
0.2266044318675995,
-0.08418343216180801,
0.5815643072128296,
-0.04080047458410263,
0.2421082705259323,
0.26310136914253235,
0.031238311901688576,
-0.08048947155475616,
-0.0827915146946907,
-0.03334296867251396,
0.20001307129859924,
-0.05443212389945984,
-0.10926031321287155,
-0.5326638221740723,
-0.4132595956325531,
0.3147658705711365,
-0.5150582790374756,
-0.07206091284751892,
-0.20500585436820984,
0.08679507672786713,
0.2675556540489197,
-0.31007710099220276,
-0.6111454963684082,
0.05030318349599838,
0.22340510785579681,
0.09546097368001938,
-0.4149085283279419,
0.13358277082443237,
0.2899448573589325,
0.04627471789717674,
-0.09485194832086563,
0.43032121658325195,
0.0408819243311882,
-0.06069786846637726,
-0.23439201712608337,
-0.2921995520591736
] |
https://github.com/huggingface/datasets/issues/436 | Google Colab - load_dataset - PyArrow exception | Came to raise this issue, great to see other already have and it's being fixed so soon!
As an aside, since no one wrote this already, it seems like the version check only looks at the second part of the version number making sure it is >16, but pyarrow newest version is 1.0.0 so the second past is 0! | With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue
ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`.
The error goes only when I install version 0.16.0
i.e. !pip install pyarrow==0.16.0 | 59 | Google Colab - load_dataset - PyArrow exception
With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue
ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`.
The error goes only when I install version 0.16.0
i.e. !pip install pyarrow==0.16.0
Came to raise this issue, great to see other already have and it's being fixed so soon!
As an aside, since no one wrote this already, it seems like the version check only looks at the second part of the version number making sure it is >16, but pyarrow newest version is 1.0.0 so the second past is 0! | [
-0.3563593626022339,
0.26928308606147766,
0.04035418853163719,
0.025508731603622437,
-0.10822539031505585,
-0.21241644024848938,
0.16984102129936218,
0.220927432179451,
-0.14622679352760315,
0.11467276513576508,
0.09565474092960358,
0.5587811470031738,
-0.2984771132469177,
0.0380694642663002,
0.06230652704834938,
-0.08091866970062256,
0.13042399287223816,
0.3858692944049835,
0.061073511838912964,
0.16962262988090515,
-0.2576378583908081,
0.307094007730484,
-0.44199150800704956,
0.2494819313287735,
-0.2984102666378021,
0.013922427780926228,
0.019361993297934532,
0.07734598964452744,
-0.36779963970184326,
-0.6848932504653931,
0.46371209621429443,
-0.13720957934856415,
0.22551243007183075,
0.3252450227737427,
-0.00011749899567803368,
-0.012684740126132965,
0.49808043241500854,
0.10903555154800415,
-0.1948445588350296,
-0.45252692699432373,
0.09622905403375626,
-0.4826612174510956,
0.38757073879241943,
0.009749524295330048,
0.045787110924720764,
-0.02645210549235344,
0.30288174748420715,
0.675778329372406,
0.26575881242752075,
0.21768461167812347,
0.1667812615633011,
0.22138772904872894,
0.4098854959011078,
0.025734882801771164,
0.4948371946811676,
-0.23621000349521637,
-0.1034502312541008,
0.7628591656684875,
0.20072923600673676,
-0.3635481595993042,
0.05919172614812851,
0.16096298396587372,
-0.28427764773368835,
0.007996972650289536,
0.08681508898735046,
-0.009361357428133488,
-0.028280988335609436,
-0.2803567349910736,
-0.07042360305786133,
0.23345530033111572,
0.27866849303245544,
-0.37276044487953186,
-0.2139853984117508,
-0.036941833794116974,
0.16852621734142303,
-0.5201525688171387,
0.20318767428398132,
0.20613177120685577,
-0.2479260265827179,
0.21667054295539856,
0.04231146350502968,
-0.03632538765668869,
-0.16775333881378174,
0.1888076514005661,
-0.1594613790512085,
0.7550785541534424,
0.09104805439710617,
0.12588757276535034,
0.2515864670276642,
-0.05955544114112854,
0.5646763443946838,
0.2610054612159729,
-0.017177414149045944,
0.19574648141860962,
-0.018144603818655014,
0.04401223361492157,
0.008214488625526428,
0.5163194537162781,
0.029362425208091736,
-0.34489554166793823,
0.009651025757193565,
-0.053460538387298584,
0.1265423744916916,
0.44749560952186584,
0.02496591955423355,
-0.06343425065279007,
0.0032090842723846436,
-0.1259063482284546,
0.391904354095459,
0.02188725769519806,
0.15789514780044556,
0.10303648561239243,
0.026926327496767044,
-0.37168970704078674,
-0.005164310336112976,
-0.039415184408426285,
0.3415212631225586,
-0.2093355506658554,
-0.3028346300125122,
-0.2567165791988373,
-0.5051162242889404,
-0.008798125199973583,
0.08194476366043091,
0.19598829746246338,
-0.1884271651506424,
-0.045659713447093964,
-0.01350405439734459,
0.13324344158172607,
-0.25680258870124817,
-0.11320395767688751,
-0.006923648528754711,
0.1749412715435028,
-0.2337508499622345,
0.008289599791169167,
0.24887840449810028,
-0.15687938034534454,
0.23859144747257233,
0.18391945958137512,
-0.15833832323551178,
0.1740047186613083,
-0.08797909319400787,
-0.15438729524612427,
-0.16907468438148499,
0.34637191891670227,
0.09480975568294525,
-0.06895512342453003,
-0.15497100353240967,
-0.44180601835250854,
-0.27653732895851135,
0.3989020884037018,
-0.2178521752357483,
-0.37795111536979675,
-0.2776355743408203,
0.13908961415290833,
-0.4142237901687622,
-0.1977524757385254,
-0.22864636778831482,
0.19751793146133423,
-0.06264666467905045,
-0.5185407400131226,
-0.11069678515195847,
-0.418570876121521,
-0.2588011622428894,
-0.21674562990665436,
-0.03550001233816147,
0.23131540417671204,
-0.42131760716438293,
-0.0013215169310569763,
-0.2052948772907257,
-0.15773221850395203,
0.20291900634765625,
0.12417279183864594,
-0.23963004350662231,
0.003514796495437622,
-0.07104267925024033,
0.20063059031963348,
0.3293650150299072,
-0.10115522146224976,
-0.34828981757164,
0.0037729465402662754,
-0.1243554875254631,
-0.07968426495790482,
-0.05035785585641861,
-0.0146263986825943,
-0.20754341781139374,
-0.10266830772161484,
0.11150601506233215,
0.2191844880580902,
-0.0628921240568161,
0.05185322463512421,
-0.3201490640640259,
-0.28223082423210144,
0.24093984067440033,
0.17954178154468536,
0.029073769226670265,
-0.13222455978393555,
0.12514615058898926,
-0.05116738751530647,
0.15069115161895752,
-0.10880176723003387,
-0.1956821233034134,
-0.0068310946226119995,
0.3765248656272888,
-0.18615330755710602,
-0.12130103260278702,
-0.025211626663804054,
-0.42462611198425293,
0.1397026777267456,
-0.20817048847675323,
0.21053548157215118,
-0.18135742843151093,
-0.13879811763763428,
-0.15854120254516602,
0.20243382453918457,
0.0917205736041069,
0.08649320900440216,
0.05748801678419113,
-0.05384194850921631,
0.14829835295677185,
0.22368751466274261,
0.037407148629426956,
0.048823803663253784,
0.0423659086227417,
0.11621253937482834,
-0.007512349635362625,
0.28531014919281006,
-0.3939155340194702,
-0.5148021578788757,
0.11042062938213348,
0.15654709935188293,
0.14467298984527588,
0.0030894246883690357,
0.047388121485710144,
0.09853318333625793,
0.030291907489299774,
0.1519055962562561,
-0.40958651900291443,
-0.1629502922296524,
0.1721077412366867,
-0.43604975938796997,
0.09034375846385956,
-0.0005213450640439987,
-0.08929955959320068,
0.13817369937896729,
0.3890042304992676,
0.2938117980957031,
0.17873238027095795,
-0.07718858867883682,
-0.04785784333944321,
0.0068732257932424545,
0.010824525728821754,
-0.021976497024297714,
0.06160787492990494,
0.007905974984169006,
0.12706948816776276,
0.30676451325416565,
0.11655065417289734,
0.01300957053899765,
-0.31828540563583374,
0.14580105245113373,
0.473698228597641,
0.07876484096050262,
0.1612204909324646,
0.12029044330120087,
-0.01504749059677124,
-0.20196065306663513,
0.2824191451072693,
-0.2004915326833725,
0.23642686009407043,
0.24883787333965302,
-0.07919593155384064,
0.28624090552330017,
-0.3474993109703064,
-0.2463962584733963,
0.06621985137462616,
0.079555444419384,
0.2478334605693817,
0.05456044524908066,
0.2800651788711548,
0.04408605024218559,
-0.3395346999168396,
-0.04050131142139435,
-0.0013775443658232689,
0.3130807876586914,
-0.15387490391731262,
0.22804363071918488,
-0.3657152056694031,
-0.5152050852775574,
-0.2934383153915405,
-0.3485783636569977,
-0.41902998089790344,
-0.04557394981384277,
0.0744505450129509,
0.3852238059043884,
0.09033924341201782,
0.22604209184646606,
0.37492331862449646,
0.026746615767478943,
-0.2834900915622711,
-0.2804328203201294,
-0.1622309386730194,
-0.31871625781059265,
-0.565355122089386,
0.005158670246601105,
0.2741716802120209,
0.14640262722969055,
0.1834050714969635,
-0.17474985122680664,
-0.03743351623415947,
0.19144125282764435,
-0.6024134159088135,
0.04118760675191879,
-0.2708108425140381,
0.38996461033821106,
0.1654331088066101,
-0.07561752200126648,
-0.4261090159416199,
-0.3029901683330536,
0.04996596276760101,
-0.2672175168991089,
-0.23110230267047882,
-0.07755585014820099,
-0.3112013041973114,
0.10565795749425888,
-0.20254316926002502,
-0.018319353461265564,
-0.5836759209632874,
-0.25590384006500244,
0.07281061261892319,
0.08247362077236176,
0.1966976672410965,
0.3112359344959259,
0.2778766453266144,
0.20483578741550446,
0.0999179556965828,
-0.17803940176963806,
0.07444722950458527,
0.0728750079870224,
0.20038440823554993,
-0.17884312570095062,
-0.24103082716464996,
0.217235267162323,
-0.12020847946405411,
0.021111825481057167,
-0.054061368107795715,
-0.4464501142501831,
-0.457782119512558,
0.04011204466223717,
0.3177594244480133,
0.17633458971977234,
-0.03805448114871979,
0.4169330596923828,
0.09203434735536575,
0.02132241241633892,
0.011006783694028854,
-0.41040733456611633,
-0.22253012657165527,
0.03074297122657299,
0.19509270787239075,
0.12267012894153595,
0.21514660120010376,
-0.07812190800905228,
0.630281925201416,
-0.2324967384338379,
-0.13358663022518158,
0.41082823276519775,
-0.11306165903806686,
0.26410940289497375,
-0.044530607759952545,
-0.04418887197971344,
0.00380752538330853,
0.07693394273519516,
-0.07625465095043182,
0.212675541639328,
-0.14276888966560364,
-0.5381869077682495,
-0.2042008489370346,
-0.24475711584091187,
-0.21567195653915405,
-0.17748330533504486,
0.0836954414844513,
0.44924286007881165,
0.16353191435337067,
0.11254869401454926,
-0.12374382466077805,
0.014828577637672424,
-0.3518211245536804,
-0.18381346762180328,
0.0659230649471283,
-0.10471200197935104,
0.08823294937610626,
0.3130829334259033,
-0.557072639465332,
-0.39759936928749084,
0.35360902547836304,
0.42606109380722046,
0.0035993987694382668,
0.06745947897434235,
-0.05813748389482498,
0.05630767345428467,
-0.12319578975439072,
0.0949186235666275,
-0.050975143909454346,
-0.003970768302679062,
0.23757904767990112,
0.17186877131462097,
-0.24693451821804047,
-0.19550888240337372,
-0.11564315855503082,
0.09925103932619095,
0.29496103525161743,
-0.001734025776386261,
-0.26601576805114746,
0.07757376879453659,
0.5640851259231567,
0.4030727744102478,
0.08651813864707947,
0.04185188561677933,
-0.45081815123558044,
-0.4398837089538574,
0.0007966756820678711,
0.07571742683649063,
-0.04691958799958229,
0.28026479482650757,
-0.1493748277425766,
0.1977667510509491,
0.18386101722717285,
-0.13248705863952637,
-0.11312060058116913,
0.4778262674808502,
0.07200011610984802,
0.05059375241398811,
-0.07456181943416595,
-0.1453448086977005,
-0.2305830717086792,
0.36792734265327454,
0.4935193657875061,
0.13611307740211487,
-0.05450059473514557,
-0.10770527273416519,
0.3420847952365875,
0.2212441861629486,
0.12680359184741974,
-0.05178775638341904,
0.029637448489665985,
-0.10305456817150116,
-0.21112246811389923,
0.23389598727226257,
-0.003501242259517312,
0.08970831334590912,
-0.03470359370112419,
-0.26270583271980286,
0.1297742873430252,
0.6660517454147339,
0.20217832922935486,
-0.08822677284479141,
0.025741873309016228,
-0.011450685560703278,
-0.1990589052438736,
0.34811729192733765,
0.07435672730207443,
0.8326465487480164,
-0.025894515216350555,
0.07674971967935562,
0.6967660784721375,
-0.11951877921819687,
0.6577321290969849,
0.23385490477085114,
0.32348769903182983,
-0.3517787456512451,
0.0525328703224659,
0.03925523906946182,
-0.07630878686904907,
0.11417563259601593,
-0.16065481305122375,
-0.43577349185943604,
0.2853180766105652,
0.27057981491088867,
0.04297640174627304,
0.3506123125553131,
0.1500798612833023,
-0.06479638814926147,
0.026377031579613686,
-0.35482680797576904,
0.07938123494386673,
-0.17171326279640198,
0.23683083057403564,
-0.35794931650161743,
-0.0989944338798523,
0.0726470947265625,
-0.3737102150917053,
-0.4061583876609802,
0.1980193555355072,
-0.31195133924484253,
-0.0859910100698471,
0.21184945106506348,
-0.4263008236885071,
0.07145790755748749,
0.004807360470294952,
-0.01990504562854767,
0.03017057664692402,
-0.173684760928154,
0.21353791654109955,
0.027786999940872192,
-0.2682163417339325,
-0.09509612619876862,
0.15930357575416565,
0.19955120980739594,
-0.18099525570869446,
-0.18069109320640564,
0.11419741064310074,
-0.07664627581834793,
-0.16022685170173645,
0.1103009581565857,
0.21794669330120087,
-0.15760259330272675,
0.2590266764163971,
0.07071508467197418,
0.02086035907268524,
0.2043582648038864,
-0.15483058989048004,
0.11616887152194977,
-0.03162518888711929,
0.09684725105762482,
0.14474591612815857,
-0.13222002983093262,
-0.25699833035469055,
-0.1296864002943039,
0.29179224371910095,
0.0648806244134903,
0.1338760405778885,
0.41785094141960144,
0.23000092804431915,
-0.08086468279361725,
-0.09245802462100983,
-0.19072142243385315,
-0.2852122187614441,
-0.38217735290527344,
0.047434404492378235,
0.16021563112735748,
0.1208622008562088,
0.2363419383764267,
0.43259528279304504,
0.17599697411060333,
0.03496897593140602,
-0.002774864435195923,
-0.361096054315567,
-0.15834499895572662,
0.3478941321372986,
0.1118844747543335,
-0.09183463454246521,
0.24123674631118774,
0.4302351772785187,
0.2563732862472534,
-0.2707998752593994,
-0.2438819706439972,
0.20887118577957153,
-0.07748393714427948,
0.19959832727909088,
-0.16971150040626526,
-0.038478150963783264,
0.03257742151618004,
0.0321035273373127,
0.039128780364990234,
0.1034979596734047,
-0.07703837007284164,
-0.1986406147480011,
-0.10420392453670502,
0.12165112793445587,
0.12877291440963745,
-0.23630063235759735,
-0.11177666485309601,
-0.10118237882852554,
0.07654136419296265,
0.15679344534873962,
0.07159136235713959,
0.0031396038830280304,
-0.17350837588310242,
0.1497429758310318,
0.144446462392807,
0.2842687666416168,
0.012926153838634491,
0.11315614730119705,
-0.21495428681373596,
0.4630051255226135,
0.28061896562576294,
0.3607991933822632,
0.18980245292186737,
0.07855096459388733,
0.29588958621025085,
-0.15037775039672852,
-0.27419912815093994,
-0.11272028833627701,
0.015695109963417053,
-0.3167329430580139,
-0.05848345905542374,
-0.33182916045188904,
0.21497897803783417,
0.3215717077255249,
-0.07765728235244751,
-0.18744920194149017,
0.5202890038490295,
0.12152283638715744,
-0.43595126271247864,
0.09138047695159912,
0.1915856897830963,
0.14525020122528076,
-0.049245283007621765,
0.2615137994289398,
0.23119258880615234,
-0.002017185091972351,
0.2134944498538971,
0.2170177698135376,
0.26391470432281494,
0.2480231523513794,
-0.01807786338031292,
0.25371912121772766,
-0.10215102136135101,
0.12752538919448853,
0.21332351863384247,
0.19085390865802765,
0.37311476469039917,
0.021381724625825882,
-0.27276578545570374,
0.1267823874950409,
-0.25847816467285156,
0.07013582438230515,
0.01527368277311325,
-0.44558438658714294,
-0.06126239523291588,
0.3297213912010193,
0.27981531620025635,
-0.21265897154808044,
0.21821342408657074,
0.3516300618648529,
-0.06808619201183319,
-0.05100828781723976,
-0.17031008005142212,
0.3314248025417328,
-0.1020059660077095,
-0.015334345400333405,
-0.007572753354907036,
0.048461996018886566,
-0.1511903703212738,
0.23742076754570007,
-0.06311534345149994,
-0.0850854218006134,
0.18305611610412598,
0.21442101895809174,
-0.2929423451423645,
-0.162516251206398,
0.052589282393455505,
0.21453306078910828,
-0.08693835884332657,
-0.0650167241692543,
0.33255746960639954,
-0.13093900680541992,
-0.3034467101097107,
-0.22528821229934692,
0.4857270121574402,
0.5330045223236084,
0.3011166751384735,
-0.2612905204296112,
-0.22225895524024963,
-0.27249184250831604,
0.0934620201587677,
-0.1609717309474945,
0.09102384746074677,
0.40103814005851746,
0.4848853349685669,
0.22855396568775177,
0.0634375587105751,
-0.1281144618988037,
0.31092551350593567,
0.15886099636554718,
-0.04545256122946739,
-0.08728711307048798,
0.048924580216407776,
0.08793768286705017,
-0.08463385701179504,
-0.1388157159090042,
0.14353829622268677,
-0.2690294682979584,
0.4802120327949524,
0.18941497802734375,
0.28152740001678467,
-0.08881542086601257,
-0.11904244869947433,
0.03346353396773338,
0.12055075168609619,
0.5594958066940308,
0.4931650161743164,
0.5704361796379089,
-0.19833560287952423,
-0.2719707489013672,
-0.6176351308822632,
0.18322937190532684,
-0.535906970500946,
0.21797005832195282,
0.075301393866539,
-0.051566824316978455,
-0.22115308046340942,
0.3695657253265381,
-0.20848853886127472,
0.16538958251476288,
-0.1704203337430954,
-0.191879540681839,
-0.2623120844364166,
-0.038539987057447433,
0.06601905077695847,
-0.3587385416030884,
-0.0989607572555542,
-0.2771787643432617,
0.14496161043643951,
-0.7602842450141907,
-0.012444507330656052,
-0.3348177671432495,
-0.23291191458702087,
0.07995018362998962,
0.18442541360855103,
0.5588228702545166,
0.1272924691438675,
0.46839645504951477,
0.1397477686405182,
0.0165384691208601,
-0.2916196882724762,
-0.2619532346725464,
-0.31680548191070557,
0.23443272709846497,
0.09304296225309372,
0.22118358314037323,
-0.11723936349153519,
0.13495633006095886,
-0.24334634840488434,
0.4795072078704834,
-0.12968102097511292,
0.1860695779323578,
0.2657741606235504,
0.03357964754104614,
-0.14385545253753662,
-0.05059922859072685,
-0.2359078973531723,
0.0007027313113212585,
0.027832161635160446,
0.02936576120555401,
-0.5606935620307922,
-0.3480979800224304,
0.38553255796432495,
-0.47102051973342896,
0.02959560975432396,
-0.20689235627651215,
0.10317367315292358,
0.17910586297512054,
-0.31206902861595154,
-0.396477073431015,
0.12841936945915222,
0.2803562879562378,
0.10818992555141449,
-0.30015063285827637,
0.13388021290302277,
0.03650064766407013,
-0.06327924132347107,
-0.06915876269340515,
0.20663706958293915,
-0.028769593685865402,
-0.2944733798503876,
-0.11398077011108398,
-0.24679067730903625
] |
https://github.com/huggingface/datasets/issues/436 | Google Colab - load_dataset - PyArrow exception | > Indeed, we’ll make a new PyPi release next week to solve this. Cc @lhoestq
Yes definitely | With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue
ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`.
The error goes only when I install version 0.16.0
i.e. !pip install pyarrow==0.16.0 | 17 | Google Colab - load_dataset - PyArrow exception
With latest PyArrow 1.0.0 installed, I get the following exception . Restarting colab has the same issue
ImportWarning: To use `nlp`, the module `pyarrow>=0.16.0` is required, and the current version of `pyarrow` doesn't match this condition. If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`.
The error goes only when I install version 0.16.0
i.e. !pip install pyarrow==0.16.0
> Indeed, we’ll make a new PyPi release next week to solve this. Cc @lhoestq
Yes definitely | [
-0.3427734375,
0.2993343472480774,
0.027865812182426453,
0.0008247941732406616,
-0.05337371677160263,
-0.23227816820144653,
0.258243203163147,
0.1790953278541565,
-0.23289699852466583,
0.10980680584907532,
-0.003500525839626789,
0.6347985863685608,
-0.2590237259864807,
0.11069495230913162,
0.1111484244465828,
-0.09662547707557678,
0.12247747927904129,
0.384233295917511,
0.03207806497812271,
0.115027517080307,
-0.23211485147476196,
0.3013065457344055,
-0.40148431062698364,
0.27361422777175903,
-0.3001115024089813,
-0.017891133204102516,
-0.03362689167261124,
0.09696264564990997,
-0.2867269814014435,
-0.6638885140419006,
0.47995734214782715,
-0.04611359164118767,
0.2491188645362854,
0.21772994101047516,
-0.0001120963497669436,
0.001856982707977295,
0.44461750984191895,
0.058843664824962616,
-0.19805783033370972,
-0.40296459197998047,
0.03411893546581268,
-0.47382527589797974,
0.41453298926353455,
-0.09840146452188492,
0.009840190410614014,
-0.023377835750579834,
0.2621845304965973,
0.6624279618263245,
0.311310350894928,
0.20260900259017944,
0.21127814054489136,
0.23634344339370728,
0.32347655296325684,
0.0074104005470871925,
0.4227239787578583,
-0.15751336514949799,
-0.09639370441436768,
0.764811635017395,
0.14293606579303741,
-0.3419247269630432,
0.008976414799690247,
0.10319477319717407,
-0.2788572311401367,
0.028960011899471283,
0.021921943873167038,
0.0070115127600729465,
-0.14720407128334045,
-0.3071441352367401,
-0.0639110654592514,
0.2735511362552643,
0.24623078107833862,
-0.36980757117271423,
-0.17044533789157867,
-0.009875867515802383,
0.15774014592170715,
-0.5250215530395508,
0.1430397927761078,
0.24699220061302185,
-0.30281028151512146,
0.20587506890296936,
0.1286192536354065,
-0.11883307248353958,
-0.18605734407901764,
0.1715107560157776,
-0.11713628470897675,
0.7375590801239014,
0.13355465233325958,
0.11525526642799377,
0.2805883288383484,
-0.05674266070127487,
0.5407664775848389,
0.30886727571487427,
-0.07927006483078003,
0.12028626352548599,
-0.042725201696157455,
0.02116909623146057,
0.022545844316482544,
0.3409097194671631,
0.02490856871008873,
-0.24730800092220306,
0.02558620274066925,
0.02256651036441326,
0.12562163174152374,
0.4503287672996521,
0.05996120348572731,
-0.04849059507250786,
-0.04533509165048599,
-0.004634013399481773,
0.42679089307785034,
-0.006644315551966429,
0.1369570642709732,
0.08084052801132202,
-0.01227393839508295,
-0.28476065397262573,
-0.017037484794855118,
-0.06765412539243698,
0.27758681774139404,
-0.16117726266384125,
-0.39635005593299866,
-0.2821991741657257,
-0.43597525358200073,
0.02385823428630829,
0.037293389439582825,
0.1950218379497528,
-0.12001924961805344,
-0.10235247761011124,
0.012180924415588379,
0.15171965956687927,
-0.26963552832603455,
-0.08002311736345291,
-0.03343619033694267,
0.1952788084745407,
-0.2237410694360733,
0.06216531991958618,
0.23171426355838776,
-0.1511160433292389,
0.21367411315441132,
0.16380421817302704,
-0.10622633993625641,
0.23101159930229187,
-0.029430318623781204,
-0.13417035341262817,
-0.13864949345588684,
0.2887905240058899,
0.13310128450393677,
-0.08390982449054718,
-0.17246867716312408,
-0.3421242833137512,
-0.2602791488170624,
0.38349685072898865,
-0.28102970123291016,
-0.3486576974391937,
-0.30575329065322876,
0.17158065736293793,
-0.3623226284980774,
-0.22985005378723145,
-0.2415507435798645,
0.19250792264938354,
-0.10009058564901352,
-0.5023196339607239,
-0.10396791249513626,
-0.35214030742645264,
-0.07175745069980621,
-0.20183886587619781,
-0.029297590255737305,
0.20348437130451202,
-0.3529728055000305,
-0.03531379997730255,
-0.1182197779417038,
-0.15450464189052582,
0.28505828976631165,
0.20023401081562042,
-0.26651453971862793,
0.004217177629470825,
-0.11327727138996124,
0.2782345414161682,
0.2827666103839874,
-0.07820196449756622,
-0.35042113065719604,
-0.024628950282931328,
-0.08844330906867981,
-0.11906786262989044,
-0.05654657632112503,
-0.011274383403360844,
-0.07932700961828232,
-0.07983895391225815,
0.1883733570575714,
0.22899454832077026,
-0.020691262558102608,
0.08995470404624939,
-0.3444249629974365,
-0.33589550852775574,
0.2805466949939728,
0.19202980399131775,
0.07223762571811676,
-0.17895406484603882,
0.06994964182376862,
-0.045971259474754333,
0.1574607789516449,
-0.16992270946502686,
-0.18141581118106842,
0.008677259087562561,
0.4186851978302002,
-0.172712504863739,
-0.12129517644643784,
0.014961041510105133,
-0.3636230528354645,
0.06538881361484528,
-0.2499879151582718,
0.3446653485298157,
-0.1689767688512802,
-0.13835425674915314,
-0.09686202555894852,
0.15402264893054962,
-0.003270033746957779,
0.04484418034553528,
0.1141757071018219,
-0.06921927630901337,
0.09301616251468658,
0.2307722419500351,
0.01398530974984169,
0.07003136724233627,
0.09744742512702942,
0.09029478579759598,
0.075529545545578,
0.3200627267360687,
-0.3432150185108185,
-0.501392126083374,
0.1558917909860611,
0.19195041060447693,
0.0954933911561966,
-0.015271415933966637,
0.05957615748047829,
0.07016061991453171,
-0.04149194434285164,
0.10121388733386993,
-0.3247617781162262,
-0.18533967435359955,
0.2462163269519806,
-0.4993383288383484,
0.0803941935300827,
0.01316834893077612,
-0.07524041086435318,
0.1265430450439453,
0.4028692841529846,
0.3070371150970459,
0.18033169209957123,
-0.05663234740495682,
-0.0034646056592464447,
0.060174569487571716,
0.1596660166978836,
-0.02796710468828678,
0.07234685868024826,
0.03419210761785507,
0.10381726920604706,
0.3129440248012543,
0.11962904036045074,
-0.022380461916327477,
-0.35518985986709595,
0.18381094932556152,
0.4711064100265503,
0.062361013144254684,
0.25832730531692505,
0.20704516768455505,
-0.09680458158254623,
-0.19115358591079712,
0.296322762966156,
-0.22389207780361176,
0.2534523904323578,
0.2617912292480469,
-0.07686078548431396,
0.25034859776496887,
-0.31054747104644775,
-0.30914559960365295,
0.09439177066087723,
0.042127300053834915,
0.1733681559562683,
0.024851560592651367,
0.31599757075309753,
0.011051705107092857,
-0.382355660200119,
-0.05414865165948868,
0.002007601782679558,
0.2897808849811554,
-0.16076891124248505,
0.22921983897686005,
-0.381217896938324,
-0.5844120979309082,
-0.20330621302127838,
-0.37617912888526917,
-0.3669315278530121,
-0.07431667298078537,
0.08380255103111267,
0.3103746175765991,
0.054387371987104416,
0.2557634115219116,
0.40263524651527405,
0.0697183758020401,
-0.23279516398906708,
-0.24343319237232208,
-0.209312304854393,
-0.4130919277667999,
-0.5413904786109924,
0.06757497787475586,
0.2533716857433319,
0.1499052345752716,
0.2001350224018097,
-0.1714407056570053,
0.01695103570818901,
0.1043810099363327,
-0.5898129343986511,
0.10029706358909607,
-0.22473420202732086,
0.33800727128982544,
0.10600656270980835,
-0.0794157087802887,
-0.3944552540779114,
-0.38282671570777893,
0.10792628675699234,
-0.25677207112312317,
-0.1813480705022812,
0.008592469617724419,
-0.33337488770484924,
0.09287494421005249,
-0.21608446538448334,
-0.10321114212274551,
-0.65348881483078,
-0.26566725969314575,
0.15105345845222473,
0.11695821583271027,
0.12992563843727112,
0.3539074659347534,
0.22919557988643646,
0.18245777487754822,
0.04907446354627609,
-0.17515486478805542,
-0.011447380296885967,
0.02906070277094841,
0.20002739131450653,
-0.20421838760375977,
-0.29456597566604614,
0.14725817739963531,
-0.1673741340637207,
0.09318114817142487,
-0.042961329221725464,
-0.4215468168258667,
-0.4417281150817871,
0.08557876944541931,
0.384021520614624,
0.15430456399917603,
-0.00674436055123806,
0.3419802784919739,
0.09561369568109512,
-0.03419933468103409,
0.08397079259157181,
-0.31510183215141296,
-0.09667312353849411,
0.11710385233163834,
0.14175203442573547,
0.04345846176147461,
0.15181833505630493,
-0.1093011200428009,
0.6300578117370605,
-0.21394582092761993,
-0.10772034525871277,
0.45095282793045044,
-0.10720428079366684,
0.34381112456321716,
-0.09441407769918442,
-0.07529245316982269,
0.04800717905163765,
0.044023774564266205,
-0.09638503938913345,
0.1973455548286438,
-0.20021429657936096,
-0.5494315028190613,
-0.19688056409358978,
-0.226126030087471,
-0.1790669560432434,
-0.27190956473350525,
0.09059131145477295,
0.44566676020622253,
0.15527313947677612,
0.11976736783981323,
-0.11329906433820724,
-0.01423516683280468,
-0.33946725726127625,
-0.13437120616436005,
0.03645592927932739,
-0.1016610637307167,
0.03466883301734924,
0.28144678473472595,
-0.5303840041160583,
-0.5247491598129272,
0.25029051303863525,
0.38065841794013977,
0.021502498537302017,
0.008143287152051926,
-0.062610924243927,
0.08721049875020981,
-0.10629106312990189,
0.0684470385313034,
0.09222032129764557,
-0.09713590145111084,
0.24456912279129028,
0.22227147221565247,
-0.2340095490217209,
-0.19204728305339813,
-0.19349274039268494,
0.1639661192893982,
0.3089674413204193,
0.004728823900222778,
-0.32162973284721375,
0.08471442759037018,
0.5238486528396606,
0.3645201623439789,
0.054626766592264175,
0.05351762846112251,
-0.3809593617916107,
-0.5595188736915588,
-0.06022176891565323,
0.07335467636585236,
-0.03927529603242874,
0.2775350511074066,
-0.15299968421459198,
0.15383298695087433,
0.10331341624259949,
-0.1528434455394745,
-0.1043693870306015,
0.494718074798584,
0.09368398785591125,
-0.012977590784430504,
-0.00045468658208847046,
-0.1389584243297577,
-0.28879597783088684,
0.3949984312057495,
0.45439791679382324,
0.14649763703346252,
-0.04401761293411255,
-0.046886198222637177,
0.21948383748531342,
0.2195374071598053,
0.06620707362890244,
-0.07098165154457092,
0.11148928850889206,
-0.21762026846408844,
-0.15982714295387268,
0.15624217689037323,
0.05620231851935387,
0.08165650814771652,
-0.03208038583397865,
-0.2292519509792328,
0.05580311268568039,
0.6698866486549377,
0.1846269816160202,
-0.06931330263614655,
-0.027919113636016846,
-0.043028026819229126,
-0.22649464011192322,
0.3169516921043396,
0.10455016791820526,
0.822883665561676,
-0.04894197732210159,
0.14417587220668793,
0.7622255682945251,
-0.029668400064110756,
0.6805464625358582,
0.14977864921092987,
0.3072381019592285,
-0.3835252821445465,
0.058802034705877304,
0.07282551378011703,
-0.06099028140306473,
0.07314705103635788,
-0.14550034701824188,
-0.3930552899837494,
0.2606295943260193,
0.2867892384529114,
-0.026476312428712845,
0.28778576850891113,
0.14199934899806976,
-0.02694396860897541,
-0.053150076419115067,
-0.34529125690460205,
0.10842446982860565,
-0.17772215604782104,
0.20797117054462433,
-0.3530265986919403,
-0.1281892955303192,
0.08710925281047821,
-0.3031854033470154,
-0.3591160774230957,
0.2581678628921509,
-0.2969036102294922,
0.046879105269908905,
0.17427252233028412,
-0.4596206545829773,
0.016595028340816498,
-0.07845160365104675,
-0.062059417366981506,
-0.03717115893959999,
-0.15623414516448975,
0.16657224297523499,
0.00041066110134124756,
-0.3037155866622925,
-0.053753990679979324,
0.22566674649715424,
0.21890448033809662,
-0.20008715987205505,
-0.18932658433914185,
0.187737375497818,
-0.0495271198451519,
-0.18750843405723572,
0.10612615942955017,
0.20454871654510498,
-0.11429838836193085,
0.1869373321533203,
0.07943423092365265,
0.07302655279636383,
0.19065654277801514,
-0.13561448454856873,
0.14219596982002258,
0.020758166909217834,
0.07782367616891861,
0.1563090980052948,
-0.05357440933585167,
-0.1859852373600006,
-0.16438311338424683,
0.22527581453323364,
0.09670332819223404,
0.1861310601234436,
0.4558212459087372,
0.1741257607936859,
-0.08323881030082703,
-0.14709335565567017,
-0.14633236825466156,
-0.3217689096927643,
-0.3653510808944702,
0.07739610224962234,
0.2588822841644287,
0.12888626754283905,
0.21838070452213287,
0.391403466463089,
0.11392880976200104,
0.023352760821580887,
-0.04486125335097313,
-0.3423526883125305,
-0.21973799169063568,
0.3276680111885071,
0.05746007710695267,
-0.06915272772312164,
0.29717180132865906,
0.4240745007991791,
0.19786213338375092,
-0.263489305973053,
-0.2902499735355377,
0.1804886758327484,
-0.16758166253566742,
0.16671140491962433,
-0.1106206476688385,
-0.11346287280321121,
0.05691938102245331,
0.0713069885969162,
0.08571501076221466,
0.10603992640972137,
-0.0339437760412693,
-0.23480170965194702,
-0.08593924343585968,
0.0918138399720192,
0.16146597266197205,
-0.20996993780136108,
-0.11057845503091812,
-0.11622172594070435,
0.05522654578089714,
0.1327284872531891,
0.0840241014957428,
-0.029076451435685158,
-0.23904074728488922,
0.1647334098815918,
0.13772857189178467,
0.22502261400222778,
-0.0005176104605197906,
0.151425302028656,
-0.1787548065185547,
0.42220789194107056,
0.2305242121219635,
0.33706584572792053,
0.1093788594007492,
0.09825967252254486,
0.3143337070941925,
-0.12148917466402054,
-0.15712858736515045,
-0.13496747612953186,
0.040111396461725235,
-0.34938734769821167,
-0.02804400585591793,
-0.3854212462902069,
0.15306930243968964,
0.3556881844997406,
-0.08811099827289581,
-0.18752233684062958,
0.5486345291137695,
0.1611548811197281,
-0.46608200669288635,
0.052332449704408646,
0.0850413590669632,
0.054477982223033905,
-0.046883925795555115,
0.2423156201839447,
0.24718791246414185,
-0.038410723209381104,
0.2116469293832779,
0.1933158040046692,
0.2679804563522339,
0.2615724503993988,
0.004083929117769003,
0.2276211977005005,
-0.1358463317155838,
0.12435953319072723,
0.25751012563705444,
0.18379856646060944,
0.37273797392845154,
0.037141770124435425,
-0.3018244504928589,
0.21146437525749207,
-0.2427958846092224,
0.07616032660007477,
0.047560226172208786,
-0.429370254278183,
-0.12986567616462708,
0.21083608269691467,
0.28409910202026367,
-0.1893676221370697,
0.17552626132965088,
0.43410784006118774,
-0.1155916228890419,
0.00320416153408587,
-0.1722661405801773,
0.41614338755607605,
-0.14371994137763977,
-0.026285387575626373,
0.057835400104522705,
0.0214269757270813,
-0.06301551312208176,
0.22762525081634521,
-0.13681112229824066,
-0.11640468239784241,
0.22308115661144257,
0.19550615549087524,
-0.19404588639736176,
-0.14349082112312317,
0.06301918625831604,
0.23894065618515015,
-0.11769633740186691,
-0.017623011022806168,
0.28485438227653503,
-0.07447175681591034,
-0.33057722449302673,
-0.251853883266449,
0.5178365707397461,
0.5570282340049744,
0.2944161295890808,
-0.3138180673122406,
-0.22810931503772736,
-0.2676806151866913,
0.09818997979164124,
-0.13675568997859955,
0.07342275977134705,
0.4513365626335144,
0.43817391991615295,
0.18123658001422882,
0.10114280879497528,
-0.17972570657730103,
0.2612929046154022,
0.20132416486740112,
-0.036818020045757294,
-0.030333248898386955,
0.04527106508612633,
0.08535818755626678,
-0.10820774734020233,
-0.16083410382270813,
0.009868822991847992,
-0.268359899520874,
0.41868916153907776,
0.21068784594535828,
0.2166280597448349,
-0.10777081549167633,
-0.14460138976573944,
0.07572855800390244,
0.11246702075004578,
0.6587209701538086,
0.41523507237434387,
0.5267053842544556,
-0.23320315778255463,
-0.23290936648845673,
-0.5888147354125977,
0.20681142807006836,
-0.4867609739303589,
0.0917186290025711,
0.0359308198094368,
-0.04904086887836456,
-0.18554571270942688,
0.3980056643486023,
-0.21604351699352264,
0.32552239298820496,
-0.123970627784729,
-0.2867918908596039,
-0.3391118347644806,
-0.027101997286081314,
0.01891053467988968,
-0.3432716131210327,
-0.09600972384214401,
-0.24294152855873108,
0.14606153964996338,
-0.6712964773178101,
0.05364218354225159,
-0.31015342473983765,
-0.19830353558063507,
0.04958581551909447,
0.1595621109008789,
0.5663315057754517,
0.1240326464176178,
0.508373498916626,
0.11582117527723312,
0.010374756529927254,
-0.12726843357086182,
-0.3805970847606659,
-0.24222895503044128,
0.2114138901233673,
0.13761013746261597,
0.12878192961215973,
-0.07625529170036316,
0.07946507632732391,
-0.2455943524837494,
0.43172863125801086,
-0.14618133008480072,
0.13927145302295685,
0.21354641020298004,
0.10064812749624252,
-0.08607686311006546,
-0.09817847609519958,
-0.20941534638404846,
0.04869068041443825,
-0.0006399378180503845,
-0.025748608633875847,
-0.5031928420066833,
-0.3479788899421692,
0.35780906677246094,
-0.495404452085495,
0.01601160317659378,
-0.17221824824810028,
0.07517282664775848,
0.07588452845811844,
-0.2522549629211426,
-0.3977368175983429,
0.16558322310447693,
0.26350340247154236,
0.07352475821971893,
-0.291482537984848,
0.13515716791152954,
0.007212221622467041,
-0.08722342550754547,
-0.11385765671730042,
0.22763024270534515,
0.02529451623558998,
-0.28549832105636597,
-0.11057740449905396,
-0.1900273561477661
] |
https://github.com/huggingface/datasets/issues/435 | ImportWarning for pyarrow 1.0.0 | This was fixed in #434
We'll do a release later this week to include this fix.
Thanks for reporting | The following PR raised ImportWarning at `pyarrow ==1.0.0` https://github.com/huggingface/nlp/pull/265/files | 19 | ImportWarning for pyarrow 1.0.0
The following PR raised ImportWarning at `pyarrow ==1.0.0` https://github.com/huggingface/nlp/pull/265/files
This was fixed in #434
We'll do a release later this week to include this fix.
Thanks for reporting | [
-0.08307519555091858,
-0.1102311760187149,
-0.08677297830581665,
-0.13964059948921204,
0.24311907589435577,
-0.26746678352355957,
0.33662185072898865,
0.32819852232933044,
-0.10447433590888977,
0.16092321276664734,
-0.045990996062755585,
0.21845565736293793,
-0.11118248850107193,
0.06283426284790039,
0.027580691501498222,
-0.2568034827709198,
0.09777090698480606,
0.23599135875701904,
0.005640923976898193,
-0.016945887356996536,
0.00046323612332344055,
0.2912733852863312,
-0.19472754001617432,
0.3622000813484192,
-0.23955269157886505,
0.027007395401597023,
0.08857128769159317,
0.1242649182677269,
-0.2790333032608032,
-0.5286538004875183,
0.1933574229478836,
-0.163190096616745,
-0.07320521771907806,
-0.004033811390399933,
-0.0001010638807201758,
0.14389845728874207,
0.41793811321258545,
0.17098337411880493,
0.16104711592197418,
-0.01886369287967682,
0.47651419043540955,
-0.3481641709804535,
0.31622034311294556,
0.001141659915447235,
-0.21272704005241394,
-0.387477844953537,
0.20128242671489716,
0.6739885807037354,
0.2996218204498291,
0.05319411680102348,
0.35209357738494873,
0.5651538372039795,
0.30679476261138916,
0.21260607242584229,
0.39884287118911743,
-0.17212392389774323,
-0.05756823718547821,
0.23346203565597534,
0.09912726283073425,
-0.44532933831214905,
-0.22113260626792908,
0.1063566505908966,
-0.024403415620326996,
-0.098208487033844,
0.01480012759566307,
-0.04806273803114891,
0.04874653369188309,
-0.10124123096466064,
-0.2533304989337921,
0.03156152367591858,
-0.12687137722969055,
-0.2548312842845917,
-0.11187445372343063,
-0.07827551662921906,
0.06063085049390793,
-0.4917192757129669,
0.2599356174468994,
0.23892897367477417,
-0.06394706666469574,
0.2154645472764969,
0.0959484875202179,
0.032645083963871,
-0.17156089842319489,
0.13902133703231812,
0.08033929765224457,
0.5061995387077332,
0.03200017288327217,
-0.036581218242645264,
0.1415235698223114,
-0.1213112622499466,
-0.010536341927945614,
0.1806747168302536,
-0.06567975878715515,
-0.015071206726133823,
-0.05556647107005119,
-0.05177120864391327,
0.24172735214233398,
0.25980710983276367,
0.12693744897842407,
-0.15987186133861542,
-0.05395180732011795,
0.16683954000473022,
0.13089999556541443,
0.22792845964431763,
0.06294488161802292,
0.028273239731788635,
0.10082283616065979,
-0.3034650683403015,
0.3983902931213379,
0.07914765179157257,
0.1498909592628479,
0.09879295527935028,
0.1599196046590805,
-0.3288707137107849,
0.057297561317682266,
-0.0595712810754776,
0.23229821026325226,
-0.15893623232841492,
-0.18308371305465698,
-0.14845815300941467,
-0.24891963601112366,
0.00967695564031601,
-0.09966420382261276,
0.2695373594760895,
-0.09730888158082962,
-0.01960788667201996,
0.0986451804637909,
0.26224014163017273,
-0.3504639267921448,
-0.2332783043384552,
-0.2548336088657379,
0.06580405682325363,
-0.32515180110931396,
-0.0997655838727951,
0.18243443965911865,
-0.06334498524665833,
0.3893645405769348,
0.29990801215171814,
-0.019789278507232666,
0.13125234842300415,
-0.029319483786821365,
0.22581155598163605,
-0.006485641002655029,
0.22674189507961273,
0.004919093102216721,
-0.027985483407974243,
-0.04678782448172569,
-0.11390845477581024,
-0.066010020673275,
0.0741584375500679,
0.05686039477586746,
-0.13014569878578186,
-0.38392701745033264,
0.31162258982658386,
-0.20908218622207642,
-0.10451927781105042,
0.028263941407203674,
0.05130576714873314,
0.12867377698421478,
-0.05487006530165672,
-0.011708244681358337,
-0.14568080008029938,
0.0393042154610157,
-0.1020548865199089,
-0.06989499926567078,
0.07305051386356354,
-0.1338871270418167,
-0.19446516036987305,
0.20429162681102753,
-0.4161699712276459,
0.27499181032180786,
0.36929547786712646,
-0.29702508449554443,
-0.07890888303518295,
-0.20096834003925323,
0.3247883915901184,
-0.02356424182653427,
-0.09669509530067444,
-0.18882040679454803,
0.023576566949486732,
-0.2668337821960449,
-0.03482695668935776,
0.07549411803483963,
-0.12176629900932312,
-0.20406922698020935,
0.07215043157339096,
0.07073312997817993,
0.39193087816238403,
0.12857338786125183,
0.2569904923439026,
-0.48706865310668945,
-0.2503657341003418,
0.1534608006477356,
0.003328414633870125,
-0.07070718705654144,
-0.2464265525341034,
-0.040412403643131256,
-0.19093061983585358,
0.31949499249458313,
-0.1372528076171875,
-0.03492378443479538,
0.04685398191213608,
0.06721311807632446,
0.06902623176574707,
-0.09616964310407639,
0.03665421903133392,
-0.1779855489730835,
0.02149328589439392,
-0.3616141676902771,
0.39305949211120605,
-0.1452842652797699,
-0.32269287109375,
-0.07861018180847168,
0.03590907156467438,
-0.1544841080904007,
-0.15567214787006378,
0.3084644675254822,
-0.05896095931529999,
-0.021510567516088486,
0.23131059110164642,
0.06030039116740227,
-0.1698935329914093,
-0.005837911739945412,
0.12544865906238556,
0.051852721720933914,
0.14113937318325043,
-0.38148894906044006,
-0.39119961857795715,
0.1973906010389328,
-0.011261142790317535,
0.1413128674030304,
0.0031071295961737633,
0.11313005536794662,
0.0895698219537735,
-0.19983087480068207,
0.3266764283180237,
-0.31807175278663635,
-0.05018848180770874,
0.1342686414718628,
-0.3729342520236969,
0.02342919632792473,
0.06518932431936264,
-0.17656265199184418,
-0.014842595905065536,
0.2517153024673462,
0.47276008129119873,
0.28111428022384644,
-0.14025908708572388,
-0.003696311265230179,
-0.13842056691646576,
0.14024394750595093,
-0.12338835000991821,
0.09424804896116257,
-0.01796913519501686,
0.0567534938454628,
0.16915090382099152,
0.061151620000600815,
-0.11070486903190613,
-0.3336113393306732,
0.03286818414926529,
0.37617790699005127,
0.03799819573760033,
0.19583430886268616,
0.006967123597860336,
-0.028111010789871216,
-0.13881708681583405,
0.2378655970096588,
-0.4669162631034851,
-0.01575973629951477,
0.27539053559303284,
0.020004302263259888,
0.20596010982990265,
-0.2243601530790329,
-0.41250336170196533,
0.04819042980670929,
0.06073257327079773,
-0.0026752203702926636,
0.14013786613941193,
0.4111928343772888,
-0.22799116373062134,
-0.7777086496353149,
0.23537033796310425,
-0.08129414170980453,
0.00952167995274067,
-0.29078030586242676,
0.06646585464477539,
-0.2939155399799347,
-0.3391765058040619,
-0.07557477056980133,
-0.20500661432743073,
-0.3589586317539215,
-0.09814468026161194,
0.3100818395614624,
0.17550179362297058,
-0.26317769289016724,
0.31516483426094055,
0.34759876132011414,
-0.0642475038766861,
-0.07567933201789856,
-0.12024006992578506,
-0.11547920107841492,
-0.2051042765378952,
-0.26631349325180054,
0.19594599306583405,
0.06247054040431976,
0.04582652449607849,
0.16997569799423218,
-0.11398415267467499,
-0.0664583295583725,
0.012990221381187439,
-0.5971789956092834,
0.06560218334197998,
-0.2121938318014145,
0.12071509659290314,
0.19330711662769318,
0.11670202761888504,
-0.015574682503938675,
-0.241604745388031,
0.2296319305896759,
-0.3196699917316437,
-0.43706902861595154,
-0.0598573163151741,
-0.15931476652622223,
0.10282629728317261,
-0.37262314558029175,
-0.15481364727020264,
-0.19046786427497864,
-0.3148062527179718,
0.18479707837104797,
0.05594135448336601,
0.016165349632501602,
0.31048518419265747,
0.1640838086605072,
0.09337350726127625,
-0.317596971988678,
0.046976737678050995,
-0.024412723258137703,
-0.15497800707817078,
0.1693422794342041,
-0.22494067251682281,
-0.4008026123046875,
0.033406730741262436,
0.010663673281669617,
0.09757229685783386,
-0.31472593545913696,
-0.4104323983192444,
-0.31813737750053406,
-0.040393322706222534,
0.5853021144866943,
0.3685544431209564,
-0.07700591534376144,
0.28994807600975037,
0.13161048293113708,
-0.2970893383026123,
-0.05238299071788788,
-0.30681100487709045,
0.03303561359643936,
-0.18842115998268127,
0.023134104907512665,
-0.1692149043083191,
0.08825971186161041,
-0.07096291333436966,
0.6686913371086121,
-0.3755655586719513,
-0.12220063805580139,
0.5347420573234558,
-0.049261532723903656,
0.3575080335140228,
0.016933873295783997,
-0.016253918409347534,
0.06151274964213371,
0.06712193042039871,
0.2661384344100952,
0.18947243690490723,
-0.10995165258646011,
-0.4191836416721344,
-0.045481570065021515,
-0.41664737462997437,
-0.036157798022031784,
-0.22573886811733246,
-0.005375871434807777,
0.5628578662872314,
-0.01406867802143097,
0.1647195667028427,
0.01206798106431961,
0.01739707961678505,
-0.2695159912109375,
0.25943127274513245,
0.0008522793650627136,
-0.16607660055160522,
-0.06064906343817711,
-0.12890860438346863,
-0.06384345144033432,
-0.3101237118244171,
0.05701468139886856,
0.2350648045539856,
-0.05708941072225571,
-0.02457175776362419,
-0.25837984681129456,
0.13420546054840088,
-0.105680912733078,
0.4005036950111389,
0.2934621572494507,
0.1665644645690918,
0.21353980898857117,
0.07015249878168106,
-0.2036428302526474,
-0.17049093544483185,
-0.1556849479675293,
-0.021195590496063232,
0.3835706114768982,
0.05286071449518204,
-0.4389580488204956,
-0.17544247210025787,
0.3004760444164276,
0.2820102274417877,
0.002745799720287323,
-0.015314703807234764,
-0.5284618735313416,
-0.2185238003730774,
-0.1631639152765274,
0.12464319169521332,
0.09851894527673721,
0.2308526486158371,
-0.18326757848262787,
0.06241971626877785,
0.03809469938278198,
-0.11953484266996384,
-0.18242444097995758,
0.3710530996322632,
0.030995672568678856,
-0.1367567479610443,
-0.007447751238942146,
-0.08815410733222961,
-0.035766370594501495,
-0.05791836977005005,
0.3514467477798462,
0.04640722647309303,
-0.26051661372184753,
-0.12233153730630875,
0.22316589951515198,
0.052323322743177414,
0.1710095852613449,
0.005761767737567425,
0.1916312873363495,
-0.12438076734542847,
0.028149817138910294,
0.11987622827291489,
0.13905388116836548,
0.3497534692287445,
-0.035048384219408035,
0.20926500856876373,
0.24151664972305298,
0.32532334327697754,
-0.057826679199934006,
0.06410081684589386,
-0.033983372151851654,
0.2301054298877716,
-0.14371821284294128,
0.22098533809185028,
0.045165158808231354,
0.8207985162734985,
0.03303521126508713,
0.27022528648376465,
0.6261535882949829,
-0.2362234890460968,
0.32509005069732666,
0.1172437071800232,
0.20002806186676025,
-0.3581174314022064,
0.0033052321523427963,
0.2600870132446289,
-0.02286207303404808,
0.08475170284509659,
-0.11780919134616852,
0.01818259432911873,
0.028780752792954445,
0.11126559972763062,
-0.009279388934373856,
0.024855468422174454,
0.17817822098731995,
0.12078705430030823,
-0.012758050113916397,
-0.3865140974521637,
0.1847657561302185,
-0.009846076369285583,
0.2434544414281845,
-0.17259344458580017,
-0.3018134832382202,
0.28097355365753174,
-0.3456577658653259,
0.004491269588470459,
0.3744015097618103,
0.01781895011663437,
0.10272795706987381,
0.26069560647010803,
-0.20440419018268585,
-0.11828486621379852,
0.08586210012435913,
-0.016633450984954834,
-0.09522892534732819,
-0.11010473966598511,
0.30508777499198914,
0.07270000129938126,
-0.25838735699653625,
-0.1442805975675583,
0.31660550832748413,
0.05602742359042168,
-0.24286195635795593,
-0.35499659180641174,
0.20141321420669556,
0.04693589732050896,
-0.02374676801264286,
-0.1675528883934021,
0.031504109501838684,
-0.015252672135829926,
-0.04136690869927406,
0.14999783039093018,
-0.04676195979118347,
0.10183873772621155,
-0.20626786351203918,
0.2574654817581177,
0.05576775223016739,
-0.021987194195389748,
-0.03162020444869995,
0.21303705871105194,
-0.1793031245470047,
-0.2644486427307129,
0.42023319005966187,
-0.10429465025663376,
0.06948140263557434,
0.33855271339416504,
0.3837931156158447,
-0.3116825222969055,
-0.21220272779464722,
-0.22779616713523865,
0.061923082917928696,
-0.5709694027900696,
-0.007538848556578159,
0.29051098227500916,
-0.11692498624324799,
0.0515383817255497,
0.3112245202064514,
-0.018989816308021545,
-0.0013938695192337036,
0.05556580796837807,
-0.030472658574581146,
-0.1131908968091011,
0.10015495121479034,
-0.05738123133778572,
-0.01659499481320381,
0.43993815779685974,
0.43645626306533813,
0.14728358387947083,
-0.10395780205726624,
-0.41132962703704834,
0.06733252853155136,
-0.11254998296499252,
0.13810113072395325,
-0.29099324345588684,
-0.2318253219127655,
0.23600177466869354,
0.12901057302951813,
0.27401694655418396,
0.08681832253932953,
-0.11107669025659561,
-0.3384963274002075,
-0.1322937160730362,
0.0018455833196640015,
-0.004881404340267181,
-0.07170948386192322,
0.1792275309562683,
0.22558952867984772,
0.08202742785215378,
0.12440239638090134,
0.3096894323825836,
-0.029508624225854874,
-0.15038886666297913,
0.2898203134536743,
0.14251850545406342,
0.03530946001410484,
0.1465831845998764,
-0.20731717348098755,
-0.1482463777065277,
0.27730792760849,
0.11305428296327591,
-0.02862372249364853,
-0.14407236874103546,
0.026836998760700226,
0.2978827953338623,
-0.062142156064510345,
-0.11099690198898315,
0.17891207337379456,
0.13441689312458038,
-0.22989846765995026,
-0.3243170976638794,
-0.22572040557861328,
0.2501019835472107,
0.14451277256011963,
-0.22579653561115265,
-0.1727881282567978,
0.3819531500339508,
0.34309592843055725,
-0.4943428635597229,
-0.0907825231552124,
-0.03165288269519806,
0.13632407784461975,
0.0802178829908371,
0.03501717746257782,
-0.01992747187614441,
-0.09529802948236465,
0.19674530625343323,
0.3701379597187042,
0.15144485235214233,
0.02235317789018154,
-0.2284717708826065,
0.07450003921985626,
-0.2980051636695862,
-0.12117144465446472,
0.45496755838394165,
0.14979876577854156,
0.24901023507118225,
0.02470831200480461,
-0.12158220261335373,
0.059812337160110474,
-0.2983398139476776,
0.17507025599479675,
-0.16130656003952026,
-0.13639216125011444,
-0.11715707182884216,
0.3793148994445801,
0.2954334616661072,
-0.17823657393455505,
0.18234016001224518,
0.400316447019577,
0.27450278401374817,
-0.13605357706546783,
-0.05157769098877907,
0.605924129486084,
-0.18466192483901978,
-0.04627475515007973,
-0.0622539259493351,
0.1243797317147255,
0.03859131038188934,
0.2332671582698822,
-0.03192312642931938,
0.04914706200361252,
0.2032892405986786,
0.06853020191192627,
-0.18216486275196075,
-0.3582149147987366,
0.010353943333029747,
0.08032320439815521,
0.21480533480644226,
-0.022548222914338112,
0.29840323328971863,
0.214208722114563,
-0.19256356358528137,
-0.19641035795211792,
0.2984685003757477,
0.43374204635620117,
0.1835552603006363,
-0.05435951426625252,
-0.16055689752101898,
-0.20270591974258423,
0.03285658359527588,
-0.2084280252456665,
0.17026227712631226,
0.22158582508563995,
0.5038291811943054,
0.15465877950191498,
0.19079641997814178,
-0.3705567717552185,
0.033240046352148056,
0.16915395855903625,
-0.024702362716197968,
0.062914177775383,
0.06388374418020248,
-0.029771149158477783,
-0.26536667346954346,
-0.3680843114852905,
-0.15423071384429932,
-0.38258838653564453,
0.2647891342639923,
0.09803879261016846,
0.2649373412132263,
-0.01504108589142561,
-0.4861191511154175,
0.14171941578388214,
0.18460121750831604,
0.6637266278266907,
0.2069653868675232,
0.26846104860305786,
-0.10883856564760208,
-0.09988802671432495,
-0.43463265895843506,
0.31149208545684814,
-0.3065361976623535,
0.04217950999736786,
-0.052269719541072845,
0.021456075832247734,
-0.10136371105909348,
0.22825844585895538,
0.004561766982078552,
0.07578162848949432,
-0.09980528801679611,
-0.23230761289596558,
-0.31317752599716187,
0.3172436058521271,
0.08761856704950333,
-0.2602437734603882,
0.10488623380661011,
-0.14565971493721008,
0.2333255559206009,
-0.4985121786594391,
0.25983938574790955,
-0.24327807128429413,
-0.009072043001651764,
-0.1888142228126526,
0.31205055117607117,
0.2228732854127884,
0.12769684195518494,
0.15133161842823029,
-0.013323185965418816,
-0.06283248215913773,
-0.14174813032150269,
-0.3774043619632721,
-0.2469451129436493,
0.14448051154613495,
-0.008526653051376343,
0.16544654965400696,
0.06907698512077332,
-0.1187744140625,
-0.20459872484207153,
0.4295695424079895,
-0.004078362137079239,
0.07801531255245209,
0.1664196252822876,
0.2578723430633545,
0.11757782846689224,
-0.07065612077713013,
-0.22398728132247925,
0.051849085837602615,
0.020097721368074417,
-0.20555126667022705,
-0.4341716170310974,
-0.5926019549369812,
0.34764108061790466,
-0.45503872632980347,
0.05701896920800209,
0.06460604071617126,
0.14823991060256958,
0.12305658310651779,
-0.3943469226360321,
-0.47165805101394653,
0.30425429344177246,
0.10116835683584213,
0.19490933418273926,
-0.28988951444625854,
0.18866731226444244,
0.0005846265703439713,
-0.08152290433645248,
-0.05912565812468529,
0.11336702853441238,
0.2314947545528412,
-0.22648000717163086,
0.08931595087051392,
-0.17145037651062012
] |
https://github.com/huggingface/datasets/issues/435 | ImportWarning for pyarrow 1.0.0 | I dont know if the fix was made but the problem is still present :
Instaled with pip : NLP 0.3.0 // pyarrow 1.0.0
OS : archlinux with kernel zen 5.8.5 | The following PR raised ImportWarning at `pyarrow ==1.0.0` https://github.com/huggingface/nlp/pull/265/files | 31 | ImportWarning for pyarrow 1.0.0
The following PR raised ImportWarning at `pyarrow ==1.0.0` https://github.com/huggingface/nlp/pull/265/files
I dont know if the fix was made but the problem is still present :
Instaled with pip : NLP 0.3.0 // pyarrow 1.0.0
OS : archlinux with kernel zen 5.8.5 | [
-0.14631260931491852,
-0.08252319693565369,
-0.04976512864232063,
-0.08211497962474823,
0.1566721349954605,
-0.21917757391929626,
0.11781065165996552,
0.41890648007392883,
-0.2502534091472626,
0.12906700372695923,
0.07649283856153488,
0.28078559041023254,
-0.20306479930877686,
-0.1170990914106369,
0.0609501376748085,
-0.1767265647649765,
0.12942123413085938,
0.2613934278488159,
-0.04325767606496811,
-0.011817853897809982,
-0.11813171207904816,
0.37940725684165955,
-0.35793977975845337,
0.4410783052444458,
-0.17414575815200806,
0.00802595168352127,
0.18473108112812042,
0.10682244598865509,
-0.2745455205440521,
-0.7176747918128967,
0.37033507227897644,
-0.255653977394104,
0.1187354028224945,
-0.1453176736831665,
-0.00011222978355363011,
0.10987012088298798,
0.48448318243026733,
0.12642772495746613,
0.2048349827528,
-0.28691744804382324,
0.39342403411865234,
-0.7273052930831909,
0.321892648935318,
-0.09298128634691238,
-0.001556195318698883,
-0.3426612913608551,
0.296784907579422,
0.7822849154472351,
0.39966481924057007,
0.1758706420660019,
0.2156396359205246,
0.5306100845336914,
0.3595181107521057,
0.38602450489997864,
0.33814460039138794,
-0.23136325180530548,
-0.06789901107549667,
0.2951613962650299,
0.05319331958889961,
-0.5167253613471985,
-0.04438655823469162,
0.15093156695365906,
-0.18117693066596985,
-0.11927075684070587,
0.016909431666135788,
-0.15570475161075592,
0.2961479425430298,
-0.26038244366645813,
-0.38141098618507385,
0.08686329424381256,
-0.2023056149482727,
-0.24438858032226562,
-0.19004277884960175,
-0.09651479125022888,
0.20095455646514893,
-0.4492748975753784,
0.3753635883331299,
0.2514263093471527,
-0.09266361594200134,
0.26387718319892883,
0.10204949975013733,
0.14376436173915863,
-0.20708070695400238,
0.2501847743988037,
0.16161789000034332,
0.7215540409088135,
0.17723414301872253,
0.12739986181259155,
0.17931753396987915,
-0.09065280854701996,
0.2533269226551056,
0.15644949674606323,
-0.16776461899280548,
0.24138876795768738,
-0.09136165678501129,
-0.12017885595560074,
0.10223008692264557,
0.39620286226272583,
0.04922366142272949,
-0.17263098061084747,
-0.1069476306438446,
-0.03383030742406845,
0.2005792111158371,
0.1612652838230133,
0.12806862592697144,
-0.026097401976585388,
0.20302358269691467,
-0.23246684670448303,
0.2462068498134613,
0.15907377004623413,
0.14450958371162415,
0.07290465384721756,
-0.02518904209136963,
-0.3879300057888031,
0.1451655477285385,
-0.0661640539765358,
0.370758593082428,
-0.19803498685359955,
-0.2538054883480072,
-0.2639257609844208,
-0.3639072775840759,
0.019596533849835396,
-0.02194737270474434,
0.12754350900650024,
-0.11621922254562378,
0.189486563205719,
0.05785277485847473,
0.1939164400100708,
-0.30546897649765015,
-0.18740062415599823,
-0.042539916932582855,
0.11297667026519775,
-0.35204899311065674,
-0.013548234477639198,
0.08328130841255188,
-0.12247718870639801,
0.4979560077190399,
0.22464101016521454,
-0.15181401371955872,
0.02973952889442444,
0.0791250541806221,
0.1071716696023941,
0.0368606261909008,
0.26149046421051025,
-0.06842431426048279,
-0.01797282136976719,
0.0009731054306030273,
-0.08202501386404037,
-0.2350456714630127,
0.26387494802474976,
-0.013376951217651367,
-0.2735418379306793,
-0.4603399634361267,
0.2024456262588501,
-0.33893436193466187,
-0.1279257833957672,
0.18615517020225525,
0.06156405434012413,
0.1776740550994873,
-0.35248610377311707,
0.041945863515138626,
-0.38995182514190674,
0.12608937919139862,
0.013641929253935814,
-0.12447931617498398,
-0.041349440813064575,
-0.007041599601507187,
-0.1972959190607071,
-0.03209739178419113,
-0.42233315110206604,
0.3923662304878235,
0.3698946237564087,
-0.32517915964126587,
-0.022359535098075867,
-0.09786207228899002,
0.22790302336215973,
0.22458669543266296,
-0.34896066784858704,
-0.31376057863235474,
0.05636424943804741,
-0.1993919312953949,
-0.11434581130743027,
0.246293842792511,
-0.027255235239863396,
-0.1828126162290573,
-0.019140416756272316,
-0.04096685349941254,
0.3157668709754944,
0.08235735446214676,
0.13199573755264282,
-0.4862551689147949,
-0.2567749321460724,
0.14076292514801025,
-0.02239018678665161,
0.023717323318123817,
-0.15701156854629517,
-0.044181205332279205,
-0.044541697949171066,
0.34315094351768494,
-0.01667918637394905,
0.033964306116104126,
-0.014107119292020798,
0.017517291009426117,
0.11120634526014328,
-0.11989160627126694,
0.07799332588911057,
-0.013468936085700989,
-0.02267945185303688,
-0.5015805959701538,
0.3683544397354126,
-0.1919385939836502,
-0.35514479875564575,
-0.10083924978971481,
-0.007090638391673565,
-0.044730644673109055,
-0.1006917655467987,
0.16121166944503784,
-0.1429765820503235,
0.07151395082473755,
0.25341445207595825,
-0.006757758557796478,
-0.32599201798439026,
-0.025590889155864716,
0.10060764849185944,
0.0014615803956985474,
0.11086824536323547,
-0.36914148926734924,
-0.507037341594696,
0.028635665774345398,
0.20586201548576355,
0.2018127143383026,
0.11197715997695923,
0.09819561243057251,
-0.030325427651405334,
-0.30821600556373596,
0.2859078049659729,
-0.4791701138019562,
-0.1952306181192398,
0.11722763627767563,
-0.47695815563201904,
0.04365122318267822,
-0.014215279370546341,
-0.1687179058790207,
0.10052864998579025,
0.43609410524368286,
0.4499976634979248,
0.19650380313396454,
-0.05310261994600296,
-0.14988762140274048,
-0.05458063632249832,
0.1406521499156952,
-0.16405335068702698,
0.025962604209780693,
-0.003624357283115387,
0.14700080454349518,
0.1947021484375,
0.10014182329177856,
-0.010952742770314217,
-0.12981335818767548,
-0.12075402587652206,
0.39678916335105896,
0.06221051886677742,
0.0553404800593853,
0.030193137004971504,
0.012404553592205048,
-0.11788356304168701,
0.338746041059494,
-0.35474058985710144,
0.08355577290058136,
0.30392491817474365,
-0.07180456817150116,
0.3368052542209625,
-0.1803065836429596,
-0.29058149456977844,
0.15463727712631226,
0.16772642731666565,
0.08243561536073685,
0.21340373158454895,
0.4092850983142853,
-0.1627022922039032,
-0.6508198380470276,
0.13684892654418945,
-0.06870364397764206,
0.15759599208831787,
-0.19141198694705963,
0.06354448199272156,
-0.2776797413825989,
-0.40181583166122437,
-0.18635119497776031,
-0.2930062711238861,
-0.33647897839546204,
-0.10615826398134232,
0.16844359040260315,
0.3411312997341156,
-0.07111480832099915,
0.32803186774253845,
0.3384559452533722,
-0.17547036707401276,
-0.2444176822900772,
-0.048175640404224396,
-0.1508714258670807,
-0.2504647672176361,
-0.3752196431159973,
0.06708265841007233,
0.20004506409168243,
0.19006697833538055,
0.16156820952892303,
-0.1450318545103073,
-0.22012178599834442,
0.08467335253953934,
-0.49073413014411926,
0.007579609751701355,
-0.24829576909542084,
0.19811302423477173,
0.19546788930892944,
-0.009468138217926025,
-0.12593203783035278,
-0.29106560349464417,
0.15336619317531586,
-0.3169592618942261,
-0.3713763654232025,
-0.14567777514457703,
-0.3450292944908142,
0.2003512680530548,
-0.30355948209762573,
-0.03708334267139435,
-0.4336921274662018,
-0.2729845941066742,
0.18493425846099854,
0.08836737275123596,
0.07821029424667358,
0.3221370577812195,
0.09230810403823853,
0.15174300968647003,
-0.2781139314174652,
-0.16424345970153809,
0.12563928961753845,
-0.0698491632938385,
0.19683445990085602,
-0.03621929511427879,
-0.22000567615032196,
0.1404721736907959,
-0.02611486241221428,
0.1026245504617691,
-0.23047025501728058,
-0.4257996082305908,
-0.2739185392856598,
-0.028199369087815285,
0.6165571808815002,
0.24065054953098297,
-0.10698056221008301,
0.43140771985054016,
0.07985326647758484,
-0.15544496476650238,
0.01563425362110138,
-0.10812032222747803,
-0.01956149935722351,
-0.21965748071670532,
0.11453445255756378,
-0.01350022479891777,
0.16430515050888062,
0.02843300625681877,
0.7524282336235046,
-0.20219892263412476,
-0.08653552830219269,
0.5082701444625854,
-0.0427490770816803,
0.2506542503833771,
0.15850935876369476,
0.011620411649346352,
-0.07519051432609558,
0.24296286702156067,
0.15515682101249695,
0.0164741650223732,
-0.11867211014032364,
-0.3167378902435303,
0.1006590873003006,
-0.41920965909957886,
0.008110307157039642,
-0.07880797982215881,
-0.0037510544061660767,
0.4223543107509613,
0.10174669325351715,
0.26470479369163513,
-0.10919370502233505,
-0.05164601653814316,
-0.4151853919029236,
0.1822407841682434,
0.13365408778190613,
-0.14402800798416138,
-0.004065699875354767,
-0.06609758734703064,
-0.3085956573486328,
-0.43898600339889526,
0.015116490423679352,
0.35853487253189087,
-0.0007143467664718628,
0.015640776604413986,
-0.13331478834152222,
0.28482553362846375,
-0.06494191288948059,
0.24608229100704193,
0.144722580909729,
0.08270836621522903,
0.23157796263694763,
0.16171802580356598,
-0.24956463277339935,
-0.19331729412078857,
-0.11359481513500214,
-0.030792146921157837,
0.4878684878349304,
0.03402199223637581,
-0.3158234655857086,
-0.19146426022052765,
0.6278866529464722,
0.27763301134109497,
0.007831204682588577,
-0.15954333543777466,
-0.5531589388847351,
-0.34033337235450745,
-0.0945025160908699,
0.1357288956642151,
0.059588924050331116,
0.22822465002536774,
-0.08561600744724274,
0.14255690574645996,
-0.0233293604105711,
0.11384501308202744,
-0.24027316272258759,
0.2719140946865082,
0.030583512037992477,
-0.14174310863018036,
-0.08021373301744461,
-0.155150905251503,
-0.2209058403968811,
0.0045705754309892654,
0.26990848779678345,
0.22858741879463196,
-0.29237043857574463,
-0.2940799295902252,
0.37493741512298584,
0.04009764641523361,
0.08916869014501572,
0.07626021653413773,
0.19069452583789825,
-0.13890402019023895,
0.027994975447654724,
0.1909884512424469,
0.010770343244075775,
0.33022353053092957,
0.0095628397539258,
0.2052789330482483,
0.20499232411384583,
0.3583035469055176,
0.07590705156326294,
0.020305059850215912,
0.11601570248603821,
0.06303747743368149,
-0.3131760358810425,
0.18937891721725464,
0.11925254762172699,
0.7727373242378235,
0.046887755393981934,
0.2768121659755707,
0.7808105945587158,
0.038120709359645844,
0.38216662406921387,
0.2557762861251831,
0.14067505300045013,
-0.3187003433704376,
0.06568176299333572,
0.17765052616596222,
-0.0057657212018966675,
0.1608765870332718,
-0.10354359447956085,
-0.08716779947280884,
0.1506630778312683,
0.3170356750488281,
-0.10861016809940338,
0.14549417793750763,
0.1781945824623108,
-0.12006551772356033,
0.013112240470945835,
-0.45513638854026794,
0.043202854692935944,
-0.07286643981933594,
0.3411376476287842,
-0.17381370067596436,
-0.3098093867301941,
0.26176589727401733,
-0.24209809303283691,
-0.06314852833747864,
0.29489222168922424,
0.07290242612361908,
0.1800817996263504,
0.1867467761039734,
-0.09796694666147232,
-0.016963321715593338,
0.22307844460010529,
-0.004704296588897705,
-0.1608380675315857,
-0.024357175454497337,
0.2252330183982849,
0.07776211202144623,
-0.38796189427375793,
-0.07551754266023636,
0.3331817090511322,
0.053972065448760986,
-0.273044228553772,
-0.38422098755836487,
0.1162782683968544,
0.004767662845551968,
0.02265210449695587,
-0.05306389927864075,
-0.009460635483264923,
0.04676268994808197,
0.09045254439115524,
0.04588308557868004,
-0.06030730903148651,
0.052845414727926254,
-0.12393754720687866,
0.17231902480125427,
-0.008558064699172974,
-0.07097189128398895,
-0.02104918658733368,
0.05375538021326065,
-0.37237104773521423,
-0.10130827128887177,
0.39566680788993835,
0.01736154966056347,
0.08255577087402344,
0.5533750057220459,
0.1342068910598755,
-0.17259861528873444,
-0.168562650680542,
0.08882080763578415,
-0.12049312889575958,
-0.5595659017562866,
-0.06490819901227951,
0.39158952236175537,
0.005368068814277649,
0.05243048816919327,
0.31427431106567383,
0.17299576103687286,
0.07282578945159912,
-0.14096443355083466,
-0.1577627956867218,
-0.15990185737609863,
0.2311980426311493,
-0.030347760766744614,
-0.2218043953180313,
0.33061569929122925,
0.4356178939342499,
0.18884818255901337,
-0.24541714787483215,
-0.2971189022064209,
0.024344973266124725,
-0.13341578841209412,
0.2212601900100708,
-0.24712881445884705,
-0.10504158586263657,
0.05766040086746216,
0.08808891475200653,
0.1166146844625473,
0.03580397740006447,
-0.05574890971183777,
-0.23652243614196777,
-0.1890360713005066,
0.09930363297462463,
0.08744476735591888,
-0.1711905598640442,
0.03290722146630287,
0.1443336308002472,
0.17435558140277863,
0.12582054734230042,
-0.025264857336878777,
0.026315495371818542,
-0.0780579000711441,
0.3505365550518036,
0.15152230858802795,
0.18355999886989594,
-0.0883226990699768,
-0.04336562007665634,
-0.3393917977809906,
0.21555493772029877,
0.07555551081895828,
0.17423486709594727,
0.05594728887081146,
0.0806269645690918,
0.10382717102766037,
-0.2235935926437378,
-0.13624417781829834,
0.0465390607714653,
0.06848078221082687,
-0.20911918580532074,
-0.3051456809043884,
-0.1213175505399704,
0.1599951982498169,
0.22683602571487427,
-0.24001547694206238,
-0.21933037042617798,
0.3959603011608124,
0.2351084202528,
-0.3919549286365509,
0.02562786638736725,
-0.059079479426145554,
0.07321171462535858,
-0.117332324385643,
-0.031286634504795074,
0.04472534731030464,
-0.21965742111206055,
0.2954951524734497,
0.28807008266448975,
0.14277495443820953,
-0.11839666962623596,
-0.11739346385002136,
0.20029617846012115,
-0.06274363398551941,
-0.036954861134290695,
0.4063514173030853,
0.046790555119514465,
0.31461644172668457,
-0.1146051436662674,
-0.12961891293525696,
0.2657223045825958,
-0.29110047221183777,
0.29437634348869324,
-0.34253451228141785,
-0.1696186512708664,
-0.22829650342464447,
0.3689382076263428,
0.24356338381767273,
-0.24195200204849243,
0.2854421138763428,
0.3730117976665497,
0.2542887032032013,
-0.11983399838209152,
0.035805776715278625,
0.618018627166748,
-0.14890405535697937,
-0.12169653177261353,
-0.2572513818740845,
0.20553737878799438,
0.06190513074398041,
0.25561025738716125,
0.02129821479320526,
0.19015954434871674,
0.24968595802783966,
0.20222671329975128,
-0.25797176361083984,
-0.35246649384498596,
-0.051988303661346436,
0.33205413818359375,
0.200560063123703,
-0.1307683140039444,
0.2552774250507355,
0.12831906974315643,
-0.19246596097946167,
-0.2567721903324127,
0.4530801475048065,
0.6163244247436523,
0.2657213509082794,
0.10320235788822174,
-0.22096531093120575,
-0.2673635482788086,
0.07525760680437088,
-0.18730391561985016,
0.2475881576538086,
0.27743396162986755,
0.7746671438217163,
-0.010769659653306007,
0.09448085725307465,
-0.28119319677352905,
-0.011722013354301453,
0.1550174057483673,
-0.24542343616485596,
-0.014271505177021027,
-0.01597686856985092,
0.05520843714475632,
-0.3199712038040161,
-0.22739213705062866,
0.11109444499015808,
-0.32477155327796936,
0.39305761456489563,
0.09140834212303162,
0.33344510197639465,
-0.0036918558180332184,
-0.4467834234237671,
0.06859360635280609,
0.09602609276771545,
0.4824584722518921,
0.2509271204471588,
0.1322217583656311,
-0.23483841121196747,
-0.17131640017032623,
-0.5863736271858215,
0.2388714849948883,
-0.4293251633644104,
-0.06943761557340622,
0.1120382621884346,
-0.1098492369055748,
-0.3579767048358917,
0.253603458404541,
-0.12136544287204742,
0.15745502710342407,
-0.11950310319662094,
-0.21464037895202637,
-0.187066450715065,
0.3027912974357605,
0.21912702918052673,
-0.234218567609787,
-0.02891598828136921,
-0.2543507218360901,
0.25483089685440063,
-0.5901119709014893,
0.08147922903299332,
-0.23192863166332245,
-0.0342659167945385,
-0.06908419728279114,
0.5230580568313599,
0.19596222043037415,
0.1945028454065323,
0.3007861077785492,
0.08615774661302567,
0.1274978667497635,
-0.19842180609703064,
-0.39191123843193054,
-0.38510221242904663,
0.2205202579498291,
-0.07965905964374542,
0.1576739400625229,
-0.14546896517276764,
-0.08244647085666656,
-0.26720207929611206,
0.43862390518188477,
-0.19763319194316864,
0.03266787901520729,
0.2748298943042755,
0.15249954164028168,
0.04484790563583374,
0.07655075937509537,
-0.14383961260318756,
-0.01422370970249176,
0.09465894103050232,
-0.1970762312412262,
-0.5314704775810242,
-0.4598430097103119,
0.20829659700393677,
-0.5019983053207397,
0.05285198614001274,
0.020666539669036865,
0.2318800985813141,
0.12145070731639862,
-0.43939998745918274,
-0.40357816219329834,
0.16222363710403442,
0.2716173827648163,
0.22007417678833008,
-0.16768822073936462,
0.24313777685165405,
0.19530870020389557,
0.02469826117157936,
-0.012545466423034668,
-0.1446717381477356,
0.12019635736942291,
-0.31544429063796997,
0.14798013865947723,
-0.2379944622516632
] |
https://github.com/huggingface/datasets/issues/433 | How to reuse functionality of a (generic) dataset? | Hi @ArneBinder, we have a few "generic" datasets which are intended to load data files with a predefined format:
- csv: https://github.com/huggingface/nlp/tree/master/datasets/csv
- json: https://github.com/huggingface/nlp/tree/master/datasets/json
- text: https://github.com/huggingface/nlp/tree/master/datasets/text
You can find more details about this way to load datasets here in the documentation: https://huggingface.co/nlp/loading_datasets.html#from-local-files
Maybe your brat loading script could be shared in a similar fashion? | I have written a generic dataset for corpora created with the Brat annotation tool ([specification](https://brat.nlplab.org/standoff.html), [dataset code](https://github.com/ArneBinder/nlp/blob/brat/datasets/brat/brat.py)). Now I wonder how to use that to create specific dataset instances. What's the recommended way to reuse formats and loading functionality for datasets with a common format?
In my case, it took a bit of time to create the Brat dataset and I think others would appreciate to not have to think about that again. Also, I assume there are other formats (e.g. conll) that are widely used, so having this would really ease dataset onboarding and adoption of the library. | 56 | How to reuse functionality of a (generic) dataset?
I have written a generic dataset for corpora created with the Brat annotation tool ([specification](https://brat.nlplab.org/standoff.html), [dataset code](https://github.com/ArneBinder/nlp/blob/brat/datasets/brat/brat.py)). Now I wonder how to use that to create specific dataset instances. What's the recommended way to reuse formats and loading functionality for datasets with a common format?
In my case, it took a bit of time to create the Brat dataset and I think others would appreciate to not have to think about that again. Also, I assume there are other formats (e.g. conll) that are widely used, so having this would really ease dataset onboarding and adoption of the library.
Hi @ArneBinder, we have a few "generic" datasets which are intended to load data files with a predefined format:
- csv: https://github.com/huggingface/nlp/tree/master/datasets/csv
- json: https://github.com/huggingface/nlp/tree/master/datasets/json
- text: https://github.com/huggingface/nlp/tree/master/datasets/text
You can find more details about this way to load datasets here in the documentation: https://huggingface.co/nlp/loading_datasets.html#from-local-files
Maybe your brat loading script could be shared in a similar fashion? | [
-0.1659952700138092,
-0.1904756724834442,
0.11394323408603668,
0.3808881640434265,
0.21837230026721954,
-0.004778526723384857,
0.1885102242231369,
0.11226721107959747,
-0.11108914017677307,
-0.21326814591884613,
-0.19556540250778198,
0.2885517179965973,
-0.03979535400867462,
0.5394510626792908,
0.19263160228729248,
-0.13461145758628845,
-0.21173599362373352,
0.21866190433502197,
-0.11622872948646545,
-0.026285257190465927,
0.039408862590789795,
-0.19431623816490173,
0.06868243217468262,
-0.1159505546092987,
-0.37026309967041016,
0.13189250230789185,
-0.23842793703079224,
-0.01792687177658081,
0.2592288851737976,
-0.23462721705436707,
0.5442930459976196,
0.34451791644096375,
0.45950230956077576,
0.2523494064807892,
-0.0001251961657544598,
0.033015936613082886,
-0.03918537497520447,
-0.14482848346233368,
-0.29244840145111084,
-0.1255926936864853,
-0.21343573927879333,
-0.22338910400867462,
0.08980307728052139,
-0.24378252029418945,
-0.3222339451313019,
-0.3877204358577728,
0.1589093804359436,
-0.5658190846443176,
0.45745915174484253,
-0.09784528613090515,
0.03066243976354599,
-0.08066903054714203,
-0.20104490220546722,
-0.10277756303548813,
-0.12744617462158203,
0.3995325565338135,
-0.004883000627160072,
0.4021584093570709,
0.6236610412597656,
0.3071165978908539,
0.11425875872373581,
0.018616575747728348,
0.18922629952430725,
0.09230434894561768,
0.2961041331291199,
-0.13040386140346527,
-0.03211607784032822,
0.03738351911306381,
0.035192277282476425,
0.3731413185596466,
0.9288992881774902,
-0.3871006667613983,
-0.05731850117444992,
-0.10395080596208572,
-0.002231928054243326,
-0.2916267514228821,
-0.2740898132324219,
0.17821092903614044,
0.1706531047821045,
0.11698803305625916,
-0.2853212356567383,
-0.34645968675613403,
-0.2974860668182373,
0.12132132798433304,
0.2955726087093353,
0.024734213948249817,
-0.08608079701662064,
0.22276660799980164,
-0.2029816061258316,
-0.08768932521343231,
0.0028409273363649845,
-0.24094849824905396,
-0.15466101467609406,
0.048197176307439804,
0.1250663548707962,
-0.12669336795806885,
-0.43188756704330444,
0.12427812069654465,
0.32262101769447327,
0.4385862350463867,
0.30704525113105774,
0.24883610010147095,
-0.3475722670555115,
0.05439030006527901,
0.43373173475265503,
0.07278712093830109,
0.39208438992500305,
0.2755171060562134,
0.08987489342689514,
0.2174171358346939,
-0.4256956875324249,
-0.16050338745117188,
-0.4732802212238312,
0.40963682532310486,
0.28280162811279297,
-0.047839537262916565,
0.025860551744699478,
-0.241318941116333,
-0.005771717056632042,
-0.055379919707775116,
-0.3146703839302063,
-0.17108596861362457,
0.22007305920124054,
0.0787808895111084,
-0.12681978940963745,
0.19432327151298523,
-0.07609058916568756,
0.25407832860946655,
-0.06054798513650894,
-0.3372296988964081,
0.007238110061734915,
0.03850211203098297,
-0.33244824409484863,
0.17061810195446014,
0.3277174234390259,
-0.40357235074043274,
0.2055004984140396,
0.3074687719345093,
-0.1498454511165619,
-0.1152978166937828,
0.36843565106391907,
0.11043158173561096,
-0.2815552055835724,
-0.5091329216957092,
-0.15930695831775665,
0.09367848187685013,
0.218721404671669,
0.15013310313224792,
-0.3380334973335266,
0.033550042659044266,
-0.12402758747339249,
-0.3322890102863312,
-0.1301243007183075,
0.015854479745030403,
-0.2962246537208557,
0.03134872019290924,
-0.10646485537290573,
0.42954328656196594,
-0.0012110397219657898,
-0.3559824526309967,
-0.2109796106815338,
-0.10439915955066681,
-0.29143762588500977,
-0.06807904690504074,
0.1657024621963501,
0.25905901193618774,
-0.521217405796051,
-0.12868937849998474,
-0.11514266580343246,
0.0005090329796075821,
0.4149298071861267,
0.24992260336875916,
-0.41696345806121826,
0.21721169352531433,
-0.12380530685186386,
-0.18360677361488342,
0.4553327262401581,
-0.07979460060596466,
-0.01083867996931076,
-0.12291940301656723,
0.20099128782749176,
0.1629834920167923,
0.08261672407388687,
0.0667768344283104,
0.18938028812408447,
-0.24760262668132782,
-0.34426936507225037,
0.5017465353012085,
0.10475189983844757,
-0.24573291838169098,
-0.07677220553159714,
-0.2122572660446167,
0.11834980547428131,
0.039836328476667404,
-0.23080985248088837,
0.13012957572937012,
0.08505560457706451,
0.2706218957901001,
0.020123884081840515,
-0.24455612897872925,
0.11472373455762863,
-0.1340281218290329,
0.02102074958384037,
0.39413660764694214,
0.10710128396749496,
-0.24272581934928894,
-0.5016248822212219,
0.17252248525619507,
-0.3441224694252014,
-0.27799662947654724,
0.502593457698822,
-0.5051970481872559,
-0.3756367564201355,
-0.24389705061912537,
-0.14941692352294922,
-0.023122377693653107,
0.011768747121095657,
0.5268943905830383,
0.10758128762245178,
-0.07938487827777863,
-0.10466449707746506,
0.11273316293954849,
-0.11624486744403839,
-0.02060258947312832,
-0.09465014934539795,
0.2827686071395874,
0.13378365337848663,
0.03274175897240639,
0.08084937930107117,
0.5369929671287537,
0.0391518659889698,
-0.05223291739821434,
0.169510155916214,
0.28416550159454346,
0.1377081423997879,
0.17230601608753204,
0.08901844918727875,
0.11356118321418762,
0.12533460557460785,
0.1243244856595993,
0.41573572158813477,
-0.062339212745428085,
0.3338621258735657,
-0.14368091523647308,
-0.4933604300022125,
0.23440517485141754,
0.08539851009845734,
0.00324142724275589,
0.0942283421754837,
-0.09903451800346375,
0.1269892454147339,
-0.11948846280574799,
-0.16381718218326569,
-0.11604948341846466,
-0.16185152530670166,
0.16686320304870605,
-0.04906194657087326,
0.33707237243652344,
-0.3186078369617462,
-0.05876804143190384,
0.2334948182106018,
-0.16766682267189026,
0.2127048671245575,
-0.12483004480600357,
-0.1789674162864685,
-0.115068718791008,
0.37555253505706787,
-0.16963054239749908,
0.08149228990077972,
0.05105503648519516,
0.2505188584327698,
-0.009339990094304085,
-0.07317332178354263,
0.05967431515455246,
0.24544906616210938,
-0.19965429604053497,
0.1939689964056015,
-0.20380985736846924,
0.12295258790254593,
0.07256995141506195,
0.04029211401939392,
-0.0532919280230999,
0.2882686257362366,
0.03535238653421402,
-0.10955733060836792,
0.17360596358776093,
-0.7263831496238708,
-0.29554903507232666,
-0.36417943239212036,
0.030819136649370193,
0.022096343338489532,
0.034347809851169586,
-0.2832488417625427,
0.0523054376244545,
0.12935073673725128,
0.15105129778385162,
0.10382568836212158,
0.5219678282737732,
-0.3055052161216736,
-0.08181782066822052,
0.054411791265010834,
-0.3273839056491852,
-0.3867360055446625,
0.01337440311908722,
0.4593726694583893,
0.3856509327888489,
0.4869643747806549,
-0.02038268931210041,
0.07977644354104996,
-0.42135271430015564,
-0.2247263789176941,
0.20085835456848145,
0.2226729393005371,
-0.0748155266046524,
0.17452028393745422,
0.016682684421539307,
-0.3718515634536743,
-0.28647488355636597,
0.19825778901576996,
0.11779768764972687,
0.21608315408229828,
-0.10235022008419037,
-0.4804205000400543,
0.16403789818286896,
-0.17671561241149902,
-0.041748903691768646,
-0.07909145206212997,
-0.2007600963115692,
0.28519389033317566,
-0.005826862528920174,
-0.030239053070545197,
0.3705183267593384,
-0.2798815369606018,
0.20288531482219696,
-0.11043756455183029,
0.28729501366615295,
-0.23973259329795837,
-0.24744483828544617,
0.26289376616477966,
-0.14475107192993164,
-0.14902852475643158,
-0.1419074833393097,
-0.33198481798171997,
0.15676060318946838,
0.5356494784355164,
-0.24688181281089783,
-0.39325806498527527,
-0.10057534277439117,
-0.21456550061702728,
0.29228949546813965,
0.22706909477710724,
0.0891077071428299,
0.008877686224877834,
0.163380429148674,
-0.03813745081424713,
-0.11594955623149872,
0.2437332570552826,
-0.08338750898838043,
0.1644112467765808,
0.4508984684944153,
0.042425986379384995,
0.2240000069141388,
0.3212418556213379,
0.21811681985855103,
-0.4716587960720062,
0.47672781348228455,
-0.10400339215993881,
0.42643266916275024,
0.03220270574092865,
0.04942364990711212,
0.24937492609024048,
-0.09989553689956665,
0.11824341118335724,
0.22403743863105774,
0.019833454862236977,
0.1488359123468399,
-0.14245212078094482,
0.08322431147098541,
-0.06747767329216003,
-0.48024433851242065,
0.1267702877521515,
-0.26302987337112427,
0.5065650939941406,
0.20040985941886902,
-0.16664202511310577,
-0.2821267247200012,
0.011812794953584671,
0.20481480658054352,
0.1115637794137001,
0.15187039971351624,
0.11141400039196014,
-0.3922570049762726,
0.11459138244390488,
0.17443503439426422,
0.5108850002288818,
0.09060212969779968,
0.027852796018123627,
0.2118861824274063,
0.00013696029782295227,
-0.005502752959728241,
0.06444087624549866,
-0.010716632008552551,
-0.25851064920425415,
0.06176279857754707,
0.01705026626586914,
-0.23409403860569,
-0.31299513578414917,
0.005186956375837326,
-0.148211270570755,
0.21566811203956604,
0.061382245272397995,
0.09373144060373306,
-0.5858941078186035,
-0.11343483626842499,
0.3056808412075043,
0.4081917405128479,
-0.1027638167142868,
0.15593066811561584,
0.24475963413715363,
-0.08407166600227356,
-0.342358261346817,
-0.12070631235837936,
-0.22209687530994415,
0.10915946960449219,
0.07748468220233917,
0.1068611592054367,
-0.40605172514915466,
0.17899829149246216,
0.32302314043045044,
0.14360159635543823,
0.5515426993370056,
0.16734081506729126,
0.1025037169456482,
0.14226743578910828,
0.0629677101969719,
0.12545673549175262,
0.5182181596755981,
-0.27434200048446655,
-0.48754674196243286,
-0.11233203858137131,
0.052732307463884354,
0.3552323877811432,
0.1335095912218094,
0.26867130398750305,
-0.26443445682525635,
-0.2075333297252655,
-0.3050479292869568,
-0.24659669399261475,
0.281500905752182,
-0.02144707925617695,
-0.00895401556044817,
-0.4367789626121521,
-1.003654956817627,
0.1773262917995453,
0.2341751605272293,
-0.02216380089521408,
0.19600720703601837,
0.04429579898715019,
-0.05616285651922226,
0.08397037535905838,
0.14821608364582062,
0.8185893893241882,
-0.234224334359169,
0.2623116075992584,
0.2913029193878174,
0.2999870181083679,
0.6729300618171692,
-0.15923182666301727,
-0.23362107574939728,
-0.3155064284801483,
0.07766410708427429,
0.012421710416674614,
-0.05489089712500572,
0.4027073383331299,
0.2620372474193573,
-0.1770489513874054,
0.3238632082939148,
0.23287548124790192,
0.414917528629303,
0.04721566289663315,
0.20623454451560974,
-0.4215626120567322,
-0.26400700211524963,
0.0007391758263111115,
-0.026665201410651207,
-0.31076258420944214,
-0.022258970886468887,
-0.22236984968185425,
0.1319064497947693,
0.1768975853919983,
0.10927045345306396,
-0.28934115171432495,
-0.06797739863395691,
-0.21110957860946655,
0.015395298600196838,
-0.14339864253997803,
-0.45984411239624023,
0.43785879015922546,
0.4143335223197937,
0.2606966495513916,
0.2978549301624298,
-0.12508592009544373,
0.03519364818930626,
-0.1367511749267578,
-0.05745886638760567,
-0.2723388075828552,
0.059876278042793274,
0.2151690274477005,
0.11797627061605453,
-0.046215884387493134,
0.12319611757993698,
0.36750704050064087,
0.15010793507099152,
-0.19399257004261017,
-0.20788966119289398,
0.3192489743232727,
-0.3471471667289734,
-0.20804890990257263,
0.11361600458621979,
0.011693950742483139,
-0.00004787743091583252,
-0.035451389849185944,
0.21707095205783844,
-0.05859622731804848,
0.03659256175160408,
-0.07998029887676239,
0.05063147842884064,
-0.011812210083007812,
-0.21648257970809937,
0.2862478494644165,
-0.24482879042625427,
0.38015294075012207,
0.053439002484083176,
0.09602586925029755,
-0.12397624552249908,
0.15428894758224487,
0.200452521443367,
-0.3535533547401428,
-0.047287244349718094,
0.048146191984415054,
-0.2010810375213623,
0.12576128542423248,
0.24551954865455627,
-0.11044915020465851,
0.041625820100307465,
0.10671883821487427,
-0.27098989486694336,
-0.062191031873226166,
0.2552555799484253,
0.08479280769824982,
0.39133477210998535,
0.03351808339357376,
-0.011419795453548431,
-0.23393410444259644,
-0.07638741284608841,
-0.1716608852148056,
0.2520008087158203,
0.253212034702301,
0.2020985633134842,
-0.07556938380002975,
0.06589081883430481,
-0.0873565599322319,
-0.04374336823821068,
-0.03598173335194588,
0.11916467547416687,
-0.10458654910326004,
-0.03198785334825516,
-0.5068331360816956,
0.22024142742156982,
-0.02082599326968193,
-0.18087317049503326,
-0.06647826731204987,
-0.32002735137939453,
0.07483205199241638,
-0.440378338098526,
0.17691130936145782,
0.04938367009162903,
-0.07204043865203857,
0.21946705877780914,
0.5647690892219543,
0.057019174098968506,
-0.20973354578018188,
0.001665014773607254,
0.12666969001293182,
0.41002005338668823,
0.37313249707221985,
0.08522535115480423,
-0.1460329294204712,
-0.11676806211471558,
0.0035764521453529596,
0.2336939573287964,
0.8808064460754395,
-0.04255727678537369,
0.2894619405269623,
0.13790905475616455,
0.06675472855567932,
0.16705945134162903,
0.36052632331848145,
0.47358500957489014,
-0.0906049981713295,
0.2389070838689804,
0.30979815125465393,
0.002391355112195015,
-0.08278379589319229,
0.09480022639036179,
0.16943414509296417,
-0.089006707072258,
-0.13276052474975586,
0.353659451007843,
0.18406234681606293,
0.2066236138343811,
-0.1526351124048233,
-0.3317941129207611,
0.17107971012592316,
0.05033000558614731,
0.44260650873184204,
0.277634859085083,
0.012994367629289627,
-0.37711432576179504,
-0.03324079513549805,
0.3894672691822052,
0.27867498993873596,
-0.448198139667511,
0.23740732669830322,
0.20647288858890533,
0.0597754642367363,
0.25432443618774414,
0.39619210362434387,
-0.5807135701179504,
-0.01080743595957756,
0.38407501578330994,
0.23699283599853516,
0.35253748297691345,
-0.09826646745204926,
0.2982099652290344,
0.10656900703907013,
0.028806040063500404,
-0.0740944892168045,
0.1353554129600525,
-0.024305488914251328,
-0.1885049194097519,
-0.22557894885540009,
-0.30661848187446594,
-0.2714519798755646,
0.005142860114574432,
-0.2844659686088562,
-0.03926001489162445,
-0.24307364225387573,
-0.005570411682128906,
0.09138026833534241,
-0.42894247174263,
0.0885230079293251,
0.12821130454540253,
0.11098145693540573,
-0.02729583904147148,
0.1762387901544571,
0.2643396258354187,
-0.27723532915115356,
0.3040175139904022,
0.3469224274158478,
0.15743814408779144,
0.0013450086116790771,
-0.07842063903808594,
0.20379458367824554,
-0.20441517233848572,
0.13936747610569,
-0.1719985455274582,
0.08421225100755692,
0.17829547822475433,
-0.34583649039268494,
0.24693502485752106,
-0.01791839674115181,
0.05936751514673233,
-0.08088108897209167,
-0.09425260126590729,
-0.22528871893882751,
-0.5750335454940796,
0.4838283658027649,
0.24679440259933472,
-0.17666944861412048,
0.19535350799560547,
0.1366724669933319,
-0.23763251304626465,
-0.41505879163742065,
0.33145055174827576,
0.31814321875572205,
-0.012797005474567413,
-0.1789320707321167,
-0.00291433185338974,
0.1667659729719162,
0.26571914553642273,
0.10690966248512268,
-0.10332275182008743,
-0.007626879028975964,
-0.32087936997413635,
-0.7505282163619995,
0.20088359713554382,
-0.15509678423404694,
-0.5894002914428711,
0.21481795608997345,
-0.1606934517621994,
0.27755051851272583,
0.16015955805778503,
-0.2683603763580322,
-0.0050951032899320126,
0.11152458935976028,
-0.175432026386261,
-0.13350754976272583,
-0.512163519859314,
-0.015176936984062195,
-0.03636576235294342,
-0.15689679980278015,
-0.36663585901260376,
-0.07446430623531342,
0.014649980701506138,
-0.13923931121826172,
-0.025369487702846527,
-0.1672610640525818,
0.10738575458526611,
-0.41119611263275146,
0.07960974425077438,
0.08112098276615143,
0.3132670223712921,
0.21240639686584473,
-0.10553611814975739,
-0.20976540446281433,
0.07142186909914017,
0.020107246935367584,
0.3408660292625427,
-0.10468244552612305,
0.09429159015417099,
-0.5658498406410217,
-0.05982773378491402,
-0.26691150665283203,
-0.1238187626004219,
0.08611233532428741,
0.17400220036506653,
-0.12592756748199463,
-0.027449388056993484,
-0.35479381680488586,
-0.10464899241924286,
0.32444867491722107,
0.6672959923744202,
-0.22036665678024292,
0.038913145661354065,
-0.08828028291463852,
0.2342379242181778,
0.36611244082450867,
-0.21473562717437744,
-0.3655223548412323,
-0.19023819267749786,
0.07046773284673691,
-0.2707994282245636,
0.0472450777888298,
-0.3562134802341461,
0.12229769676923752,
0.2829148769378662,
-0.03113420307636261,
-0.10608012974262238,
-0.07185624539852142,
0.19539575278759003,
-0.18440209329128265,
-0.1983388215303421,
0.45959895849227905,
0.10700420290231705,
-0.12658949196338654,
-0.01300899125635624,
-0.13453041017055511
] |
https://github.com/huggingface/datasets/issues/433 | How to reuse functionality of a (generic) dataset? | > Maybe your brat loading script could be shared in a similar fashion?
@thomwolf that was also my first idea and I think I will tackle that in the next days. I separated the code and created a real abstract class `AbstractBrat` to allow to inherit from that (I've just seen that the dataset_loader loads the first non abstract class), now `Brat` is very similar in its functionality to https://github.com/huggingface/nlp/tree/master/datasets/text but inherits from `AbstractBrat`.
However, it is still not clear to me how to add a specific dataset (as explained in https://huggingface.co/nlp/add_dataset.html) to your repo that uses this format/abstract class, i.e. re-using the `features` entry of the `DatasetInfo` object and `_generate_examples()`. Again, by doing so, the only remaining entries/functions to define would be `_DESCRIPTION`, `_CITATION`, `homepage` and `_URL` (which is all copy-paste stuff) and `_split_generators()`.
In a lack of better ideas, I tried sth like below, but of course it does not work outside `nlp` (`AbstractBrat` is currently defined in [datasets/brat.py](https://github.com/ArneBinder/nlp/blob/5e81fb8710546ee7be3353a7f02a3045e9a8351e/datasets/brat/brat.py)):
```python
from __future__ import absolute_import, division, print_function
import os
import nlp
from datasets.brat.brat import AbstractBrat
_CITATION = """
@inproceedings{lauscher2018b,
title = {An argument-annotated corpus of scientific publications},
booktitle = {Proceedings of the 5th Workshop on Mining Argumentation},
publisher = {Association for Computational Linguistics},
author = {Lauscher, Anne and Glava\v{s}, Goran and Ponzetto, Simone Paolo},
address = {Brussels, Belgium},
year = {2018},
pages = {40–46}
}
"""
_DESCRIPTION = """\
This dataset is an extension of the Dr. Inventor corpus (Fisas et al., 2015, 2016) with an annotation layer containing
fine-grained argumentative components and relations. It is the first argument-annotated corpus of scientific
publications (in English), which allows for joint analyses of argumentation and other rhetorical dimensions of
scientific writing.
"""
_URL = "http://data.dws.informatik.uni-mannheim.de/sci-arg/compiled_corpus.zip"
class Sciarg(AbstractBrat):
VERSION = nlp.Version("1.0.0")
def _info(self):
brat_features = super()._info().features
return nlp.DatasetInfo(
# This is the description that will appear on the datasets page.
description=_DESCRIPTION,
# nlp.features.FeatureConnectors
features=brat_features,
# If there's a common (input, target) tuple from the features,
# specify them here. They'll be used if as_supervised=True in
# builder.as_dataset.
#supervised_keys=None,
# Homepage of the dataset for documentation
homepage="https://github.com/anlausch/ArguminSci",
citation=_CITATION,
)
def _split_generators(self, dl_manager):
"""Returns SplitGenerators."""
# TODO: Downloads the data and defines the splits
# dl_manager is a nlp.download.DownloadManager that can be used to
# download and extract URLs
dl_dir = dl_manager.download_and_extract(_URL)
data_dir = os.path.join(dl_dir, "compiled_corpus")
print(f'data_dir: {data_dir}')
return [
nlp.SplitGenerator(
name=nlp.Split.TRAIN,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"directory": data_dir,
},
),
]
```
Nevertheless, many thanks for tackling the dataset accessibility problem with this great library! | I have written a generic dataset for corpora created with the Brat annotation tool ([specification](https://brat.nlplab.org/standoff.html), [dataset code](https://github.com/ArneBinder/nlp/blob/brat/datasets/brat/brat.py)). Now I wonder how to use that to create specific dataset instances. What's the recommended way to reuse formats and loading functionality for datasets with a common format?
In my case, it took a bit of time to create the Brat dataset and I think others would appreciate to not have to think about that again. Also, I assume there are other formats (e.g. conll) that are widely used, so having this would really ease dataset onboarding and adoption of the library. | 416 | How to reuse functionality of a (generic) dataset?
I have written a generic dataset for corpora created with the Brat annotation tool ([specification](https://brat.nlplab.org/standoff.html), [dataset code](https://github.com/ArneBinder/nlp/blob/brat/datasets/brat/brat.py)). Now I wonder how to use that to create specific dataset instances. What's the recommended way to reuse formats and loading functionality for datasets with a common format?
In my case, it took a bit of time to create the Brat dataset and I think others would appreciate to not have to think about that again. Also, I assume there are other formats (e.g. conll) that are widely used, so having this would really ease dataset onboarding and adoption of the library.
> Maybe your brat loading script could be shared in a similar fashion?
@thomwolf that was also my first idea and I think I will tackle that in the next days. I separated the code and created a real abstract class `AbstractBrat` to allow to inherit from that (I've just seen that the dataset_loader loads the first non abstract class), now `Brat` is very similar in its functionality to https://github.com/huggingface/nlp/tree/master/datasets/text but inherits from `AbstractBrat`.
However, it is still not clear to me how to add a specific dataset (as explained in https://huggingface.co/nlp/add_dataset.html) to your repo that uses this format/abstract class, i.e. re-using the `features` entry of the `DatasetInfo` object and `_generate_examples()`. Again, by doing so, the only remaining entries/functions to define would be `_DESCRIPTION`, `_CITATION`, `homepage` and `_URL` (which is all copy-paste stuff) and `_split_generators()`.
In a lack of better ideas, I tried sth like below, but of course it does not work outside `nlp` (`AbstractBrat` is currently defined in [datasets/brat.py](https://github.com/ArneBinder/nlp/blob/5e81fb8710546ee7be3353a7f02a3045e9a8351e/datasets/brat/brat.py)):
```python
from __future__ import absolute_import, division, print_function
import os
import nlp
from datasets.brat.brat import AbstractBrat
_CITATION = """
@inproceedings{lauscher2018b,
title = {An argument-annotated corpus of scientific publications},
booktitle = {Proceedings of the 5th Workshop on Mining Argumentation},
publisher = {Association for Computational Linguistics},
author = {Lauscher, Anne and Glava\v{s}, Goran and Ponzetto, Simone Paolo},
address = {Brussels, Belgium},
year = {2018},
pages = {40–46}
}
"""
_DESCRIPTION = """\
This dataset is an extension of the Dr. Inventor corpus (Fisas et al., 2015, 2016) with an annotation layer containing
fine-grained argumentative components and relations. It is the first argument-annotated corpus of scientific
publications (in English), which allows for joint analyses of argumentation and other rhetorical dimensions of
scientific writing.
"""
_URL = "http://data.dws.informatik.uni-mannheim.de/sci-arg/compiled_corpus.zip"
class Sciarg(AbstractBrat):
VERSION = nlp.Version("1.0.0")
def _info(self):
brat_features = super()._info().features
return nlp.DatasetInfo(
# This is the description that will appear on the datasets page.
description=_DESCRIPTION,
# nlp.features.FeatureConnectors
features=brat_features,
# If there's a common (input, target) tuple from the features,
# specify them here. They'll be used if as_supervised=True in
# builder.as_dataset.
#supervised_keys=None,
# Homepage of the dataset for documentation
homepage="https://github.com/anlausch/ArguminSci",
citation=_CITATION,
)
def _split_generators(self, dl_manager):
"""Returns SplitGenerators."""
# TODO: Downloads the data and defines the splits
# dl_manager is a nlp.download.DownloadManager that can be used to
# download and extract URLs
dl_dir = dl_manager.download_and_extract(_URL)
data_dir = os.path.join(dl_dir, "compiled_corpus")
print(f'data_dir: {data_dir}')
return [
nlp.SplitGenerator(
name=nlp.Split.TRAIN,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"directory": data_dir,
},
),
]
```
Nevertheless, many thanks for tackling the dataset accessibility problem with this great library! | [
-0.05277574807405472,
-0.01838766038417816,
0.14753198623657227,
0.4042399525642395,
0.21433807909488678,
-0.037315674126148224,
0.131506085395813,
0.10714812576770782,
-0.20230253040790558,
-0.23726902902126312,
-0.19186684489250183,
0.40558919310569763,
-0.06352158635854721,
0.5268574357032776,
0.4249490797519684,
-0.2587220072746277,
-0.1975935995578766,
0.18040382862091064,
0.0004197433590888977,
-0.09351761639118195,
-0.0021079033613204956,
-0.137459397315979,
0.13697420060634613,
-0.09391504526138306,
-0.2226283699274063,
0.16698533296585083,
-0.28747862577438354,
-0.03239064663648605,
0.11071299016475677,
-0.25282829999923706,
0.5313694477081299,
0.352187842130661,
0.4683419466018677,
0.27828899025917053,
-0.00012507651990745217,
0.017928332090377808,
-0.08334681391716003,
-0.10716111958026886,
-0.27151963114738464,
-0.1662040799856186,
-0.2018948495388031,
-0.2514975965023041,
0.06978268176317215,
-0.2622406780719757,
-0.3338692784309387,
-0.2891654074192047,
0.08324341475963593,
-0.4201813042163849,
0.428058922290802,
0.014224204234778881,
0.012890849262475967,
-0.13318394124507904,
-0.13332553207874298,
-0.12840969860553741,
0.028225354850292206,
0.4498717784881592,
-0.1006874069571495,
0.34568583965301514,
0.5528987050056458,
0.29368776082992554,
0.1292904019355774,
0.02839725837111473,
0.1609409898519516,
0.10653935372829437,
0.3837428390979767,
-0.058412447571754456,
-0.07056202739477158,
-0.03894869238138199,
0.018995188176631927,
0.26389217376708984,
0.8025810718536377,
-0.4108220636844635,
-0.08721082657575607,
-0.17298012971878052,
0.024767398834228516,
-0.4295549690723419,
-0.25732946395874023,
0.059981197118759155,
0.16249825060367584,
0.08519366383552551,
-0.3099956512451172,
-0.3607076108455658,
-0.3834713399410248,
0.27098268270492554,
0.3352552056312561,
0.03965643048286438,
-0.056654930114746094,
0.22156068682670593,
-0.15152698755264282,
-0.02980417013168335,
-0.030185651034116745,
-0.19711187481880188,
-0.15866412222385406,
0.1109791249036789,
0.17120283842086792,
-0.19187210500240326,
-0.3047834038734436,
0.02301468700170517,
0.41929954290390015,
0.49188464879989624,
0.14514875411987305,
0.20817774534225464,
-0.35222548246383667,
-0.02132975310087204,
0.40073373913764954,
0.12592704594135284,
0.27799615263938904,
0.36522597074508667,
0.04273699223995209,
0.19573931396007538,
-0.3644953668117523,
-0.17038264870643616,
-0.44905388355255127,
0.5557586550712585,
0.23515065014362335,
-0.14517363905906677,
0.06880736351013184,
-0.2394082397222519,
0.1407325118780136,
-0.10550060868263245,
-0.3880719542503357,
-0.13881386816501617,
0.22008103132247925,
0.04732293635606766,
0.022438373416662216,
0.09217605739831924,
0.05557866394519806,
0.29784107208251953,
-0.011464620940387249,
-0.27263760566711426,
-0.004947715438902378,
0.09233616292476654,
-0.41892898082733154,
0.266470730304718,
0.32854801416397095,
-0.31030482053756714,
0.16517095267772675,
0.3441133201122284,
-0.08104082942008972,
-0.17081692814826965,
0.3620074689388275,
0.13493822515010834,
-0.3155706524848938,
-0.483187198638916,
-0.2336716502904892,
0.2006833851337433,
0.24841168522834778,
0.2031097263097763,
-0.29827556014060974,
-0.043786294758319855,
-0.015571445226669312,
-0.3951827883720398,
-0.18221065402030945,
0.012125524692237377,
-0.37100130319595337,
-0.08007346838712692,
-0.21522283554077148,
0.42850443720817566,
-0.0043482109904289246,
-0.3384582996368408,
-0.19763851165771484,
-0.023247569799423218,
-0.32840123772621155,
-0.07837817072868347,
0.19338344037532806,
0.27338433265686035,
-0.3810252547264099,
-0.17183257639408112,
-0.25327128171920776,
0.0059721823781728745,
0.43542662262916565,
0.16144666075706482,
-0.400301992893219,
0.2875468134880066,
-0.1048993170261383,
-0.1292136162519455,
0.4984527826309204,
-0.03342467546463013,
-0.02098781429231167,
-0.058933693915605545,
0.1858072429895401,
0.17976787686347961,
0.04164860397577286,
0.07607409358024597,
0.25361526012420654,
-0.17432105541229248,
-0.37453457713127136,
0.5141633749008179,
0.0862223282456398,
-0.2672063112258911,
-0.03737865015864372,
-0.19525116682052612,
0.127914160490036,
0.0897817462682724,
-0.17021431028842926,
0.1609874963760376,
-0.031432390213012695,
0.28948959708213806,
-0.01775212585926056,
-0.2148415744304657,
0.12000255286693573,
-0.17493580281734467,
0.1473776400089264,
0.3941197991371155,
0.10859020054340363,
-0.3249778151512146,
-0.4225764572620392,
0.19136741757392883,
-0.29475119709968567,
-0.048047952353954315,
0.4472067952156067,
-0.4088855981826782,
-0.42648810148239136,
-0.18435214459896088,
-0.16452762484550476,
-0.18490277230739594,
0.007696550339460373,
0.5292387008666992,
0.09935623407363892,
-0.16958500444889069,
-0.1643252819776535,
0.11894523352384567,
-0.11815514415502548,
-0.01685984432697296,
-0.10559074580669403,
0.2538265883922577,
0.06435472518205643,
0.043581996113061905,
0.014084525406360626,
0.5441200137138367,
0.11635665595531464,
-0.07545939832925797,
0.15647071599960327,
0.12068819999694824,
0.03709932789206505,
0.08267436921596527,
0.14556558430194855,
0.10178032517433167,
0.11784649640321732,
0.11473014950752258,
0.40782490372657776,
0.008894800208508968,
0.34673553705215454,
-0.16888634860515594,
-0.46442535519599915,
0.13404852151870728,
0.23375241458415985,
0.03267773240804672,
0.06124529987573624,
-0.11393322050571442,
0.17010916769504547,
-0.1843966841697693,
-0.06123439967632294,
-0.11800284683704376,
-0.0761757493019104,
0.25104963779449463,
-0.08768953382968903,
0.334528386592865,
-0.2914966344833374,
0.1417699158191681,
0.14106589555740356,
-0.23460347950458527,
0.15247592329978943,
0.004516255110502243,
-0.22248074412345886,
-0.17693576216697693,
0.38323381543159485,
0.07585737109184265,
0.16442327201366425,
0.03784821927547455,
0.24313512444496155,
0.06948264688253403,
-0.11000020056962967,
0.0444389283657074,
0.21124035120010376,
-0.16738581657409668,
0.1849934160709381,
-0.23792153596878052,
0.1198144406080246,
0.16960056126117706,
0.08003304898738861,
-0.04127071052789688,
0.3497788906097412,
0.14140059053897858,
-0.17125102877616882,
0.20185911655426025,
-0.648192286491394,
-0.3009239733219147,
-0.35147663950920105,
-0.04370392486453056,
0.013978695496916771,
0.05452646315097809,
-0.1946786493062973,
0.04678668826818466,
0.13071835041046143,
0.1342969387769699,
0.11311247944831848,
0.4815165400505066,
-0.37665998935699463,
-0.1216217502951622,
0.0801854282617569,
-0.2995164096355438,
-0.33306625485420227,
0.006318248808383942,
0.41224613785743713,
0.3769201934337616,
0.5545412302017212,
0.08703909814357758,
0.02905522659420967,
-0.49862343072891235,
-0.2839492857456207,
0.20146606862545013,
0.09056282043457031,
-0.03976478427648544,
0.13270482420921326,
-0.04851329326629639,
-0.3301451802253723,
-0.3042159676551819,
0.15905198454856873,
0.09618061035871506,
0.18094037473201752,
-0.06008073315024376,
-0.4992722272872925,
0.12114257365465164,
-0.18762707710266113,
-0.12244173139333725,
-0.1508994996547699,
-0.1992623209953308,
0.2833753228187561,
0.05986308678984642,
0.07010431587696075,
0.33117374777793884,
-0.376975953578949,
0.23945297300815582,
-0.04505748301744461,
0.21341921389102936,
-0.33684924244880676,
-0.104684017598629,
0.29012712836265564,
-0.14677967131137848,
-0.18521754443645477,
-0.06468722224235535,
-0.33283162117004395,
0.10028433799743652,
0.5816043019294739,
-0.18992243707180023,
-0.4333091974258423,
-0.07092638313770294,
-0.19317710399627686,
0.3352116048336029,
0.20237523317337036,
0.17742234468460083,
-0.030275391414761543,
0.1482478678226471,
-0.02465643361210823,
-0.2292746752500534,
0.33471137285232544,
-0.06982337683439255,
0.21514858305454254,
0.3179880380630493,
0.13644731044769287,
0.14777857065200806,
0.4958413243293762,
0.1994638442993164,
-0.3975556790828705,
0.4418987035751343,
-0.07556065171957016,
0.2939330041408539,
0.09199315309524536,
-0.02757948450744152,
0.24892958998680115,
-0.12030652165412903,
0.09493755549192429,
0.19316241145133972,
0.044803015887737274,
0.02506822720170021,
-0.02833360619843006,
0.009235933423042297,
-0.003529861569404602,
-0.43637824058532715,
0.19964420795440674,
-0.15173451602458954,
0.5237364172935486,
0.13817690312862396,
-0.23557990789413452,
-0.37910667061805725,
0.049613866955041885,
0.19346749782562256,
0.1337408423423767,
0.07387711107730865,
0.16435833275318146,
-0.4970509111881256,
0.07581168413162231,
0.14062871038913727,
0.4142271876335144,
0.08560346812009811,
-0.022596031427383423,
0.17820388078689575,
0.031571000814437866,
0.09148339927196503,
0.09267103672027588,
-0.048134684562683105,
-0.2960969805717468,
0.007522869855165482,
0.12447856366634369,
-0.34748485684394836,
-0.26074281334877014,
0.05649897828698158,
-0.11450137197971344,
0.18130110204219818,
0.12085272371768951,
-0.008592471480369568,
-0.6265864372253418,
-0.08597712218761444,
0.4911961555480957,
0.33783507347106934,
-0.11739839613437653,
0.0225377157330513,
0.3983538746833801,
-0.16196081042289734,
-0.44265100359916687,
-0.14787599444389343,
-0.16742268204689026,
0.09007565677165985,
0.18079747259616852,
0.12001051008701324,
-0.32843735814094543,
0.22975343465805054,
0.3346863389015198,
0.12290102243423462,
0.42855504155158997,
0.21789507567882538,
0.08595697581768036,
0.09955942630767822,
0.006594952195882797,
0.04190746694803238,
0.45217016339302063,
-0.2863287329673767,
-0.4647591710090637,
-0.12306027859449387,
0.043988052755594254,
0.2652990520000458,
0.16089485585689545,
0.3431628346443176,
-0.08932628482580185,
-0.22272536158561707,
-0.5019599199295044,
-0.21451756358146667,
0.21093431115150452,
-0.041874296963214874,
-0.05498582869768143,
-0.35729169845581055,
-1.0777641534805298,
0.33569151163101196,
0.18096394836902618,
-0.09710437059402466,
0.1761043518781662,
0.13289359211921692,
-0.13495729863643646,
0.12479469180107117,
0.029526177793741226,
0.9321951270103455,
-0.17726118862628937,
0.23804815113544464,
0.366199254989624,
0.29658418893814087,
0.7135193943977356,
-0.14194554090499878,
-0.2076856642961502,
-0.3434433043003082,
0.21427565813064575,
0.049663104116916656,
-0.059583138674497604,
0.2961936295032501,
0.2053503841161728,
-0.1560036540031433,
0.2518340051174164,
0.20365582406520844,
0.4291248321533203,
0.1284230798482895,
0.22300311923027039,
-0.25042441487312317,
-0.31154757738113403,
-0.1322673261165619,
0.011568401008844376,
-0.3206801414489746,
0.037614621222019196,
-0.1738491952419281,
-0.003934793174266815,
0.01704448089003563,
0.15631477534770966,
-0.4413565993309021,
0.013680625706911087,
-0.2030920684337616,
0.019174152985215187,
-0.09730535745620728,
-0.4997606873512268,
0.471683531999588,
0.1864795833826065,
0.3057287931442261,
0.20795415341854095,
-0.18517157435417175,
0.0395435206592083,
-0.20622754096984863,
-0.08012598752975464,
-0.20036956667900085,
0.0007407795637845993,
0.2439539134502411,
0.010617479681968689,
-0.029810532927513123,
0.09815923869609833,
0.3809090852737427,
-0.021284403279423714,
-0.1528523862361908,
-0.24967442452907562,
0.39484310150146484,
-0.358550101518631,
-0.273802250623703,
0.27337732911109924,
0.018645871430635452,
-0.08117392659187317,
-0.02422163262963295,
0.3156312108039856,
-0.17835743725299835,
-0.074733667075634,
-0.19930632412433624,
0.13236811757087708,
-0.011883869767189026,
-0.3328547775745392,
0.3187776207923889,
-0.2915686070919037,
0.34012678265571594,
0.1281154304742813,
0.11227795481681824,
-0.05932382866740227,
0.0284578800201416,
0.27571901679039,
-0.40382105112075806,
-0.12673942744731903,
0.10866402089595795,
-0.23640096187591553,
0.08197230845689774,
0.17656509578227997,
-0.10157887637615204,
0.08402713388204575,
0.036007385700941086,
-0.2625139057636261,
-0.12779751420021057,
0.15536722540855408,
0.0030007027089595795,
0.3532755672931671,
0.04575534909963608,
-0.010079385712742805,
-0.177400603890419,
0.043594978749752045,
-0.17356309294700623,
0.17672643065452576,
0.16015300154685974,
0.18438072502613068,
0.20372091233730316,
0.05767747014760971,
-0.1015833392739296,
-0.10940031707286835,
-0.07875846326351166,
0.07012519240379333,
-0.1479988992214203,
-0.0097606610506773,
-0.5596268773078918,
0.2132185399532318,
0.057190001010894775,
-0.1296139806509018,
-0.037196073681116104,
-0.26456207036972046,
0.12837307155132294,
-0.3482802212238312,
0.22464193403720856,
-0.02936096303164959,
-0.04609552025794983,
0.1597708761692047,
0.5605438947677612,
-0.012761622667312622,
-0.29150235652923584,
0.009755069389939308,
0.1320859044790268,
0.4077635407447815,
0.4412093460559845,
0.06122017651796341,
-0.10387437790632248,
-0.12450402975082397,
-0.027141498401761055,
0.20847216248512268,
0.7594000697135925,
0.07025210559368134,
0.32138821482658386,
0.13916495442390442,
0.11811713874340057,
0.21129857003688812,
0.18489909172058105,
0.4557940363883972,
-0.0918237715959549,
0.277963787317276,
0.2086735963821411,
-0.007169777527451515,
-0.08957207947969437,
0.16095609962940216,
0.2544286251068115,
-0.18138431012630463,
-0.15001541376113892,
0.3750496804714203,
0.17494069039821625,
0.2845788300037384,
-0.14899079501628876,
-0.26457661390304565,
0.2097460776567459,
0.027486924082040787,
0.3904096782207489,
0.19392526149749756,
-0.012040417641401291,
-0.28257670998573303,
-0.04122461378574371,
0.40002381801605225,
0.288056343793869,
-0.4512830376625061,
0.2234056293964386,
0.25110864639282227,
0.18729358911514282,
0.18098777532577515,
0.5107916593551636,
-0.4333377778530121,
-0.040547069162130356,
0.4104093313217163,
0.3606263995170593,
0.2895864248275757,
-0.08490851521492004,
0.2871318757534027,
0.12327314913272858,
0.06525761634111404,
0.07934948056936264,
0.22524306178092957,
0.09827768802642822,
-0.07021710276603699,
-0.23903629183769226,
-0.24904018640518188,
-0.3212157189846039,
-0.05581589788198471,
-0.34825649857521057,
-0.16665607690811157,
-0.14578063786029816,
-0.05252009630203247,
-0.03415030241012573,
-0.42286819219589233,
0.05821701139211655,
0.15035167336463928,
-0.03188781440258026,
-0.0337354801595211,
0.18518145382404327,
0.12674537301063538,
-0.3633870482444763,
0.22551359236240387,
0.39720064401626587,
0.10976122319698334,
0.015224944800138474,
-0.006631398573517799,
0.2950599193572998,
-0.1489102691411972,
0.16321200132369995,
-0.13756582140922546,
0.0216868594288826,
0.1722293198108673,
-0.25958162546157837,
0.13580366969108582,
-0.07160305976867676,
0.05571647733449936,
-0.1894652396440506,
-0.012652423232793808,
-0.18542850017547607,
-0.43775421380996704,
0.6592112183570862,
0.23420602083206177,
-0.21068647503852844,
0.10655782371759415,
0.21380461752414703,
-0.1598932445049286,
-0.34995442628860474,
0.4518505334854126,
0.36533793807029724,
-0.034741632640361786,
-0.22071726620197296,
-0.001092284917831421,
0.19044122099876404,
0.21386916935443878,
0.07751499861478806,
-0.10511714965105057,
-0.08657482266426086,
-0.26254573464393616,
-0.7192500829696655,
0.22764047980308533,
-0.17335635423660278,
-0.69222092628479,
0.262271523475647,
-0.1413421928882599,
0.3419550657272339,
0.10141392052173615,
-0.29398661851882935,
-0.03489365056157112,
0.05521400272846222,
-0.23138904571533203,
-0.17378418147563934,
-0.4438752233982086,
0.025859568268060684,
0.05151540786027908,
-0.10293711721897125,
-0.24710014462471008,
-0.07379066944122314,
0.07143007218837738,
-0.1363348811864853,
0.03530976176261902,
-0.19819627702236176,
0.11845940351486206,
-0.47535547614097595,
0.11288797110319138,
0.1332099586725235,
0.2694586515426636,
0.18839341402053833,
-0.06590107083320618,
-0.24413642287254333,
0.05537562444806099,
-0.1352275162935257,
0.2859683334827423,
-0.1012534499168396,
0.04796718806028366,
-0.5305737257003784,
0.006874650716781616,
-0.2922247052192688,
-0.17010116577148438,
-0.00794484093785286,
0.07040596008300781,
-0.13264982402324677,
0.1036820262670517,
-0.34545397758483887,
-0.05998264625668526,
0.3603959083557129,
0.5799033641815186,
-0.23216497898101807,
0.022356485947966576,
-0.15164855122566223,
0.19397510588169098,
0.3261488080024719,
-0.23401641845703125,
-0.41630083322525024,
-0.06220649555325508,
0.04328039288520813,
-0.25084930658340454,
0.031581319868564606,
-0.5333890318870544,
0.03381652384996414,
0.26315149664878845,
-0.020953122526407242,
-0.10018885135650635,
-0.02991676703095436,
0.2262377291917801,
-0.20826569199562073,
-0.16141149401664734,
0.44233980774879456,
0.07936987280845642,
-0.07374346256256104,
0.010791648179292679,
-0.16598296165466309
] |
https://github.com/huggingface/datasets/issues/433 | How to reuse functionality of a (generic) dataset? | Hi! You can either copy&paste the builder script and import the builder from there or use `datasets.load_dataset_builder` inside the script and call the methods of the returned builder object. | I have written a generic dataset for corpora created with the Brat annotation tool ([specification](https://brat.nlplab.org/standoff.html), [dataset code](https://github.com/ArneBinder/nlp/blob/brat/datasets/brat/brat.py)). Now I wonder how to use that to create specific dataset instances. What's the recommended way to reuse formats and loading functionality for datasets with a common format?
In my case, it took a bit of time to create the Brat dataset and I think others would appreciate to not have to think about that again. Also, I assume there are other formats (e.g. conll) that are widely used, so having this would really ease dataset onboarding and adoption of the library. | 29 | How to reuse functionality of a (generic) dataset?
I have written a generic dataset for corpora created with the Brat annotation tool ([specification](https://brat.nlplab.org/standoff.html), [dataset code](https://github.com/ArneBinder/nlp/blob/brat/datasets/brat/brat.py)). Now I wonder how to use that to create specific dataset instances. What's the recommended way to reuse formats and loading functionality for datasets with a common format?
In my case, it took a bit of time to create the Brat dataset and I think others would appreciate to not have to think about that again. Also, I assume there are other formats (e.g. conll) that are widely used, so having this would really ease dataset onboarding and adoption of the library.
Hi! You can either copy&paste the builder script and import the builder from there or use `datasets.load_dataset_builder` inside the script and call the methods of the returned builder object. | [
-0.28013521432876587,
-0.09497229754924774,
0.13240866363048553,
0.39847642183303833,
0.22174802422523499,
-0.013262074440717697,
0.22299864888191223,
0.14316239953041077,
-0.16988778114318848,
-0.14578209817409515,
-0.155150905251503,
0.3392961025238037,
-0.05478151887655258,
0.5168238878250122,
0.16225972771644592,
-0.11184853315353394,
-0.1966504454612732,
0.26084503531455994,
-0.1310809999704361,
0.024338766932487488,
0.05181252211332321,
-0.2744119465351105,
0.030127927660942078,
-0.06306077539920807,
-0.4111999571323395,
0.1204286515712738,
-0.1899484395980835,
-0.08527088910341263,
0.2246832400560379,
-0.22077630460262299,
0.506513774394989,
0.38757532835006714,
0.486438125371933,
0.26236692070961,
-0.00012531464744824916,
0.028698772192001343,
-0.026829220354557037,
-0.12642353773117065,
-0.30138540267944336,
-0.0976201742887497,
-0.18975284695625305,
-0.2118767350912094,
0.06031769514083862,
-0.26657313108444214,
-0.36211147904396057,
-0.37767213582992554,
0.14541472494602203,
-0.5109441876411438,
0.3918161392211914,
-0.06565579026937485,
0.03601448982954025,
-0.047935985028743744,
-0.16179582476615906,
-0.14332540333271027,
-0.1820141077041626,
0.4197579026222229,
-0.05984313786029816,
0.3265548050403595,
0.6726402044296265,
0.3668701648712158,
0.11686453223228455,
0.04054715111851692,
0.1335849016904831,
0.09504954516887665,
0.3392446041107178,
-0.15898747742176056,
0.03401613235473633,
0.035574499517679214,
0.184119313955307,
0.3449784815311432,
0.9952614903450012,
-0.35988444089889526,
-0.07310321927070618,
-0.05078575015068054,
-0.014918810687959194,
-0.18930044770240784,
-0.3050266206264496,
0.155707448720932,
0.16417540609836578,
0.12748807668685913,
-0.29567641019821167,
-0.4189164340496063,
-0.3045862317085266,
0.09240797907114029,
0.23193353414535522,
0.05949607491493225,
-0.10230059176683426,
0.2731016278266907,
-0.22407658398151398,
-0.10083699226379395,
0.16098937392234802,
-0.3044755458831787,
-0.1730192005634308,
0.03735402971506119,
0.14377307891845703,
-0.15308554470539093,
-0.3416467308998108,
0.19551575183868408,
0.3074812591075897,
0.37788766622543335,
0.2080138623714447,
0.2759382724761963,
-0.3186193108558655,
0.04943552985787392,
0.3926047086715698,
0.047573331743478775,
0.389787882566452,
0.3505229949951172,
0.11842331290245056,
0.2164546102285385,
-0.4895581603050232,
-0.2105671465396881,
-0.4993734657764435,
0.4035284221172333,
0.3283872902393341,
-0.04990635812282562,
0.05693313479423523,
-0.23173601925373077,
0.025356853380799294,
-0.04254026710987091,
-0.28817296028137207,
-0.1889222264289856,
0.23920395970344543,
0.0949840098619461,
-0.13334231078624725,
0.1410885900259018,
-0.09572383761405945,
0.2883909344673157,
-0.04885106533765793,
-0.40411436557769775,
0.03487705439329147,
0.07067251205444336,
-0.3411778509616852,
0.09472166001796722,
0.27924615144729614,
-0.4039538502693176,
0.1574389636516571,
0.32286152243614197,
-0.13798443973064423,
-0.13032875955104828,
0.42976081371307373,
0.11344030499458313,
-0.2388041615486145,
-0.5073899030685425,
-0.13020414113998413,
0.08075558394193649,
0.1854667216539383,
0.08755482733249664,
-0.3291829228401184,
0.09035149961709976,
-0.06689184159040451,
-0.36536356806755066,
-0.18938606977462769,
0.007866570726037025,
-0.29721248149871826,
0.06401681900024414,
-0.017529308795928955,
0.37821415066719055,
0.03515434265136719,
-0.3327140808105469,
-0.23399314284324646,
-0.1511419266462326,
-0.24660366773605347,
-0.08830317109823227,
0.15621930360794067,
0.2053118646144867,
-0.5970261693000793,
-0.014047056436538696,
-0.18462342023849487,
0.02163587138056755,
0.38101646304130554,
0.12606458365917206,
-0.454287588596344,
0.30762535333633423,
-0.11468103528022766,
-0.25426214933395386,
0.5457897186279297,
-0.050634097307920456,
0.03200847655534744,
-0.13717293739318848,
0.26268529891967773,
0.12191744893789291,
0.025491178035736084,
0.09545139968395233,
0.1603778451681137,
-0.2546556293964386,
-0.3752708435058594,
0.4482797384262085,
0.032753609120845795,
-0.2512800693511963,
-0.016898151487112045,
-0.21870718896389008,
0.13903337717056274,
0.01895219460129738,
-0.118613600730896,
0.12968319654464722,
0.0715550109744072,
0.2755039930343628,
-0.009238548576831818,
-0.324697881937027,
0.1283651441335678,
-0.22764943540096283,
0.00693994015455246,
0.3063449263572693,
0.12024514377117157,
-0.28483885526657104,
-0.48817670345306396,
0.20752739906311035,
-0.3080114722251892,
-0.25882065296173096,
0.482194185256958,
-0.45528286695480347,
-0.33084890246391296,
-0.1633494645357132,
-0.18505407869815826,
-0.02211468666791916,
0.006700731813907623,
0.5233027935028076,
0.07321935892105103,
-0.15446646511554718,
-0.12082050740718842,
-0.028770366683602333,
-0.0843474417924881,
-0.02958015166223049,
-0.04960138723254204,
0.2525206208229065,
0.10141143202781677,
-0.021308429539203644,
0.04543670266866684,
0.4885171055793762,
0.025978926569223404,
-0.010496063157916069,
0.13153328001499176,
0.2133263349533081,
0.08625759184360504,
0.1381383240222931,
0.10091577470302582,
0.11861345916986465,
0.087697833776474,
0.17204315960407257,
0.5188742280006409,
-0.04163883253931999,
0.31417936086654663,
-0.14235815405845642,
-0.39182379841804504,
0.24290047585964203,
0.11495630443096161,
0.005322463810443878,
0.09062424302101135,
-0.05791954696178436,
0.12923109531402588,
-0.10125448554754257,
-0.12220925837755203,
-0.11664751172065735,
-0.20695142447948456,
0.16255293786525726,
-0.06686873733997345,
0.3303419351577759,
-0.32755395770072937,
0.010043330490589142,
0.2830691337585449,
-0.18570424616336823,
0.21415236592292786,
-0.14317655563354492,
-0.20480161905288696,
-0.063563272356987,
0.3287598490715027,
-0.17407314479351044,
0.040499359369277954,
0.015522734262049198,
0.24649374186992645,
0.009514903649687767,
-0.07474144548177719,
0.08802049607038498,
0.30105048418045044,
-0.18670348823070526,
0.1544114500284195,
-0.20638540387153625,
0.07895351201295853,
0.06253043562173843,
0.06700929254293442,
-0.026051457971334457,
0.2555711567401886,
0.04415681213140488,
-0.09004701673984528,
0.16525480151176453,
-0.6548405885696411,
-0.2956273555755615,
-0.34516409039497375,
0.03804008290171623,
0.03208917751908302,
0.02168925292789936,
-0.29809558391571045,
0.062202900648117065,
0.13505689799785614,
0.15338361263275146,
0.09555576741695404,
0.47724461555480957,
-0.2958798110485077,
-0.03534410893917084,
0.09228593111038208,
-0.3432382047176361,
-0.40898406505584717,
0.025083091109991074,
0.47942066192626953,
0.37717771530151367,
0.4718394875526428,
-0.013312775641679764,
0.15637464821338654,
-0.47731438279151917,
-0.24326124787330627,
0.2406684160232544,
0.255722314119339,
-0.029026003554463387,
0.2382575422525406,
-0.008893497288227081,
-0.29310256242752075,
-0.2700704038143158,
0.17523853480815887,
0.1317066252231598,
0.27582627534866333,
-0.06924024969339371,
-0.5298996567726135,
0.07004410773515701,
-0.13981562852859497,
0.01973867416381836,
-0.03683227300643921,
-0.21368150413036346,
0.14259837567806244,
0.06378045678138733,
-0.0031777843832969666,
0.31337469816207886,
-0.2672167718410492,
0.20510828495025635,
-0.09901504218578339,
0.3285031020641327,
-0.2494267374277115,
-0.23965658247470856,
0.29360049962997437,
-0.1407686471939087,
-0.13465288281440735,
-0.09854287654161453,
-0.36357033252716064,
0.2217913419008255,
0.5131548047065735,
-0.18649908900260925,
-0.3346465229988098,
-0.08876869082450867,
-0.20019042491912842,
0.3166039288043976,
0.3029995262622833,
0.059539709240198135,
0.08215151727199554,
0.18195602297782898,
-0.02134057506918907,
-0.0971158891916275,
0.22592240571975708,
-0.09497448056936264,
0.2006891369819641,
0.453555166721344,
0.04457911103963852,
0.20978064835071564,
0.3018530607223511,
0.24156689643859863,
-0.49287810921669006,
0.4331178069114685,
-0.0849352478981018,
0.4137030839920044,
0.009032964706420898,
0.032581329345703125,
0.2485482394695282,
-0.07541319727897644,
0.04556635767221451,
0.24116522073745728,
0.010069375857710838,
0.13285958766937256,
-0.15590810775756836,
0.09157530963420868,
-0.0159505233168602,
-0.5039148926734924,
0.1425502747297287,
-0.34844550490379333,
0.5106571912765503,
0.2125331312417984,
-0.0948827713727951,
-0.3406812250614166,
0.06927254050970078,
0.21338246762752533,
0.026242323219776154,
0.16192874312400818,
0.06403126567602158,
-0.37308943271636963,
0.061855826526880264,
0.14533334970474243,
0.5345433354377747,
0.06915285438299179,
-0.07236140966415405,
0.23842228949069977,
0.020561862736940384,
0.01804477721452713,
0.09329146891832352,
-0.10159866511821747,
-0.3856438398361206,
0.02612299472093582,
0.06622819602489471,
-0.19176554679870605,
-0.305034339427948,
-0.011544495820999146,
-0.12325763702392578,
0.29873958230018616,
0.040038641542196274,
0.08367785066366196,
-0.5233169198036194,
-0.09489632397890091,
0.3493455648422241,
0.4564093351364136,
-0.12606385350227356,
0.12874716520309448,
0.26138854026794434,
-0.09614372253417969,
-0.35246750712394714,
-0.11439547687768936,
-0.260483980178833,
0.07576820999383926,
0.1354151964187622,
0.03660134598612785,
-0.4199781119823456,
0.21525675058364868,
0.3270590901374817,
0.2150082290172577,
0.5426469445228577,
0.12079395353794098,
0.10529492795467377,
0.11506754159927368,
0.03221122920513153,
0.11890298873186111,
0.44716671109199524,
-0.19599641859531403,
-0.4515625238418579,
-0.12773865461349487,
-0.02913374826312065,
0.3809063136577606,
0.1159609779715538,
0.22362957894802094,
-0.24341154098510742,
-0.20463164150714874,
-0.2781512141227722,
-0.2332451343536377,
0.22786945104599,
-0.0471799373626709,
0.013911246322095394,
-0.48501622676849365,
-0.9791975021362305,
0.09629989415407181,
0.22208097577095032,
0.006416678428649902,
0.20926150679588318,
-0.0027447789907455444,
-0.04594630002975464,
0.08833874017000198,
0.20706498622894287,
0.8367087244987488,
-0.19756923615932465,
0.19197002053260803,
0.3016679883003235,
0.3024636507034302,
0.6083177328109741,
-0.14131642878055573,
-0.2770988941192627,
-0.38837316632270813,
0.05175560340285301,
0.005971940234303474,
-0.07697737216949463,
0.4456149637699127,
0.2525065541267395,
-0.19663435220718384,
0.37868595123291016,
0.1969413012266159,
0.4424440860748291,
0.06849924474954605,
0.15701480209827423,
-0.4428722560405731,
-0.21865926682949066,
0.07758423686027527,
-0.037679944187402725,
-0.30590927600860596,
-0.06216346099972725,
-0.2482873499393463,
0.16972582042217255,
0.2475321888923645,
0.08588778972625732,
-0.3191755414009094,
-0.051432423293590546,
-0.15929172933101654,
-0.015482772141695023,
-0.09883418679237366,
-0.40416663885116577,
0.4960242807865143,
0.37621408700942993,
0.33764219284057617,
0.3270135223865509,
-0.08721622824668884,
0.07977861911058426,
-0.10267273336648941,
0.000601755571551621,
-0.2182619571685791,
0.03026370331645012,
0.26520583033561707,
0.1013796254992485,
-0.08170446753501892,
0.15223491191864014,
0.3445131182670593,
0.1412263810634613,
-0.16356946527957916,
-0.258266806602478,
0.3328375220298767,
-0.33038005232810974,
-0.23716074228286743,
0.08659382909536362,
-0.00396386906504631,
0.0012633949518203735,
-0.02951154112815857,
0.21502859890460968,
-0.08917094767093658,
0.1253410428762436,
-0.1440596878528595,
0.11885860562324524,
0.03167664259672165,
-0.33987197279930115,
0.3151897192001343,
-0.22161446511745453,
0.3021986186504364,
0.08885215222835541,
0.07416974753141403,
-0.11378110200166702,
0.11633547395467758,
0.1974310427904129,
-0.2980361580848694,
-0.022640831768512726,
-0.00002820882946252823,
-0.2108667492866516,
0.11916960775852203,
0.27543410658836365,
-0.1826392114162445,
0.08203468471765518,
0.012814052402973175,
-0.19063147902488708,
-0.06697025150060654,
0.1970396190881729,
0.14012488722801208,
0.38556748628616333,
0.031094662845134735,
-0.005341941490769386,
-0.2531791627407074,
-0.08908522874116898,
-0.16720810532569885,
0.20955637097358704,
0.214387446641922,
0.25746506452560425,
-0.1422101855278015,
0.0693039670586586,
-0.18048545718193054,
-0.05156635493040085,
-0.035196319222450256,
0.06553392112255096,
-0.13815444707870483,
-0.01810089871287346,
-0.46729451417922974,
0.20704558491706848,
0.005865713581442833,
-0.21326549351215363,
0.007337314076721668,
-0.34409618377685547,
0.027296841144561768,
-0.4494413435459137,
0.18998774886131287,
0.010242804884910583,
-0.13975094258785248,
0.1581697165966034,
0.502582848072052,
0.04246431961655617,
-0.23980627954006195,
-0.014001060277223587,
0.12446150183677673,
0.45993757247924805,
0.405779093503952,
0.13380973041057587,
-0.12470274418592453,
-0.17321747541427612,
0.030817965045571327,
0.2716541588306427,
0.8114556074142456,
0.0010359995067119598,
0.33046725392341614,
0.13598309457302094,
0.05984994396567345,
0.16921564936637878,
0.38864991068840027,
0.45904773473739624,
-0.08207595348358154,
0.24552731215953827,
0.2848110496997833,
0.010778268799185753,
-0.12091813236474991,
0.0836048424243927,
0.18732964992523193,
-0.16395507752895355,
-0.13425128161907196,
0.32831406593322754,
0.15221522748470306,
0.24671801924705505,
-0.16970424354076385,
-0.32932257652282715,
0.1425931453704834,
-0.05137381702661514,
0.43087491393089294,
0.3315625488758087,
0.004290886223316193,
-0.3194936215877533,
0.022179508581757545,
0.3505856394767761,
0.2321668565273285,
-0.37270843982696533,
0.21522092819213867,
0.22172392904758453,
0.1435772031545639,
0.19433537125587463,
0.4390272796154022,
-0.5201071500778198,
0.11554338037967682,
0.3712537884712219,
0.2598448395729065,
0.2796277403831482,
-0.08411064743995667,
0.1887378990650177,
0.13332338631153107,
0.06637981534004211,
-0.12604035437107086,
0.13131719827651978,
-0.027918286621570587,
-0.17313817143440247,
-0.2650969624519348,
-0.3338896334171295,
-0.26125895977020264,
0.03320692107081413,
-0.2928087115287781,
0.014506816864013672,
-0.30255579948425293,
-0.008664287626743317,
0.1323014199733734,
-0.4239392876625061,
0.17941027879714966,
0.0712541788816452,
0.04763883352279663,
-0.056537263095378876,
0.1763417273759842,
0.2736019790172577,
-0.2583206295967102,
0.24271917343139648,
0.3629409968852997,
0.18800599873065948,
0.0026672091335058212,
-0.12554582953453064,
0.21693195402622223,
-0.24498029053211212,
0.11833387613296509,
-0.19200639426708221,
0.03859192878007889,
0.1232864260673523,
-0.26979875564575195,
0.22984591126441956,
-0.02939915843307972,
0.07553695887327194,
-0.09603585302829742,
-0.13491813838481903,
-0.2400578260421753,
-0.5413768291473389,
0.4850631356239319,
0.28932175040245056,
-0.24036961793899536,
0.2032352238893509,
0.1489904522895813,
-0.19020581245422363,
-0.4225594103336334,
0.4130672514438629,
0.2881285548210144,
-0.010580558329820633,
-0.22512586414813995,
-0.0009003356099128723,
0.15941444039344788,
0.2417450100183487,
0.08154062181711197,
-0.0717720314860344,
-0.016996391117572784,
-0.30979815125465393,
-0.7250144481658936,
0.22703135013580322,
-0.12311393022537231,
-0.5048967599868774,
0.22668218612670898,
-0.14349766075611115,
0.255411833524704,
0.1525622010231018,
-0.14129720628261566,
0.022981813177466393,
0.17989978194236755,
-0.16665269434452057,
-0.08447712659835815,
-0.5637942552566528,
-0.014629870653152466,
-0.06017809361219406,
-0.18945175409317017,
-0.4054344892501831,
-0.07954998314380646,
-0.05521443486213684,
-0.13374921679496765,
-0.015889450907707214,
-0.1966392993927002,
0.19886372983455658,
-0.40653759241104126,
0.11177084594964981,
0.07498499751091003,
0.32928144931793213,
0.20654767751693726,
-0.03188212588429451,
-0.16577130556106567,
0.13473285734653473,
0.003944093361496925,
0.3235667645931244,
-0.09554848074913025,
0.06502540409564972,
-0.5660091042518616,
0.005304910242557526,
-0.3064752221107483,
-0.21068736910820007,
0.05502618849277496,
0.17278043925762177,
-0.16750749945640564,
-0.013357494957745075,
-0.400514155626297,
-0.08199154585599899,
0.28267475962638855,
0.6101135611534119,
-0.2211608588695526,
0.05583496391773224,
-0.1039121001958847,
0.2732238173484802,
0.35379332304000854,
-0.12358782440423965,
-0.4734109342098236,
-0.2006150633096695,
0.03657028079032898,
-0.30544525384902954,
0.018514536321163177,
-0.3491242527961731,
0.1081397607922554,
0.258536159992218,
-0.0565422922372818,
-0.07802978903055191,
-0.07432995736598969,
0.2601816654205322,
-0.11275112628936768,
-0.19186648726463318,
0.44748374819755554,
0.0830094963312149,
-0.13847820460796356,
-0.0748266726732254,
-0.12110275775194168
] |
https://github.com/huggingface/datasets/issues/426 | [FEATURE REQUEST] Multiprocessing with for dataset.map, dataset.filter | Yes, that would be nice. We could take a look at what tensorflow `tf.data` does under the hood for instance. | It would be nice to be able to speed up `dataset.map` or `dataset.filter`. Perhaps this is as easy as sharding the dataset sending each shard to a process/thread/dask pool and using the new `nlp.concatenate_dataset()` function to join them all together? | 20 | [FEATURE REQUEST] Multiprocessing with for dataset.map, dataset.filter
It would be nice to be able to speed up `dataset.map` or `dataset.filter`. Perhaps this is as easy as sharding the dataset sending each shard to a process/thread/dask pool and using the new `nlp.concatenate_dataset()` function to join them all together?
Yes, that would be nice. We could take a look at what tensorflow `tf.data` does under the hood for instance. | [
-0.2759441137313843,
-0.2842457890510559,
-0.20223022997379303,
-0.11666218936443329,
-0.269184947013855,
0.10101339966058731,
0.23259404301643372,
0.3550625443458557,
-0.016504675149917603,
0.061669304966926575,
-0.14451350271701813,
0.3324522078037262,
-0.13535116612911224,
0.41155803203582764,
0.013081842102110386,
-0.26618123054504395,
0.01758137345314026,
0.10324840247631073,
-0.12816843390464783,
0.10988976061344147,
0.07626678794622421,
-0.06554603576660156,
-0.11530806124210358,
-0.09268458187580109,
-0.1322973668575287,
-0.1024552658200264,
-0.09757116436958313,
-0.20206663012504578,
0.18253111839294434,
-0.05919651687145233,
0.08191926777362823,
0.43625614047050476,
-0.19553212821483612,
0.3209603428840637,
-0.00010351854871260002,
-0.033052489161491394,
0.023035187274217606,
0.1411822885274887,
0.055477458983659744,
0.1950990855693817,
-0.24072647094726562,
-0.34963393211364746,
0.015476295724511147,
-0.24468475580215454,
0.11410864442586899,
0.14492976665496826,
0.2296798974275589,
-0.2520434260368347,
0.1510990411043167,
-0.1482696384191513,
0.1650044173002243,
0.3244563043117523,
-0.10134175419807434,
0.35490894317626953,
-0.11608951538801193,
0.28812021017074585,
-0.1332562267780304,
-0.273955374956131,
0.43003037571907043,
-0.16586260497570038,
-0.1933044195175171,
0.4834127426147461,
-0.20489494502544403,
0.184104785323143,
0.18683916330337524,
-0.06592411547899246,
0.07732755690813065,
-0.4097810685634613,
-0.18180635571479797,
0.40872591733932495,
-0.06758860498666763,
-0.23071810603141785,
-0.4504500925540924,
-0.278904527425766,
-0.1264074742794037,
-0.4070107042789459,
-0.22713038325309753,
0.08587299287319183,
-0.2099243551492691,
-0.02331097051501274,
-0.41208013892173767,
-0.31141048669815063,
0.19978278875350952,
-0.08125321567058563,
0.16165606677532196,
0.36139240860939026,
0.2724669277667999,
0.1311333179473877,
0.19193704426288605,
-0.196930930018425,
-0.05646656081080437,
-0.25377359986305237,
0.31104806065559387,
0.006675303913652897,
-0.6924260854721069,
-0.18429335951805115,
0.016712799668312073,
-0.2867715060710907,
-0.03928101062774658,
-0.07068894803524017,
0.15345928072929382,
0.3635830283164978,
0.0018449220806360245,
0.2756718397140503,
0.009638186544179916,
-0.37592753767967224,
0.06305895745754242,
-0.012532941997051239,
0.13329380750656128,
-0.41870149970054626,
-0.23085397481918335,
0.29321959614753723,
0.12677760422229767,
-0.08347788453102112,
-0.27175766229629517,
0.04740123450756073,
-0.09809564054012299,
0.26262322068214417,
0.049214497208595276,
-0.40004265308380127,
0.0890793427824974,
-0.1915702223777771,
0.18279597163200378,
-0.036447443068027496,
-0.07010167092084885,
0.3581658601760864,
-0.162525475025177,
-0.2483626753091812,
-0.1925838589668274,
-0.1561347395181656,
-0.07636234164237976,
-0.006903495639562607,
0.06262966990470886,
0.13615314662456512,
0.15718692541122437,
0.1219407320022583,
-0.19670870900154114,
0.04796065017580986,
0.13933247327804565,
0.304791659116745,
0.32257288694381714,
-0.12546566128730774,
0.03924908861517906,
0.17078332602977753,
-0.13733306527137756,
-0.10199123620986938,
-0.14540347456932068,
0.08597180247306824,
-0.32197996973991394,
-0.044781699776649475,
-0.35925623774528503,
-0.2022033929824829,
-0.07830103486776352,
0.15228204429149628,
0.1580561250448227,
-0.08345700055360794,
-0.23922383785247803,
0.7270877361297607,
0.12217450886964798,
-0.013926403596997261,
-0.3829064667224884,
-0.11735701560974121,
-0.5056692361831665,
-0.22129374742507935,
0.34030112624168396,
-0.007171139121055603,
-0.09253942966461182,
-0.02443903312087059,
-0.21030154824256897,
-0.03645602986216545,
0.20229610800743103,
0.34313085675239563,
-0.1650478094816208,
0.2029750943183899,
-0.016110971570014954,
0.4196079969406128,
0.5856342911720276,
-0.13465304672718048,
0.13609108328819275,
0.3772716522216797,
-0.17533287405967712,
0.051908060908317566,
0.23914295434951782,
0.18406732380390167,
0.15065345168113708,
-0.12630881369113922,
0.1601603925228119,
0.4892566204071045,
-0.31310129165649414,
0.25839725136756897,
0.056852031499147415,
-0.2214285135269165,
0.1675422191619873,
0.16373202204704285,
0.06583742797374725,
0.0036603212356567383,
-0.1034325584769249,
-0.32040882110595703,
0.31902357935905457,
-0.31288954615592957,
0.05692107975482941,
0.048336371779441833,
-0.10538993775844574,
-0.034855082631111145,
-0.12590433657169342,
-0.34791091084480286,
-0.3173062205314636,
0.10933899134397507,
0.0865776538848877,
-0.06700869649648666,
0.15339237451553345,
-0.3714466094970703,
0.4874793291091919,
0.12219401448965073,
0.17557388544082642,
0.23964324593544006,
0.18018925189971924,
0.23717643320560455,
0.08780248463153839,
-0.23538391292095184,
-0.28517818450927734,
0.10881108790636063,
-0.13837389647960663,
-0.14279700815677643,
-0.10611298680305481,
0.24675895273685455,
0.2857477068901062,
-0.1014980673789978,
-0.021430689841508865,
0.1331702172756195,
-0.15474432706832886,
-0.1268596053123474,
0.15781304240226746,
-0.022740066051483154,
-0.07295678555965424,
0.366909921169281,
0.4954008162021637,
0.5253913998603821,
0.18018484115600586,
0.10836166143417358,
-0.1301071047782898,
-0.2087198942899704,
-0.14308863878250122,
-0.20541322231292725,
-0.14462867379188538,
0.4666016101837158,
-0.06685644388198853,
0.3619410991668701,
0.16258874535560608,
-0.014664050191640854,
0.2380342185497284,
0.054920267313718796,
-0.07700511068105698,
0.23333460092544556,
0.0734032467007637,
-0.10576456785202026,
-0.039708707481622696,
0.18771840631961823,
-0.44256535172462463,
0.32635125517845154,
0.5805603861808777,
0.10857506096363068,
-0.03624175488948822,
0.13268575072288513,
0.23283031582832336,
-0.0102921761572361,
0.11810191720724106,
0.13482117652893066,
0.16477198898792267,
0.1919316053390503,
0.12337632477283478,
-0.09267840534448624,
-0.01402862835675478,
0.007535386830568314,
0.15097667276859283,
0.22679896652698517,
0.2975916862487793,
0.07327676564455032,
0.07103466987609863,
-0.1913863569498062,
-0.11671394854784012,
-0.38448774814605713,
0.24228402972221375,
0.03362458571791649,
0.022234398871660233,
-0.07533403486013412,
-0.2187245786190033,
-0.08396574854850769,
0.020021988078951836,
0.15647529065608978,
-0.10848690569400787,
-0.27962034940719604,
0.03757910430431366,
0.21103723347187042,
-0.1723945289850235,
0.16399575769901276,
0.15172317624092102,
0.12166011333465576,
-0.07952594012022018,
-0.044430576264858246,
-0.17311622202396393,
-0.11280014365911484,
0.1154029443860054,
0.07808713614940643,
0.3604660928249359,
0.20933395624160767,
0.41503772139549255,
0.22971440851688385,
0.10161979496479034,
-0.3085978031158447,
-0.30131715536117554,
-0.06057315319776535,
-0.2326073795557022,
0.07069197297096252,
-0.01972581446170807,
0.014011628925800323,
-0.20786888897418976,
-0.42406919598579407,
0.13497574627399445,
0.12339863181114197,
-0.11079194396734238,
-0.1494639813899994,
0.05580301210284233,
0.0630636140704155,
-0.07423767447471619,
-0.20532068610191345,
-0.5143827199935913,
-0.4376354515552521,
0.3669537305831909,
-0.3244442343711853,
0.34976625442504883,
-0.1991967111825943,
0.024094875901937485,
-0.009648974984884262,
-0.17411285638809204,
0.08378054946660995,
0.15516245365142822,
-0.41784003376960754,
0.11653566360473633,
-0.07669562101364136,
-0.11691360175609589,
-0.340913325548172,
-0.03338790684938431,
0.07159750908613205,
0.46414822340011597,
-0.21371139585971832,
-0.05857371166348457,
-0.22735057771205902,
0.1493423879146576,
0.16505631804466248,
-0.08180732280015945,
0.10734833776950836,
-0.01589018665254116,
-0.11213834583759308,
0.07741986960172653,
-0.1644623875617981,
0.05168949440121651,
-0.061481229960918427,
-0.2959737479686737,
0.2579021751880646,
0.3612658977508545,
0.12350098788738251,
0.7081290483474731,
0.11436416208744049,
-0.231882706284523,
-0.040828995406627655,
0.07273822277784348,
-0.2688436806201935,
0.20384082198143005,
-0.4948343336582184,
-0.07088028639554977,
-0.1688319444656372,
0.10851140320301056,
0.09316251426935196,
-0.10847333818674088,
-0.4197063148021698,
-0.03433385491371155,
0.2127261608839035,
-0.18201687932014465,
-0.17308995127677917,
0.28907957673072815,
-0.30162495374679565,
0.30597934126853943,
0.04044667258858681,
-0.28217485547065735,
-0.4290570020675659,
0.07588119804859161,
-0.15357057750225067,
0.00013127177953720093,
0.275085985660553,
-0.18267720937728882,
-0.394254207611084,
-0.2149474173784256,
-0.49032866954803467,
0.33384135365486145,
0.1873452365398407,
0.10521770268678665,
-0.017546918243169785,
0.027264580130577087,
-0.05341792106628418,
-0.15338730812072754,
0.57955402135849,
-0.3685051500797272,
-0.28506410121917725,
0.25379666686058044,
-0.48968660831451416,
-0.019686255604028702,
0.22280551493167877,
-0.025972912088036537,
0.4166383147239685,
0.33370479941368103,
0.4109073281288147,
-0.23765593767166138,
-0.4871218204498291,
0.15589305758476257,
0.021949663758277893,
-0.07201272249221802,
0.02668173238635063,
-0.025353053584694862,
-0.04491831362247467,
-0.11768217384815216,
-0.009769119322299957,
-0.06590013951063156,
-0.028060251846909523,
-0.018759744241833687,
-0.18685400485992432,
-0.16463248431682587,
0.05367682874202728,
0.3366566300392151,
0.021582648158073425,
-0.14567753672599792,
0.34553447365760803,
0.2921147346496582,
-0.2915528118610382,
0.11417275667190552,
-0.08748125284910202,
-0.10142241418361664,
-0.18535186350345612,
-0.1297590732574463,
-0.031321655958890915,
-0.03686467185616493,
0.5222085118293762,
0.09309296309947968,
0.1535840779542923,
0.3920102119445801,
-0.10964572429656982,
0.4256868362426758,
-0.24883762001991272,
0.16633553802967072,
0.3916356563568115,
0.2579730153083801,
-0.2799409031867981,
-0.36900338530540466,
0.22463619709014893,
0.27878108620643616,
0.020580239593982697,
0.5443373322486877,
-0.2962470054626465,
-0.020333612337708473,
0.207571342587471,
0.08248572796583176,
0.5658165216445923,
-0.3810482621192932,
0.02084488607943058,
-0.27612969279289246,
0.19979523122310638,
0.4320574104785919,
-0.47966164350509644,
0.19673502445220947,
0.06663738191127777,
-0.31535041332244873,
0.06373091787099838,
-0.00582624226808548,
0.11731307208538055,
0.4264534115791321,
-0.19518250226974487,
0.07366827130317688,
0.31781965494155884,
-0.036403838545084,
-0.08255144953727722,
0.4622341990470886,
0.27711760997772217,
-0.378042608499527,
-0.09200005978345871,
0.10738015174865723,
-0.07451021671295166,
-0.34870436787605286,
0.06420727074146271,
-0.2750181555747986,
0.1603492945432663,
0.336933434009552,
-0.31235772371292114,
-0.10061006247997284,
-0.0329274982213974,
0.4128575325012207,
-0.2716253399848938,
-0.03568204119801521,
-0.09807811677455902,
0.14450126886367798,
-0.06219206750392914,
-0.05152229592204094,
-0.08870691806077957,
0.03669898211956024,
-0.1406470537185669,
0.31959274411201477,
-0.20937001705169678,
-0.3096981942653656,
0.23032644391059875,
-0.12140297144651413,
-0.18935689330101013,
0.0026279762387275696,
0.13802219927310944,
-0.5908480882644653,
-0.13972651958465576,
0.09341312944889069,
0.09455905109643936,
0.45481130480766296,
0.11223524808883667,
0.3758339583873749,
-0.3117886483669281,
-0.07551044225692749,
0.14180219173431396,
0.20967547595500946,
-0.1527106612920761,
0.5664058327674866,
0.06698726117610931,
-0.13767683506011963,
0.054327696561813354,
0.038853228092193604,
0.3187231719493866,
0.038661956787109375,
0.27067312598228455,
0.1541336178779602,
-0.137808695435524,
-0.2728895843029022,
-0.10658171772956848,
-0.21550019085407257,
0.08488155156373978,
0.27802351117134094,
-0.15319426357746124,
-0.19192203879356384,
0.10200352221727371,
-0.15205007791519165,
-0.15951013565063477,
0.11643894016742706,
-0.2900218367576599,
-0.1523667275905609,
-0.10318862646818161,
0.09986870735883713,
-0.11880572140216827,
0.21558114886283875,
-0.07947787642478943,
0.17917831242084503,
-0.0537458136677742,
0.5050318837165833,
-0.3481152355670929,
-0.13495579361915588,
-0.16472212970256805,
0.19815124571323395,
0.33973827958106995,
0.022118786349892616,
-0.06132497638463974,
0.22106708586215973,
0.1781979203224182,
0.13153110444545746,
-0.18267610669136047,
-0.3112729787826538,
0.17955397069454193,
0.05973925441503525,
-0.1320134699344635,
0.05789058655500412,
0.17542113363742828,
0.15221308171749115,
-0.37916135787963867,
-0.3611776530742645,
0.014517892152071,
-0.09044181555509567,
-0.028688624501228333,
0.07970578223466873,
0.14711295068264008,
-0.21128252148628235,
0.23495934903621674,
-0.055406197905540466,
0.13107015192508698,
-0.019342809915542603,
-0.13855527341365814,
0.37669265270233154,
0.1650499552488327,
-0.1514667123556137,
0.15220122039318085,
-0.09716197103261948,
0.11881307512521744,
-0.17420673370361328,
0.206941157579422,
0.06353605538606644,
-0.24306440353393555,
-0.09120813012123108,
0.2783659100532532,
0.35149094462394714,
0.1390746682882309,
0.23027722537517548,
0.05718134716153145,
0.17350350320339203,
-0.16075940430164337,
-0.15031026303768158,
0.5617009401321411,
0.0002525392919778824,
0.3441426455974579,
-0.08693674951791763,
0.11125518381595612,
0.48528987169265747,
0.10472694039344788,
-0.06869491934776306,
-0.12323219329118729,
-0.3425772190093994,
0.09757335484027863,
0.0001649037003517151,
0.23615999519824982,
-0.03996943309903145,
-0.10336079448461533,
0.02764100953936577,
0.13772079348564148,
0.1111183613538742,
0.07761824131011963,
0.7436548471450806,
-0.1332692801952362,
0.1466139256954193,
0.23586267232894897,
-0.2185104787349701,
0.15542197227478027,
0.15089206397533417,
0.07065944373607635,
0.2849663197994232,
0.10424591600894928,
0.08362393081188202,
0.11575961112976074,
-0.5258510708808899,
-0.16221672296524048,
0.6554813981056213,
-0.0517864003777504,
-0.335093230009079,
-0.05954799801111221,
-0.06371881067752838,
-0.0553978756070137,
0.07723885774612427,
0.18908041715621948,
0.10396336019039154,
0.5785468220710754,
0.063164122402668,
0.4233326315879822,
0.021710926666855812,
0.13803283870220184,
-0.17561152577400208,
0.3721533417701721,
-0.05193242430686951,
-0.1600172370672226,
0.14399920403957367,
-0.2131200134754181,
-0.23138684034347534,
0.32235559821128845,
0.11828199028968811,
0.25783073902130127,
-0.060611072927713394,
0.3421153724193573,
-0.25790920853614807,
-0.03638415411114693,
-0.2379796952009201,
0.2340901494026184,
-0.021660737693309784,
0.01992684043943882,
0.4125625491142273,
0.1230834573507309,
-0.14531639218330383,
-0.26350417733192444,
-0.04518609866499901,
0.09622596204280853,
-0.4112081527709961,
0.08776358515024185,
0.133774533867836,
-0.16022583842277527,
0.013999812304973602,
0.002057865262031555,
-0.39772456884384155,
-0.27981460094451904,
0.7091524600982666,
-0.5511258840560913,
-0.03352069854736328,
0.012438883073627949,
0.12369920313358307,
-0.21537531912326813,
0.6456471085548401,
0.08275429159402847,
0.39289820194244385,
0.005626962520182133,
-0.16449929773807526,
-0.41792532801628113,
-0.26294031739234924,
-0.0663553923368454,
0.11596532166004181,
0.1230999231338501,
0.49173998832702637,
0.21833273768424988,
0.3176274299621582,
0.003226540982723236,
-0.4619167447090149,
0.02436511591076851,
0.08114484697580338,
-0.45272859930992126,
0.118648961186409,
-0.370413601398468,
-0.06228698790073395,
0.17526759207248688,
-0.3342036306858063,
0.26757359504699707,
0.11064480245113373,
0.127259761095047,
-0.2127431184053421,
0.1328650265932083,
0.4938168525695801,
0.1521317958831787,
0.012598872184753418,
0.00982457585632801,
0.3086353838443756,
-0.3062479496002197,
0.007103303447365761,
-0.11481238901615143,
0.09621738642454147,
-0.19076427817344666,
0.0032970085740089417,
-0.04330204799771309,
0.32260560989379883,
-0.21781976521015167,
0.059790197759866714,
-0.05459663271903992,
0.10389394313097,
-0.10822546482086182,
-0.1784217804670334,
0.1569594144821167,
0.01139705441892147,
0.16660162806510925,
0.17708267271518707,
-0.015179510228335857,
0.3487412929534912,
-0.006288453936576843,
0.09536273032426834,
-0.10453291982412338,
-0.08236949890851974,
0.242010235786438,
-0.45552223920822144,
-0.22316871583461761,
-0.2831248342990875,
0.06697165220975876,
-0.03491657227277756,
0.4219537675380707,
-0.3687783479690552,
-0.3382134735584259,
0.25746026635169983,
-0.08740776777267456,
-0.04555581882596016,
0.555790364742279,
0.001617242582142353,
-0.24528087675571442,
-0.15540792047977448,
-0.26124075055122375,
-0.009433109313249588,
-0.3534398674964905,
-0.14837126433849335,
-0.2303108125925064
] |
https://github.com/huggingface/datasets/issues/426 | [FEATURE REQUEST] Multiprocessing with for dataset.map, dataset.filter | So `tf.data.Dataset.map()` returns a `ParallelMapDataset` if `num_parallel_calls is not None` [link](https://github.com/tensorflow/tensorflow/blob/2b96f3662bd776e277f86997659e61046b56c315/tensorflow/python/data/ops/dataset_ops.py#L1623).
There, `num_parallel_calls` is turned into a tensor and and fed to `gen_dataset_ops.parallel_map_dataset` where it looks like tensorflow takes over.
We could start with something simple like a thread or process pool that `imap`s over some shards.
| It would be nice to be able to speed up `dataset.map` or `dataset.filter`. Perhaps this is as easy as sharding the dataset sending each shard to a process/thread/dask pool and using the new `nlp.concatenate_dataset()` function to join them all together? | 47 | [FEATURE REQUEST] Multiprocessing with for dataset.map, dataset.filter
It would be nice to be able to speed up `dataset.map` or `dataset.filter`. Perhaps this is as easy as sharding the dataset sending each shard to a process/thread/dask pool and using the new `nlp.concatenate_dataset()` function to join them all together?
So `tf.data.Dataset.map()` returns a `ParallelMapDataset` if `num_parallel_calls is not None` [link](https://github.com/tensorflow/tensorflow/blob/2b96f3662bd776e277f86997659e61046b56c315/tensorflow/python/data/ops/dataset_ops.py#L1623).
There, `num_parallel_calls` is turned into a tensor and and fed to `gen_dataset_ops.parallel_map_dataset` where it looks like tensorflow takes over.
We could start with something simple like a thread or process pool that `imap`s over some shards.
| [
-0.39594799280166626,
-0.3589044213294983,
-0.16332809627056122,
-0.10432003438472748,
-0.28035449981689453,
0.13152655959129333,
0.286078542470932,
0.298230916261673,
0.023387081921100616,
0.05506068468093872,
-0.16390164196491241,
0.32796087861061096,
-0.09400995075702667,
0.344282865524292,
-0.11410167813301086,
-0.11086875200271606,
-0.05069202929735184,
0.05591201409697533,
-0.02234557271003723,
0.06904540956020355,
-0.07009780406951904,
-0.035147957503795624,
-0.11026893556118011,
-0.21427558362483978,
-0.10996782779693604,
-0.1081889346241951,
-0.03030228614807129,
-0.12129146605730057,
0.2324790358543396,
-0.024566184729337692,
0.10267795622348785,
0.4613173305988312,
-0.2688801884651184,
0.3424687683582306,
-0.00010329408542020246,
0.04182886332273483,
-0.03000817447900772,
0.08687364310026169,
0.09926438331604004,
0.1611689180135727,
-0.21208298206329346,
-0.28107643127441406,
-0.05112135410308838,
-0.297595739364624,
0.06982140988111496,
0.1315266191959381,
0.2037038952112198,
-0.2799985408782959,
0.20394425094127655,
-0.12030968815088272,
0.14407934248447418,
0.4225913882255554,
-0.023960404098033905,
0.29869696497917175,
-0.23564842343330383,
0.15691155195236206,
-0.1393170803785324,
-0.1624263972043991,
0.3427731692790985,
-0.20625832676887512,
-0.12681221961975098,
0.4884382486343384,
-0.2593209445476532,
0.2763179838657379,
0.12305377423763275,
-0.04308900237083435,
0.022626392543315887,
-0.4618024528026581,
-0.1920103132724762,
0.3221646547317505,
-0.1607876718044281,
-0.19757521152496338,
-0.4645853042602539,
-0.35515040159225464,
-0.1647726446390152,
-0.3611132800579071,
-0.19933483004570007,
0.05829852819442749,
-0.21818259358406067,
-0.016747627407312393,
-0.35326087474823,
-0.21855846047401428,
0.10697692632675171,
-0.13908439874649048,
0.01768004149198532,
0.31666889786720276,
0.3593291938304901,
0.15426546335220337,
0.22298367321491241,
-0.16109611093997955,
-0.10568089783191681,
-0.17646187543869019,
0.32399478554725647,
0.1019216850399971,
-0.7124085426330566,
-0.21537946164608002,
0.03156666457653046,
-0.348463773727417,
-0.0871073305606842,
-0.09172766655683517,
0.0713718980550766,
0.3659612238407135,
0.02065860480070114,
0.2957695424556732,
-0.031264886260032654,
-0.4160398840904236,
0.04682059958577156,
0.04435412585735321,
0.10934336483478546,
-0.41341492533683777,
-0.173518106341362,
0.29785189032554626,
0.09148500114679337,
-0.0863814502954483,
-0.2096260040998459,
0.046808548271656036,
-0.0589466392993927,
0.2689778506755829,
-0.014642611145973206,
-0.34582409262657166,
0.056918494403362274,
-0.11129023879766464,
0.13203616440296173,
-0.03793109208345413,
-0.06666720658540726,
0.2931641638278961,
-0.07310254871845245,
-0.29850542545318604,
-0.3626377284526825,
-0.07114993035793304,
-0.12184116244316101,
-0.018844377249479294,
-0.006802402436733246,
0.18278194963932037,
0.17651212215423584,
0.17313022911548615,
-0.27086666226387024,
0.014700972475111485,
0.13032037019729614,
0.3093438148498535,
0.34302881360054016,
-0.18828891217708588,
-0.036268942058086395,
0.2379082441329956,
-0.1522754281759262,
-0.1348414421081543,
-0.018712125718593597,
0.1012219488620758,
-0.24873241782188416,
-0.021622702479362488,
-0.3682628273963928,
-0.2509816884994507,
0.0032872315496206284,
0.16184721887111664,
0.031662266701459885,
-0.12133932113647461,
-0.24772292375564575,
0.6351501941680908,
0.17333053052425385,
0.053981129080057144,
-0.4437568783760071,
-0.10529731214046478,
-0.6214120984077454,
-0.20675358176231384,
0.34303709864616394,
0.08387716859579086,
-0.14774347841739655,
0.005700357258319855,
-0.11971711367368698,
-0.057370420545339584,
0.16284659504890442,
0.34189391136169434,
-0.08948477357625961,
0.0796351507306099,
0.0038426294922828674,
0.47801852226257324,
0.3685801923274994,
-0.15206153690814972,
0.020993918180465698,
0.3077547252178192,
-0.2115900218486786,
0.06379292160272598,
0.20980077981948853,
0.19106805324554443,
0.2824662923812866,
-0.20523753762245178,
0.1804114580154419,
0.5076909065246582,
-0.2538856267929077,
0.2780779004096985,
-0.05170662701129913,
-0.20026086270809174,
-0.02446938306093216,
0.32390716671943665,
0.146158829331398,
-0.026123754680156708,
-0.12424411624670029,
-0.316418319940567,
0.33252957463264465,
-0.18008501827716827,
0.04459574073553085,
0.08157693594694138,
0.03347236290574074,
0.06635270267724991,
-0.09547434747219086,
-0.32160496711730957,
-0.3459467589855194,
0.24227270483970642,
0.14382414519786835,
0.08254554122686386,
0.09482420980930328,
-0.3457756042480469,
0.42372721433639526,
0.10980720072984695,
0.14535874128341675,
0.25967615842819214,
0.21187688410282135,
0.11206544190645218,
-0.00736139714717865,
-0.2629689872264862,
-0.2826957106590271,
0.24087613821029663,
-0.2067616581916809,
-0.10243237763643265,
-0.15787625312805176,
0.3324168622493744,
0.25230005383491516,
-0.15476951003074646,
-0.11251051723957062,
0.10808488726615906,
-0.09614727646112442,
-0.14810873568058014,
0.1552661955356598,
0.04213465377688408,
0.007130011450499296,
0.40321773290634155,
0.39852914214134216,
0.5866170525550842,
0.2142302691936493,
0.17647910118103027,
-0.1187572106719017,
-0.24878869950771332,
-0.14478859305381775,
-0.18255609273910522,
-0.08065266162157059,
0.45377761125564575,
0.017767932265996933,
0.42751699686050415,
0.154297336935997,
0.003185393288731575,
0.17339764535427094,
0.010593373328447342,
-0.027599986642599106,
0.23792749643325806,
0.10781651735305786,
-0.12304654717445374,
-0.06270137429237366,
0.19274583458900452,
-0.28682631254196167,
0.38831448554992676,
0.506111741065979,
0.1174507737159729,
-0.11388542503118515,
0.08055548369884491,
0.22769546508789062,
0.024080559611320496,
0.06780694425106049,
0.25111135840415955,
0.24526730179786682,
0.17917759716510773,
0.14807352423667908,
-0.001104149967432022,
-0.07172132283449173,
0.019502922892570496,
0.12896494567394257,
0.274868369102478,
0.319097638130188,
-0.020805776119232178,
0.069742850959301,
-0.1868709921836853,
-0.12358977645635605,
-0.4200427234172821,
0.2997805178165436,
0.11241763830184937,
0.048312436789274216,
-0.05755007266998291,
-0.10749392956495285,
0.12696614861488342,
0.016272854059934616,
0.13758248090744019,
-0.07277359068393707,
-0.3041389584541321,
0.018180636689066887,
0.3667225241661072,
-0.06631156802177429,
0.1369045078754425,
0.1925067901611328,
0.04637710750102997,
-0.08030077069997787,
-0.11214015632867813,
-0.17693917453289032,
-0.24406814575195312,
0.2080889642238617,
0.08853183686733246,
0.3739583492279053,
0.19003982841968536,
0.431730180978775,
0.17477211356163025,
-0.0021737273782491684,
-0.15368205308914185,
-0.2592751979827881,
-0.05430923402309418,
-0.28635650873184204,
-0.019169149920344353,
-0.031672172248363495,
0.11410792171955109,
-0.22287707030773163,
-0.30588334798812866,
0.17245100438594818,
0.00461074523627758,
-0.06884045898914337,
-0.11391021311283112,
-0.012706952169537544,
0.08935267478227615,
-0.0477355420589447,
-0.25033554434776306,
-0.5684006214141846,
-0.40922310948371887,
0.3266500234603882,
-0.2324373424053192,
0.3775833249092102,
-0.05470041185617447,
0.03613963723182678,
-0.0018442936707288027,
-0.10801966488361359,
-0.005989512428641319,
0.08417238295078278,
-0.2796822190284729,
0.10813908278942108,
-0.03426268324255943,
-0.13211949169635773,
-0.25445786118507385,
-0.024662531912326813,
0.07966955006122589,
0.5135456919670105,
-0.1619199812412262,
-0.13219068944454193,
-0.2244550883769989,
0.11937937140464783,
0.12746641039848328,
-0.07577477395534515,
0.1937648057937622,
0.023846689611673355,
-0.1134343147277832,
0.06194353848695755,
-0.0049565695226192474,
0.12775932252407074,
-0.07989682257175446,
-0.38438910245895386,
0.22874775528907776,
0.3610127568244934,
0.19522984325885773,
0.7414991855621338,
0.1890394538640976,
-0.3178257644176483,
-0.09586545825004578,
0.029084382578730583,
-0.28578752279281616,
0.1605233997106552,
-0.43283119797706604,
-0.08146578073501587,
-0.07682684063911438,
0.0475001260638237,
0.04606572538614273,
-0.1417328417301178,
-0.4039612412452698,
-0.06713549047708511,
0.19641514122486115,
-0.21616125106811523,
-0.25355079770088196,
0.25362223386764526,
-0.15751487016677856,
0.29343971610069275,
0.03091239556670189,
-0.24563097953796387,
-0.4624832570552826,
0.03707864508032799,
-0.16105978190898895,
0.0008603110909461975,
0.3101629614830017,
-0.237406924366951,
-0.303688645362854,
-0.10449530929327011,
-0.5077471137046814,
0.33551955223083496,
0.07792270183563232,
0.12640853226184845,
0.04122630134224892,
-0.021640412509441376,
0.020403891801834106,
-0.15833745896816254,
0.6184365153312683,
-0.32202187180519104,
-0.2553032636642456,
0.21620136499404907,
-0.42410939931869507,
-0.1754307895898819,
0.18108145892620087,
-0.04497140273451805,
0.34808990359306335,
0.3188764154911041,
0.4349927008152008,
-0.33147096633911133,
-0.45671793818473816,
0.12553970515727997,
-0.028090044856071472,
-0.0977555587887764,
-0.06106138601899147,
-0.11444725096225739,
-0.07431183755397797,
-0.19760441780090332,
0.048701658844947815,
-0.004486734047532082,
-0.045345239341259,
-0.009250365197658539,
-0.13803790509700775,
-0.1529381275177002,
0.01893887296319008,
0.28573668003082275,
0.10535281896591187,
-0.10776623338460922,
0.29797831177711487,
0.38807228207588196,
-0.16024689376354218,
-0.08590489625930786,
0.03240327537059784,
-0.023069031536579132,
-0.085146963596344,
-0.16263717412948608,
-0.057727642357349396,
0.05240907147526741,
0.403255432844162,
0.05327513813972473,
0.15441583096981049,
0.2574465274810791,
-0.13860546052455902,
0.4407038688659668,
-0.24651822447776794,
0.14145535230636597,
0.26747724413871765,
0.2806442081928253,
-0.21675972640514374,
-0.41761302947998047,
0.2283667027950287,
0.282457560300827,
0.035674989223480225,
0.5328614711761475,
-0.2536223530769348,
0.0068784370087087154,
0.3022964596748352,
0.10988429933786392,
0.515447735786438,
-0.4857499599456787,
-0.03729790076613426,
-0.20268583297729492,
0.3226900100708008,
0.393073171377182,
-0.5588088631629944,
0.23243020474910736,
-0.02938028797507286,
-0.36768028140068054,
0.08223418146371841,
-0.041612692177295685,
0.11303994059562683,
0.4261128902435303,
-0.10323335975408554,
0.057791922241449356,
0.3466845750808716,
-0.0036737769842147827,
-0.07816612720489502,
0.3455248475074768,
0.20279064774513245,
-0.3903524577617645,
-0.03522881865501404,
0.1311015784740448,
-0.02060595154762268,
-0.27829405665397644,
0.042618054896593094,
-0.1541852205991745,
0.16440822184085846,
0.31330329179763794,
-0.3648079037666321,
-0.1199445053935051,
-0.10138311237096786,
0.3564143776893616,
-0.2605821490287781,
0.015445798635482788,
-0.11930842697620392,
0.13402459025382996,
-0.07765507698059082,
-0.0452134795486927,
-0.06826049089431763,
0.08284428715705872,
-0.07097122818231583,
0.25569403171539307,
-0.06393618881702423,
-0.3214079737663269,
0.24986420571804047,
-0.12514975666999817,
-0.2517108917236328,
-0.06535180658102036,
0.150454580783844,
-0.46293485164642334,
-0.15727300941944122,
0.0920543298125267,
0.10184793919324875,
0.48665541410446167,
0.11138081550598145,
0.40114113688468933,
-0.31419646739959717,
-0.032984793186187744,
0.14621353149414062,
0.12907347083091736,
-0.1824345886707306,
0.6450841426849365,
-0.14329728484153748,
-0.14515100419521332,
0.05702707916498184,
0.11643961071968079,
0.3842931389808655,
-0.046218760311603546,
0.21325115859508514,
0.15160875022411346,
-0.143869087100029,
-0.2672669291496277,
-0.14008715748786926,
-0.13769863545894623,
0.07166043668985367,
0.21397241950035095,
-0.11587756872177124,
-0.1828245371580124,
0.15620972216129303,
-0.226911723613739,
-0.18323498964309692,
0.1615782082080841,
-0.31056666374206543,
-0.2790352702140808,
-0.11833705753087997,
0.10625918954610825,
-0.0522756390273571,
0.23759064078330994,
-0.08727157860994339,
0.18049301207065582,
-0.08684840053319931,
0.4260999858379364,
-0.3705819845199585,
-0.021443940699100494,
-0.16345106065273285,
0.16510945558547974,
0.32536765933036804,
-0.024627000093460083,
0.015284582041203976,
0.14704592525959015,
0.17588134109973907,
0.19756773114204407,
-0.19807039201259613,
-0.3065063953399658,
0.1562502235174179,
0.04775683581829071,
-0.12288055568933487,
0.014831572771072388,
0.1809357851743698,
0.08752856403589249,
-0.44227948784828186,
-0.37742456793785095,
0.10156381130218506,
-0.00863705761730671,
-0.09911319613456726,
0.003800966776907444,
0.3627701699733734,
-0.033400341868400574,
0.14551977813243866,
-0.005868084728717804,
0.06340876966714859,
-0.0765857845544815,
-0.12441781908273697,
0.34100618958473206,
0.19389094412326813,
-0.11759968101978302,
0.14489753544330597,
-0.11721392720937729,
0.16000142693519592,
-0.11598403006792068,
0.24349045753479004,
0.04486832022666931,
-0.2600497007369995,
-0.09802968055009842,
0.4227249324321747,
0.352942556142807,
0.2267610877752304,
0.0967409536242485,
0.07209303975105286,
0.2289397269487381,
-0.17389385402202606,
-0.11638427525758743,
0.6512268781661987,
0.01669786125421524,
0.47039109468460083,
-0.01576412469148636,
0.08511637151241302,
0.5125299692153931,
-0.036524392664432526,
0.003891967236995697,
0.0008237496949732304,
-0.3297492265701294,
0.0768737941980362,
-0.06887955963611603,
0.21548457443714142,
-0.10737431049346924,
-0.05406937748193741,
-0.09200751781463623,
0.1457466334104538,
0.1421983540058136,
-0.01780291646718979,
0.845295250415802,
-0.13183674216270447,
0.0542043037712574,
0.17471666634082794,
-0.26613402366638184,
0.1045222207903862,
0.1242595911026001,
0.07839493453502655,
0.326467901468277,
0.0545981228351593,
0.07711802423000336,
0.08855932205915451,
-0.4675465524196625,
-0.16528820991516113,
0.631592333316803,
-0.07642624527215958,
-0.24111707508563995,
-0.046609099954366684,
-0.02627120167016983,
-0.08564116805791855,
-0.010362712666392326,
0.2047717273235321,
0.06208779662847519,
0.5979961156845093,
0.08511169999837875,
0.43135714530944824,
0.06767477840185165,
-0.017910301685333252,
-0.09406090527772903,
0.3815839886665344,
-0.0917867124080658,
-0.146493062376976,
0.18080899119377136,
-0.20791879296302795,
-0.21647363901138306,
0.23285679519176483,
0.10202883183956146,
0.18162193894386292,
-0.06675310432910919,
0.4536270499229431,
-0.23254702985286713,
-0.009597301483154297,
-0.24298274517059326,
0.2401324361562729,
-0.15554209053516388,
0.11961092054843903,
0.3448846638202667,
0.11267122626304626,
-0.18287810683250427,
-0.3477283716201782,
-0.08739963173866272,
0.018353285267949104,
-0.26190075278282166,
0.15967926383018494,
0.09099754691123962,
-0.26788488030433655,
0.022400958463549614,
0.065928153693676,
-0.3229217529296875,
-0.29469725489616394,
0.5998606085777283,
-0.5497963428497314,
-0.06027375906705856,
0.07827513664960861,
0.1313943862915039,
-0.2361156940460205,
0.63092041015625,
0.04592528194189072,
0.3957267999649048,
-0.03250887617468834,
-0.09843438863754272,
-0.4964117407798767,
-0.14138510823249817,
-0.16409988701343536,
0.06147757172584534,
0.09781209379434586,
0.45167842507362366,
0.22575920820236206,
0.3760368824005127,
0.003735385835170746,
-0.37370774149894714,
0.00931046437472105,
0.17768698930740356,
-0.4579305648803711,
0.10844868421554565,
-0.41925376653671265,
-0.2052966058254242,
0.199818953871727,
-0.3315633535385132,
0.24845640361309052,
0.06719984114170074,
0.11896894127130508,
-0.16506478190422058,
0.11831142008304596,
0.5072966814041138,
0.0071777403354644775,
0.06850087642669678,
0.006912439130246639,
0.33435285091400146,
-0.24958929419517517,
0.02704545296728611,
-0.1677880883216858,
0.12006568163633347,
-0.27089884877204895,
0.011997465044260025,
-0.035705436021089554,
0.32536178827285767,
-0.1558249145746231,
-0.10594010353088379,
-0.0696616843342781,
-0.004154161550104618,
-0.11984997987747192,
-0.213836669921875,
0.082343690097332,
0.017949098721146584,
0.1702774167060852,
0.2766761779785156,
-0.10189743340015411,
0.4429575502872467,
0.0640806332230568,
0.12118813395500183,
-0.11469489336013794,
-0.1287369281053543,
0.30028751492500305,
-0.46909844875335693,
-0.24098852276802063,
-0.3412490785121918,
0.07182478159666061,
-0.1741068959236145,
0.3793017566204071,
-0.377905935049057,
-0.2622274160385132,
0.22996722161769867,
-0.08290260285139084,
-0.08099010586738586,
0.500737726688385,
0.1311316192150116,
-0.3234911262989044,
-0.13775236904621124,
-0.2630753815174103,
-0.0466940775513649,
-0.31119629740715027,
-0.08744079619646072,
-0.1657188981771469
] |
https://github.com/huggingface/datasets/issues/426 | [FEATURE REQUEST] Multiprocessing with for dataset.map, dataset.filter | Multiprocessing was added in #552 . You can set the number of processes with `.map(..., num_proc=...)`. It also works for `filter`
Closing this one, but feel free to reo-open if you have other questions | It would be nice to be able to speed up `dataset.map` or `dataset.filter`. Perhaps this is as easy as sharding the dataset sending each shard to a process/thread/dask pool and using the new `nlp.concatenate_dataset()` function to join them all together? | 34 | [FEATURE REQUEST] Multiprocessing with for dataset.map, dataset.filter
It would be nice to be able to speed up `dataset.map` or `dataset.filter`. Perhaps this is as easy as sharding the dataset sending each shard to a process/thread/dask pool and using the new `nlp.concatenate_dataset()` function to join them all together?
Multiprocessing was added in #552 . You can set the number of processes with `.map(..., num_proc=...)`. It also works for `filter`
Closing this one, but feel free to reo-open if you have other questions | [
-0.311808705329895,
-0.2080802023410797,
-0.17793215811252594,
-0.1730472445487976,
-0.34365004301071167,
-0.11131704598665237,
0.1971546709537506,
0.28352731466293335,
0.03925730660557747,
0.07929801940917969,
-0.07674413919448853,
0.3925558030605316,
-0.0509050190448761,
0.3508170247077942,
-0.04081786796450615,
-0.1657486855983734,
0.07918084412813187,
0.13079959154129028,
-0.11498916149139404,
0.06480182707309723,
-0.0683184415102005,
0.055837519466876984,
-0.1673124134540558,
-0.07109871506690979,
-0.18491007387638092,
-0.13211292028427124,
-0.14065413177013397,
-0.016699478030204773,
0.06625238060951233,
-0.2419358342885971,
0.03186538815498352,
0.43288788199424744,
-0.1755048632621765,
0.07039573043584824,
-0.0000980988479568623,
-0.20133629441261292,
0.2006983757019043,
0.1778133660554886,
-0.10141676664352417,
0.32997989654541016,
-0.2782137989997864,
-0.43329641222953796,
0.03836989402770996,
-0.24761226773262024,
0.14912256598472595,
0.20486733317375183,
0.2674981653690338,
-0.24546734988689423,
0.1922699213027954,
-0.1812831461429596,
0.2317156046628952,
0.20431622862815857,
-0.11518136411905289,
0.23205028474330902,
-0.10504891723394394,
0.18079617619514465,
-0.09229771047830582,
-0.27464559674263,
0.37288838624954224,
-0.1693916618824005,
-0.3322255611419678,
0.5420418977737427,
-0.24297191202640533,
0.15918053686618805,
0.1380312144756317,
-0.08978434652090073,
0.13106924295425415,
-0.37271058559417725,
-0.11799053102731705,
0.259978711605072,
-0.05391407757997513,
-0.13539156317710876,
-0.33915191888809204,
-0.2734782099723816,
-0.20564013719558716,
-0.4567801058292389,
-0.21214094758033752,
0.08967994153499603,
-0.20254327356815338,
-0.1186680793762207,
-0.378482848405838,
-0.2798651456832886,
0.2643018364906311,
-0.19410668313503265,
0.23180162906646729,
0.38398388028144836,
0.22918806970119476,
0.06884697079658508,
0.17879964411258698,
-0.2928028702735901,
-0.1345091015100479,
-0.22451551258563995,
0.0903649851679802,
0.009402694180607796,
-0.5751147866249084,
-0.13058340549468994,
0.09208798408508301,
0.07423930615186691,
0.07725474238395691,
0.039454229176044464,
0.08628156036138535,
0.34194010496139526,
0.1756996065378189,
0.2525441348552704,
0.03411928564310074,
-0.3420071005821228,
0.26996365189552307,
-0.04827367141842842,
0.09755983203649521,
-0.2677496671676636,
-0.2028668224811554,
0.30064910650253296,
0.1756909042596817,
-0.11668842285871506,
-0.1895582526922226,
0.06903920322656631,
-0.08177286386489868,
0.11618739366531372,
0.05311531573534012,
-0.38070517778396606,
0.19336462020874023,
-0.17856889963150024,
0.11732137948274612,
0.1244456022977829,
0.01752592623233795,
0.28645074367523193,
-0.22578473389148712,
-0.21211698651313782,
-0.2677026093006134,
-0.202941432595253,
-0.15252110362052917,
0.0074559589847922325,
-0.06091552972793579,
0.08463378250598907,
0.1458335518836975,
0.2318813055753708,
-0.032922931015491486,
0.08723421394824982,
0.06805329769849777,
0.36045247316360474,
0.2550833523273468,
-0.0851559042930603,
0.08561508357524872,
0.1747233271598816,
-0.04975463077425957,
-0.10488414764404297,
-0.18602947890758514,
0.005004256963729858,
-0.3372872769832611,
-0.04759503901004791,
-0.21842104196548462,
-0.09545402973890305,
-0.026065988466143608,
0.21722659468650818,
0.12907758355140686,
-0.0312369242310524,
-0.1767544448375702,
0.5951278805732727,
0.011326633393764496,
-0.14511556923389435,
-0.3826850652694702,
-0.060704730451107025,
-0.3916878402233124,
-0.23387403786182404,
0.2800224721431732,
0.10818474739789963,
0.04726462438702583,
0.040641121566295624,
-0.2878512442111969,
-0.02837994322180748,
0.3236939013004303,
0.2599790096282959,
-0.1431949883699417,
-0.014988519251346588,
-0.04363837465643883,
0.523222804069519,
0.5169823169708252,
-0.026826640591025352,
0.05300111323595047,
0.4043431878089905,
-0.13246680796146393,
-0.05533073842525482,
0.28624439239501953,
0.22779341042041779,
0.22586996853351593,
-0.06350121647119522,
0.04824572801589966,
0.503441333770752,
-0.24820923805236816,
0.2910606265068054,
-0.09094497561454773,
-0.10397234559059143,
0.09812469780445099,
0.1033184677362442,
0.027223670855164528,
0.0312679186463356,
0.0279792919754982,
-0.20897917449474335,
0.4157719612121582,
-0.23041313886642456,
0.17091499269008636,
0.021493779495358467,
-0.05771324411034584,
-0.15295253694057465,
-0.1221989244222641,
-0.3011992573738098,
-0.2843010425567627,
0.09866956621408463,
-0.17949697375297546,
-0.007939413189888,
0.18248136341571808,
-0.3726186752319336,
0.3392189145088196,
0.11650993674993515,
0.09805019199848175,
0.13064101338386536,
0.2733260989189148,
0.32727494835853577,
0.07311712205410004,
-0.30915576219558716,
-0.15739421546459198,
0.16968104243278503,
0.017495593056082726,
-0.19165576994419098,
-0.12075001001358032,
0.20650188624858856,
0.0937884971499443,
-0.15174539387226105,
0.16741184890270233,
0.10590916872024536,
0.04968889057636261,
-0.03461284935474396,
0.19245865941047668,
0.016988392919301987,
-0.04596129432320595,
0.3286035358905792,
0.6207002997398376,
0.2523435950279236,
0.10509248077869415,
0.17444856464862823,
-0.009198853746056557,
-0.13139794766902924,
-0.010349796153604984,
-0.12949618697166443,
-0.15013059973716736,
0.49558013677597046,
0.042268481105566025,
0.3763103783130646,
0.2261740118265152,
0.07795989513397217,
0.270815372467041,
-0.047464773058891296,
-0.08961442112922668,
0.16306675970554352,
0.16361784934997559,
-0.02121105045080185,
-0.11455759406089783,
0.26523229479789734,
-0.4278348684310913,
0.3981335759162903,
0.49630656838417053,
0.12931036949157715,
-0.04258916527032852,
0.08808456361293793,
0.2510959208011627,
-0.14944890141487122,
0.18891042470932007,
0.1442229002714157,
0.21221928298473358,
0.2962414026260376,
0.1868579238653183,
-0.141469344496727,
-0.10816244781017303,
-0.035119812935590744,
0.18746677041053772,
0.13446451723575592,
0.23699061572551727,
0.07469308376312256,
0.1096188947558403,
-0.28498563170433044,
-0.21900531649589539,
-0.3890281021595001,
0.16565342247486115,
-0.06170792877674103,
0.08153918385505676,
-0.08099080622196198,
-0.21831949055194855,
-0.15576022863388062,
-0.03165774419903755,
0.21919578313827515,
-0.21916034817695618,
-0.33720487356185913,
0.10163189470767975,
0.16401252150535583,
-0.22361652553081512,
0.19871950149536133,
0.11815223097801208,
0.1623242348432541,
-0.18387959897518158,
0.13282448053359985,
-0.1803712546825409,
-0.11766981333494186,
-0.007629066705703735,
0.1361313760280609,
0.30378565192222595,
0.3785467743873596,
0.46649840474128723,
0.1868593543767929,
0.07074138522148132,
-0.35630637407302856,
-0.1830936223268509,
-0.05959697067737579,
-0.1524493247270584,
0.09218692034482956,
-0.02509768307209015,
-0.03866115212440491,
-0.2330762892961502,
-0.3906509280204773,
0.15926532447338104,
0.049281828105449677,
-0.1521444469690323,
-0.1326257288455963,
0.01659676991403103,
-0.03526734188199043,
-0.05127231776714325,
-0.24369212985038757,
-0.42697206139564514,
-0.42753440141677856,
0.3586699962615967,
-0.18083256483078003,
0.36014461517333984,
-0.3318042755126953,
-0.07437273859977722,
-0.03036002442240715,
-0.2477472424507141,
0.07954252511262894,
0.08812548220157623,
-0.28296416997909546,
0.0857495367527008,
-0.07664631307125092,
-0.19642552733421326,
-0.2926122844219208,
-0.09881306439638138,
0.04269184172153473,
0.3463366627693176,
-0.08477675914764404,
-0.0028072791174054146,
-0.21959903836250305,
0.1538802832365036,
0.2612431049346924,
-0.05881437659263611,
0.16578857600688934,
0.05103442072868347,
-0.22152884304523468,
0.1123749390244484,
-0.24121075868606567,
0.15038922429084778,
-0.13207611441612244,
-0.1409626603126526,
0.1440396010875702,
0.3033939301967621,
-0.015278985723853111,
0.5315760374069214,
0.11512026190757751,
-0.11210712790489197,
0.021554168313741684,
0.10985743254423141,
-0.18576683104038239,
0.17432837188243866,
-0.4403369128704071,
0.00020366604439914227,
-0.11812132596969604,
0.03276336193084717,
0.13110017776489258,
-0.11729659885168076,
-0.5028031468391418,
-0.027268676087260246,
0.058226753026247025,
-0.19815561175346375,
-0.17052219808101654,
0.20181219279766083,
-0.1989326775074005,
0.27834630012512207,
0.0801803320646286,
-0.3016015291213989,
-0.3575441539287567,
0.07432890683412552,
-0.26809608936309814,
-0.027033045887947083,
0.21399357914924622,
-0.18875059485435486,
-0.47727590799331665,
-0.18428558111190796,
-0.5468441843986511,
0.3180507719516754,
0.13745199143886566,
0.11324315518140793,
-0.05436420440673828,
-0.003784283995628357,
-0.059174180030822754,
-0.17515337467193604,
0.4736836552619934,
-0.3019978106021881,
-0.16945207118988037,
0.29560115933418274,
-0.33680883049964905,
0.03151565045118332,
0.21253608167171478,
-0.07062728703022003,
0.4595480263233185,
0.46838679909706116,
0.2617398798465729,
-0.33239302039146423,
-0.3635450303554535,
0.16683490574359894,
0.06840376555919647,
-0.09425075352191925,
0.020264480262994766,
-0.1293439418077469,
-0.06941283494234085,
-0.2078351080417633,
0.11281974613666534,
-0.08659953624010086,
0.13330233097076416,
-0.036420613527297974,
-0.12678830325603485,
-0.13072983920574188,
0.00793035700917244,
0.302981436252594,
0.08265186846256256,
-0.03281198441982269,
0.2658088803291321,
0.23775777220726013,
-0.34883931279182434,
0.22704334557056427,
-0.15229646861553192,
-0.019971676170825958,
-0.1843562126159668,
0.13444654643535614,
-0.06265360116958618,
-0.06927493959665298,
0.5562536120414734,
0.2502160370349884,
0.18348117172718048,
0.310538113117218,
-0.07539104670286179,
0.41392379999160767,
-0.15326057374477386,
0.011447526514530182,
0.3346479833126068,
0.15990762412548065,
-0.20390871167182922,
-0.2229427546262741,
0.2769016921520233,
0.26945164799690247,
-0.12536609172821045,
0.3823762834072113,
-0.24210946261882782,
-0.0711110383272171,
0.2561419606208801,
0.1250002086162567,
0.6941609382629395,
-0.2547999620437622,
0.04514630138874054,
-0.25149521231651306,
0.14510737359523773,
0.324878454208374,
-0.2804259657859802,
0.2194972038269043,
-0.05861915647983551,
-0.18636290729045868,
0.14322985708713531,
0.019223343580961227,
0.19099879264831543,
0.46858566999435425,
-0.26561176776885986,
0.1729700267314911,
0.2839287519454956,
-0.17429175972938538,
-0.07828262448310852,
0.4526761472225189,
0.14737103879451752,
-0.4094928801059723,
-0.1683618128299713,
0.16090986132621765,
-0.04781396687030792,
-0.357065349817276,
0.03803557530045509,
-0.2977585792541504,
0.18695920705795288,
0.17041099071502686,
-0.3053107261657715,
-0.016286280006170273,
0.13493862748146057,
0.3702847361564636,
-0.26351043581962585,
-0.010328345000743866,
-0.22824114561080933,
0.0804496705532074,
-0.16402395069599152,
0.02822788432240486,
0.013841826468706131,
0.11218415200710297,
-0.13298171758651733,
0.24834692478179932,
-0.17284199595451355,
-0.2532658278942108,
0.19582737982273102,
-0.2532753348350525,
-0.18081596493721008,
-0.03347824513912201,
0.06692104041576385,
-0.5287505984306335,
-0.14466318488121033,
0.15387699007987976,
0.09375298768281937,
0.3899873197078705,
0.03030800074338913,
0.3620782196521759,
-0.40903371572494507,
-0.18282605707645416,
0.193281352519989,
0.23135392367839813,
-0.22004316747188568,
0.5411826372146606,
0.15862146019935608,
-0.10134655237197876,
-0.003401033580303192,
0.08322463184595108,
0.2891547977924347,
0.006169158965349197,
0.24808736145496368,
0.06552951037883759,
-0.20691293478012085,
-0.32574838399887085,
-0.2069140076637268,
-0.22690866887569427,
0.053373515605926514,
0.30176103115081787,
-0.13788482546806335,
-0.21424846351146698,
0.06120935082435608,
-0.1285807490348816,
-0.12593479454517365,
0.13658910989761353,
-0.21727533638477325,
-0.18879052996635437,
-0.14223319292068481,
0.09681257605552673,
-0.2331409901380539,
0.19755157828330994,
-0.0019942522048950195,
0.05190759524703026,
0.036659590899944305,
0.48078376054763794,
-0.4344329833984375,
-0.12753398716449738,
-0.3187755346298218,
0.23303639888763428,
0.27375131845474243,
-0.04720544070005417,
-0.18614374101161957,
0.24893908202648163,
0.23555830121040344,
0.12250730395317078,
-0.19756551086902618,
-0.3529147207736969,
0.21409611403942108,
0.03870005905628204,
-0.15224957466125488,
0.06883610039949417,
0.07611624896526337,
0.13877998292446136,
-0.31819668412208557,
-0.30290189385414124,
-0.1315649449825287,
-0.18980154395103455,
-0.07963046431541443,
0.07646666467189789,
0.221750870347023,
-0.25930848717689514,
0.33507776260375977,
0.02144104801118374,
0.08406462520360947,
-0.13677173852920532,
-0.2212948054075241,
0.3479643166065216,
0.16341030597686768,
-0.22237218916416168,
0.23424868285655975,
-0.08718647807836533,
0.0017208978533744812,
-0.13127246499061584,
0.26632288098335266,
0.04079452157020569,
-0.26086536049842834,
-0.01935051754117012,
0.3714657723903656,
0.3568590581417084,
0.239072784781456,
0.15673232078552246,
0.09422113746404648,
0.2489311397075653,
-0.3249041438102722,
-0.16936983168125153,
0.5596206784248352,
-0.033907607197761536,
0.3383585512638092,
-0.15672701597213745,
0.21891438961029053,
0.24029326438903809,
0.08322513103485107,
0.04722820222377777,
-0.08509919047355652,
-0.3423670530319214,
-0.02236720360815525,
-0.09068530797958374,
0.30159682035446167,
-0.07772614061832428,
0.11497552692890167,
0.12278008460998535,
0.1877332180738449,
0.17688708007335663,
-0.016961954534053802,
0.7731493711471558,
-0.053665436804294586,
0.28818419575691223,
0.15299344062805176,
-0.12935319542884827,
0.16693629324436188,
0.1924276500940323,
0.0711643248796463,
0.19933468103408813,
0.1327953338623047,
0.1543235182762146,
0.03727590665221214,
-0.45047444105148315,
-0.21498169004917145,
0.682502806186676,
-0.15054312348365784,
-0.32354187965393066,
-0.09154610335826874,
-0.11691412329673767,
-0.16023914515972137,
0.09446536004543304,
0.12781311571598053,
0.176539808511734,
0.6568735837936401,
0.015062879770994186,
0.36606448888778687,
-0.07144901901483536,
0.16607704758644104,
-0.15782159566879272,
0.3040832281112671,
-0.2052636295557022,
-0.2164442539215088,
0.1420259326696396,
-0.18921029567718506,
-0.06551629304885864,
0.356324702501297,
0.2488279938697815,
0.28482237458229065,
-0.1441093236207962,
0.2726019322872162,
-0.29566851258277893,
-0.0594363734126091,
-0.37890151143074036,
0.24861402809619904,
0.014597296714782715,
0.04570578411221504,
0.45209160447120667,
0.1537102460861206,
-0.20739376544952393,
-0.25556984543800354,
0.05293099209666252,
0.01084925327450037,
-0.2308037430047989,
0.199927419424057,
0.15418657660484314,
-0.19070875644683838,
-0.06117253750562668,
0.05794428288936615,
-0.4901556372642517,
-0.25927677750587463,
0.5490928292274475,
-0.43226519227027893,
-0.019617710262537003,
-0.1755620837211609,
0.1528598517179489,
-0.2001217007637024,
0.6736972332000732,
0.0027893297374248505,
0.34335634112358093,
-0.02645968645811081,
-0.2550085186958313,
-0.5719378590583801,
-0.3019405007362366,
-0.09005916118621826,
-0.05638151615858078,
0.18245725333690643,
0.5611240267753601,
0.1624622792005539,
0.27249181270599365,
-0.13719089329242706,
-0.2531248927116394,
-0.07214819639921188,
0.05833815038204193,
-0.41925564408302307,
0.23775632679462433,
-0.12380547821521759,
-0.07895170152187347,
0.15404285490512848,
-0.32209014892578125,
0.3157338500022888,
0.016088590025901794,
0.20289874076843262,
-0.09456758946180344,
0.026144318282604218,
0.4906812310218811,
0.19405294954776764,
-0.15698137879371643,
0.1460258960723877,
0.3112099766731262,
-0.3373524844646454,
-0.0026024077087640762,
-0.149463951587677,
0.10653452575206757,
-0.1662209928035736,
-0.09496360272169113,
0.043992817401885986,
0.3311820328235626,
-0.16195978224277496,
0.256804883480072,
-0.04410485178232193,
0.21646258234977722,
-0.2096710205078125,
-0.04306752607226372,
0.1807120442390442,
0.02991187758743763,
0.14887279272079468,
0.2463066428899765,
-0.14018593728542328,
0.273738294839859,
-0.007808811962604523,
0.03374135494232178,
-0.14305691421031952,
-0.21259623765945435,
0.2409759759902954,
-0.3951699733734131,
-0.2428908348083496,
-0.34730345010757446,
0.21902966499328613,
0.040853191167116165,
0.32732540369033813,
-0.2465289831161499,
-0.3446035385131836,
0.21228933334350586,
-0.034866586327552795,
-0.01911371946334839,
0.48011910915374756,
-0.1346851885318756,
-0.2861376106739044,
-0.16346348822116852,
-0.29623907804489136,
0.04627378284931183,
-0.2897840440273285,
-0.1670207977294922,
-0.28161415457725525
] |
https://github.com/huggingface/datasets/issues/426 | [FEATURE REQUEST] Multiprocessing with for dataset.map, dataset.filter | @lhoestq Great feature implemented! Do you have plans to add it to official tutorials [Processing data in a Dataset](https://huggingface.co/docs/datasets/processing.html?highlight=save#augmenting-the-dataset)? It took me sometime to find this parallel processing api. | It would be nice to be able to speed up `dataset.map` or `dataset.filter`. Perhaps this is as easy as sharding the dataset sending each shard to a process/thread/dask pool and using the new `nlp.concatenate_dataset()` function to join them all together? | 29 | [FEATURE REQUEST] Multiprocessing with for dataset.map, dataset.filter
It would be nice to be able to speed up `dataset.map` or `dataset.filter`. Perhaps this is as easy as sharding the dataset sending each shard to a process/thread/dask pool and using the new `nlp.concatenate_dataset()` function to join them all together?
@lhoestq Great feature implemented! Do you have plans to add it to official tutorials [Processing data in a Dataset](https://huggingface.co/docs/datasets/processing.html?highlight=save#augmenting-the-dataset)? It took me sometime to find this parallel processing api. | [
-0.26087623834609985,
-0.4052202105522156,
-0.16711919009685516,
0.02426433563232422,
-0.3476996421813965,
0.10837958008050919,
0.09586915373802185,
0.10010923445224762,
0.009774990379810333,
0.07798153907060623,
-0.12978774309158325,
0.26878517866134644,
0.02880384773015976,
0.5679559707641602,
0.035218894481658936,
-0.3084889054298401,
0.07579685002565384,
0.12604714930057526,
-0.04775761067867279,
0.19724319875240326,
0.01976299285888672,
0.15983957052230835,
-0.2788161039352417,
-0.12523320317268372,
-0.24529114365577698,
-0.16340823471546173,
-0.1911027878522873,
-0.01965191960334778,
-0.05949784070253372,
-0.15034686028957367,
0.04616681486368179,
0.48717355728149414,
-0.2316056489944458,
0.23612821102142334,
-0.00010790780652314425,
-0.20297491550445557,
0.15033145248889923,
0.22987207770347595,
-0.05376743897795677,
0.2007022351026535,
-0.19346609711647034,
-0.47776514291763306,
-0.014705214649438858,
-0.07633666694164276,
0.05922113358974457,
0.11958199739456177,
0.17781049013137817,
-0.26913195848464966,
0.19042906165122986,
-0.37261271476745605,
0.12446178495883942,
0.3582194447517395,
-0.05452730879187584,
0.2704069912433624,
-0.20980247855186462,
0.4645994305610657,
-0.07393063604831696,
-0.19201122224330902,
0.46980464458465576,
-0.14419640600681305,
-0.19066289067268372,
0.5513617396354675,
-0.21676607429981232,
0.14672110974788666,
0.201153963804245,
-0.04676590487360954,
-0.18241360783576965,
-0.4495760500431061,
-0.1506308615207672,
0.3538197875022888,
-0.02405419945716858,
-0.13829758763313293,
-0.5037168860435486,
-0.4508945941925049,
-0.13390518724918365,
-0.4086397886276245,
-0.17068558931350708,
0.11095292121171951,
-0.1954030841588974,
0.030998993664979935,
-0.4884885251522064,
-0.36457812786102295,
0.27956798672676086,
-0.18786434829235077,
0.2982881963253021,
0.21118803322315216,
0.004194839857518673,
0.0964188352227211,
0.2584793269634247,
-0.19326485693454742,
-0.25652822852134705,
-0.2772122621536255,
0.1194256842136383,
0.03377301245927811,
-0.6784650683403015,
-0.06038984656333923,
-0.006560780107975006,
0.13005968928337097,
0.1923827826976776,
0.1290128529071808,
0.10125651955604553,
0.31476709246635437,
-0.022961203008890152,
0.2253417670726776,
0.10740220546722412,
-0.35129573941230774,
0.17503412067890167,
-0.11528924107551575,
0.13110044598579407,
-0.19044002890586853,
-0.029814463108778,
0.20257550477981567,
0.2138281613588333,
-0.05181746557354927,
-0.4135628044605255,
0.029281500726938248,
0.027735963463783264,
0.10041524469852448,
0.07463230937719345,
-0.3755648732185364,
0.1856493353843689,
-0.29914194345474243,
0.1410415768623352,
0.04199479520320892,
-0.009585920721292496,
0.3397320806980133,
-0.14180856943130493,
-0.13328437507152557,
-0.23400567471981049,
-0.23821097612380981,
-0.0971704050898552,
-0.05162494257092476,
-0.03319795802235603,
0.27810314297676086,
0.12050004303455353,
0.044282350689172745,
-0.050682783126831055,
0.14772798120975494,
0.14398331940174103,
0.26721736788749695,
0.20750387012958527,
-0.12425531446933746,
0.06952661275863647,
0.18338878452777863,
-0.0726911723613739,
-0.038395658135414124,
-0.11696629226207733,
0.22224651277065277,
-0.25718680024147034,
-0.09597087651491165,
-0.2205805778503418,
-0.20751583576202393,
-0.1869579702615738,
0.07734876871109009,
0.10482610762119293,
-0.10925956070423126,
-0.4787704646587372,
0.7779144048690796,
0.0713086873292923,
-0.011501304805278778,
-0.2945776581764221,
0.022748444229364395,
-0.53532475233078,
-0.1817253977060318,
0.34166419506073,
0.12842069566249847,
-0.048566047102212906,
-0.03654050827026367,
-0.2228354960680008,
-0.10784381628036499,
0.24035438895225525,
0.4414246082305908,
-0.20170138776302338,
0.12921375036239624,
-0.1785440891981125,
0.4836604595184326,
0.5142178535461426,
-0.12952479720115662,
0.08300074189901352,
0.37425345182418823,
-0.14779654145240784,
0.07080503553152084,
0.31427595019340515,
0.19002874195575714,
0.2082633376121521,
0.02761303260922432,
0.1444733738899231,
0.540149450302124,
-0.19802331924438477,
0.2230967879295349,
0.005955733358860016,
-0.18978162109851837,
0.22617095708847046,
0.16229987144470215,
-0.15246480703353882,
0.0858481153845787,
-0.07611078768968582,
-0.5189328193664551,
0.48664119839668274,
-0.2974572479724884,
0.15625976026058197,
0.05890248715877533,
-0.1313956081867218,
0.09265932440757751,
-0.06697504967451096,
-0.32717323303222656,
-0.35985267162323,
0.0688544437289238,
-0.04177754372358322,
-0.04910828918218613,
0.08304744958877563,
-0.39395564794540405,
0.41556689143180847,
0.09817185252904892,
0.02685689926147461,
0.00865931436419487,
0.10695798695087433,
0.18124574422836304,
0.15198048949241638,
-0.23609381914138794,
-0.3061077892780304,
0.3358492851257324,
-0.07996831089258194,
-0.012365814298391342,
-0.3526892066001892,
0.2138335257768631,
0.25085580348968506,
-0.05532524734735489,
0.04190518707036972,
0.12120625376701355,
-0.05146091431379318,
-0.1264778971672058,
0.1427655816078186,
-0.0031844936311244965,
-0.049305450171232224,
0.255018025636673,
0.6550812721252441,
0.2654035687446594,
0.26276153326034546,
0.07855691015720367,
0.023095572367310524,
-0.27532777190208435,
0.038246914744377136,
-0.2153048813343048,
-0.1683979034423828,
0.5540850758552551,
-0.04102354124188423,
0.40230393409729004,
0.09175574779510498,
-0.013162942603230476,
0.23495981097221375,
0.07330121099948883,
-0.07017627358436584,
0.21059831976890564,
0.1526694893836975,
-0.08113253116607666,
0.027082934975624084,
0.14318938553333282,
-0.462976336479187,
0.3415270745754242,
0.4402230381965637,
0.0058715492486953735,
-0.20786723494529724,
0.08403782546520233,
0.18721985816955566,
-0.111077681183815,
0.19678804278373718,
0.023821603506803513,
0.18814942240715027,
0.1884748786687851,
0.05033506825566292,
-0.04544273763895035,
0.10284695029258728,
-0.06637272238731384,
0.11767391115427017,
0.320514440536499,
0.2168475240468979,
-0.026525504887104034,
0.1670740246772766,
-0.23632608354091644,
-0.2827824354171753,
-0.29014888405799866,
0.1736859530210495,
-0.10771036148071289,
0.019659820944070816,
-0.061528220772743225,
-0.18522028625011444,
-0.19124099612236023,
-0.04619449004530907,
0.04788747802376747,
-0.3056800365447998,
-0.30417710542678833,
-0.08128060400485992,
0.3092374801635742,
-0.05187167227268219,
0.07619765400886536,
0.22128944098949432,
0.21300740540027618,
-0.19765454530715942,
-0.008133826777338982,
-0.28180131316185,
0.012489909306168556,
0.12855258584022522,
0.0313921682536602,
0.30221179127693176,
0.3320898413658142,
0.4555431604385376,
0.12329494208097458,
0.09103305637836456,
-0.4455690383911133,
-0.20407629013061523,
-0.01796470582485199,
-0.2767621874809265,
0.13668477535247803,
0.12262173742055893,
0.12017975747585297,
-0.1607811450958252,
-0.2790878117084503,
0.1972419172525406,
0.10888117551803589,
-0.2122076004743576,
-0.268094003200531,
0.06088009476661682,
-0.024981506168842316,
-0.024112356826663017,
-0.14902141690254211,
-0.47957396507263184,
-0.33439168334007263,
0.5942108035087585,
-0.28766024112701416,
0.227688267827034,
-0.3308071494102478,
-0.11933046579360962,
-0.0027463193982839584,
-0.3504943251609802,
0.06652761250734329,
0.019050799310207367,
-0.47189536690711975,
0.020882587879896164,
0.011857733130455017,
-0.11374907195568085,
-0.24908500909805298,
-0.019860349595546722,
-0.06454025208950043,
0.23783352971076965,
-0.08363229036331177,
-0.10059981048107147,
-0.35888275504112244,
0.23844164609909058,
0.21210834383964539,
0.09817969053983688,
0.27783316373825073,
-0.07961330562829971,
-0.07055772095918655,
0.13385990262031555,
-0.48005783557891846,
0.03979405388236046,
-0.000913962721824646,
-0.16053330898284912,
0.2632173001766205,
0.3609156906604767,
0.0008573718369007111,
0.7097066044807434,
0.23044225573539734,
-0.047403719276189804,
0.13507506251335144,
0.12800419330596924,
-0.1666102558374405,
0.05681343376636505,
-0.551040768623352,
-0.035117171704769135,
-0.16229116916656494,
0.07030540704727173,
0.02487540990114212,
-0.034696999937295914,
-0.24920319020748138,
-0.0900883674621582,
0.01627078279852867,
-0.3376840651035309,
-0.09108635783195496,
0.08674764633178711,
-0.047154441475868225,
0.23084405064582825,
0.0760263055562973,
-0.3100878894329071,
-0.26072224974632263,
0.05415579676628113,
-0.201870858669281,
0.13854682445526123,
0.348573237657547,
-0.1705939918756485,
-0.5018061995506287,
-0.13230404257774353,
-0.6374368667602539,
0.4433455467224121,
0.24806109070777893,
0.03987694904208183,
0.008629430085420609,
0.06634291261434555,
0.1311943382024765,
-0.19644778966903687,
0.7243822813034058,
-0.25577887892723083,
-0.36009132862091064,
0.22711551189422607,
-0.5849371552467346,
0.08723005652427673,
0.19748982787132263,
0.07061433792114258,
0.4089242219924927,
0.4323520064353943,
0.4398615062236786,
-0.3128746747970581,
-0.4502788484096527,
0.20788104832172394,
0.10225014388561249,
-0.06412666290998459,
-0.010883624665439129,
-0.15863139927387238,
-0.07439032942056656,
-0.26735445857048035,
0.10518383234739304,
-0.04299451410770416,
0.07704931497573853,
0.09504014998674393,
-0.04558778554201126,
-0.07072319835424423,
0.018344514071941376,
0.19131475687026978,
-0.01617375761270523,
-0.06983546912670135,
0.24217435717582703,
0.29987138509750366,
-0.09228360652923584,
0.09461919218301773,
-0.06918132305145264,
0.15996664762496948,
-0.12372353672981262,
-0.19600489735603333,
-0.07253208756446838,
-0.03381509333848953,
0.6675162315368652,
0.24533508718013763,
0.22986744344234467,
0.3670385479927063,
0.09789739549160004,
0.38566499948501587,
-0.40255770087242126,
0.025354525074362755,
0.43677178025245667,
0.22923514246940613,
-0.3920324444770813,
-0.30549854040145874,
0.3532456159591675,
0.30552971363067627,
-0.016957059502601624,
0.5018378496170044,
-0.01442381739616394,
0.004129230510443449,
0.1329769790172577,
-0.01427692174911499,
0.7471274733543396,
-0.3258095979690552,
0.13323765993118286,
-0.30170926451683044,
0.04639894515275955,
0.3842153251171112,
-0.3119760751724243,
0.20140989124774933,
-0.10738250613212585,
-0.23718702793121338,
0.04423949122428894,
0.012799527496099472,
0.30010858178138733,
0.2647271752357483,
-0.12615227699279785,
0.31285354495048523,
0.2669259309768677,
-0.09074270725250244,
-0.12108089029788971,
0.464155912399292,
0.16619552671909332,
-0.44083642959594727,
-0.2453458607196808,
0.07306394726037979,
-0.02932608127593994,
-0.17367257177829742,
0.04854728281497955,
-0.29388219118118286,
0.20224529504776,
0.1478758603334427,
-0.381689190864563,
-0.09094015508890152,
-0.08112118393182755,
0.26814979314804077,
-0.13406363129615784,
-0.12422706186771393,
-0.044148705899715424,
0.061247751116752625,
-0.04844972491264343,
-0.05566517636179924,
-0.05689096450805664,
0.03403348848223686,
-0.24745261669158936,
0.23476862907409668,
-0.24759069085121155,
-0.2561887502670288,
0.10873527079820633,
-0.1369176208972931,
-0.1850023865699768,
-0.12278532236814499,
0.12354674935340881,
-0.5898907780647278,
-0.2854611873626709,
0.20595358312129974,
0.004939097911119461,
0.2578452527523041,
-0.018939249217510223,
0.3219512701034546,
-0.15040092170238495,
-0.1649797409772873,
0.06699410080909729,
0.39536261558532715,
-0.18209028244018555,
0.42124056816101074,
0.1083274632692337,
-0.10378990322351456,
-0.04649961367249489,
0.11547316610813141,
0.16585245728492737,
-0.17086240649223328,
0.1820627897977829,
0.19659604132175446,
-0.18346162140369415,
-0.2009716033935547,
-0.15374082326889038,
-0.13374017179012299,
0.04665849357843399,
0.24913814663887024,
-0.004617486149072647,
-0.09089000523090363,
0.009367025457322598,
0.03124365396797657,
-0.12580321729183197,
-0.06459114700555801,
-0.14875400066375732,
-0.31590163707733154,
-0.12746402621269226,
0.10003578662872314,
-0.26906174421310425,
0.138046532869339,
0.09214750677347183,
0.08710189163684845,
0.088687963783741,
0.5282360911369324,
-0.2911814749240875,
0.032301001250743866,
-0.06001617759466171,
0.13118842244148254,
0.48157235980033875,
-0.020730040967464447,
-0.02861061319708824,
0.22528639435768127,
0.11070121824741364,
0.17181964218616486,
-0.21505168080329895,
-0.2530894875526428,
0.21049188077449799,
0.09223026782274246,
-0.08674893528223038,
0.038046494126319885,
0.0912616103887558,
0.1559925675392151,
-0.29782530665397644,
-0.3565601408481598,
0.02254277467727661,
-0.08213619887828827,
0.019382357597351074,
0.020343683660030365,
0.16839519143104553,
-0.2722153067588806,
0.18225979804992676,
0.03209333121776581,
0.14878743886947632,
-0.08594509959220886,
-0.16205070912837982,
0.2506088316440582,
0.099724180996418,
-0.1601610779762268,
0.18330064415931702,
-0.04291325807571411,
0.31445908546447754,
-0.20851784944534302,
0.20270544290542603,
-0.01075165718793869,
-0.2946523129940033,
-0.07233332097530365,
0.46259796619415283,
0.33775991201400757,
0.2870207130908966,
0.2620429992675781,
0.07707640528678894,
0.11315253376960754,
-0.2261066883802414,
-0.14192500710487366,
0.6985273957252502,
0.02772345021367073,
0.2345365285873413,
-0.028704874217510223,
0.256964772939682,
0.5741375088691711,
0.021092694252729416,
-0.048877205699682236,
-0.027953114360570908,
-0.26409268379211426,
0.08176390826702118,
-0.21538490056991577,
0.2547776401042938,
-0.020600195974111557,
0.21077294647693634,
0.2571157217025757,
0.14071767032146454,
0.13339802622795105,
-0.040063291788101196,
0.7664595246315002,
-0.12304926663637161,
0.2914155423641205,
0.17564398050308228,
-0.33771541714668274,
0.2382441759109497,
0.15969733893871307,
0.1308978945016861,
0.14121843874454498,
0.060382187366485596,
0.3576042652130127,
-0.0241965614259243,
-0.5762880444526672,
-0.22083783149719238,
0.7770306468009949,
-0.09920931607484818,
-0.2864765226840973,
0.14798171818256378,
-0.07641273736953735,
-0.009333238005638123,
0.13941164314746857,
0.15873514115810394,
0.03670269250869751,
0.8322875499725342,
-0.1424618512392044,
0.3206220865249634,
-0.1860063672065735,
0.05008397623896599,
-0.06968951970338821,
0.3375319540500641,
-0.09121061861515045,
-0.19963553547859192,
0.06033753603696823,
-0.15614384412765503,
-0.1357196867465973,
0.47733843326568604,
0.24782150983810425,
0.13398224115371704,
-0.09340168535709381,
0.25752508640289307,
-0.430761456489563,
0.030497441068291664,
-0.1887447088956833,
0.3448915481567383,
-0.16048087179660797,
0.023877359926700592,
0.45079147815704346,
0.05616201460361481,
-0.1108669638633728,
-0.28681322932243347,
-0.09317706525325775,
0.14092017710208893,
-0.4509788751602173,
0.16365572810173035,
-0.1376703977584839,
-0.10649558156728745,
-0.12121519446372986,
0.023302681744098663,
-0.4255393445491791,
-0.17504291236400604,
0.6109222769737244,
-0.5048496127128601,
-0.11795828491449356,
-0.05764267221093178,
0.09092327207326889,
-0.15989913046360016,
0.5806365609169006,
0.30982649326324463,
0.29967349767684937,
-0.05028825253248215,
-0.19277508556842804,
-0.5379376411437988,
-0.4539736807346344,
-0.016678865998983383,
0.08476234972476959,
0.1283779740333557,
0.4404754042625427,
0.23647674918174744,
0.3570863604545593,
0.04513099789619446,
-0.3217487931251526,
0.08707110583782196,
0.08730197697877884,
-0.38876011967658997,
0.23698462545871735,
-0.1745329201221466,
-0.15426743030548096,
0.1626606583595276,
-0.2101680338382721,
0.3319190442562103,
0.07082930207252502,
0.012204986065626144,
-0.1752081960439682,
0.25322791934013367,
0.254922479391098,
-0.09060138463973999,
-0.11705143749713898,
0.21099990606307983,
0.3174998164176941,
-0.2899770140647888,
-0.02388981729745865,
-0.08142930269241333,
0.06248750537633896,
-0.1937699168920517,
0.07047705352306366,
-0.021517284214496613,
0.42097008228302,
-0.21752075850963593,
0.10945191979408264,
-0.05966725945472717,
0.26231008768081665,
-0.11405673623085022,
-0.09235411882400513,
0.06592221558094025,
0.10227909684181213,
0.04511931538581848,
0.128989577293396,
-0.004511751234531403,
0.32545703649520874,
0.035852719098329544,
0.08319130539894104,
-0.15442737936973572,
-0.09351714700460434,
0.28181272745132446,
-0.4838244616985321,
-0.2623061239719391,
-0.30232053995132446,
0.08092235773801804,
0.1815187931060791,
0.22340507805347443,
-0.5047793984413147,
-0.29061970114707947,
0.18537381291389465,
0.0037674717605113983,
-0.002536732703447342,
0.6374949812889099,
-0.13427473604679108,
-0.34223929047584534,
-0.1719226837158203,
-0.18005412817001343,
0.03038323111832142,
-0.3091050088405609,
-0.03354587033390999,
-0.18729716539382935
] |
https://github.com/huggingface/datasets/issues/425 | Correct data structure for PAN-X task in XTREME dataset? | Hi @lhoestq
I made the proposed changes to the `xtreme.py` script. I noticed that I also need to change the schema in the `dataset_infos.json` file. More specifically the `"features"` part of the PAN-X.LANG dataset:
```json
"features":{
"word":{
"dtype":"string",
"id":null,
"_type":"Value"
},
"ner_tag":{
"dtype":"string",
"id":null,
"_type":"Value"
},
"lang":{
"dtype":"string",
"id":null,
"_type":"Value"
}
}
```
To fit the code above the fields `"word"`, `"ner_tag"`, and `"lang"` would become `"words"`, `ner_tags"` and `"langs"`. In addition the `dtype` should be changed from `"string"` to `"list"`.
I made this changes but when trying to test this locally with `dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')` I face the issue that the `dataset_info.json` file is always overwritten by a downloaded version with the old settings, which then throws an error because the schema does not match. This makes it hard to test the changes locally. Do you have any suggestions on how to deal with that?
| Hi 🤗 team!
## Description of the problem
Thanks to the fix from #416 I am now able to load the NER task in the XTREME dataset as follows:
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
dataset_train = dataset['train']
```
However, I am not sure that `load_dataset()` is returning the correct data structure for NER.
Currently, every row in `dataset_train` is of the form
```python
{'word': str, 'ner_tag': str, 'lang': str}
```
but I think we actually want something like
```python
{'words': List[str], 'ner_tags': List[str], 'langs': List[str]}
```
so that each row corresponds to a _sequence_ of words associated with each example. With the current data structure I do not think it is possible to transform `dataset_train` into a form suitable for training because we do not know the boundaries between examples.
Indeed, [this line](https://github.com/google-research/xtreme/blob/522434d1aece34131d997a97ce7e9242a51a688a/third_party/utils_tag.py#L58) in the XTREME repo, processes the texts as lists of sentences, tags, and languages.
## Proposed solution
Replace
```python
with open(filepath) as f:
data = csv.reader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(data):
if row:
lang, word = row[0].split(":")[0], row[0].split(":")[1]
tag = row[1]
yield id_, {"word": word, "ner_tag": tag, "lang": lang}
```
from [these lines](https://github.com/huggingface/nlp/blob/ce7d3a1d630b78fe27188d1706f3ea980e8eec43/datasets/xtreme/xtreme.py#L881-L887) of the `_generate_examples()` function with something like
```python
guid_index = 1
with open(filepath, encoding="utf-8") as f:
words = []
ner_tags = []
langs = []
for line in f:
if line.startswith("-DOCSTART-") or line == "" or line == "\n":
if words:
yield guid_index, {"words": words, "ner_tags": ner_tags, "langs": langs}
guid_index += 1
words = []
ner_tags = []
else:
# pan-x data is tab separated
splits = line.split("\t")
# strip out en: prefix
langs.append(splits[0][:2])
words.append(splits[0][3:])
if len(splits) > 1:
labels.append(splits[-1].replace("\n", ""))
else:
# examples have no label in test set
labels.append("O")
```
If you agree, me or @lvwerra would be happy to implement this and create a PR. | 148 | Correct data structure for PAN-X task in XTREME dataset?
Hi 🤗 team!
## Description of the problem
Thanks to the fix from #416 I am now able to load the NER task in the XTREME dataset as follows:
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
dataset_train = dataset['train']
```
However, I am not sure that `load_dataset()` is returning the correct data structure for NER.
Currently, every row in `dataset_train` is of the form
```python
{'word': str, 'ner_tag': str, 'lang': str}
```
but I think we actually want something like
```python
{'words': List[str], 'ner_tags': List[str], 'langs': List[str]}
```
so that each row corresponds to a _sequence_ of words associated with each example. With the current data structure I do not think it is possible to transform `dataset_train` into a form suitable for training because we do not know the boundaries between examples.
Indeed, [this line](https://github.com/google-research/xtreme/blob/522434d1aece34131d997a97ce7e9242a51a688a/third_party/utils_tag.py#L58) in the XTREME repo, processes the texts as lists of sentences, tags, and languages.
## Proposed solution
Replace
```python
with open(filepath) as f:
data = csv.reader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(data):
if row:
lang, word = row[0].split(":")[0], row[0].split(":")[1]
tag = row[1]
yield id_, {"word": word, "ner_tag": tag, "lang": lang}
```
from [these lines](https://github.com/huggingface/nlp/blob/ce7d3a1d630b78fe27188d1706f3ea980e8eec43/datasets/xtreme/xtreme.py#L881-L887) of the `_generate_examples()` function with something like
```python
guid_index = 1
with open(filepath, encoding="utf-8") as f:
words = []
ner_tags = []
langs = []
for line in f:
if line.startswith("-DOCSTART-") or line == "" or line == "\n":
if words:
yield guid_index, {"words": words, "ner_tags": ner_tags, "langs": langs}
guid_index += 1
words = []
ner_tags = []
else:
# pan-x data is tab separated
splits = line.split("\t")
# strip out en: prefix
langs.append(splits[0][:2])
words.append(splits[0][3:])
if len(splits) > 1:
labels.append(splits[-1].replace("\n", ""))
else:
# examples have no label in test set
labels.append("O")
```
If you agree, me or @lvwerra would be happy to implement this and create a PR.
Hi @lhoestq
I made the proposed changes to the `xtreme.py` script. I noticed that I also need to change the schema in the `dataset_infos.json` file. More specifically the `"features"` part of the PAN-X.LANG dataset:
```json
"features":{
"word":{
"dtype":"string",
"id":null,
"_type":"Value"
},
"ner_tag":{
"dtype":"string",
"id":null,
"_type":"Value"
},
"lang":{
"dtype":"string",
"id":null,
"_type":"Value"
}
}
```
To fit the code above the fields `"word"`, `"ner_tag"`, and `"lang"` would become `"words"`, `ner_tags"` and `"langs"`. In addition the `dtype` should be changed from `"string"` to `"list"`.
I made this changes but when trying to test this locally with `dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')` I face the issue that the `dataset_info.json` file is always overwritten by a downloaded version with the old settings, which then throws an error because the schema does not match. This makes it hard to test the changes locally. Do you have any suggestions on how to deal with that?
| [
-0.04464275389909744,
-0.19605213403701782,
-0.02139165997505188,
0.37166088819503784,
0.03904016688466072,
-0.27633076906204224,
-0.02063705399632454,
0.15795132517814636,
-0.07178053259849548,
-0.06624250113964081,
-0.16135276854038239,
0.2627060115337372,
0.001427648589015007,
0.16808222234249115,
0.42643502354621887,
-0.14670196175575256,
0.04844200983643532,
-0.06990562379360199,
0.27868568897247314,
-0.052614644169807434,
-0.10909321904182434,
0.15061023831367493,
-0.3253748416900635,
0.05446898192167282,
-0.34978753328323364,
0.08372753858566284,
-0.06782099604606628,
0.34624016284942627,
-0.27583932876586914,
-0.49336832761764526,
0.5901552438735962,
0.0610426589846611,
0.3375474512577057,
0.3253481984138489,
-0.00011858232028316706,
0.0073943063616752625,
0.049150001257658005,
-0.2976796329021454,
0.06300021708011627,
-0.5153083205223083,
-0.21160608530044556,
-0.6882326006889343,
-0.07075084745883942,
-0.18635112047195435,
-0.24942392110824585,
-0.06914988160133362,
0.2359093576669693,
0.16131582856178284,
0.3286873400211334,
0.40412986278533936,
0.06675548851490021,
0.11867216229438782,
-0.011228833347558975,
0.16462361812591553,
0.40690523386001587,
0.39126139879226685,
-0.2984112501144409,
-0.0554717518389225,
0.5836412906646729,
0.15009315311908722,
-0.20072373747825623,
0.22613658010959625,
0.06657756865024567,
-0.09574025869369507,
0.2168320119380951,
0.3117488622665405,
0.11062107980251312,
-0.45838838815689087,
-0.20303493738174438,
0.28289154171943665,
0.23043528199195862,
-0.2553836703300476,
-0.2035077065229416,
-0.2779318392276764,
-0.05728354677557945,
-0.29004722833633423,
-0.028027378022670746,
0.36096274852752686,
-0.08088500797748566,
-0.009099416434764862,
0.2543642818927765,
-0.0029820913914591074,
-0.11148083209991455,
0.20313674211502075,
-0.010520737618207932,
0.40962186455726624,
-0.013463913463056087,
-0.10751835256814957,
-0.13960684835910797,
-0.11620770394802094,
0.7018569707870483,
-0.010425791144371033,
0.15768583118915558,
0.11971116065979004,
-0.6041293740272522,
0.08037948608398438,
-0.136322021484375,
-0.2818927764892578,
0.16630539298057556,
-0.04843667894601822,
0.20986615121364594,
0.1589147448539734,
0.14852383732795715,
0.014586754143238068,
0.32137590646743774,
0.20039543509483337,
0.23813706636428833,
0.03101031482219696,
-0.13071288168430328,
0.07348096370697021,
0.0858035683631897,
-0.09635839611291885,
-0.31837522983551025,
0.06530560553073883,
0.23683269321918488,
-0.022806771099567413,
0.288907527923584,
-0.19623742997646332,
-0.36802446842193604,
-0.019991759210824966,
-0.12843027710914612,
0.07258035987615585,
0.1414787620306015,
0.06118037551641464,
0.008061195723712444,
0.5874383449554443,
-0.07428853958845139,
0.17870859801769257,
-0.25383418798446655,
0.02914094552397728,
-0.1472996175289154,
0.16940949857234955,
-0.6243600845336914,
-0.10618644952774048,
0.2582581341266632,
0.0919623076915741,
0.19703930616378784,
-0.006403305567800999,
0.12182029336690903,
-0.332249253988266,
0.1758817434310913,
-0.2791430354118347,
0.2651098668575287,
-0.0158669613301754,
0.24573802947998047,
-0.12957188487052917,
-0.3093242645263672,
-0.009519573301076889,
-0.16474013030529022,
0.2194368541240692,
-0.7123693227767944,
-0.024572990834712982,
0.045095786452293396,
0.07545940577983856,
-0.2141943722963333,
0.1435738503932953,
-0.5043230056762695,
0.0322592630982399,
0.06304409354925156,
0.2181684970855713,
0.10690482705831528,
-0.33061355352401733,
-0.21428973972797394,
-0.07204857468605042,
0.08307000249624252,
0.1326567381620407,
-0.12915048003196716,
0.09738132357597351,
0.0630989819765091,
0.0002566855400800705,
0.10419723391532898,
0.2162792980670929,
-0.010966544039547443,
0.28418105840682983,
-0.18863479793071747,
0.5723387002944946,
0.41958191990852356,
-0.8037277460098267,
-0.3378544747829437,
0.08750887215137482,
-0.16561442613601685,
0.0018319040536880493,
-0.07771510630846024,
0.29997074604034424,
0.21682977676391602,
-0.10970926284790039,
0.28603821992874146,
0.47177934646606445,
-0.0601557195186615,
0.11296435445547104,
-0.10558265447616577,
0.26627710461616516,
-0.11809389293193817,
0.32159972190856934,
0.042097434401512146,
-0.26852965354919434,
-0.15946286916732788,
0.07514169067144394,
0.19486139714717865,
-0.11582812666893005,
0.0870852842926979,
0.43145424127578735,
0.0892733484506607,
-0.051384203135967255,
-0.05062389373779297,
0.0383254736661911,
-0.7624906897544861,
0.11410128325223923,
-0.42895954847335815,
0.37934422492980957,
0.010657034814357758,
-0.06719508767127991,
-0.17284244298934937,
-0.05107598379254341,
-0.29626187682151794,
-0.19065457582473755,
0.10716113448143005,
-0.12099935114383698,
-0.12378156185150146,
-0.3034520447254181,
-0.07628585398197174,
0.39741525053977966,
-0.22609782218933105,
0.07376275211572647,
-0.5780189037322998,
0.3407828211784363,
0.1180049404501915,
-0.06648483127355576,
-0.012310212478041649,
0.4472563564777374,
0.19224992394447327,
-0.04829661175608635,
0.16846004128456116,
0.22092205286026,
0.2148897498846054,
-0.1571744829416275,
-0.061233825981616974,
-0.0020258426666259766,
0.13349299132823944,
-0.577785313129425,
0.06592767685651779,
0.22309930622577667,
-0.0014228797517716885,
-0.21430495381355286,
-0.124354787170887,
0.5517558455467224,
0.18477055430412292,
0.20728452503681183,
0.028972797095775604,
0.07075013220310211,
0.2122231125831604,
-0.1713617891073227,
-0.23443341255187988,
-0.10390469431877136,
0.1545494943857193,
0.1233174204826355,
0.030547354370355606,
0.09956583380699158,
-0.5023415088653564,
0.020013146102428436,
0.3077196478843689,
0.027430519461631775,
0.18981873989105225,
0.20472675561904907,
-0.15310940146446228,
-0.07916487753391266,
0.03745778650045395,
0.3701203763484955,
0.35908687114715576,
0.09142747521400452,
0.10988552868366241,
0.13040754199028015,
-0.03294118121266365,
0.07248833030462265,
-0.03588453680276871,
0.061754144728183746,
0.15101750195026398,
0.2119649350643158,
0.1785157173871994,
-0.08419505506753922,
-0.08589636534452438,
-0.21915023028850555,
0.03217769414186478,
0.15216302871704102,
-0.3294999301433563,
0.07806934416294098,
0.03682194650173187,
-0.4502646028995514,
-0.14737409353256226,
0.04417244344949722,
-0.13615788519382477,
-0.31933632493019104,
-0.037922099232673645,
-0.05715597793459892,
0.23877432942390442,
0.08406692743301392,
-0.4746886193752289,
-0.215085968375206,
-0.19860243797302246,
-0.3406285047531128,
-0.05831490829586983,
0.07429353892803192,
-0.13823866844177246,
-0.026753896847367287,
0.211973175406456,
0.5459078550338745,
-0.0312718003988266,
-0.4353145956993103,
0.3901611566543579,
-0.3872416615486145,
-0.20231151580810547,
0.3016566038131714,
-0.263822078704834,
0.3121573030948639,
0.21715490520000458,
-0.10408598184585571,
-0.4046025276184082,
0.1959170252084732,
0.18749186396598816,
-0.3214801549911499,
-0.314125657081604,
0.3168617784976959,
-0.1772628128528595,
-0.09167474508285522,
-0.026444029062986374,
-0.4063451886177063,
-0.5237718224525452,
-0.20548740029335022,
0.011993903666734695,
0.22303138673305511,
0.31624358892440796,
0.2151387482881546,
-0.25966671109199524,
-0.14515095949172974,
-0.1321808248758316,
-0.19551131129264832,
0.006959549151360989,
-0.5726137161254883,
0.4568420350551605,
-0.24419450759887695,
-0.205152228474617,
-0.0859803557395935,
-0.2658783793449402,
0.47131961584091187,
0.3780290484428406,
-0.06849372386932373,
-0.037540920078754425,
0.14133842289447784,
0.035181645303964615,
0.17770901322364807,
-0.062219537794589996,
0.2964114546775818,
-0.21413548290729523,
0.04570496827363968,
-0.02779005467891693,
-0.00812397338449955,
0.07852567732334137,
0.3201448321342468,
0.23043784499168396,
-0.026519089937210083,
-0.25716838240623474,
0.11034706234931946,
0.06357670575380325,
0.15529005229473114,
0.046334296464920044,
0.43679335713386536,
0.005378788337111473,
0.1145692691206932,
0.0847834050655365,
0.02240857295691967,
-0.1640300303697586,
0.060146331787109375,
0.23326946794986725,
-0.000989384949207306,
0.2357877790927887,
-0.15477226674556732,
-0.07209773361682892,
0.12637114524841309,
-0.13299891352653503,
-0.21512067317962646,
0.5398620963096619,
-0.13975439965724945,
0.41052353382110596,
-0.17096178233623505,
0.026817917823791504,
-0.061433095484972,
-0.45806974172592163,
-0.2571300268173218,
0.08614960312843323,
0.17971578240394592,
0.15540476143360138,
-0.6861743927001953,
0.39854326844215393,
-0.3888286352157593,
-0.020632371306419373,
0.17285068333148956,
0.5378322601318359,
0.21202485263347626,
0.0804055854678154,
0.15717245638370514,
-0.03739937022328377,
0.3112250864505768,
-0.2897290885448456,
-0.1462429016828537,
0.10926090180873871,
0.10011525452136993,
-0.32502371072769165,
-0.04307326674461365,
-0.250880628824234,
0.02652989700436592,
0.4807163178920746,
0.403067022562027,
-0.30203479528427124,
-0.44885748624801636,
-0.014215212315320969,
0.047435179352760315,
-0.2095983922481537,
-0.19778315722942352,
-0.2662701904773712,
-0.450519859790802,
-0.09220097213983536,
-0.09107863157987595,
0.5540921688079834,
-0.011968165636062622,
0.2859899401664734,
0.028919849544763565,
-0.23574908077716827,
0.26541540026664734,
0.33019116520881653,
-0.03711432218551636,
0.5644023418426514,
-0.239581897854805,
0.005737707018852234,
-0.06575553864240646,
-0.08433029055595398,
0.2901480495929718,
0.480325847864151,
-0.18594028055667877,
-0.15045329928398132,
0.18000510334968567,
-0.22384506464004517,
0.4223897159099579,
0.1663798987865448,
0.1885034739971161,
0.01889578253030777,
-0.2950087785720825,
-0.0011858046054840088,
-0.1358928382396698,
0.1362023800611496,
0.3885795772075653,
-0.10829775780439377,
-0.4188081622123718,
-0.3653249144554138,
0.17683625221252441,
0.3088773787021637,
0.1055980771780014,
-0.23104333877563477,
-0.17216072976589203,
-0.2617758810520172,
-0.14155851304531097,
0.46636879444122314,
1.0166808366775513,
0.0301852747797966,
0.4335702955722809,
0.1726902425289154,
0.08972659707069397,
0.060726866126060486,
-0.4444866180419922,
0.20499400794506073,
-0.34820398688316345,
-0.32858824729919434,
-0.2036452740430832,
-0.25741440057754517,
-0.06209098547697067,
0.20261552929878235,
0.03191273286938667,
0.6626027822494507,
0.22569088637828827,
-0.04478941485285759,
0.022951338440179825,
0.21596956253051758,
0.009368260391056538,
-0.3867398202419281,
-0.3745245933532715,
0.004031799733638763,
-0.2863348722457886,
0.014986012130975723,
-0.15357694029808044,
-0.20838339626789093,
-0.059148844331502914,
0.19947576522827148,
0.13996614515781403,
0.2819463312625885,
0.09344667941331863,
-0.18290680646896362,
0.423927903175354,
-0.5605946183204651,
-0.053347278386354446,
0.24287216365337372,
0.0773037001490593,
-0.32219091057777405,
0.0031519345939159393,
0.23612350225448608,
0.40504196286201477,
0.10099712014198303,
0.39132431149482727,
-0.3321992754936218,
0.2601027190685272,
0.04982813447713852,
0.12219186872243881,
-0.24286070466041565,
0.15816007554531097,
-0.03726261109113693,
-0.4174329936504364,
0.04797276109457016,
-0.17502643167972565,
-0.2749728560447693,
-0.20879870653152466,
0.026938043534755707,
-0.1443691849708557,
-0.049738168716430664,
0.05494077503681183,
0.25943616032600403,
-0.0902872085571289,
0.1481013000011444,
0.11329205334186554,
-0.25920581817626953,
0.19909194111824036,
0.08319039642810822,
0.2976745665073395,
-0.312531977891922,
0.03761027380824089,
0.24821247160434723,
0.01513497531414032,
-0.09923584014177322,
0.18058207631111145,
0.48215076327323914,
-0.6173619031906128,
0.033748023211956024,
-0.24345006048679352,
-0.013798847794532776,
-0.016300374642014503,
0.1851167529821396,
0.0020546577870845795,
-0.2624996304512024,
0.16277499496936798,
-0.2828570604324341,
-0.34099218249320984,
0.3751993179321289,
0.11637763679027557,
0.27829140424728394,
-0.19798550009727478,
0.009825963526964188,
0.15099358558654785,
-0.2200443595647812,
-0.23904992640018463,
0.17531585693359375,
-0.17947077751159668,
0.1961243897676468,
-0.11576478183269501,
-0.0962916687130928,
0.08040372282266617,
-0.09420141577720642,
-0.02496936358511448,
0.2664698362350464,
-0.14584457874298096,
-0.057853832840919495,
0.01793384552001953,
0.12439148128032684,
0.13275215029716492,
-0.11576977372169495,
0.12489146739244461,
0.12000446021556854,
-0.05154125764966011,
-0.1373375803232193,
-0.11356814205646515,
0.18000149726867676,
0.022833991795778275,
0.23035284876823425,
-0.2976283133029938,
0.03927427530288696,
-0.1231653094291687,
0.2310589700937271,
0.18953865766525269,
0.12020587176084518,
0.06575057655572891,
0.20725132524967194,
-0.051119327545166016,
0.02486628293991089,
-0.518206000328064,
0.2064265012741089,
0.19672639667987823,
0.3688439726829529,
0.21520006656646729,
-0.15535631775856018,
0.10563802719116211,
-0.03227846696972847,
0.14986878633499146,
0.3083641231060028,
-0.2699721157550812,
-0.005844211205840111,
0.24190416932106018,
0.1483670324087143,
-0.15884387493133545,
-0.004972503520548344,
0.3671058714389801,
0.00789102353155613,
0.008068230003118515,
0.47907382249832153,
0.35250240564346313,
0.13681535422801971,
-0.14634595811367035,
0.0633271187543869,
0.2355751097202301,
-0.25352680683135986,
0.0676126629114151,
0.40521225333213806,
-0.0051036737859249115,
0.13945713639259338,
0.599587082862854,
0.033287905156612396,
-0.11432916671037674,
0.6000962853431702,
0.3011855483055115,
0.7809865474700928,
0.19955968856811523,
0.17875421047210693,
-0.06581107527017593,
-0.10446497797966003,
-0.4129892885684967,
0.25482863187789917,
0.12739695608615875,
0.17695334553718567,
0.038353025913238525,
0.14328710734844208,
0.14535674452781677,
-0.18604730069637299,
-0.09647668153047562,
0.11350005865097046,
-0.3404926359653473,
0.022930849343538284,
-0.3317873775959015,
-0.23424312472343445,
-0.12177465856075287,
-0.11770045757293701,
-0.1722741574048996,
0.03673800826072693,
0.06148897483944893,
0.13393880426883698,
-0.007461577653884888,
-0.06121181696653366,
0.08235339820384979,
0.2852357029914856,
0.0478242002427578,
-0.19770735502243042,
0.5288452506065369,
0.03390124440193176,
-0.04695738106966019,
-0.15871161222457886,
0.2742474675178528,
0.2531476318836212,
0.23150309920310974,
-0.051973287016153336,
-0.10700377821922302,
0.33872777223587036,
-0.11022772639989853,
-0.02969331108033657,
0.10047439485788345,
0.20050597190856934,
0.2549164891242981,
0.18043357133865356,
0.06518242508172989,
-0.004352087154984474,
0.30100035667419434,
0.06953579187393188,
-0.1928669959306717,
0.24358555674552917,
0.2801606357097626,
0.18614518642425537,
-0.289045512676239,
-0.12946182489395142,
-0.2241022288799286,
-0.3388960063457489,
-0.16421033442020416,
0.3142121136188507,
-0.14284059405326843,
0.24048084020614624,
-0.13081492483615875,
0.05084576457738876,
0.042049188166856766,
0.19686733186244965,
0.11872286349534988,
0.11401635408401489,
-0.4945983290672302,
-0.08852370828390121,
-0.74571293592453,
0.20055335760116577,
-0.30969181656837463,
-0.2826581299304962,
0.23557013273239136,
0.02660430409014225,
-0.04746042937040329,
0.30229973793029785,
-0.23467423021793365,
0.22896738350391388,
0.06854754686355591,
0.33479851484298706,
-0.6064161062240601,
0.06857948005199432,
0.2317822128534317,
0.3589978814125061,
0.05319151282310486,
-0.1249815970659256,
-0.27646830677986145,
0.21865369379520416,
-0.07028916478157043,
-0.07275889813899994,
-0.06854415684938431,
-0.18967397511005402,
-0.05582594871520996,
0.2673412561416626,
-0.21242322027683258,
0.15677624940872192,
-0.07460591197013855,
-0.1744633913040161,
-0.2747468650341034,
-0.05971069261431694,
-0.16448549926280975,
0.021056000143289566,
0.10053874552249908,
0.3167751729488373,
0.0033469656482338905,
0.15478681027889252,
-0.3915070593357086,
-0.29847875237464905,
0.013277266174554825,
0.08274979889392853,
-0.36418476700782776,
0.43281060457229614,
-0.23216262459754944,
0.14379528164863586,
0.03772234916687012,
0.225971519947052,
0.07463199645280838,
-0.0033202767372131348,
-0.15939195454120636,
-0.44558483362197876,
0.26130303740501404,
0.2699015140533447,
-0.19865679740905762,
-0.11950132250785828,
0.004335224628448486,
0.10739297419786453,
0.12586970627307892,
-0.44796597957611084,
0.1364089548587799,
0.1799706518650055,
-0.04512178897857666,
-0.09457534551620483,
0.08399622142314911,
-0.023716628551483154,
-0.07817844301462173,
-0.13010551035404205,
0.12380357086658478,
-0.026283573359251022,
-0.11458490043878555,
-0.20401231944561005,
-0.15853053331375122
] |
https://github.com/huggingface/datasets/issues/425 | Correct data structure for PAN-X task in XTREME dataset? | Hi !
You have to point to your local script.
First clone the repo and then:
```python
dataset = load_dataset("./datasets/xtreme", "PAN-X.en")
```
The "xtreme" directory contains "xtreme.py".
You also have to change the features definition in the `_info` method. You could use:
```python
features = nlp.Features({
"words": [nlp.Value("string")],
"ner_tags": [nlp.Value("string")],
"langs": [nlp.Value("string")],
})
```
Hope this helps !
Let me know if you have other questions. | Hi 🤗 team!
## Description of the problem
Thanks to the fix from #416 I am now able to load the NER task in the XTREME dataset as follows:
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
dataset_train = dataset['train']
```
However, I am not sure that `load_dataset()` is returning the correct data structure for NER.
Currently, every row in `dataset_train` is of the form
```python
{'word': str, 'ner_tag': str, 'lang': str}
```
but I think we actually want something like
```python
{'words': List[str], 'ner_tags': List[str], 'langs': List[str]}
```
so that each row corresponds to a _sequence_ of words associated with each example. With the current data structure I do not think it is possible to transform `dataset_train` into a form suitable for training because we do not know the boundaries between examples.
Indeed, [this line](https://github.com/google-research/xtreme/blob/522434d1aece34131d997a97ce7e9242a51a688a/third_party/utils_tag.py#L58) in the XTREME repo, processes the texts as lists of sentences, tags, and languages.
## Proposed solution
Replace
```python
with open(filepath) as f:
data = csv.reader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(data):
if row:
lang, word = row[0].split(":")[0], row[0].split(":")[1]
tag = row[1]
yield id_, {"word": word, "ner_tag": tag, "lang": lang}
```
from [these lines](https://github.com/huggingface/nlp/blob/ce7d3a1d630b78fe27188d1706f3ea980e8eec43/datasets/xtreme/xtreme.py#L881-L887) of the `_generate_examples()` function with something like
```python
guid_index = 1
with open(filepath, encoding="utf-8") as f:
words = []
ner_tags = []
langs = []
for line in f:
if line.startswith("-DOCSTART-") or line == "" or line == "\n":
if words:
yield guid_index, {"words": words, "ner_tags": ner_tags, "langs": langs}
guid_index += 1
words = []
ner_tags = []
else:
# pan-x data is tab separated
splits = line.split("\t")
# strip out en: prefix
langs.append(splits[0][:2])
words.append(splits[0][3:])
if len(splits) > 1:
labels.append(splits[-1].replace("\n", ""))
else:
# examples have no label in test set
labels.append("O")
```
If you agree, me or @lvwerra would be happy to implement this and create a PR. | 66 | Correct data structure for PAN-X task in XTREME dataset?
Hi 🤗 team!
## Description of the problem
Thanks to the fix from #416 I am now able to load the NER task in the XTREME dataset as follows:
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
dataset_train = dataset['train']
```
However, I am not sure that `load_dataset()` is returning the correct data structure for NER.
Currently, every row in `dataset_train` is of the form
```python
{'word': str, 'ner_tag': str, 'lang': str}
```
but I think we actually want something like
```python
{'words': List[str], 'ner_tags': List[str], 'langs': List[str]}
```
so that each row corresponds to a _sequence_ of words associated with each example. With the current data structure I do not think it is possible to transform `dataset_train` into a form suitable for training because we do not know the boundaries between examples.
Indeed, [this line](https://github.com/google-research/xtreme/blob/522434d1aece34131d997a97ce7e9242a51a688a/third_party/utils_tag.py#L58) in the XTREME repo, processes the texts as lists of sentences, tags, and languages.
## Proposed solution
Replace
```python
with open(filepath) as f:
data = csv.reader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(data):
if row:
lang, word = row[0].split(":")[0], row[0].split(":")[1]
tag = row[1]
yield id_, {"word": word, "ner_tag": tag, "lang": lang}
```
from [these lines](https://github.com/huggingface/nlp/blob/ce7d3a1d630b78fe27188d1706f3ea980e8eec43/datasets/xtreme/xtreme.py#L881-L887) of the `_generate_examples()` function with something like
```python
guid_index = 1
with open(filepath, encoding="utf-8") as f:
words = []
ner_tags = []
langs = []
for line in f:
if line.startswith("-DOCSTART-") or line == "" or line == "\n":
if words:
yield guid_index, {"words": words, "ner_tags": ner_tags, "langs": langs}
guid_index += 1
words = []
ner_tags = []
else:
# pan-x data is tab separated
splits = line.split("\t")
# strip out en: prefix
langs.append(splits[0][:2])
words.append(splits[0][3:])
if len(splits) > 1:
labels.append(splits[-1].replace("\n", ""))
else:
# examples have no label in test set
labels.append("O")
```
If you agree, me or @lvwerra would be happy to implement this and create a PR.
Hi !
You have to point to your local script.
First clone the repo and then:
```python
dataset = load_dataset("./datasets/xtreme", "PAN-X.en")
```
The "xtreme" directory contains "xtreme.py".
You also have to change the features definition in the `_info` method. You could use:
```python
features = nlp.Features({
"words": [nlp.Value("string")],
"ner_tags": [nlp.Value("string")],
"langs": [nlp.Value("string")],
})
```
Hope this helps !
Let me know if you have other questions. | [
-0.04464275389909744,
-0.19605213403701782,
-0.02139165997505188,
0.37166088819503784,
0.03904016688466072,
-0.27633076906204224,
-0.02063705399632454,
0.15795132517814636,
-0.07178053259849548,
-0.06624250113964081,
-0.16135276854038239,
0.2627060115337372,
0.001427648589015007,
0.16808222234249115,
0.42643502354621887,
-0.14670196175575256,
0.04844200983643532,
-0.06990562379360199,
0.27868568897247314,
-0.052614644169807434,
-0.10909321904182434,
0.15061023831367493,
-0.3253748416900635,
0.05446898192167282,
-0.34978753328323364,
0.08372753858566284,
-0.06782099604606628,
0.34624016284942627,
-0.27583932876586914,
-0.49336832761764526,
0.5901552438735962,
0.0610426589846611,
0.3375474512577057,
0.3253481984138489,
-0.00011858232028316706,
0.0073943063616752625,
0.049150001257658005,
-0.2976796329021454,
0.06300021708011627,
-0.5153083205223083,
-0.21160608530044556,
-0.6882326006889343,
-0.07075084745883942,
-0.18635112047195435,
-0.24942392110824585,
-0.06914988160133362,
0.2359093576669693,
0.16131582856178284,
0.3286873400211334,
0.40412986278533936,
0.06675548851490021,
0.11867216229438782,
-0.011228833347558975,
0.16462361812591553,
0.40690523386001587,
0.39126139879226685,
-0.2984112501144409,
-0.0554717518389225,
0.5836412906646729,
0.15009315311908722,
-0.20072373747825623,
0.22613658010959625,
0.06657756865024567,
-0.09574025869369507,
0.2168320119380951,
0.3117488622665405,
0.11062107980251312,
-0.45838838815689087,
-0.20303493738174438,
0.28289154171943665,
0.23043528199195862,
-0.2553836703300476,
-0.2035077065229416,
-0.2779318392276764,
-0.05728354677557945,
-0.29004722833633423,
-0.028027378022670746,
0.36096274852752686,
-0.08088500797748566,
-0.009099416434764862,
0.2543642818927765,
-0.0029820913914591074,
-0.11148083209991455,
0.20313674211502075,
-0.010520737618207932,
0.40962186455726624,
-0.013463913463056087,
-0.10751835256814957,
-0.13960684835910797,
-0.11620770394802094,
0.7018569707870483,
-0.010425791144371033,
0.15768583118915558,
0.11971116065979004,
-0.6041293740272522,
0.08037948608398438,
-0.136322021484375,
-0.2818927764892578,
0.16630539298057556,
-0.04843667894601822,
0.20986615121364594,
0.1589147448539734,
0.14852383732795715,
0.014586754143238068,
0.32137590646743774,
0.20039543509483337,
0.23813706636428833,
0.03101031482219696,
-0.13071288168430328,
0.07348096370697021,
0.0858035683631897,
-0.09635839611291885,
-0.31837522983551025,
0.06530560553073883,
0.23683269321918488,
-0.022806771099567413,
0.288907527923584,
-0.19623742997646332,
-0.36802446842193604,
-0.019991759210824966,
-0.12843027710914612,
0.07258035987615585,
0.1414787620306015,
0.06118037551641464,
0.008061195723712444,
0.5874383449554443,
-0.07428853958845139,
0.17870859801769257,
-0.25383418798446655,
0.02914094552397728,
-0.1472996175289154,
0.16940949857234955,
-0.6243600845336914,
-0.10618644952774048,
0.2582581341266632,
0.0919623076915741,
0.19703930616378784,
-0.006403305567800999,
0.12182029336690903,
-0.332249253988266,
0.1758817434310913,
-0.2791430354118347,
0.2651098668575287,
-0.0158669613301754,
0.24573802947998047,
-0.12957188487052917,
-0.3093242645263672,
-0.009519573301076889,
-0.16474013030529022,
0.2194368541240692,
-0.7123693227767944,
-0.024572990834712982,
0.045095786452293396,
0.07545940577983856,
-0.2141943722963333,
0.1435738503932953,
-0.5043230056762695,
0.0322592630982399,
0.06304409354925156,
0.2181684970855713,
0.10690482705831528,
-0.33061355352401733,
-0.21428973972797394,
-0.07204857468605042,
0.08307000249624252,
0.1326567381620407,
-0.12915048003196716,
0.09738132357597351,
0.0630989819765091,
0.0002566855400800705,
0.10419723391532898,
0.2162792980670929,
-0.010966544039547443,
0.28418105840682983,
-0.18863479793071747,
0.5723387002944946,
0.41958191990852356,
-0.8037277460098267,
-0.3378544747829437,
0.08750887215137482,
-0.16561442613601685,
0.0018319040536880493,
-0.07771510630846024,
0.29997074604034424,
0.21682977676391602,
-0.10970926284790039,
0.28603821992874146,
0.47177934646606445,
-0.0601557195186615,
0.11296435445547104,
-0.10558265447616577,
0.26627710461616516,
-0.11809389293193817,
0.32159972190856934,
0.042097434401512146,
-0.26852965354919434,
-0.15946286916732788,
0.07514169067144394,
0.19486139714717865,
-0.11582812666893005,
0.0870852842926979,
0.43145424127578735,
0.0892733484506607,
-0.051384203135967255,
-0.05062389373779297,
0.0383254736661911,
-0.7624906897544861,
0.11410128325223923,
-0.42895954847335815,
0.37934422492980957,
0.010657034814357758,
-0.06719508767127991,
-0.17284244298934937,
-0.05107598379254341,
-0.29626187682151794,
-0.19065457582473755,
0.10716113448143005,
-0.12099935114383698,
-0.12378156185150146,
-0.3034520447254181,
-0.07628585398197174,
0.39741525053977966,
-0.22609782218933105,
0.07376275211572647,
-0.5780189037322998,
0.3407828211784363,
0.1180049404501915,
-0.06648483127355576,
-0.012310212478041649,
0.4472563564777374,
0.19224992394447327,
-0.04829661175608635,
0.16846004128456116,
0.22092205286026,
0.2148897498846054,
-0.1571744829416275,
-0.061233825981616974,
-0.0020258426666259766,
0.13349299132823944,
-0.577785313129425,
0.06592767685651779,
0.22309930622577667,
-0.0014228797517716885,
-0.21430495381355286,
-0.124354787170887,
0.5517558455467224,
0.18477055430412292,
0.20728452503681183,
0.028972797095775604,
0.07075013220310211,
0.2122231125831604,
-0.1713617891073227,
-0.23443341255187988,
-0.10390469431877136,
0.1545494943857193,
0.1233174204826355,
0.030547354370355606,
0.09956583380699158,
-0.5023415088653564,
0.020013146102428436,
0.3077196478843689,
0.027430519461631775,
0.18981873989105225,
0.20472675561904907,
-0.15310940146446228,
-0.07916487753391266,
0.03745778650045395,
0.3701203763484955,
0.35908687114715576,
0.09142747521400452,
0.10988552868366241,
0.13040754199028015,
-0.03294118121266365,
0.07248833030462265,
-0.03588453680276871,
0.061754144728183746,
0.15101750195026398,
0.2119649350643158,
0.1785157173871994,
-0.08419505506753922,
-0.08589636534452438,
-0.21915023028850555,
0.03217769414186478,
0.15216302871704102,
-0.3294999301433563,
0.07806934416294098,
0.03682194650173187,
-0.4502646028995514,
-0.14737409353256226,
0.04417244344949722,
-0.13615788519382477,
-0.31933632493019104,
-0.037922099232673645,
-0.05715597793459892,
0.23877432942390442,
0.08406692743301392,
-0.4746886193752289,
-0.215085968375206,
-0.19860243797302246,
-0.3406285047531128,
-0.05831490829586983,
0.07429353892803192,
-0.13823866844177246,
-0.026753896847367287,
0.211973175406456,
0.5459078550338745,
-0.0312718003988266,
-0.4353145956993103,
0.3901611566543579,
-0.3872416615486145,
-0.20231151580810547,
0.3016566038131714,
-0.263822078704834,
0.3121573030948639,
0.21715490520000458,
-0.10408598184585571,
-0.4046025276184082,
0.1959170252084732,
0.18749186396598816,
-0.3214801549911499,
-0.314125657081604,
0.3168617784976959,
-0.1772628128528595,
-0.09167474508285522,
-0.026444029062986374,
-0.4063451886177063,
-0.5237718224525452,
-0.20548740029335022,
0.011993903666734695,
0.22303138673305511,
0.31624358892440796,
0.2151387482881546,
-0.25966671109199524,
-0.14515095949172974,
-0.1321808248758316,
-0.19551131129264832,
0.006959549151360989,
-0.5726137161254883,
0.4568420350551605,
-0.24419450759887695,
-0.205152228474617,
-0.0859803557395935,
-0.2658783793449402,
0.47131961584091187,
0.3780290484428406,
-0.06849372386932373,
-0.037540920078754425,
0.14133842289447784,
0.035181645303964615,
0.17770901322364807,
-0.062219537794589996,
0.2964114546775818,
-0.21413548290729523,
0.04570496827363968,
-0.02779005467891693,
-0.00812397338449955,
0.07852567732334137,
0.3201448321342468,
0.23043784499168396,
-0.026519089937210083,
-0.25716838240623474,
0.11034706234931946,
0.06357670575380325,
0.15529005229473114,
0.046334296464920044,
0.43679335713386536,
0.005378788337111473,
0.1145692691206932,
0.0847834050655365,
0.02240857295691967,
-0.1640300303697586,
0.060146331787109375,
0.23326946794986725,
-0.000989384949207306,
0.2357877790927887,
-0.15477226674556732,
-0.07209773361682892,
0.12637114524841309,
-0.13299891352653503,
-0.21512067317962646,
0.5398620963096619,
-0.13975439965724945,
0.41052353382110596,
-0.17096178233623505,
0.026817917823791504,
-0.061433095484972,
-0.45806974172592163,
-0.2571300268173218,
0.08614960312843323,
0.17971578240394592,
0.15540476143360138,
-0.6861743927001953,
0.39854326844215393,
-0.3888286352157593,
-0.020632371306419373,
0.17285068333148956,
0.5378322601318359,
0.21202485263347626,
0.0804055854678154,
0.15717245638370514,
-0.03739937022328377,
0.3112250864505768,
-0.2897290885448456,
-0.1462429016828537,
0.10926090180873871,
0.10011525452136993,
-0.32502371072769165,
-0.04307326674461365,
-0.250880628824234,
0.02652989700436592,
0.4807163178920746,
0.403067022562027,
-0.30203479528427124,
-0.44885748624801636,
-0.014215212315320969,
0.047435179352760315,
-0.2095983922481537,
-0.19778315722942352,
-0.2662701904773712,
-0.450519859790802,
-0.09220097213983536,
-0.09107863157987595,
0.5540921688079834,
-0.011968165636062622,
0.2859899401664734,
0.028919849544763565,
-0.23574908077716827,
0.26541540026664734,
0.33019116520881653,
-0.03711432218551636,
0.5644023418426514,
-0.239581897854805,
0.005737707018852234,
-0.06575553864240646,
-0.08433029055595398,
0.2901480495929718,
0.480325847864151,
-0.18594028055667877,
-0.15045329928398132,
0.18000510334968567,
-0.22384506464004517,
0.4223897159099579,
0.1663798987865448,
0.1885034739971161,
0.01889578253030777,
-0.2950087785720825,
-0.0011858046054840088,
-0.1358928382396698,
0.1362023800611496,
0.3885795772075653,
-0.10829775780439377,
-0.4188081622123718,
-0.3653249144554138,
0.17683625221252441,
0.3088773787021637,
0.1055980771780014,
-0.23104333877563477,
-0.17216072976589203,
-0.2617758810520172,
-0.14155851304531097,
0.46636879444122314,
1.0166808366775513,
0.0301852747797966,
0.4335702955722809,
0.1726902425289154,
0.08972659707069397,
0.060726866126060486,
-0.4444866180419922,
0.20499400794506073,
-0.34820398688316345,
-0.32858824729919434,
-0.2036452740430832,
-0.25741440057754517,
-0.06209098547697067,
0.20261552929878235,
0.03191273286938667,
0.6626027822494507,
0.22569088637828827,
-0.04478941485285759,
0.022951338440179825,
0.21596956253051758,
0.009368260391056538,
-0.3867398202419281,
-0.3745245933532715,
0.004031799733638763,
-0.2863348722457886,
0.014986012130975723,
-0.15357694029808044,
-0.20838339626789093,
-0.059148844331502914,
0.19947576522827148,
0.13996614515781403,
0.2819463312625885,
0.09344667941331863,
-0.18290680646896362,
0.423927903175354,
-0.5605946183204651,
-0.053347278386354446,
0.24287216365337372,
0.0773037001490593,
-0.32219091057777405,
0.0031519345939159393,
0.23612350225448608,
0.40504196286201477,
0.10099712014198303,
0.39132431149482727,
-0.3321992754936218,
0.2601027190685272,
0.04982813447713852,
0.12219186872243881,
-0.24286070466041565,
0.15816007554531097,
-0.03726261109113693,
-0.4174329936504364,
0.04797276109457016,
-0.17502643167972565,
-0.2749728560447693,
-0.20879870653152466,
0.026938043534755707,
-0.1443691849708557,
-0.049738168716430664,
0.05494077503681183,
0.25943616032600403,
-0.0902872085571289,
0.1481013000011444,
0.11329205334186554,
-0.25920581817626953,
0.19909194111824036,
0.08319039642810822,
0.2976745665073395,
-0.312531977891922,
0.03761027380824089,
0.24821247160434723,
0.01513497531414032,
-0.09923584014177322,
0.18058207631111145,
0.48215076327323914,
-0.6173619031906128,
0.033748023211956024,
-0.24345006048679352,
-0.013798847794532776,
-0.016300374642014503,
0.1851167529821396,
0.0020546577870845795,
-0.2624996304512024,
0.16277499496936798,
-0.2828570604324341,
-0.34099218249320984,
0.3751993179321289,
0.11637763679027557,
0.27829140424728394,
-0.19798550009727478,
0.009825963526964188,
0.15099358558654785,
-0.2200443595647812,
-0.23904992640018463,
0.17531585693359375,
-0.17947077751159668,
0.1961243897676468,
-0.11576478183269501,
-0.0962916687130928,
0.08040372282266617,
-0.09420141577720642,
-0.02496936358511448,
0.2664698362350464,
-0.14584457874298096,
-0.057853832840919495,
0.01793384552001953,
0.12439148128032684,
0.13275215029716492,
-0.11576977372169495,
0.12489146739244461,
0.12000446021556854,
-0.05154125764966011,
-0.1373375803232193,
-0.11356814205646515,
0.18000149726867676,
0.022833991795778275,
0.23035284876823425,
-0.2976283133029938,
0.03927427530288696,
-0.1231653094291687,
0.2310589700937271,
0.18953865766525269,
0.12020587176084518,
0.06575057655572891,
0.20725132524967194,
-0.051119327545166016,
0.02486628293991089,
-0.518206000328064,
0.2064265012741089,
0.19672639667987823,
0.3688439726829529,
0.21520006656646729,
-0.15535631775856018,
0.10563802719116211,
-0.03227846696972847,
0.14986878633499146,
0.3083641231060028,
-0.2699721157550812,
-0.005844211205840111,
0.24190416932106018,
0.1483670324087143,
-0.15884387493133545,
-0.004972503520548344,
0.3671058714389801,
0.00789102353155613,
0.008068230003118515,
0.47907382249832153,
0.35250240564346313,
0.13681535422801971,
-0.14634595811367035,
0.0633271187543869,
0.2355751097202301,
-0.25352680683135986,
0.0676126629114151,
0.40521225333213806,
-0.0051036737859249115,
0.13945713639259338,
0.599587082862854,
0.033287905156612396,
-0.11432916671037674,
0.6000962853431702,
0.3011855483055115,
0.7809865474700928,
0.19955968856811523,
0.17875421047210693,
-0.06581107527017593,
-0.10446497797966003,
-0.4129892885684967,
0.25482863187789917,
0.12739695608615875,
0.17695334553718567,
0.038353025913238525,
0.14328710734844208,
0.14535674452781677,
-0.18604730069637299,
-0.09647668153047562,
0.11350005865097046,
-0.3404926359653473,
0.022930849343538284,
-0.3317873775959015,
-0.23424312472343445,
-0.12177465856075287,
-0.11770045757293701,
-0.1722741574048996,
0.03673800826072693,
0.06148897483944893,
0.13393880426883698,
-0.007461577653884888,
-0.06121181696653366,
0.08235339820384979,
0.2852357029914856,
0.0478242002427578,
-0.19770735502243042,
0.5288452506065369,
0.03390124440193176,
-0.04695738106966019,
-0.15871161222457886,
0.2742474675178528,
0.2531476318836212,
0.23150309920310974,
-0.051973287016153336,
-0.10700377821922302,
0.33872777223587036,
-0.11022772639989853,
-0.02969331108033657,
0.10047439485788345,
0.20050597190856934,
0.2549164891242981,
0.18043357133865356,
0.06518242508172989,
-0.004352087154984474,
0.30100035667419434,
0.06953579187393188,
-0.1928669959306717,
0.24358555674552917,
0.2801606357097626,
0.18614518642425537,
-0.289045512676239,
-0.12946182489395142,
-0.2241022288799286,
-0.3388960063457489,
-0.16421033442020416,
0.3142121136188507,
-0.14284059405326843,
0.24048084020614624,
-0.13081492483615875,
0.05084576457738876,
0.042049188166856766,
0.19686733186244965,
0.11872286349534988,
0.11401635408401489,
-0.4945983290672302,
-0.08852370828390121,
-0.74571293592453,
0.20055335760116577,
-0.30969181656837463,
-0.2826581299304962,
0.23557013273239136,
0.02660430409014225,
-0.04746042937040329,
0.30229973793029785,
-0.23467423021793365,
0.22896738350391388,
0.06854754686355591,
0.33479851484298706,
-0.6064161062240601,
0.06857948005199432,
0.2317822128534317,
0.3589978814125061,
0.05319151282310486,
-0.1249815970659256,
-0.27646830677986145,
0.21865369379520416,
-0.07028916478157043,
-0.07275889813899994,
-0.06854415684938431,
-0.18967397511005402,
-0.05582594871520996,
0.2673412561416626,
-0.21242322027683258,
0.15677624940872192,
-0.07460591197013855,
-0.1744633913040161,
-0.2747468650341034,
-0.05971069261431694,
-0.16448549926280975,
0.021056000143289566,
0.10053874552249908,
0.3167751729488373,
0.0033469656482338905,
0.15478681027889252,
-0.3915070593357086,
-0.29847875237464905,
0.013277266174554825,
0.08274979889392853,
-0.36418476700782776,
0.43281060457229614,
-0.23216262459754944,
0.14379528164863586,
0.03772234916687012,
0.225971519947052,
0.07463199645280838,
-0.0033202767372131348,
-0.15939195454120636,
-0.44558483362197876,
0.26130303740501404,
0.2699015140533447,
-0.19865679740905762,
-0.11950132250785828,
0.004335224628448486,
0.10739297419786453,
0.12586970627307892,
-0.44796597957611084,
0.1364089548587799,
0.1799706518650055,
-0.04512178897857666,
-0.09457534551620483,
0.08399622142314911,
-0.023716628551483154,
-0.07817844301462173,
-0.13010551035404205,
0.12380357086658478,
-0.026283573359251022,
-0.11458490043878555,
-0.20401231944561005,
-0.15853053331375122
] |
https://github.com/huggingface/datasets/issues/425 | Correct data structure for PAN-X task in XTREME dataset? | Thanks, I am making progress. I got a new error `NonMatchingSplitsSizesError ` (see traceback below), which I suspect is due to the fact that number of rows in the dataset changed (one row per word --> one row per sentence) as well as the number of bytes due to the slightly updated data structure.
```python
NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='validation', num_bytes=1756492, num_examples=80536, dataset_name='xtreme'), 'recorded': SplitInfo(name='validation', num_bytes=1837109, num_examples=10000, dataset_name='xtreme')}, {'expected': SplitInfo(name='test', num_bytes=1752572, num_examples=80326, dataset_name='xtreme'), 'recorded': SplitInfo(name='test', num_bytes=1833214, num_examples=10000, dataset_name='xtreme')}, {'expected': SplitInfo(name='train', num_bytes=3496832, num_examples=160394, dataset_name='xtreme'), 'recorded': SplitInfo(name='train', num_bytes=3658428, num_examples=20000, dataset_name='xtreme')}]
```
I can fix the error by replacing the values in the `datasets_infos.json` file, which I tested for English. However, to update this for all 40 datasets manually is slightly painful. Is there a better way to update the expected values for all datasets? | Hi 🤗 team!
## Description of the problem
Thanks to the fix from #416 I am now able to load the NER task in the XTREME dataset as follows:
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
dataset_train = dataset['train']
```
However, I am not sure that `load_dataset()` is returning the correct data structure for NER.
Currently, every row in `dataset_train` is of the form
```python
{'word': str, 'ner_tag': str, 'lang': str}
```
but I think we actually want something like
```python
{'words': List[str], 'ner_tags': List[str], 'langs': List[str]}
```
so that each row corresponds to a _sequence_ of words associated with each example. With the current data structure I do not think it is possible to transform `dataset_train` into a form suitable for training because we do not know the boundaries between examples.
Indeed, [this line](https://github.com/google-research/xtreme/blob/522434d1aece34131d997a97ce7e9242a51a688a/third_party/utils_tag.py#L58) in the XTREME repo, processes the texts as lists of sentences, tags, and languages.
## Proposed solution
Replace
```python
with open(filepath) as f:
data = csv.reader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(data):
if row:
lang, word = row[0].split(":")[0], row[0].split(":")[1]
tag = row[1]
yield id_, {"word": word, "ner_tag": tag, "lang": lang}
```
from [these lines](https://github.com/huggingface/nlp/blob/ce7d3a1d630b78fe27188d1706f3ea980e8eec43/datasets/xtreme/xtreme.py#L881-L887) of the `_generate_examples()` function with something like
```python
guid_index = 1
with open(filepath, encoding="utf-8") as f:
words = []
ner_tags = []
langs = []
for line in f:
if line.startswith("-DOCSTART-") or line == "" or line == "\n":
if words:
yield guid_index, {"words": words, "ner_tags": ner_tags, "langs": langs}
guid_index += 1
words = []
ner_tags = []
else:
# pan-x data is tab separated
splits = line.split("\t")
# strip out en: prefix
langs.append(splits[0][:2])
words.append(splits[0][3:])
if len(splits) > 1:
labels.append(splits[-1].replace("\n", ""))
else:
# examples have no label in test set
labels.append("O")
```
If you agree, me or @lvwerra would be happy to implement this and create a PR. | 130 | Correct data structure for PAN-X task in XTREME dataset?
Hi 🤗 team!
## Description of the problem
Thanks to the fix from #416 I am now able to load the NER task in the XTREME dataset as follows:
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
dataset_train = dataset['train']
```
However, I am not sure that `load_dataset()` is returning the correct data structure for NER.
Currently, every row in `dataset_train` is of the form
```python
{'word': str, 'ner_tag': str, 'lang': str}
```
but I think we actually want something like
```python
{'words': List[str], 'ner_tags': List[str], 'langs': List[str]}
```
so that each row corresponds to a _sequence_ of words associated with each example. With the current data structure I do not think it is possible to transform `dataset_train` into a form suitable for training because we do not know the boundaries between examples.
Indeed, [this line](https://github.com/google-research/xtreme/blob/522434d1aece34131d997a97ce7e9242a51a688a/third_party/utils_tag.py#L58) in the XTREME repo, processes the texts as lists of sentences, tags, and languages.
## Proposed solution
Replace
```python
with open(filepath) as f:
data = csv.reader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(data):
if row:
lang, word = row[0].split(":")[0], row[0].split(":")[1]
tag = row[1]
yield id_, {"word": word, "ner_tag": tag, "lang": lang}
```
from [these lines](https://github.com/huggingface/nlp/blob/ce7d3a1d630b78fe27188d1706f3ea980e8eec43/datasets/xtreme/xtreme.py#L881-L887) of the `_generate_examples()` function with something like
```python
guid_index = 1
with open(filepath, encoding="utf-8") as f:
words = []
ner_tags = []
langs = []
for line in f:
if line.startswith("-DOCSTART-") or line == "" or line == "\n":
if words:
yield guid_index, {"words": words, "ner_tags": ner_tags, "langs": langs}
guid_index += 1
words = []
ner_tags = []
else:
# pan-x data is tab separated
splits = line.split("\t")
# strip out en: prefix
langs.append(splits[0][:2])
words.append(splits[0][3:])
if len(splits) > 1:
labels.append(splits[-1].replace("\n", ""))
else:
# examples have no label in test set
labels.append("O")
```
If you agree, me or @lvwerra would be happy to implement this and create a PR.
Thanks, I am making progress. I got a new error `NonMatchingSplitsSizesError ` (see traceback below), which I suspect is due to the fact that number of rows in the dataset changed (one row per word --> one row per sentence) as well as the number of bytes due to the slightly updated data structure.
```python
NonMatchingSplitsSizesError: [{'expected': SplitInfo(name='validation', num_bytes=1756492, num_examples=80536, dataset_name='xtreme'), 'recorded': SplitInfo(name='validation', num_bytes=1837109, num_examples=10000, dataset_name='xtreme')}, {'expected': SplitInfo(name='test', num_bytes=1752572, num_examples=80326, dataset_name='xtreme'), 'recorded': SplitInfo(name='test', num_bytes=1833214, num_examples=10000, dataset_name='xtreme')}, {'expected': SplitInfo(name='train', num_bytes=3496832, num_examples=160394, dataset_name='xtreme'), 'recorded': SplitInfo(name='train', num_bytes=3658428, num_examples=20000, dataset_name='xtreme')}]
```
I can fix the error by replacing the values in the `datasets_infos.json` file, which I tested for English. However, to update this for all 40 datasets manually is slightly painful. Is there a better way to update the expected values for all datasets? | [
-0.04464275389909744,
-0.19605213403701782,
-0.02139165997505188,
0.37166088819503784,
0.03904016688466072,
-0.27633076906204224,
-0.02063705399632454,
0.15795132517814636,
-0.07178053259849548,
-0.06624250113964081,
-0.16135276854038239,
0.2627060115337372,
0.001427648589015007,
0.16808222234249115,
0.42643502354621887,
-0.14670196175575256,
0.04844200983643532,
-0.06990562379360199,
0.27868568897247314,
-0.052614644169807434,
-0.10909321904182434,
0.15061023831367493,
-0.3253748416900635,
0.05446898192167282,
-0.34978753328323364,
0.08372753858566284,
-0.06782099604606628,
0.34624016284942627,
-0.27583932876586914,
-0.49336832761764526,
0.5901552438735962,
0.0610426589846611,
0.3375474512577057,
0.3253481984138489,
-0.00011858232028316706,
0.0073943063616752625,
0.049150001257658005,
-0.2976796329021454,
0.06300021708011627,
-0.5153083205223083,
-0.21160608530044556,
-0.6882326006889343,
-0.07075084745883942,
-0.18635112047195435,
-0.24942392110824585,
-0.06914988160133362,
0.2359093576669693,
0.16131582856178284,
0.3286873400211334,
0.40412986278533936,
0.06675548851490021,
0.11867216229438782,
-0.011228833347558975,
0.16462361812591553,
0.40690523386001587,
0.39126139879226685,
-0.2984112501144409,
-0.0554717518389225,
0.5836412906646729,
0.15009315311908722,
-0.20072373747825623,
0.22613658010959625,
0.06657756865024567,
-0.09574025869369507,
0.2168320119380951,
0.3117488622665405,
0.11062107980251312,
-0.45838838815689087,
-0.20303493738174438,
0.28289154171943665,
0.23043528199195862,
-0.2553836703300476,
-0.2035077065229416,
-0.2779318392276764,
-0.05728354677557945,
-0.29004722833633423,
-0.028027378022670746,
0.36096274852752686,
-0.08088500797748566,
-0.009099416434764862,
0.2543642818927765,
-0.0029820913914591074,
-0.11148083209991455,
0.20313674211502075,
-0.010520737618207932,
0.40962186455726624,
-0.013463913463056087,
-0.10751835256814957,
-0.13960684835910797,
-0.11620770394802094,
0.7018569707870483,
-0.010425791144371033,
0.15768583118915558,
0.11971116065979004,
-0.6041293740272522,
0.08037948608398438,
-0.136322021484375,
-0.2818927764892578,
0.16630539298057556,
-0.04843667894601822,
0.20986615121364594,
0.1589147448539734,
0.14852383732795715,
0.014586754143238068,
0.32137590646743774,
0.20039543509483337,
0.23813706636428833,
0.03101031482219696,
-0.13071288168430328,
0.07348096370697021,
0.0858035683631897,
-0.09635839611291885,
-0.31837522983551025,
0.06530560553073883,
0.23683269321918488,
-0.022806771099567413,
0.288907527923584,
-0.19623742997646332,
-0.36802446842193604,
-0.019991759210824966,
-0.12843027710914612,
0.07258035987615585,
0.1414787620306015,
0.06118037551641464,
0.008061195723712444,
0.5874383449554443,
-0.07428853958845139,
0.17870859801769257,
-0.25383418798446655,
0.02914094552397728,
-0.1472996175289154,
0.16940949857234955,
-0.6243600845336914,
-0.10618644952774048,
0.2582581341266632,
0.0919623076915741,
0.19703930616378784,
-0.006403305567800999,
0.12182029336690903,
-0.332249253988266,
0.1758817434310913,
-0.2791430354118347,
0.2651098668575287,
-0.0158669613301754,
0.24573802947998047,
-0.12957188487052917,
-0.3093242645263672,
-0.009519573301076889,
-0.16474013030529022,
0.2194368541240692,
-0.7123693227767944,
-0.024572990834712982,
0.045095786452293396,
0.07545940577983856,
-0.2141943722963333,
0.1435738503932953,
-0.5043230056762695,
0.0322592630982399,
0.06304409354925156,
0.2181684970855713,
0.10690482705831528,
-0.33061355352401733,
-0.21428973972797394,
-0.07204857468605042,
0.08307000249624252,
0.1326567381620407,
-0.12915048003196716,
0.09738132357597351,
0.0630989819765091,
0.0002566855400800705,
0.10419723391532898,
0.2162792980670929,
-0.010966544039547443,
0.28418105840682983,
-0.18863479793071747,
0.5723387002944946,
0.41958191990852356,
-0.8037277460098267,
-0.3378544747829437,
0.08750887215137482,
-0.16561442613601685,
0.0018319040536880493,
-0.07771510630846024,
0.29997074604034424,
0.21682977676391602,
-0.10970926284790039,
0.28603821992874146,
0.47177934646606445,
-0.0601557195186615,
0.11296435445547104,
-0.10558265447616577,
0.26627710461616516,
-0.11809389293193817,
0.32159972190856934,
0.042097434401512146,
-0.26852965354919434,
-0.15946286916732788,
0.07514169067144394,
0.19486139714717865,
-0.11582812666893005,
0.0870852842926979,
0.43145424127578735,
0.0892733484506607,
-0.051384203135967255,
-0.05062389373779297,
0.0383254736661911,
-0.7624906897544861,
0.11410128325223923,
-0.42895954847335815,
0.37934422492980957,
0.010657034814357758,
-0.06719508767127991,
-0.17284244298934937,
-0.05107598379254341,
-0.29626187682151794,
-0.19065457582473755,
0.10716113448143005,
-0.12099935114383698,
-0.12378156185150146,
-0.3034520447254181,
-0.07628585398197174,
0.39741525053977966,
-0.22609782218933105,
0.07376275211572647,
-0.5780189037322998,
0.3407828211784363,
0.1180049404501915,
-0.06648483127355576,
-0.012310212478041649,
0.4472563564777374,
0.19224992394447327,
-0.04829661175608635,
0.16846004128456116,
0.22092205286026,
0.2148897498846054,
-0.1571744829416275,
-0.061233825981616974,
-0.0020258426666259766,
0.13349299132823944,
-0.577785313129425,
0.06592767685651779,
0.22309930622577667,
-0.0014228797517716885,
-0.21430495381355286,
-0.124354787170887,
0.5517558455467224,
0.18477055430412292,
0.20728452503681183,
0.028972797095775604,
0.07075013220310211,
0.2122231125831604,
-0.1713617891073227,
-0.23443341255187988,
-0.10390469431877136,
0.1545494943857193,
0.1233174204826355,
0.030547354370355606,
0.09956583380699158,
-0.5023415088653564,
0.020013146102428436,
0.3077196478843689,
0.027430519461631775,
0.18981873989105225,
0.20472675561904907,
-0.15310940146446228,
-0.07916487753391266,
0.03745778650045395,
0.3701203763484955,
0.35908687114715576,
0.09142747521400452,
0.10988552868366241,
0.13040754199028015,
-0.03294118121266365,
0.07248833030462265,
-0.03588453680276871,
0.061754144728183746,
0.15101750195026398,
0.2119649350643158,
0.1785157173871994,
-0.08419505506753922,
-0.08589636534452438,
-0.21915023028850555,
0.03217769414186478,
0.15216302871704102,
-0.3294999301433563,
0.07806934416294098,
0.03682194650173187,
-0.4502646028995514,
-0.14737409353256226,
0.04417244344949722,
-0.13615788519382477,
-0.31933632493019104,
-0.037922099232673645,
-0.05715597793459892,
0.23877432942390442,
0.08406692743301392,
-0.4746886193752289,
-0.215085968375206,
-0.19860243797302246,
-0.3406285047531128,
-0.05831490829586983,
0.07429353892803192,
-0.13823866844177246,
-0.026753896847367287,
0.211973175406456,
0.5459078550338745,
-0.0312718003988266,
-0.4353145956993103,
0.3901611566543579,
-0.3872416615486145,
-0.20231151580810547,
0.3016566038131714,
-0.263822078704834,
0.3121573030948639,
0.21715490520000458,
-0.10408598184585571,
-0.4046025276184082,
0.1959170252084732,
0.18749186396598816,
-0.3214801549911499,
-0.314125657081604,
0.3168617784976959,
-0.1772628128528595,
-0.09167474508285522,
-0.026444029062986374,
-0.4063451886177063,
-0.5237718224525452,
-0.20548740029335022,
0.011993903666734695,
0.22303138673305511,
0.31624358892440796,
0.2151387482881546,
-0.25966671109199524,
-0.14515095949172974,
-0.1321808248758316,
-0.19551131129264832,
0.006959549151360989,
-0.5726137161254883,
0.4568420350551605,
-0.24419450759887695,
-0.205152228474617,
-0.0859803557395935,
-0.2658783793449402,
0.47131961584091187,
0.3780290484428406,
-0.06849372386932373,
-0.037540920078754425,
0.14133842289447784,
0.035181645303964615,
0.17770901322364807,
-0.062219537794589996,
0.2964114546775818,
-0.21413548290729523,
0.04570496827363968,
-0.02779005467891693,
-0.00812397338449955,
0.07852567732334137,
0.3201448321342468,
0.23043784499168396,
-0.026519089937210083,
-0.25716838240623474,
0.11034706234931946,
0.06357670575380325,
0.15529005229473114,
0.046334296464920044,
0.43679335713386536,
0.005378788337111473,
0.1145692691206932,
0.0847834050655365,
0.02240857295691967,
-0.1640300303697586,
0.060146331787109375,
0.23326946794986725,
-0.000989384949207306,
0.2357877790927887,
-0.15477226674556732,
-0.07209773361682892,
0.12637114524841309,
-0.13299891352653503,
-0.21512067317962646,
0.5398620963096619,
-0.13975439965724945,
0.41052353382110596,
-0.17096178233623505,
0.026817917823791504,
-0.061433095484972,
-0.45806974172592163,
-0.2571300268173218,
0.08614960312843323,
0.17971578240394592,
0.15540476143360138,
-0.6861743927001953,
0.39854326844215393,
-0.3888286352157593,
-0.020632371306419373,
0.17285068333148956,
0.5378322601318359,
0.21202485263347626,
0.0804055854678154,
0.15717245638370514,
-0.03739937022328377,
0.3112250864505768,
-0.2897290885448456,
-0.1462429016828537,
0.10926090180873871,
0.10011525452136993,
-0.32502371072769165,
-0.04307326674461365,
-0.250880628824234,
0.02652989700436592,
0.4807163178920746,
0.403067022562027,
-0.30203479528427124,
-0.44885748624801636,
-0.014215212315320969,
0.047435179352760315,
-0.2095983922481537,
-0.19778315722942352,
-0.2662701904773712,
-0.450519859790802,
-0.09220097213983536,
-0.09107863157987595,
0.5540921688079834,
-0.011968165636062622,
0.2859899401664734,
0.028919849544763565,
-0.23574908077716827,
0.26541540026664734,
0.33019116520881653,
-0.03711432218551636,
0.5644023418426514,
-0.239581897854805,
0.005737707018852234,
-0.06575553864240646,
-0.08433029055595398,
0.2901480495929718,
0.480325847864151,
-0.18594028055667877,
-0.15045329928398132,
0.18000510334968567,
-0.22384506464004517,
0.4223897159099579,
0.1663798987865448,
0.1885034739971161,
0.01889578253030777,
-0.2950087785720825,
-0.0011858046054840088,
-0.1358928382396698,
0.1362023800611496,
0.3885795772075653,
-0.10829775780439377,
-0.4188081622123718,
-0.3653249144554138,
0.17683625221252441,
0.3088773787021637,
0.1055980771780014,
-0.23104333877563477,
-0.17216072976589203,
-0.2617758810520172,
-0.14155851304531097,
0.46636879444122314,
1.0166808366775513,
0.0301852747797966,
0.4335702955722809,
0.1726902425289154,
0.08972659707069397,
0.060726866126060486,
-0.4444866180419922,
0.20499400794506073,
-0.34820398688316345,
-0.32858824729919434,
-0.2036452740430832,
-0.25741440057754517,
-0.06209098547697067,
0.20261552929878235,
0.03191273286938667,
0.6626027822494507,
0.22569088637828827,
-0.04478941485285759,
0.022951338440179825,
0.21596956253051758,
0.009368260391056538,
-0.3867398202419281,
-0.3745245933532715,
0.004031799733638763,
-0.2863348722457886,
0.014986012130975723,
-0.15357694029808044,
-0.20838339626789093,
-0.059148844331502914,
0.19947576522827148,
0.13996614515781403,
0.2819463312625885,
0.09344667941331863,
-0.18290680646896362,
0.423927903175354,
-0.5605946183204651,
-0.053347278386354446,
0.24287216365337372,
0.0773037001490593,
-0.32219091057777405,
0.0031519345939159393,
0.23612350225448608,
0.40504196286201477,
0.10099712014198303,
0.39132431149482727,
-0.3321992754936218,
0.2601027190685272,
0.04982813447713852,
0.12219186872243881,
-0.24286070466041565,
0.15816007554531097,
-0.03726261109113693,
-0.4174329936504364,
0.04797276109457016,
-0.17502643167972565,
-0.2749728560447693,
-0.20879870653152466,
0.026938043534755707,
-0.1443691849708557,
-0.049738168716430664,
0.05494077503681183,
0.25943616032600403,
-0.0902872085571289,
0.1481013000011444,
0.11329205334186554,
-0.25920581817626953,
0.19909194111824036,
0.08319039642810822,
0.2976745665073395,
-0.312531977891922,
0.03761027380824089,
0.24821247160434723,
0.01513497531414032,
-0.09923584014177322,
0.18058207631111145,
0.48215076327323914,
-0.6173619031906128,
0.033748023211956024,
-0.24345006048679352,
-0.013798847794532776,
-0.016300374642014503,
0.1851167529821396,
0.0020546577870845795,
-0.2624996304512024,
0.16277499496936798,
-0.2828570604324341,
-0.34099218249320984,
0.3751993179321289,
0.11637763679027557,
0.27829140424728394,
-0.19798550009727478,
0.009825963526964188,
0.15099358558654785,
-0.2200443595647812,
-0.23904992640018463,
0.17531585693359375,
-0.17947077751159668,
0.1961243897676468,
-0.11576478183269501,
-0.0962916687130928,
0.08040372282266617,
-0.09420141577720642,
-0.02496936358511448,
0.2664698362350464,
-0.14584457874298096,
-0.057853832840919495,
0.01793384552001953,
0.12439148128032684,
0.13275215029716492,
-0.11576977372169495,
0.12489146739244461,
0.12000446021556854,
-0.05154125764966011,
-0.1373375803232193,
-0.11356814205646515,
0.18000149726867676,
0.022833991795778275,
0.23035284876823425,
-0.2976283133029938,
0.03927427530288696,
-0.1231653094291687,
0.2310589700937271,
0.18953865766525269,
0.12020587176084518,
0.06575057655572891,
0.20725132524967194,
-0.051119327545166016,
0.02486628293991089,
-0.518206000328064,
0.2064265012741089,
0.19672639667987823,
0.3688439726829529,
0.21520006656646729,
-0.15535631775856018,
0.10563802719116211,
-0.03227846696972847,
0.14986878633499146,
0.3083641231060028,
-0.2699721157550812,
-0.005844211205840111,
0.24190416932106018,
0.1483670324087143,
-0.15884387493133545,
-0.004972503520548344,
0.3671058714389801,
0.00789102353155613,
0.008068230003118515,
0.47907382249832153,
0.35250240564346313,
0.13681535422801971,
-0.14634595811367035,
0.0633271187543869,
0.2355751097202301,
-0.25352680683135986,
0.0676126629114151,
0.40521225333213806,
-0.0051036737859249115,
0.13945713639259338,
0.599587082862854,
0.033287905156612396,
-0.11432916671037674,
0.6000962853431702,
0.3011855483055115,
0.7809865474700928,
0.19955968856811523,
0.17875421047210693,
-0.06581107527017593,
-0.10446497797966003,
-0.4129892885684967,
0.25482863187789917,
0.12739695608615875,
0.17695334553718567,
0.038353025913238525,
0.14328710734844208,
0.14535674452781677,
-0.18604730069637299,
-0.09647668153047562,
0.11350005865097046,
-0.3404926359653473,
0.022930849343538284,
-0.3317873775959015,
-0.23424312472343445,
-0.12177465856075287,
-0.11770045757293701,
-0.1722741574048996,
0.03673800826072693,
0.06148897483944893,
0.13393880426883698,
-0.007461577653884888,
-0.06121181696653366,
0.08235339820384979,
0.2852357029914856,
0.0478242002427578,
-0.19770735502243042,
0.5288452506065369,
0.03390124440193176,
-0.04695738106966019,
-0.15871161222457886,
0.2742474675178528,
0.2531476318836212,
0.23150309920310974,
-0.051973287016153336,
-0.10700377821922302,
0.33872777223587036,
-0.11022772639989853,
-0.02969331108033657,
0.10047439485788345,
0.20050597190856934,
0.2549164891242981,
0.18043357133865356,
0.06518242508172989,
-0.004352087154984474,
0.30100035667419434,
0.06953579187393188,
-0.1928669959306717,
0.24358555674552917,
0.2801606357097626,
0.18614518642425537,
-0.289045512676239,
-0.12946182489395142,
-0.2241022288799286,
-0.3388960063457489,
-0.16421033442020416,
0.3142121136188507,
-0.14284059405326843,
0.24048084020614624,
-0.13081492483615875,
0.05084576457738876,
0.042049188166856766,
0.19686733186244965,
0.11872286349534988,
0.11401635408401489,
-0.4945983290672302,
-0.08852370828390121,
-0.74571293592453,
0.20055335760116577,
-0.30969181656837463,
-0.2826581299304962,
0.23557013273239136,
0.02660430409014225,
-0.04746042937040329,
0.30229973793029785,
-0.23467423021793365,
0.22896738350391388,
0.06854754686355591,
0.33479851484298706,
-0.6064161062240601,
0.06857948005199432,
0.2317822128534317,
0.3589978814125061,
0.05319151282310486,
-0.1249815970659256,
-0.27646830677986145,
0.21865369379520416,
-0.07028916478157043,
-0.07275889813899994,
-0.06854415684938431,
-0.18967397511005402,
-0.05582594871520996,
0.2673412561416626,
-0.21242322027683258,
0.15677624940872192,
-0.07460591197013855,
-0.1744633913040161,
-0.2747468650341034,
-0.05971069261431694,
-0.16448549926280975,
0.021056000143289566,
0.10053874552249908,
0.3167751729488373,
0.0033469656482338905,
0.15478681027889252,
-0.3915070593357086,
-0.29847875237464905,
0.013277266174554825,
0.08274979889392853,
-0.36418476700782776,
0.43281060457229614,
-0.23216262459754944,
0.14379528164863586,
0.03772234916687012,
0.225971519947052,
0.07463199645280838,
-0.0033202767372131348,
-0.15939195454120636,
-0.44558483362197876,
0.26130303740501404,
0.2699015140533447,
-0.19865679740905762,
-0.11950132250785828,
0.004335224628448486,
0.10739297419786453,
0.12586970627307892,
-0.44796597957611084,
0.1364089548587799,
0.1799706518650055,
-0.04512178897857666,
-0.09457534551620483,
0.08399622142314911,
-0.023716628551483154,
-0.07817844301462173,
-0.13010551035404205,
0.12380357086658478,
-0.026283573359251022,
-0.11458490043878555,
-0.20401231944561005,
-0.15853053331375122
] |
https://github.com/huggingface/datasets/issues/425 | Correct data structure for PAN-X task in XTREME dataset? | One more thing about features. I mentioned
```python
features = nlp.Features({
"words": [nlp.Value("string")],
"ner_tags": [nlp.Value("string")],
"langs": [nlp.Value("string")],
})
```
but it's actually not consistent with the way we write datasets. Something like this is simpler to read and more consistent with the way we define datasets:
```python
features = nlp.Features({
"words": nlp.Sequence(nlp.Value("string")),
"ner_tags": nlp.Sequence(nlp.Value("string")),
"langs": nlp.Sequence(nlp.Value("string")),
})
```
Sorry about that | Hi 🤗 team!
## Description of the problem
Thanks to the fix from #416 I am now able to load the NER task in the XTREME dataset as follows:
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
dataset_train = dataset['train']
```
However, I am not sure that `load_dataset()` is returning the correct data structure for NER.
Currently, every row in `dataset_train` is of the form
```python
{'word': str, 'ner_tag': str, 'lang': str}
```
but I think we actually want something like
```python
{'words': List[str], 'ner_tags': List[str], 'langs': List[str]}
```
so that each row corresponds to a _sequence_ of words associated with each example. With the current data structure I do not think it is possible to transform `dataset_train` into a form suitable for training because we do not know the boundaries between examples.
Indeed, [this line](https://github.com/google-research/xtreme/blob/522434d1aece34131d997a97ce7e9242a51a688a/third_party/utils_tag.py#L58) in the XTREME repo, processes the texts as lists of sentences, tags, and languages.
## Proposed solution
Replace
```python
with open(filepath) as f:
data = csv.reader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(data):
if row:
lang, word = row[0].split(":")[0], row[0].split(":")[1]
tag = row[1]
yield id_, {"word": word, "ner_tag": tag, "lang": lang}
```
from [these lines](https://github.com/huggingface/nlp/blob/ce7d3a1d630b78fe27188d1706f3ea980e8eec43/datasets/xtreme/xtreme.py#L881-L887) of the `_generate_examples()` function with something like
```python
guid_index = 1
with open(filepath, encoding="utf-8") as f:
words = []
ner_tags = []
langs = []
for line in f:
if line.startswith("-DOCSTART-") or line == "" or line == "\n":
if words:
yield guid_index, {"words": words, "ner_tags": ner_tags, "langs": langs}
guid_index += 1
words = []
ner_tags = []
else:
# pan-x data is tab separated
splits = line.split("\t")
# strip out en: prefix
langs.append(splits[0][:2])
words.append(splits[0][3:])
if len(splits) > 1:
labels.append(splits[-1].replace("\n", ""))
else:
# examples have no label in test set
labels.append("O")
```
If you agree, me or @lvwerra would be happy to implement this and create a PR. | 61 | Correct data structure for PAN-X task in XTREME dataset?
Hi 🤗 team!
## Description of the problem
Thanks to the fix from #416 I am now able to load the NER task in the XTREME dataset as follows:
```python
from nlp import load_dataset
# AmazonPhotos.zip is located in data/
dataset = load_dataset("xtreme", "PAN-X.en", data_dir='./data')
dataset_train = dataset['train']
```
However, I am not sure that `load_dataset()` is returning the correct data structure for NER.
Currently, every row in `dataset_train` is of the form
```python
{'word': str, 'ner_tag': str, 'lang': str}
```
but I think we actually want something like
```python
{'words': List[str], 'ner_tags': List[str], 'langs': List[str]}
```
so that each row corresponds to a _sequence_ of words associated with each example. With the current data structure I do not think it is possible to transform `dataset_train` into a form suitable for training because we do not know the boundaries between examples.
Indeed, [this line](https://github.com/google-research/xtreme/blob/522434d1aece34131d997a97ce7e9242a51a688a/third_party/utils_tag.py#L58) in the XTREME repo, processes the texts as lists of sentences, tags, and languages.
## Proposed solution
Replace
```python
with open(filepath) as f:
data = csv.reader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
for id_, row in enumerate(data):
if row:
lang, word = row[0].split(":")[0], row[0].split(":")[1]
tag = row[1]
yield id_, {"word": word, "ner_tag": tag, "lang": lang}
```
from [these lines](https://github.com/huggingface/nlp/blob/ce7d3a1d630b78fe27188d1706f3ea980e8eec43/datasets/xtreme/xtreme.py#L881-L887) of the `_generate_examples()` function with something like
```python
guid_index = 1
with open(filepath, encoding="utf-8") as f:
words = []
ner_tags = []
langs = []
for line in f:
if line.startswith("-DOCSTART-") or line == "" or line == "\n":
if words:
yield guid_index, {"words": words, "ner_tags": ner_tags, "langs": langs}
guid_index += 1
words = []
ner_tags = []
else:
# pan-x data is tab separated
splits = line.split("\t")
# strip out en: prefix
langs.append(splits[0][:2])
words.append(splits[0][3:])
if len(splits) > 1:
labels.append(splits[-1].replace("\n", ""))
else:
# examples have no label in test set
labels.append("O")
```
If you agree, me or @lvwerra would be happy to implement this and create a PR.
One more thing about features. I mentioned
```python
features = nlp.Features({
"words": [nlp.Value("string")],
"ner_tags": [nlp.Value("string")],
"langs": [nlp.Value("string")],
})
```
but it's actually not consistent with the way we write datasets. Something like this is simpler to read and more consistent with the way we define datasets:
```python
features = nlp.Features({
"words": nlp.Sequence(nlp.Value("string")),
"ner_tags": nlp.Sequence(nlp.Value("string")),
"langs": nlp.Sequence(nlp.Value("string")),
})
```
Sorry about that | [
-0.04464275389909744,
-0.19605213403701782,
-0.02139165997505188,
0.37166088819503784,
0.03904016688466072,
-0.27633076906204224,
-0.02063705399632454,
0.15795132517814636,
-0.07178053259849548,
-0.06624250113964081,
-0.16135276854038239,
0.2627060115337372,
0.001427648589015007,
0.16808222234249115,
0.42643502354621887,
-0.14670196175575256,
0.04844200983643532,
-0.06990562379360199,
0.27868568897247314,
-0.052614644169807434,
-0.10909321904182434,
0.15061023831367493,
-0.3253748416900635,
0.05446898192167282,
-0.34978753328323364,
0.08372753858566284,
-0.06782099604606628,
0.34624016284942627,
-0.27583932876586914,
-0.49336832761764526,
0.5901552438735962,
0.0610426589846611,
0.3375474512577057,
0.3253481984138489,
-0.00011858232028316706,
0.0073943063616752625,
0.049150001257658005,
-0.2976796329021454,
0.06300021708011627,
-0.5153083205223083,
-0.21160608530044556,
-0.6882326006889343,
-0.07075084745883942,
-0.18635112047195435,
-0.24942392110824585,
-0.06914988160133362,
0.2359093576669693,
0.16131582856178284,
0.3286873400211334,
0.40412986278533936,
0.06675548851490021,
0.11867216229438782,
-0.011228833347558975,
0.16462361812591553,
0.40690523386001587,
0.39126139879226685,
-0.2984112501144409,
-0.0554717518389225,
0.5836412906646729,
0.15009315311908722,
-0.20072373747825623,
0.22613658010959625,
0.06657756865024567,
-0.09574025869369507,
0.2168320119380951,
0.3117488622665405,
0.11062107980251312,
-0.45838838815689087,
-0.20303493738174438,
0.28289154171943665,
0.23043528199195862,
-0.2553836703300476,
-0.2035077065229416,
-0.2779318392276764,
-0.05728354677557945,
-0.29004722833633423,
-0.028027378022670746,
0.36096274852752686,
-0.08088500797748566,
-0.009099416434764862,
0.2543642818927765,
-0.0029820913914591074,
-0.11148083209991455,
0.20313674211502075,
-0.010520737618207932,
0.40962186455726624,
-0.013463913463056087,
-0.10751835256814957,
-0.13960684835910797,
-0.11620770394802094,
0.7018569707870483,
-0.010425791144371033,
0.15768583118915558,
0.11971116065979004,
-0.6041293740272522,
0.08037948608398438,
-0.136322021484375,
-0.2818927764892578,
0.16630539298057556,
-0.04843667894601822,
0.20986615121364594,
0.1589147448539734,
0.14852383732795715,
0.014586754143238068,
0.32137590646743774,
0.20039543509483337,
0.23813706636428833,
0.03101031482219696,
-0.13071288168430328,
0.07348096370697021,
0.0858035683631897,
-0.09635839611291885,
-0.31837522983551025,
0.06530560553073883,
0.23683269321918488,
-0.022806771099567413,
0.288907527923584,
-0.19623742997646332,
-0.36802446842193604,
-0.019991759210824966,
-0.12843027710914612,
0.07258035987615585,
0.1414787620306015,
0.06118037551641464,
0.008061195723712444,
0.5874383449554443,
-0.07428853958845139,
0.17870859801769257,
-0.25383418798446655,
0.02914094552397728,
-0.1472996175289154,
0.16940949857234955,
-0.6243600845336914,
-0.10618644952774048,
0.2582581341266632,
0.0919623076915741,
0.19703930616378784,
-0.006403305567800999,
0.12182029336690903,
-0.332249253988266,
0.1758817434310913,
-0.2791430354118347,
0.2651098668575287,
-0.0158669613301754,
0.24573802947998047,
-0.12957188487052917,
-0.3093242645263672,
-0.009519573301076889,
-0.16474013030529022,
0.2194368541240692,
-0.7123693227767944,
-0.024572990834712982,
0.045095786452293396,
0.07545940577983856,
-0.2141943722963333,
0.1435738503932953,
-0.5043230056762695,
0.0322592630982399,
0.06304409354925156,
0.2181684970855713,
0.10690482705831528,
-0.33061355352401733,
-0.21428973972797394,
-0.07204857468605042,
0.08307000249624252,
0.1326567381620407,
-0.12915048003196716,
0.09738132357597351,
0.0630989819765091,
0.0002566855400800705,
0.10419723391532898,
0.2162792980670929,
-0.010966544039547443,
0.28418105840682983,
-0.18863479793071747,
0.5723387002944946,
0.41958191990852356,
-0.8037277460098267,
-0.3378544747829437,
0.08750887215137482,
-0.16561442613601685,
0.0018319040536880493,
-0.07771510630846024,
0.29997074604034424,
0.21682977676391602,
-0.10970926284790039,
0.28603821992874146,
0.47177934646606445,
-0.0601557195186615,
0.11296435445547104,
-0.10558265447616577,
0.26627710461616516,
-0.11809389293193817,
0.32159972190856934,
0.042097434401512146,
-0.26852965354919434,
-0.15946286916732788,
0.07514169067144394,
0.19486139714717865,
-0.11582812666893005,
0.0870852842926979,
0.43145424127578735,
0.0892733484506607,
-0.051384203135967255,
-0.05062389373779297,
0.0383254736661911,
-0.7624906897544861,
0.11410128325223923,
-0.42895954847335815,
0.37934422492980957,
0.010657034814357758,
-0.06719508767127991,
-0.17284244298934937,
-0.05107598379254341,
-0.29626187682151794,
-0.19065457582473755,
0.10716113448143005,
-0.12099935114383698,
-0.12378156185150146,
-0.3034520447254181,
-0.07628585398197174,
0.39741525053977966,
-0.22609782218933105,
0.07376275211572647,
-0.5780189037322998,
0.3407828211784363,
0.1180049404501915,
-0.06648483127355576,
-0.012310212478041649,
0.4472563564777374,
0.19224992394447327,
-0.04829661175608635,
0.16846004128456116,
0.22092205286026,
0.2148897498846054,
-0.1571744829416275,
-0.061233825981616974,
-0.0020258426666259766,
0.13349299132823944,
-0.577785313129425,
0.06592767685651779,
0.22309930622577667,
-0.0014228797517716885,
-0.21430495381355286,
-0.124354787170887,
0.5517558455467224,
0.18477055430412292,
0.20728452503681183,
0.028972797095775604,
0.07075013220310211,
0.2122231125831604,
-0.1713617891073227,
-0.23443341255187988,
-0.10390469431877136,
0.1545494943857193,
0.1233174204826355,
0.030547354370355606,
0.09956583380699158,
-0.5023415088653564,
0.020013146102428436,
0.3077196478843689,
0.027430519461631775,
0.18981873989105225,
0.20472675561904907,
-0.15310940146446228,
-0.07916487753391266,
0.03745778650045395,
0.3701203763484955,
0.35908687114715576,
0.09142747521400452,
0.10988552868366241,
0.13040754199028015,
-0.03294118121266365,
0.07248833030462265,
-0.03588453680276871,
0.061754144728183746,
0.15101750195026398,
0.2119649350643158,
0.1785157173871994,
-0.08419505506753922,
-0.08589636534452438,
-0.21915023028850555,
0.03217769414186478,
0.15216302871704102,
-0.3294999301433563,
0.07806934416294098,
0.03682194650173187,
-0.4502646028995514,
-0.14737409353256226,
0.04417244344949722,
-0.13615788519382477,
-0.31933632493019104,
-0.037922099232673645,
-0.05715597793459892,
0.23877432942390442,
0.08406692743301392,
-0.4746886193752289,
-0.215085968375206,
-0.19860243797302246,
-0.3406285047531128,
-0.05831490829586983,
0.07429353892803192,
-0.13823866844177246,
-0.026753896847367287,
0.211973175406456,
0.5459078550338745,
-0.0312718003988266,
-0.4353145956993103,
0.3901611566543579,
-0.3872416615486145,
-0.20231151580810547,
0.3016566038131714,
-0.263822078704834,
0.3121573030948639,
0.21715490520000458,
-0.10408598184585571,
-0.4046025276184082,
0.1959170252084732,
0.18749186396598816,
-0.3214801549911499,
-0.314125657081604,
0.3168617784976959,
-0.1772628128528595,
-0.09167474508285522,
-0.026444029062986374,
-0.4063451886177063,
-0.5237718224525452,
-0.20548740029335022,
0.011993903666734695,
0.22303138673305511,
0.31624358892440796,
0.2151387482881546,
-0.25966671109199524,
-0.14515095949172974,
-0.1321808248758316,
-0.19551131129264832,
0.006959549151360989,
-0.5726137161254883,
0.4568420350551605,
-0.24419450759887695,
-0.205152228474617,
-0.0859803557395935,
-0.2658783793449402,
0.47131961584091187,
0.3780290484428406,
-0.06849372386932373,
-0.037540920078754425,
0.14133842289447784,
0.035181645303964615,
0.17770901322364807,
-0.062219537794589996,
0.2964114546775818,
-0.21413548290729523,
0.04570496827363968,
-0.02779005467891693,
-0.00812397338449955,
0.07852567732334137,
0.3201448321342468,
0.23043784499168396,
-0.026519089937210083,
-0.25716838240623474,
0.11034706234931946,
0.06357670575380325,
0.15529005229473114,
0.046334296464920044,
0.43679335713386536,
0.005378788337111473,
0.1145692691206932,
0.0847834050655365,
0.02240857295691967,
-0.1640300303697586,
0.060146331787109375,
0.23326946794986725,
-0.000989384949207306,
0.2357877790927887,
-0.15477226674556732,
-0.07209773361682892,
0.12637114524841309,
-0.13299891352653503,
-0.21512067317962646,
0.5398620963096619,
-0.13975439965724945,
0.41052353382110596,
-0.17096178233623505,
0.026817917823791504,
-0.061433095484972,
-0.45806974172592163,
-0.2571300268173218,
0.08614960312843323,
0.17971578240394592,
0.15540476143360138,
-0.6861743927001953,
0.39854326844215393,
-0.3888286352157593,
-0.020632371306419373,
0.17285068333148956,
0.5378322601318359,
0.21202485263347626,
0.0804055854678154,
0.15717245638370514,
-0.03739937022328377,
0.3112250864505768,
-0.2897290885448456,
-0.1462429016828537,
0.10926090180873871,
0.10011525452136993,
-0.32502371072769165,
-0.04307326674461365,
-0.250880628824234,
0.02652989700436592,
0.4807163178920746,
0.403067022562027,
-0.30203479528427124,
-0.44885748624801636,
-0.014215212315320969,
0.047435179352760315,
-0.2095983922481537,
-0.19778315722942352,
-0.2662701904773712,
-0.450519859790802,
-0.09220097213983536,
-0.09107863157987595,
0.5540921688079834,
-0.011968165636062622,
0.2859899401664734,
0.028919849544763565,
-0.23574908077716827,
0.26541540026664734,
0.33019116520881653,
-0.03711432218551636,
0.5644023418426514,
-0.239581897854805,
0.005737707018852234,
-0.06575553864240646,
-0.08433029055595398,
0.2901480495929718,
0.480325847864151,
-0.18594028055667877,
-0.15045329928398132,
0.18000510334968567,
-0.22384506464004517,
0.4223897159099579,
0.1663798987865448,
0.1885034739971161,
0.01889578253030777,
-0.2950087785720825,
-0.0011858046054840088,
-0.1358928382396698,
0.1362023800611496,
0.3885795772075653,
-0.10829775780439377,
-0.4188081622123718,
-0.3653249144554138,
0.17683625221252441,
0.3088773787021637,
0.1055980771780014,
-0.23104333877563477,
-0.17216072976589203,
-0.2617758810520172,
-0.14155851304531097,
0.46636879444122314,
1.0166808366775513,
0.0301852747797966,
0.4335702955722809,
0.1726902425289154,
0.08972659707069397,
0.060726866126060486,
-0.4444866180419922,
0.20499400794506073,
-0.34820398688316345,
-0.32858824729919434,
-0.2036452740430832,
-0.25741440057754517,
-0.06209098547697067,
0.20261552929878235,
0.03191273286938667,
0.6626027822494507,
0.22569088637828827,
-0.04478941485285759,
0.022951338440179825,
0.21596956253051758,
0.009368260391056538,
-0.3867398202419281,
-0.3745245933532715,
0.004031799733638763,
-0.2863348722457886,
0.014986012130975723,
-0.15357694029808044,
-0.20838339626789093,
-0.059148844331502914,
0.19947576522827148,
0.13996614515781403,
0.2819463312625885,
0.09344667941331863,
-0.18290680646896362,
0.423927903175354,
-0.5605946183204651,
-0.053347278386354446,
0.24287216365337372,
0.0773037001490593,
-0.32219091057777405,
0.0031519345939159393,
0.23612350225448608,
0.40504196286201477,
0.10099712014198303,
0.39132431149482727,
-0.3321992754936218,
0.2601027190685272,
0.04982813447713852,
0.12219186872243881,
-0.24286070466041565,
0.15816007554531097,
-0.03726261109113693,
-0.4174329936504364,
0.04797276109457016,
-0.17502643167972565,
-0.2749728560447693,
-0.20879870653152466,
0.026938043534755707,
-0.1443691849708557,
-0.049738168716430664,
0.05494077503681183,
0.25943616032600403,
-0.0902872085571289,
0.1481013000011444,
0.11329205334186554,
-0.25920581817626953,
0.19909194111824036,
0.08319039642810822,
0.2976745665073395,
-0.312531977891922,
0.03761027380824089,
0.24821247160434723,
0.01513497531414032,
-0.09923584014177322,
0.18058207631111145,
0.48215076327323914,
-0.6173619031906128,
0.033748023211956024,
-0.24345006048679352,
-0.013798847794532776,
-0.016300374642014503,
0.1851167529821396,
0.0020546577870845795,
-0.2624996304512024,
0.16277499496936798,
-0.2828570604324341,
-0.34099218249320984,
0.3751993179321289,
0.11637763679027557,
0.27829140424728394,
-0.19798550009727478,
0.009825963526964188,
0.15099358558654785,
-0.2200443595647812,
-0.23904992640018463,
0.17531585693359375,
-0.17947077751159668,
0.1961243897676468,
-0.11576478183269501,
-0.0962916687130928,
0.08040372282266617,
-0.09420141577720642,
-0.02496936358511448,
0.2664698362350464,
-0.14584457874298096,
-0.057853832840919495,
0.01793384552001953,
0.12439148128032684,
0.13275215029716492,
-0.11576977372169495,
0.12489146739244461,
0.12000446021556854,
-0.05154125764966011,
-0.1373375803232193,
-0.11356814205646515,
0.18000149726867676,
0.022833991795778275,
0.23035284876823425,
-0.2976283133029938,
0.03927427530288696,
-0.1231653094291687,
0.2310589700937271,
0.18953865766525269,
0.12020587176084518,
0.06575057655572891,
0.20725132524967194,
-0.051119327545166016,
0.02486628293991089,
-0.518206000328064,
0.2064265012741089,
0.19672639667987823,
0.3688439726829529,
0.21520006656646729,
-0.15535631775856018,
0.10563802719116211,
-0.03227846696972847,
0.14986878633499146,
0.3083641231060028,
-0.2699721157550812,
-0.005844211205840111,
0.24190416932106018,
0.1483670324087143,
-0.15884387493133545,
-0.004972503520548344,
0.3671058714389801,
0.00789102353155613,
0.008068230003118515,
0.47907382249832153,
0.35250240564346313,
0.13681535422801971,
-0.14634595811367035,
0.0633271187543869,
0.2355751097202301,
-0.25352680683135986,
0.0676126629114151,
0.40521225333213806,
-0.0051036737859249115,
0.13945713639259338,
0.599587082862854,
0.033287905156612396,
-0.11432916671037674,
0.6000962853431702,
0.3011855483055115,
0.7809865474700928,
0.19955968856811523,
0.17875421047210693,
-0.06581107527017593,
-0.10446497797966003,
-0.4129892885684967,
0.25482863187789917,
0.12739695608615875,
0.17695334553718567,
0.038353025913238525,
0.14328710734844208,
0.14535674452781677,
-0.18604730069637299,
-0.09647668153047562,
0.11350005865097046,
-0.3404926359653473,
0.022930849343538284,
-0.3317873775959015,
-0.23424312472343445,
-0.12177465856075287,
-0.11770045757293701,
-0.1722741574048996,
0.03673800826072693,
0.06148897483944893,
0.13393880426883698,
-0.007461577653884888,
-0.06121181696653366,
0.08235339820384979,
0.2852357029914856,
0.0478242002427578,
-0.19770735502243042,
0.5288452506065369,
0.03390124440193176,
-0.04695738106966019,
-0.15871161222457886,
0.2742474675178528,
0.2531476318836212,
0.23150309920310974,
-0.051973287016153336,
-0.10700377821922302,
0.33872777223587036,
-0.11022772639989853,
-0.02969331108033657,
0.10047439485788345,
0.20050597190856934,
0.2549164891242981,
0.18043357133865356,
0.06518242508172989,
-0.004352087154984474,
0.30100035667419434,
0.06953579187393188,
-0.1928669959306717,
0.24358555674552917,
0.2801606357097626,
0.18614518642425537,
-0.289045512676239,
-0.12946182489395142,
-0.2241022288799286,
-0.3388960063457489,
-0.16421033442020416,
0.3142121136188507,
-0.14284059405326843,
0.24048084020614624,
-0.13081492483615875,
0.05084576457738876,
0.042049188166856766,
0.19686733186244965,
0.11872286349534988,
0.11401635408401489,
-0.4945983290672302,
-0.08852370828390121,
-0.74571293592453,
0.20055335760116577,
-0.30969181656837463,
-0.2826581299304962,
0.23557013273239136,
0.02660430409014225,
-0.04746042937040329,
0.30229973793029785,
-0.23467423021793365,
0.22896738350391388,
0.06854754686355591,
0.33479851484298706,
-0.6064161062240601,
0.06857948005199432,
0.2317822128534317,
0.3589978814125061,
0.05319151282310486,
-0.1249815970659256,
-0.27646830677986145,
0.21865369379520416,
-0.07028916478157043,
-0.07275889813899994,
-0.06854415684938431,
-0.18967397511005402,
-0.05582594871520996,
0.2673412561416626,
-0.21242322027683258,
0.15677624940872192,
-0.07460591197013855,
-0.1744633913040161,
-0.2747468650341034,
-0.05971069261431694,
-0.16448549926280975,
0.021056000143289566,
0.10053874552249908,
0.3167751729488373,
0.0033469656482338905,
0.15478681027889252,
-0.3915070593357086,
-0.29847875237464905,
0.013277266174554825,
0.08274979889392853,
-0.36418476700782776,
0.43281060457229614,
-0.23216262459754944,
0.14379528164863586,
0.03772234916687012,
0.225971519947052,
0.07463199645280838,
-0.0033202767372131348,
-0.15939195454120636,
-0.44558483362197876,
0.26130303740501404,
0.2699015140533447,
-0.19865679740905762,
-0.11950132250785828,
0.004335224628448486,
0.10739297419786453,
0.12586970627307892,
-0.44796597957611084,
0.1364089548587799,
0.1799706518650055,
-0.04512178897857666,
-0.09457534551620483,
0.08399622142314911,
-0.023716628551483154,
-0.07817844301462173,
-0.13010551035404205,
0.12380357086658478,
-0.026283573359251022,
-0.11458490043878555,
-0.20401231944561005,
-0.15853053331375122
] |
https://github.com/huggingface/datasets/issues/418 | Addition of google drive links to dl_manager | I think the problem is the way you wrote your urls. Try the following structure to see `https://drive.google.com/uc?export=download&id=your_file_id` .
@lhoestq | Hello there, I followed the template to create a download script of my own, which works fine for me, although I had to shun the dl_manager because it was downloading nothing from the drive links and instead use gdown.
This is the script for me:
```python
class EmoConfig(nlp.BuilderConfig):
"""BuilderConfig for SQUAD."""
def __init__(self, **kwargs):
"""BuilderConfig for EmoContext.
Args:
**kwargs: keyword arguments forwarded to super.
"""
super(EmoConfig, self).__init__(**kwargs)
_TEST_URL = "https://drive.google.com/file/d/1Hn5ytHSSoGOC4sjm3wYy0Dh0oY_oXBbb/view?usp=sharing"
_TRAIN_URL = "https://drive.google.com/file/d/12Uz59TYg_NtxOy7SXraYeXPMRT7oaO7X/view?usp=sharing"
class EmoDataset(nlp.GeneratorBasedBuilder):
""" SemEval-2019 Task 3: EmoContext Contextual Emotion Detection in Text. Version 1.0.0 """
VERSION = nlp.Version("1.0.0")
force = False
def _info(self):
return nlp.DatasetInfo(
description=_DESCRIPTION,
features=nlp.Features(
{
"text": nlp.Value("string"),
"label": nlp.features.ClassLabel(names=["others", "happy", "sad", "angry"]),
}
),
supervised_keys=None,
homepage="https://www.aclweb.org/anthology/S19-2005/",
citation=_CITATION,
)
def _get_drive_url(self, url):
base_url = 'https://drive.google.com/uc?id='
split_url = url.split('/')
return base_url + split_url[5]
def _split_generators(self, dl_manager):
"""Returns SplitGenerators."""
if(not os.path.exists("emo-train.json") or self.force):
gdown.download(self._get_drive_url(_TRAIN_URL), "emo-train.json", quiet = True)
if(not os.path.exists("emo-test.json") or self.force):
gdown.download(self._get_drive_url(_TEST_URL), "emo-test.json", quiet = True)
return [
nlp.SplitGenerator(
name=nlp.Split.TRAIN,
gen_kwargs={
"filepath": "emo-train.json",
"split": "train",
},
),
nlp.SplitGenerator(
name=nlp.Split.TEST,
gen_kwargs={"filepath": "emo-test.json", "split": "test"},
),
]
def _generate_examples(self, filepath, split):
""" Yields examples. """
with open(filepath, 'rb') as f:
data = json.load(f)
for id_, text, label in zip(data["text"].keys(), data["text"].values(), data["Label"].values()):
yield id_, {
"text": text,
"label": label,
}
```
Can someone help me in adding gdrive links to be used with default dl_manager or adding gdown as another dl_manager, because I'd like to add this dataset to nlp's official database. | 20 | Addition of google drive links to dl_manager
Hello there, I followed the template to create a download script of my own, which works fine for me, although I had to shun the dl_manager because it was downloading nothing from the drive links and instead use gdown.
This is the script for me:
```python
class EmoConfig(nlp.BuilderConfig):
"""BuilderConfig for SQUAD."""
def __init__(self, **kwargs):
"""BuilderConfig for EmoContext.
Args:
**kwargs: keyword arguments forwarded to super.
"""
super(EmoConfig, self).__init__(**kwargs)
_TEST_URL = "https://drive.google.com/file/d/1Hn5ytHSSoGOC4sjm3wYy0Dh0oY_oXBbb/view?usp=sharing"
_TRAIN_URL = "https://drive.google.com/file/d/12Uz59TYg_NtxOy7SXraYeXPMRT7oaO7X/view?usp=sharing"
class EmoDataset(nlp.GeneratorBasedBuilder):
""" SemEval-2019 Task 3: EmoContext Contextual Emotion Detection in Text. Version 1.0.0 """
VERSION = nlp.Version("1.0.0")
force = False
def _info(self):
return nlp.DatasetInfo(
description=_DESCRIPTION,
features=nlp.Features(
{
"text": nlp.Value("string"),
"label": nlp.features.ClassLabel(names=["others", "happy", "sad", "angry"]),
}
),
supervised_keys=None,
homepage="https://www.aclweb.org/anthology/S19-2005/",
citation=_CITATION,
)
def _get_drive_url(self, url):
base_url = 'https://drive.google.com/uc?id='
split_url = url.split('/')
return base_url + split_url[5]
def _split_generators(self, dl_manager):
"""Returns SplitGenerators."""
if(not os.path.exists("emo-train.json") or self.force):
gdown.download(self._get_drive_url(_TRAIN_URL), "emo-train.json", quiet = True)
if(not os.path.exists("emo-test.json") or self.force):
gdown.download(self._get_drive_url(_TEST_URL), "emo-test.json", quiet = True)
return [
nlp.SplitGenerator(
name=nlp.Split.TRAIN,
gen_kwargs={
"filepath": "emo-train.json",
"split": "train",
},
),
nlp.SplitGenerator(
name=nlp.Split.TEST,
gen_kwargs={"filepath": "emo-test.json", "split": "test"},
),
]
def _generate_examples(self, filepath, split):
""" Yields examples. """
with open(filepath, 'rb') as f:
data = json.load(f)
for id_, text, label in zip(data["text"].keys(), data["text"].values(), data["Label"].values()):
yield id_, {
"text": text,
"label": label,
}
```
Can someone help me in adding gdrive links to be used with default dl_manager or adding gdown as another dl_manager, because I'd like to add this dataset to nlp's official database.
I think the problem is the way you wrote your urls. Try the following structure to see `https://drive.google.com/uc?export=download&id=your_file_id` .
@lhoestq | [
-0.09869396686553955,
0.051656708121299744,
-0.1309204399585724,
-0.05589701980352402,
0.06394068896770477,
-0.09535480290651321,
0.3679336607456207,
0.22081036865711212,
0.2062920182943344,
0.22497770190238953,
-0.07506421953439713,
0.3655760884284973,
-0.28196245431900024,
0.14167781174182892,
0.14772450923919678,
0.11733180284500122,
-0.22435179352760315,
0.2025330364704132,
0.2756347060203552,
-0.16394364833831787,
-0.2751332223415375,
0.3278064727783203,
-0.03187800571322441,
-0.008128464221954346,
0.050231002271175385,
0.0505591444671154,
-0.13912200927734375,
0.19806870818138123,
-0.11889588087797165,
-0.2999531924724579,
-0.419738233089447,
0.16710440814495087,
0.160240039229393,
-0.09745701402425766,
-0.00010426564404042438,
-0.1480783224105835,
0.22256863117218018,
-0.2084532529115677,
-0.4087226986885071,
-0.29366713762283325,
0.29819539189338684,
-0.17242753505706787,
0.10730767250061035,
-0.26513800024986267,
-0.004575738683342934,
-0.09832531958818436,
0.20411840081214905,
0.13540396094322205,
0.26551467180252075,
0.3032338321208954,
0.27170053124427795,
0.07904914766550064,
0.11347097158432007,
0.029893307015299797,
0.33125489950180054,
-0.03548886626958847,
-0.0682806745171547,
0.3527143895626068,
0.3344668447971344,
-0.3054545819759369,
-0.1618672013282776,
0.2883869409561157,
-0.0054727960377931595,
-0.010991360992193222,
0.21951332688331604,
0.11134085059165955,
0.5780615210533142,
-0.3311677575111389,
0.10661463439464569,
0.03274949640035629,
0.023619741201400757,
-0.041323378682136536,
-0.08505090326070786,
-0.28421497344970703,
0.08381393551826477,
-0.2874574661254883,
0.2766532897949219,
0.1495649814605713,
-0.23348401486873627,
-0.054357465356588364,
-0.12947899103164673,
-0.0255043413490057,
-0.015469089150428772,
0.05405953526496887,
-0.08892764151096344,
0.4138534963130951,
-0.038939353078603745,
-0.2830848693847656,
0.38612571358680725,
-0.03815264254808426,
-0.09715810418128967,
-0.15326207876205444,
-0.03946932032704353,
0.07660085707902908,
-0.03747689351439476,
-0.28877753019332886,
0.15674808621406555,
0.046640168875455856,
0.09379725903272629,
0.2489919513463974,
0.0460645854473114,
0.03289168328046799,
0.23562291264533997,
0.07529226690530777,
0.16302816569805145,
0.4459599554538727,
-0.00031441450119018555,
0.04006657749414444,
0.35389721393585205,
0.41765156388282776,
0.1608998030424118,
0.1501174122095108,
-0.12023378908634186,
-0.18616096675395966,
-0.141651913523674,
0.14086180925369263,
-0.15757936239242554,
0.09060105681419373,
-0.43104469776153564,
-0.1330975443124771,
-0.3732340633869171,
0.007338572759181261,
-0.03436201438307762,
0.43782833218574524,
-0.048748929053545,
-0.13966107368469238,
0.24411369860172272,
0.23740126192569733,
-0.04237280786037445,
0.09001769870519638,
-0.12547798454761505,
0.25561556220054626,
-0.2168092131614685,
-0.05202309042215347,
0.3310389518737793,
0.07708041369915009,
0.42122316360473633,
-0.25716066360473633,
-0.12134049832820892,
-0.22413216531276703,
0.1388942003250122,
0.08599665760993958,
-0.013924278318881989,
-0.06411124765872955,
0.416702538728714,
0.015522269532084465,
-0.153324693441391,
-0.41582155227661133,
-0.07122546434402466,
0.03881119564175606,
0.034707970917224884,
-0.03710659593343735,
-0.17407634854316711,
0.3355266749858856,
-0.08622902631759644,
-0.09424631297588348,
-0.003776364028453827,
0.22714753448963165,
-0.15021580457687378,
0.043601345270872116,
0.08587674796581268,
0.31828612089157104,
-0.08277725428342819,
-0.000988567597232759,
0.16852252185344696,
0.29862284660339355,
-0.09494523704051971,
-0.2877131998538971,
-0.18399424850940704,
0.167367622256279,
-0.11325468868017197,
-0.06327076256275177,
-0.04493009299039841,
0.24556732177734375,
-0.37940025329589844,
0.24192087352275848,
0.30434635281562805,
-0.28963831067085266,
-0.20502783358097076,
0.21484456956386566,
-0.37521976232528687,
-0.1749032437801361,
0.03027006983757019,
0.01429993286728859,
0.41080373525619507,
-0.004255356267094612,
-0.14322903752326965,
0.482791006565094,
0.07717061787843704,
0.24286514520645142,
-0.30401352047920227,
-0.4660179018974304,
-0.18291324377059937,
0.20750336349010468,
0.15166406333446503,
-0.11844649165868759,
0.10884037613868713,
-0.08774527162313461,
0.3002714216709137,
-0.15627449750900269,
0.18655936419963837,
0.10289221256971359,
0.08243071287870407,
0.09620226919651031,
0.09026490896940231,
0.1277567744255066,
-0.4553064703941345,
-0.024584099650382996,
-0.1491098552942276,
0.2400393933057785,
-0.3181626796722412,
-0.16543518006801605,
-0.22851216793060303,
-0.1823606640100479,
-0.20870341360569,
-0.3032350540161133,
0.2976229190826416,
0.21817870438098907,
0.05891465023159981,
0.24891389906406403,
0.07916674017906189,
-0.0783369243144989,
0.16629283130168915,
0.1352357715368271,
0.04830525442957878,
0.33084067702293396,
-0.3822055160999298,
-0.11544522643089294,
0.1777770072221756,
0.053385213017463684,
0.16276949644088745,
-0.009796727448701859,
0.017779767513275146,
0.20223045349121094,
-0.23383571207523346,
0.4560251235961914,
0.03429916501045227,
-0.01848725974559784,
0.2643812894821167,
-0.0018941126763820648,
0.32860469818115234,
0.37859755754470825,
0.12536872923374176,
-0.04232169687747955,
-0.13353922963142395,
0.3993215560913086,
0.29787304997444153,
0.1315351128578186,
0.198439359664917,
0.14926306903362274,
-0.0345822311937809,
-0.30922162532806396,
-0.0366152785718441,
-0.1750037670135498,
0.10603287816047668,
0.4917028248310089,
0.3812161386013031,
-0.11718998849391937,
-0.17985579371452332,
0.22686004638671875,
0.352283775806427,
-0.04310408979654312,
0.28841665387153625,
0.07977931201457977,
-0.349387526512146,
-0.15528807044029236,
-0.11724890768527985,
0.35257285833358765,
0.16296465694904327,
0.25432121753692627,
0.17127224802970886,
0.049335360527038574,
-0.008008823730051517,
-0.3064473271369934,
0.3992123603820801,
0.06556172668933868,
0.1062251627445221,
0.35542726516723633,
0.11225486546754837,
-0.12416260689496994,
-0.3668968081474304,
-0.007818697020411491,
-0.003091028891503811,
-0.051934026181697845,
-0.28097158670425415,
-0.03597652539610863,
-0.20211179554462433,
-0.16735482215881348,
-0.04041659086942673,
0.11890799552202225,
-0.045385804027318954,
-0.1994875818490982,
0.2415715456008911,
0.28511014580726624,
-0.27773457765579224,
0.127188578248024,
0.1675778478384018,
0.3435671329498291,
-0.07041957229375839,
-0.05174040049314499,
-0.10932108759880066,
0.015628937631845474,
-0.331397145986557,
0.190747931599617,
0.27920612692832947,
0.08477700501680374,
0.1668630987405777,
0.03535435348749161,
0.08241011947393417,
-0.4212248623371124,
-0.1966782808303833,
0.2405078411102295,
-0.14672976732254028,
0.03966046869754791,
0.10825654864311218,
-0.09118108451366425,
-0.047825731337070465,
-0.347211629152298,
0.05037488043308258,
-0.20661014318466187,
-0.20288394391536713,
-0.3251749873161316,
0.1594587117433548,
0.06294962018728256,
-0.4881841540336609,
-0.39876773953437805,
-0.23691464960575104,
-0.3800836503505707,
0.16774040460586548,
0.1598069965839386,
0.18229936063289642,
0.12465544044971466,
-0.05482621118426323,
0.18005679547786713,
0.22314037382602692,
-0.16060708463191986,
-0.14767207205295563,
0.2775507867336273,
0.4198608994483948,
-0.4095941185951233,
-0.31906360387802124,
0.043911438435316086,
-0.3232090473175049,
0.01338338851928711,
-0.2990257143974304,
-0.25010812282562256,
-0.4383619427680969,
0.15373113751411438,
-0.17779897153377533,
-0.08453419804573059,
-0.0026810243725776672,
0.29861778020858765,
0.18735913932323456,
-0.2003108263015747,
0.026588723063468933,
-0.11106991767883301,
0.20705485343933105,
0.08829931169748306,
0.38477209210395813,
-0.1615372598171234,
0.40672293305397034,
0.11748673021793365,
0.25662773847579956,
-0.26918765902519226,
0.03353632614016533,
0.36191874742507935,
-0.050672829151153564,
0.17019449174404144,
0.15920287370681763,
-0.08635120838880539,
0.13635656237602234,
0.04094647616147995,
-0.09443498402833939,
0.533661961555481,
-0.0854700356721878,
-0.48649778962135315,
-0.18266725540161133,
0.05321895703673363,
-0.27368637919425964,
-0.26792120933532715,
-0.10895545780658722,
0.26604145765304565,
-0.19568350911140442,
0.011589806526899338,
0.21495559811592102,
0.005222311243414879,
-0.06083918735384941,
0.20591799914836884,
0.21968984603881836,
-0.07721688598394394,
-0.12061600387096405,
0.11858509480953217,
0.1042684018611908,
-0.3951478898525238,
0.11174871772527695,
0.10438238084316254,
-0.4041227102279663,
0.10743935406208038,
-0.225613534450531,
0.20364093780517578,
-0.31954488158226013,
0.35874122381210327,
-0.120961032807827,
0.26626521348953247,
-0.014370022341609001,
0.21643811464309692,
0.1093020960688591,
-0.09933765232563019,
-0.2988065779209137,
-0.32118189334869385,
0.45074698328971863,
-0.04787550866603851,
-0.2656046152114868,
-0.14416393637657166,
0.33849188685417175,
-0.2589455842971802,
0.032387200742959976,
-0.09629585593938828,
-0.019114293158054352,
-0.529708743095398,
-0.5422525405883789,
0.07723969221115112,
0.12609338760375977,
0.09797461330890656,
-0.18700605630874634,
-0.16395500302314758,
0.27043721079826355,
-0.20997220277786255,
-0.11222729086875916,
0.0596688874065876,
0.18278822302818298,
0.14112594723701477,
-0.04690498113632202,
0.20149913430213928,
0.48597878217697144,
-0.08635210990905762,
0.05024278908967972,
0.08871354162693024,
0.1350984275341034,
0.35846108198165894,
-0.29154908657073975,
-0.0120515376329422,
0.4303927719593048,
0.042383212596178055,
-0.14499139785766602,
-0.33781111240386963,
0.13119998574256897,
-0.005021356977522373,
0.026209240779280663,
0.3523302376270294,
-0.00769641762599349,
0.3189746141433716,
-0.1285671591758728,
0.3718149662017822,
-0.11493894457817078,
-0.14957086741924286,
-0.1133224368095398,
0.13794219493865967,
-0.48915597796440125,
0.20236298441886902,
0.24947935342788696,
1.0095967054367065,
0.18289029598236084,
0.18415914475917816,
0.3770171105861664,
-0.18287712335586548,
0.2244253009557724,
-0.20480528473854065,
0.24204489588737488,
-0.2759118676185608,
0.2594022750854492,
0.02705596201121807,
0.12355494499206543,
-0.2554807662963867,
0.28570836782455444,
-0.3485201597213745,
0.2226642519235611,
0.19183386862277985,
-0.05509382113814354,
0.03974039852619171,
0.5254415273666382,
-0.41476544737815857,
-0.3550724983215332,
-0.08400614559650421,
0.22533899545669556,
0.20747844874858856,
0.3336934745311737,
-0.022405091673135757,
-0.3262500762939453,
0.0230255089700222,
-0.36899805068969727,
-0.12004273384809494,
0.22281011939048767,
-0.6562029123306274,
0.0811411440372467,
-0.42058104276657104,
-0.20546573400497437,
0.07149840891361237,
0.12163916230201721,
0.18259349465370178,
0.10026136040687561,
-0.06405807286500931,
0.2806989252567291,
0.045134320855140686,
-0.046437982469797134,
-0.005044605582952499,
-0.1170370802283287,
0.2287958413362503,
-0.2543817460536957,
-0.2008151113986969,
-0.05295592546463013,
0.15077844262123108,
-0.28445714712142944,
0.04941403865814209,
-0.02531374990940094,
-0.2893362045288086,
0.16326585412025452,
0.0008369069546461105,
0.08880244195461273,
-0.40703919529914856,
-0.17011800408363342,
0.21576611697673798,
-0.22286470234394073,
-0.006302103400230408,
-0.04202565550804138,
0.07535595446825027,
-0.16575798392295837,
-0.1717545986175537,
0.4114311635494232,
-0.19205418229103088,
-0.32575279474258423,
0.5842940807342529,
0.06437298655509949,
-0.1504262387752533,
-0.36543548107147217,
-0.2140045464038849,
0.01501239649951458,
-0.15085169672966003,
0.11020111292600632,
-0.11286650598049164,
-0.256215900182724,
-0.014631380327045918,
0.500047504901886,
-0.0012303665280342102,
0.2679019272327423,
0.02651895210146904,
-0.08714215457439423,
-0.0991814136505127,
0.26232337951660156,
-0.13460460305213928,
0.2985239624977112,
-0.07511880993843079,
0.08205397427082062,
0.18698722124099731,
-0.14571508765220642,
-0.4634036719799042,
0.07907646149396896,
-0.1712532788515091,
-0.14057180285453796,
0.12507380545139313,
-0.2987321615219116,
0.30952075123786926,
0.17042601108551025,
0.2733670175075531,
0.22055649757385254,
-0.07725664228200912,
-0.26636162400245667,
-0.030433764681220055,
0.07006420195102692,
0.047300733625888824,
-0.1006331667304039,
0.012366785667836666,
-0.11151040345430374,
-0.2185090035200119,
0.1263175904750824,
0.20107930898666382,
-0.18316268920898438,
0.08333724737167358,
-0.10322177410125732,
-0.2481861263513565,
0.09767058491706848,
0.25542134046554565,
-0.1850835084915161,
-0.0976003110408783,
0.4207090139389038,
0.016686931252479553,
0.10759516805410385,
0.007805357687175274,
0.003392718732357025,
0.04312305897474289,
0.14116525650024414,
0.056450679898262024,
0.33877092599868774,
0.2962431013584137,
0.06722493469715118,
-0.5515542030334473,
0.06194397807121277,
0.26379644870758057,
0.07853786647319794,
-0.25156843662261963,
-0.1156085878610611,
0.22283154726028442,
0.3556101620197296,
-0.25941741466522217,
0.17321845889091492,
-0.16231130063533783,
-0.44822975993156433,
0.3617488145828247,
0.2996286451816559,
0.1987312138080597,
0.06725206971168518,
0.04757731035351753,
0.15383389592170715,
0.4046257436275482,
-0.07478830963373184,
-0.09284010529518127,
-0.05252690985798836,
-0.12249360978603363,
0.1339273303747177,
0.1850816011428833,
0.0674041137099266,
0.3257812559604645,
-0.16162967681884766,
-0.1871490478515625,
0.008799329400062561,
0.023579224944114685,
0.26404649019241333,
0.21662655472755432,
0.051934633404016495,
0.0383678562939167,
0.0814644992351532,
-0.24517032504081726,
0.09618701040744781,
-0.06733651459217072,
0.22006645798683167,
-0.32349956035614014,
0.024017667397856712,
-0.34097808599472046,
0.41611358523368835,
-0.061810292303562164,
-0.008547589182853699,
-0.25166618824005127,
-0.3260459899902344,
-0.6693038940429688,
0.19294306635856628,
0.04504760727286339,
-0.14202454686164856,
-0.4067161977291107,
0.10912241786718369,
-0.04365997016429901,
0.048874080181121826,
-0.23544391989707947,
-0.09591285139322281,
0.33246472477912903,
-0.41274571418762207,
0.14867213368415833,
0.014996960759162903,
0.1223977580666542,
-0.1983049064874649,
0.32274556159973145,
0.2554567754268646,
0.2159595936536789,
-0.31024491786956787,
-0.20354770123958588,
-0.07942485809326172,
-0.060154989361763,
-0.14421741664409637,
0.03710973635315895,
0.32657596468925476,
-0.16945676505565643,
0.15005384385585785,
0.21607816219329834,
-0.38535335659980774,
-0.05778784677386284,
0.283499151468277,
-0.22256560623645782,
0.25268077850341797,
0.16240251064300537,
0.27187222242355347,
0.013558730483055115,
-0.3872142434120178,
-0.30668357014656067,
-0.5732119679450989,
-0.13489437103271484,
-0.2507288455963135,
-0.1008889451622963,
0.2407357096672058,
-0.3101213574409485,
0.15338872373104095,
0.11740554869174957,
0.18029069900512695,
0.30675724148750305,
-0.0013957135379314423,
-0.1100461483001709,
-0.2357509881258011,
-0.4394384026527405,
0.05538111552596092,
0.26800084114074707,
-0.13249734044075012,
-0.2193135768175125,
0.40465468168258667,
-0.01197834312915802,
-0.021018605679273605,
0.009386427700519562,
0.5449488759040833,
0.2535099983215332,
0.0710768848657608,
-0.1868591606616974,
0.17594026029109955,
0.12504899501800537,
0.11453040689229965,
0.0818907767534256,
-0.18278956413269043,
-0.1159723699092865,
-0.28695160150527954,
0.21485957503318787,
-0.13423983752727509,
0.16132783889770508,
-0.3132971227169037,
0.003750275820493698,
0.4126846492290497,
-0.2459641396999359,
0.26622870564460754,
-0.28622132539749146,
-0.15344856679439545,
-0.1860762983560562,
0.20852228999137878,
-0.29524290561676025,
-0.355087548494339,
0.24073249101638794,
0.1949661821126938,
0.07007899880409241,
0.0669674351811409,
-0.2691863179206848,
0.26158520579338074,
0.044512152671813965,
0.00492292083799839,
-0.19112610816955566,
0.11490768939256668,
-0.06233799085021019,
0.09782035648822784,
0.03151882067322731,
0.20531785488128662,
-0.12497308850288391,
0.04828769713640213,
-0.49528712034225464,
-0.5152052640914917,
0.16102167963981628,
-0.05245324969291687,
-0.08688244223594666,
-0.06760881841182709,
0.39681756496429443,
0.2529713809490204,
0.15932057797908783,
-0.29319944977760315,
0.1256084144115448,
-0.008349481038749218,
0.18230071663856506,
-0.17034900188446045,
0.1373271346092224,
0.13820379972457886,
-0.1351919323205948,
-0.0715939998626709,
-0.20120012760162354,
0.3138323128223419,
0.008085140958428383,
-0.20658278465270996,
-0.3480612635612488
] |
https://github.com/huggingface/datasets/issues/418 | Addition of google drive links to dl_manager | Oh sorry, I think `_get_drive_url` is doing that.
Have you tried to use `dl_manager.download_and_extract(_get_drive_url(_TRAIN_URL)`? it should work with google drive links.
| Hello there, I followed the template to create a download script of my own, which works fine for me, although I had to shun the dl_manager because it was downloading nothing from the drive links and instead use gdown.
This is the script for me:
```python
class EmoConfig(nlp.BuilderConfig):
"""BuilderConfig for SQUAD."""
def __init__(self, **kwargs):
"""BuilderConfig for EmoContext.
Args:
**kwargs: keyword arguments forwarded to super.
"""
super(EmoConfig, self).__init__(**kwargs)
_TEST_URL = "https://drive.google.com/file/d/1Hn5ytHSSoGOC4sjm3wYy0Dh0oY_oXBbb/view?usp=sharing"
_TRAIN_URL = "https://drive.google.com/file/d/12Uz59TYg_NtxOy7SXraYeXPMRT7oaO7X/view?usp=sharing"
class EmoDataset(nlp.GeneratorBasedBuilder):
""" SemEval-2019 Task 3: EmoContext Contextual Emotion Detection in Text. Version 1.0.0 """
VERSION = nlp.Version("1.0.0")
force = False
def _info(self):
return nlp.DatasetInfo(
description=_DESCRIPTION,
features=nlp.Features(
{
"text": nlp.Value("string"),
"label": nlp.features.ClassLabel(names=["others", "happy", "sad", "angry"]),
}
),
supervised_keys=None,
homepage="https://www.aclweb.org/anthology/S19-2005/",
citation=_CITATION,
)
def _get_drive_url(self, url):
base_url = 'https://drive.google.com/uc?id='
split_url = url.split('/')
return base_url + split_url[5]
def _split_generators(self, dl_manager):
"""Returns SplitGenerators."""
if(not os.path.exists("emo-train.json") or self.force):
gdown.download(self._get_drive_url(_TRAIN_URL), "emo-train.json", quiet = True)
if(not os.path.exists("emo-test.json") or self.force):
gdown.download(self._get_drive_url(_TEST_URL), "emo-test.json", quiet = True)
return [
nlp.SplitGenerator(
name=nlp.Split.TRAIN,
gen_kwargs={
"filepath": "emo-train.json",
"split": "train",
},
),
nlp.SplitGenerator(
name=nlp.Split.TEST,
gen_kwargs={"filepath": "emo-test.json", "split": "test"},
),
]
def _generate_examples(self, filepath, split):
""" Yields examples. """
with open(filepath, 'rb') as f:
data = json.load(f)
for id_, text, label in zip(data["text"].keys(), data["text"].values(), data["Label"].values()):
yield id_, {
"text": text,
"label": label,
}
```
Can someone help me in adding gdrive links to be used with default dl_manager or adding gdown as another dl_manager, because I'd like to add this dataset to nlp's official database. | 21 | Addition of google drive links to dl_manager
Hello there, I followed the template to create a download script of my own, which works fine for me, although I had to shun the dl_manager because it was downloading nothing from the drive links and instead use gdown.
This is the script for me:
```python
class EmoConfig(nlp.BuilderConfig):
"""BuilderConfig for SQUAD."""
def __init__(self, **kwargs):
"""BuilderConfig for EmoContext.
Args:
**kwargs: keyword arguments forwarded to super.
"""
super(EmoConfig, self).__init__(**kwargs)
_TEST_URL = "https://drive.google.com/file/d/1Hn5ytHSSoGOC4sjm3wYy0Dh0oY_oXBbb/view?usp=sharing"
_TRAIN_URL = "https://drive.google.com/file/d/12Uz59TYg_NtxOy7SXraYeXPMRT7oaO7X/view?usp=sharing"
class EmoDataset(nlp.GeneratorBasedBuilder):
""" SemEval-2019 Task 3: EmoContext Contextual Emotion Detection in Text. Version 1.0.0 """
VERSION = nlp.Version("1.0.0")
force = False
def _info(self):
return nlp.DatasetInfo(
description=_DESCRIPTION,
features=nlp.Features(
{
"text": nlp.Value("string"),
"label": nlp.features.ClassLabel(names=["others", "happy", "sad", "angry"]),
}
),
supervised_keys=None,
homepage="https://www.aclweb.org/anthology/S19-2005/",
citation=_CITATION,
)
def _get_drive_url(self, url):
base_url = 'https://drive.google.com/uc?id='
split_url = url.split('/')
return base_url + split_url[5]
def _split_generators(self, dl_manager):
"""Returns SplitGenerators."""
if(not os.path.exists("emo-train.json") or self.force):
gdown.download(self._get_drive_url(_TRAIN_URL), "emo-train.json", quiet = True)
if(not os.path.exists("emo-test.json") or self.force):
gdown.download(self._get_drive_url(_TEST_URL), "emo-test.json", quiet = True)
return [
nlp.SplitGenerator(
name=nlp.Split.TRAIN,
gen_kwargs={
"filepath": "emo-train.json",
"split": "train",
},
),
nlp.SplitGenerator(
name=nlp.Split.TEST,
gen_kwargs={"filepath": "emo-test.json", "split": "test"},
),
]
def _generate_examples(self, filepath, split):
""" Yields examples. """
with open(filepath, 'rb') as f:
data = json.load(f)
for id_, text, label in zip(data["text"].keys(), data["text"].values(), data["Label"].values()):
yield id_, {
"text": text,
"label": label,
}
```
Can someone help me in adding gdrive links to be used with default dl_manager or adding gdown as another dl_manager, because I'd like to add this dataset to nlp's official database.
Oh sorry, I think `_get_drive_url` is doing that.
Have you tried to use `dl_manager.download_and_extract(_get_drive_url(_TRAIN_URL)`? it should work with google drive links.
| [
-0.09869396686553955,
0.051656708121299744,
-0.1309204399585724,
-0.05589701980352402,
0.06394068896770477,
-0.09535480290651321,
0.3679336607456207,
0.22081036865711212,
0.2062920182943344,
0.22497770190238953,
-0.07506421953439713,
0.3655760884284973,
-0.28196245431900024,
0.14167781174182892,
0.14772450923919678,
0.11733180284500122,
-0.22435179352760315,
0.2025330364704132,
0.2756347060203552,
-0.16394364833831787,
-0.2751332223415375,
0.3278064727783203,
-0.03187800571322441,
-0.008128464221954346,
0.050231002271175385,
0.0505591444671154,
-0.13912200927734375,
0.19806870818138123,
-0.11889588087797165,
-0.2999531924724579,
-0.419738233089447,
0.16710440814495087,
0.160240039229393,
-0.09745701402425766,
-0.00010426564404042438,
-0.1480783224105835,
0.22256863117218018,
-0.2084532529115677,
-0.4087226986885071,
-0.29366713762283325,
0.29819539189338684,
-0.17242753505706787,
0.10730767250061035,
-0.26513800024986267,
-0.004575738683342934,
-0.09832531958818436,
0.20411840081214905,
0.13540396094322205,
0.26551467180252075,
0.3032338321208954,
0.27170053124427795,
0.07904914766550064,
0.11347097158432007,
0.029893307015299797,
0.33125489950180054,
-0.03548886626958847,
-0.0682806745171547,
0.3527143895626068,
0.3344668447971344,
-0.3054545819759369,
-0.1618672013282776,
0.2883869409561157,
-0.0054727960377931595,
-0.010991360992193222,
0.21951332688331604,
0.11134085059165955,
0.5780615210533142,
-0.3311677575111389,
0.10661463439464569,
0.03274949640035629,
0.023619741201400757,
-0.041323378682136536,
-0.08505090326070786,
-0.28421497344970703,
0.08381393551826477,
-0.2874574661254883,
0.2766532897949219,
0.1495649814605713,
-0.23348401486873627,
-0.054357465356588364,
-0.12947899103164673,
-0.0255043413490057,
-0.015469089150428772,
0.05405953526496887,
-0.08892764151096344,
0.4138534963130951,
-0.038939353078603745,
-0.2830848693847656,
0.38612571358680725,
-0.03815264254808426,
-0.09715810418128967,
-0.15326207876205444,
-0.03946932032704353,
0.07660085707902908,
-0.03747689351439476,
-0.28877753019332886,
0.15674808621406555,
0.046640168875455856,
0.09379725903272629,
0.2489919513463974,
0.0460645854473114,
0.03289168328046799,
0.23562291264533997,
0.07529226690530777,
0.16302816569805145,
0.4459599554538727,
-0.00031441450119018555,
0.04006657749414444,
0.35389721393585205,
0.41765156388282776,
0.1608998030424118,
0.1501174122095108,
-0.12023378908634186,
-0.18616096675395966,
-0.141651913523674,
0.14086180925369263,
-0.15757936239242554,
0.09060105681419373,
-0.43104469776153564,
-0.1330975443124771,
-0.3732340633869171,
0.007338572759181261,
-0.03436201438307762,
0.43782833218574524,
-0.048748929053545,
-0.13966107368469238,
0.24411369860172272,
0.23740126192569733,
-0.04237280786037445,
0.09001769870519638,
-0.12547798454761505,
0.25561556220054626,
-0.2168092131614685,
-0.05202309042215347,
0.3310389518737793,
0.07708041369915009,
0.42122316360473633,
-0.25716066360473633,
-0.12134049832820892,
-0.22413216531276703,
0.1388942003250122,
0.08599665760993958,
-0.013924278318881989,
-0.06411124765872955,
0.416702538728714,
0.015522269532084465,
-0.153324693441391,
-0.41582155227661133,
-0.07122546434402466,
0.03881119564175606,
0.034707970917224884,
-0.03710659593343735,
-0.17407634854316711,
0.3355266749858856,
-0.08622902631759644,
-0.09424631297588348,
-0.003776364028453827,
0.22714753448963165,
-0.15021580457687378,
0.043601345270872116,
0.08587674796581268,
0.31828612089157104,
-0.08277725428342819,
-0.000988567597232759,
0.16852252185344696,
0.29862284660339355,
-0.09494523704051971,
-0.2877131998538971,
-0.18399424850940704,
0.167367622256279,
-0.11325468868017197,
-0.06327076256275177,
-0.04493009299039841,
0.24556732177734375,
-0.37940025329589844,
0.24192087352275848,
0.30434635281562805,
-0.28963831067085266,
-0.20502783358097076,
0.21484456956386566,
-0.37521976232528687,
-0.1749032437801361,
0.03027006983757019,
0.01429993286728859,
0.41080373525619507,
-0.004255356267094612,
-0.14322903752326965,
0.482791006565094,
0.07717061787843704,
0.24286514520645142,
-0.30401352047920227,
-0.4660179018974304,
-0.18291324377059937,
0.20750336349010468,
0.15166406333446503,
-0.11844649165868759,
0.10884037613868713,
-0.08774527162313461,
0.3002714216709137,
-0.15627449750900269,
0.18655936419963837,
0.10289221256971359,
0.08243071287870407,
0.09620226919651031,
0.09026490896940231,
0.1277567744255066,
-0.4553064703941345,
-0.024584099650382996,
-0.1491098552942276,
0.2400393933057785,
-0.3181626796722412,
-0.16543518006801605,
-0.22851216793060303,
-0.1823606640100479,
-0.20870341360569,
-0.3032350540161133,
0.2976229190826416,
0.21817870438098907,
0.05891465023159981,
0.24891389906406403,
0.07916674017906189,
-0.0783369243144989,
0.16629283130168915,
0.1352357715368271,
0.04830525442957878,
0.33084067702293396,
-0.3822055160999298,
-0.11544522643089294,
0.1777770072221756,
0.053385213017463684,
0.16276949644088745,
-0.009796727448701859,
0.017779767513275146,
0.20223045349121094,
-0.23383571207523346,
0.4560251235961914,
0.03429916501045227,
-0.01848725974559784,
0.2643812894821167,
-0.0018941126763820648,
0.32860469818115234,
0.37859755754470825,
0.12536872923374176,
-0.04232169687747955,
-0.13353922963142395,
0.3993215560913086,
0.29787304997444153,
0.1315351128578186,
0.198439359664917,
0.14926306903362274,
-0.0345822311937809,
-0.30922162532806396,
-0.0366152785718441,
-0.1750037670135498,
0.10603287816047668,
0.4917028248310089,
0.3812161386013031,
-0.11718998849391937,
-0.17985579371452332,
0.22686004638671875,
0.352283775806427,
-0.04310408979654312,
0.28841665387153625,
0.07977931201457977,
-0.349387526512146,
-0.15528807044029236,
-0.11724890768527985,
0.35257285833358765,
0.16296465694904327,
0.25432121753692627,
0.17127224802970886,
0.049335360527038574,
-0.008008823730051517,
-0.3064473271369934,
0.3992123603820801,
0.06556172668933868,
0.1062251627445221,
0.35542726516723633,
0.11225486546754837,
-0.12416260689496994,
-0.3668968081474304,
-0.007818697020411491,
-0.003091028891503811,
-0.051934026181697845,
-0.28097158670425415,
-0.03597652539610863,
-0.20211179554462433,
-0.16735482215881348,
-0.04041659086942673,
0.11890799552202225,
-0.045385804027318954,
-0.1994875818490982,
0.2415715456008911,
0.28511014580726624,
-0.27773457765579224,
0.127188578248024,
0.1675778478384018,
0.3435671329498291,
-0.07041957229375839,
-0.05174040049314499,
-0.10932108759880066,
0.015628937631845474,
-0.331397145986557,
0.190747931599617,
0.27920612692832947,
0.08477700501680374,
0.1668630987405777,
0.03535435348749161,
0.08241011947393417,
-0.4212248623371124,
-0.1966782808303833,
0.2405078411102295,
-0.14672976732254028,
0.03966046869754791,
0.10825654864311218,
-0.09118108451366425,
-0.047825731337070465,
-0.347211629152298,
0.05037488043308258,
-0.20661014318466187,
-0.20288394391536713,
-0.3251749873161316,
0.1594587117433548,
0.06294962018728256,
-0.4881841540336609,
-0.39876773953437805,
-0.23691464960575104,
-0.3800836503505707,
0.16774040460586548,
0.1598069965839386,
0.18229936063289642,
0.12465544044971466,
-0.05482621118426323,
0.18005679547786713,
0.22314037382602692,
-0.16060708463191986,
-0.14767207205295563,
0.2775507867336273,
0.4198608994483948,
-0.4095941185951233,
-0.31906360387802124,
0.043911438435316086,
-0.3232090473175049,
0.01338338851928711,
-0.2990257143974304,
-0.25010812282562256,
-0.4383619427680969,
0.15373113751411438,
-0.17779897153377533,
-0.08453419804573059,
-0.0026810243725776672,
0.29861778020858765,
0.18735913932323456,
-0.2003108263015747,
0.026588723063468933,
-0.11106991767883301,
0.20705485343933105,
0.08829931169748306,
0.38477209210395813,
-0.1615372598171234,
0.40672293305397034,
0.11748673021793365,
0.25662773847579956,
-0.26918765902519226,
0.03353632614016533,
0.36191874742507935,
-0.050672829151153564,
0.17019449174404144,
0.15920287370681763,
-0.08635120838880539,
0.13635656237602234,
0.04094647616147995,
-0.09443498402833939,
0.533661961555481,
-0.0854700356721878,
-0.48649778962135315,
-0.18266725540161133,
0.05321895703673363,
-0.27368637919425964,
-0.26792120933532715,
-0.10895545780658722,
0.26604145765304565,
-0.19568350911140442,
0.011589806526899338,
0.21495559811592102,
0.005222311243414879,
-0.06083918735384941,
0.20591799914836884,
0.21968984603881836,
-0.07721688598394394,
-0.12061600387096405,
0.11858509480953217,
0.1042684018611908,
-0.3951478898525238,
0.11174871772527695,
0.10438238084316254,
-0.4041227102279663,
0.10743935406208038,
-0.225613534450531,
0.20364093780517578,
-0.31954488158226013,
0.35874122381210327,
-0.120961032807827,
0.26626521348953247,
-0.014370022341609001,
0.21643811464309692,
0.1093020960688591,
-0.09933765232563019,
-0.2988065779209137,
-0.32118189334869385,
0.45074698328971863,
-0.04787550866603851,
-0.2656046152114868,
-0.14416393637657166,
0.33849188685417175,
-0.2589455842971802,
0.032387200742959976,
-0.09629585593938828,
-0.019114293158054352,
-0.529708743095398,
-0.5422525405883789,
0.07723969221115112,
0.12609338760375977,
0.09797461330890656,
-0.18700605630874634,
-0.16395500302314758,
0.27043721079826355,
-0.20997220277786255,
-0.11222729086875916,
0.0596688874065876,
0.18278822302818298,
0.14112594723701477,
-0.04690498113632202,
0.20149913430213928,
0.48597878217697144,
-0.08635210990905762,
0.05024278908967972,
0.08871354162693024,
0.1350984275341034,
0.35846108198165894,
-0.29154908657073975,
-0.0120515376329422,
0.4303927719593048,
0.042383212596178055,
-0.14499139785766602,
-0.33781111240386963,
0.13119998574256897,
-0.005021356977522373,
0.026209240779280663,
0.3523302376270294,
-0.00769641762599349,
0.3189746141433716,
-0.1285671591758728,
0.3718149662017822,
-0.11493894457817078,
-0.14957086741924286,
-0.1133224368095398,
0.13794219493865967,
-0.48915597796440125,
0.20236298441886902,
0.24947935342788696,
1.0095967054367065,
0.18289029598236084,
0.18415914475917816,
0.3770171105861664,
-0.18287712335586548,
0.2244253009557724,
-0.20480528473854065,
0.24204489588737488,
-0.2759118676185608,
0.2594022750854492,
0.02705596201121807,
0.12355494499206543,
-0.2554807662963867,
0.28570836782455444,
-0.3485201597213745,
0.2226642519235611,
0.19183386862277985,
-0.05509382113814354,
0.03974039852619171,
0.5254415273666382,
-0.41476544737815857,
-0.3550724983215332,
-0.08400614559650421,
0.22533899545669556,
0.20747844874858856,
0.3336934745311737,
-0.022405091673135757,
-0.3262500762939453,
0.0230255089700222,
-0.36899805068969727,
-0.12004273384809494,
0.22281011939048767,
-0.6562029123306274,
0.0811411440372467,
-0.42058104276657104,
-0.20546573400497437,
0.07149840891361237,
0.12163916230201721,
0.18259349465370178,
0.10026136040687561,
-0.06405807286500931,
0.2806989252567291,
0.045134320855140686,
-0.046437982469797134,
-0.005044605582952499,
-0.1170370802283287,
0.2287958413362503,
-0.2543817460536957,
-0.2008151113986969,
-0.05295592546463013,
0.15077844262123108,
-0.28445714712142944,
0.04941403865814209,
-0.02531374990940094,
-0.2893362045288086,
0.16326585412025452,
0.0008369069546461105,
0.08880244195461273,
-0.40703919529914856,
-0.17011800408363342,
0.21576611697673798,
-0.22286470234394073,
-0.006302103400230408,
-0.04202565550804138,
0.07535595446825027,
-0.16575798392295837,
-0.1717545986175537,
0.4114311635494232,
-0.19205418229103088,
-0.32575279474258423,
0.5842940807342529,
0.06437298655509949,
-0.1504262387752533,
-0.36543548107147217,
-0.2140045464038849,
0.01501239649951458,
-0.15085169672966003,
0.11020111292600632,
-0.11286650598049164,
-0.256215900182724,
-0.014631380327045918,
0.500047504901886,
-0.0012303665280342102,
0.2679019272327423,
0.02651895210146904,
-0.08714215457439423,
-0.0991814136505127,
0.26232337951660156,
-0.13460460305213928,
0.2985239624977112,
-0.07511880993843079,
0.08205397427082062,
0.18698722124099731,
-0.14571508765220642,
-0.4634036719799042,
0.07907646149396896,
-0.1712532788515091,
-0.14057180285453796,
0.12507380545139313,
-0.2987321615219116,
0.30952075123786926,
0.17042601108551025,
0.2733670175075531,
0.22055649757385254,
-0.07725664228200912,
-0.26636162400245667,
-0.030433764681220055,
0.07006420195102692,
0.047300733625888824,
-0.1006331667304039,
0.012366785667836666,
-0.11151040345430374,
-0.2185090035200119,
0.1263175904750824,
0.20107930898666382,
-0.18316268920898438,
0.08333724737167358,
-0.10322177410125732,
-0.2481861263513565,
0.09767058491706848,
0.25542134046554565,
-0.1850835084915161,
-0.0976003110408783,
0.4207090139389038,
0.016686931252479553,
0.10759516805410385,
0.007805357687175274,
0.003392718732357025,
0.04312305897474289,
0.14116525650024414,
0.056450679898262024,
0.33877092599868774,
0.2962431013584137,
0.06722493469715118,
-0.5515542030334473,
0.06194397807121277,
0.26379644870758057,
0.07853786647319794,
-0.25156843662261963,
-0.1156085878610611,
0.22283154726028442,
0.3556101620197296,
-0.25941741466522217,
0.17321845889091492,
-0.16231130063533783,
-0.44822975993156433,
0.3617488145828247,
0.2996286451816559,
0.1987312138080597,
0.06725206971168518,
0.04757731035351753,
0.15383389592170715,
0.4046257436275482,
-0.07478830963373184,
-0.09284010529518127,
-0.05252690985798836,
-0.12249360978603363,
0.1339273303747177,
0.1850816011428833,
0.0674041137099266,
0.3257812559604645,
-0.16162967681884766,
-0.1871490478515625,
0.008799329400062561,
0.023579224944114685,
0.26404649019241333,
0.21662655472755432,
0.051934633404016495,
0.0383678562939167,
0.0814644992351532,
-0.24517032504081726,
0.09618701040744781,
-0.06733651459217072,
0.22006645798683167,
-0.32349956035614014,
0.024017667397856712,
-0.34097808599472046,
0.41611358523368835,
-0.061810292303562164,
-0.008547589182853699,
-0.25166618824005127,
-0.3260459899902344,
-0.6693038940429688,
0.19294306635856628,
0.04504760727286339,
-0.14202454686164856,
-0.4067161977291107,
0.10912241786718369,
-0.04365997016429901,
0.048874080181121826,
-0.23544391989707947,
-0.09591285139322281,
0.33246472477912903,
-0.41274571418762207,
0.14867213368415833,
0.014996960759162903,
0.1223977580666542,
-0.1983049064874649,
0.32274556159973145,
0.2554567754268646,
0.2159595936536789,
-0.31024491786956787,
-0.20354770123958588,
-0.07942485809326172,
-0.060154989361763,
-0.14421741664409637,
0.03710973635315895,
0.32657596468925476,
-0.16945676505565643,
0.15005384385585785,
0.21607816219329834,
-0.38535335659980774,
-0.05778784677386284,
0.283499151468277,
-0.22256560623645782,
0.25268077850341797,
0.16240251064300537,
0.27187222242355347,
0.013558730483055115,
-0.3872142434120178,
-0.30668357014656067,
-0.5732119679450989,
-0.13489437103271484,
-0.2507288455963135,
-0.1008889451622963,
0.2407357096672058,
-0.3101213574409485,
0.15338872373104095,
0.11740554869174957,
0.18029069900512695,
0.30675724148750305,
-0.0013957135379314423,
-0.1100461483001709,
-0.2357509881258011,
-0.4394384026527405,
0.05538111552596092,
0.26800084114074707,
-0.13249734044075012,
-0.2193135768175125,
0.40465468168258667,
-0.01197834312915802,
-0.021018605679273605,
0.009386427700519562,
0.5449488759040833,
0.2535099983215332,
0.0710768848657608,
-0.1868591606616974,
0.17594026029109955,
0.12504899501800537,
0.11453040689229965,
0.0818907767534256,
-0.18278956413269043,
-0.1159723699092865,
-0.28695160150527954,
0.21485957503318787,
-0.13423983752727509,
0.16132783889770508,
-0.3132971227169037,
0.003750275820493698,
0.4126846492290497,
-0.2459641396999359,
0.26622870564460754,
-0.28622132539749146,
-0.15344856679439545,
-0.1860762983560562,
0.20852228999137878,
-0.29524290561676025,
-0.355087548494339,
0.24073249101638794,
0.1949661821126938,
0.07007899880409241,
0.0669674351811409,
-0.2691863179206848,
0.26158520579338074,
0.044512152671813965,
0.00492292083799839,
-0.19112610816955566,
0.11490768939256668,
-0.06233799085021019,
0.09782035648822784,
0.03151882067322731,
0.20531785488128662,
-0.12497308850288391,
0.04828769713640213,
-0.49528712034225464,
-0.5152052640914917,
0.16102167963981628,
-0.05245324969291687,
-0.08688244223594666,
-0.06760881841182709,
0.39681756496429443,
0.2529713809490204,
0.15932057797908783,
-0.29319944977760315,
0.1256084144115448,
-0.008349481038749218,
0.18230071663856506,
-0.17034900188446045,
0.1373271346092224,
0.13820379972457886,
-0.1351919323205948,
-0.0715939998626709,
-0.20120012760162354,
0.3138323128223419,
0.008085140958428383,
-0.20658278465270996,
-0.3480612635612488
] |
https://github.com/huggingface/datasets/issues/414 | from_dict delete? | `from_dict` was added in #350 that was unfortunately not included in the 0.3.0 release. It's going to be included in the next release that will be out pretty soon though.
Right now if you want to use `from_dict` you have to install the package from the master branch
```
pip install git+https://github.com/huggingface/nlp.git
``` | AttributeError: type object 'Dataset' has no attribute 'from_dict' | 53 | from_dict delete?
AttributeError: type object 'Dataset' has no attribute 'from_dict'
`from_dict` was added in #350 that was unfortunately not included in the 0.3.0 release. It's going to be included in the next release that will be out pretty soon though.
Right now if you want to use `from_dict` you have to install the package from the master branch
```
pip install git+https://github.com/huggingface/nlp.git
``` | [
-0.11688920855522156,
-0.20969125628471375,
-0.11670282483100891,
0.04655615985393524,
0.16202859580516815,
-0.18883633613586426,
0.09435713291168213,
0.3141213655471802,
0.037756990641355515,
0.14038191735744476,
0.053977370262145996,
0.5944423079490662,
-0.10694272816181183,
0.29201826453208923,
-0.04265788942575455,
-0.1649785190820694,
-0.0688440129160881,
0.3200039565563202,
-0.31284424662590027,
-0.04618721082806587,
0.01107863336801529,
0.37319502234458923,
-0.1320793330669403,
0.25494152307510376,
0.12055881321430206,
-0.17117658257484436,
0.0303646270185709,
0.14309480786323547,
-0.14184917509555817,
-0.33113759756088257,
0.2542821168899536,
0.04547615349292755,
-0.1363675743341446,
0.15779335796833038,
-0.0000992030109046027,
-0.04312681779265404,
0.324180006980896,
-0.07088858634233475,
-0.2661370635032654,
-0.3808971643447876,
-0.12924692034721375,
-0.17845484614372253,
0.3302335739135742,
-0.10571584850549698,
-0.2622191309928894,
0.1483004093170166,
0.028604445978999138,
-0.008377227932214737,
0.38384896516799927,
0.38842448592185974,
0.36851879954338074,
0.15779313445091248,
0.16767345368862152,
-0.12563279271125793,
0.18619239330291748,
0.18692895770072937,
-0.06607075780630112,
-0.09688478708267212,
0.05391672998666763,
-0.1805334985256195,
0.3063396215438843,
0.28297126293182373,
-0.16446596384048462,
-0.0961182564496994,
0.18741685152053833,
-0.024361014366149902,
0.0242316797375679,
-0.14169280230998993,
0.03001043200492859,
0.1506773829460144,
0.26414138078689575,
-0.3806944787502289,
-0.11402960866689682,
-0.3015459477901459,
-0.024286393076181412,
-0.3830108642578125,
0.02370753511786461,
-0.05317224562168121,
-0.1575682908296585,
0.13010530173778534,
-0.05276082828640938,
-0.45186227560043335,
-0.18533623218536377,
0.35257935523986816,
0.19322961568832397,
0.06897302716970444,
-0.11270606517791748,
0.06550955772399902,
0.2613547444343567,
-0.054037824273109436,
-0.3767983317375183,
0.2988927960395813,
-0.19513504207134247,
0.14166153967380524,
-0.028043683618307114,
-0.20183733105659485,
0.33564627170562744,
-0.05248499661684036,
-0.0726940929889679,
0.11809810250997543,
-0.01294857170432806,
-0.018889937549829483,
-0.009922084398567677,
0.27463194727897644,
0.4173331558704376,
0.19299733638763428,
0.3750913143157959,
0.22583988308906555,
0.19765958189964294,
0.0005202436004765332,
-0.06706491112709045,
-0.07054753601551056,
0.10846862941980362,
0.007959729991853237,
-0.15428490936756134,
-0.08378485590219498,
0.2740115523338318,
-0.10183608531951904,
-0.28014370799064636,
-0.2536680996417999,
0.15472128987312317,
0.11147886514663696,
0.0496230274438858,
0.31618741154670715,
0.02851192280650139,
0.20455482602119446,
0.023410044610500336,
0.16259194910526276,
-0.35594120621681213,
-0.03187215328216553,
-0.2442646622657776,
0.32730570435523987,
-0.1398758441209793,
-0.4790831506252289,
0.06624732911586761,
0.17371739447116852,
0.36002612113952637,
-0.11257629096508026,
0.03981141000986099,
0.26092037558555603,
0.009048482403159142,
0.036559585481882095,
0.0756467878818512,
0.2162594348192215,
-0.09764637053012848,
-0.158245250582695,
0.2198808342218399,
-0.5354823470115662,
-0.27403953671455383,
0.10503880679607391,
-0.22550076246261597,
-0.2852154076099396,
-0.450623095035553,
0.3046715557575226,
0.08042491972446442,
-0.2931630313396454,
-0.3293564021587372,
0.18428608775138855,
0.13598263263702393,
-0.21644803881645203,
-0.10593058913946152,
-0.1513112485408783,
-0.019224803894758224,
-0.16116666793823242,
-0.007446129806339741,
0.11571987718343735,
-0.2353723645210266,
-0.2091396450996399,
-0.20253705978393555,
-0.30655381083488464,
0.26197534799575806,
0.31395426392555237,
-0.24468404054641724,
0.24550747871398926,
-0.12268863618373871,
0.10579240322113037,
0.5160627961158752,
-0.5724243521690369,
-0.23124587535858154,
0.20544128119945526,
-0.049039699137210846,
-0.11422737687826157,
-0.16840243339538574,
-0.017951130867004395,
0.1819058060646057,
-0.08908961713314056,
-0.009935297071933746,
0.34742265939712524,
0.18607276678085327,
0.1431887447834015,
-0.14953160285949707,
-0.12220725417137146,
-0.028366081416606903,
-0.09666334092617035,
-0.07592862844467163,
0.07038076967000961,
0.1684972643852234,
0.1468973010778427,
0.20254048705101013,
-0.09452283382415771,
0.009312914684414864,
0.19621512293815613,
0.5006922483444214,
0.05561777949333191,
-0.09355205297470093,
-0.4382091164588928,
-0.03231116384267807,
-0.13944768905639648,
-0.19786778092384338,
0.35332605242729187,
-0.3188260793685913,
-0.11769704520702362,
-0.2525281012058258,
0.09978090226650238,
-0.22234918177127838,
-0.15722458064556122,
0.30525749921798706,
0.05869501084089279,
0.14327295124530792,
0.07590153813362122,
-0.3448251187801361,
0.11638364940881729,
0.060593314468860626,
0.04511341452598572,
-0.2440590113401413,
-0.021883917972445488,
-0.3494739234447479,
-0.2440222203731537,
0.05957435071468353,
0.4624375104904175,
0.010901074856519699,
-0.05297333374619484,
0.019506342709064484,
0.36523497104644775,
-0.09270985424518585,
0.05466284602880478,
0.1078716441988945,
-0.1840556114912033,
0.05609465390443802,
-0.23184694349765778,
-0.027262644842267036,
0.063740074634552,
0.08348986506462097,
0.1336137056350708,
-0.10646583884954453,
0.17299994826316833,
0.20407697558403015,
-0.02793058007955551,
0.2542049288749695,
0.1592370718717575,
0.36442476511001587,
-0.25141212344169617,
0.10466686636209488,
-0.3587045669555664,
0.21916089951992035,
-0.04936365410685539,
-0.07154157757759094,
-0.17746326327323914,
-0.4236365258693695,
0.045217595994472504,
0.6067506670951843,
0.15503478050231934,
0.21328961849212646,
0.09527873992919922,
-0.006847783923149109,
-0.17884328961372375,
-0.05146070569753647,
0.09497299790382385,
0.17258591949939728,
0.24997977912425995,
-0.14001275599002838,
0.04408642649650574,
-0.02336929365992546,
-0.07114486396312714,
0.31335902214050293,
-0.1102236807346344,
0.12919434905052185,
0.11594228446483612,
0.14646005630493164,
-0.12209262698888779,
-0.473296582698822,
-0.0990840420126915,
-0.2719186544418335,
0.31240853667259216,
-0.12022310495376587,
0.23248691856861115,
-0.3833062946796417,
-0.5119467377662659,
0.02983146160840988,
-0.2020340859889984,
-0.32176128029823303,
-0.34161558747291565,
0.23008377850055695,
0.10389299690723419,
-0.08628758788108826,
0.19168305397033691,
0.17463363707065582,
0.04120373725891113,
0.03410802036523819,
-0.10910852998495102,
-0.044825635850429535,
-0.3886268436908722,
-0.2937380373477936,
0.20785315334796906,
-0.04647393524646759,
0.18561343848705292,
0.34539029002189636,
-0.09279436618089676,
-0.13462616503238678,
-0.06532390415668488,
-0.45126795768737793,
0.13397018611431122,
-0.19821016490459442,
0.4171159267425537,
0.4988262951374054,
0.0458737276494503,
-0.15862002968788147,
-0.11848888546228409,
0.28552812337875366,
-0.5542432069778442,
-0.24180984497070312,
0.16253209114074707,
-0.0430540032684803,
0.00018846189777832478,
-0.2799878418445587,
-0.2784694731235504,
-0.2698889970779419,
-0.4429296553134918,
0.30620428919792175,
0.2609966993331909,
0.23382879793643951,
0.33367645740509033,
-0.08878423273563385,
0.1830669343471527,
-0.19767355918884277,
0.38883697986602783,
-0.1767815351486206,
-0.17447003722190857,
-0.03363889828324318,
-0.2309454381465912,
-0.43375131487846375,
0.006329711526632309,
0.1090216338634491,
0.3247976005077362,
-0.24398790299892426,
-0.3170563578605652,
-0.2650548815727234,
0.048791222274303436,
0.10927329957485199,
0.022436635568737984,
0.1758807897567749,
0.25717175006866455,
0.18974587321281433,
-0.22511322796344757,
-0.21488678455352783,
-0.07855211198329926,
0.22497901320457458,
0.20173749327659607,
0.11119215190410614,
-0.04161055386066437,
0.21931058168411255,
0.15201133489608765,
0.36291080713272095,
-0.049033403396606445,
0.17333824932575226,
0.3288867771625519,
-0.12338868528604507,
0.4986999034881592,
-0.16337019205093384,
-0.3937041759490967,
-0.0244874469935894,
0.2137492448091507,
0.10913906991481781,
0.17049938440322876,
-0.02090919017791748,
-0.23367758095264435,
-0.24585320055484772,
0.03559863194823265,
-0.21091413497924805,
-0.21623051166534424,
-0.030753089115023613,
-0.20949643850326538,
-0.008989036083221436,
0.06706936657428741,
-0.08694732934236526,
-0.23605582118034363,
-0.12145887315273285,
-0.031726136803627014,
-0.09943091869354248,
-0.1177404597401619,
-0.16088594496250153,
-0.5274447202682495,
-0.37983787059783936,
-0.42782336473464966,
0.2465217560529709,
-0.06926796585321426,
0.11954639106988907,
-0.1371687650680542,
-0.1768675446510315,
0.09991716593503952,
-0.12886808812618256,
0.3627333641052246,
-0.004336249083280563,
-0.13555535674095154,
0.14127303659915924,
0.04772716760635376,
-0.37047287821769714,
0.21488209068775177,
-0.2964703440666199,
0.21454022824764252,
0.41198575496673584,
0.08346657454967499,
-0.4349450170993805,
-0.2798312306404114,
0.32009512186050415,
-0.039095815271139145,
-0.12023602426052094,
0.16182592511177063,
-0.2939397394657135,
-0.36361968517303467,
-0.5449575185775757,
-0.12997311353683472,
0.07311923056840897,
0.3367333710193634,
0.1882375031709671,
0.13353824615478516,
0.005583110265433788,
-0.1185670718550682,
0.022938750684261322,
0.018742099404335022,
0.25226980447769165,
-0.2153329700231552,
-0.3697971999645233,
-0.2291405200958252,
0.25771647691726685,
0.021759452298283577,
0.41801026463508606,
-0.10418502986431122,
-0.23626351356506348,
-0.2990650236606598,
-0.0036220774054527283,
0.4200935661792755,
-0.011296898126602173,
0.08814038336277008,
0.24313876032829285,
-0.12298859655857086,
0.26152896881103516,
0.17343392968177795,
0.07780429720878601,
0.26466378569602966,
-0.030003905296325684,
0.04697224870324135,
-0.24182163178920746,
0.15611545741558075,
-0.05620536208152771,
0.006501533091068268,
0.030287688598036766,
0.09224043786525726,
-0.2980344593524933,
0.3624911904335022,
-0.17370101809501648,
0.827671468257904,
0.15412425994873047,
0.14952155947685242,
0.16271358728408813,
0.020028114318847656,
0.6298741698265076,
0.1459992527961731,
0.30142784118652344,
-0.23057791590690613,
0.2545520067214966,
0.037103794515132904,
-0.04809444397687912,
0.23378309607505798,
0.09676386415958405,
-0.28034576773643494,
0.3622639775276184,
0.0007976964116096497,
0.04179486632347107,
-0.1365334540605545,
0.198643758893013,
0.09124262630939484,
-0.025285419076681137,
-0.346720427274704,
0.2415168285369873,
-0.12342232465744019,
0.17062978446483612,
-0.03527016192674637,
-0.18650232255458832,
0.1307334154844284,
-0.2843438982963562,
-0.18831342458724976,
0.1650155782699585,
0.03550215810537338,
0.33201563358306885,
0.23417232930660248,
-0.3574247360229492,
-0.11967943608760834,
0.2072727531194687,
0.12313788384199142,
0.04643404483795166,
-0.14165018498897552,
0.19344793260097504,
-0.15047317743301392,
-0.13143599033355713,
0.05811512842774391,
0.37910085916519165,
0.4059232771396637,
-0.3037533462047577,
-0.31278231739997864,
0.1355920433998108,
0.010638230480253696,
-0.40712642669677734,
0.2054920792579651,
0.012437723577022552,
-0.035840220749378204,
0.0005646506324410439,
-0.06267328560352325,
0.10610657930374146,
0.002778898924589157,
-0.2611287236213684,
0.24799545109272003,
0.26818978786468506,
-0.29714247584342957,
0.1301720142364502,
0.027789505198597908,
-0.13328149914741516,
-0.059779953211545944,
-0.0008427798748016357,
0.12866565585136414,
0.0012181773781776428,
0.4648869037628174,
0.10233968496322632,
-0.17674627900123596,
-0.41186752915382385,
-0.27132123708724976,
-0.1673760712146759,
-0.22632646560668945,
0.3819688558578491,
0.22743114829063416,
-0.18094664812088013,
0.15649665892124176,
0.4324982166290283,
-0.15194518864154816,
0.04650112986564636,
-0.21638868749141693,
-0.2470475137233734,
-0.18262383341789246,
0.15930789709091187,
-0.04762231931090355,
0.0862603634595871,
0.17569616436958313,
0.18564409017562866,
0.1167449802160263,
0.030903775244951248,
-0.45744192600250244,
0.055491723120212555,
-0.30087462067604065,
0.175425723195076,
0.4310329854488373,
-0.22186610102653503,
0.11554213613271713,
-0.05341518670320511,
0.2771424651145935,
-0.17125505208969116,
-0.16082684695720673,
-0.38553860783576965,
-0.07677814364433289,
0.07387926429510117,
-0.07630938291549683,
-0.03847264498472214,
0.01686442643404007,
-0.06550590693950653,
-0.1414913684129715,
-0.053648609668016434,
0.12241305410861969,
-0.09864680469036102,
-0.04472951591014862,
0.5866775512695312,
0.09552408754825592,
-0.02818015217781067,
0.3729468584060669,
-0.053199656307697296,
0.024678584188222885,
0.16889603435993195,
-0.10141488909721375,
0.15028369426727295,
-0.09219960868358612,
-0.14580422639846802,
-0.0007064646924845874,
0.046167489141225815,
0.03179521486163139,
0.19707989692687988,
0.22887054085731506,
-0.29063302278518677,
-0.09219712764024734,
0.03929002955555916,
0.4682258069515228,
-0.03932154178619385,
-0.07853325456380844,
0.047533951699733734,
0.3697398006916046,
0.3186563551425934,
-0.49260953068733215,
0.054989319294691086,
0.24157504737377167,
-0.07947781682014465,
0.09626293182373047,
0.1426692008972168,
0.0707424134016037,
0.09159694612026215,
0.007360965013504028,
0.11958137899637222,
0.2814491093158722,
-0.3491173982620239,
0.08573873341083527,
0.23756925761699677,
-0.21612638235092163,
-0.16726313531398773,
0.1247381716966629,
0.24518586695194244,
0.31182926893234253,
0.6150825619697571,
-0.04123339802026749,
0.13175973296165466,
0.12350098788738251,
0.07186667621135712,
0.17530345916748047,
-0.09616601467132568,
0.27237024903297424,
0.14976495504379272,
0.1668110191822052,
0.05267519876360893,
0.14359122514724731,
0.32944706082344055,
-0.21386566758155823,
-0.017916038632392883,
-0.07956162840127945,
0.6706979274749756,
-0.13449275493621826,
-0.15356141328811646,
-0.22350770235061646,
0.06103932112455368,
0.17492079734802246,
-0.14382369816303253,
0.1336372196674347,
-0.03059016913175583,
0.09055601060390472,
0.13582369685173035,
0.051351528614759445,
-0.43245798349380493,
0.3161312937736511,
-0.18095874786376953,
0.17576704919338226,
-0.07756078243255615,
0.043639324605464935,
-0.034345656633377075,
-0.02015315741300583,
-0.15338070690631866,
0.3481294810771942,
0.45250245928764343,
0.153719961643219,
-0.2976199686527252,
-0.04021569713950157,
-0.17110328376293182,
-0.21586601436138153,
-0.16859307885169983,
0.38002780079841614,
0.18223044276237488,
0.48046085238456726,
0.11640775203704834,
0.21835710108280182,
-0.20054446160793304,
-0.12312614917755127,
0.1783154457807541,
0.09049369394779205,
-0.155539408326149,
0.5753043293952942,
0.05319295823574066,
-0.34241852164268494,
-0.17286613583564758,
0.03833555430173874,
-0.41502147912979126,
0.06616419553756714,
0.2942955493927002,
0.09532694518566132,
0.18881645798683167,
-0.3335587978363037,
0.17457793653011322,
0.15636247396469116,
0.3946987986564636,
0.3342249095439911,
0.23829394578933716,
0.18701553344726562,
-0.18417303264141083,
-0.45729148387908936,
0.0788847953081131,
-0.07890507578849792,
-0.276589035987854,
-0.0074918754398822784,
0.3077086806297302,
-0.00918038934469223,
0.2107315957546234,
-0.08312952518463135,
-0.0004252151120454073,
-0.06177892908453941,
-0.4295385479927063,
-0.23380103707313538,
0.03626915439963341,
-0.10009041428565979,
-0.055654384195804596,
0.1671198159456253,
-0.21007004380226135,
-0.11620219051837921,
0.027013614773750305,
0.17699512839317322,
-0.11858557164669037,
0.176665261387825,
-0.009819354861974716,
-0.05123882740736008,
-0.13827376067638397,
0.2984735369682312,
0.15975476801395416,
-0.11686113476753235,
-0.1258469820022583,
0.18763956427574158,
-0.36092090606689453,
-0.3744492828845978,
0.10192720592021942,
-0.07300515472888947,
0.3420495390892029,
-0.16214756667613983,
0.13036398589611053,
-0.16034643352031708,
0.15038350224494934,
0.04803185909986496,
0.021118512377142906,
-0.22240865230560303,
0.1399761140346527,
0.1745988130569458,
-0.1314188688993454,
-0.14323614537715912,
0.11306366324424744,
-0.10719539225101471,
0.05693577229976654,
-0.2670476734638214,
-0.31809765100479126,
0.4615899324417114,
-0.322889119386673,
-0.4482111930847168,
-0.05765669420361519,
0.1911207139492035,
-0.06515776365995407,
-0.34523722529411316,
-0.4551795721054077,
0.1387111246585846,
0.25976625084877014,
0.0705319494009018,
-0.0792652815580368,
0.4142345190048218,
-0.29695042967796326,
0.03668486699461937,
0.17784231901168823,
0.4717918932437897,
0.20324227213859558,
-0.13713765144348145,
0.07964697480201721,
-0.16019204258918762
] |
https://github.com/huggingface/datasets/issues/414 | from_dict delete? | > `from_dict` was added in #350 that was unfortunately not included in the 0.3.0 release. It's going to be included in the next release that will be out pretty soon though.
> Right now if you want to use `from_dict` you have to install the package from the master branch
>
> ```
> pip install git+https://github.com/huggingface/nlp.git
> ```
OK, thank you.
| AttributeError: type object 'Dataset' has no attribute 'from_dict' | 62 | from_dict delete?
AttributeError: type object 'Dataset' has no attribute 'from_dict'
> `from_dict` was added in #350 that was unfortunately not included in the 0.3.0 release. It's going to be included in the next release that will be out pretty soon though.
> Right now if you want to use `from_dict` you have to install the package from the master branch
>
> ```
> pip install git+https://github.com/huggingface/nlp.git
> ```
OK, thank you.
| [
-0.07471872121095657,
-0.25162091851234436,
-0.11553449928760529,
0.08792178332805634,
0.1837773472070694,
-0.17871226370334625,
0.09087172895669937,
0.2998162806034088,
0.03160581737756729,
0.1319088339805603,
0.05100937932729721,
0.5649480223655701,
-0.10443402081727982,
0.2966352701187134,
-0.047176893800497055,
-0.22445330023765564,
-0.04263373464345932,
0.29330968856811523,
-0.330453097820282,
-0.05172506347298622,
0.04046858847141266,
0.36297717690467834,
-0.12968558073043823,
0.27413424849510193,
0.125275656580925,
-0.19017548859119415,
0.0015233922749757767,
0.152687668800354,
-0.13405929505825043,
-0.3176121413707733,
0.27976927161216736,
0.026805654168128967,
-0.10140156000852585,
0.17617332935333252,
-0.00009855226380750537,
-0.07370071858167648,
0.3171122074127197,
-0.07455132901668549,
-0.2624135911464691,
-0.3476306200027466,
-0.1504911333322525,
-0.1589510440826416,
0.2975648045539856,
-0.11990997940301895,
-0.23881927132606506,
0.1387145221233368,
0.004563920199871063,
0.018631212413311005,
0.39209091663360596,
0.38371044397354126,
0.37491923570632935,
0.12493818998336792,
0.1929481327533722,
-0.12141672521829605,
0.16397345066070557,
0.18668323755264282,
-0.08073848485946655,
-0.08623041212558746,
0.055448323488235474,
-0.19009964168071747,
0.3049736022949219,
0.2913118600845337,
-0.1488620489835739,
-0.11170423030853271,
0.19865477085113525,
-0.046250950545072556,
0.022408276796340942,
-0.15916188061237335,
0.03893769904971123,
0.1428242176771164,
0.3123074769973755,
-0.38668322563171387,
-0.10583122819662094,
-0.27208974957466125,
-0.020536817610263824,
-0.35800471901893616,
0.01110328733921051,
-0.03541000932455063,
-0.1274462193250656,
0.1445007026195526,
-0.03957065939903259,
-0.4792863726615906,
-0.2171791046857834,
0.35155564546585083,
0.22641760110855103,
0.038225241005420685,
-0.12364064157009125,
0.053236816078424454,
0.23048484325408936,
-0.06376129388809204,
-0.38694149255752563,
0.29516854882240295,
-0.19512969255447388,
0.15866105258464813,
-0.04467504099011421,
-0.21787360310554504,
0.3263927698135376,
-0.0638526901602745,
-0.05255717784166336,
0.0825086236000061,
0.004648691043257713,
-0.02212667092680931,
-0.02812200039625168,
0.254495233297348,
0.45789116621017456,
0.2475711852312088,
0.39362862706184387,
0.22120341658592224,
0.15485143661499023,
0.025081193074584007,
-0.08608958125114441,
-0.0489334911108017,
0.0843023881316185,
0.03136274963617325,
-0.13183413445949554,
-0.06858666986227036,
0.281574010848999,
-0.11335508525371552,
-0.27686893939971924,
-0.20642824470996857,
0.12096577137708664,
0.11062812060117722,
0.02826310321688652,
0.3377593457698822,
0.008651859126985073,
0.22319772839546204,
0.03606230020523071,
0.15167111158370972,
-0.3684811294078827,
-0.06707542389631271,
-0.23483389616012573,
0.35884058475494385,
-0.16952437162399292,
-0.4798000454902649,
0.04348854348063469,
0.175326868891716,
0.3514825403690338,
-0.10704553872346878,
0.0640285462141037,
0.21439659595489502,
-0.005742436274886131,
0.0531013123691082,
0.09641456604003906,
0.18293830752372742,
-0.09293358772993088,
-0.1560867577791214,
0.21003301441669464,
-0.5214318633079529,
-0.25219640135765076,
0.12987565994262695,
-0.22387194633483887,
-0.29875195026397705,
-0.4562392830848694,
0.2990594506263733,
0.08990322798490524,
-0.27950695157051086,
-0.3280279040336609,
0.1972239911556244,
0.13881726562976837,
-0.16680915653705597,
-0.08274861425161362,
-0.14109764993190765,
-0.004467815160751343,
-0.148026704788208,
-0.02434028871357441,
0.11409303545951843,
-0.24220463633537292,
-0.17108270525932312,
-0.17289575934410095,
-0.31476497650146484,
0.2596483826637268,
0.3290221691131592,
-0.26284292340278625,
0.2250308096408844,
-0.11825017631053925,
0.11638709902763367,
0.4797016978263855,
-0.5727300047874451,
-0.1921098679304123,
0.21454456448554993,
-0.05976644158363342,
-0.10255774855613708,
-0.1759752333164215,
-0.027561835944652557,
0.1942095011472702,
-0.1094260886311531,
-0.038294173777103424,
0.3194501996040344,
0.18176890909671783,
0.14893636107444763,
-0.20127998292446136,
-0.09793481230735779,
-0.009357936680316925,
-0.10988087952136993,
-0.07554030418395996,
0.05227028951048851,
0.1559680700302124,
0.1709434986114502,
0.23741427063941956,
-0.08586478233337402,
0.022511327639222145,
0.254688560962677,
0.47770336270332336,
0.07475613057613373,
-0.08629078418016434,
-0.43686115741729736,
-0.029493674635887146,
-0.15399043262004852,
-0.19101175665855408,
0.3839293420314789,
-0.2584608793258667,
-0.12557753920555115,
-0.28100302815437317,
0.10698971897363663,
-0.19875146448612213,
-0.17127570509910583,
0.3102853298187256,
0.03643666207790375,
0.12876920402050018,
0.04469173029065132,
-0.3484446704387665,
0.11584740877151489,
0.029240159317851067,
0.029240189120173454,
-0.23961763083934784,
-0.022409232333302498,
-0.3669723570346832,
-0.23189736902713776,
0.1010940670967102,
0.4514658749103546,
0.016941286623477936,
-0.057009268552064896,
0.029873356223106384,
0.3622139096260071,
-0.1076151579618454,
0.06025189906358719,
0.1294950246810913,
-0.1758580356836319,
0.061225973069667816,
-0.2530984580516815,
-0.033159755170345306,
0.057322051376104355,
0.08731354773044586,
0.13285678625106812,
-0.08339916914701462,
0.14734748005867004,
0.19436633586883545,
-0.04758169502019882,
0.23736007511615753,
0.14586235582828522,
0.35613682866096497,
-0.25808092951774597,
0.0934285819530487,
-0.31716737151145935,
0.22631444036960602,
-0.05594402924180031,
-0.12032674252986908,
-0.17075878381729126,
-0.45708221197128296,
0.07283642143011093,
0.6142225861549377,
0.11814524233341217,
0.2027910351753235,
0.11002635955810547,
-0.010490328073501587,
-0.2033454179763794,
-0.04651954025030136,
0.1275082677602768,
0.15989409387111664,
0.23933647572994232,
-0.14420974254608154,
0.04024895280599594,
-0.016073554754257202,
-0.04243525117635727,
0.3344411551952362,
-0.09530022740364075,
0.14906510710716248,
0.09819745272397995,
0.12956641614437103,
-0.10514755547046661,
-0.4526612162590027,
-0.10298627614974976,
-0.2659779191017151,
0.30867499113082886,
-0.13000088930130005,
0.21370133757591248,
-0.34136876463890076,
-0.5405301451683044,
0.00802929699420929,
-0.21476051211357117,
-0.3553183674812317,
-0.3191394507884979,
0.2329045832157135,
0.07947500795125961,
-0.11584696173667908,
0.18320737779140472,
0.15573352575302124,
0.0698956847190857,
0.03689742833375931,
-0.08813021332025528,
-0.050644874572753906,
-0.3942842483520508,
-0.3033127784729004,
0.20885606110095978,
-0.030276089906692505,
0.21846477687358856,
0.33490389585494995,
-0.09231393039226532,
-0.11713265627622604,
-0.07300391793251038,
-0.42719271779060364,
0.11691925674676895,
-0.21328647434711456,
0.4308359920978546,
0.47750329971313477,
0.10045220702886581,
-0.16772225499153137,
-0.12496864795684814,
0.2748677134513855,
-0.5327469706535339,
-0.25405359268188477,
0.15805065631866455,
-0.01548870000988245,
-0.0048850178718566895,
-0.27590322494506836,
-0.29489803314208984,
-0.24450038373470306,
-0.46424633264541626,
0.3006662130355835,
0.2462504357099533,
0.22394923865795135,
0.3138273358345032,
-0.09871556609869003,
0.16146045923233032,
-0.19472624361515045,
0.421576589345932,
-0.1935763955116272,
-0.19165323674678802,
-0.04046829417347908,
-0.21860499680042267,
-0.45526984333992004,
0.02045479044318199,
0.13776180148124695,
0.35009798407554626,
-0.28968346118927,
-0.314492404460907,
-0.22519336640834808,
0.058029159903526306,
0.08702880144119263,
-0.0012438930571079254,
0.188211590051651,
0.24216589331626892,
0.220617413520813,
-0.21639928221702576,
-0.20338746905326843,
-0.10301278531551361,
0.22285303473472595,
0.20191112160682678,
0.10728491842746735,
-0.04298248887062073,
0.20355147123336792,
0.1423751413822174,
0.38522136211395264,
-0.0343022383749485,
0.19852663576602936,
0.31969720125198364,
-0.06754846125841141,
0.46615070104599,
-0.15504804253578186,
-0.4070017635822296,
-0.009127792902290821,
0.1755029857158661,
0.10234643518924713,
0.1916300654411316,
-0.007786449044942856,
-0.24192191660404205,
-0.25179752707481384,
-0.00470077246427536,
-0.2284083366394043,
-0.23091506958007812,
0.0008257869631052017,
-0.23847416043281555,
0.0005097761750221252,
0.06528937816619873,
-0.11434005200862885,
-0.22598715126514435,
-0.1049547791481018,
-0.005072540137916803,
-0.10006274282932281,
-0.0912700816988945,
-0.14909885823726654,
-0.5165436863899231,
-0.35559409856796265,
-0.42118963599205017,
0.21034786105155945,
-0.06529214978218079,
0.14191360771656036,
-0.1439502239227295,
-0.17875149846076965,
0.10197263211011887,
-0.1125372052192688,
0.351340115070343,
0.030823128297924995,
-0.13194119930267334,
0.1510486751794815,
0.05324948579072952,
-0.31470581889152527,
0.22325114905834198,
-0.29766833782196045,
0.19938242435455322,
0.3850405514240265,
0.0479145273566246,
-0.45329535007476807,
-0.27995163202285767,
0.2857568562030792,
-0.02851002849638462,
-0.12671798467636108,
0.14143314957618713,
-0.2920060455799103,
-0.3294558823108673,
-0.5601930022239685,
-0.1146838441491127,
0.1040031835436821,
0.3459017872810364,
0.16092005372047424,
0.14142672717571259,
0.027394769713282585,
-0.1401553750038147,
0.037916697561740875,
-0.009029623121023178,
0.2666158378124237,
-0.20803989470005035,
-0.3748336732387543,
-0.24921244382858276,
0.2636886239051819,
0.018471652641892433,
0.4048210680484772,
-0.12581022083759308,
-0.22298213839530945,
-0.311739444732666,
-0.030758332461118698,
0.42739248275756836,
-0.01282571256160736,
0.10023971647024155,
0.25104406476020813,
-0.12360027432441711,
0.27836188673973083,
0.1314159482717514,
0.03242848068475723,
0.26529011130332947,
-0.01845843903720379,
0.043418753892183304,
-0.21531905233860016,
0.13762038946151733,
-0.07958418130874634,
0.006577730178833008,
0.03428046032786369,
0.10681192576885223,
-0.3075433671474457,
0.3447079658508301,
-0.16065248847007751,
0.8757866621017456,
0.15663772821426392,
0.14821958541870117,
0.1443021297454834,
0.006009642034769058,
0.6237421035766602,
0.15749236941337585,
0.3093411922454834,
-0.23598235845565796,
0.21989013254642487,
0.04534357786178589,
-0.02335295081138611,
0.2113470733165741,
0.0939028337597847,
-0.2781502306461334,
0.3415946364402771,
-0.011055290699005127,
0.012548655271530151,
-0.1442003697156906,
0.20611533522605896,
0.08482632040977478,
-0.019567668437957764,
-0.43156179785728455,
0.23686537146568298,
-0.10039612650871277,
0.14284376800060272,
-0.06653887033462524,
-0.2186395823955536,
0.1212836503982544,
-0.2725217044353485,
-0.18702182173728943,
0.14110425114631653,
0.04773514345288277,
0.2928522825241089,
0.2638772428035736,
-0.32320892810821533,
-0.10180354118347168,
0.2294432818889618,
0.1322084218263626,
0.02150019258260727,
-0.16221806406974792,
0.16849394142627716,
-0.1676187813282013,
-0.14059056341648102,
0.06385574489831924,
0.367229700088501,
0.45789673924446106,
-0.3215276896953583,
-0.3099903464317322,
0.13298627734184265,
-0.012823399156332016,
-0.3776736855506897,
0.17065638303756714,
0.01704499125480652,
-0.04798951745033264,
-0.017922520637512207,
-0.0911346822977066,
0.10278776288032532,
-0.01727515645325184,
-0.2291879653930664,
0.24809840321540833,
0.2937902808189392,
-0.30369773507118225,
0.11946500837802887,
0.05865568667650223,
-0.12384243309497833,
-0.04391640052199364,
-0.009820565581321716,
0.13029725849628448,
0.0020781680941581726,
0.4763105511665344,
0.13539350032806396,
-0.2008342742919922,
-0.413589209318161,
-0.255391389131546,
-0.14052033424377441,
-0.2420744001865387,
0.3765794634819031,
0.20401456952095032,
-0.16968239843845367,
0.14315474033355713,
0.44422847032546997,
-0.11122103035449982,
0.05744168907403946,
-0.19938227534294128,
-0.24843323230743408,
-0.20250436663627625,
0.18928220868110657,
-0.0655539482831955,
0.07822487503290176,
0.14254364371299744,
0.19862861931324005,
0.15949177742004395,
0.06005828082561493,
-0.4667699635028839,
0.04842071980237961,
-0.34326785802841187,
0.181566059589386,
0.44372376799583435,
-0.2099004089832306,
0.10122255235910416,
-0.023576769977808,
0.26712238788604736,
-0.17460846900939941,
-0.15389703214168549,
-0.37554731965065,
-0.07323572039604187,
0.07313413172960281,
-0.07964485883712769,
-0.028262054547667503,
0.029346387833356857,
-0.06647101044654846,
-0.1379358172416687,
-0.023247582837939262,
0.09331421554088593,
-0.10771387070417404,
-0.03352317959070206,
0.5934743285179138,
0.09096559882164001,
-0.007124677300453186,
0.3224605917930603,
-0.06067609786987305,
0.04158778116106987,
0.20169028639793396,
-0.09308522939682007,
0.11571087688207626,
-0.08816403150558472,
-0.15593068301677704,
-0.0023575962986797094,
0.062247611582279205,
0.01998014748096466,
0.18335625529289246,
0.23834440112113953,
-0.2874487042427063,
-0.089455246925354,
0.046966761350631714,
0.4964926540851593,
-0.05945272743701935,
-0.10098482668399811,
0.07099882513284683,
0.382643461227417,
0.33033260703086853,
-0.5057241916656494,
0.08314399421215057,
0.2515091001987457,
-0.11814988404512405,
0.05891789123415947,
0.13038058578968048,
0.05472878739237785,
0.09083288908004761,
0.02864501252770424,
0.13211238384246826,
0.24796167016029358,
-0.3675577640533447,
0.07194000482559204,
0.20216959714889526,
-0.269619882106781,
-0.14803263545036316,
0.12639644742012024,
0.2348933219909668,
0.30728045105934143,
0.6015737652778625,
-0.030652418732643127,
0.14607618749141693,
0.13628634810447693,
0.09025656431913376,
0.18959924578666687,
-0.03612798824906349,
0.2644060552120209,
0.178432434797287,
0.17733505368232727,
0.04308509826660156,
0.11738654971122742,
0.3615162968635559,
-0.19471974670886993,
-0.05037156865000725,
-0.06622646749019623,
0.6730320453643799,
-0.1513727903366089,
-0.13842497766017914,
-0.2244410663843155,
0.029766328632831573,
0.16385826468467712,
-0.16665610671043396,
0.11552894115447998,
-0.026572473347187042,
0.11673033237457275,
0.14775273203849792,
0.04044482111930847,
-0.43945664167404175,
0.2877228260040283,
-0.16176286339759827,
0.19609393179416656,
-0.09428893029689789,
0.044368401169776917,
-0.027191147208213806,
-0.01811332255601883,
-0.1653067022562027,
0.3592184782028198,
0.4551662802696228,
0.16749972105026245,
-0.2915838360786438,
-0.053451474756002426,
-0.13975290954113007,
-0.2116466611623764,
-0.13420438766479492,
0.40582165122032166,
0.21263419091701508,
0.46101653575897217,
0.13472867012023926,
0.20657551288604736,
-0.1926112025976181,
-0.1079932153224945,
0.19834308326244354,
0.08532972633838654,
-0.16617879271507263,
0.5535991191864014,
0.03066887892782688,
-0.36052069067955017,
-0.2123485654592514,
0.03889700770378113,
-0.42579638957977295,
0.08372721076011658,
0.2968181371688843,
0.0673174113035202,
0.20453092455863953,
-0.3567805588245392,
0.17730587720870972,
0.17809870839118958,
0.40158718824386597,
0.3509913384914398,
0.25502142310142517,
0.16613264381885529,
-0.1810493916273117,
-0.4496579170227051,
0.08417002856731415,
-0.05078912153840065,
-0.24189946055412292,
-0.02064250409603119,
0.3006990849971771,
0.0002591535449028015,
0.22121968865394592,
-0.08654274046421051,
-0.008486902341246605,
-0.04465784505009651,
-0.39146605134010315,
-0.248638316988945,
0.04682997986674309,
-0.08836808800697327,
-0.03083926998078823,
0.17171402275562286,
-0.1824655830860138,
-0.12353065609931946,
0.027811136096715927,
0.16627728939056396,
-0.10784615576267242,
0.19057470560073853,
-0.007087027654051781,
-0.03220813721418381,
-0.17308644950389862,
0.29916834831237793,
0.132491797208786,
-0.1177579015493393,
-0.16338138282299042,
0.19627335667610168,
-0.36967116594314575,
-0.34760117530822754,
0.10612058639526367,
-0.04620860144495964,
0.33582013845443726,
-0.15564051270484924,
0.13643106818199158,
-0.16302095353603363,
0.13356170058250427,
0.035646989941596985,
0.033246200531721115,
-0.25348421931266785,
0.12121527642011642,
0.17456480860710144,
-0.16330914199352264,
-0.12083326280117035,
0.1273241937160492,
-0.11318670213222504,
0.05017847567796707,
-0.29026126861572266,
-0.30753424763679504,
0.44952428340911865,
-0.33356931805610657,
-0.45926111936569214,
-0.060097258538007736,
0.20767153799533844,
-0.06308930367231369,
-0.3752247989177704,
-0.48535478115081787,
0.14199325442314148,
0.24108482897281647,
0.08443768322467804,
-0.07687516510486603,
0.4214232265949249,
-0.31274425983428955,
0.06322780251502991,
0.1830018162727356,
0.4975365400314331,
0.2221592664718628,
-0.09712059050798416,
0.08856949210166931,
-0.16333605349063873
] |
https://github.com/huggingface/datasets/issues/413 | Is there a way to download only NQ dev? | Unfortunately it's not possible to download only the dev set of NQ.
I think we could add a way to download only the test set by adding a custom configuration to the processing script though. | Maybe I missed that in the docs, but is there a way to only download the dev set of natural questions (~1 GB)?
As we want to benchmark QA models on different datasets, I would like to avoid downloading the 41GB of training data.
I tried
```
dataset = nlp.load_dataset('natural_questions', split="validation", beam_runner="DirectRunner")
```
But this still triggered a big download of presumably the whole dataset. Is there any way of doing this or are splits / slicing options only available after downloading?
Thanks! | 35 | Is there a way to download only NQ dev?
Maybe I missed that in the docs, but is there a way to only download the dev set of natural questions (~1 GB)?
As we want to benchmark QA models on different datasets, I would like to avoid downloading the 41GB of training data.
I tried
```
dataset = nlp.load_dataset('natural_questions', split="validation", beam_runner="DirectRunner")
```
But this still triggered a big download of presumably the whole dataset. Is there any way of doing this or are splits / slicing options only available after downloading?
Thanks!
Unfortunately it's not possible to download only the dev set of NQ.
I think we could add a way to download only the test set by adding a custom configuration to the processing script though. | [
-0.43141672015190125,
0.17720848321914673,
-0.11297190189361572,
0.11462262272834778,
-0.10702246427536011,
-0.034726712852716446,
-0.2576388418674469,
0.7160264849662781,
-0.032957661896944046,
0.31452256441116333,
-0.2831305265426636,
0.015157412737607956,
-0.22056438028812408,
0.6092381477355957,
0.47449350357055664,
-0.09877584874629974,
-0.11577782779932022,
0.4419941306114197,
-0.07996653020381927,
0.051898293197155,
-0.17389684915542603,
0.23757505416870117,
-0.05118974298238754,
0.10084661841392517,
0.30445316433906555,
-0.2877175807952881,
0.1591367870569229,
-0.030611425638198853,
-0.34076598286628723,
-0.2889769971370697,
0.022300316020846367,
0.21527531743049622,
0.17467288672924042,
-0.3234870731830597,
-0.00012473233800847083,
-0.06383189558982849,
-0.017854899168014526,
-0.1316623091697693,
-0.13181966543197632,
0.12393584102392197,
-0.1069386899471283,
-0.1338653564453125,
0.09317254275083542,
0.011332504451274872,
-0.06970711052417755,
-0.27816063165664673,
0.2135227918624878,
-0.08610768616199493,
0.3582046627998352,
0.4454737901687622,
0.02041846513748169,
0.14054258167743683,
-0.2529486119747162,
0.15268754959106445,
-0.06445380300283432,
-0.28228676319122314,
-0.08922915905714035,
0.015645600855350494,
0.14982695877552032,
0.13543136417865753,
0.1219886988401413,
0.14073805510997772,
0.21573147177696228,
0.2066383808851242,
0.005409855395555496,
-0.01719019189476967,
0.3492206037044525,
-0.7237770557403564,
-0.07929355651140213,
0.7125211358070374,
0.1285499632358551,
0.1623680591583252,
-0.1726221889257431,
-0.17672282457351685,
0.12470874935388565,
-0.4916463792324066,
-0.04238133877515793,
0.5084101557731628,
-0.5656158924102783,
-0.0027756989002227783,
-0.6391010880470276,
-0.5820973515510559,
-0.1727645993232727,
0.11604613065719604,
-0.05375615134835243,
-0.03376593440771103,
0.08017978817224503,
0.053833696991205215,
0.2881835997104645,
0.1955108642578125,
0.09658489376306534,
0.12498226016759872,
-0.15016868710517883,
0.13461607694625854,
-0.248560830950737,
-0.4248795509338379,
-0.29505258798599243,
-0.158832848072052,
0.2999621331691742,
0.04532886669039726,
-0.07103067636489868,
0.02866353839635849,
0.07236942648887634,
-0.10545573383569717,
0.40892186760902405,
0.10765352845191956,
0.2841549515724182,
0.2317730337381363,
0.050468433648347855,
0.02115650102496147,
0.0802842229604721,
0.16520994901657104,
-0.007686014287173748,
-0.0758911520242691,
-0.6195682287216187,
0.012414888478815556,
-0.018040869385004044,
-0.4316454827785492,
0.004517564550042152,
-0.17535558342933655,
-0.15915173292160034,
-0.11186028271913528,
-0.18685153126716614,
0.19900614023208618,
0.040979400277137756,
0.07662481814622879,
-0.2971264719963074,
0.29751771688461304,
-0.278246134519577,
-0.8463839888572693,
-0.1588612198829651,
0.012007281184196472,
0.045321907848119736,
0.1391308456659317,
0.3189244866371155,
0.16165713965892792,
0.2113090604543686,
-0.26384565234184265,
0.0016601383686065674,
-0.018912089988589287,
0.3986707627773285,
-0.00741179846227169,
0.03029293566942215,
0.39642804861068726,
0.09988291561603546,
0.1514960676431656,
-0.1389228105545044,
0.3128337264060974,
-0.4387754499912262,
0.2237684726715088,
-0.03192121535539627,
-0.3537503480911255,
0.23787252604961395,
0.04447375610470772,
-0.08159926533699036,
0.0902850329875946,
-0.06884235888719559,
0.2779448330402374,
-0.05112419277429581,
-0.1465741991996765,
-0.09530188888311386,
-0.18454667925834656,
-0.25400078296661377,
-0.05106525495648384,
0.3700128197669983,
-0.05476616322994232,
-0.31729501485824585,
-0.2180195301771164,
-0.05037717521190643,
-0.1873558759689331,
0.2057102620601654,
0.38928869366645813,
-0.1953091323375702,
0.2749291658401489,
-0.12825611233711243,
0.041904568672180176,
0.6039458513259888,
0.06341986358165741,
-0.16076765954494476,
0.4452088475227356,
-0.0958242267370224,
-0.35450479388237,
-0.088676817715168,
0.25403428077697754,
0.19824452698230743,
-0.010619358159601688,
-0.33533260226249695,
0.7256404757499695,
-0.18324311077594757,
-0.2423432171344757,
-0.07946818321943283,
-0.5672934651374817,
0.29438847303390503,
0.10721418261528015,
0.23346705734729767,
0.15476709604263306,
-0.13185429573059082,
-0.1644454151391983,
0.22800907492637634,
0.04814530909061432,
-0.021894579753279686,
0.019562862813472748,
-0.07710893452167511,
-0.44347625970840454,
-0.19487804174423218,
-0.12640616297721863,
-0.4273960590362549,
0.219207763671875,
-0.6686810255050659,
-0.2727111279964447,
0.4337010383605957,
-0.07416392862796783,
-0.0856536254286766,
-0.21609516441822052,
0.22764499485492706,
-0.3765789270401001,
-0.08974549174308777,
-0.08976224064826965,
0.23281237483024597,
0.13455286622047424,
-0.35318031907081604,
-0.07757334411144257,
-0.08448046445846558,
0.12008964270353317,
-0.1485578864812851,
-0.1885521560907364,
0.19476144015789032,
0.16355465352535248,
0.3136901557445526,
-0.06820154935121536,
-0.14226201176643372,
0.029350969940423965,
0.11743513494729996,
0.18406006693840027,
-0.06535114347934723,
0.06793104112148285,
0.1901082694530487,
-0.003538385033607483,
0.026200147345662117,
-0.06362949311733246,
-0.0851445198059082,
0.0705614909529686,
-0.2034723460674286,
0.060169972479343414,
-0.17326200008392334,
0.48900294303894043,
-0.25018393993377686,
0.2387620210647583,
-0.02435753121972084,
0.07120855897665024,
0.11508543789386749,
-0.19531579315662384,
0.04220326989889145,
-0.10124842822551727,
0.262136310338974,
0.07949305325746536,
0.087466761469841,
-0.07810566574335098,
-0.1392308920621872,
0.05967884138226509,
0.33974090218544006,
-0.19958914816379547,
-0.12908411026000977,
-0.09711463004350662,
-0.06547068804502487,
-0.10624663531780243,
0.20735777914524078,
0.3562301993370056,
0.29537689685821533,
0.13935847580432892,
0.5149042010307312,
0.07710549235343933,
0.1494971513748169,
-0.25199684500694275,
0.14388121664524078,
0.028694450855255127,
-0.20335079729557037,
-0.06113395839929581,
-0.09691646695137024,
-0.13299766182899475,
-0.22849956154823303,
0.5298206210136414,
0.18843664228916168,
-0.04378382861614227,
-0.07212861627340317,
-0.10562244057655334,
-0.40704435110092163,
-0.136989027261734,
-0.003369736485183239,
-0.021559055894613266,
-0.15911543369293213,
-0.1997402310371399,
0.39006513357162476,
-0.17504410445690155,
-0.22463160753250122,
0.17171576619148254,
0.13623979687690735,
0.4625750184059143,
-0.1568746715784073,
-0.2329503744840622,
0.16392117738723755,
0.04327782243490219,
-0.09028316289186478,
0.08864031732082367,
0.08599019795656204,
0.3979049324989319,
0.45000797510147095,
-0.10037285834550858,
-0.1956559419631958,
0.04053083062171936,
0.08623892813920975,
0.06506352871656418,
0.2300628423690796,
0.48143675923347473,
-0.02249544858932495,
0.41138243675231934,
-0.012759948149323463,
0.14478741586208344,
-0.3928004503250122,
-0.11072256416082382,
-0.26958030462265015,
-0.10978731513023376,
0.2999342083930969,
0.3856034576892853,
-0.20250870287418365,
-0.7505492568016052,
-0.20442092418670654,
-0.26555782556533813,
0.19112929701805115,
0.0078094229102134705,
0.21789543330669403,
-0.13020415604114532,
-0.2237561047077179,
-0.07237560302019119,
-0.41912147402763367,
-0.029989389702677727,
-0.05465773493051529,
-0.027256298810243607,
0.2050248384475708,
-0.17966489493846893,
-0.10892602801322937,
0.11905361711978912,
-0.005497679114341736,
0.31673872470855713,
0.22340309619903564,
-0.6580194234848022,
0.3405666947364807,
-0.041155047714710236,
0.17391081154346466,
-0.04162944108247757,
-0.13397766649723053,
0.41454532742500305,
-0.48795923590660095,
0.03442026674747467,
0.21193751692771912,
0.21599236130714417,
0.0893983319401741,
0.09186242520809174,
0.15385550260543823,
-0.09293808043003082,
0.3225344717502594,
0.05038394406437874,
0.9196414947509766,
0.08446960151195526,
0.2862994968891144,
-0.0774066150188446,
0.028764870017766953,
0.25857308506965637,
-0.10738464444875717,
0.3119174540042877,
0.2791597843170166,
0.19783808290958405,
-0.2146594077348709,
0.25886309146881104,
0.024155287072062492,
-0.1635826826095581,
-0.16063794493675232,
-0.04817315936088562,
-0.08503270149230957,
-0.15819111466407776,
0.1432492583990097,
-0.043143026530742645,
0.13715003430843353,
0.23636314272880554,
0.10825753957033157,
0.2843376696109772,
-0.1966172456741333,
-0.07217393815517426,
-0.08450457453727722,
0.24680057168006897,
0.09812674671411514,
-0.5428900122642517,
-0.08517415821552277,
-0.2477724254131317,
0.005732208490371704,
-0.10686327517032623,
0.1800316721200943,
-0.1453002691268921,
-0.05857370048761368,
0.1785815954208374,
0.10148254036903381,
0.6295846104621887,
0.004829904064536095,
-0.13565407693386078,
-0.029293648898601532,
-0.3415818512439728,
-0.11980174481868744,
-0.047726649791002274,
-0.05079098790884018,
-0.2233603149652481,
0.1544107347726822,
-0.16493089497089386,
-0.2447296679019928,
0.02837052009999752,
0.07344990968704224,
0.4258043169975281,
-0.2620767056941986,
0.16350823640823364,
0.0626247376203537,
0.07560127228498459,
-0.13205885887145996,
0.3050738275051117,
-0.05688118934631348,
-0.015106027945876122,
-0.2590182423591614,
-0.12739484012126923,
-0.231846883893013,
-0.10116451233625412,
0.20347332954406738,
0.14483332633972168,
0.14290189743041992,
0.051266029477119446,
0.2887451648712158,
0.06865446269512177,
-0.25308123230934143,
-0.30486658215522766,
0.14920231699943542,
0.06735971570014954,
0.047409359365701675,
-0.1193515881896019,
0.007832289673388004,
0.25204989314079285,
0.3751192092895508,
-0.18276605010032654,
-0.23672786355018616,
0.027421895414590836,
0.055052500218153,
-0.009060771204531193,
0.4180620610713959,
-0.018604446202516556,
-0.38341468572616577,
-0.14813606441020966,
-0.17369474470615387,
0.37043923139572144,
0.22039255499839783,
-0.20183709263801575,
0.2406018078327179,
0.026436273008584976,
0.027872567996382713,
-0.18643581867218018,
0.2639496326446533,
0.860746443271637,
-0.26548194885253906,
0.21493512392044067,
0.16462954878807068,
-0.3632863163948059,
0.8256188035011292,
-0.33492809534072876,
0.11623941361904144,
-0.19724053144454956,
-0.15315712988376617,
-0.10656306147575378,
-0.20513780415058136,
-0.11022266000509262,
0.27928557991981506,
0.016420509666204453,
0.48655015230178833,
0.11760996282100677,
-0.07185997068881989,
0.05473829060792923,
0.04523930698633194,
0.14440447092056274,
0.075899139046669,
0.017245545983314514,
-0.041671592742204666,
-0.31215864419937134,
0.10529474914073944,
-0.04298366978764534,
-0.03022025153040886,
0.16884185373783112,
0.008627921342849731,
-0.019534625113010406,
0.08527199178934097,
-0.1231602132320404,
-0.23282022774219513,
-0.17847967147827148,
-0.16006720066070557,
-0.09355694055557251,
0.6345364451408386,
0.15036138892173767,
0.20266515016555786,
-0.343153715133667,
0.22395417094230652,
-0.11671318858861923,
0.0065892902202904224,
0.13941828906536102,
0.1315450817346573,
-0.14878904819488525,
-0.253618985414505,
0.07746226340532303,
0.14076107740402222,
-0.18527288734912872,
0.1381823867559433,
-0.35261476039886475,
0.2445802539587021,
0.14566795527935028,
-0.17888209223747253,
-0.15810538828372955,
-0.05000489950180054,
0.2716682255268097,
-0.011950293555855751,
0.02938901260495186,
0.11757798492908478,
-0.2636387050151825,
0.06586136668920517,
0.17052577435970306,
-0.32410842180252075,
-0.11114457249641418,
0.1945013552904129,
0.4288097620010376,
-0.16999992728233337,
0.3327628970146179,
-0.14090833067893982,
0.013646300882101059,
-0.3063538372516632,
-0.017215419560670853,
0.0022658794187009335,
-0.3533315360546112,
0.20714549720287323,
-0.14681337773799896,
-0.1726897954940796,
-0.07956258207559586,
0.27915000915527344,
-0.02072487771511078,
-0.13074266910552979,
0.07040691375732422,
-0.19949206709861755,
-0.03294439613819122,
0.21636326611042023,
-0.3628818690776825,
0.37883180379867554,
0.13546976447105408,
-0.2997676730155945,
-0.16346679627895355,
0.628605842590332,
-0.10366842895746231,
0.03220054879784584,
-0.09443623572587967,
0.25112441182136536,
-0.31916847825050354,
0.2514471709728241,
0.03286740928888321,
0.10788755118846893,
-0.15011996030807495,
-0.054022468626499176,
-0.3074724078178406,
-0.07368256151676178,
-0.020495979115366936,
0.1999012678861618,
-0.056204117834568024,
0.18954744935035706,
0.3652929663658142,
0.012428276240825653,
-0.15790356695652008,
0.09461475163698196,
0.08299103379249573,
-0.4526723325252533,
0.24689213931560516,
0.21114863455295563,
0.5735403895378113,
0.12588593363761902,
-0.5383151769638062,
0.43974822759628296,
-0.17805737257003784,
0.429750919342041,
-0.031019646674394608,
0.23638230562210083,
0.07115428894758224,
-0.20824062824249268,
-0.4042147994041443,
-0.14882823824882507,
0.27789610624313354,
-0.055930353701114655,
-0.13062456250190735,
0.11222909390926361,
-0.0010715276002883911,
-0.34637102484703064,
0.13916677236557007,
0.7270392775535583,
-0.1468433290719986,
0.08611389249563217,
0.3228083848953247,
0.0782289132475853,
-0.04849805682897568,
-0.013145609758794308,
0.2004357874393463,
-0.035686857998371124,
-0.2499091774225235,
0.3352947533130646,
0.06424185633659363,
-0.2685915231704712,
0.4162910580635071,
-0.04604288190603256,
-0.1537015587091446,
-0.1983642578125,
0.01614135131239891,
0.5277783274650574,
-0.22103822231292725,
-0.2766151428222656,
-0.1627863049507141,
0.10337203741073608,
0.040463887155056,
0.20246119797229767,
-0.2855546772480011,
0.2845876216888428,
0.40571141242980957,
0.19137737154960632,
0.03367374464869499,
-0.1473402976989746,
-0.32884398102760315,
0.4491599202156067,
0.11614300310611725,
0.08897801488637924,
-0.020723819732666016,
0.270083487033844,
0.14147381484508514,
-0.29815465211868286,
-0.3012727200984955,
0.21447359025478363,
0.203471839427948,
-0.02856081910431385,
-0.25577276945114136,
-0.0071111395955085754,
-0.12210900336503983,
0.3441336750984192,
-0.0058766864240169525,
-0.4594336152076721,
-0.08456046879291534,
0.2982449233531952,
-0.18215326964855194,
-0.0693451315164566,
0.32563096284866333,
-0.03258538991212845,
-0.128444105386734,
-0.25295665860176086,
0.16987280547618866,
-0.17500029504299164,
0.14046624302864075,
0.4270242750644684,
0.01547465194016695,
-0.23075783252716064,
-0.12067121267318726,
-0.41866132616996765,
-0.1668030470609665,
0.31441718339920044,
0.1680990308523178,
-0.15498150885105133,
0.15494213998317719,
0.21399521827697754,
0.5466288328170776,
0.40485885739326477,
-0.014750567264854908,
0.04288867488503456,
0.17103736102581024,
0.08916302770376205,
0.18247643113136292,
-0.4049272835254669,
0.44964995980262756,
0.22695648670196533,
0.20727476477622986,
-0.12108606100082397,
-0.05414936691522598,
-0.2880184054374695,
0.06115665286779404,
-0.3377890884876251,
-0.23572033643722534,
0.04046688228845596,
0.1949314922094345,
-0.002750428393483162,
-0.5021933317184448,
0.5036779046058655,
0.04890669882297516,
0.26145654916763306,
-0.31238389015197754,
-0.1567743867635727,
-0.2423515021800995,
-0.03384243696928024,
-0.09236171841621399,
0.14799726009368896,
0.05213861167430878,
0.2573350667953491,
0.09680448472499847,
0.506635844707489,
-0.43599390983581543,
0.2668403387069702,
-0.31127694249153137,
0.2950911521911621,
-0.2862001955509186,
-0.1277657449245453,
-0.3360532522201538,
0.4263561964035034,
0.0000956319272518158,
-0.2176024615764618,
0.4132007360458374,
-0.3228461742401123,
-0.2708883583545685,
0.6675410866737366,
-0.14534327387809753,
0.374916672706604,
0.25384819507598877,
0.2959195375442505,
0.2553872764110565,
0.18319232761859894,
0.04936865717172623,
-0.10623069107532501,
-0.09900559484958649,
0.0672190934419632,
-0.364891916513443,
-0.090985007584095,
-0.04939291253685951,
0.13065259158611298,
-0.27271199226379395,
0.5207658410072327,
0.01343802735209465,
0.1782701313495636,
-0.06946699321269989,
0.31512102484703064,
0.12133964151144028,
-0.2395360916852951,
0.06848158687353134,
0.3522230088710785,
0.41451674699783325,
0.3370571434497833,
-0.24789950251579285,
-0.26403284072875977,
-0.2773190438747406,
0.08656565845012665,
0.4922342598438263,
-0.05289367958903313,
0.08048015832901001,
0.04538041353225708,
0.21912705898284912,
0.3004128634929657,
-0.14770449697971344,
-0.34658801555633545,
-0.020760327577590942,
0.2700822055339813,
-0.34740114212036133,
0.010017208755016327,
0.32921838760375977,
0.19285987317562103,
-0.2000582218170166,
-0.12346531450748444,
0.2232586294412613,
0.24612104892730713,
-0.21741217374801636,
-0.28939029574394226,
-0.39390677213668823
] |
https://github.com/huggingface/datasets/issues/413 | Is there a way to download only NQ dev? | Ok, got it. I think this could be a valuable feature - especially for large datasets like NQ, but potentially also others.
For us, it will in this case make the difference of using the library or keeping the old downloads of the raw dev datasets.
However, I don't know if that fits into your plans with the library and can also understand if you don't want to support this. | Maybe I missed that in the docs, but is there a way to only download the dev set of natural questions (~1 GB)?
As we want to benchmark QA models on different datasets, I would like to avoid downloading the 41GB of training data.
I tried
```
dataset = nlp.load_dataset('natural_questions', split="validation", beam_runner="DirectRunner")
```
But this still triggered a big download of presumably the whole dataset. Is there any way of doing this or are splits / slicing options only available after downloading?
Thanks! | 70 | Is there a way to download only NQ dev?
Maybe I missed that in the docs, but is there a way to only download the dev set of natural questions (~1 GB)?
As we want to benchmark QA models on different datasets, I would like to avoid downloading the 41GB of training data.
I tried
```
dataset = nlp.load_dataset('natural_questions', split="validation", beam_runner="DirectRunner")
```
But this still triggered a big download of presumably the whole dataset. Is there any way of doing this or are splits / slicing options only available after downloading?
Thanks!
Ok, got it. I think this could be a valuable feature - especially for large datasets like NQ, but potentially also others.
For us, it will in this case make the difference of using the library or keeping the old downloads of the raw dev datasets.
However, I don't know if that fits into your plans with the library and can also understand if you don't want to support this. | [
-0.3837679326534271,
0.2108088731765747,
-0.09517188370227814,
0.10442374646663666,
-0.09206372499465942,
-0.09077098220586777,
-0.22576750814914703,
0.660511314868927,
-0.04186774045228958,
0.2795558273792267,
-0.3325546979904175,
0.0646844431757927,
-0.26075348258018494,
0.5805533528327942,
0.4200994670391083,
-0.16128484904766083,
-0.11435962468385696,
0.44307059049606323,
-0.07253704965114594,
0.03209386020898819,
-0.1458452045917511,
0.23554642498493195,
-0.08525554835796356,
0.08455360680818558,
0.31588277220726013,
-0.2681671380996704,
0.16130128502845764,
0.00037687644362449646,
-0.4130052924156189,
-0.2256503701210022,
0.10464905202388763,
0.23187696933746338,
0.2737070918083191,
-0.31514137983322144,
-0.00012479780707508326,
-0.17675431072711945,
-0.0492415577173233,
-0.10769732296466827,
-0.10483421385288239,
0.029060691595077515,
-0.031662825495004654,
-0.13450965285301208,
0.14484164118766785,
-0.014608465135097504,
-0.0661742091178894,
-0.2787020206451416,
0.18022237718105316,
-0.08779744803905487,
0.2828408479690552,
0.31370219588279724,
0.0347505584359169,
0.0575813427567482,
-0.1785813868045807,
0.17442120611667633,
0.0454845167696476,
-0.1572282314300537,
-0.14960841834545135,
0.07105264812707901,
0.240963414311409,
0.1739739179611206,
0.13714581727981567,
0.16288477182388306,
0.1711561530828476,
0.1461561769247055,
0.10413307696580887,
-0.00841579120606184,
0.2902480661869049,
-0.6779152154922485,
-0.13466748595237732,
0.7349892258644104,
0.2752513289451599,
0.11956518143415451,
-0.14532461762428284,
-0.17514729499816895,
0.12116987258195877,
-0.48586004972457886,
-0.10156308859586716,
0.5020628571510315,
-0.505643367767334,
0.005868729203939438,
-0.5925878286361694,
-0.5954375863075256,
-0.22894877195358276,
0.1964997798204422,
-0.015454068779945374,
-0.0786423534154892,
0.07638152688741684,
0.08080486953258514,
0.3439532518386841,
0.19328339397907257,
0.15541474521160126,
0.12686064839363098,
-0.11997877061367035,
0.1305152028799057,
-0.2635021209716797,
-0.4542860984802246,
-0.3151843547821045,
-0.1078781858086586,
0.29481205344200134,
0.10536594688892365,
-0.13060475885868073,
0.031169796362519264,
0.030392926186323166,
-0.10635942965745926,
0.51976078748703,
0.04787856712937355,
0.24578720331192017,
0.23746360838413239,
0.12655360996723175,
0.037228941917419434,
0.09753473103046417,
0.12589913606643677,
-0.022297419607639313,
-0.02199559658765793,
-0.6431496739387512,
-0.061106979846954346,
-0.056138768792152405,
-0.47039860486984253,
0.10247667878866196,
-0.21259835362434387,
-0.1848110854625702,
-0.07413067668676376,
-0.07658206671476364,
0.21191108226776123,
0.0375511460006237,
0.06745660305023193,
-0.2454402893781662,
0.283402681350708,
-0.26611390709877014,
-0.7744126319885254,
-0.12524688243865967,
-0.007906921207904816,
-0.06795243918895721,
0.06196849048137665,
0.33753639459609985,
0.08440274000167847,
0.1490255445241928,
-0.18500208854675293,
0.007380980998277664,
0.02636846899986267,
0.3335590362548828,
-0.0166183914989233,
-0.00972641259431839,
0.3612704277038574,
0.003370225429534912,
0.16384141147136688,
-0.16325941681861877,
0.2585628628730774,
-0.4758756756782532,
0.24903541803359985,
-0.09428874403238297,
-0.3748088777065277,
0.0877632424235344,
0.02429690957069397,
-0.043055906891822815,
0.05589555203914642,
-0.08282352238893509,
0.27867957949638367,
-0.07650896161794662,
-0.23456454277038574,
-0.04447310417890549,
-0.17472122609615326,
-0.22333842515945435,
-0.06687565892934799,
0.2855819761753082,
-0.07807885110378265,
-0.2522704005241394,
-0.18715114891529083,
-0.07461459934711456,
-0.1785927563905716,
0.21087008714675903,
0.36801260709762573,
-0.2529716193675995,
0.15839660167694092,
-0.1155180111527443,
0.021836690604686737,
0.6580268144607544,
0.07899966835975647,
-0.23373918235301971,
0.49083369970321655,
-0.05265108495950699,
-0.31380289793014526,
-0.10154248028993607,
0.35639795660972595,
0.1839400827884674,
-0.05893918499350548,
-0.33912187814712524,
0.7834394574165344,
-0.13798050582408905,
-0.25033247470855713,
-0.07841285318136215,
-0.5916565656661987,
0.30745333433151245,
0.17830967903137207,
0.22057276964187622,
0.13420134782791138,
-0.0495593324303627,
-0.12027854472398758,
0.22451576590538025,
0.030030876398086548,
0.011263182386755943,
-0.008810874074697495,
0.012379251420497894,
-0.3818089962005615,
-0.171175017952919,
-0.15303513407707214,
-0.4459682106971741,
0.18465405702590942,
-0.6536506414413452,
-0.1945618838071823,
0.4189763069152832,
-0.08657106757164001,
0.007397938519716263,
-0.2341001331806183,
0.22031207382678986,
-0.4121864140033722,
-0.11986443400382996,
-0.17909720540046692,
0.18353469669818878,
0.16846446692943573,
-0.3527587056159973,
-0.11952578276395798,
-0.14148764312267303,
0.16724906861782074,
-0.18173323571681976,
-0.12166553735733032,
0.18362489342689514,
0.2101251780986786,
0.22292032837867737,
-0.0013608559966087341,
-0.15466159582138062,
0.06019625440239906,
0.12646983563899994,
0.14643576741218567,
-0.15696245431900024,
0.07484973967075348,
0.13805493712425232,
0.06022363901138306,
0.1468370109796524,
-0.06213410571217537,
-0.010638555511832237,
0.027823666110634804,
-0.1594226211309433,
0.035975731909275055,
-0.18416225910186768,
0.4670122265815735,
-0.2941000461578369,
0.227300763130188,
-0.04321112483739853,
0.042776234447956085,
0.0677795559167862,
-0.19878007471561432,
0.07021170109510422,
-0.03145656734704971,
0.2993670701980591,
0.07511255145072937,
0.08936670422554016,
-0.06842146068811417,
-0.1516074538230896,
0.0916004478931427,
0.30926957726478577,
-0.18391717970371246,
-0.17738211154937744,
-0.036572158336639404,
-0.07421975582838058,
-0.07073286920785904,
0.23807695508003235,
0.409053236246109,
0.3239271938800812,
0.14571814239025116,
0.5053701996803284,
0.04641604423522949,
0.1550111025571823,
-0.24613265693187714,
0.12225405126810074,
-0.0016359016299247742,
-0.25937363505363464,
-0.07849835604429245,
-0.10568615794181824,
-0.06836163252592087,
-0.2644273638725281,
0.48361167311668396,
0.12114612013101578,
-0.05166954547166824,
-0.010891862213611603,
-0.09186673909425735,
-0.4039866626262665,
-0.1954008936882019,
-0.005984081886708736,
-0.06681826710700989,
-0.21759171783924103,
-0.1385280191898346,
0.3773465156555176,
-0.1401185542345047,
-0.18598657846450806,
0.1419488936662674,
0.2079990804195404,
0.46113866567611694,
-0.22855684161186218,
-0.3333145081996918,
0.1294853240251541,
0.06488844007253647,
-0.08235558867454529,
0.08761554956436157,
0.1210080236196518,
0.32321253418922424,
0.43681225180625916,
-0.014864228665828705,
-0.1111295074224472,
-0.022028425708413124,
-0.031248249113559723,
0.031064527109265327,
0.21059206128120422,
0.45115408301353455,
0.0031832903623580933,
0.3574378490447998,
-0.02078394778072834,
0.1039651557803154,
-0.3731698989868164,
-0.20484000444412231,
-0.20446869730949402,
-0.13326552510261536,
0.3195645809173584,
0.3701706528663635,
-0.27768951654434204,
-0.709851861000061,
-0.22635048627853394,
-0.29265710711479187,
0.2092171609401703,
0.0054045021533966064,
0.18743932247161865,
-0.025835391134023666,
-0.22577396035194397,
-0.07126350700855255,
-0.3463263213634491,
-0.030254678800702095,
-0.05382771044969559,
-0.06614350527524948,
0.23064883053302765,
-0.17364218831062317,
-0.0774058848619461,
0.14234422147274017,
0.009330488741397858,
0.27863895893096924,
0.2440708875656128,
-0.7312855124473572,
0.3878251910209656,
-0.014921868219971657,
0.1793176680803299,
0.01240425556898117,
-0.031669944524765015,
0.39068445563316345,
-0.49566033482551575,
0.04619035869836807,
0.22265636920928955,
0.18015460669994354,
0.04736114293336868,
0.14631438255310059,
0.26421457529067993,
-0.050562866032123566,
0.2984301447868347,
0.004214104264974594,
0.9026044607162476,
-0.021901722997426987,
0.2770240306854248,
-0.027902953326702118,
0.11596260219812393,
0.3132763206958771,
-0.11794086545705795,
0.29585111141204834,
0.36457228660583496,
0.1598808914422989,
-0.23357665538787842,
0.2932392358779907,
0.12394187599420547,
-0.25895488262176514,
-0.21445363759994507,
-0.06962566822767258,
-0.05670255795121193,
-0.1273164004087448,
0.15412047505378723,
-0.009761188179254532,
0.04219157621264458,
0.21849778294563293,
0.07201340049505234,
0.32935720682144165,
-0.19149795174598694,
-0.09619224071502686,
0.03225681185722351,
0.262387216091156,
0.09221530705690384,
-0.5549842715263367,
-0.06914880126714706,
-0.25532546639442444,
-0.004598788917064667,
-0.09895457327365875,
0.031761713325977325,
-0.12043988704681396,
-0.00826924666762352,
0.23185980319976807,
0.16834746301174164,
0.5909476280212402,
0.06145545095205307,
-0.2426661103963852,
-0.08832898736000061,
-0.3295907974243164,
-0.022791912779211998,
-0.029451195150613785,
0.05244108662009239,
-0.18578748404979706,
0.08472418040037155,
-0.16251520812511444,
-0.2776082158088684,
-0.0038192393258213997,
0.1067299172282219,
0.3743976950645447,
-0.17175741493701935,
0.06834044307470322,
0.13193358480930328,
0.08202172070741653,
-0.15530219674110413,
0.2775472402572632,
-0.07118695229291916,
0.01612950675189495,
-0.27661001682281494,
-0.13219985365867615,
-0.19088508188724518,
-0.05203760042786598,
0.20104825496673584,
0.061188001185655594,
0.1420811414718628,
0.04504303261637688,
0.2517426311969757,
0.04565305635333061,
-0.18500012159347534,
-0.2596510648727417,
0.21268001198768616,
0.01815655827522278,
0.051940131932497025,
-0.09696299582719803,
0.0326506607234478,
0.22346189618110657,
0.3854714334011078,
-0.159027099609375,
-0.18184521794319153,
-0.008987050503492355,
0.037251830101013184,
-0.017068296670913696,
0.31701430678367615,
-0.0053068771958351135,
-0.39978960156440735,
-0.22671838104724884,
-0.226995050907135,
0.4494839906692505,
0.1634717583656311,
-0.14134174585342407,
0.32207396626472473,
0.06557179987430573,
0.04997427761554718,
-0.24215543270111084,
0.26858189702033997,
0.9881723523139954,
-0.2815467119216919,
0.2548356354236603,
0.1280253827571869,
-0.4641484022140503,
0.9363817572593689,
-0.37212634086608887,
0.09347134828567505,
-0.24081291258335114,
-0.12615039944648743,
-0.12375497817993164,
-0.18515180051326752,
-0.07795322686433792,
0.2559376358985901,
0.03021954372525215,
0.4426487982273102,
0.16115054488182068,
-0.05133714899420738,
0.05612558871507645,
0.05603364109992981,
0.15205681324005127,
0.043957337737083435,
-0.028106894344091415,
-0.044349368661642075,
-0.27461355924606323,
0.1111413836479187,
-0.05412055179476738,
-0.10220073908567429,
0.15297642350196838,
-0.000628303736448288,
-0.018722176551818848,
0.04443059116601944,
-0.01272656675428152,
-0.2662276029586792,
-0.06237945333123207,
-0.21859736740589142,
0.01437799260020256,
0.6153011322021484,
0.12691953778266907,
0.17624014616012573,
-0.38006606698036194,
0.2230013608932495,
-0.1217522844672203,
0.015368593856692314,
0.15901431441307068,
0.10441360622644424,
-0.14016543328762054,
-0.20978671312332153,
0.12962746620178223,
0.08713984489440918,
-0.22260689735412598,
0.05137241631746292,
-0.38739097118377686,
0.2717067301273346,
0.24841439723968506,
-0.16532203555107117,
-0.10951592028141022,
-0.03475770354270935,
0.2807542085647583,
-0.007119119167327881,
0.027663618326187134,
0.17074504494667053,
-0.20038987696170807,
0.006211340427398682,
0.12129656970500946,
-0.29660505056381226,
-0.1784135401248932,
0.2170598804950714,
0.44106945395469666,
-0.29568740725517273,
0.23113352060317993,
-0.14475181698799133,
-0.04064693674445152,
-0.23978456854820251,
0.010482840240001678,
-0.029925700277090073,
-0.40083661675453186,
0.13582350313663483,
-0.11067011207342148,
-0.18302330374717712,
-0.024585504084825516,
0.2750995457172394,
-0.099458709359169,
-0.09417874366044998,
0.07733465731143951,
-0.21169975399971008,
-0.07177224010229111,
0.21153421700000763,
-0.49583980441093445,
0.39221879839897156,
0.16117891669273376,
-0.34406578540802,
-0.08004049956798553,
0.538037121295929,
-0.08751451224088669,
0.11438197642564774,
-0.03271608427166939,
0.23921819031238556,
-0.33013537526130676,
0.23760521411895752,
-0.033543553203344345,
0.0713958889245987,
-0.1780044436454773,
-0.0215446799993515,
-0.3189706802368164,
-0.044727787375450134,
-0.08305290341377258,
0.22085434198379517,
-0.02009156346321106,
0.17323370277881622,
0.297939270734787,
-0.05267533287405968,
-0.1839701384305954,
0.1012202799320221,
0.1039198786020279,
-0.38892531394958496,
0.24018816649913788,
0.15749534964561462,
0.578349232673645,
0.10978452861309052,
-0.5913112163543701,
0.5145001411437988,
-0.16770446300506592,
0.4666442275047302,
0.04726158827543259,
0.1512608528137207,
-0.012769821099936962,
-0.2139866054058075,
-0.4592819809913635,
-0.12761667370796204,
0.28906679153442383,
-0.07644403725862503,
-0.0014028027653694153,
0.1141812801361084,
0.06534519791603088,
-0.2780647277832031,
0.2255566567182541,
0.7534225583076477,
-0.13397738337516785,
0.062085315585136414,
0.3673752546310425,
0.064930260181427,
-0.009342115372419357,
-0.057174764573574066,
0.08908015489578247,
-0.013878398574888706,
-0.2894071936607361,
0.31292805075645447,
0.0575321801006794,
-0.3034369945526123,
0.4116082191467285,
-0.11162339895963669,
-0.09437642991542816,
-0.15300005674362183,
0.042538050562143326,
0.5735345482826233,
-0.27322453260421753,
-0.3262377381324768,
-0.13947223126888275,
0.15088653564453125,
0.022197172045707703,
0.22716625034809113,
-0.36910706758499146,
0.21775683760643005,
0.44594547152519226,
0.23703277111053467,
0.005874432623386383,
-0.13448211550712585,
-0.3252527415752411,
0.5056000351905823,
0.21827571094036102,
0.04067274555563927,
-0.0696755051612854,
0.3011368215084076,
0.15728697180747986,
-0.29127827286720276,
-0.19808799028396606,
0.24192401766777039,
0.19745177030563354,
0.016668111085891724,
-0.20285369455814362,
-0.04968101531267166,
-0.18268385529518127,
0.3123772442340851,
-0.10107250511646271,
-0.45746761560440063,
-0.13913045823574066,
0.32401716709136963,
-0.12361559271812439,
-0.15699119865894318,
0.3307212293148041,
-0.04196301847696304,
-0.10212936252355576,
-0.2556849420070648,
0.17956289649009705,
-0.17700184881687164,
0.09583029896020889,
0.46408534049987793,
-0.04593634605407715,
-0.259622722864151,
-0.025790009647607803,
-0.3653515875339508,
-0.20953886210918427,
0.2498321384191513,
0.20348523557186127,
-0.10961562395095825,
0.15573136508464813,
0.28077641129493713,
0.5663048624992371,
0.39424002170562744,
-0.047234974801540375,
0.03247004374861717,
0.28812268376350403,
0.08073335886001587,
0.20346593856811523,
-0.4621669054031372,
0.42832091450691223,
0.2240886241197586,
0.21491461992263794,
-0.0970674455165863,
-0.06315479427576065,
-0.20140081644058228,
-0.01635715737938881,
-0.3748483657836914,
-0.2838502526283264,
0.01230926625430584,
0.14592647552490234,
-0.011200829409062862,
-0.47725799679756165,
0.5015838742256165,
0.10125906765460968,
0.2848774492740631,
-0.33605703711509705,
-0.1893145740032196,
-0.27212318778038025,
-0.026116691529750824,
-0.0678437203168869,
0.225115567445755,
0.06025855988264084,
0.22846044600009918,
0.13238881528377533,
0.5546504259109497,
-0.48269593715667725,
0.24118676781654358,
-0.24266144633293152,
0.2789436876773834,
-0.2555558383464813,
-0.1002761721611023,
-0.3028169870376587,
0.40926221013069153,
-0.006901038810610771,
-0.19170904159545898,
0.3745422959327698,
-0.33088234066963196,
-0.2955683767795563,
0.6019463539123535,
-0.10759945213794708,
0.3654629588127136,
0.2640301287174225,
0.3025880455970764,
0.21526965498924255,
0.11331172287464142,
0.11214587837457657,
-0.16226144134998322,
-0.0897892415523529,
0.0291147381067276,
-0.34790074825286865,
-0.11574802547693253,
-0.044137898832559586,
0.15113139152526855,
-0.2918071746826172,
0.5623235702514648,
-0.03079109638929367,
0.18984952569007874,
-0.038891904056072235,
0.38464996218681335,
0.030289778485894203,
-0.28808140754699707,
0.048830680549144745,
0.35432887077331543,
0.34044358134269714,
0.3559589087963104,
-0.20899680256843567,
-0.29187288880348206,
-0.27756065130233765,
0.1047595888376236,
0.4886987805366516,
-0.04193347319960594,
0.11183999478816986,
0.1454213559627533,
0.1829407513141632,
0.3227470815181732,
-0.1110481545329094,
-0.4189254343509674,
-0.028390392661094666,
0.2660472095012665,
-0.3359091281890869,
0.060807909816503525,
0.32845041155815125,
0.17266777157783508,
-0.21167756617069244,
-0.13201136887073517,
0.1879136860370636,
0.26397690176963806,
-0.15897676348686218,
-0.1981961578130722,
-0.40460479259490967
] |
https://github.com/huggingface/datasets/issues/413 | Is there a way to download only NQ dev? | I don't think we could force this behavior generally since the dataset script authors are free to organize the file download as they want (sometimes the mapping between split and files can be very much nontrivial) but we can add an additional configuration for Natural Question indeed as @lhoestq indicate. | Maybe I missed that in the docs, but is there a way to only download the dev set of natural questions (~1 GB)?
As we want to benchmark QA models on different datasets, I would like to avoid downloading the 41GB of training data.
I tried
```
dataset = nlp.load_dataset('natural_questions', split="validation", beam_runner="DirectRunner")
```
But this still triggered a big download of presumably the whole dataset. Is there any way of doing this or are splits / slicing options only available after downloading?
Thanks! | 50 | Is there a way to download only NQ dev?
Maybe I missed that in the docs, but is there a way to only download the dev set of natural questions (~1 GB)?
As we want to benchmark QA models on different datasets, I would like to avoid downloading the 41GB of training data.
I tried
```
dataset = nlp.load_dataset('natural_questions', split="validation", beam_runner="DirectRunner")
```
But this still triggered a big download of presumably the whole dataset. Is there any way of doing this or are splits / slicing options only available after downloading?
Thanks!
I don't think we could force this behavior generally since the dataset script authors are free to organize the file download as they want (sometimes the mapping between split and files can be very much nontrivial) but we can add an additional configuration for Natural Question indeed as @lhoestq indicate. | [
-0.4887261688709259,
0.20523235201835632,
-0.09393595159053802,
0.126094251871109,
-0.041888363659381866,
-0.10875587910413742,
-0.22859521210193634,
0.6617491245269775,
0.007649209350347519,
0.26699018478393555,
-0.2714673578739166,
0.04453853517770767,
-0.20828129351139069,
0.5945584774017334,
0.44446828961372375,
-0.06466633081436157,
-0.12714242935180664,
0.4709186255931854,
-0.13610757887363434,
-0.006954468786716461,
-0.17444096505641937,
0.156428262591362,
-0.042749520391225815,
0.03991736099123955,
0.2861553430557251,
-0.24353474378585815,
0.18146337568759918,
0.004128292202949524,
-0.3567374348640442,
-0.2835046947002411,
0.08663313090801239,
0.2757028043270111,
0.21669815480709076,
-0.34329453110694885,
-0.00012686206900980324,
-0.10546546429395676,
0.0004300624132156372,
-0.13285206258296967,
-0.2147212028503418,
0.09278259426355362,
-0.07240553200244904,
-0.15838240087032318,
0.16093304753303528,
0.010902635753154755,
-0.08431436121463776,
-0.33488503098487854,
0.26624956727027893,
-0.16320215165615082,
0.37742531299591064,
0.40125659108161926,
-0.004116438329219818,
0.05484338849782944,
-0.22727826237678528,
0.17457450926303864,
0.017551958560943604,
-0.1025492250919342,
-0.15524353086948395,
0.05583558976650238,
0.1900913417339325,
0.07636929303407669,
0.03938283026218414,
0.09632368385791779,
0.2445642650127411,
0.21814998984336853,
0.11716853082180023,
-0.00011758226901292801,
0.343948632478714,
-0.7146769762039185,
-0.14678969979286194,
0.7247006893157959,
0.25754109025001526,
0.08351178467273712,
-0.12203893810510635,
-0.24184969067573547,
0.1380847841501236,
-0.42628559470176697,
-0.04252719134092331,
0.4883483648300171,
-0.6017992496490479,
0.027939796447753906,
-0.5949165225028992,
-0.5436315536499023,
-0.19212155044078827,
0.21895675361156464,
-0.027263730764389038,
-0.060663074254989624,
0.04578356072306633,
0.05541984736919403,
0.268076092004776,
0.14333879947662354,
0.15595486760139465,
0.07054975628852844,
-0.06101005896925926,
0.14892667531967163,
-0.19998745620250702,
-0.44504719972610474,
-0.29829344153404236,
-0.09948308020830154,
0.3308860659599304,
0.11282581090927124,
-0.02950245887041092,
0.04625416547060013,
0.0011218860745429993,
-0.08760618418455124,
0.4969103932380676,
0.0745895653963089,
0.23534175753593445,
0.2745424509048462,
0.1146286353468895,
0.1112653911113739,
0.08984175324440002,
0.13890968263149261,
0.024352502077817917,
-0.06880077719688416,
-0.6210035085678101,
0.003677014261484146,
0.07708874344825745,
-0.35948047041893005,
-0.030612114816904068,
-0.21827346086502075,
-0.07736524194478989,
-0.10100370645523071,
-0.14457274973392487,
0.18836863338947296,
0.06246204301714897,
0.07965806871652603,
-0.34897905588150024,
0.32378196716308594,
-0.2918674051761627,
-0.7594267129898071,
-0.14193761348724365,
-0.030981864780187607,
-0.03222585469484329,
0.13054899871349335,
0.4035457968711853,
0.17774304747581482,
0.1623430997133255,
-0.15462259948253632,
-0.00817795842885971,
0.022877834737300873,
0.3501377999782562,
-0.0447859987616539,
0.05216294899582863,
0.39549002051353455,
0.0708252489566803,
0.11984389275312424,
-0.09919753670692444,
0.2762242555618286,
-0.4767386317253113,
0.21214362978935242,
-0.08146438747644424,
-0.30397897958755493,
0.20001433789730072,
0.031273867934942245,
-0.061172738671302795,
0.061908356845378876,
-0.08244945853948593,
0.2958792448043823,
-0.021802596747875214,
-0.2617383897304535,
-0.07801421731710434,
-0.18498361110687256,
-0.26603078842163086,
-0.019463693723082542,
0.2815350592136383,
0.05215228348970413,
-0.28769630193710327,
-0.1943800449371338,
-0.04265597462654114,
-0.19538013637065887,
0.24094349145889282,
0.3353288173675537,
-0.222153902053833,
0.2208235263824463,
-0.17772014439105988,
0.07270538806915283,
0.6215860247612,
0.04083544388413429,
-0.21532753109931946,
0.518972635269165,
-0.1252591609954834,
-0.2580467462539673,
0.009943075478076935,
0.29156285524368286,
0.20155367255210876,
-0.0975811555981636,
-0.30815309286117554,
0.7577160000801086,
-0.13818886876106262,
-0.20855773985385895,
-0.04687367379665375,
-0.5798711776733398,
0.21783585846424103,
0.13115014135837555,
0.16776157915592194,
0.1886197030544281,
-0.021846428513526917,
-0.1770363599061966,
0.23026296496391296,
0.07604114711284637,
0.021076558157801628,
-0.0027038343250751495,
-0.09272636473178864,
-0.40675830841064453,
-0.23144344985485077,
-0.1624523103237152,
-0.5866490602493286,
0.1941293179988861,
-0.5578172206878662,
-0.28354412317276,
0.384806752204895,
-0.13718464970588684,
-0.020314399152994156,
-0.2599237263202667,
0.15404722094535828,
-0.3446827530860901,
-0.10267758369445801,
-0.04580776393413544,
0.1526648998260498,
0.13154816627502441,
-0.36602863669395447,
-0.06223541498184204,
-0.06041020154953003,
0.2207045704126358,
-0.13137273490428925,
-0.17698946595191956,
0.22607776522636414,
0.18802958726882935,
0.25586605072021484,
-0.07255245000123978,
-0.10995052009820938,
0.04677924886345863,
0.15136340260505676,
0.17340999841690063,
-0.026259293779730797,
0.0936717614531517,
0.20822933316230774,
-0.00018468499183654785,
0.059257589280605316,
-0.019603583961725235,
-0.02991611696779728,
0.09189566969871521,
-0.22086066007614136,
0.004964940249919891,
-0.2566196024417877,
0.4621080756187439,
-0.2703952193260193,
0.23826813697814941,
-0.031036024913191795,
0.022002166137099266,
0.13742679357528687,
-0.2340872883796692,
0.02347755990922451,
-0.14729279279708862,
0.24135856330394745,
0.12380547821521759,
0.15532030165195465,
-0.002299867570400238,
-0.13337159156799316,
0.08550412952899933,
0.41478824615478516,
-0.21113666892051697,
-0.11270489543676376,
-0.013723745942115784,
-0.05576179176568985,
-0.09847816079854965,
0.15943676233291626,
0.42924389243125916,
0.3710593581199646,
0.17351527512073517,
0.5662352442741394,
0.0483270026743412,
0.14304521679878235,
-0.31684958934783936,
0.11121564358472824,
-0.01178828626871109,
-0.25329306721687317,
0.038024190813302994,
-0.11881493777036667,
-0.12132624536752701,
-0.2932133972644806,
0.47361066937446594,
0.1529058814048767,
-0.06826823204755783,
-0.0972214937210083,
-0.14104443788528442,
-0.4016961455345154,
-0.1507290005683899,
-0.07152462005615234,
0.024220289662480354,
-0.15662173926830292,
-0.20053765177726746,
0.36914002895355225,
-0.12951894104480743,
-0.2382732480764389,
0.17086924612522125,
0.12900865077972412,
0.49115419387817383,
-0.20716239511966705,
-0.32138821482658386,
0.10329702496528625,
0.08763376623392105,
-0.07757286727428436,
0.060663964599370956,
0.15471765398979187,
0.3283344805240631,
0.4007336497306824,
-0.11201057583093643,
-0.16414815187454224,
0.014115999452769756,
0.10654488950967789,
0.05875694751739502,
0.24431432783603668,
0.48493409156799316,
-0.06010279059410095,
0.4556979537010193,
0.05521188676357269,
0.12882345914840698,
-0.40623152256011963,
-0.04733872413635254,
-0.24281634390354156,
-0.11480916291475296,
0.29740485548973083,
0.3979504108428955,
-0.2779553234577179,
-0.7279382944107056,
-0.19251181185245514,
-0.3107815086841583,
0.1971549242734909,
0.03620209917426109,
0.16607023775577545,
-0.020988985896110535,
-0.18015475571155548,
-0.16894955933094025,
-0.4117165505886078,
0.030272115021944046,
-0.042468223720788956,
-0.05584188923239708,
0.24957060813903809,
-0.16566042602062225,
-0.08188845217227936,
0.09859101474285126,
-0.00022073835134506226,
0.18288275599479675,
0.30648165941238403,
-0.7142482399940491,
0.30789804458618164,
-0.08370833843946457,
0.17056363821029663,
-0.0621967539191246,
-0.0692707747220993,
0.4284796118736267,
-0.4704175591468811,
0.027230875566601753,
0.2099207639694214,
0.2742372751235962,
0.1153624877333641,
0.03214084729552269,
0.1345503032207489,
-0.04403010755777359,
0.30969834327697754,
0.038545917719602585,
0.8778747916221619,
0.08455272018909454,
0.2853832542896271,
0.005380947142839432,
0.08231619000434875,
0.37017253041267395,
-0.11148304492235184,
0.34477657079696655,
0.3482345640659332,
0.19521671533584595,
-0.1944245547056198,
0.326347291469574,
0.0774826779961586,
-0.18781721591949463,
-0.15260010957717896,
-0.01018085889518261,
-0.06751298159360886,
-0.18573503196239471,
0.19856753945350647,
-0.05887463688850403,
0.06811013072729111,
0.2273648977279663,
0.10452184826135635,
0.29603055119514465,
-0.1768454611301422,
-0.13668915629386902,
0.027859345078468323,
0.24566054344177246,
0.12181354314088821,
-0.5731312036514282,
-0.008216552436351776,
-0.2568286657333374,
-0.02316512167453766,
-0.11844120174646378,
0.09144234657287598,
-0.20681831240653992,
-0.08564980328083038,
0.2234112024307251,
0.20784549415111542,
0.6067394018173218,
0.03008968196809292,
-0.11003284156322479,
-0.11665000021457672,
-0.2653927206993103,
-0.04573137313127518,
-0.04471364989876747,
0.010301496833562851,
-0.1716821789741516,
0.10646271705627441,
-0.04704318940639496,
-0.2884468734264374,
-0.0024439662229269743,
0.0786774754524231,
0.3771262466907501,
-0.16410072147846222,
0.0801430270075798,
0.1451834738254547,
0.06642724573612213,
-0.14320498704910278,
0.27438247203826904,
0.02221984602510929,
-0.058252766728401184,
-0.2841441333293915,
-0.17469024658203125,
-0.21786513924598694,
-0.07642834633588791,
0.18686243891716003,
0.07682144641876221,
0.08335413783788681,
0.07665310800075531,
0.22591900825500488,
0.07862072438001633,
-0.20558199286460876,
-0.20467279851436615,
0.276751846075058,
-0.0017925091087818146,
-0.09849688410758972,
-0.13953474164009094,
-0.02812482789158821,
0.15360607206821442,
0.45461031794548035,
-0.1922067105770111,
-0.2828111946582794,
-0.01673102006316185,
0.08934336155653,
-0.022338133305311203,
0.4292798936367035,
0.039814334362745285,
-0.44621846079826355,
-0.21012172102928162,
-0.2589491307735443,
0.3732421100139618,
0.19459748268127441,
-0.20553989708423615,
0.21449856460094452,
0.0013383924961090088,
-0.028261059895157814,
-0.24728834629058838,
0.259144127368927,
0.9118404984474182,
-0.23268328607082367,
0.2671700417995453,
0.14728647470474243,
-0.377902090549469,
0.8221439719200134,
-0.4244486093521118,
0.07802536338567734,
-0.1748114377260208,
-0.15138711035251617,
-0.13845275342464447,
-0.20455487072467804,
-0.10359879583120346,
0.3686385750770569,
0.0392800010740757,
0.47705310583114624,
0.08915293216705322,
-0.014478016644716263,
0.07208101451396942,
0.06884841620922089,
0.09403202682733536,
0.03311172127723694,
0.06108275428414345,
-0.06438712775707245,
-0.32213836908340454,
0.10720084607601166,
-0.02135413885116577,
-0.07482262700796127,
0.18518544733524323,
-0.055480167269706726,
-0.029084093868732452,
0.05745989829301834,
-0.1575431376695633,
-0.2827278971672058,
-0.20143775641918182,
-0.23881350457668304,
-0.04155668988823891,
0.708536684513092,
0.13107246160507202,
0.14032188057899475,
-0.3597536087036133,
0.21764351427555084,
-0.13326385617256165,
0.0653970018029213,
0.07041832059621811,
0.05255945771932602,
-0.10544762015342712,
-0.16836488246917725,
0.14066961407661438,
0.0120316743850708,
-0.16349837183952332,
0.13788804411888123,
-0.3886714577674866,
0.2521440386772156,
0.15313446521759033,
-0.21981702744960785,
-0.12753432989120483,
-0.1228998601436615,
0.32953912019729614,
-0.0046905167400836945,
0.009553852491080761,
0.0961323082447052,
-0.16931816935539246,
0.013012010604143143,
0.14826978743076324,
-0.32367435097694397,
-0.13800902664661407,
0.2522521913051605,
0.386165976524353,
-0.22822295129299164,
0.30952969193458557,
-0.1906154602766037,
-0.050405360758304596,
-0.2935265004634857,
0.03222968429327011,
-0.0071939704939723015,
-0.3725097179412842,
0.14852482080459595,
-0.046140797436237335,
-0.19848892092704773,
-0.05606217682361603,
0.20994295179843903,
-0.07735895365476608,
-0.12132184952497482,
0.0820886641740799,
-0.19971805810928345,
-0.0244312547147274,
0.19568108022212982,
-0.4095672070980072,
0.4032942056655884,
0.19597917795181274,
-0.3230586349964142,
-0.11458441615104675,
0.5872228145599365,
-0.08532105386257172,
0.033279597759246826,
0.01695576123893261,
0.22046124935150146,
-0.26706427335739136,
0.28230419754981995,
0.029355918988585472,
0.10788016021251678,
-0.1735430508852005,
-0.09706863760948181,
-0.2927985191345215,
-0.05510371923446655,
-0.02357955276966095,
0.21119172871112823,
-0.04216724634170532,
0.15566137433052063,
0.2824380099773407,
-0.0781593769788742,
-0.15797719359397888,
0.004494191147387028,
0.10345752537250519,
-0.42418912053108215,
0.2448602318763733,
0.19579800963401794,
0.5968701243400574,
0.21483418345451355,
-0.44981491565704346,
0.49099472165107727,
-0.2002984881401062,
0.44678032398223877,
-0.012261936441063881,
0.17215608060359955,
0.011522256769239902,
-0.19017820060253143,
-0.4182385802268982,
-0.10430444031953812,
0.3986243009567261,
0.03690590336918831,
-0.126112699508667,
0.08974815905094147,
0.04163306578993797,
-0.3117085099220276,
0.152830570936203,
0.7208673357963562,
-0.16707833111286163,
0.027736542746424675,
0.3030213713645935,
0.07332839071750641,
-0.011628376320004463,
-0.08673018962144852,
0.20755186676979065,
-0.032828669995069504,
-0.21756398677825928,
0.3294559717178345,
-0.006804749369621277,
-0.2957662343978882,
0.41661471128463745,
-0.0636664628982544,
-0.09695447236299515,
-0.11668890714645386,
0.026330458000302315,
0.5689669847488403,
-0.22246769070625305,
-0.280253529548645,
-0.15252846479415894,
0.14862984418869019,
0.04319135844707489,
0.3451727628707886,
-0.3122253715991974,
0.2479105442762375,
0.40051138401031494,
0.20871832966804504,
-0.02693483978509903,
-0.24414199590682983,
-0.27487367391586304,
0.5229998230934143,
0.11043132841587067,
0.03366643190383911,
-0.000310748815536499,
0.24383655190467834,
0.14016255736351013,
-0.2416861206293106,
-0.3140127956867218,
0.13847045600414276,
0.1926988959312439,
0.0025468850508332253,
-0.20522455871105194,
-0.028044741600751877,
-0.09560471028089523,
0.32129836082458496,
-0.11872833967208862,
-0.4251154065132141,
-0.13087664544582367,
0.3025725483894348,
-0.16115663945674896,
-0.0812014564871788,
0.3739449083805084,
-0.07128500193357468,
-0.13488861918449402,
-0.26020917296409607,
0.18980510532855988,
-0.18483881652355194,
0.1720387488603592,
0.4114939570426941,
-0.04625794291496277,
-0.22668394446372986,
-0.045570001006126404,
-0.3624217212200165,
-0.21696819365024567,
0.2848592698574066,
0.1728210598230362,
-0.2372649759054184,
0.1584549993276596,
0.20723861455917358,
0.5742630362510681,
0.4248841106891632,
-0.01929716020822525,
0.04645877331495285,
0.25712934136390686,
0.11050911247730255,
0.10291710495948792,
-0.4459000527858734,
0.4196876585483551,
0.21573889255523682,
0.22363701462745667,
-0.07750145345926285,
-0.07799441367387772,
-0.26161351799964905,
-0.013357979245483875,
-0.3012205958366394,
-0.23483406007289886,
0.06057007610797882,
0.11346960812807083,
-0.017812002450227737,
-0.4746333360671997,
0.46370553970336914,
0.047307420521974564,
0.17859669029712677,
-0.3177025616168976,
-0.15255853533744812,
-0.2793528139591217,
-0.021068863570690155,
-0.13260918855667114,
0.14126451313495636,
-0.011448068544268608,
0.2095395177602768,
0.12402611970901489,
0.5167967677116394,
-0.4997384548187256,
0.21420058608055115,
-0.22744864225387573,
0.36365336179733276,
-0.23339548707008362,
-0.167256161570549,
-0.31860584020614624,
0.44817057251930237,
0.007924437522888184,
-0.28583699464797974,
0.3640497922897339,
-0.2809879183769226,
-0.28176483511924744,
0.615106999874115,
-0.07632198184728622,
0.3583167493343353,
0.20112662017345428,
0.2634153366088867,
0.24813316762447357,
0.19292959570884705,
0.06720803678035736,
-0.11275772005319595,
-0.09850418567657471,
0.1025802418589592,
-0.42668676376342773,
-0.11899445205926895,
-0.08699201047420502,
0.1052408367395401,
-0.3675815165042877,
0.547936737537384,
0.015566937625408173,
0.10999012738466263,
-0.0931464433670044,
0.4020738899707794,
0.07516561448574066,
-0.25000855326652527,
0.08309636265039444,
0.3318130671977997,
0.3681011199951172,
0.33397194743156433,
-0.19865119457244873,
-0.31930825114250183,
-0.20466598868370056,
0.030166881158947945,
0.4539538025856018,
0.02509477362036705,
0.08544008433818817,
0.0698472112417221,
0.25119346380233765,
0.27230507135391235,
-0.07052485644817352,
-0.28771278262138367,
0.015435807406902313,
0.24938330054283142,
-0.3803722858428955,
0.0441298745572567,
0.38943320512771606,
0.16320598125457764,
-0.2141718566417694,
-0.11609283089637756,
0.22652198374271393,
0.31279870867729187,
-0.21677732467651367,
-0.27015119791030884,
-0.41537678241729736
] |
https://github.com/huggingface/datasets/issues/412 | Unable to load XTREME dataset from disk | Hi @lewtun, you have to provide the full path to the downloaded file for example `/home/lewtum/..` | Hi 🤗 team!
## Description of the problem
Following the [docs](https://huggingface.co/nlp/loading_datasets.html?highlight=xtreme#manually-downloading-files) I'm trying to load the `PAN-X.fr` dataset from the [XTREME](https://github.com/google-research/xtreme) benchmark.
I have manually downloaded the `AmazonPhotos.zip` file from [here](https://www.amazon.com/clouddrive/share/d3KGCRCIYwhKJF0H3eWA26hjg2ZCRhjpEQtDL70FSBN?_encoding=UTF8&%2AVersion%2A=1&%2Aentries%2A=0&mgh=1) and am running into a `FileNotFoundError` when I point to the location of the dataset.
As far as I can tell, the problem is that `AmazonPhotos.zip` decompresses to `panx_dataset` and `load_dataset()` is not looking in the correct path:
```
# path where load_dataset is looking for fr.tar.gz
/root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/
# path where it actually exists
/root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/panx_dataset/
```
## Steps to reproduce the problem
1. Manually download the XTREME benchmark from [here](https://www.amazon.com/clouddrive/share/d3KGCRCIYwhKJF0H3eWA26hjg2ZCRhjpEQtDL70FSBN?_encoding=UTF8&%2AVersion%2A=1&%2Aentries%2A=0&mgh=1)
2. Run the following code snippet
```python
from nlp import load_dataset
# AmazonPhotos.zip is in the root of the folder
dataset = load_dataset("xtreme", "PAN-X.fr", data_dir='./')
```
3. Here is the stack trace
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-4-26786bb5fa93> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.fr", data_dir='./')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
522 download_mode=download_mode,
523 ignore_verifications=ignore_verifications,
--> 524 save_infos=save_infos,
525 )
526
/usr/local/lib/python3.6/dist-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs)
430 verify_infos = not save_infos and not ignore_verifications
431 self._download_and_prepare(
--> 432 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
433 )
434 # Sync info
/usr/local/lib/python3.6/dist-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
464 split_dict = SplitDict(dataset_name=self.name)
465 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 466 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
467 # Checksums verification
468 if verify_infos:
/usr/local/lib/python3.6/dist-packages/nlp/datasets/xtreme/b8c2ed3583a7a7ac60b503576dfed3271ac86757628897e945bd329c43b8a746/xtreme.py in _split_generators(self, dl_manager)
725 panx_dl_dir = dl_manager.extract(panx_path)
726 lang = self.config.name.split(".")[1]
--> 727 lang_folder = dl_manager.extract(os.path.join(panx_dl_dir, lang + ".tar.gz"))
728 return [
729 nlp.SplitGenerator(
/usr/local/lib/python3.6/dist-packages/nlp/utils/download_manager.py in extract(self, path_or_paths)
196 """
197 return map_nested(
--> 198 lambda path: cached_path(path, extract_compressed_file=True, force_extract=False), path_or_paths,
199 )
200
/usr/local/lib/python3.6/dist-packages/nlp/utils/py_utils.py in map_nested(function, data_struct, dict_only, map_tuple)
170 return tuple(mapped)
171 # Singleton
--> 172 return function(data_struct)
173
174
/usr/local/lib/python3.6/dist-packages/nlp/utils/download_manager.py in <lambda>(path)
196 """
197 return map_nested(
--> 198 lambda path: cached_path(path, extract_compressed_file=True, force_extract=False), path_or_paths,
199 )
200
/usr/local/lib/python3.6/dist-packages/nlp/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
203 elif urlparse(url_or_filename).scheme == "":
204 # File, but it doesn't exist.
--> 205 raise FileNotFoundError("Local file {} doesn't exist".format(url_or_filename))
206 else:
207 # Something unknown
FileNotFoundError: Local file /root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/fr.tar.gz doesn't exist
```
## OS and hardware
```
- `nlp` version: 0.3.0
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
``` | 16 | Unable to load XTREME dataset from disk
Hi 🤗 team!
## Description of the problem
Following the [docs](https://huggingface.co/nlp/loading_datasets.html?highlight=xtreme#manually-downloading-files) I'm trying to load the `PAN-X.fr` dataset from the [XTREME](https://github.com/google-research/xtreme) benchmark.
I have manually downloaded the `AmazonPhotos.zip` file from [here](https://www.amazon.com/clouddrive/share/d3KGCRCIYwhKJF0H3eWA26hjg2ZCRhjpEQtDL70FSBN?_encoding=UTF8&%2AVersion%2A=1&%2Aentries%2A=0&mgh=1) and am running into a `FileNotFoundError` when I point to the location of the dataset.
As far as I can tell, the problem is that `AmazonPhotos.zip` decompresses to `panx_dataset` and `load_dataset()` is not looking in the correct path:
```
# path where load_dataset is looking for fr.tar.gz
/root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/
# path where it actually exists
/root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/panx_dataset/
```
## Steps to reproduce the problem
1. Manually download the XTREME benchmark from [here](https://www.amazon.com/clouddrive/share/d3KGCRCIYwhKJF0H3eWA26hjg2ZCRhjpEQtDL70FSBN?_encoding=UTF8&%2AVersion%2A=1&%2Aentries%2A=0&mgh=1)
2. Run the following code snippet
```python
from nlp import load_dataset
# AmazonPhotos.zip is in the root of the folder
dataset = load_dataset("xtreme", "PAN-X.fr", data_dir='./')
```
3. Here is the stack trace
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-4-26786bb5fa93> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.fr", data_dir='./')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
522 download_mode=download_mode,
523 ignore_verifications=ignore_verifications,
--> 524 save_infos=save_infos,
525 )
526
/usr/local/lib/python3.6/dist-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs)
430 verify_infos = not save_infos and not ignore_verifications
431 self._download_and_prepare(
--> 432 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
433 )
434 # Sync info
/usr/local/lib/python3.6/dist-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
464 split_dict = SplitDict(dataset_name=self.name)
465 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 466 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
467 # Checksums verification
468 if verify_infos:
/usr/local/lib/python3.6/dist-packages/nlp/datasets/xtreme/b8c2ed3583a7a7ac60b503576dfed3271ac86757628897e945bd329c43b8a746/xtreme.py in _split_generators(self, dl_manager)
725 panx_dl_dir = dl_manager.extract(panx_path)
726 lang = self.config.name.split(".")[1]
--> 727 lang_folder = dl_manager.extract(os.path.join(panx_dl_dir, lang + ".tar.gz"))
728 return [
729 nlp.SplitGenerator(
/usr/local/lib/python3.6/dist-packages/nlp/utils/download_manager.py in extract(self, path_or_paths)
196 """
197 return map_nested(
--> 198 lambda path: cached_path(path, extract_compressed_file=True, force_extract=False), path_or_paths,
199 )
200
/usr/local/lib/python3.6/dist-packages/nlp/utils/py_utils.py in map_nested(function, data_struct, dict_only, map_tuple)
170 return tuple(mapped)
171 # Singleton
--> 172 return function(data_struct)
173
174
/usr/local/lib/python3.6/dist-packages/nlp/utils/download_manager.py in <lambda>(path)
196 """
197 return map_nested(
--> 198 lambda path: cached_path(path, extract_compressed_file=True, force_extract=False), path_or_paths,
199 )
200
/usr/local/lib/python3.6/dist-packages/nlp/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
203 elif urlparse(url_or_filename).scheme == "":
204 # File, but it doesn't exist.
--> 205 raise FileNotFoundError("Local file {} doesn't exist".format(url_or_filename))
206 else:
207 # Something unknown
FileNotFoundError: Local file /root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/fr.tar.gz doesn't exist
```
## OS and hardware
```
- `nlp` version: 0.3.0
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
```
Hi @lewtun, you have to provide the full path to the downloaded file for example `/home/lewtum/..` | [
-0.2940945029258728,
-0.3835189640522003,
-0.002173054963350296,
0.6607130765914917,
0.14834526181221008,
0.1238797977566719,
-0.17308790981769562,
0.1085544228553772,
0.1807117760181427,
0.044096678495407104,
-0.14275239408016205,
-0.000344835571013391,
0.1383359134197235,
-0.02919137105345726,
0.16312231123447418,
-0.13893531262874603,
-0.005091160535812378,
-0.10926422476768494,
-0.04557351768016815,
0.0021920017898082733,
-0.3334752023220062,
0.3826161324977875,
-0.12323273718357086,
-0.01583632081747055,
-0.33437013626098633,
0.015269418247044086,
0.05252508074045181,
0.6103965044021606,
-0.2204437404870987,
-0.04907490685582161,
0.4548048973083496,
-0.1380423605442047,
0.41930267214775085,
0.7166672945022583,
-0.00012068090290995315,
0.03627213090658188,
0.13725802302360535,
-0.18045161664485931,
-0.11882145702838898,
-0.5258253812789917,
-0.3079938590526581,
-0.13045790791511536,
-0.05789534002542496,
-0.1272687464952469,
-0.07237066328525543,
0.0013969573192298412,
0.13070066273212433,
-0.540708065032959,
0.40811997652053833,
0.10792341828346252,
0.10580647736787796,
0.2785435616970062,
0.05261334404349327,
-0.0774005800485611,
0.2205447256565094,
0.1630188226699829,
-0.3261563181877136,
0.009835810400545597,
0.34907785058021545,
0.1568445861339569,
0.08900868147611618,
0.30363720655441284,
0.0028809774667024612,
0.04164917767047882,
0.4682086706161499,
-0.025538217276334763,
0.16321100294589996,
-0.2858411371707916,
0.07400469481945038,
0.3027317225933075,
0.5413937568664551,
-0.17661064863204956,
-0.45512691140174866,
-0.16008535027503967,
-0.08777950704097748,
-0.24209469556808472,
0.35714656114578247,
0.2817613482475281,
-0.14291895925998688,
-0.00444406270980835,
-0.29093971848487854,
-0.19553446769714355,
-0.16509336233139038,
0.16105127334594727,
-0.06678036600351334,
0.16237078607082367,
-0.21621234714984894,
0.0020340941846370697,
0.3741413354873657,
0.04509244114160538,
0.21398013830184937,
-0.06313328444957733,
-0.1090405285358429,
0.11569757014513016,
-0.23183400928974152,
0.23713886737823486,
-0.14041462540626526,
-0.03139621764421463,
0.23789069056510925,
0.19722755253314972,
0.02315463498234749,
0.18336394429206848,
-0.020008634775877,
0.15905822813510895,
0.22425232827663422,
0.28444597125053406,
0.24085935950279236,
-0.07524441927671432,
0.012786298990249634,
0.18078351020812988,
0.006231542676687241,
-0.19931551814079285,
-0.15594324469566345,
-0.20164933800697327,
-0.13806436955928802,
-0.09382040798664093,
0.11763693392276764,
-0.3426389694213867,
-0.5313283801078796,
-0.07015475630760193,
-0.0944773256778717,
0.01074935495853424,
0.23567412793636322,
0.23898285627365112,
0.09938059002161026,
0.007657567039132118,
0.08231831341981888,
0.3665468096733093,
-0.31856176257133484,
-0.004581781569868326,
-0.2031150609254837,
0.20443935692310333,
-0.38865697383880615,
0.2901443541049957,
0.16030997037887573,
-0.08145610988140106,
0.37301406264305115,
-0.11436495929956436,
0.32601410150527954,
-0.36709561944007874,
0.042461544275283813,
-0.06470595300197601,
-0.03823506087064743,
0.08228536695241928,
0.23622068762779236,
0.16142435371875763,
0.10860645771026611,
-0.006718870252370834,
-0.1187782734632492,
0.14366307854652405,
-0.4055759012699127,
-0.127142533659935,
-0.07954470813274384,
0.0333358496427536,
-0.4040103554725647,
0.01824309676885605,
-0.6510798931121826,
-0.16833291947841644,
-0.270290344953537,
0.03322460129857063,
-0.025216974318027496,
0.04184110462665558,
-0.12896612286567688,
-0.07620850205421448,
0.28263339400291443,
0.4870436191558838,
-0.18085753917694092,
-0.035213224589824677,
-0.20905545353889465,
-0.10992155969142914,
0.08131897449493408,
0.15743198990821838,
-0.23717473447322845,
0.08770638704299927,
-0.44718265533447266,
0.3432360291481018,
0.26038068532943726,
-0.6826906204223633,
-0.29034996032714844,
0.3264542818069458,
-0.29409244656562805,
0.2417883425951004,
0.08077773451805115,
0.062106404453516006,
-0.2141915261745453,
-0.08567507565021515,
0.17384441196918488,
0.1770913451910019,
0.13799011707305908,
-0.09980206936597824,
-0.21311220526695251,
-0.16815654933452606,
-0.19047829508781433,
0.3321939706802368,
-0.01325279101729393,
-0.08989403396844864,
0.11145416647195816,
-0.018650904297828674,
0.10930922627449036,
-0.13748550415039062,
-0.12677784264087677,
0.5887781381607056,
0.07426443696022034,
-0.04015354812145233,
-0.18890948593616486,
0.06074831634759903,
-0.6912904977798462,
0.3157781958580017,
-0.2630387842655182,
-0.23664596676826477,
-0.08977678418159485,
0.10724331438541412,
-0.332446813583374,
-0.09075025469064713,
-0.3421749770641327,
-0.1773630827665329,
-0.032093845307826996,
0.1423979103565216,
-0.003951918333768845,
-0.1507631540298462,
-0.23739108443260193,
0.3739422559738159,
0.033805087208747864,
0.10042347759008408,
-0.5817268490791321,
0.26646947860717773,
0.18917270004749298,
-0.0366891510784626,
-0.00808095932006836,
0.029507074505090714,
0.24494031071662903,
-0.3018716871738434,
0.011071876622736454,
0.5150934457778931,
0.015789641067385674,
0.3034416139125824,
0.341436505317688,
0.06788328289985657,
0.2183353453874588,
-0.47469043731689453,
0.1706375777721405,
0.1261681169271469,
-0.05022555962204933,
-0.0008387044072151184,
-0.35325852036476135,
0.4718583822250366,
-0.19586490094661713,
-0.03601305931806564,
-0.07293465733528137,
-0.15648826956748962,
0.14721384644508362,
-0.11021605879068375,
-0.11814035475254059,
-0.102371945977211,
0.37900930643081665,
0.19717848300933838,
0.23839227855205536,
-0.16360996663570404,
-0.11515066027641296,
-0.13557112216949463,
-0.07877537608146667,
0.019171137362718582,
0.0012413188815116882,
0.031922806054353714,
-0.2628384232521057,
0.11231476813554764,
-0.03493611514568329,
0.4033973217010498,
0.41511648893356323,
0.1524638533592224,
0.023350533097982407,
-0.02732839621603489,
-0.041435789316892624,
-0.07648936659097672,
0.03186663240194321,
0.011048652231693268,
0.10943285375833511,
0.1649199277162552,
-0.3268107771873474,
-0.05432036891579628,
-0.3668631613254547,
-0.1084013432264328,
0.10832218825817108,
0.09499819576740265,
-0.35447871685028076,
0.025856276974081993,
-0.1741151064634323,
-0.3895709216594696,
-0.10250069200992584,
0.1597324013710022,
-0.21198244392871857,
-0.2974933981895447,
-0.1224297434091568,
0.5138400793075562,
0.2439613938331604,
-0.03323730081319809,
-0.3228711485862732,
0.055157870054244995,
-0.160892516374588,
-0.5349496006965637,
-0.22960633039474487,
0.2254985272884369,
-0.029847778379917145,
-0.037925854325294495,
0.3940604329109192,
0.17755085229873657,
0.06346892565488815,
-0.37519392371177673,
0.43787968158721924,
-0.5723699331283569,
-0.10138923674821854,
0.15361982583999634,
-0.17764590680599213,
0.4700736403465271,
-0.12343387305736542,
0.17391690611839294,
-0.4125458598136902,
0.07374569028615952,
0.26227042078971863,
-0.14359773695468903,
-0.0725756362080574,
-0.010824105702340603,
0.058266911655664444,
-0.17177130281925201,
0.10299937427043915,
-0.1550426185131073,
-0.08348778635263443,
-0.22855830192565918,
-0.06051945686340332,
0.026968758553266525,
0.003946758806705475,
0.14304153621196747,
0.012173577211797237,
0.05264125019311905,
0.002111733891069889,
-0.21690234541893005,
-0.2150435447692871,
-0.9191763401031494,
0.4821293354034424,
-0.15350425243377686,
-0.2848581373691559,
0.3715457320213318,
0.17307054996490479,
0.24635562300682068,
0.29146313667297363,
-0.4455309510231018,
-0.17484435439109802,
0.10034245252609253,
0.17669208347797394,
0.07965446263551712,
0.028543606400489807,
0.2198372781276703,
-0.20395556092262268,
0.07813793420791626,
-0.13408610224723816,
-0.3067450225353241,
-0.07130572944879532,
0.18570604920387268,
0.6754626631736755,
-0.09100980311632156,
0.015538055449724197,
0.03050893172621727,
0.48123931884765625,
0.08225610852241516,
0.21683762967586517,
0.41409364342689514,
-0.10537862032651901,
0.3446894884109497,
-0.08478192239999771,
-0.1683693379163742,
-0.2016599327325821,
-0.12537887692451477,
0.03459952399134636,
0.038845546543598175,
0.31978145241737366,
0.10899995267391205,
-0.2826605439186096,
0.252410352230072,
-0.35907191038131714,
-0.24997621774673462,
0.07911059260368347,
0.15070360898971558,
0.14391279220581055,
-0.027168631553649902,
0.29440250992774963,
-0.14952419698238373,
-0.14233091473579407,
0.04721689596772194,
0.34649357199668884,
0.4332351088523865,
0.2016245573759079,
-0.335711270570755,
0.2821696102619171,
-0.22684437036514282,
0.47849172353744507,
0.07362351566553116,
0.17186787724494934,
-0.09291036427021027,
0.041422516107559204,
0.19558928906917572,
-0.08779417723417282,
0.3791094422340393,
-0.08124440163373947,
0.15484964847564697,
0.009051451459527016,
-0.37388795614242554,
-0.32680946588516235,
0.023585882037878036,
0.040289077907800674,
0.1563163697719574,
-0.015381991863250732,
0.5480804443359375,
-0.2565804421901703,
-0.3150648772716522,
-0.20974859595298767,
0.13904835283756256,
-0.07422641664743423,
-0.13402928411960602,
-0.2735157608985901,
-0.5143997669219971,
-0.07183819264173508,
-0.2955917418003082,
0.19686952233314514,
0.2673867642879486,
0.3172524869441986,
0.22833605110645294,
-0.10423574596643448,
-0.04284091293811798,
0.37930285930633545,
0.004214130342006683,
0.6529353857040405,
-0.1743394136428833,
0.03549281135201454,
0.42523035407066345,
-0.11782395839691162,
0.25314873456954956,
0.6561621427536011,
0.11082060635089874,
-0.12971621751785278,
0.2663337290287018,
-0.05171675980091095,
-0.1295132339000702,
0.327347069978714,
0.02079654484987259,
-0.336239755153656,
-0.052603378891944885,
-0.02992130070924759,
-0.13729754090309143,
0.010417329147458076,
0.32011836767196655,
-0.036761172115802765,
-0.16708384454250336,
-0.06994568556547165,
0.532687783241272,
0.2755136489868164,
0.16868598759174347,
0.3096189498901367,
0.09793540835380554,
-0.15163713693618774,
-0.23301973938941956,
0.18752259016036987,
1.0363718271255493,
-0.1817588210105896,
0.1348758190870285,
0.23657646775245667,
0.14354640245437622,
-0.029546890407800674,
-0.2570064067840576,
0.33080947399139404,
-0.2593761682510376,
-0.3965882956981659,
-0.25396665930747986,
-0.14133737981319427,
0.24864408373832703,
0.09211301058530807,
0.31868523359298706,
0.29408982396125793,
0.14416438341140747,
0.010918155312538147,
0.0423499271273613,
-0.019219426438212395,
-0.2817929685115814,
-0.3109998404979706,
-0.5007690191268921,
0.06260722875595093,
-0.04109444469213486,
0.5804377794265747,
-0.16123822331428528,
-0.12794527411460876,
-0.18903648853302002,
-0.030286554247140884,
-0.037058088928461075,
0.30092793703079224,
-0.23470470309257507,
0.13499286770820618,
-0.04424090310931206,
-0.49342310428619385,
-0.14557112753391266,
0.44561704993247986,
0.0857495442032814,
-0.26371434330940247,
-0.2606283724308014,
0.3505087196826935,
-0.07311917096376419,
-0.19286870956420898,
0.017975905910134315,
-0.10910778492689133,
-0.14112743735313416,
-0.15127798914909363,
0.13498535752296448,
-0.08414306491613388,
-0.1423196792602539,
-0.3568328022956848,
-0.2701236307621002,
-0.06699660420417786,
-0.2799677848815918,
-0.04548509046435356,
-0.2646586298942566,
0.052381981164216995,
0.04304489120841026,
-0.02022930420935154,
0.04396834969520569,
0.15057405829429626,
-0.11828039586544037,
0.02647818997502327,
0.11949293315410614,
-0.4309360980987549,
-0.02790137380361557,
0.5984718799591064,
-0.31828704476356506,
-0.2164827287197113,
0.26974958181381226,
0.1841869354248047,
0.04735785722732544,
-0.1390713006258011,
0.3956482410430908,
0.37429073452949524,
-0.5853355526924133,
0.01721426658332348,
-0.1310364156961441,
0.20623086392879486,
0.09364914149045944,
0.28696221113204956,
0.4050014019012451,
-0.40550675988197327,
0.22945131361484528,
-0.4906136095523834,
-0.022132810205221176,
0.37665820121765137,
-0.030695166438817978,
0.2828478515148163,
-0.025744754821062088,
-0.2261562943458557,
0.1318860501050949,
-0.3666868507862091,
-0.2243918776512146,
0.39640212059020996,
-0.030991462990641594,
-0.05134144425392151,
0.2765413522720337,
0.10921940207481384,
0.5288570523262024,
0.06099763885140419,
0.05777905881404877,
0.21887542307376862,
-0.2673526704311371,
-0.0422089621424675,
0.07026900351047516,
0.1751425415277481,
0.031153704971075058,
-0.1865856945514679,
0.01880721002817154,
-0.14554592967033386,
-0.08651600778102875,
-0.024734746664762497,
0.1848335713148117,
0.38724756240844727,
0.0307888463139534,
-0.1474808156490326,
-0.10982871055603027,
0.16634833812713623,
-0.47092610597610474,
0.10619278252124786,
0.18980321288108826,
0.4924301505088806,
0.021268276497721672,
-0.023613087832927704,
-0.09518712013959885,
-0.08877962082624435,
-0.32380759716033936,
-0.08439581841230392,
0.28941628336906433,
0.2882061004638672,
0.3363097310066223,
-0.3605220317840576,
0.33391207456588745,
0.18498444557189941,
0.22671005129814148,
0.3662357032299042,
-0.28206485509872437,
0.11081928014755249,
0.031592078506946564,
0.12503878772258759,
-0.02692011557519436,
-0.11273492127656937,
0.1083495020866394,
-0.08160247653722763,
-0.10202348977327347,
0.38890340924263,
0.19933152198791504,
0.2852790951728821,
0.20681455731391907,
-0.022218402475118637,
0.7002965807914734,
-0.04790715128183365,
0.22965143620967865,
0.40153974294662476,
-0.08403918147087097,
0.14039252698421478,
0.25409188866615295,
0.3396310806274414,
0.11655483394861221,
0.40726423263549805,
-0.2131434977054596,
0.50999915599823,
-0.0704311802983284,
0.4083864092826843,
-0.3891383111476898,
-0.4278741180896759,
-0.22597207129001617,
0.2799413204193115,
0.17639577388763428,
0.18061169981956482,
-0.2744499444961548,
0.29718732833862305,
-0.49491751194000244,
-0.014748703688383102,
-0.4205293357372284,
0.1546149104833603,
-0.066889189183712,
0.018384063616394997,
-0.2635985314846039,
-0.3721785545349121,
-0.148756742477417,
0.048796433955430984,
-0.1414865404367447,
-0.15301810204982758,
-0.03988635540008545,
0.07943633943796158,
-0.04561971127986908,
0.08262836933135986,
-0.13652387261390686,
0.21788910031318665,
-0.04941921681165695,
-0.1700526773929596,
0.48474738001823425,
0.07236302644014359,
-0.014322422444820404,
0.21670256555080414,
0.2018682062625885,
0.18447190523147583,
0.06987650692462921,
-0.10044905543327332,
-0.1165880411863327,
0.20178234577178955,
-0.04673536866903305,
0.14672692120075226,
0.09841934591531754,
-0.019898608326911926,
0.04052046313881874,
0.29661664366722107,
0.16196224093437195,
-0.05738797038793564,
0.19735831022262573,
-0.07399588823318481,
0.3093755841255188,
-0.04607878997921944,
0.02770572155714035,
-0.40949320793151855,
0.15801522135734558,
-0.15108881890773773,
-0.2176138162612915,
-0.10510630905628204,
-0.1655072122812271,
0.09248816967010498,
-0.1326875537633896,
0.006266947835683823,
0.24565812945365906,
0.01795332506299019,
0.002549339085817337,
0.27279728651046753,
0.4918947219848633,
-0.26443248987197876,
-0.5227895975112915,
-0.2552603483200073,
-0.7857855558395386,
0.15712884068489075,
-0.03276119753718376,
-0.23474633693695068,
0.04561418294906616,
0.16287201642990112,
-0.0656047835946083,
0.21500985324382782,
0.30239224433898926,
-0.08052679896354675,
0.33300670981407166,
0.3020879328250885,
-0.284680038690567,
-0.03184632584452629,
0.21751132607460022,
0.0961918830871582,
-0.05528467148542404,
-0.29772287607192993,
-0.009798768907785416,
0.19656327366828918,
-0.07209809124469757,
-0.0004318617284297943,
0.0005190744996070862,
-0.30384522676467896,
-0.25959816575050354,
0.3466370701789856,
-0.12836231291294098,
0.23551131784915924,
0.006929006427526474,
-0.35531148314476013,
-0.2619481086730957,
-0.2585630416870117,
0.10818488150835037,
0.08175838738679886,
0.0971926897764206,
0.4771668016910553,
-0.08762823790311813,
0.12166443467140198,
-0.5112356543540955,
0.29543888568878174,
0.14253059029579163,
-0.001641037524677813,
-0.350488543510437,
0.10026189684867859,
-0.2921203672885895,
0.05132085829973221,
0.2885351777076721,
0.3758063316345215,
0.03828222677111626,
0.3379191756248474,
-0.14137613773345947,
-0.18742384016513824,
0.4719300866127014,
0.0057811858132481575,
-0.14038404822349548,
0.29020431637763977,
0.06007491424679756,
0.23427584767341614,
-0.14330114424228668,
-0.3426624536514282,
0.2560194134712219,
0.08228494226932526,
0.02434733882546425,
-0.005571071058511734,
-0.01575491763651371,
-0.2069305032491684,
-0.19931034743785858,
0.14982002973556519,
0.2356412410736084,
0.10808359831571579,
-0.16975080966949463,
0.1547187864780426,
0.04828638583421707
] |
https://github.com/huggingface/datasets/issues/412 | Unable to load XTREME dataset from disk | I was able to repro. Opening a PR to fix that.
Thanks for reporting this issue ! | Hi 🤗 team!
## Description of the problem
Following the [docs](https://huggingface.co/nlp/loading_datasets.html?highlight=xtreme#manually-downloading-files) I'm trying to load the `PAN-X.fr` dataset from the [XTREME](https://github.com/google-research/xtreme) benchmark.
I have manually downloaded the `AmazonPhotos.zip` file from [here](https://www.amazon.com/clouddrive/share/d3KGCRCIYwhKJF0H3eWA26hjg2ZCRhjpEQtDL70FSBN?_encoding=UTF8&%2AVersion%2A=1&%2Aentries%2A=0&mgh=1) and am running into a `FileNotFoundError` when I point to the location of the dataset.
As far as I can tell, the problem is that `AmazonPhotos.zip` decompresses to `panx_dataset` and `load_dataset()` is not looking in the correct path:
```
# path where load_dataset is looking for fr.tar.gz
/root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/
# path where it actually exists
/root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/panx_dataset/
```
## Steps to reproduce the problem
1. Manually download the XTREME benchmark from [here](https://www.amazon.com/clouddrive/share/d3KGCRCIYwhKJF0H3eWA26hjg2ZCRhjpEQtDL70FSBN?_encoding=UTF8&%2AVersion%2A=1&%2Aentries%2A=0&mgh=1)
2. Run the following code snippet
```python
from nlp import load_dataset
# AmazonPhotos.zip is in the root of the folder
dataset = load_dataset("xtreme", "PAN-X.fr", data_dir='./')
```
3. Here is the stack trace
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-4-26786bb5fa93> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.fr", data_dir='./')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
522 download_mode=download_mode,
523 ignore_verifications=ignore_verifications,
--> 524 save_infos=save_infos,
525 )
526
/usr/local/lib/python3.6/dist-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs)
430 verify_infos = not save_infos and not ignore_verifications
431 self._download_and_prepare(
--> 432 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
433 )
434 # Sync info
/usr/local/lib/python3.6/dist-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
464 split_dict = SplitDict(dataset_name=self.name)
465 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 466 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
467 # Checksums verification
468 if verify_infos:
/usr/local/lib/python3.6/dist-packages/nlp/datasets/xtreme/b8c2ed3583a7a7ac60b503576dfed3271ac86757628897e945bd329c43b8a746/xtreme.py in _split_generators(self, dl_manager)
725 panx_dl_dir = dl_manager.extract(panx_path)
726 lang = self.config.name.split(".")[1]
--> 727 lang_folder = dl_manager.extract(os.path.join(panx_dl_dir, lang + ".tar.gz"))
728 return [
729 nlp.SplitGenerator(
/usr/local/lib/python3.6/dist-packages/nlp/utils/download_manager.py in extract(self, path_or_paths)
196 """
197 return map_nested(
--> 198 lambda path: cached_path(path, extract_compressed_file=True, force_extract=False), path_or_paths,
199 )
200
/usr/local/lib/python3.6/dist-packages/nlp/utils/py_utils.py in map_nested(function, data_struct, dict_only, map_tuple)
170 return tuple(mapped)
171 # Singleton
--> 172 return function(data_struct)
173
174
/usr/local/lib/python3.6/dist-packages/nlp/utils/download_manager.py in <lambda>(path)
196 """
197 return map_nested(
--> 198 lambda path: cached_path(path, extract_compressed_file=True, force_extract=False), path_or_paths,
199 )
200
/usr/local/lib/python3.6/dist-packages/nlp/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
203 elif urlparse(url_or_filename).scheme == "":
204 # File, but it doesn't exist.
--> 205 raise FileNotFoundError("Local file {} doesn't exist".format(url_or_filename))
206 else:
207 # Something unknown
FileNotFoundError: Local file /root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/fr.tar.gz doesn't exist
```
## OS and hardware
```
- `nlp` version: 0.3.0
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
``` | 17 | Unable to load XTREME dataset from disk
Hi 🤗 team!
## Description of the problem
Following the [docs](https://huggingface.co/nlp/loading_datasets.html?highlight=xtreme#manually-downloading-files) I'm trying to load the `PAN-X.fr` dataset from the [XTREME](https://github.com/google-research/xtreme) benchmark.
I have manually downloaded the `AmazonPhotos.zip` file from [here](https://www.amazon.com/clouddrive/share/d3KGCRCIYwhKJF0H3eWA26hjg2ZCRhjpEQtDL70FSBN?_encoding=UTF8&%2AVersion%2A=1&%2Aentries%2A=0&mgh=1) and am running into a `FileNotFoundError` when I point to the location of the dataset.
As far as I can tell, the problem is that `AmazonPhotos.zip` decompresses to `panx_dataset` and `load_dataset()` is not looking in the correct path:
```
# path where load_dataset is looking for fr.tar.gz
/root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/
# path where it actually exists
/root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/panx_dataset/
```
## Steps to reproduce the problem
1. Manually download the XTREME benchmark from [here](https://www.amazon.com/clouddrive/share/d3KGCRCIYwhKJF0H3eWA26hjg2ZCRhjpEQtDL70FSBN?_encoding=UTF8&%2AVersion%2A=1&%2Aentries%2A=0&mgh=1)
2. Run the following code snippet
```python
from nlp import load_dataset
# AmazonPhotos.zip is in the root of the folder
dataset = load_dataset("xtreme", "PAN-X.fr", data_dir='./')
```
3. Here is the stack trace
```
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-4-26786bb5fa93> in <module>
----> 1 dataset = load_dataset("xtreme", "PAN-X.fr", data_dir='./')
/usr/local/lib/python3.6/dist-packages/nlp/load.py in load_dataset(path, name, version, data_dir, data_files, split, cache_dir, download_config, download_mode, ignore_verifications, save_infos, **config_kwargs)
522 download_mode=download_mode,
523 ignore_verifications=ignore_verifications,
--> 524 save_infos=save_infos,
525 )
526
/usr/local/lib/python3.6/dist-packages/nlp/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, save_infos, try_from_hf_gcs, dl_manager, **download_and_prepare_kwargs)
430 verify_infos = not save_infos and not ignore_verifications
431 self._download_and_prepare(
--> 432 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
433 )
434 # Sync info
/usr/local/lib/python3.6/dist-packages/nlp/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
464 split_dict = SplitDict(dataset_name=self.name)
465 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 466 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
467 # Checksums verification
468 if verify_infos:
/usr/local/lib/python3.6/dist-packages/nlp/datasets/xtreme/b8c2ed3583a7a7ac60b503576dfed3271ac86757628897e945bd329c43b8a746/xtreme.py in _split_generators(self, dl_manager)
725 panx_dl_dir = dl_manager.extract(panx_path)
726 lang = self.config.name.split(".")[1]
--> 727 lang_folder = dl_manager.extract(os.path.join(panx_dl_dir, lang + ".tar.gz"))
728 return [
729 nlp.SplitGenerator(
/usr/local/lib/python3.6/dist-packages/nlp/utils/download_manager.py in extract(self, path_or_paths)
196 """
197 return map_nested(
--> 198 lambda path: cached_path(path, extract_compressed_file=True, force_extract=False), path_or_paths,
199 )
200
/usr/local/lib/python3.6/dist-packages/nlp/utils/py_utils.py in map_nested(function, data_struct, dict_only, map_tuple)
170 return tuple(mapped)
171 # Singleton
--> 172 return function(data_struct)
173
174
/usr/local/lib/python3.6/dist-packages/nlp/utils/download_manager.py in <lambda>(path)
196 """
197 return map_nested(
--> 198 lambda path: cached_path(path, extract_compressed_file=True, force_extract=False), path_or_paths,
199 )
200
/usr/local/lib/python3.6/dist-packages/nlp/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
203 elif urlparse(url_or_filename).scheme == "":
204 # File, but it doesn't exist.
--> 205 raise FileNotFoundError("Local file {} doesn't exist".format(url_or_filename))
206 else:
207 # Something unknown
FileNotFoundError: Local file /root/.cache/huggingface/datasets/9b8c4f1578e45cb2539332c79738beb3b54afbcd842b079cabfd79e3ed6704f6/fr.tar.gz doesn't exist
```
## OS and hardware
```
- `nlp` version: 0.3.0
- Platform: Linux-4.15.0-72-generic-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.4.0 (True)
- Tensorflow version (GPU?): 2.1.0 (True)
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
```
I was able to repro. Opening a PR to fix that.
Thanks for reporting this issue ! | [
-0.2940945029258728,
-0.3835189640522003,
-0.002173054963350296,
0.6607130765914917,
0.14834526181221008,
0.1238797977566719,
-0.17308790981769562,
0.1085544228553772,
0.1807117760181427,
0.044096678495407104,
-0.14275239408016205,
-0.000344835571013391,
0.1383359134197235,
-0.02919137105345726,
0.16312231123447418,
-0.13893531262874603,
-0.005091160535812378,
-0.10926422476768494,
-0.04557351768016815,
0.0021920017898082733,
-0.3334752023220062,
0.3826161324977875,
-0.12323273718357086,
-0.01583632081747055,
-0.33437013626098633,
0.015269418247044086,
0.05252508074045181,
0.6103965044021606,
-0.2204437404870987,
-0.04907490685582161,
0.4548048973083496,
-0.1380423605442047,
0.41930267214775085,
0.7166672945022583,
-0.00012068090290995315,
0.03627213090658188,
0.13725802302360535,
-0.18045161664485931,
-0.11882145702838898,
-0.5258253812789917,
-0.3079938590526581,
-0.13045790791511536,
-0.05789534002542496,
-0.1272687464952469,
-0.07237066328525543,
0.0013969573192298412,
0.13070066273212433,
-0.540708065032959,
0.40811997652053833,
0.10792341828346252,
0.10580647736787796,
0.2785435616970062,
0.05261334404349327,
-0.0774005800485611,
0.2205447256565094,
0.1630188226699829,
-0.3261563181877136,
0.009835810400545597,
0.34907785058021545,
0.1568445861339569,
0.08900868147611618,
0.30363720655441284,
0.0028809774667024612,
0.04164917767047882,
0.4682086706161499,
-0.025538217276334763,
0.16321100294589996,
-0.2858411371707916,
0.07400469481945038,
0.3027317225933075,
0.5413937568664551,
-0.17661064863204956,
-0.45512691140174866,
-0.16008535027503967,
-0.08777950704097748,
-0.24209469556808472,
0.35714656114578247,
0.2817613482475281,
-0.14291895925998688,
-0.00444406270980835,
-0.29093971848487854,
-0.19553446769714355,
-0.16509336233139038,
0.16105127334594727,
-0.06678036600351334,
0.16237078607082367,
-0.21621234714984894,
0.0020340941846370697,
0.3741413354873657,
0.04509244114160538,
0.21398013830184937,
-0.06313328444957733,
-0.1090405285358429,
0.11569757014513016,
-0.23183400928974152,
0.23713886737823486,
-0.14041462540626526,
-0.03139621764421463,
0.23789069056510925,
0.19722755253314972,
0.02315463498234749,
0.18336394429206848,
-0.020008634775877,
0.15905822813510895,
0.22425232827663422,
0.28444597125053406,
0.24085935950279236,
-0.07524441927671432,
0.012786298990249634,
0.18078351020812988,
0.006231542676687241,
-0.19931551814079285,
-0.15594324469566345,
-0.20164933800697327,
-0.13806436955928802,
-0.09382040798664093,
0.11763693392276764,
-0.3426389694213867,
-0.5313283801078796,
-0.07015475630760193,
-0.0944773256778717,
0.01074935495853424,
0.23567412793636322,
0.23898285627365112,
0.09938059002161026,
0.007657567039132118,
0.08231831341981888,
0.3665468096733093,
-0.31856176257133484,
-0.004581781569868326,
-0.2031150609254837,
0.20443935692310333,
-0.38865697383880615,
0.2901443541049957,
0.16030997037887573,
-0.08145610988140106,
0.37301406264305115,
-0.11436495929956436,
0.32601410150527954,
-0.36709561944007874,
0.042461544275283813,
-0.06470595300197601,
-0.03823506087064743,
0.08228536695241928,
0.23622068762779236,
0.16142435371875763,
0.10860645771026611,
-0.006718870252370834,
-0.1187782734632492,
0.14366307854652405,
-0.4055759012699127,
-0.127142533659935,
-0.07954470813274384,
0.0333358496427536,
-0.4040103554725647,
0.01824309676885605,
-0.6510798931121826,
-0.16833291947841644,
-0.270290344953537,
0.03322460129857063,
-0.025216974318027496,
0.04184110462665558,
-0.12896612286567688,
-0.07620850205421448,
0.28263339400291443,
0.4870436191558838,
-0.18085753917694092,
-0.035213224589824677,
-0.20905545353889465,
-0.10992155969142914,
0.08131897449493408,
0.15743198990821838,
-0.23717473447322845,
0.08770638704299927,
-0.44718265533447266,
0.3432360291481018,
0.26038068532943726,
-0.6826906204223633,
-0.29034996032714844,
0.3264542818069458,
-0.29409244656562805,
0.2417883425951004,
0.08077773451805115,
0.062106404453516006,
-0.2141915261745453,
-0.08567507565021515,
0.17384441196918488,
0.1770913451910019,
0.13799011707305908,
-0.09980206936597824,
-0.21311220526695251,
-0.16815654933452606,
-0.19047829508781433,
0.3321939706802368,
-0.01325279101729393,
-0.08989403396844864,
0.11145416647195816,
-0.018650904297828674,
0.10930922627449036,
-0.13748550415039062,
-0.12677784264087677,
0.5887781381607056,
0.07426443696022034,
-0.04015354812145233,
-0.18890948593616486,
0.06074831634759903,
-0.6912904977798462,
0.3157781958580017,
-0.2630387842655182,
-0.23664596676826477,
-0.08977678418159485,
0.10724331438541412,
-0.332446813583374,
-0.09075025469064713,
-0.3421749770641327,
-0.1773630827665329,
-0.032093845307826996,
0.1423979103565216,
-0.003951918333768845,
-0.1507631540298462,
-0.23739108443260193,
0.3739422559738159,
0.033805087208747864,
0.10042347759008408,
-0.5817268490791321,
0.26646947860717773,
0.18917270004749298,
-0.0366891510784626,
-0.00808095932006836,
0.029507074505090714,
0.24494031071662903,
-0.3018716871738434,
0.011071876622736454,
0.5150934457778931,
0.015789641067385674,
0.3034416139125824,
0.341436505317688,
0.06788328289985657,
0.2183353453874588,
-0.47469043731689453,
0.1706375777721405,
0.1261681169271469,
-0.05022555962204933,
-0.0008387044072151184,
-0.35325852036476135,
0.4718583822250366,
-0.19586490094661713,
-0.03601305931806564,
-0.07293465733528137,
-0.15648826956748962,
0.14721384644508362,
-0.11021605879068375,
-0.11814035475254059,
-0.102371945977211,
0.37900930643081665,
0.19717848300933838,
0.23839227855205536,
-0.16360996663570404,
-0.11515066027641296,
-0.13557112216949463,
-0.07877537608146667,
0.019171137362718582,
0.0012413188815116882,
0.031922806054353714,
-0.2628384232521057,
0.11231476813554764,
-0.03493611514568329,
0.4033973217010498,
0.41511648893356323,
0.1524638533592224,
0.023350533097982407,
-0.02732839621603489,
-0.041435789316892624,
-0.07648936659097672,
0.03186663240194321,
0.011048652231693268,
0.10943285375833511,
0.1649199277162552,
-0.3268107771873474,
-0.05432036891579628,
-0.3668631613254547,
-0.1084013432264328,
0.10832218825817108,
0.09499819576740265,
-0.35447871685028076,
0.025856276974081993,
-0.1741151064634323,
-0.3895709216594696,
-0.10250069200992584,
0.1597324013710022,
-0.21198244392871857,
-0.2974933981895447,
-0.1224297434091568,
0.5138400793075562,
0.2439613938331604,
-0.03323730081319809,
-0.3228711485862732,
0.055157870054244995,
-0.160892516374588,
-0.5349496006965637,
-0.22960633039474487,
0.2254985272884369,
-0.029847778379917145,
-0.037925854325294495,
0.3940604329109192,
0.17755085229873657,
0.06346892565488815,
-0.37519392371177673,
0.43787968158721924,
-0.5723699331283569,
-0.10138923674821854,
0.15361982583999634,
-0.17764590680599213,
0.4700736403465271,
-0.12343387305736542,
0.17391690611839294,
-0.4125458598136902,
0.07374569028615952,
0.26227042078971863,
-0.14359773695468903,
-0.0725756362080574,
-0.010824105702340603,
0.058266911655664444,
-0.17177130281925201,
0.10299937427043915,
-0.1550426185131073,
-0.08348778635263443,
-0.22855830192565918,
-0.06051945686340332,
0.026968758553266525,
0.003946758806705475,
0.14304153621196747,
0.012173577211797237,
0.05264125019311905,
0.002111733891069889,
-0.21690234541893005,
-0.2150435447692871,
-0.9191763401031494,
0.4821293354034424,
-0.15350425243377686,
-0.2848581373691559,
0.3715457320213318,
0.17307054996490479,
0.24635562300682068,
0.29146313667297363,
-0.4455309510231018,
-0.17484435439109802,
0.10034245252609253,
0.17669208347797394,
0.07965446263551712,
0.028543606400489807,
0.2198372781276703,
-0.20395556092262268,
0.07813793420791626,
-0.13408610224723816,
-0.3067450225353241,
-0.07130572944879532,
0.18570604920387268,
0.6754626631736755,
-0.09100980311632156,
0.015538055449724197,
0.03050893172621727,
0.48123931884765625,
0.08225610852241516,
0.21683762967586517,
0.41409364342689514,
-0.10537862032651901,
0.3446894884109497,
-0.08478192239999771,
-0.1683693379163742,
-0.2016599327325821,
-0.12537887692451477,
0.03459952399134636,
0.038845546543598175,
0.31978145241737366,
0.10899995267391205,
-0.2826605439186096,
0.252410352230072,
-0.35907191038131714,
-0.24997621774673462,
0.07911059260368347,
0.15070360898971558,
0.14391279220581055,
-0.027168631553649902,
0.29440250992774963,
-0.14952419698238373,
-0.14233091473579407,
0.04721689596772194,
0.34649357199668884,
0.4332351088523865,
0.2016245573759079,
-0.335711270570755,
0.2821696102619171,
-0.22684437036514282,
0.47849172353744507,
0.07362351566553116,
0.17186787724494934,
-0.09291036427021027,
0.041422516107559204,
0.19558928906917572,
-0.08779417723417282,
0.3791094422340393,
-0.08124440163373947,
0.15484964847564697,
0.009051451459527016,
-0.37388795614242554,
-0.32680946588516235,
0.023585882037878036,
0.040289077907800674,
0.1563163697719574,
-0.015381991863250732,
0.5480804443359375,
-0.2565804421901703,
-0.3150648772716522,
-0.20974859595298767,
0.13904835283756256,
-0.07422641664743423,
-0.13402928411960602,
-0.2735157608985901,
-0.5143997669219971,
-0.07183819264173508,
-0.2955917418003082,
0.19686952233314514,
0.2673867642879486,
0.3172524869441986,
0.22833605110645294,
-0.10423574596643448,
-0.04284091293811798,
0.37930285930633545,
0.004214130342006683,
0.6529353857040405,
-0.1743394136428833,
0.03549281135201454,
0.42523035407066345,
-0.11782395839691162,
0.25314873456954956,
0.6561621427536011,
0.11082060635089874,
-0.12971621751785278,
0.2663337290287018,
-0.05171675980091095,
-0.1295132339000702,
0.327347069978714,
0.02079654484987259,
-0.336239755153656,
-0.052603378891944885,
-0.02992130070924759,
-0.13729754090309143,
0.010417329147458076,
0.32011836767196655,
-0.036761172115802765,
-0.16708384454250336,
-0.06994568556547165,
0.532687783241272,
0.2755136489868164,
0.16868598759174347,
0.3096189498901367,
0.09793540835380554,
-0.15163713693618774,
-0.23301973938941956,
0.18752259016036987,
1.0363718271255493,
-0.1817588210105896,
0.1348758190870285,
0.23657646775245667,
0.14354640245437622,
-0.029546890407800674,
-0.2570064067840576,
0.33080947399139404,
-0.2593761682510376,
-0.3965882956981659,
-0.25396665930747986,
-0.14133737981319427,
0.24864408373832703,
0.09211301058530807,
0.31868523359298706,
0.29408982396125793,
0.14416438341140747,
0.010918155312538147,
0.0423499271273613,
-0.019219426438212395,
-0.2817929685115814,
-0.3109998404979706,
-0.5007690191268921,
0.06260722875595093,
-0.04109444469213486,
0.5804377794265747,
-0.16123822331428528,
-0.12794527411460876,
-0.18903648853302002,
-0.030286554247140884,
-0.037058088928461075,
0.30092793703079224,
-0.23470470309257507,
0.13499286770820618,
-0.04424090310931206,
-0.49342310428619385,
-0.14557112753391266,
0.44561704993247986,
0.0857495442032814,
-0.26371434330940247,
-0.2606283724308014,
0.3505087196826935,
-0.07311917096376419,
-0.19286870956420898,
0.017975905910134315,
-0.10910778492689133,
-0.14112743735313416,
-0.15127798914909363,
0.13498535752296448,
-0.08414306491613388,
-0.1423196792602539,
-0.3568328022956848,
-0.2701236307621002,
-0.06699660420417786,
-0.2799677848815918,
-0.04548509046435356,
-0.2646586298942566,
0.052381981164216995,
0.04304489120841026,
-0.02022930420935154,
0.04396834969520569,
0.15057405829429626,
-0.11828039586544037,
0.02647818997502327,
0.11949293315410614,
-0.4309360980987549,
-0.02790137380361557,
0.5984718799591064,
-0.31828704476356506,
-0.2164827287197113,
0.26974958181381226,
0.1841869354248047,
0.04735785722732544,
-0.1390713006258011,
0.3956482410430908,
0.37429073452949524,
-0.5853355526924133,
0.01721426658332348,
-0.1310364156961441,
0.20623086392879486,
0.09364914149045944,
0.28696221113204956,
0.4050014019012451,
-0.40550675988197327,
0.22945131361484528,
-0.4906136095523834,
-0.022132810205221176,
0.37665820121765137,
-0.030695166438817978,
0.2828478515148163,
-0.025744754821062088,
-0.2261562943458557,
0.1318860501050949,
-0.3666868507862091,
-0.2243918776512146,
0.39640212059020996,
-0.030991462990641594,
-0.05134144425392151,
0.2765413522720337,
0.10921940207481384,
0.5288570523262024,
0.06099763885140419,
0.05777905881404877,
0.21887542307376862,
-0.2673526704311371,
-0.0422089621424675,
0.07026900351047516,
0.1751425415277481,
0.031153704971075058,
-0.1865856945514679,
0.01880721002817154,
-0.14554592967033386,
-0.08651600778102875,
-0.024734746664762497,
0.1848335713148117,
0.38724756240844727,
0.0307888463139534,
-0.1474808156490326,
-0.10982871055603027,
0.16634833812713623,
-0.47092610597610474,
0.10619278252124786,
0.18980321288108826,
0.4924301505088806,
0.021268276497721672,
-0.023613087832927704,
-0.09518712013959885,
-0.08877962082624435,
-0.32380759716033936,
-0.08439581841230392,
0.28941628336906433,
0.2882061004638672,
0.3363097310066223,
-0.3605220317840576,
0.33391207456588745,
0.18498444557189941,
0.22671005129814148,
0.3662357032299042,
-0.28206485509872437,
0.11081928014755249,
0.031592078506946564,
0.12503878772258759,
-0.02692011557519436,
-0.11273492127656937,
0.1083495020866394,
-0.08160247653722763,
-0.10202348977327347,
0.38890340924263,
0.19933152198791504,
0.2852790951728821,
0.20681455731391907,
-0.022218402475118637,
0.7002965807914734,
-0.04790715128183365,
0.22965143620967865,
0.40153974294662476,
-0.08403918147087097,
0.14039252698421478,
0.25409188866615295,
0.3396310806274414,
0.11655483394861221,
0.40726423263549805,
-0.2131434977054596,
0.50999915599823,
-0.0704311802983284,
0.4083864092826843,
-0.3891383111476898,
-0.4278741180896759,
-0.22597207129001617,
0.2799413204193115,
0.17639577388763428,
0.18061169981956482,
-0.2744499444961548,
0.29718732833862305,
-0.49491751194000244,
-0.014748703688383102,
-0.4205293357372284,
0.1546149104833603,
-0.066889189183712,
0.018384063616394997,
-0.2635985314846039,
-0.3721785545349121,
-0.148756742477417,
0.048796433955430984,
-0.1414865404367447,
-0.15301810204982758,
-0.03988635540008545,
0.07943633943796158,
-0.04561971127986908,
0.08262836933135986,
-0.13652387261390686,
0.21788910031318665,
-0.04941921681165695,
-0.1700526773929596,
0.48474738001823425,
0.07236302644014359,
-0.014322422444820404,
0.21670256555080414,
0.2018682062625885,
0.18447190523147583,
0.06987650692462921,
-0.10044905543327332,
-0.1165880411863327,
0.20178234577178955,
-0.04673536866903305,
0.14672692120075226,
0.09841934591531754,
-0.019898608326911926,
0.04052046313881874,
0.29661664366722107,
0.16196224093437195,
-0.05738797038793564,
0.19735831022262573,
-0.07399588823318481,
0.3093755841255188,
-0.04607878997921944,
0.02770572155714035,
-0.40949320793151855,
0.15801522135734558,
-0.15108881890773773,
-0.2176138162612915,
-0.10510630905628204,
-0.1655072122812271,
0.09248816967010498,
-0.1326875537633896,
0.006266947835683823,
0.24565812945365906,
0.01795332506299019,
0.002549339085817337,
0.27279728651046753,
0.4918947219848633,
-0.26443248987197876,
-0.5227895975112915,
-0.2552603483200073,
-0.7857855558395386,
0.15712884068489075,
-0.03276119753718376,
-0.23474633693695068,
0.04561418294906616,
0.16287201642990112,
-0.0656047835946083,
0.21500985324382782,
0.30239224433898926,
-0.08052679896354675,
0.33300670981407166,
0.3020879328250885,
-0.284680038690567,
-0.03184632584452629,
0.21751132607460022,
0.0961918830871582,
-0.05528467148542404,
-0.29772287607192993,
-0.009798768907785416,
0.19656327366828918,
-0.07209809124469757,
-0.0004318617284297943,
0.0005190744996070862,
-0.30384522676467896,
-0.25959816575050354,
0.3466370701789856,
-0.12836231291294098,
0.23551131784915924,
0.006929006427526474,
-0.35531148314476013,
-0.2619481086730957,
-0.2585630416870117,
0.10818488150835037,
0.08175838738679886,
0.0971926897764206,
0.4771668016910553,
-0.08762823790311813,
0.12166443467140198,
-0.5112356543540955,
0.29543888568878174,
0.14253059029579163,
-0.001641037524677813,
-0.350488543510437,
0.10026189684867859,
-0.2921203672885895,
0.05132085829973221,
0.2885351777076721,
0.3758063316345215,
0.03828222677111626,
0.3379191756248474,
-0.14137613773345947,
-0.18742384016513824,
0.4719300866127014,
0.0057811858132481575,
-0.14038404822349548,
0.29020431637763977,
0.06007491424679756,
0.23427584767341614,
-0.14330114424228668,
-0.3426624536514282,
0.2560194134712219,
0.08228494226932526,
0.02434733882546425,
-0.005571071058511734,
-0.01575491763651371,
-0.2069305032491684,
-0.19931034743785858,
0.14982002973556519,
0.2356412410736084,
0.10808359831571579,
-0.16975080966949463,
0.1547187864780426,
0.04828638583421707
] |
https://github.com/huggingface/datasets/issues/407 | MissingBeamOptions for Wikipedia 20200501.en | Fixed. Could you try again @mitchellgordon95 ?
It was due a file not being updated on S3.
We need to make sure all the datasets scripts get updated properly @julien-c | There may or may not be a regression for the pre-processed Wikipedia dataset. This was working fine 10 commits ago (without having Apache Beam available):
```
nlp.load_dataset('wikipedia', "20200501.en", split='train')
```
And now, having pulled master, I get:
```
Downloading and preparing dataset wikipedia/20200501.en (download: 16.99 GiB, generated: 17.07 GiB, total: 34.06 GiB) to /home/hltcoe/mgordon/.cache/huggingface/datasets/wikipedia/20200501.en/1.0.0/76b0b2747b679bb0ee7a1621e50e5a6378477add0c662668a324a5bc07d516dd...
Traceback (most recent call last):
File "scripts/download.py", line 11, in <module>
fire.Fire(download_pretrain)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 468, in _Fire
target=component.__name__)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "scripts/download.py", line 6, in download_pretrain
nlp.load_dataset('wikipedia', "20200501.en", split='train')
File "/exp/mgordon/nlp/src/nlp/load.py", line 534, in load_dataset
save_infos=save_infos,
File "/exp/mgordon/nlp/src/nlp/builder.py", line 460, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/exp/mgordon/nlp/src/nlp/builder.py", line 870, in _download_and_prepare
"\n\t`{}`".format(usage_example)
nlp.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, S
park, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.en', beam_runner='DirectRunner')`
``` | 30 | MissingBeamOptions for Wikipedia 20200501.en
There may or may not be a regression for the pre-processed Wikipedia dataset. This was working fine 10 commits ago (without having Apache Beam available):
```
nlp.load_dataset('wikipedia', "20200501.en", split='train')
```
And now, having pulled master, I get:
```
Downloading and preparing dataset wikipedia/20200501.en (download: 16.99 GiB, generated: 17.07 GiB, total: 34.06 GiB) to /home/hltcoe/mgordon/.cache/huggingface/datasets/wikipedia/20200501.en/1.0.0/76b0b2747b679bb0ee7a1621e50e5a6378477add0c662668a324a5bc07d516dd...
Traceback (most recent call last):
File "scripts/download.py", line 11, in <module>
fire.Fire(download_pretrain)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 468, in _Fire
target=component.__name__)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "scripts/download.py", line 6, in download_pretrain
nlp.load_dataset('wikipedia', "20200501.en", split='train')
File "/exp/mgordon/nlp/src/nlp/load.py", line 534, in load_dataset
save_infos=save_infos,
File "/exp/mgordon/nlp/src/nlp/builder.py", line 460, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/exp/mgordon/nlp/src/nlp/builder.py", line 870, in _download_and_prepare
"\n\t`{}`".format(usage_example)
nlp.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, S
park, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.en', beam_runner='DirectRunner')`
```
Fixed. Could you try again @mitchellgordon95 ?
It was due a file not being updated on S3.
We need to make sure all the datasets scripts get updated properly @julien-c | [
0.06661723554134369,
0.1266762614250183,
-0.020512016490101814,
-0.05423300713300705,
0.1996198147535324,
0.1526871621608734,
0.17997443675994873,
0.3656722903251648,
-0.022208523005247116,
-0.08142584562301636,
0.14893634617328644,
0.27538183331489563,
-0.09172669798135757,
-0.16842281818389893,
0.24347247183322906,
-0.3058639466762543,
0.14550401270389557,
0.12390241771936417,
-0.350199818611145,
-0.12868288159370422,
-0.0025929249823093414,
0.41258928179740906,
-0.21142876148223877,
-0.17825578153133392,
-0.5298817753791809,
0.06315398961305618,
-0.13151971995830536,
0.1428050696849823,
-0.04379219561815262,
-0.24998678267002106,
0.27792075276374817,
0.059302665293216705,
-0.0827241837978363,
0.1222381740808487,
-0.00011430805898271501,
0.07761082053184509,
0.6222483515739441,
-0.22390548884868622,
-0.568673849105835,
0.011977620422840118,
0.12999999523162842,
-0.3336534798145294,
0.3843441307544708,
-0.2550979554653168,
-0.2759361267089844,
-0.11812940984964371,
0.11411957442760468,
-0.05852991342544556,
0.3938058018684387,
-0.010936236940324306,
0.21362483501434326,
0.236056387424469,
0.29729852080345154,
-0.12914113700389862,
0.6020243763923645,
0.0674152821302414,
-0.16625653207302094,
0.07933598756790161,
-0.16387443244457245,
-0.056477196514606476,
-0.27104097604751587,
0.47979438304901123,
0.13871710002422333,
-0.13700087368488312,
0.5526379346847534,
-0.28162091970443726,
0.02262146770954132,
-0.2574211359024048,
0.01745387725532055,
0.1826508343219757,
0.49401676654815674,
-0.022983655333518982,
-0.10636819154024124,
-0.3746722340583801,
0.04460408166050911,
0.17872989177703857,
0.24808257818222046,
0.01720762997865677,
-0.15328927338123322,
-0.06720872223377228,
0.05121038854122162,
-0.22957929968833923,
-0.033292293548583984,
0.2887520492076874,
-0.06739373505115509,
0.4202921390533447,
-0.028905969113111496,
0.02147023379802704,
0.1668538749217987,
0.04962250962853432,
-0.3133726119995117,
0.03651891276240349,
0.0982152447104454,
0.2350158989429474,
-0.2165132313966751,
0.06369760632514954,
0.2868852913379669,
0.27052703499794006,
0.06201445311307907,
0.16959434747695923,
-0.2794000208377838,
0.1912725567817688,
0.020429376512765884,
-0.04709118604660034,
0.21989485621452332,
0.24082182347774506,
-0.04186610132455826,
-0.3533210754394531,
0.2516730725765228,
0.33642178773880005,
-0.06280180811882019,
0.1384650021791458,
0.19929178059101105,
-0.13873615860939026,
-0.2713558077812195,
0.13340230286121368,
0.009117241948843002,
-0.171702578663826,
0.10722789913415909,
0.05340840667486191,
-0.27779462933540344,
-0.14833328127861023,
-0.23782360553741455,
0.3198885917663574,
-0.02577412873506546,
0.40862444043159485,
0.20188206434249878,
0.11859261244535446,
-0.2835623323917389,
-0.2737652659416199,
-0.19572468101978302,
0.021234314888715744,
-0.4779030382633209,
0.025881953537464142,
0.3871370851993561,
-0.20970474183559418,
0.5165667533874512,
0.07585611194372177,
-0.036286137998104095,
0.059292398393154144,
-0.030197802931070328,
0.26442480087280273,
-0.07258359342813492,
0.18102504312992096,
0.1212262362241745,
0.2927808165550232,
0.2036834955215454,
0.019942238926887512,
-0.0530858151614666,
-0.32944455742836,
0.07048480957746506,
-0.2763868570327759,
-0.25971391797065735,
0.16771669685840607,
-0.31198829412460327,
0.15478941798210144,
0.047507394105196,
0.18722815811634064,
-0.025388099253177643,
-0.18220308423042297,
-0.09672654420137405,
-0.12297064065933228,
-0.05829158425331116,
-0.1482737809419632,
0.5051083564758301,
0.4033135175704956,
0.029887739568948746,
-0.3304649591445923,
-0.062176864594221115,
0.10411645472049713,
-0.10119827836751938,
0.011720916256308556,
-0.15648159384727478,
0.5247727632522583,
-0.2857876420021057,
-0.1501884162425995,
0.22431229054927826,
0.05196871981024742,
-0.2112267017364502,
0.14862994849681854,
-0.01265767216682434,
0.2708987891674042,
0.09758936613798141,
-0.052835870534181595,
-0.06728040426969528,
0.051800016313791275,
0.0919753760099411,
0.21846020221710205,
0.11319408565759659,
0.05293974280357361,
-0.3270508944988251,
-0.08778797835111618,
-0.007686752825975418,
0.07954870164394379,
0.3505394160747528,
-0.050555430352687836,
0.06359458714723587,
0.5883685350418091,
0.29808568954467773,
-0.13878320157527924,
0.22441412508487701,
0.4500521421432495,
-0.288942813873291,
0.13684716820716858,
0.24537228047847748,
-0.05986176058650017,
-0.46518754959106445,
0.12080060690641403,
-0.14018318057060242,
0.43679043650627136,
-0.18319357931613922,
-0.0022148340940475464,
-0.34671321511268616,
-0.13671468198299408,
-0.19681595265865326,
-0.5165297985076904,
0.20651297271251678,
0.20344708859920502,
-0.01857631281018257,
0.3046474754810333,
0.02543000504374504,
0.11620274186134338,
-0.04044201970100403,
0.05688859894871712,
-0.7796522974967957,
0.21452754735946655,
-0.3115580379962921,
-0.14111822843551636,
-0.01922932267189026,
0.30816635489463806,
0.11504586040973663,
-0.1935400366783142,
-0.12849485874176025,
0.22342264652252197,
-0.07892410457134247,
0.1341896951198578,
0.014886550605297089,
-0.05508652329444885,
0.2404274195432663,
-0.32110124826431274,
0.09848292917013168,
0.3122585713863373,
-0.04630575329065323,
-0.12724053859710693,
-0.30347856879234314,
0.2799139618873596,
0.018224380910396576,
0.32264450192451477,
0.03340388089418411,
0.09193240106105804,
0.15483668446540833,
0.07258298993110657,
-0.2331327646970749,
-0.20265327394008636,
0.3785170912742615,
0.21760639548301697,
0.13664217293262482,
-0.02352471835911274,
0.11496253311634064,
0.004569843411445618,
0.17190194129943848,
0.06607896089553833,
0.011260069906711578,
-0.08091572672128677,
-0.4510020613670349,
-0.2482423484325409,
0.3509308397769928,
-0.08578967303037643,
0.08168473839759827,
0.26454782485961914,
0.05249500274658203,
-0.016957318410277367,
-0.12286821752786636,
-0.2095777690410614,
0.19748762249946594,
0.114087775349617,
0.3243003785610199,
0.08764583617448807,
0.1405428797006607,
0.19754481315612793,
-0.3815246522426605,
0.19065937399864197,
-0.17746855318546295,
0.08713393658399582,
-0.28385457396507263,
-0.09798824787139893,
-0.3540603220462799,
-0.45146143436431885,
-0.10524049401283264,
0.2488122582435608,
-0.39741337299346924,
-0.587493896484375,
-0.05695802718400955,
0.18909941613674164,
-0.16337516903877258,
0.30572888255119324,
-0.029364319518208504,
-0.13036449253559113,
0.07419249415397644,
0.019792189821600914,
-0.3342638909816742,
-0.3922383785247803,
-0.20006754994392395,
0.08615155518054962,
0.10436002910137177,
-0.002149628708139062,
0.29014432430267334,
-0.0029739942401647568,
-0.02719186246395111,
-0.47316974401474,
-0.5758975148200989,
0.31619277596473694,
-0.28385239839553833,
0.1902676224708557,
0.17792898416519165,
0.08815772086381912,
-0.22568704187870026,
-0.05873342230916023,
0.4069473147392273,
-0.17011573910713196,
-0.15046748518943787,
-0.016159778460860252,
-0.127789705991745,
0.10100619494915009,
-0.19234152138233185,
-0.2217371165752411,
0.09537531435489655,
-0.3692913055419922,
0.015343829989433289,
0.09217259287834167,
-0.18127883970737457,
0.46910855174064636,
-0.10025002807378769,
-0.006287490017712116,
0.1005270779132843,
0.1722671389579773,
-0.24487963318824768,
0.083575040102005,
0.3416597247123718,
-0.3003976047039032,
-0.45680859684944153,
0.029567357152700424,
-0.1735531985759735,
0.05717073753476143,
0.3189319372177124,
-0.49978798627853394,
-0.04967694357037544,
0.09412211924791336,
0.002467866986989975,
-0.13542674481868744,
0.09424621611833572,
0.5044307112693787,
0.01142190769314766,
-0.016861943528056145,
-0.23263266682624817,
-0.15191146731376648,
-0.14951887726783752,
-0.31484904885292053,
0.42698490619659424,
-0.1923689842224121,
0.32358986139297485,
-0.0036710165441036224,
1.0987776517868042,
-0.03266241028904915,
0.06560371071100235,
0.42243868112564087,
0.09330399334430695,
0.4521009624004364,
-0.2759512662887573,
-0.2967284917831421,
0.232356458902359,
-0.14866459369659424,
0.3013337254524231,
0.39190030097961426,
-0.014732696115970612,
-0.2050674557685852,
-0.3653709590435028,
0.009143918752670288,
-0.20908591151237488,
-0.3228645920753479,
0.09011048078536987,
-0.31934913992881775,
0.2913958728313446,
0.166091188788414,
0.2335970401763916,
-0.0019365102052688599,
-0.15771633386611938,
0.2441106140613556,
0.1709195077419281,
0.20703718066215515,
0.06955192983150482,
0.1379287987947464,
-0.05609184131026268,
-0.4986759424209595,
0.040960125625133514,
0.018963562324643135,
-0.0030059609562158585,
0.038949865847826004,
-0.1371268630027771,
0.2020363211631775,
0.04538596048951149,
0.568949818611145,
-0.1977422535419464,
-0.02634398639202118,
0.2490573227405548,
0.03478088974952698,
-0.7107803821563721,
-0.02756584621965885,
-0.055074892938137054,
0.19478371739387512,
0.28621670603752136,
0.17843440175056458,
-0.3835534155368805,
-0.22349293529987335,
0.312583327293396,
0.06109954044222832,
-0.046982888132333755,
-0.02617477998137474,
-0.2916180491447449,
0.006638180464506149,
-0.420764297246933,
-0.1309034526348114,
-0.15496736764907837,
0.14559617638587952,
0.07744314521551132,
0.168731227517128,
0.08941423892974854,
0.028799090534448624,
-0.13350757956504822,
0.10535089671611786,
0.2781822681427002,
0.2502249479293823,
-0.11148537695407867,
0.14095991849899292,
0.652358889579773,
-0.33775773644447327,
0.2628803849220276,
0.19822849333286285,
0.04554979130625725,
0.21739178895950317,
-0.04006330296397209,
-0.05903645604848862,
0.3987356424331665,
0.0289376899600029,
-0.04876276105642319,
-0.20305262506008148,
0.009422115981578827,
0.09405337274074554,
0.2291371375322342,
0.3506719768047333,
-0.26904451847076416,
-0.13627716898918152,
-0.27368471026420593,
0.5236557722091675,
-0.01766940951347351,
-0.011371046304702759,
0.06929445266723633,
0.06701448559761047,
-0.3365369439125061,
0.3461083173751831,
0.24151793122291565,
0.7413404583930969,
0.03802761435508728,
0.3953186273574829,
0.20779255032539368,
0.30278778076171875,
0.8601723313331604,
-0.3698046803474426,
0.18975137174129486,
-0.1742737740278244,
0.2202000617980957,
0.041686661541461945,
0.03543253615498543,
-0.19204354286193848,
-0.13104578852653503,
-0.09684185683727264,
0.38440605998039246,
0.38484466075897217,
0.4188905656337738,
0.07600060105323792,
0.29991284012794495,
0.07616475969552994,
-0.320970743894577,
-0.19505318999290466,
0.1271081119775772,
-0.2076164036989212,
0.5865814685821533,
-0.37656980752944946,
-0.13086877763271332,
-0.21080102026462555,
-0.11665289849042892,
-0.25054940581321716,
0.18855169415473938,
-0.2747049927711487,
0.5069425106048584,
-0.1782882660627365,
-0.5959975123405457,
0.02124827355146408,
0.11277525126934052,
0.1474466621875763,
0.08831088244915009,
-0.40081673860549927,
0.36849743127822876,
-0.19408965110778809,
-0.2362574189901352,
-0.10856154561042786,
0.20971444249153137,
0.4952664077281952,
-0.1708497405052185,
-0.061677686870098114,
-0.061072565615177155,
-0.24166788160800934,
-0.275562584400177,
-0.29496973752975464,
-0.0613054484128952,
0.0028359517455101013,
0.10486917197704315,
-0.0824529379606247,
0.1037253811955452,
-0.014028651639819145,
-0.25724872946739197,
0.14875200390815735,
-0.11449131369590759,
0.037417877465486526,
-0.14607086777687073,
0.10244408249855042,
-0.10430796444416046,
-0.07039760053157806,
0.4993968605995178,
-0.0020990408957004547,
-0.12898480892181396,
0.5953382253646851,
0.3426308035850525,
-0.11988018453121185,
-0.11467266827821732,
-0.09025754034519196,
-0.13938289880752563,
-0.47222524881362915,
-0.1296563744544983,
0.012480691075325012,
-0.053000956773757935,
-0.05213325843214989,
0.24471983313560486,
0.18441180884838104,
-0.1626245081424713,
0.07808586955070496,
-0.1943455934524536,
-0.29546040296554565,
0.25473839044570923,
-0.3494718372821808,
-0.042039643973112106,
0.13901802897453308,
0.10136620700359344,
0.33330535888671875,
0.01481455098837614,
-0.29645639657974243,
-0.2154649943113327,
0.05402858555316925,
0.20080924034118652,
0.3083450198173523,
-0.11868876963853836,
-0.05005437135696411,
-0.1276494264602661,
0.12124443054199219,
0.021270722150802612,
-0.18948565423488617,
-0.23024022579193115,
-0.03156760334968567,
0.10426674038171768,
0.046717822551727295,
0.08656816929578781,
-0.07817645370960236,
0.11140942573547363,
-0.03712962195277214,
-0.2535359859466553,
0.0528712160885334,
-0.22818368673324585,
0.12405335903167725,
0.18231673538684845,
0.11915765702724457,
0.17635372281074524,
-0.12095270305871964,
0.015098372474312782,
0.048274047672748566,
0.1423758566379547,
0.05326336994767189,
0.012956757098436356,
0.22157983481884003,
-0.01179453730583191,
-0.16906367242336273,
0.10427528619766235,
-0.1855001002550125,
0.2854597270488739,
0.29269349575042725,
-0.07731728255748749,
-0.2990316152572632,
-0.02703644335269928,
0.2942750155925751,
-0.03260765224695206,
-0.05286190286278725,
-0.04857425391674042,
0.0103592649102211,
0.1906125396490097,
-0.2196088284254074,
0.26746079325675964,
0.5279884934425354,
0.11437278985977173,
0.0553782619535923,
-0.07021289318799973,
0.37434569001197815,
-0.024660956114530563,
0.33875006437301636,
0.17266085743904114,
0.12175212800502777,
-0.11830990016460419,
0.24264200031757355,
0.21661515533924103,
0.35108646750450134,
0.056690528988838196,
0.023912576958537102,
-0.030709732323884964,
0.23046183586120605,
0.23972301185131073,
0.12880851328372955,
0.2786288857460022,
-0.08822902292013168,
0.09754952788352966,
0.030913468450307846,
-0.06298413872718811,
0.1639130413532257,
0.3340349793434143,
0.1803874671459198,
0.1440526396036148,
-0.1291934698820114,
0.5687993168830872,
0.10019417852163315,
-0.3893401622772217,
-0.23458229005336761,
0.24023090302944183,
-0.11699613183736801,
0.07403211295604706,
-0.3172836899757385,
-0.18617786467075348,
-0.23919491469860077,
0.15746544301509857,
-0.10744017362594604,
-0.12326700985431671,
-0.05043019354343414,
0.21565605700016022,
-0.1900828331708908,
-0.47320321202278137,
0.21016991138458252,
-0.036338672041893005,
0.3338373601436615,
-0.07308246195316315,
0.1706402599811554,
-0.06163719296455383,
-0.2775772213935852,
-0.07984602451324463,
0.2877352833747864,
0.27863144874572754,
0.10541677474975586,
-0.39099231362342834,
-0.12188666313886642,
0.15569353103637695,
-0.06407475471496582,
-0.15276487171649933,
0.08428454399108887,
0.2606302499771118,
-0.1013033539056778,
0.26166337728500366,
0.09725290536880493,
-0.27409353852272034,
-0.12203696370124817,
0.09807531535625458,
-0.05502239987254143,
-0.12360051274299622,
0.013010315597057343,
-0.3181716501712799,
-0.19825759530067444,
-0.12009459733963013,
0.006536073982715607,
-0.4909360706806183,
0.161067932844162,
-0.008206889033317566,
0.19925367832183838,
-0.0541202649474144,
-0.29684877395629883,
0.08566572517156601,
-0.1368461549282074,
0.5973786115646362,
0.34244582056999207,
0.11179952323436737,
-0.14699995517730713,
-0.5365689992904663,
-0.5853416919708252,
0.20902952551841736,
-0.06299275159835815,
-0.04865802079439163,
0.07404325902462006,
0.19424262642860413,
0.23906075954437256,
0.16428065299987793,
0.0021002963185310364,
-0.17929531633853912,
0.08896075189113617,
-0.0662597268819809,
-0.46476203203201294,
-0.06454963982105255,
-0.1904880255460739,
-0.2589038014411926,
-0.12463225424289703,
0.024101316928863525,
-0.08804848790168762,
0.10577777773141861,
0.04879995435476303,
-0.019922465085983276,
-0.2640571594238281,
0.0616629458963871,
-0.0682748332619667,
0.29821932315826416,
-0.05190349370241165,
0.36819905042648315,
-0.10127106308937073,
-0.2203567773103714,
-0.29017284512519836,
-0.1561022847890854,
-0.04629898443818092,
0.3026445508003235,
-0.19343781471252441,
0.5210278034210205,
-0.008360354229807854,
-0.10020598769187927,
-0.3288208842277527,
0.6905269026756287,
0.1733904480934143,
0.11755654960870743,
-0.3923235535621643,
0.02390790544450283,
-0.31167325377464294,
0.16229861974716187,
0.09101807326078415,
0.34118491411209106,
-0.27147841453552246,
0.1741355061531067,
-0.46680426597595215,
-0.4499901235103607,
0.24987103044986725,
-0.4550747275352478,
-0.0926976352930069,
-0.004184187855571508,
0.11533915251493454,
-0.00473921000957489,
-0.05710089951753616,
-0.5571916699409485,
0.03359680622816086,
0.16372057795524597,
0.05430983006954193,
-0.09074921905994415,
0.1095086932182312,
-0.04558810591697693,
-0.1208941787481308,
-0.10418520867824554,
-0.17841392755508423,
0.11568892002105713,
-0.16955555975437164,
-0.0898754745721817,
-0.2151397466659546
] |
https://github.com/huggingface/datasets/issues/407 | MissingBeamOptions for Wikipedia 20200501.en | I found the same issue with almost any language other than English. (For English, it works). Will someone need to update the file on S3 again? | There may or may not be a regression for the pre-processed Wikipedia dataset. This was working fine 10 commits ago (without having Apache Beam available):
```
nlp.load_dataset('wikipedia', "20200501.en", split='train')
```
And now, having pulled master, I get:
```
Downloading and preparing dataset wikipedia/20200501.en (download: 16.99 GiB, generated: 17.07 GiB, total: 34.06 GiB) to /home/hltcoe/mgordon/.cache/huggingface/datasets/wikipedia/20200501.en/1.0.0/76b0b2747b679bb0ee7a1621e50e5a6378477add0c662668a324a5bc07d516dd...
Traceback (most recent call last):
File "scripts/download.py", line 11, in <module>
fire.Fire(download_pretrain)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 468, in _Fire
target=component.__name__)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "scripts/download.py", line 6, in download_pretrain
nlp.load_dataset('wikipedia', "20200501.en", split='train')
File "/exp/mgordon/nlp/src/nlp/load.py", line 534, in load_dataset
save_infos=save_infos,
File "/exp/mgordon/nlp/src/nlp/builder.py", line 460, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/exp/mgordon/nlp/src/nlp/builder.py", line 870, in _download_and_prepare
"\n\t`{}`".format(usage_example)
nlp.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, S
park, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.en', beam_runner='DirectRunner')`
``` | 26 | MissingBeamOptions for Wikipedia 20200501.en
There may or may not be a regression for the pre-processed Wikipedia dataset. This was working fine 10 commits ago (without having Apache Beam available):
```
nlp.load_dataset('wikipedia', "20200501.en", split='train')
```
And now, having pulled master, I get:
```
Downloading and preparing dataset wikipedia/20200501.en (download: 16.99 GiB, generated: 17.07 GiB, total: 34.06 GiB) to /home/hltcoe/mgordon/.cache/huggingface/datasets/wikipedia/20200501.en/1.0.0/76b0b2747b679bb0ee7a1621e50e5a6378477add0c662668a324a5bc07d516dd...
Traceback (most recent call last):
File "scripts/download.py", line 11, in <module>
fire.Fire(download_pretrain)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 468, in _Fire
target=component.__name__)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "scripts/download.py", line 6, in download_pretrain
nlp.load_dataset('wikipedia', "20200501.en", split='train')
File "/exp/mgordon/nlp/src/nlp/load.py", line 534, in load_dataset
save_infos=save_infos,
File "/exp/mgordon/nlp/src/nlp/builder.py", line 460, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/exp/mgordon/nlp/src/nlp/builder.py", line 870, in _download_and_prepare
"\n\t`{}`".format(usage_example)
nlp.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, S
park, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.en', beam_runner='DirectRunner')`
```
I found the same issue with almost any language other than English. (For English, it works). Will someone need to update the file on S3 again? | [
0.06661723554134369,
0.1266762614250183,
-0.020512016490101814,
-0.05423300713300705,
0.1996198147535324,
0.1526871621608734,
0.17997443675994873,
0.3656722903251648,
-0.022208523005247116,
-0.08142584562301636,
0.14893634617328644,
0.27538183331489563,
-0.09172669798135757,
-0.16842281818389893,
0.24347247183322906,
-0.3058639466762543,
0.14550401270389557,
0.12390241771936417,
-0.350199818611145,
-0.12868288159370422,
-0.0025929249823093414,
0.41258928179740906,
-0.21142876148223877,
-0.17825578153133392,
-0.5298817753791809,
0.06315398961305618,
-0.13151971995830536,
0.1428050696849823,
-0.04379219561815262,
-0.24998678267002106,
0.27792075276374817,
0.059302665293216705,
-0.0827241837978363,
0.1222381740808487,
-0.00011430805898271501,
0.07761082053184509,
0.6222483515739441,
-0.22390548884868622,
-0.568673849105835,
0.011977620422840118,
0.12999999523162842,
-0.3336534798145294,
0.3843441307544708,
-0.2550979554653168,
-0.2759361267089844,
-0.11812940984964371,
0.11411957442760468,
-0.05852991342544556,
0.3938058018684387,
-0.010936236940324306,
0.21362483501434326,
0.236056387424469,
0.29729852080345154,
-0.12914113700389862,
0.6020243763923645,
0.0674152821302414,
-0.16625653207302094,
0.07933598756790161,
-0.16387443244457245,
-0.056477196514606476,
-0.27104097604751587,
0.47979438304901123,
0.13871710002422333,
-0.13700087368488312,
0.5526379346847534,
-0.28162091970443726,
0.02262146770954132,
-0.2574211359024048,
0.01745387725532055,
0.1826508343219757,
0.49401676654815674,
-0.022983655333518982,
-0.10636819154024124,
-0.3746722340583801,
0.04460408166050911,
0.17872989177703857,
0.24808257818222046,
0.01720762997865677,
-0.15328927338123322,
-0.06720872223377228,
0.05121038854122162,
-0.22957929968833923,
-0.033292293548583984,
0.2887520492076874,
-0.06739373505115509,
0.4202921390533447,
-0.028905969113111496,
0.02147023379802704,
0.1668538749217987,
0.04962250962853432,
-0.3133726119995117,
0.03651891276240349,
0.0982152447104454,
0.2350158989429474,
-0.2165132313966751,
0.06369760632514954,
0.2868852913379669,
0.27052703499794006,
0.06201445311307907,
0.16959434747695923,
-0.2794000208377838,
0.1912725567817688,
0.020429376512765884,
-0.04709118604660034,
0.21989485621452332,
0.24082182347774506,
-0.04186610132455826,
-0.3533210754394531,
0.2516730725765228,
0.33642178773880005,
-0.06280180811882019,
0.1384650021791458,
0.19929178059101105,
-0.13873615860939026,
-0.2713558077812195,
0.13340230286121368,
0.009117241948843002,
-0.171702578663826,
0.10722789913415909,
0.05340840667486191,
-0.27779462933540344,
-0.14833328127861023,
-0.23782360553741455,
0.3198885917663574,
-0.02577412873506546,
0.40862444043159485,
0.20188206434249878,
0.11859261244535446,
-0.2835623323917389,
-0.2737652659416199,
-0.19572468101978302,
0.021234314888715744,
-0.4779030382633209,
0.025881953537464142,
0.3871370851993561,
-0.20970474183559418,
0.5165667533874512,
0.07585611194372177,
-0.036286137998104095,
0.059292398393154144,
-0.030197802931070328,
0.26442480087280273,
-0.07258359342813492,
0.18102504312992096,
0.1212262362241745,
0.2927808165550232,
0.2036834955215454,
0.019942238926887512,
-0.0530858151614666,
-0.32944455742836,
0.07048480957746506,
-0.2763868570327759,
-0.25971391797065735,
0.16771669685840607,
-0.31198829412460327,
0.15478941798210144,
0.047507394105196,
0.18722815811634064,
-0.025388099253177643,
-0.18220308423042297,
-0.09672654420137405,
-0.12297064065933228,
-0.05829158425331116,
-0.1482737809419632,
0.5051083564758301,
0.4033135175704956,
0.029887739568948746,
-0.3304649591445923,
-0.062176864594221115,
0.10411645472049713,
-0.10119827836751938,
0.011720916256308556,
-0.15648159384727478,
0.5247727632522583,
-0.2857876420021057,
-0.1501884162425995,
0.22431229054927826,
0.05196871981024742,
-0.2112267017364502,
0.14862994849681854,
-0.01265767216682434,
0.2708987891674042,
0.09758936613798141,
-0.052835870534181595,
-0.06728040426969528,
0.051800016313791275,
0.0919753760099411,
0.21846020221710205,
0.11319408565759659,
0.05293974280357361,
-0.3270508944988251,
-0.08778797835111618,
-0.007686752825975418,
0.07954870164394379,
0.3505394160747528,
-0.050555430352687836,
0.06359458714723587,
0.5883685350418091,
0.29808568954467773,
-0.13878320157527924,
0.22441412508487701,
0.4500521421432495,
-0.288942813873291,
0.13684716820716858,
0.24537228047847748,
-0.05986176058650017,
-0.46518754959106445,
0.12080060690641403,
-0.14018318057060242,
0.43679043650627136,
-0.18319357931613922,
-0.0022148340940475464,
-0.34671321511268616,
-0.13671468198299408,
-0.19681595265865326,
-0.5165297985076904,
0.20651297271251678,
0.20344708859920502,
-0.01857631281018257,
0.3046474754810333,
0.02543000504374504,
0.11620274186134338,
-0.04044201970100403,
0.05688859894871712,
-0.7796522974967957,
0.21452754735946655,
-0.3115580379962921,
-0.14111822843551636,
-0.01922932267189026,
0.30816635489463806,
0.11504586040973663,
-0.1935400366783142,
-0.12849485874176025,
0.22342264652252197,
-0.07892410457134247,
0.1341896951198578,
0.014886550605297089,
-0.05508652329444885,
0.2404274195432663,
-0.32110124826431274,
0.09848292917013168,
0.3122585713863373,
-0.04630575329065323,
-0.12724053859710693,
-0.30347856879234314,
0.2799139618873596,
0.018224380910396576,
0.32264450192451477,
0.03340388089418411,
0.09193240106105804,
0.15483668446540833,
0.07258298993110657,
-0.2331327646970749,
-0.20265327394008636,
0.3785170912742615,
0.21760639548301697,
0.13664217293262482,
-0.02352471835911274,
0.11496253311634064,
0.004569843411445618,
0.17190194129943848,
0.06607896089553833,
0.011260069906711578,
-0.08091572672128677,
-0.4510020613670349,
-0.2482423484325409,
0.3509308397769928,
-0.08578967303037643,
0.08168473839759827,
0.26454782485961914,
0.05249500274658203,
-0.016957318410277367,
-0.12286821752786636,
-0.2095777690410614,
0.19748762249946594,
0.114087775349617,
0.3243003785610199,
0.08764583617448807,
0.1405428797006607,
0.19754481315612793,
-0.3815246522426605,
0.19065937399864197,
-0.17746855318546295,
0.08713393658399582,
-0.28385457396507263,
-0.09798824787139893,
-0.3540603220462799,
-0.45146143436431885,
-0.10524049401283264,
0.2488122582435608,
-0.39741337299346924,
-0.587493896484375,
-0.05695802718400955,
0.18909941613674164,
-0.16337516903877258,
0.30572888255119324,
-0.029364319518208504,
-0.13036449253559113,
0.07419249415397644,
0.019792189821600914,
-0.3342638909816742,
-0.3922383785247803,
-0.20006754994392395,
0.08615155518054962,
0.10436002910137177,
-0.002149628708139062,
0.29014432430267334,
-0.0029739942401647568,
-0.02719186246395111,
-0.47316974401474,
-0.5758975148200989,
0.31619277596473694,
-0.28385239839553833,
0.1902676224708557,
0.17792898416519165,
0.08815772086381912,
-0.22568704187870026,
-0.05873342230916023,
0.4069473147392273,
-0.17011573910713196,
-0.15046748518943787,
-0.016159778460860252,
-0.127789705991745,
0.10100619494915009,
-0.19234152138233185,
-0.2217371165752411,
0.09537531435489655,
-0.3692913055419922,
0.015343829989433289,
0.09217259287834167,
-0.18127883970737457,
0.46910855174064636,
-0.10025002807378769,
-0.006287490017712116,
0.1005270779132843,
0.1722671389579773,
-0.24487963318824768,
0.083575040102005,
0.3416597247123718,
-0.3003976047039032,
-0.45680859684944153,
0.029567357152700424,
-0.1735531985759735,
0.05717073753476143,
0.3189319372177124,
-0.49978798627853394,
-0.04967694357037544,
0.09412211924791336,
0.002467866986989975,
-0.13542674481868744,
0.09424621611833572,
0.5044307112693787,
0.01142190769314766,
-0.016861943528056145,
-0.23263266682624817,
-0.15191146731376648,
-0.14951887726783752,
-0.31484904885292053,
0.42698490619659424,
-0.1923689842224121,
0.32358986139297485,
-0.0036710165441036224,
1.0987776517868042,
-0.03266241028904915,
0.06560371071100235,
0.42243868112564087,
0.09330399334430695,
0.4521009624004364,
-0.2759512662887573,
-0.2967284917831421,
0.232356458902359,
-0.14866459369659424,
0.3013337254524231,
0.39190030097961426,
-0.014732696115970612,
-0.2050674557685852,
-0.3653709590435028,
0.009143918752670288,
-0.20908591151237488,
-0.3228645920753479,
0.09011048078536987,
-0.31934913992881775,
0.2913958728313446,
0.166091188788414,
0.2335970401763916,
-0.0019365102052688599,
-0.15771633386611938,
0.2441106140613556,
0.1709195077419281,
0.20703718066215515,
0.06955192983150482,
0.1379287987947464,
-0.05609184131026268,
-0.4986759424209595,
0.040960125625133514,
0.018963562324643135,
-0.0030059609562158585,
0.038949865847826004,
-0.1371268630027771,
0.2020363211631775,
0.04538596048951149,
0.568949818611145,
-0.1977422535419464,
-0.02634398639202118,
0.2490573227405548,
0.03478088974952698,
-0.7107803821563721,
-0.02756584621965885,
-0.055074892938137054,
0.19478371739387512,
0.28621670603752136,
0.17843440175056458,
-0.3835534155368805,
-0.22349293529987335,
0.312583327293396,
0.06109954044222832,
-0.046982888132333755,
-0.02617477998137474,
-0.2916180491447449,
0.006638180464506149,
-0.420764297246933,
-0.1309034526348114,
-0.15496736764907837,
0.14559617638587952,
0.07744314521551132,
0.168731227517128,
0.08941423892974854,
0.028799090534448624,
-0.13350757956504822,
0.10535089671611786,
0.2781822681427002,
0.2502249479293823,
-0.11148537695407867,
0.14095991849899292,
0.652358889579773,
-0.33775773644447327,
0.2628803849220276,
0.19822849333286285,
0.04554979130625725,
0.21739178895950317,
-0.04006330296397209,
-0.05903645604848862,
0.3987356424331665,
0.0289376899600029,
-0.04876276105642319,
-0.20305262506008148,
0.009422115981578827,
0.09405337274074554,
0.2291371375322342,
0.3506719768047333,
-0.26904451847076416,
-0.13627716898918152,
-0.27368471026420593,
0.5236557722091675,
-0.01766940951347351,
-0.011371046304702759,
0.06929445266723633,
0.06701448559761047,
-0.3365369439125061,
0.3461083173751831,
0.24151793122291565,
0.7413404583930969,
0.03802761435508728,
0.3953186273574829,
0.20779255032539368,
0.30278778076171875,
0.8601723313331604,
-0.3698046803474426,
0.18975137174129486,
-0.1742737740278244,
0.2202000617980957,
0.041686661541461945,
0.03543253615498543,
-0.19204354286193848,
-0.13104578852653503,
-0.09684185683727264,
0.38440605998039246,
0.38484466075897217,
0.4188905656337738,
0.07600060105323792,
0.29991284012794495,
0.07616475969552994,
-0.320970743894577,
-0.19505318999290466,
0.1271081119775772,
-0.2076164036989212,
0.5865814685821533,
-0.37656980752944946,
-0.13086877763271332,
-0.21080102026462555,
-0.11665289849042892,
-0.25054940581321716,
0.18855169415473938,
-0.2747049927711487,
0.5069425106048584,
-0.1782882660627365,
-0.5959975123405457,
0.02124827355146408,
0.11277525126934052,
0.1474466621875763,
0.08831088244915009,
-0.40081673860549927,
0.36849743127822876,
-0.19408965110778809,
-0.2362574189901352,
-0.10856154561042786,
0.20971444249153137,
0.4952664077281952,
-0.1708497405052185,
-0.061677686870098114,
-0.061072565615177155,
-0.24166788160800934,
-0.275562584400177,
-0.29496973752975464,
-0.0613054484128952,
0.0028359517455101013,
0.10486917197704315,
-0.0824529379606247,
0.1037253811955452,
-0.014028651639819145,
-0.25724872946739197,
0.14875200390815735,
-0.11449131369590759,
0.037417877465486526,
-0.14607086777687073,
0.10244408249855042,
-0.10430796444416046,
-0.07039760053157806,
0.4993968605995178,
-0.0020990408957004547,
-0.12898480892181396,
0.5953382253646851,
0.3426308035850525,
-0.11988018453121185,
-0.11467266827821732,
-0.09025754034519196,
-0.13938289880752563,
-0.47222524881362915,
-0.1296563744544983,
0.012480691075325012,
-0.053000956773757935,
-0.05213325843214989,
0.24471983313560486,
0.18441180884838104,
-0.1626245081424713,
0.07808586955070496,
-0.1943455934524536,
-0.29546040296554565,
0.25473839044570923,
-0.3494718372821808,
-0.042039643973112106,
0.13901802897453308,
0.10136620700359344,
0.33330535888671875,
0.01481455098837614,
-0.29645639657974243,
-0.2154649943113327,
0.05402858555316925,
0.20080924034118652,
0.3083450198173523,
-0.11868876963853836,
-0.05005437135696411,
-0.1276494264602661,
0.12124443054199219,
0.021270722150802612,
-0.18948565423488617,
-0.23024022579193115,
-0.03156760334968567,
0.10426674038171768,
0.046717822551727295,
0.08656816929578781,
-0.07817645370960236,
0.11140942573547363,
-0.03712962195277214,
-0.2535359859466553,
0.0528712160885334,
-0.22818368673324585,
0.12405335903167725,
0.18231673538684845,
0.11915765702724457,
0.17635372281074524,
-0.12095270305871964,
0.015098372474312782,
0.048274047672748566,
0.1423758566379547,
0.05326336994767189,
0.012956757098436356,
0.22157983481884003,
-0.01179453730583191,
-0.16906367242336273,
0.10427528619766235,
-0.1855001002550125,
0.2854597270488739,
0.29269349575042725,
-0.07731728255748749,
-0.2990316152572632,
-0.02703644335269928,
0.2942750155925751,
-0.03260765224695206,
-0.05286190286278725,
-0.04857425391674042,
0.0103592649102211,
0.1906125396490097,
-0.2196088284254074,
0.26746079325675964,
0.5279884934425354,
0.11437278985977173,
0.0553782619535923,
-0.07021289318799973,
0.37434569001197815,
-0.024660956114530563,
0.33875006437301636,
0.17266085743904114,
0.12175212800502777,
-0.11830990016460419,
0.24264200031757355,
0.21661515533924103,
0.35108646750450134,
0.056690528988838196,
0.023912576958537102,
-0.030709732323884964,
0.23046183586120605,
0.23972301185131073,
0.12880851328372955,
0.2786288857460022,
-0.08822902292013168,
0.09754952788352966,
0.030913468450307846,
-0.06298413872718811,
0.1639130413532257,
0.3340349793434143,
0.1803874671459198,
0.1440526396036148,
-0.1291934698820114,
0.5687993168830872,
0.10019417852163315,
-0.3893401622772217,
-0.23458229005336761,
0.24023090302944183,
-0.11699613183736801,
0.07403211295604706,
-0.3172836899757385,
-0.18617786467075348,
-0.23919491469860077,
0.15746544301509857,
-0.10744017362594604,
-0.12326700985431671,
-0.05043019354343414,
0.21565605700016022,
-0.1900828331708908,
-0.47320321202278137,
0.21016991138458252,
-0.036338672041893005,
0.3338373601436615,
-0.07308246195316315,
0.1706402599811554,
-0.06163719296455383,
-0.2775772213935852,
-0.07984602451324463,
0.2877352833747864,
0.27863144874572754,
0.10541677474975586,
-0.39099231362342834,
-0.12188666313886642,
0.15569353103637695,
-0.06407475471496582,
-0.15276487171649933,
0.08428454399108887,
0.2606302499771118,
-0.1013033539056778,
0.26166337728500366,
0.09725290536880493,
-0.27409353852272034,
-0.12203696370124817,
0.09807531535625458,
-0.05502239987254143,
-0.12360051274299622,
0.013010315597057343,
-0.3181716501712799,
-0.19825759530067444,
-0.12009459733963013,
0.006536073982715607,
-0.4909360706806183,
0.161067932844162,
-0.008206889033317566,
0.19925367832183838,
-0.0541202649474144,
-0.29684877395629883,
0.08566572517156601,
-0.1368461549282074,
0.5973786115646362,
0.34244582056999207,
0.11179952323436737,
-0.14699995517730713,
-0.5365689992904663,
-0.5853416919708252,
0.20902952551841736,
-0.06299275159835815,
-0.04865802079439163,
0.07404325902462006,
0.19424262642860413,
0.23906075954437256,
0.16428065299987793,
0.0021002963185310364,
-0.17929531633853912,
0.08896075189113617,
-0.0662597268819809,
-0.46476203203201294,
-0.06454963982105255,
-0.1904880255460739,
-0.2589038014411926,
-0.12463225424289703,
0.024101316928863525,
-0.08804848790168762,
0.10577777773141861,
0.04879995435476303,
-0.019922465085983276,
-0.2640571594238281,
0.0616629458963871,
-0.0682748332619667,
0.29821932315826416,
-0.05190349370241165,
0.36819905042648315,
-0.10127106308937073,
-0.2203567773103714,
-0.29017284512519836,
-0.1561022847890854,
-0.04629898443818092,
0.3026445508003235,
-0.19343781471252441,
0.5210278034210205,
-0.008360354229807854,
-0.10020598769187927,
-0.3288208842277527,
0.6905269026756287,
0.1733904480934143,
0.11755654960870743,
-0.3923235535621643,
0.02390790544450283,
-0.31167325377464294,
0.16229861974716187,
0.09101807326078415,
0.34118491411209106,
-0.27147841453552246,
0.1741355061531067,
-0.46680426597595215,
-0.4499901235103607,
0.24987103044986725,
-0.4550747275352478,
-0.0926976352930069,
-0.004184187855571508,
0.11533915251493454,
-0.00473921000957489,
-0.05710089951753616,
-0.5571916699409485,
0.03359680622816086,
0.16372057795524597,
0.05430983006954193,
-0.09074921905994415,
0.1095086932182312,
-0.04558810591697693,
-0.1208941787481308,
-0.10418520867824554,
-0.17841392755508423,
0.11568892002105713,
-0.16955555975437164,
-0.0898754745721817,
-0.2151397466659546
] |
https://github.com/huggingface/datasets/issues/407 | MissingBeamOptions for Wikipedia 20200501.en | This is because only some languages are already preprocessed (en, de, fr, it) and stored on our google storage.
We plan to have a systematic way to preprocess more wikipedia languages in the future.
For the other languages you have to process them on your side using apache beam. That's why the lib asks for a Beam runner. | There may or may not be a regression for the pre-processed Wikipedia dataset. This was working fine 10 commits ago (without having Apache Beam available):
```
nlp.load_dataset('wikipedia', "20200501.en", split='train')
```
And now, having pulled master, I get:
```
Downloading and preparing dataset wikipedia/20200501.en (download: 16.99 GiB, generated: 17.07 GiB, total: 34.06 GiB) to /home/hltcoe/mgordon/.cache/huggingface/datasets/wikipedia/20200501.en/1.0.0/76b0b2747b679bb0ee7a1621e50e5a6378477add0c662668a324a5bc07d516dd...
Traceback (most recent call last):
File "scripts/download.py", line 11, in <module>
fire.Fire(download_pretrain)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 468, in _Fire
target=component.__name__)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "scripts/download.py", line 6, in download_pretrain
nlp.load_dataset('wikipedia', "20200501.en", split='train')
File "/exp/mgordon/nlp/src/nlp/load.py", line 534, in load_dataset
save_infos=save_infos,
File "/exp/mgordon/nlp/src/nlp/builder.py", line 460, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/exp/mgordon/nlp/src/nlp/builder.py", line 870, in _download_and_prepare
"\n\t`{}`".format(usage_example)
nlp.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, S
park, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.en', beam_runner='DirectRunner')`
``` | 58 | MissingBeamOptions for Wikipedia 20200501.en
There may or may not be a regression for the pre-processed Wikipedia dataset. This was working fine 10 commits ago (without having Apache Beam available):
```
nlp.load_dataset('wikipedia', "20200501.en", split='train')
```
And now, having pulled master, I get:
```
Downloading and preparing dataset wikipedia/20200501.en (download: 16.99 GiB, generated: 17.07 GiB, total: 34.06 GiB) to /home/hltcoe/mgordon/.cache/huggingface/datasets/wikipedia/20200501.en/1.0.0/76b0b2747b679bb0ee7a1621e50e5a6378477add0c662668a324a5bc07d516dd...
Traceback (most recent call last):
File "scripts/download.py", line 11, in <module>
fire.Fire(download_pretrain)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 138, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 468, in _Fire
target=component.__name__)
File "/home/hltcoe/mgordon/.conda/envs/huggingface/lib/python3.6/site-packages/fire/core.py", line 672, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "scripts/download.py", line 6, in download_pretrain
nlp.load_dataset('wikipedia', "20200501.en", split='train')
File "/exp/mgordon/nlp/src/nlp/load.py", line 534, in load_dataset
save_infos=save_infos,
File "/exp/mgordon/nlp/src/nlp/builder.py", line 460, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/exp/mgordon/nlp/src/nlp/builder.py", line 870, in _download_and_prepare
"\n\t`{}`".format(usage_example)
nlp.builder.MissingBeamOptions: Trying to generate a dataset using Apache Beam, yet no Beam Runner or PipelineOptions() has been provided in `load_dataset` or in the builder arguments. For big datasets it has to run on large-scale data processing tools like Dataflow, S
park, etc. More information about Apache Beam runners at https://beam.apache.org/documentation/runners/capability-matrix/
If you really want to run it locally because you feel like the Dataset is small enough, you can use the local beam runner called `DirectRunner` (you may run out of memory).
Example of usage:
`load_dataset('wikipedia', '20200501.en', beam_runner='DirectRunner')`
```
This is because only some languages are already preprocessed (en, de, fr, it) and stored on our google storage.
We plan to have a systematic way to preprocess more wikipedia languages in the future.
For the other languages you have to process them on your side using apache beam. That's why the lib asks for a Beam runner. | [
0.06661723554134369,
0.1266762614250183,
-0.020512016490101814,
-0.05423300713300705,
0.1996198147535324,
0.1526871621608734,
0.17997443675994873,
0.3656722903251648,
-0.022208523005247116,
-0.08142584562301636,
0.14893634617328644,
0.27538183331489563,
-0.09172669798135757,
-0.16842281818389893,
0.24347247183322906,
-0.3058639466762543,
0.14550401270389557,
0.12390241771936417,
-0.350199818611145,
-0.12868288159370422,
-0.0025929249823093414,
0.41258928179740906,
-0.21142876148223877,
-0.17825578153133392,
-0.5298817753791809,
0.06315398961305618,
-0.13151971995830536,
0.1428050696849823,
-0.04379219561815262,
-0.24998678267002106,
0.27792075276374817,
0.059302665293216705,
-0.0827241837978363,
0.1222381740808487,
-0.00011430805898271501,
0.07761082053184509,
0.6222483515739441,
-0.22390548884868622,
-0.568673849105835,
0.011977620422840118,
0.12999999523162842,
-0.3336534798145294,
0.3843441307544708,
-0.2550979554653168,
-0.2759361267089844,
-0.11812940984964371,
0.11411957442760468,
-0.05852991342544556,
0.3938058018684387,
-0.010936236940324306,
0.21362483501434326,
0.236056387424469,
0.29729852080345154,
-0.12914113700389862,
0.6020243763923645,
0.0674152821302414,
-0.16625653207302094,
0.07933598756790161,
-0.16387443244457245,
-0.056477196514606476,
-0.27104097604751587,
0.47979438304901123,
0.13871710002422333,
-0.13700087368488312,
0.5526379346847534,
-0.28162091970443726,
0.02262146770954132,
-0.2574211359024048,
0.01745387725532055,
0.1826508343219757,
0.49401676654815674,
-0.022983655333518982,
-0.10636819154024124,
-0.3746722340583801,
0.04460408166050911,
0.17872989177703857,
0.24808257818222046,
0.01720762997865677,
-0.15328927338123322,
-0.06720872223377228,
0.05121038854122162,
-0.22957929968833923,
-0.033292293548583984,
0.2887520492076874,
-0.06739373505115509,
0.4202921390533447,
-0.028905969113111496,
0.02147023379802704,
0.1668538749217987,
0.04962250962853432,
-0.3133726119995117,
0.03651891276240349,
0.0982152447104454,
0.2350158989429474,
-0.2165132313966751,
0.06369760632514954,
0.2868852913379669,
0.27052703499794006,
0.06201445311307907,
0.16959434747695923,
-0.2794000208377838,
0.1912725567817688,
0.020429376512765884,
-0.04709118604660034,
0.21989485621452332,
0.24082182347774506,
-0.04186610132455826,
-0.3533210754394531,
0.2516730725765228,
0.33642178773880005,
-0.06280180811882019,
0.1384650021791458,
0.19929178059101105,
-0.13873615860939026,
-0.2713558077812195,
0.13340230286121368,
0.009117241948843002,
-0.171702578663826,
0.10722789913415909,
0.05340840667486191,
-0.27779462933540344,
-0.14833328127861023,
-0.23782360553741455,
0.3198885917663574,
-0.02577412873506546,
0.40862444043159485,
0.20188206434249878,
0.11859261244535446,
-0.2835623323917389,
-0.2737652659416199,
-0.19572468101978302,
0.021234314888715744,
-0.4779030382633209,
0.025881953537464142,
0.3871370851993561,
-0.20970474183559418,
0.5165667533874512,
0.07585611194372177,
-0.036286137998104095,
0.059292398393154144,
-0.030197802931070328,
0.26442480087280273,
-0.07258359342813492,
0.18102504312992096,
0.1212262362241745,
0.2927808165550232,
0.2036834955215454,
0.019942238926887512,
-0.0530858151614666,
-0.32944455742836,
0.07048480957746506,
-0.2763868570327759,
-0.25971391797065735,
0.16771669685840607,
-0.31198829412460327,
0.15478941798210144,
0.047507394105196,
0.18722815811634064,
-0.025388099253177643,
-0.18220308423042297,
-0.09672654420137405,
-0.12297064065933228,
-0.05829158425331116,
-0.1482737809419632,
0.5051083564758301,
0.4033135175704956,
0.029887739568948746,
-0.3304649591445923,
-0.062176864594221115,
0.10411645472049713,
-0.10119827836751938,
0.011720916256308556,
-0.15648159384727478,
0.5247727632522583,
-0.2857876420021057,
-0.1501884162425995,
0.22431229054927826,
0.05196871981024742,
-0.2112267017364502,
0.14862994849681854,
-0.01265767216682434,
0.2708987891674042,
0.09758936613798141,
-0.052835870534181595,
-0.06728040426969528,
0.051800016313791275,
0.0919753760099411,
0.21846020221710205,
0.11319408565759659,
0.05293974280357361,
-0.3270508944988251,
-0.08778797835111618,
-0.007686752825975418,
0.07954870164394379,
0.3505394160747528,
-0.050555430352687836,
0.06359458714723587,
0.5883685350418091,
0.29808568954467773,
-0.13878320157527924,
0.22441412508487701,
0.4500521421432495,
-0.288942813873291,
0.13684716820716858,
0.24537228047847748,
-0.05986176058650017,
-0.46518754959106445,
0.12080060690641403,
-0.14018318057060242,
0.43679043650627136,
-0.18319357931613922,
-0.0022148340940475464,
-0.34671321511268616,
-0.13671468198299408,
-0.19681595265865326,
-0.5165297985076904,
0.20651297271251678,
0.20344708859920502,
-0.01857631281018257,
0.3046474754810333,
0.02543000504374504,
0.11620274186134338,
-0.04044201970100403,
0.05688859894871712,
-0.7796522974967957,
0.21452754735946655,
-0.3115580379962921,
-0.14111822843551636,
-0.01922932267189026,
0.30816635489463806,
0.11504586040973663,
-0.1935400366783142,
-0.12849485874176025,
0.22342264652252197,
-0.07892410457134247,
0.1341896951198578,
0.014886550605297089,
-0.05508652329444885,
0.2404274195432663,
-0.32110124826431274,
0.09848292917013168,
0.3122585713863373,
-0.04630575329065323,
-0.12724053859710693,
-0.30347856879234314,
0.2799139618873596,
0.018224380910396576,
0.32264450192451477,
0.03340388089418411,
0.09193240106105804,
0.15483668446540833,
0.07258298993110657,
-0.2331327646970749,
-0.20265327394008636,
0.3785170912742615,
0.21760639548301697,
0.13664217293262482,
-0.02352471835911274,
0.11496253311634064,
0.004569843411445618,
0.17190194129943848,
0.06607896089553833,
0.011260069906711578,
-0.08091572672128677,
-0.4510020613670349,
-0.2482423484325409,
0.3509308397769928,
-0.08578967303037643,
0.08168473839759827,
0.26454782485961914,
0.05249500274658203,
-0.016957318410277367,
-0.12286821752786636,
-0.2095777690410614,
0.19748762249946594,
0.114087775349617,
0.3243003785610199,
0.08764583617448807,
0.1405428797006607,
0.19754481315612793,
-0.3815246522426605,
0.19065937399864197,
-0.17746855318546295,
0.08713393658399582,
-0.28385457396507263,
-0.09798824787139893,
-0.3540603220462799,
-0.45146143436431885,
-0.10524049401283264,
0.2488122582435608,
-0.39741337299346924,
-0.587493896484375,
-0.05695802718400955,
0.18909941613674164,
-0.16337516903877258,
0.30572888255119324,
-0.029364319518208504,
-0.13036449253559113,
0.07419249415397644,
0.019792189821600914,
-0.3342638909816742,
-0.3922383785247803,
-0.20006754994392395,
0.08615155518054962,
0.10436002910137177,
-0.002149628708139062,
0.29014432430267334,
-0.0029739942401647568,
-0.02719186246395111,
-0.47316974401474,
-0.5758975148200989,
0.31619277596473694,
-0.28385239839553833,
0.1902676224708557,
0.17792898416519165,
0.08815772086381912,
-0.22568704187870026,
-0.05873342230916023,
0.4069473147392273,
-0.17011573910713196,
-0.15046748518943787,
-0.016159778460860252,
-0.127789705991745,
0.10100619494915009,
-0.19234152138233185,
-0.2217371165752411,
0.09537531435489655,
-0.3692913055419922,
0.015343829989433289,
0.09217259287834167,
-0.18127883970737457,
0.46910855174064636,
-0.10025002807378769,
-0.006287490017712116,
0.1005270779132843,
0.1722671389579773,
-0.24487963318824768,
0.083575040102005,
0.3416597247123718,
-0.3003976047039032,
-0.45680859684944153,
0.029567357152700424,
-0.1735531985759735,
0.05717073753476143,
0.3189319372177124,
-0.49978798627853394,
-0.04967694357037544,
0.09412211924791336,
0.002467866986989975,
-0.13542674481868744,
0.09424621611833572,
0.5044307112693787,
0.01142190769314766,
-0.016861943528056145,
-0.23263266682624817,
-0.15191146731376648,
-0.14951887726783752,
-0.31484904885292053,
0.42698490619659424,
-0.1923689842224121,
0.32358986139297485,
-0.0036710165441036224,
1.0987776517868042,
-0.03266241028904915,
0.06560371071100235,
0.42243868112564087,
0.09330399334430695,
0.4521009624004364,
-0.2759512662887573,
-0.2967284917831421,
0.232356458902359,
-0.14866459369659424,
0.3013337254524231,
0.39190030097961426,
-0.014732696115970612,
-0.2050674557685852,
-0.3653709590435028,
0.009143918752670288,
-0.20908591151237488,
-0.3228645920753479,
0.09011048078536987,
-0.31934913992881775,
0.2913958728313446,
0.166091188788414,
0.2335970401763916,
-0.0019365102052688599,
-0.15771633386611938,
0.2441106140613556,
0.1709195077419281,
0.20703718066215515,
0.06955192983150482,
0.1379287987947464,
-0.05609184131026268,
-0.4986759424209595,
0.040960125625133514,
0.018963562324643135,
-0.0030059609562158585,
0.038949865847826004,
-0.1371268630027771,
0.2020363211631775,
0.04538596048951149,
0.568949818611145,
-0.1977422535419464,
-0.02634398639202118,
0.2490573227405548,
0.03478088974952698,
-0.7107803821563721,
-0.02756584621965885,
-0.055074892938137054,
0.19478371739387512,
0.28621670603752136,
0.17843440175056458,
-0.3835534155368805,
-0.22349293529987335,
0.312583327293396,
0.06109954044222832,
-0.046982888132333755,
-0.02617477998137474,
-0.2916180491447449,
0.006638180464506149,
-0.420764297246933,
-0.1309034526348114,
-0.15496736764907837,
0.14559617638587952,
0.07744314521551132,
0.168731227517128,
0.08941423892974854,
0.028799090534448624,
-0.13350757956504822,
0.10535089671611786,
0.2781822681427002,
0.2502249479293823,
-0.11148537695407867,
0.14095991849899292,
0.652358889579773,
-0.33775773644447327,
0.2628803849220276,
0.19822849333286285,
0.04554979130625725,
0.21739178895950317,
-0.04006330296397209,
-0.05903645604848862,
0.3987356424331665,
0.0289376899600029,
-0.04876276105642319,
-0.20305262506008148,
0.009422115981578827,
0.09405337274074554,
0.2291371375322342,
0.3506719768047333,
-0.26904451847076416,
-0.13627716898918152,
-0.27368471026420593,
0.5236557722091675,
-0.01766940951347351,
-0.011371046304702759,
0.06929445266723633,
0.06701448559761047,
-0.3365369439125061,
0.3461083173751831,
0.24151793122291565,
0.7413404583930969,
0.03802761435508728,
0.3953186273574829,
0.20779255032539368,
0.30278778076171875,
0.8601723313331604,
-0.3698046803474426,
0.18975137174129486,
-0.1742737740278244,
0.2202000617980957,
0.041686661541461945,
0.03543253615498543,
-0.19204354286193848,
-0.13104578852653503,
-0.09684185683727264,
0.38440605998039246,
0.38484466075897217,
0.4188905656337738,
0.07600060105323792,
0.29991284012794495,
0.07616475969552994,
-0.320970743894577,
-0.19505318999290466,
0.1271081119775772,
-0.2076164036989212,
0.5865814685821533,
-0.37656980752944946,
-0.13086877763271332,
-0.21080102026462555,
-0.11665289849042892,
-0.25054940581321716,
0.18855169415473938,
-0.2747049927711487,
0.5069425106048584,
-0.1782882660627365,
-0.5959975123405457,
0.02124827355146408,
0.11277525126934052,
0.1474466621875763,
0.08831088244915009,
-0.40081673860549927,
0.36849743127822876,
-0.19408965110778809,
-0.2362574189901352,
-0.10856154561042786,
0.20971444249153137,
0.4952664077281952,
-0.1708497405052185,
-0.061677686870098114,
-0.061072565615177155,
-0.24166788160800934,
-0.275562584400177,
-0.29496973752975464,
-0.0613054484128952,
0.0028359517455101013,
0.10486917197704315,
-0.0824529379606247,
0.1037253811955452,
-0.014028651639819145,
-0.25724872946739197,
0.14875200390815735,
-0.11449131369590759,
0.037417877465486526,
-0.14607086777687073,
0.10244408249855042,
-0.10430796444416046,
-0.07039760053157806,
0.4993968605995178,
-0.0020990408957004547,
-0.12898480892181396,
0.5953382253646851,
0.3426308035850525,
-0.11988018453121185,
-0.11467266827821732,
-0.09025754034519196,
-0.13938289880752563,
-0.47222524881362915,
-0.1296563744544983,
0.012480691075325012,
-0.053000956773757935,
-0.05213325843214989,
0.24471983313560486,
0.18441180884838104,
-0.1626245081424713,
0.07808586955070496,
-0.1943455934524536,
-0.29546040296554565,
0.25473839044570923,
-0.3494718372821808,
-0.042039643973112106,
0.13901802897453308,
0.10136620700359344,
0.33330535888671875,
0.01481455098837614,
-0.29645639657974243,
-0.2154649943113327,
0.05402858555316925,
0.20080924034118652,
0.3083450198173523,
-0.11868876963853836,
-0.05005437135696411,
-0.1276494264602661,
0.12124443054199219,
0.021270722150802612,
-0.18948565423488617,
-0.23024022579193115,
-0.03156760334968567,
0.10426674038171768,
0.046717822551727295,
0.08656816929578781,
-0.07817645370960236,
0.11140942573547363,
-0.03712962195277214,
-0.2535359859466553,
0.0528712160885334,
-0.22818368673324585,
0.12405335903167725,
0.18231673538684845,
0.11915765702724457,
0.17635372281074524,
-0.12095270305871964,
0.015098372474312782,
0.048274047672748566,
0.1423758566379547,
0.05326336994767189,
0.012956757098436356,
0.22157983481884003,
-0.01179453730583191,
-0.16906367242336273,
0.10427528619766235,
-0.1855001002550125,
0.2854597270488739,
0.29269349575042725,
-0.07731728255748749,
-0.2990316152572632,
-0.02703644335269928,
0.2942750155925751,
-0.03260765224695206,
-0.05286190286278725,
-0.04857425391674042,
0.0103592649102211,
0.1906125396490097,
-0.2196088284254074,
0.26746079325675964,
0.5279884934425354,
0.11437278985977173,
0.0553782619535923,
-0.07021289318799973,
0.37434569001197815,
-0.024660956114530563,
0.33875006437301636,
0.17266085743904114,
0.12175212800502777,
-0.11830990016460419,
0.24264200031757355,
0.21661515533924103,
0.35108646750450134,
0.056690528988838196,
0.023912576958537102,
-0.030709732323884964,
0.23046183586120605,
0.23972301185131073,
0.12880851328372955,
0.2786288857460022,
-0.08822902292013168,
0.09754952788352966,
0.030913468450307846,
-0.06298413872718811,
0.1639130413532257,
0.3340349793434143,
0.1803874671459198,
0.1440526396036148,
-0.1291934698820114,
0.5687993168830872,
0.10019417852163315,
-0.3893401622772217,
-0.23458229005336761,
0.24023090302944183,
-0.11699613183736801,
0.07403211295604706,
-0.3172836899757385,
-0.18617786467075348,
-0.23919491469860077,
0.15746544301509857,
-0.10744017362594604,
-0.12326700985431671,
-0.05043019354343414,
0.21565605700016022,
-0.1900828331708908,
-0.47320321202278137,
0.21016991138458252,
-0.036338672041893005,
0.3338373601436615,
-0.07308246195316315,
0.1706402599811554,
-0.06163719296455383,
-0.2775772213935852,
-0.07984602451324463,
0.2877352833747864,
0.27863144874572754,
0.10541677474975586,
-0.39099231362342834,
-0.12188666313886642,
0.15569353103637695,
-0.06407475471496582,
-0.15276487171649933,
0.08428454399108887,
0.2606302499771118,
-0.1013033539056778,
0.26166337728500366,
0.09725290536880493,
-0.27409353852272034,
-0.12203696370124817,
0.09807531535625458,
-0.05502239987254143,
-0.12360051274299622,
0.013010315597057343,
-0.3181716501712799,
-0.19825759530067444,
-0.12009459733963013,
0.006536073982715607,
-0.4909360706806183,
0.161067932844162,
-0.008206889033317566,
0.19925367832183838,
-0.0541202649474144,
-0.29684877395629883,
0.08566572517156601,
-0.1368461549282074,
0.5973786115646362,
0.34244582056999207,
0.11179952323436737,
-0.14699995517730713,
-0.5365689992904663,
-0.5853416919708252,
0.20902952551841736,
-0.06299275159835815,
-0.04865802079439163,
0.07404325902462006,
0.19424262642860413,
0.23906075954437256,
0.16428065299987793,
0.0021002963185310364,
-0.17929531633853912,
0.08896075189113617,
-0.0662597268819809,
-0.46476203203201294,
-0.06454963982105255,
-0.1904880255460739,
-0.2589038014411926,
-0.12463225424289703,
0.024101316928863525,
-0.08804848790168762,
0.10577777773141861,
0.04879995435476303,
-0.019922465085983276,
-0.2640571594238281,
0.0616629458963871,
-0.0682748332619667,
0.29821932315826416,
-0.05190349370241165,
0.36819905042648315,
-0.10127106308937073,
-0.2203567773103714,
-0.29017284512519836,
-0.1561022847890854,
-0.04629898443818092,
0.3026445508003235,
-0.19343781471252441,
0.5210278034210205,
-0.008360354229807854,
-0.10020598769187927,
-0.3288208842277527,
0.6905269026756287,
0.1733904480934143,
0.11755654960870743,
-0.3923235535621643,
0.02390790544450283,
-0.31167325377464294,
0.16229861974716187,
0.09101807326078415,
0.34118491411209106,
-0.27147841453552246,
0.1741355061531067,
-0.46680426597595215,
-0.4499901235103607,
0.24987103044986725,
-0.4550747275352478,
-0.0926976352930069,
-0.004184187855571508,
0.11533915251493454,
-0.00473921000957489,
-0.05710089951753616,
-0.5571916699409485,
0.03359680622816086,
0.16372057795524597,
0.05430983006954193,
-0.09074921905994415,
0.1095086932182312,
-0.04558810591697693,
-0.1208941787481308,
-0.10418520867824554,
-0.17841392755508423,
0.11568892002105713,
-0.16955555975437164,
-0.0898754745721817,
-0.2151397466659546
] |
https://github.com/huggingface/datasets/issues/406 | Faster Shuffling? | I think the slowness here probably come from the fact that we are copying from and to python.
@lhoestq for all the `select`-based methods I think we should stay in Arrow format and update the writer so that it can accept Arrow tables or batches as well. What do you think? | Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.) | 51 | Faster Shuffling?
Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.)
I think the slowness here probably come from the fact that we are copying from and to python.
@lhoestq for all the `select`-based methods I think we should stay in Arrow format and update the writer so that it can accept Arrow tables or batches as well. What do you think? | [
-0.10384751856327057,
0.04853019118309021,
-0.03246060013771057,
-0.1238686740398407,
-0.07870949804782867,
-0.13932055234909058,
0.11683729290962219,
0.5494186282157898,
-0.2944580316543579,
0.08318284153938293,
-0.015447592362761497,
0.530701220035553,
-0.1336497962474823,
-0.2611563801765442,
0.16786228120326996,
-0.09260405600070953,
0.060632236301898956,
-0.07314592599868774,
-0.256620317697525,
-0.09112801402807236,
-0.10026244819164276,
-0.3960592448711395,
-0.21078120172023773,
-0.20468442142009735,
-0.007430430501699448,
-0.24361693859100342,
-0.2369045466184616,
0.1180206835269928,
-0.18448477983474731,
0.08459837734699249,
-0.19340269267559052,
0.23161275684833527,
-0.1237933561205864,
0.24561312794685364,
-0.00011484538117656484,
-0.1855446696281433,
0.07731778919696808,
0.13370826840400696,
-0.3280707895755768,
0.15748758614063263,
0.47776004672050476,
-0.0623345673084259,
-0.10906937718391418,
-0.20446394383907318,
0.16245955228805542,
-0.34351980686187744,
0.11615170538425446,
-0.07582240551710129,
-0.08991368114948273,
-0.03751034662127495,
0.13142701983451843,
0.3801160454750061,
-0.19889579713344574,
0.22042734920978546,
0.48175227642059326,
0.21349313855171204,
-0.35807713866233826,
0.3437611162662506,
0.39566949009895325,
-0.07496997714042664,
-0.14648789167404175,
0.2646937370300293,
-0.187820166349411,
-0.03949713334441185,
0.2072630226612091,
0.13425783812999725,
0.12855108082294464,
0.32304006814956665,
0.10727234184741974,
0.3726658225059509,
0.3013319969177246,
-0.2000199854373932,
-0.35485371947288513,
-0.287473201751709,
0.20355674624443054,
-0.030812274664640427,
0.0791783332824707,
0.2857201099395752,
-0.28084510564804077,
-0.18769888579845428,
-0.1240445002913475,
0.10416050255298615,
0.2330208718776703,
-0.23027123510837555,
0.32012179493904114,
0.4178147614002228,
0.2373136430978775,
-0.09983169287443161,
0.6690927147865295,
-0.09531496465206146,
0.5340383052825928,
-0.1793554425239563,
0.07010349631309509,
0.4054664373397827,
-0.28783127665519714,
-0.2892366647720337,
-0.1990918219089508,
-0.08829014748334885,
-0.1359456181526184,
0.1803567111492157,
0.6696810722351074,
0.20380744338035583,
0.20099635422229767,
-0.054301559925079346,
0.08219023048877716,
-0.01593026891350746,
-0.3168698847293854,
0.15699224174022675,
-0.09501640498638153,
0.08423761278390884,
0.2574748694896698,
0.09189498424530029,
-0.07177377492189407,
-0.30075955390930176,
-0.04482308775186539,
-0.21457397937774658,
-0.4414103627204895,
0.10365922749042511,
0.032350681722164154,
-0.2918609082698822,
-0.09601342678070068,
-0.06794527173042297,
0.012575882486999035,
0.21459579467773438,
-0.17452727258205414,
0.2548381984233856,
-0.0650106891989708,
-0.10675248503684998,
-0.15315130352973938,
0.05289981886744499,
-0.039701107889413834,
0.102503702044487,
-0.07590265572071075,
0.0010085096582770348,
0.019384417682886124,
0.3855786621570587,
-0.25666967034339905,
0.0715126097202301,
0.19836103916168213,
0.33333638310432434,
0.03903181850910187,
-0.13710495829582214,
0.0811997577548027,
0.11646410822868347,
-0.12959322333335876,
-0.16260181367397308,
-0.10904200375080109,
0.05635053664445877,
-0.32825323939323425,
0.39568719267845154,
-0.02828814834356308,
-0.14977756142616272,
0.13973954319953918,
0.1568017452955246,
0.2815750241279602,
-0.28441187739372253,
-0.4706708490848541,
-0.07426168024539948,
0.0032801106572151184,
-0.03290539234876633,
0.07837482541799545,
-0.10771776735782623,
0.12940378487110138,
-0.1461094617843628,
0.006991978734731674,
-0.20682980120182037,
-0.031383611261844635,
0.11867299675941467,
0.01813197135925293,
0.5336560010910034,
0.4336855411529541,
0.6766942143440247,
-0.08356529474258423,
0.08880835026502609,
0.13139654695987701,
-0.03256641700863838,
0.7245668768882751,
0.1752949208021164,
-0.17636705935001373,
0.030356166884303093,
-0.0777411013841629,
0.07237058877944946,
0.4168796241283417,
0.18786360323429108,
0.04999622330069542,
-0.14467066526412964,
0.4556989371776581,
0.28588682413101196,
0.0005492325872182846,
0.2795179784297943,
-0.5462653636932373,
-0.1266951858997345,
0.23730459809303284,
0.43262046575546265,
-0.4991607367992401,
-0.31791791319847107,
-0.01062791794538498,
-0.32047465443611145,
0.3234395384788513,
-0.2063717246055603,
-0.11092162132263184,
0.05199281871318817,
-0.028023626655340195,
0.0888933539390564,
-0.1518571972846985,
0.0710442066192627,
-0.19894012808799744,
-0.05711088329553604,
-0.029153818264603615,
-0.021697625517845154,
0.24268731474876404,
-0.35577893257141113,
0.19911879301071167,
-0.17321424186229706,
0.11946962773799896,
0.16991086304187775,
-0.0024224035441875458,
-0.2069244682788849,
0.398649126291275,
-0.10005515813827515,
-0.0798935517668724,
-0.016099995002150536,
-0.2569809556007385,
0.08421359211206436,
-0.16890479624271393,
-0.11169648170471191,
0.045190274715423584,
-0.2143690586090088,
0.1580180823802948,
0.3718029856681824,
-0.2997276186943054,
0.04967677593231201,
0.10271580517292023,
0.2142709493637085,
-0.0766528993844986,
-0.12327854335308075,
0.09103508293628693,
0.1982087790966034,
-0.06377144157886505,
0.2575589716434479,
0.18422150611877441,
-0.1660940945148468,
0.15149442851543427,
-0.03450237214565277,
-0.3289419412612915,
0.5347307920455933,
-0.49302610754966736,
0.3141443133354187,
0.19858752191066742,
-0.2543617784976959,
-0.1408238410949707,
0.299007773399353,
-0.09735862165689468,
0.4259059429168701,
0.6466951370239258,
0.11169102787971497,
0.11359669268131256,
0.40008601546287537,
-0.33826756477355957,
0.09983862191438675,
0.5146841406822205,
-0.032069820910692215,
-0.15102824568748474,
0.10144089162349701,
0.08682335913181305,
-0.15786364674568176,
-0.13390721380710602,
0.07245765626430511,
0.26436305046081543,
0.2578004002571106,
0.10681670904159546,
-0.022065429016947746,
-0.06514895707368851,
-0.2313472032546997,
0.21507132053375244,
-0.0015310496091842651,
0.09619593620300293,
-0.14398175477981567,
0.10757752507925034,
-0.013752362690865993,
-0.16251584887504578,
-0.17739544808864594,
0.019707201048731804,
0.1639554649591446,
0.07676945626735687,
0.07361875474452972,
-0.06295344978570938,
-0.12400226294994354,
-0.18180251121520996,
-0.036518316715955734,
-0.04094759002327919,
-0.13409970700740814,
0.1759617030620575,
0.23944121599197388,
-0.22955866158008575,
-0.27098754048347473,
-0.10230204463005066,
0.2744620144367218,
-0.1486404687166214,
-0.1649528294801712,
-0.1873629242181778,
0.0778127983212471,
-0.11820795387029648,
0.05184800550341606,
0.2363511025905609,
0.28943324089050293,
0.359273225069046,
0.06218694895505905,
-0.2367977797985077,
0.05182771384716034,
0.03151616454124451,
-0.23658320307731628,
0.02472781576216221,
-0.2823907136917114,
-0.05126282572746277,
-0.18438179790973663,
-0.3590669631958008,
-0.3232361376285553,
0.0791546180844307,
-0.16009341180324554,
-0.10071346163749695,
0.36069267988204956,
0.21800902485847473,
-0.22463969886302948,
-0.12314704060554504,
-0.07072033733129501,
-0.13535496592521667,
-0.3641657531261444,
0.294773131608963,
-0.07353401184082031,
0.15616153180599213,
-0.028066329658031464,
-0.15409816801548004,
-0.074750155210495,
-0.4670979678630829,
-0.029159972444176674,
0.1779472678899765,
-0.1603412926197052,
0.266525536775589,
0.07572435587644577,
-0.18763825297355652,
-0.45545679330825806,
-0.030903082340955734,
-0.045595552772283554,
0.4398033618927002,
-0.05042900890111923,
0.15850737690925598,
-0.40902698040008545,
-0.018544690683484077,
-0.06910406053066254,
0.24175235629081726,
0.47838637232780457,
-0.10122958570718765,
-0.1137259304523468,
0.33434730768203735,
0.19000782072544098,
-0.0072756558656692505,
0.281583696603775,
0.0939927026629448,
0.08733562380075455,
0.1453133523464203,
0.19172939658164978,
0.5485804677009583,
-0.008988715708255768,
0.40242475271224976,
-0.1678851693868637,
0.1251712441444397,
-0.02636081352829933,
-0.3092457354068756,
0.01916508562862873,
0.15458182990550995,
-0.014890044927597046,
-0.22021225094795227,
0.2860589027404785,
-0.13228482007980347,
-0.2167060375213623,
-0.14579305052757263,
0.442979633808136,
0.09780304878950119,
-0.3071257472038269,
0.5698949098587036,
-0.24399036169052124,
0.011494994163513184,
0.026276979595422745,
0.24269363284111023,
-0.11463339626789093,
-0.18291187286376953,
0.03937380015850067,
-0.07352487742900848,
-0.07365047186613083,
-0.030638111755251884,
-0.6124542951583862,
-0.152242049574852,
-0.8053990006446838,
0.2165992259979248,
0.20301789045333862,
0.36970221996307373,
0.26963648200035095,
-0.3206881284713745,
0.43733716011047363,
-0.1314527541399002,
0.2683979570865631,
0.19393178820610046,
-0.3236968517303467,
0.26402220129966736,
-0.1401326060295105,
-0.456889808177948,
-0.08404272794723511,
-0.3802318572998047,
-0.40312132239341736,
0.14511005580425262,
0.18132370710372925,
-0.35817769169807434,
-0.042772095650434494,
-0.015332162380218506,
-0.05651022493839264,
-0.017064832150936127,
0.012958330102264881,
-0.39014962315559387,
-0.23444736003875732,
0.03232770413160324,
0.2596326172351837,
-0.04613582044839859,
0.025431307032704353,
-0.05656614154577255,
0.22242699563503265,
0.15895457565784454,
0.00072471983730793,
0.14332890510559082,
-0.10428634285926819,
-0.05405717343091965,
-0.05408105254173279,
0.15840652585029602,
0.16580833494663239,
0.06212147697806358,
-0.09099356830120087,
0.0022124536335468292,
0.12316581606864929,
0.04167725145816803,
-0.15763574838638306,
-0.18935033679008484,
0.4593549370765686,
0.3867466449737549,
0.2079525887966156,
0.21296565234661102,
-0.02418404445052147,
0.32186660170555115,
-0.005994017235934734,
-0.520861804485321,
0.13080553710460663,
-0.29543206095695496,
-0.1013391837477684,
-0.7717431783676147,
0.2592333257198334,
0.2543681859970093,
0.1491471379995346,
0.2281627058982849,
-0.196331188082695,
0.24707698822021484,
0.42753422260284424,
0.1410054862499237,
1.0107346773147583,
-0.37455785274505615,
0.4948278069496155,
0.30264753103256226,
-0.2127193957567215,
0.06320967525243759,
-0.12885433435440063,
0.3773987293243408,
-0.17115625739097595,
-0.1408919394016266,
0.21824249625205994,
-0.1835123747587204,
0.002882227301597595,
0.04692832753062248,
-0.03765948489308357,
0.20101220905780792,
-0.002371087670326233,
-0.32391297817230225,
-0.3013598322868347,
-0.03709692880511284,
-0.4331663250923157,
-0.3865852653980255,
-0.16200000047683716,
0.002614229917526245,
-0.03217332810163498,
-0.1597072035074234,
0.14176702499389648,
0.08124469220638275,
-0.464291512966156,
0.11386838555335999,
-0.12510761618614197,
-0.012902425602078438,
0.04880773276090622,
-0.006456945091485977,
0.2049914449453354,
-0.2861241102218628,
-0.0617326982319355,
-0.1386673003435135,
-0.12466391921043396,
0.11001266539096832,
0.18063436448574066,
0.1125108152627945,
0.25732696056365967,
0.39451298117637634,
0.3727914094924927,
-0.28356972336769104,
0.2877432107925415,
-0.06325854361057281,
0.25003382563591003,
0.05619947984814644,
-0.008481050841510296,
-0.7355345487594604,
-0.3018519878387451,
0.08604355901479721,
0.5681178569793701,
-0.02869468741118908,
-0.1409672349691391,
0.23910339176654816,
-0.36867234110832214,
-0.09587278962135315,
0.10143081843852997,
0.05738425254821777,
0.1053931936621666,
0.47053948044776917,
0.13201722502708435,
-0.18861174583435059,
-0.011009618639945984,
0.2801901698112488,
0.10600900650024414,
0.13965831696987152,
0.3078068494796753,
0.01610267534852028,
-0.4802677035331726,
-0.22162503004074097,
0.18156921863555908,
0.04157527908682823,
-0.34996873140335083,
0.2590768039226532,
0.015689115971326828,
-0.07857178151607513,
0.12821169197559357,
0.28761768341064453,
-0.029577545821666718,
-0.05917132645845413,
-0.3001861870288849,
-0.014992989599704742,
0.10739841312170029,
0.4669555425643921,
0.5261849164962769,
0.00992966815829277,
0.005059998482465744,
0.3379229009151459,
-0.3852917551994324,
-0.15065152943134308,
-0.24256330728530884,
-0.18536923825740814,
0.09133236855268478,
0.12235266715288162,
-0.13899755477905273,
-0.28778037428855896,
-0.19264090061187744,
0.1505213975906372,
0.130743607878685,
0.14841708540916443,
0.03299017250537872,
-0.19076421856880188,
0.07022285461425781,
0.034122124314308167,
0.027660777792334557,
-0.01401735283434391,
0.047778304666280746,
-0.3899279236793518,
-0.34491652250289917,
-0.23921586573123932,
-0.27365875244140625,
0.0012195706367492676,
-0.008355893194675446,
-0.271294504404068,
0.20889578759670258,
0.13243061304092407,
-0.0776066780090332,
0.5249646902084351,
-0.47318336367607117,
-0.27324414253234863,
-0.22084872424602509,
-0.00639859214425087,
-0.01909766159951687,
-0.0999409407377243,
-0.11103316396474838,
0.12368643283843994,
0.05602727457880974,
0.005403192713856697,
0.26634666323661804,
-0.1399291455745697,
0.05745329335331917,
-0.1029643714427948,
0.19432440400123596,
0.6351504921913147,
0.28989657759666443,
-0.4409424364566803,
0.45208120346069336,
0.11578314006328583,
-0.11292003840208054,
-0.2333066165447235,
-0.35441964864730835,
0.21457932889461517,
-0.004531152546405792,
0.10256544500589371,
-0.27180179953575134,
-0.11246129125356674,
-0.32863694429397583,
-0.05949043110013008,
-0.1369456797838211,
-0.4206708073616028,
-0.23167093098163605,
0.30655190348625183,
0.36986061930656433,
-0.2523021697998047,
0.18014782667160034,
-0.004057992249727249,
-0.04677724093198776,
0.1294293999671936,
0.22708845138549805,
0.407735139131546,
0.624472439289093,
0.30146247148513794,
-0.3874139189720154,
-0.11069764196872711,
-0.004012126475572586,
0.4378826320171356,
0.18015936017036438,
0.308616578578949,
0.34066110849380493,
0.13451462984085083,
0.006603639107197523,
0.07968977093696594,
-0.021978285163640976,
-0.09283827245235443,
-0.037078857421875,
0.07317300140857697,
0.07251469790935516,
-0.0947212353348732,
-0.21812917292118073,
0.20425131916999817,
-0.3194911777973175,
0.34588944911956787,
0.22643381357192993,
0.10362505167722702,
0.4627441167831421,
-0.39300093054771423,
0.1452663093805313,
-0.22504621744155884,
0.44747310876846313,
-0.31342455744743347,
-0.16122888028621674,
-0.03750115633010864,
0.1031903475522995,
0.2538502514362335,
0.06626977026462555,
-0.07254914939403534,
0.2728678584098816,
-0.07904772460460663,
0.062229182571172714,
-0.5087036490440369,
-0.014966857619583607,
-0.10642852634191513,
0.21637189388275146,
0.4450422525405884,
-0.08542828261852264,
0.2795487344264984,
0.012232722714543343,
-0.1925520896911621,
-0.1656648814678192,
-0.09806044399738312,
-0.06900845468044281,
-0.17792855203151703,
0.16123580932617188,
0.20848238468170166,
-0.43359866738319397,
-0.04452527314424515,
0.1502264440059662,
-0.25262099504470825,
-0.09614883363246918,
-0.5036645531654358,
-0.21495717763900757,
-0.10918241739273071,
0.02386428415775299,
0.0551285445690155,
0.1901286393404007,
0.6890672445297241,
0.42449161410331726,
-0.08057289570569992,
0.10325278341770172,
-0.27264606952667236,
-0.26195982098579407,
-0.3324974477291107,
-0.2798488438129425,
-0.009764784947037697,
0.2360473871231079,
0.4841252565383911,
0.24552583694458008,
0.27141743898391724,
-0.04759727418422699,
0.1512843370437622,
-0.3728959560394287,
0.3568672239780426,
-0.1409451961517334,
0.20742084085941315,
0.16535305976867676,
-0.06301482766866684,
-0.21246562898159027,
-0.6004897952079773,
0.21048228442668915,
0.140949547290802,
-0.0027428828179836273,
-0.07079251110553741,
0.08259212970733643,
0.20686376094818115,
0.3266087472438812,
-0.16946662962436676,
-0.03749420493841171,
-0.17367660999298096,
0.21706852316856384,
-0.20593370497226715,
-0.190614253282547,
0.18586021661758423,
-0.02279251627624035,
0.019388359040021896,
0.07425570487976074,
0.12043686211109161,
0.0634021982550621,
0.00783485546708107,
0.1306760013103485,
0.5502994060516357,
-0.2406555712223053,
0.17330418527126312,
-0.2645808160305023,
0.054151758551597595,
0.21098747849464417,
0.2993122637271881,
-0.15807922184467316,
0.14265015721321106,
-0.04886559396982193,
-0.19840095937252045,
-0.2610486149787903,
0.0039236098527908325,
0.39096564054489136,
-0.15950772166252136,
-0.2572924792766571,
-0.12660668790340424,
0.17813991010189056,
0.2004372924566269,
0.3141002058982849,
0.08483845740556717,
-0.2719449996948242,
-0.042042020708322525,
-0.002838950604200363,
0.32956406474113464,
0.26994940638542175,
-0.1165979653596878,
-0.061649687588214874,
-0.15463632345199585,
0.32007938623428345,
-0.45247748494148254,
0.08766581118106842,
-0.23338687419891357,
-0.3020479083061218
] |
https://github.com/huggingface/datasets/issues/406 | Faster Shuffling? | > @lhoestq for all the `select`-based methods I think we should stay in Arrow format and update the writer so that it can accept Arrow tables or batches as well. What do you think?
I just tried with `writer.write_table` with tables of 1000 elements and it's slower that the solution in #405
On my side (select 10 000 examples):
- Original implementation: 12s
- Batched solution: 100ms
- solution using arrow tables: 350ms
I'll try with arrays and record batches to see if we can make it work. | Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.) | 88 | Faster Shuffling?
Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.)
> @lhoestq for all the `select`-based methods I think we should stay in Arrow format and update the writer so that it can accept Arrow tables or batches as well. What do you think?
I just tried with `writer.write_table` with tables of 1000 elements and it's slower that the solution in #405
On my side (select 10 000 examples):
- Original implementation: 12s
- Batched solution: 100ms
- solution using arrow tables: 350ms
I'll try with arrays and record batches to see if we can make it work. | [
-0.16450102627277374,
0.11814004182815552,
-0.04446127265691757,
-0.10497449338436127,
-0.08144025504589081,
-0.17317043244838715,
0.1477237492799759,
0.5459221601486206,
-0.23468267917633057,
0.062463369220495224,
-0.00008142832666635513,
0.5998948812484741,
-0.1948000192642212,
-0.22840161621570587,
0.2151889204978943,
-0.061211712658405304,
0.04766335338354111,
-0.004382394254207611,
-0.28223487734794617,
-0.04389951005578041,
-0.05621926486492157,
-0.4137573838233948,
-0.19948861002922058,
-0.1997070461511612,
-0.025770820677280426,
-0.2938671410083771,
-0.18785622715950012,
0.06976722180843353,
-0.19764481484889984,
0.0757235437631607,
-0.21733835339546204,
0.2811862528324127,
-0.05215448513627052,
0.25841695070266724,
-0.00011222035391256213,
-0.17012277245521545,
0.04250457137823105,
0.103731170296669,
-0.313845694065094,
0.12869380414485931,
0.38003331422805786,
-0.05211764574050903,
-0.17796291410923004,
-0.21509239077568054,
0.19089308381080627,
-0.3175557553768158,
0.15692712366580963,
-0.07846321165561676,
-0.13302567601203918,
-0.0641259178519249,
0.15371127426624298,
0.2656765580177307,
-0.15890508890151978,
0.21455387771129608,
0.5277472734451294,
0.24440784752368927,
-0.3638019859790802,
0.2725052535533905,
0.3779156506061554,
-0.12757627665996552,
-0.25583210587501526,
0.2600165009498596,
-0.15409071743488312,
-0.05056944862008095,
0.2140827178955078,
0.14193680882453918,
0.06563208252191544,
0.3851955235004425,
0.09774543344974518,
0.381089985370636,
0.29666075110435486,
-0.19602838158607483,
-0.28900280594825745,
-0.25537607073783875,
0.17196162045001984,
-0.03694448620080948,
0.09811724722385406,
0.2776348292827606,
-0.27603447437286377,
-0.21664869785308838,
-0.17130030691623688,
0.0930575504899025,
0.20214760303497314,
-0.22574935853481293,
0.36821311712265015,
0.359519898891449,
0.18954262137413025,
-0.09791537374258041,
0.6719358563423157,
-0.12422192096710205,
0.5510307550430298,
-0.1262989193201065,
-0.004798907786607742,
0.40451353788375854,
-0.3214241862297058,
-0.3182564973831177,
-0.23373976349830627,
-0.12059661000967026,
-0.04685850441455841,
0.13398852944374084,
0.6908429861068726,
0.23511487245559692,
0.24408605694770813,
-0.03308999538421631,
0.029475044459104538,
0.00507027842104435,
-0.1881677508354187,
0.0786929652094841,
-0.12456999719142914,
0.14908486604690552,
0.25442904233932495,
0.11710520088672638,
-0.07661939412355423,
-0.30609312653541565,
-0.11846071481704712,
-0.22097644209861755,
-0.5335651636123657,
0.13608545064926147,
0.08554694056510925,
-0.2906820476055145,
-0.030855972319841385,
-0.07278691232204437,
0.019144834950566292,
0.2176075577735901,
-0.11345977336168289,
0.2636508047580719,
-0.03908470645546913,
-0.18404848873615265,
-0.07678623497486115,
-0.029616903513669968,
-0.021316448226571083,
0.039533160626888275,
-0.13935306668281555,
0.04020100086927414,
0.11733068525791168,
0.40052810311317444,
-0.25640764832496643,
0.07050715386867523,
0.10314405709505081,
0.31239861249923706,
0.023626746609807014,
-0.133468359708786,
0.0955936387181282,
0.00914667546749115,
-0.146274596452713,
-0.2022952437400818,
-0.162446990609169,
0.0748472809791565,
-0.2686469554901123,
0.4047931730747223,
0.008407965302467346,
-0.13144788146018982,
0.1649596393108368,
0.16824552416801453,
0.29206496477127075,
-0.25654903054237366,
-0.5357545614242554,
0.02820916473865509,
0.015079684555530548,
-0.06021793559193611,
0.06546711921691895,
-0.023868419229984283,
0.06736224889755249,
-0.1401837319135666,
0.02445312775671482,
-0.2616642117500305,
-0.000049836933612823486,
0.15022772550582886,
-0.0067206257954239845,
0.5517870187759399,
0.40127989649772644,
0.6005727052688599,
-0.06617747992277145,
0.09189401566982269,
0.15280801057815552,
-0.014736190438270569,
0.6540018320083618,
0.24671003222465515,
-0.21856379508972168,
0.04356429725885391,
-0.04821718484163284,
-0.02621467038989067,
0.38947075605392456,
0.20756936073303223,
0.14556537568569183,
-0.11482424288988113,
0.4333440959453583,
0.23687000572681427,
-0.002024354413151741,
0.30487489700317383,
-0.5437975525856018,
-0.18042629957199097,
0.25481313467025757,
0.431024968624115,
-0.5073709487915039,
-0.3955111503601074,
0.04359887167811394,
-0.3157790005207062,
0.30726417899131775,
-0.19298046827316284,
-0.0006521190516650677,
0.04813782870769501,
-0.08663587272167206,
0.08192235231399536,
-0.18073789775371552,
0.050081707537174225,
-0.21627920866012573,
-0.07499255239963531,
-0.09664434939622879,
-0.012155063450336456,
0.28775978088378906,
-0.3427283763885498,
0.21074271202087402,
-0.23374007642269135,
0.20789870619773865,
0.1907050907611847,
0.021344654262065887,
-0.22415253520011902,
0.3385128080844879,
-0.17491833865642548,
-0.1115134209394455,
-0.07181062549352646,
-0.28857728838920593,
0.04253184795379639,
-0.18188627064228058,
-0.13390444219112396,
0.049343906342983246,
-0.20683522522449493,
0.14093689620494843,
0.3582656681537628,
-0.3306206166744232,
0.05718061327934265,
0.12856528162956238,
0.22768637537956238,
-0.12157152593135834,
-0.20042811334133148,
0.10788588970899582,
0.18386659026145935,
-0.07226158678531647,
0.22190824151039124,
0.10933317989110947,
-0.23689226806163788,
0.15980730950832367,
-0.02406998723745346,
-0.3439082205295563,
0.5287789702415466,
-0.4670099914073944,
0.30602455139160156,
0.1508338451385498,
-0.2817952036857605,
-0.19832582771778107,
0.30053603649139404,
-0.03649662435054779,
0.4161670207977295,
0.6197937726974487,
0.07031998038291931,
-0.008537393063306808,
0.38284066319465637,
-0.2867332696914673,
0.11100602149963379,
0.44427356123924255,
0.03548272326588631,
-0.08743452280759811,
0.07636445760726929,
0.11519520729780197,
-0.14344948530197144,
-0.144910991191864,
0.028983991593122482,
0.22011028230190277,
0.26664772629737854,
0.0663304477930069,
-0.06584825366735458,
-0.05879036337137222,
-0.21908403933048248,
0.1854216754436493,
-0.05407407879829407,
0.1081659123301506,
-0.11614888161420822,
0.12547659873962402,
-0.0036937976256012917,
-0.15174950659275055,
-0.1532522737979889,
0.11248531192541122,
0.151726633310318,
0.13174067437648773,
0.026639504358172417,
-0.09314652532339096,
-0.16242708265781403,
-0.11873748898506165,
-0.014824100770056248,
-0.04797545447945595,
-0.008571524173021317,
0.23991751670837402,
0.239157572388649,
-0.2472817450761795,
-0.23467931151390076,
-0.036851368844509125,
0.3515056073665619,
-0.15991410613059998,
-0.043069422245025635,
-0.18562664091587067,
0.042774952948093414,
-0.09416269510984421,
0.09184113144874573,
0.22912725806236267,
0.2741200923919678,
0.3628978729248047,
0.09879877418279648,
-0.2361452281475067,
0.04639887437224388,
0.02008497714996338,
-0.2806490957736969,
0.0375685915350914,
-0.2801625728607178,
-0.050635114312171936,
-0.18149982392787933,
-0.40173208713531494,
-0.2940497100353241,
0.048457831144332886,
-0.2136881947517395,
-0.12095017731189728,
0.3594195544719696,
0.2213587611913681,
-0.19242510199546814,
-0.16470511257648468,
-0.141242116689682,
-0.02719026990234852,
-0.41960784792900085,
0.31663620471954346,
-0.10182411968708038,
0.2229260355234146,
-0.07845798134803772,
-0.12161733955144882,
-0.07033256441354752,
-0.5059902667999268,
-0.02548387087881565,
0.19915644824504852,
-0.17964760959148407,
0.24768587946891785,
0.09569914638996124,
-0.18813253939151764,
-0.43132853507995605,
-0.036717962473630905,
-0.08201320469379425,
0.46096980571746826,
-0.055988866835832596,
0.26472318172454834,
-0.32759708166122437,
-0.04863228648900986,
-0.08815121650695801,
0.1640731394290924,
0.4675888419151306,
-0.12309908121824265,
-0.1321260929107666,
0.2906356453895569,
0.18782570958137512,
0.09323430061340332,
0.2486407458782196,
0.14844121038913727,
0.1078997477889061,
0.15831685066223145,
0.25777360796928406,
0.4758412837982178,
-0.013259919360280037,
0.3537454605102539,
-0.1806488037109375,
0.1811615377664566,
-0.0629272609949112,
-0.304417222738266,
0.09022141993045807,
0.17611859738826752,
-0.010492131114006042,
-0.13282695412635803,
0.3145890235900879,
-0.13034451007843018,
-0.23582834005355835,
-0.15196657180786133,
0.4087907671928406,
0.14061793684959412,
-0.27673983573913574,
0.6161750555038452,
-0.2175595760345459,
0.06697367876768112,
0.01309584453701973,
0.19895011186599731,
-0.07293935120105743,
-0.25818735361099243,
0.034668534994125366,
-0.07719485461711884,
-0.0035627707839012146,
0.015767019242048264,
-0.6201169490814209,
-0.10379628837108612,
-0.7348017692565918,
0.19458262622356415,
0.2546135485172272,
0.4203132092952728,
0.2630217671394348,
-0.2731857895851135,
0.4100109934806824,
-0.13168053328990936,
0.24547430872917175,
0.18470025062561035,
-0.337939977645874,
0.20781657099723816,
-0.033403657376766205,
-0.39917272329330444,
-0.03829539567232132,
-0.35533350706100464,
-0.3880007565021515,
0.09340527653694153,
0.21875178813934326,
-0.36988505721092224,
-0.015168145298957825,
-0.06485194712877274,
-0.09636306017637253,
-0.020888376981019974,
-0.02131505310535431,
-0.3431759476661682,
-0.15631747245788574,
0.02472287230193615,
0.3189603388309479,
-0.04194618761539459,
0.06361890584230423,
-0.03653392940759659,
0.20758575201034546,
0.185445174574852,
0.005204897373914719,
0.09255657345056534,
-0.11260594427585602,
-0.018958278000354767,
-0.04454057291150093,
0.16097410023212433,
0.14490818977355957,
0.08848579227924347,
-0.0016813520342111588,
-0.06760527193546295,
0.15657655894756317,
0.13074517250061035,
-0.0775158628821373,
-0.21685630083084106,
0.4103647768497467,
0.354431688785553,
0.2132839560508728,
0.2864859402179718,
0.031882449984550476,
0.2609131336212158,
-0.004494723863899708,
-0.4609473645687103,
0.052482642233371735,
-0.33687999844551086,
-0.11119858175516129,
-0.7022080421447754,
0.220726877450943,
0.20984552800655365,
0.1291484534740448,
0.24352359771728516,
-0.1922960728406906,
0.19434261322021484,
0.3990997076034546,
0.1793600171804428,
0.9543702602386475,
-0.34255748987197876,
0.4395093023777008,
0.200553297996521,
-0.249893456697464,
0.04216500744223595,
-0.1718839854001999,
0.43397700786590576,
-0.1869426965713501,
-0.14281730353832245,
0.22099123895168304,
-0.16025900840759277,
-0.0038976073265075684,
0.17496731877326965,
0.010384131222963333,
0.1408388614654541,
0.05458304286003113,
-0.27245935797691345,
-0.29829081892967224,
-0.0769244134426117,
-0.39732450246810913,
-0.4000500738620758,
-0.08126119524240494,
0.007991001009941101,
-0.09127037227153778,
-0.26163947582244873,
0.1299058496952057,
0.03972775489091873,
-0.4066441059112549,
0.13744165003299713,
-0.1283327341079712,
-0.03391018509864807,
0.025263121351599693,
-0.018781296908855438,
0.23130007088184357,
-0.24729692935943604,
-0.011831855401396751,
-0.13894295692443848,
-0.16547104716300964,
0.11753658950328827,
0.17827041447162628,
0.08767083287239075,
0.27323228120803833,
0.3476555347442627,
0.32082778215408325,
-0.27979782223701477,
0.24504028260707855,
-0.03862956538796425,
0.247097909450531,
0.026927009224891663,
-0.009423140436410904,
-0.739814817905426,
-0.27707111835479736,
0.08141011744737625,
0.5765278935432434,
-0.04624457284808159,
-0.04125151410698891,
0.22886471450328827,
-0.36777350306510925,
-0.08741232752799988,
0.12260141968727112,
0.023457933217287064,
0.1255805492401123,
0.4317755103111267,
0.14743807911872864,
-0.17110109329223633,
-0.0032450035214424133,
0.3074450194835663,
0.10083076357841492,
0.13747331500053406,
0.2142406553030014,
0.05120297148823738,
-0.498279333114624,
-0.2763271629810333,
0.1729937493801117,
0.056096550077199936,
-0.42369669675827026,
0.25558292865753174,
0.03469209372997284,
-0.09983031451702118,
0.1983746886253357,
0.2802022397518158,
-0.044432491064071655,
-0.07016213983297348,
-0.23477217555046082,
-0.042212676256895065,
0.0778442770242691,
0.4823131561279297,
0.43760770559310913,
-0.009276941418647766,
0.04345177114009857,
0.27736449241638184,
-0.4098944664001465,
-0.10126900672912598,
-0.2635428309440613,
-0.1706923544406891,
0.10311376303434372,
0.1917160302400589,
-0.15709391236305237,
-0.24858227372169495,
-0.23145407438278198,
0.12177424132823944,
0.10951285064220428,
0.18563725054264069,
0.009959574788808823,
-0.22042953968048096,
0.06522341072559357,
0.02685360610485077,
0.06927439570426941,
-0.012405043467879295,
-0.04422060400247574,
-0.40565764904022217,
-0.4026627838611603,
-0.22409340739250183,
-0.2556390166282654,
-0.058101311326026917,
-0.01862829178571701,
-0.2951931357383728,
0.189385786652565,
0.1526644229888916,
-0.1454211175441742,
0.5044121146202087,
-0.4405686557292938,
-0.28803229331970215,
-0.25360244512557983,
-0.03905564546585083,
-0.020436272025108337,
-0.10003867745399475,
-0.12372703105211258,
0.13223771750926971,
0.08913771063089371,
-0.009800486266613007,
0.27136415243148804,
-0.14506597816944122,
0.03268473222851753,
-0.0542566291987896,
0.1430613100528717,
0.5390291213989258,
0.29180389642715454,
-0.4942598044872284,
0.42309650778770447,
0.13871905207633972,
-0.06855723261833191,
-0.20511816442012787,
-0.40187352895736694,
0.26668915152549744,
0.015881981700658798,
0.07365012913942337,
-0.2112589031457901,
-0.22868064045906067,
-0.3007587790489197,
-0.04670931026339531,
-0.19859033823013306,
-0.40654170513153076,
-0.26952314376831055,
0.3000279664993286,
0.34996122121810913,
-0.2810373306274414,
0.1548967808485031,
-0.02092260867357254,
-0.0263044610619545,
0.12677213549613953,
0.2693786025047302,
0.3928057551383972,
0.70600825548172,
0.3252285420894623,
-0.4333922564983368,
-0.08915196359157562,
-0.05499529466032982,
0.4373286962509155,
0.24196019768714905,
0.29881539940834045,
0.3137166202068329,
0.173214852809906,
0.05102694779634476,
0.07509758323431015,
0.04859299212694168,
-0.18603721261024475,
-0.05487121641635895,
0.08301086723804474,
-0.012910330668091774,
-0.14323176443576813,
-0.23764944076538086,
0.1842690408229828,
-0.3152513802051544,
0.38561373949050903,
0.1862424612045288,
0.07947762310504913,
0.42949777841567993,
-0.4428107738494873,
0.17628702521324158,
-0.08074093610048294,
0.4567209780216217,
-0.2809703052043915,
-0.06468312442302704,
-0.04322090744972229,
0.10534248501062393,
0.3080558180809021,
0.09015705436468124,
-0.17980466783046722,
0.2704423666000366,
-0.05199922248721123,
0.07882515341043472,
-0.48743149638175964,
0.021712953224778175,
-0.10577018558979034,
0.2321116030216217,
0.49331799149513245,
-0.1453859508037567,
0.2571786344051361,
0.02644878439605236,
-0.19357448816299438,
-0.12810389697551727,
-0.06671017408370972,
-0.038166891783475876,
-0.06706013530492783,
0.0632706880569458,
0.23523001372814178,
-0.42571860551834106,
0.028173167258501053,
0.1450079083442688,
-0.2164347767829895,
-0.0908326581120491,
-0.4721778631210327,
-0.24135403335094452,
-0.09591732919216156,
-0.03373710811138153,
0.06942320615053177,
0.18230560421943665,
0.690665066242218,
0.36521852016448975,
-0.1364854872226715,
0.10336219519376755,
-0.3405779302120209,
-0.17632156610488892,
-0.30863040685653687,
-0.22023218870162964,
0.0691792368888855,
0.23126308619976044,
0.45501601696014404,
0.2721434235572815,
0.2278192937374115,
-0.06829430162906647,
0.1393442153930664,
-0.36661866307258606,
0.39844760298728943,
-0.18068711459636688,
0.28564879298210144,
0.21908600628376007,
-0.02906815893948078,
-0.18110807240009308,
-0.6279548406600952,
0.22817282378673553,
0.17175886034965515,
0.013129811733961105,
-0.04959011822938919,
0.1054142415523529,
0.17741800844669342,
0.3426145613193512,
-0.21936124563217163,
-0.028270432725548744,
-0.22091737389564514,
0.20687532424926758,
-0.1463596075773239,
-0.22189360857009888,
0.14809489250183105,
-0.044162750244140625,
-0.015897706151008606,
0.1630416363477707,
0.13581931591033936,
0.07468783110380173,
0.032172270119190216,
0.17456455528736115,
0.47840338945388794,
-0.26357942819595337,
0.2802180051803589,
-0.2502787411212921,
0.0017437376081943512,
0.16438937187194824,
0.27682745456695557,
-0.17530179023742676,
0.1120072603225708,
-0.011954598128795624,
-0.30550023913383484,
-0.2477167844772339,
-0.007318765856325626,
0.31552374362945557,
-0.14593812823295593,
-0.2534736692905426,
-0.0785348117351532,
0.19246992468833923,
0.28319549560546875,
0.30421075224876404,
0.023190289735794067,
-0.32250791788101196,
-0.053712647408246994,
0.02983327955007553,
0.33155590295791626,
0.2489202469587326,
-0.19830961525440216,
-0.04021502286195755,
-0.14521490037441254,
0.3150455951690674,
-0.4208286702632904,
0.11106725037097931,
-0.28925207257270813,
-0.3250941038131714
] |
https://github.com/huggingface/datasets/issues/406 | Faster Shuffling? | I tried using `.take` from pyarrow recordbatches but it doesn't improve the speed that much:
```python
import nlp
import numpy as np
dset = nlp.Dataset.from_file("dummy_test_select.arrow") # dummy dataset with 100000 examples like {"a": "h"*512}
indices = np.random.randint(0, 100_000, 1000_000)
```
```python
%%time
batch_size = 10_000
writer = ArrowWriter(schema=dset.schema, path="dummy_path",
writer_batch_size=1000, disable_nullable=False)
for i in tqdm(range(0, len(indices), batch_size)):
table = pa.concat_tables(dset._data.slice(int(i), 1) for i in indices[i : min(len(indices), i + batch_size)])
batch = table.to_pydict()
writer.write_batch(batch)
writer.finalize()
# 9.12s
```
```python
%%time
batch_size = 10_000
writer = ArrowWriter(schema=dset.schema, path="dummy_path",
writer_batch_size=1000, disable_nullable=False)
for i in tqdm(range(0, len(indices), batch_size)):
batch_indices = indices[i : min(len(indices), i + batch_size)]
# First, extract only the indices that we need with a mask
mask = [False] * len(dset)
for k in batch_indices:
mask[k] = True
t_batch = dset._data.filter(pa.array(mask))
# Second, build the list of indices for the filtered table, and taking care of duplicates
rev_positions = {}
duplicates = 0
for i, j in enumerate(sorted(batch_indices)):
if j in rev_positions:
duplicates += 1
else:
rev_positions[j] = i - duplicates
rev_map = [rev_positions[j] for j in batch_indices]
# Third, use `.take` from the combined recordbatch
t_combined = t_batch.combine_chunks() # load in memory
recordbatch = t_combined.to_batches()[0]
table = pa.Table.from_arrays(
[recordbatch[c].take(pa.array(rev_map)) for c in range(len(dset._data.column_names))],
schema=writer.schema
)
writer.write_table(table)
writer.finalize()
# 3.2s
```
| Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.) | 210 | Faster Shuffling?
Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.)
I tried using `.take` from pyarrow recordbatches but it doesn't improve the speed that much:
```python
import nlp
import numpy as np
dset = nlp.Dataset.from_file("dummy_test_select.arrow") # dummy dataset with 100000 examples like {"a": "h"*512}
indices = np.random.randint(0, 100_000, 1000_000)
```
```python
%%time
batch_size = 10_000
writer = ArrowWriter(schema=dset.schema, path="dummy_path",
writer_batch_size=1000, disable_nullable=False)
for i in tqdm(range(0, len(indices), batch_size)):
table = pa.concat_tables(dset._data.slice(int(i), 1) for i in indices[i : min(len(indices), i + batch_size)])
batch = table.to_pydict()
writer.write_batch(batch)
writer.finalize()
# 9.12s
```
```python
%%time
batch_size = 10_000
writer = ArrowWriter(schema=dset.schema, path="dummy_path",
writer_batch_size=1000, disable_nullable=False)
for i in tqdm(range(0, len(indices), batch_size)):
batch_indices = indices[i : min(len(indices), i + batch_size)]
# First, extract only the indices that we need with a mask
mask = [False] * len(dset)
for k in batch_indices:
mask[k] = True
t_batch = dset._data.filter(pa.array(mask))
# Second, build the list of indices for the filtered table, and taking care of duplicates
rev_positions = {}
duplicates = 0
for i, j in enumerate(sorted(batch_indices)):
if j in rev_positions:
duplicates += 1
else:
rev_positions[j] = i - duplicates
rev_map = [rev_positions[j] for j in batch_indices]
# Third, use `.take` from the combined recordbatch
t_combined = t_batch.combine_chunks() # load in memory
recordbatch = t_combined.to_batches()[0]
table = pa.Table.from_arrays(
[recordbatch[c].take(pa.array(rev_map)) for c in range(len(dset._data.column_names))],
schema=writer.schema
)
writer.write_table(table)
writer.finalize()
# 3.2s
```
| [
-0.20730312168598175,
0.142428457736969,
-0.02560337260365486,
-0.14535042643547058,
-0.10258960723876953,
-0.11131399869918823,
0.12113583087921143,
0.5408861637115479,
-0.2365826964378357,
0.01907193660736084,
-0.038117147982120514,
0.5862329602241516,
-0.16830362379550934,
-0.2764604091644287,
0.2058226466178894,
-0.04113674908876419,
0.033152081072330475,
-0.03620833158493042,
-0.2147114872932434,
-0.04712606221437454,
-0.05001847445964813,
-0.4499438405036926,
-0.23843982815742493,
-0.22347725927829742,
-0.01264754869043827,
-0.225724458694458,
-0.16544468700885773,
0.07869061827659607,
-0.1654578447341919,
0.055160798132419586,
-0.11502058804035187,
0.2012874186038971,
-0.10800758749246597,
0.16675704717636108,
-0.00011678290320560336,
-0.13864663243293762,
0.09931521117687225,
0.13057567179203033,
-0.3299340009689331,
0.17832142114639282,
0.4515007436275482,
-0.05048927664756775,
-0.1290053278207779,
-0.19089537858963013,
0.19028246402740479,
-0.4143754541873932,
0.08657212555408478,
-0.11465039849281311,
-0.1485537737607956,
-0.02291838824748993,
0.11401394009590149,
0.31411176919937134,
-0.18185146152973175,
0.25566983222961426,
0.4748249351978302,
0.27038246393203735,
-0.37506577372550964,
0.3879562020301819,
0.2586733102798462,
-0.021415840834379196,
-0.154535174369812,
0.25565701723098755,
-0.19492384791374207,
0.018123809248209,
0.14307385683059692,
0.17546799778938293,
0.10234461724758148,
0.4606054127216339,
0.10739675909280777,
0.4037257134914398,
0.29059919714927673,
-0.25497308373451233,
-0.29782867431640625,
-0.29418814182281494,
0.2330026924610138,
-0.07974665611982346,
0.05702567100524902,
0.3016260266304016,
-0.2735320031642914,
-0.21540114283561707,
-0.09742064028978348,
0.16403456032276154,
0.24801519513130188,
-0.2000269740819931,
0.32217979431152344,
0.39009180665016174,
0.20211751759052277,
-0.0607316717505455,
0.7018347978591919,
-0.10578128695487976,
0.4943528175354004,
-0.1712973713874817,
0.021909482777118683,
0.411685973405838,
-0.31918245553970337,
-0.2636018395423889,
-0.30103862285614014,
-0.1255466341972351,
-0.07115551084280014,
0.16033415496349335,
0.6939637064933777,
0.21446365118026733,
0.1904991716146469,
-0.0473998486995697,
0.0462990328669548,
0.0036273039877414703,
-0.30002740025520325,
0.07142315059900284,
-0.13240553438663483,
0.06484900414943695,
0.31249725818634033,
0.1253010779619217,
-0.07771145552396774,
-0.30897408723831177,
-0.04262133687734604,
-0.2280753254890442,
-0.48016834259033203,
0.11605985462665558,
0.009132297709584236,
-0.3454589545726776,
-0.13750076293945312,
-0.05334075167775154,
0.006661164574325085,
0.15207166969776154,
-0.14621706306934357,
0.25346800684928894,
-0.08213148266077042,
-0.16872704029083252,
-0.11358709633350372,
0.028761915862560272,
-0.03240330144762993,
0.08957323431968689,
-0.1062910407781601,
0.07185587286949158,
0.029997114092111588,
0.4717019200325012,
-0.2529066205024719,
0.01695549115538597,
0.09523981809616089,
0.3210919499397278,
0.04331083595752716,
-0.11361846327781677,
0.08302932232618332,
0.11236734688282013,
-0.09799612313508987,
-0.14904028177261353,
-0.13267762959003448,
0.04593246430158615,
-0.3395209312438965,
0.38543298840522766,
0.02591368928551674,
-0.1179540604352951,
0.06963074952363968,
0.12440662086009979,
0.24364103376865387,
-0.2887320816516876,
-0.5230552554130554,
-0.06483705341815948,
-0.031110025942325592,
-0.10968007147312164,
0.08879949152469635,
-0.05501338839530945,
0.08861961960792542,
-0.1288459151983261,
0.06463365256786346,
-0.2630295157432556,
-0.07936061918735504,
0.10275489091873169,
-0.05877452716231346,
0.5555561184883118,
0.45229244232177734,
0.6798376441001892,
-0.07100587338209152,
0.05680288374423981,
0.1080939769744873,
0.030906513333320618,
0.6843822002410889,
0.19454219937324524,
-0.2532132565975189,
-0.0193489920347929,
-0.11208967864513397,
0.02533361129462719,
0.342955619096756,
0.2405739277601242,
0.06896138191223145,
-0.07797450572252274,
0.37468042969703674,
0.2942918539047241,
0.04834911972284317,
0.26489925384521484,
-0.4871969521045685,
-0.1362500935792923,
0.23100346326828003,
0.43126657605171204,
-0.6047835946083069,
-0.36732080578804016,
0.04098862037062645,
-0.26273655891418457,
0.343771755695343,
-0.16341987252235413,
-0.024147380143404007,
-0.002875667065382004,
-0.07283651828765869,
0.004096522927284241,
-0.1673833131790161,
0.10091159492731094,
-0.2770060896873474,
-0.08510246127843857,
-0.012308523058891296,
-0.09344367682933807,
0.22207307815551758,
-0.3609890937805176,
0.18479573726654053,
-0.19152025878429413,
0.1916130781173706,
0.20728763937950134,
-0.010497502982616425,
-0.19801297783851624,
0.4299575984477997,
-0.10241599380970001,
-0.08071444928646088,
-0.03103853203356266,
-0.29756268858909607,
0.03710903972387314,
-0.15968571603298187,
-0.13898448646068573,
0.11403144150972366,
-0.21693280339241028,
0.13561780750751495,
0.3588957190513611,
-0.2914268970489502,
0.07211043685674667,
0.09998311847448349,
0.23706775903701782,
-0.09144032001495361,
-0.1885741502046585,
0.03440268337726593,
0.24012887477874756,
-0.05743078142404556,
0.22634637355804443,
0.11869370192289352,
-0.20455403625965118,
0.15607821941375732,
-0.05302301049232483,
-0.4021678864955902,
0.5432927012443542,
-0.484753280878067,
0.3439687490463257,
0.18779286742210388,
-0.2420198619365692,
-0.12566617131233215,
0.26058706641197205,
-0.0751948207616806,
0.4508640468120575,
0.5965420603752136,
0.0635082870721817,
0.07480201125144958,
0.4007711410522461,
-0.2726926803588867,
0.04917431250214577,
0.44781747460365295,
-0.0474848598241806,
-0.053761109709739685,
0.07784301042556763,
-0.024494051933288574,
-0.2125135064125061,
-0.08564328402280807,
0.026968877762556076,
0.21423408389091492,
0.2641346752643585,
0.11263123154640198,
-0.047986626625061035,
-0.08722284436225891,
-0.2304074615240097,
0.1614469438791275,
-0.04659813642501831,
0.08370421826839447,
-0.09750888496637344,
0.11205729097127914,
-0.03038538247346878,
-0.21481648087501526,
-0.18301691114902496,
0.09669572114944458,
0.1835552603006363,
0.13545146584510803,
0.06915473192930222,
-0.14093513786792755,
-0.10866007953882217,
-0.12632045149803162,
-0.08095883578062057,
0.028073487803339958,
-0.10201733559370041,
0.11476106196641922,
0.2489229440689087,
-0.20364707708358765,
-0.2030915915966034,
-0.11689320206642151,
0.33520403504371643,
-0.10545113682746887,
-0.19403068721294403,
-0.18234409391880035,
-0.00913660041987896,
-0.13431498408317566,
0.0485684834420681,
0.1978747546672821,
0.3558701276779175,
0.3271755874156952,
0.14947178959846497,
-0.22009511291980743,
0.021561160683631897,
0.09381105750799179,
-0.22090956568717957,
0.0969473272562027,
-0.37785595655441284,
-0.08128932118415833,
-0.17701835930347443,
-0.42635583877563477,
-0.27991485595703125,
0.05943984165787697,
-0.11731766164302826,
-0.09087943285703659,
0.3733411729335785,
0.13760033249855042,
-0.2064497023820877,
-0.12013356387615204,
-0.049321599304676056,
-0.07491465657949448,
-0.3606600761413574,
0.3090262711048126,
-0.12537455558776855,
0.1422896385192871,
-0.003099103458225727,
-0.10964660346508026,
-0.024907536804676056,
-0.570539116859436,
-0.0554804727435112,
0.15818876028060913,
-0.11931298673152924,
0.2787477672100067,
0.11740052700042725,
-0.13365791738033295,
-0.4510357677936554,
-0.06930989772081375,
-0.08964960277080536,
0.49836862087249756,
-0.07748804986476898,
0.22129181027412415,
-0.38104790449142456,
-0.03440883010625839,
-0.10129311680793762,
0.14044584333896637,
0.4684353768825531,
-0.18753595650196075,
-0.10237280279397964,
0.3078250288963318,
0.1736067831516266,
0.07016017287969589,
0.23837563395500183,
0.11952391266822815,
0.1213330551981926,
0.13633444905281067,
0.2258579134941101,
0.47335076332092285,
-0.04702267423272133,
0.2490295171737671,
-0.24660590291023254,
0.04611168056726456,
-0.03076973184943199,
-0.30002304911613464,
0.14437291026115417,
0.19480650126934052,
0.01751326024532318,
-0.12045393139123917,
0.260273277759552,
-0.10879333317279816,
-0.2526509463787079,
-0.057994138449430466,
0.4636724889278412,
0.16345307230949402,
-0.2731417119503021,
0.5276743173599243,
-0.20752018690109253,
0.006901152431964874,
-0.0099866334348917,
0.2193986177444458,
-0.07580561935901642,
-0.23321765661239624,
0.08655950427055359,
-0.08118781447410583,
-0.03938113898038864,
-0.005483097862452269,
-0.5912709832191467,
-0.09392017871141434,
-0.6903495788574219,
0.22435839474201202,
0.2033420354127884,
0.45517200231552124,
0.2934633493423462,
-0.30328261852264404,
0.42818909883499146,
-0.1267062872648239,
0.26249757409095764,
0.18449218571186066,
-0.2910938858985901,
0.206032857298851,
0.006221018731594086,
-0.48820796608924866,
-0.07448935508728027,
-0.3385712802410126,
-0.37024426460266113,
0.09648048877716064,
0.21843929588794708,
-0.3918662369251251,
0.02539271116256714,
0.013567257672548294,
-0.0772421732544899,
-0.015701867640018463,
0.011921067722141743,
-0.3758600950241089,
-0.24667122960090637,
0.07837472856044769,
0.29980242252349854,
-0.053579214960336685,
0.008025817573070526,
0.10297247767448425,
0.23696555197238922,
0.12670117616653442,
-0.010370250791311264,
0.06483031809329987,
-0.08992467820644379,
-0.01972179114818573,
-0.00009424996096640825,
0.13765552639961243,
0.19039613008499146,
0.08322205394506454,
-0.12752896547317505,
-0.05088766664266586,
0.24871708452701569,
0.02489630877971649,
-0.107637919485569,
-0.1637818068265915,
0.39713287353515625,
0.3331100344657898,
0.22230373322963715,
0.2512412965297699,
0.04352977126836777,
0.27047213912010193,
0.01934867724776268,
-0.44960910081863403,
0.0902751013636589,
-0.34589675068855286,
-0.07792172580957413,
-0.6981350183486938,
0.3353744447231293,
0.3034202754497528,
0.14670780301094055,
0.23826491832733154,
-0.13125886023044586,
0.2584003806114197,
0.390669047832489,
0.18681608140468597,
0.9388632774353027,
-0.3655799627304077,
0.4324251115322113,
0.3174656629562378,
-0.2735367715358734,
0.07709802687168121,
-0.09529807418584824,
0.36207032203674316,
-0.16649825870990753,
-0.061501406133174896,
0.22909556329250336,
-0.20282264053821564,
-0.035940833389759064,
0.07395556569099426,
0.03641778603196144,
0.12655028700828552,
-0.010872520506381989,
-0.2703075408935547,
-0.2791452407836914,
-0.025185097008943558,
-0.3461184501647949,
-0.4222586154937744,
-0.06496080756187439,
0.009078390896320343,
-0.12613961100578308,
-0.1887587606906891,
0.17642447352409363,
0.10536821186542511,
-0.3683377802371979,
0.14379030466079712,
-0.19497050344944,
-0.023059599101543427,
0.12702280282974243,
-0.012713570147752762,
0.22348837554454803,
-0.252495676279068,
-0.10773348808288574,
-0.19662146270275116,
-0.18682454526424408,
0.04352794215083122,
0.17439110577106476,
0.14198927581310272,
0.29099392890930176,
0.3207318186759949,
0.35453784465789795,
-0.30618786811828613,
0.20157206058502197,
0.020485784858465195,
0.26040196418762207,
0.08387437462806702,
0.011856679804623127,
-0.7292296290397644,
-0.2502439618110657,
0.09365584701299667,
0.6161047220230103,
0.030132612213492393,
-0.053885359317064285,
0.1784057319164276,
-0.36538732051849365,
-0.09516124427318573,
0.08477011322975159,
0.0038558319211006165,
0.14265407621860504,
0.39740708470344543,
0.21687859296798706,
-0.17876318097114563,
-0.002124059945344925,
0.3385831117630005,
0.09163074940443039,
0.1737976372241974,
0.2557826638221741,
0.004442531615495682,
-0.47876739501953125,
-0.22088316082954407,
0.11957547813653946,
0.09272510558366776,
-0.3995620012283325,
0.2578273117542267,
0.030492834746837616,
-0.06475912034511566,
0.14373891055583954,
0.20303615927696228,
-0.038407132029533386,
-0.031666100025177,
-0.3079482913017273,
-0.08399758487939835,
0.16713371872901917,
0.48805367946624756,
0.44944941997528076,
0.04072720557451248,
0.0059977248311042786,
0.2657167613506317,
-0.4514319598674774,
-0.18560482561588287,
-0.21258319914340973,
-0.16431094706058502,
0.11837383359670639,
0.14869724214076996,
-0.19627271592617035,
-0.2467673122882843,
-0.2014061063528061,
0.12161923944950104,
0.10836577415466309,
0.21228402853012085,
0.06901015341281891,
-0.16967353224754333,
0.0784119963645935,
0.05652664601802826,
0.06800047308206558,
-0.029617024585604668,
0.013001908548176289,
-0.40909039974212646,
-0.3787914216518402,
-0.2591433525085449,
-0.22031062841415405,
-0.03591049835085869,
-0.014361269772052765,
-0.32359907031059265,
0.17572838068008423,
0.13708633184432983,
-0.10186200588941574,
0.502397894859314,
-0.4558422863483429,
-0.2822432518005371,
-0.21243831515312195,
-0.01172541081905365,
0.00028099282644689083,
-0.060792043805122375,
-0.13323375582695007,
0.0808451920747757,
0.12201350182294846,
-0.06611314415931702,
0.23273447155952454,
-0.17602741718292236,
0.031067948788404465,
-0.1178009957075119,
0.21235962212085724,
0.5724339485168457,
0.28586915135383606,
-0.504954993724823,
0.4132998585700989,
0.07613135874271393,
-0.10946577042341232,
-0.20353585481643677,
-0.3783611059188843,
0.26296529173851013,
0.03078267350792885,
0.05448289215564728,
-0.28004300594329834,
-0.14984172582626343,
-0.40169966220855713,
-0.10377626866102219,
-0.12082380801439285,
-0.4394885301589966,
-0.3144519031047821,
0.34427139163017273,
0.3613235056400299,
-0.2875060737133026,
0.19184435904026031,
-0.02681542932987213,
0.014408312737941742,
0.13366460800170898,
0.2126208245754242,
0.3895174562931061,
0.703346312046051,
0.29817092418670654,
-0.46833041310310364,
-0.09088687598705292,
-0.018253143876791,
0.5345418453216553,
0.2181617170572281,
0.3152851462364197,
0.3625561594963074,
0.11964397132396698,
0.060079365968704224,
0.17628604173660278,
-0.017582152038812637,
-0.14261232316493988,
0.0021405965089797974,
0.06420309841632843,
-0.0033137761056423187,
-0.08596152067184448,
-0.2722112536430359,
0.18190418183803558,
-0.34354984760284424,
0.3356216549873352,
0.2366923689842224,
0.0677236020565033,
0.43121933937072754,
-0.41430094838142395,
0.1808575987815857,
-0.102854885160923,
0.4148305058479309,
-0.26387161016464233,
-0.14174452424049377,
-0.04953421652317047,
0.18888087570667267,
0.24711380898952484,
0.0517047680914402,
-0.13872773945331573,
0.24360008537769318,
-0.07852813601493835,
0.041172441095113754,
-0.5003126263618469,
-0.009305436164140701,
-0.058235201984643936,
0.22831560671329498,
0.48793795704841614,
-0.15855805575847626,
0.2480303794145584,
0.024564260616898537,
-0.1947028785943985,
-0.10072252154350281,
-0.08720631897449493,
-0.028839483857154846,
-0.10660813748836517,
0.10062605142593384,
0.16228660941123962,
-0.37289202213287354,
-0.047851309180259705,
0.15605181455612183,
-0.11368749290704727,
-0.14568722248077393,
-0.5345343947410583,
-0.19297978281974792,
-0.12560391426086426,
0.08317974954843521,
0.04283828288316727,
0.09162439405918121,
0.7034354209899902,
0.40741050243377686,
-0.12637484073638916,
0.1671239733695984,
-0.2396189123392105,
-0.25130030512809753,
-0.29891666769981384,
-0.33492511510849,
-0.10494901239871979,
0.24172914028167725,
0.5042905807495117,
0.2844422161579132,
0.320512056350708,
-0.06407585740089417,
0.17687536776065826,
-0.32918915152549744,
0.3407909870147705,
-0.17317427694797516,
0.2252843677997589,
0.25258123874664307,
-0.04853850603103638,
-0.217092826962471,
-0.6656165719032288,
0.199062779545784,
0.24311533570289612,
-0.005819946527481079,
0.0005773454904556274,
0.032727621495723724,
0.15655452013015747,
0.3020458221435547,
-0.17433087527751923,
-0.052987635135650635,
-0.16654080152511597,
0.2265949845314026,
-0.1683642715215683,
-0.2666848599910736,
0.24942277371883392,
0.024098049849271774,
0.011700890958309174,
0.06657189130783081,
0.12003234028816223,
0.06211397796869278,
0.08302976191043854,
0.15141932666301727,
0.5137016773223877,
-0.2719222903251648,
0.20242303609848022,
-0.2667110562324524,
0.06970638036727905,
0.14939448237419128,
0.3052287697792053,
-0.2260487973690033,
0.04483010619878769,
-0.025606796145439148,
-0.26178357005119324,
-0.19808509945869446,
0.06094347685575485,
0.4382952153682709,
-0.1793806552886963,
-0.21321487426757812,
-0.0514393076300621,
0.23286017775535583,
0.2575274109840393,
0.3161087930202484,
0.13609758019447327,
-0.2586580812931061,
-0.04494500532746315,
-0.0011652279645204544,
0.36427876353263855,
0.16050489246845245,
-0.1450718641281128,
-0.010718829929828644,
-0.14537547528743744,
0.3728184998035431,
-0.4335765838623047,
0.08356241881847382,
-0.3130490779876709,
-0.3294510245323181
] |
https://github.com/huggingface/datasets/issues/406 | Faster Shuffling? | Shuffling is now significantly faster thanks to #513
Feel free to play with it now :)
Closing this one, but feel free to re-open if you have other questions | Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.) | 29 | Faster Shuffling?
Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.)
Shuffling is now significantly faster thanks to #513
Feel free to play with it now :)
Closing this one, but feel free to re-open if you have other questions | [
-0.16697460412979126,
0.07589302957057953,
-0.07566961646080017,
-0.10691538453102112,
-0.04517553001642227,
-0.10969877988100052,
0.10494482517242432,
0.5459719300270081,
-0.22242628037929535,
0.11074379086494446,
-0.017152950167655945,
0.5978962182998657,
-0.1472129076719284,
-0.22477908432483673,
0.1525784283876419,
-0.09172196686267853,
0.01974700391292572,
-0.0066343918442726135,
-0.2984008491039276,
-0.06819793581962585,
-0.10767994821071625,
-0.34072959423065186,
-0.19667871296405792,
-0.2414293736219406,
-0.021104728803038597,
-0.2671125531196594,
-0.1641608029603958,
0.12719812989234924,
-0.1086060181260109,
0.035609692335128784,
-0.1816462278366089,
0.20367230474948883,
-0.10194357484579086,
0.25180351734161377,
-0.00010644015856087208,
-0.18781708180904388,
-0.0013787038624286652,
0.1245126724243164,
-0.318511962890625,
0.17000748217105865,
0.4203972816467285,
-0.036648549139499664,
-0.18106727302074432,
-0.24702119827270508,
0.13357913494110107,
-0.24390952289104462,
0.1669653058052063,
-0.08826117217540741,
-0.07873448729515076,
-0.03483366593718529,
0.19461944699287415,
0.3067125976085663,
-0.14238594472408295,
0.13171212375164032,
0.5130021572113037,
0.0983550176024437,
-0.33345502614974976,
0.2333613485097885,
0.2945881187915802,
-0.08632136136293411,
-0.17735525965690613,
0.2387264519929886,
-0.09595466405153275,
-0.06728911399841309,
0.13714255392551422,
0.11447548121213913,
0.09599143266677856,
0.3252634108066559,
0.059160783886909485,
0.41562512516975403,
0.2406330108642578,
-0.201820969581604,
-0.2674720585346222,
-0.27203455567359924,
0.20222918689250946,
-0.044944800436496735,
0.10430583357810974,
0.270442396402359,
-0.23939387500286102,
-0.15952783823013306,
-0.0910152792930603,
0.1850961446762085,
0.2104177176952362,
-0.19178371131420135,
0.2724062204360962,
0.4423377811908722,
0.22302642464637756,
-0.1347959041595459,
0.6850684881210327,
-0.14292633533477783,
0.3533967435359955,
-0.0897839292883873,
0.023688124492764473,
0.413565069437027,
-0.28342920541763306,
-0.3294467329978943,
-0.24999743700027466,
-0.18255284428596497,
-0.11076869815587997,
0.1838965117931366,
0.7327426671981812,
0.24534761905670166,
0.21953649818897247,
-0.0025335922837257385,
0.004426058381795883,
0.017255697399377823,
-0.30335310101509094,
0.06766918301582336,
-0.08331926167011261,
0.174163356423378,
0.18959678709506989,
0.12653036415576935,
-0.08755182474851608,
-0.3122538924217224,
-0.10357774794101715,
-0.16771656274795532,
-0.4825846552848816,
0.13870950043201447,
0.015533501282334328,
-0.28441208600997925,
-0.06679093837738037,
-0.009928562678396702,
0.001803843304514885,
0.2151007056236267,
-0.15386202931404114,
0.27515438199043274,
-0.03062976896762848,
-0.23890866339206696,
-0.1474359929561615,
-0.09216972440481186,
-0.08410529047250748,
0.0927615761756897,
-0.18541547656059265,
0.01117259357124567,
0.10705727338790894,
0.4471130073070526,
-0.18131467700004578,
0.07501273602247238,
0.09326730668544769,
0.3140336275100708,
0.07475455105304718,
-0.14500299096107483,
0.05290612205862999,
0.030099868774414062,
-0.15387995541095734,
-0.18710708618164062,
-0.1639692783355713,
0.12983927130699158,
-0.29641368985176086,
0.3371613621711731,
0.0634576678276062,
-0.11480270326137543,
0.1358180195093155,
0.24199526011943817,
0.2536458373069763,
-0.27834880352020264,
-0.3240192234516144,
0.0042139142751693726,
-0.030078835785388947,
-0.05880618467926979,
0.08890422433614731,
0.007969489321112633,
0.05580567196011543,
-0.15064950287342072,
0.033212512731552124,
-0.2832561731338501,
-0.030103377997875214,
0.13874618709087372,
-0.06306840479373932,
0.4716359078884125,
0.37845170497894287,
0.5905827283859253,
-0.09272026270627975,
0.0524725541472435,
0.15180781483650208,
0.10007378458976746,
0.6754482388496399,
0.18476657569408417,
-0.22225388884544373,
0.006971928756684065,
-0.1234954446554184,
0.018920620903372765,
0.32998383045196533,
0.21902112662792206,
0.10644516348838806,
-0.047062087804079056,
0.4243720769882202,
0.308651328086853,
0.05760733038187027,
0.2672395706176758,
-0.5271468162536621,
-0.16801276803016663,
0.23976346850395203,
0.4268020689487457,
-0.48361942172050476,
-0.393161416053772,
0.02155965566635132,
-0.24578681588172913,
0.33524179458618164,
-0.22232693433761597,
0.004805487580597401,
0.07809734344482422,
-0.09887842833995819,
0.0684453472495079,
-0.17221228778362274,
-0.046162255108356476,
-0.2284313440322876,
-0.030757399275898933,
-0.05111461132764816,
-0.021924324333667755,
0.282306432723999,
-0.37609440088272095,
0.13891619443893433,
-0.23512285947799683,
0.22310945391654968,
0.1523120403289795,
0.10318917036056519,
-0.12225410342216492,
0.3160507380962372,
-0.1441674530506134,
-0.12498551607131958,
-0.032915182411670685,
-0.28584617376327515,
0.06023373827338219,
-0.14288216829299927,
-0.1032397449016571,
0.04142260551452637,
-0.17431864142417908,
0.180192768573761,
0.43126180768013,
-0.3207772970199585,
0.08514280617237091,
0.1532297432422638,
0.2604207396507263,
-0.12932966649532318,
-0.154677614569664,
0.15117311477661133,
0.17788264155387878,
-0.08398216962814331,
0.2608780562877655,
0.06711961328983307,
-0.09817078709602356,
0.11916355788707733,
0.02828456461429596,
-0.36079469323158264,
0.5761179327964783,
-0.4362386167049408,
0.2577606737613678,
0.15059641003608704,
-0.2896021902561188,
-0.15274479985237122,
0.1924866884946823,
-0.06892050802707672,
0.3874969184398651,
0.6559896469116211,
0.093346506357193,
0.04086444899439812,
0.4048002362251282,
-0.3637101352214813,
0.13662467896938324,
0.5051817893981934,
0.017594415694475174,
-0.061206795275211334,
0.04548902437090874,
0.09981633722782135,
-0.08284972608089447,
-0.15165913105010986,
0.059262555092573166,
0.1986670196056366,
0.3086874783039093,
0.11051011830568314,
-0.0429089292883873,
-0.15223746001720428,
-0.22537732124328613,
0.14671312272548676,
-0.08106778562068939,
0.1443345844745636,
-0.04617542028427124,
0.1731485277414322,
0.028290968388319016,
-0.24688145518302917,
-0.19587638974189758,
0.10103359818458557,
0.15784551203250885,
0.13009104132652283,
0.04565349221229553,
-0.11859375983476639,
-0.1928803026676178,
-0.1469244807958603,
-0.008756534196436405,
-0.041058655828237534,
-0.06559240072965622,
0.22037619352340698,
0.2674480974674225,
-0.29679441452026367,
-0.24415062367916107,
-0.0966951996088028,
0.3949587941169739,
-0.09810911864042282,
-0.08823172748088837,
-0.2022630274295807,
0.04341118410229683,
-0.11296076327562332,
0.15779250860214233,
0.20934619009494781,
0.278398334980011,
0.4065812826156616,
0.14978225529193878,
-0.2056584656238556,
0.11259624361991882,
-0.0035842135548591614,
-0.2856872081756592,
0.05974439159035683,
-0.2784022092819214,
-0.07962927222251892,
-0.12883740663528442,
-0.370323121547699,
-0.367868572473526,
0.06624776124954224,
-0.1745668351650238,
-0.14714743196964264,
0.2800321877002716,
0.2361859381198883,
-0.1627958118915558,
-0.2388627976179123,
-0.22413179278373718,
-0.00046815909445285797,
-0.4718468487262726,
0.3313354253768921,
-0.07714862376451492,
0.2015341818332672,
-0.08522892743349075,
-0.12307199090719223,
-0.002706946572288871,
-0.46135517954826355,
-0.015398107469081879,
0.1507294923067093,
-0.16858266294002533,
0.27936792373657227,
0.015095509588718414,
-0.17593640089035034,
-0.40898385643959045,
-0.07974256575107574,
-0.04272765293717384,
0.41917121410369873,
-0.11284016817808151,
0.21145844459533691,
-0.35447368025779724,
-0.01884033903479576,
-0.10470765829086304,
0.09917618334293365,
0.41392654180526733,
-0.140569806098938,
-0.21417869627475739,
0.2670759856700897,
0.18713611364364624,
0.05659892037510872,
0.2416379451751709,
0.169084370136261,
0.0107144545763731,
0.11639925092458725,
0.2601453363895416,
0.44091296195983887,
-0.08313438296318054,
0.3029327690601349,
-0.17116323113441467,
0.11694391816854477,
-0.07875645160675049,
-0.24793902039527893,
0.0979946032166481,
0.15955203771591187,
0.02250427007675171,
-0.11012745648622513,
0.3593631386756897,
-0.07943861186504364,
-0.28852397203445435,
-0.09890523552894592,
0.3730291426181793,
0.10688921064138412,
-0.2913452684879303,
0.5682029128074646,
-0.19538868963718414,
0.01346336305141449,
-0.0165439210832119,
0.19179970026016235,
-0.0891629159450531,
-0.20273804664611816,
0.04127197340130806,
-0.11330905556678772,
-0.0761406198143959,
0.0043634348548948765,
-0.5783764719963074,
-0.11985205858945847,
-0.7263137102127075,
0.15535013377666473,
0.23164401948451996,
0.36839672923088074,
0.20241521298885345,
-0.32601943612098694,
0.35465413331985474,
-0.15723104774951935,
0.348621666431427,
0.16061647236347198,
-0.32520294189453125,
0.26884573698043823,
-0.0398484505712986,
-0.40781551599502563,
-0.0648057833313942,
-0.3783375322818756,
-0.39346763491630554,
0.16850146651268005,
0.23111501336097717,
-0.3417012393474579,
-0.03231661394238472,
-0.014600560069084167,
-0.10423514991998672,
-0.005624890327453613,
-0.005770833231508732,
-0.3624518811702728,
-0.21146246790885925,
-0.057143792510032654,
0.30833688378334045,
-0.05098915845155716,
0.11284742504358292,
-0.05035123974084854,
0.10734359920024872,
0.19029784202575684,
-0.019557803869247437,
0.12759578227996826,
-0.05929389223456383,
0.005624729208648205,
0.030117714777588844,
0.12988050282001495,
0.15271693468093872,
0.14900252223014832,
-0.10305801033973694,
-0.05614108592271805,
0.15910792350769043,
0.12781859934329987,
-0.13624751567840576,
-0.22320638597011566,
0.4086349308490753,
0.3234094977378845,
0.23042716085910797,
0.2706475555896759,
0.001527491956949234,
0.3054816424846649,
0.009950543753802776,
-0.342987984418869,
0.10123841464519501,
-0.3108823895454407,
-0.14031824469566345,
-0.6326967477798462,
0.2537315785884857,
0.2337566465139389,
0.11939531564712524,
0.24094566702842712,
-0.2747865915298462,
0.13043445348739624,
0.35085994005203247,
0.17149552702903748,
0.9784502983093262,
-0.3513525724411011,
0.427563339471817,
0.2920377254486084,
-0.1599375605583191,
0.1142091155052185,
-0.21147145330905914,
0.4349352717399597,
-0.16261835396289825,
-0.07794781029224396,
0.2206713855266571,
-0.10785612463951111,
-0.03289569169282913,
0.12910214066505432,
-0.035137925297021866,
0.11180367320775986,
0.02408584952354431,
-0.22384241223335266,
-0.3050849437713623,
-0.02486841008067131,
-0.3679124414920807,
-0.4044310748577118,
-0.15230077505111694,
0.0756225436925888,
-0.035310253500938416,
-0.21831455826759338,
0.08456962555646896,
0.05691724643111229,
-0.35657909512519836,
0.1671098917722702,
-0.141159325838089,
-0.046647846698760986,
0.04243219643831253,
-0.004942769184708595,
0.19691132009029388,
-0.21986672282218933,
-0.08900447189807892,
-0.14745652675628662,
-0.15716886520385742,
0.1294109970331192,
0.16655568778514862,
0.13776516914367676,
0.22410723567008972,
0.31703516840934753,
0.2754783630371094,
-0.25946566462516785,
0.28067901730537415,
-0.09486497938632965,
0.171553373336792,
0.05873832851648331,
0.010799203999340534,
-0.7354450821876526,
-0.2590075731277466,
0.06289555877447128,
0.42528289556503296,
-0.04351251199841499,
0.011204006150364876,
0.23311816155910492,
-0.41848793625831604,
-0.16259437799453735,
0.18037785589694977,
-0.05645284056663513,
0.06778265535831451,
0.40451768040657043,
0.25916993618011475,
-0.24430154263973236,
-0.05562979355454445,
0.33416974544525146,
0.08811977505683899,
0.19217199087142944,
0.2500740587711334,
0.03575047478079796,
-0.4441969394683838,
-0.34944063425064087,
0.09371597319841385,
0.031078694388270378,
-0.28516101837158203,
0.2599407732486725,
0.03697459027171135,
-0.12735532224178314,
0.19885629415512085,
0.28380924463272095,
-0.03919197618961334,
-0.040568165481090546,
-0.2472265213727951,
-0.09561678767204285,
0.07023678719997406,
0.4469088315963745,
0.4409602880477905,
0.07913650572299957,
-0.000886913388967514,
0.3681527376174927,
-0.38916540145874023,
-0.1299380511045456,
-0.33355283737182617,
-0.1338440477848053,
-0.013370521366596222,
0.1615580916404724,
-0.12461431324481964,
-0.27224624156951904,
-0.18431203067302704,
0.21492519974708557,
0.19290658831596375,
0.2269633412361145,
-0.005659807473421097,
-0.2980473041534424,
0.0635204017162323,
-0.0011382997035980225,
-0.024638988077640533,
0.04457107186317444,
0.013492404483258724,
-0.35676831007003784,
-0.36194419860839844,
-0.22151607275009155,
-0.23381026089191437,
-0.11488097906112671,
-0.01437697559595108,
-0.18967753648757935,
0.20719636976718903,
0.15649186074733734,
-0.05732009559869766,
0.44896307587623596,
-0.40278249979019165,
-0.31011962890625,
-0.20462264120578766,
-0.010111749172210693,
-0.034824520349502563,
-0.05765429139137268,
-0.061221830546855927,
0.07156575471162796,
0.10078178346157074,
-0.039818331599235535,
0.23575487732887268,
-0.10279780626296997,
-0.03966826573014259,
-0.015707800164818764,
0.1746309995651245,
0.5327726602554321,
0.23931968212127686,
-0.42097121477127075,
0.36802107095718384,
0.21632151305675507,
-0.1668006032705307,
-0.16903311014175415,
-0.3094877004623413,
0.16265074908733368,
0.0659174770116806,
0.029635414481163025,
-0.2250954657793045,
-0.1986941695213318,
-0.30126047134399414,
-0.06372499465942383,
-0.19093826413154602,
-0.3947409987449646,
-0.17977921664714813,
0.3211906850337982,
0.36216315627098083,
-0.30038830637931824,
0.15532760322093964,
-0.03164076432585716,
0.05850258097052574,
0.1827097088098526,
0.23907646536827087,
0.3683660924434662,
0.6607502102851868,
0.3610318899154663,
-0.4724353849887848,
-0.1147834062576294,
-0.015102516859769821,
0.525004506111145,
0.23038604855537415,
0.2822842299938202,
0.3461495339870453,
0.18515124917030334,
0.08843390643596649,
0.06454337388277054,
-0.04554379731416702,
-0.09143096208572388,
-0.09409812837839127,
0.04192120209336281,
-0.011356620118021965,
-0.17901626229286194,
-0.2583906054496765,
0.19404922425746918,
-0.2067512571811676,
0.30139055848121643,
0.25670623779296875,
0.07060917466878891,
0.42158228158950806,
-0.4581940770149231,
0.20926198363304138,
-0.13241809606552124,
0.4662483036518097,
-0.313248872756958,
-0.08374476432800293,
0.00338590145111084,
0.08791834861040115,
0.2972170412540436,
0.023302122950553894,
-0.12688779830932617,
0.21614614129066467,
-0.15971244871616364,
0.08174338936805725,
-0.5459915995597839,
0.027019063010811806,
-0.19258567690849304,
0.2017214447259903,
0.5362648963928223,
-0.14071384072303772,
0.3526442050933838,
0.09411638230085373,
-0.25570812821388245,
-0.11964118480682373,
-0.09641718864440918,
-0.04933169111609459,
-0.13891318440437317,
0.10644330084323883,
0.2326950877904892,
-0.3602101504802704,
-0.05364721268415451,
0.10265718400478363,
-0.23918116092681885,
-0.11132875084877014,
-0.48616570234298706,
-0.22530120611190796,
-0.117969810962677,
0.023242268711328506,
0.10241090506315231,
0.14782506227493286,
0.7567026615142822,
0.34292536973953247,
-0.15286535024642944,
0.16617290675640106,
-0.36693447828292847,
-0.3012743890285492,
-0.2292391061782837,
-0.27442216873168945,
0.03478898108005524,
0.19224242866039276,
0.4784705936908722,
0.20305633544921875,
0.19486315548419952,
-0.03331293165683746,
0.09786991029977798,
-0.310242235660553,
0.3355524241924286,
-0.2313394397497177,
0.3123433291912079,
0.1673240214586258,
-0.07072944939136505,
-0.15204989910125732,
-0.6242111325263977,
0.19679425656795502,
0.10440830886363983,
0.09607890993356705,
0.014555919915437698,
0.0407966673374176,
0.18343514204025269,
0.3243217468261719,
-0.17609143257141113,
-0.07344838231801987,
-0.20312869548797607,
0.16176676750183105,
-0.13794824481010437,
-0.22021076083183289,
0.1556532084941864,
-0.01290250476449728,
-0.033217355608940125,
0.12385134398937225,
0.15799680352210999,
0.06047715246677399,
0.11387097835540771,
0.1917484700679779,
0.4745636284351349,
-0.19447219371795654,
0.2417832911014557,
-0.2040429562330246,
0.008095808327198029,
0.1869804561138153,
0.24316425621509552,
-0.22535286843776703,
0.21102184057235718,
0.01814211905002594,
-0.2957248389720917,
-0.24942448735237122,
-0.06880892813205719,
0.3604046106338501,
-0.18403223156929016,
-0.27365681529045105,
-0.1092582643032074,
0.16351082921028137,
0.2349601686000824,
0.30313774943351746,
0.022022321820259094,
-0.2748109698295593,
-0.023333963006734848,
0.03244376182556152,
0.2525328993797302,
0.26558589935302734,
-0.17203719913959503,
-0.08089595288038254,
-0.13468782603740692,
0.2549237608909607,
-0.41114675998687744,
0.09482138603925705,
-0.27133142948150635,
-0.3557104468345642
] |
https://github.com/huggingface/datasets/issues/406 | Faster Shuffling? | > Shuffling is now significantly faster thanks to #513 Feel free to play with it now :)
>
> Closing this one, but feel free to re-open if you have other questions
I have a similar issue. My code is
```
for batch_num in range(num_batches):
print(f'--> {batch_num=}\n') if verbose else None
# - Get batch
shuffled_dataset = dataset.shuffle(buffer_size=buffer_size, seed=seed)
raw_text_batch = shuffled_dataset.take(batch_size)
tokenized_batch = map(raw_text_batch)
if verbose:
time_start = time.time()
print(f'{raw_text_batch=}')
print(f'{tokenized_batch=}')
print(f'{next(iter(raw_text_batch))=}')
print(f'{next(iter(tokenized_batch))=}')
print(f'Time it took: {time.time() - time_start} seconds \a\n')
```
without the suffle it takes 4.5 secs with it takes 87.1 secs. Is this difference expected? my dataset version is:
```
(beyond_scale) brando9@ampere1:~/beyond-scale-language-data-diversity$ pip list | grep dataset
datasets 2.14.3
```
@lhoestq thoughts?
| Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.) | 116 | Faster Shuffling?
Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.)
> Shuffling is now significantly faster thanks to #513 Feel free to play with it now :)
>
> Closing this one, but feel free to re-open if you have other questions
I have a similar issue. My code is
```
for batch_num in range(num_batches):
print(f'--> {batch_num=}\n') if verbose else None
# - Get batch
shuffled_dataset = dataset.shuffle(buffer_size=buffer_size, seed=seed)
raw_text_batch = shuffled_dataset.take(batch_size)
tokenized_batch = map(raw_text_batch)
if verbose:
time_start = time.time()
print(f'{raw_text_batch=}')
print(f'{tokenized_batch=}')
print(f'{next(iter(raw_text_batch))=}')
print(f'{next(iter(tokenized_batch))=}')
print(f'Time it took: {time.time() - time_start} seconds \a\n')
```
without the suffle it takes 4.5 secs with it takes 87.1 secs. Is this difference expected? my dataset version is:
```
(beyond_scale) brando9@ampere1:~/beyond-scale-language-data-diversity$ pip list | grep dataset
datasets 2.14.3
```
@lhoestq thoughts?
| [
-0.1923404335975647,
0.026902616024017334,
-0.029612740501761436,
-0.11168675124645233,
-0.008292719721794128,
-0.09397360682487488,
0.17457839846611023,
0.5516617894172668,
-0.2777431011199951,
0.08274136483669281,
-0.03198432922363281,
0.5345281958580017,
-0.13012340664863586,
-0.2530539333820343,
0.15954580903053284,
-0.07805971801280975,
0.09959083795547485,
-0.055131420493125916,
-0.27821871638298035,
-0.06946690380573273,
-0.0890972688794136,
-0.367635041475296,
-0.23807856440544128,
-0.28267204761505127,
-0.0314231775701046,
-0.24523678421974182,
-0.21385012567043304,
0.11417316645383835,
-0.1576506644487381,
0.07608018815517426,
-0.17652888596057892,
0.18975400924682617,
-0.0760524570941925,
0.25501057505607605,
-0.00011340881610522047,
-0.1632293462753296,
0.07207787781953812,
0.15476369857788086,
-0.3460915982723236,
0.22204053401947021,
0.4441969096660614,
-0.0077748727053403854,
-0.20337745547294617,
-0.2226857841014862,
0.15467825531959534,
-0.28860634565353394,
0.1179606169462204,
-0.1604878306388855,
-0.13396935164928436,
-0.05052464082837105,
0.13521288335323334,
0.3606235086917877,
-0.18739619851112366,
0.147774338722229,
0.502168595790863,
0.17262202501296997,
-0.3828653395175934,
0.2517298460006714,
0.3314823508262634,
-0.08213294297456741,
-0.17878836393356323,
0.3071422874927521,
-0.13991643488407135,
0.008141577243804932,
0.13420069217681885,
0.2041366547346115,
0.17006877064704895,
0.3323274850845337,
0.13123297691345215,
0.4086362421512604,
0.2795928120613098,
-0.20578938722610474,
-0.2938492000102997,
-0.28433138132095337,
0.14923223853111267,
-0.07967060804367065,
0.07071314007043839,
0.2365664690732956,
-0.29442697763442993,
-0.19289791584014893,
-0.14420092105865479,
0.23557983338832855,
0.2748086452484131,
-0.20237283408641815,
0.2636324167251587,
0.45861515402793884,
0.18843232095241547,
-0.08085063844919205,
0.6668161749839783,
-0.10658098757266998,
0.4371035397052765,
-0.16962897777557373,
0.016161946579813957,
0.4101982116699219,
-0.3257104754447937,
-0.2564958930015564,
-0.2286781668663025,
-0.11818625777959824,
-0.07781904190778732,
0.12992341816425323,
0.6626297831535339,
0.21286547183990479,
0.22063219547271729,
-0.04436251521110535,
0.06300234794616699,
0.05269366130232811,
-0.2868940532207489,
0.09904362261295319,
-0.12677337229251862,
0.14949384331703186,
0.2631209194660187,
0.11315219104290009,
-0.09896235913038254,
-0.30781200528144836,
-0.03056320920586586,
-0.17626327276229858,
-0.46775561571121216,
0.1254083514213562,
-0.006074011325836182,
-0.3375503420829773,
-0.068478524684906,
-0.01644728146493435,
0.0005493806675076485,
0.21777454018592834,
-0.13798482716083527,
0.25025156140327454,
-0.09140504151582718,
-0.17707401514053345,
-0.15336202085018158,
-0.010381489992141724,
-0.0609242282807827,
0.0508900061249733,
-0.20206208527088165,
0.029336335137486458,
0.021434690803289413,
0.42790016531944275,
-0.18710778653621674,
0.0697418600320816,
0.15138116478919983,
0.3381170630455017,
-0.054541684687137604,
-0.15189877152442932,
0.08718425035476685,
0.0860125795006752,
-0.12908707559108734,
-0.08322372287511826,
-0.09944921731948853,
0.06317038834095001,
-0.2967609465122223,
0.3788527250289917,
0.027665801346302032,
-0.11333860456943512,
0.11203059554100037,
0.16514328122138977,
0.2582029104232788,
-0.27271831035614014,
-0.45072951912879944,
-0.07981492578983307,
0.03624141216278076,
-0.04960877448320389,
0.11611247807741165,
-0.10430672764778137,
0.06495209038257599,
-0.13551877439022064,
0.03720421344041824,
-0.24829982221126556,
-0.08532819151878357,
0.17184633016586304,
-0.04707380011677742,
0.5148982405662537,
0.49032092094421387,
0.6803023219108582,
-0.09651131927967072,
0.10508701205253601,
0.06628717482089996,
0.028464436531066895,
0.6791560649871826,
0.11236783862113953,
-0.23249614238739014,
0.056671567261219025,
-0.11991821974515915,
0.09840186685323715,
0.3790942430496216,
0.19762557744979858,
0.11827030032873154,
-0.08760157227516174,
0.470840722322464,
0.25115811824798584,
0.04440449923276901,
0.2793288826942444,
-0.5306041240692139,
-0.10871361196041107,
0.2448185533285141,
0.40716424584388733,
-0.5404624938964844,
-0.36224281787872314,
0.04361722245812416,
-0.31580981612205505,
0.3696405589580536,
-0.20954826474189758,
0.010037917643785477,
0.08160533010959625,
-0.09753856062889099,
0.051612041890621185,
-0.15050232410430908,
0.07852862775325775,
-0.2690131664276123,
-0.042348239570856094,
-0.004448821768164635,
-0.020687878131866455,
0.2608918845653534,
-0.3799426555633545,
0.15646719932556152,
-0.20195645093917847,
0.16914454102516174,
0.10167407989501953,
0.01612156629562378,
-0.14608438313007355,
0.35413286089897156,
-0.14453493058681488,
-0.11783644556999207,
-0.027810754254460335,
-0.2868753671646118,
0.04750838503241539,
-0.18156938254833221,
-0.1812896877527237,
0.08803050220012665,
-0.16721853613853455,
0.17104242742061615,
0.42627090215682983,
-0.2970631420612335,
0.08899892121553421,
0.11410932242870331,
0.2698439657688141,
-0.11223477125167847,
-0.1761545091867447,
0.06470957398414612,
0.21468417346477509,
-0.11889719218015671,
0.29868751764297485,
0.07155731320381165,
-0.21648667752742767,
0.1441739946603775,
-0.03510831668972969,
-0.3543131649494171,
0.5398852825164795,
-0.4576704502105713,
0.3163585960865021,
0.12145951390266418,
-0.2963975667953491,
-0.08525105565786362,
0.21372750401496887,
-0.11158774793148041,
0.40353938937187195,
0.6465896964073181,
0.04366782680153847,
0.07336929440498352,
0.3775457739830017,
-0.3368754982948303,
0.15782037377357483,
0.5231922268867493,
-0.018397685140371323,
-0.12151699513196945,
0.022189732640981674,
0.009348034858703613,
-0.14055128395557404,
-0.14951688051223755,
0.05722253397107124,
0.2847000062465668,
0.27594441175460815,
0.14309950172901154,
-0.04501538723707199,
-0.09324563294649124,
-0.25675535202026367,
0.17999888956546783,
-0.012367546558380127,
0.10576048493385315,
-0.07522258907556534,
0.14641040563583374,
0.0012098848819732666,
-0.22204449772834778,
-0.2105766236782074,
0.09256290644407272,
0.19072212278842926,
0.08045372366905212,
0.07495385408401489,
-0.15470270812511444,
-0.167197585105896,
-0.17261569201946259,
-0.02065565437078476,
0.02544441819190979,
-0.10434834659099579,
0.15199649333953857,
0.24925677478313446,
-0.24980813264846802,
-0.2415594607591629,
-0.06932514905929565,
0.3523519039154053,
-0.09464685618877411,
-0.15054723620414734,
-0.20763863623142242,
0.03769317641854286,
-0.17839249968528748,
0.08580997586250305,
0.22893710434436798,
0.2516103684902191,
0.3821905553340912,
0.12629885971546173,
-0.18266694247722626,
0.007982433773577213,
0.06025443226099014,
-0.2226712703704834,
-0.0037471093237400055,
-0.30482515692710876,
-0.10929889976978302,
-0.12790526449680328,
-0.4171047806739807,
-0.3161633014678955,
0.07634606957435608,
-0.16995301842689514,
-0.10223493725061417,
0.31041425466537476,
0.19811271131038666,
-0.2612316608428955,
-0.20313884317874908,
-0.08754739910364151,
0.00667886808514595,
-0.42987602949142456,
0.2326144129037857,
-0.1632070094347,
0.1378101408481598,
-0.026899918913841248,
-0.13040876388549805,
-0.007379679940640926,
-0.48551082611083984,
-0.1030229926109314,
0.1478477567434311,
-0.20485180616378784,
0.29691800475120544,
0.031205307692289352,
-0.15961267054080963,
-0.3993212580680847,
-0.02804020419716835,
-0.034700941294431686,
0.5016613006591797,
-0.10988914966583252,
0.22276517748832703,
-0.35485634207725525,
-0.07284858822822571,
-0.06378918886184692,
0.15531130135059357,
0.45216071605682373,
-0.16029268503189087,
-0.15908558666706085,
0.26743754744529724,
0.15948718786239624,
0.01903185248374939,
0.23465391993522644,
0.1987350881099701,
0.07199269533157349,
0.19980928301811218,
0.23214435577392578,
0.5319880843162537,
-0.044917698949575424,
0.3118554949760437,
-0.2178763449192047,
0.0840056762099266,
0.0019454173743724823,
-0.29962682723999023,
0.08869033306837082,
0.17931312322616577,
0.012137964367866516,
-0.17439104616641998,
0.3336881995201111,
-0.06881656497716904,
-0.22151215374469757,
-0.05559863895177841,
0.4700455963611603,
0.11793645471334457,
-0.2917788326740265,
0.5718818306922913,
-0.21211588382720947,
0.012693576514720917,
0.008132793009281158,
0.2446947693824768,
-0.07162004709243774,
-0.22751069068908691,
0.04427216574549675,
-0.04704885184764862,
-0.09443708509206772,
-0.00007926946273073554,
-0.6259941458702087,
-0.11878759413957596,
-0.7641574740409851,
0.22929427027702332,
0.25340622663497925,
0.44917574524879456,
0.24015842378139496,
-0.30027079582214355,
0.4460410475730896,
-0.09304932504892349,
0.4020676016807556,
0.16746331751346588,
-0.2918857932090759,
0.2710595726966858,
-0.0672270655632019,
-0.46482738852500916,
-0.13714337348937988,
-0.3754376471042633,
-0.41104912757873535,
0.17201176285743713,
0.27547687292099,
-0.340469092130661,
-0.03373955562710762,
-0.039208076894283295,
-0.11670418828725815,
0.012439180165529251,
-0.012585010379552841,
-0.388727068901062,
-0.2512192726135254,
0.012126317247748375,
0.263286828994751,
-0.0009866543114185333,
0.09758914262056351,
-0.025670070201158524,
0.1732369214296341,
0.1750621646642685,
-0.027981648221611977,
0.1211027130484581,
-0.10029977560043335,
-0.015287535265088081,
0.04667624086141586,
0.08570423722267151,
0.19140245020389557,
0.12464766949415207,
-0.11131319403648376,
-0.05399595946073532,
0.16239024698734283,
0.09417061507701874,
-0.0690862312912941,
-0.2276528924703598,
0.4326663315296173,
0.38686609268188477,
0.19697332382202148,
0.23946142196655273,
0.01842229813337326,
0.3148970305919647,
0.02279103919863701,
-0.39446938037872314,
0.1367677003145218,
-0.30435535311698914,
-0.19692674279212952,
-0.7291414737701416,
0.24627208709716797,
0.24788184463977814,
0.1440272480249405,
0.3184785544872284,
-0.25737643241882324,
0.20475131273269653,
0.38573354482650757,
0.13299395143985748,
1.001419186592102,
-0.3653194308280945,
0.47292226552963257,
0.32544374465942383,
-0.09828462451696396,
0.08798336237668991,
-0.18039895594120026,
0.46143639087677,
-0.11375344544649124,
-0.07063264399766922,
0.19679443538188934,
-0.1444282978773117,
-0.01716773957014084,
0.05211292952299118,
0.03564110025763512,
0.15776744484901428,
0.025011368095874786,
-0.16961579024791718,
-0.31603896617889404,
-0.07463176548480988,
-0.3252596855163574,
-0.447992742061615,
-0.13202255964279175,
0.008856337517499924,
-0.011742055416107178,
-0.16335195302963257,
0.10344948619604111,
0.05306944623589516,
-0.43019142746925354,
0.1527116894721985,
-0.1672726571559906,
-0.020542532205581665,
0.04129699617624283,
-0.028254106640815735,
0.21480467915534973,
-0.21933946013450623,
-0.09089559316635132,
-0.1379169523715973,
-0.11512449383735657,
0.09681665897369385,
0.1493353545665741,
0.14291056990623474,
0.3152140974998474,
0.3662382960319519,
0.295497328042984,
-0.346150666475296,
0.269355446100235,
-0.029376719146966934,
0.2607603967189789,
0.096633680164814,
-0.017472678795456886,
-0.7500064969062805,
-0.3105362057685852,
0.10221756249666214,
0.548416793346405,
-0.05116867274045944,
-0.029113303869962692,
0.2063371241092682,
-0.32463058829307556,
-0.11909988522529602,
0.11277268826961517,
-0.03596242517232895,
0.13288305699825287,
0.42771580815315247,
0.2230038195848465,
-0.2575339078903198,
-0.0035463273525238037,
0.3447442948818207,
0.0655742660164833,
0.17149126529693604,
0.27169302105903625,
0.017559830099344254,
-0.4570976495742798,
-0.25968509912490845,
0.10535026341676712,
0.044981613755226135,
-0.33171579241752625,
0.2421380877494812,
0.04596611484885216,
-0.06079950928688049,
0.232807457447052,
0.295614629983902,
-0.03999689221382141,
-0.07747096568346024,
-0.3107497990131378,
-0.09659577906131744,
0.12735974788665771,
0.4221336245536804,
0.4337266981601715,
0.05093487352132797,
0.046113789081573486,
0.3844180405139923,
-0.3927917778491974,
-0.17108510434627533,
-0.25873813033103943,
-0.21468545496463776,
0.07228003442287445,
0.15092827379703522,
-0.10221405327320099,
-0.21652784943580627,
-0.1290186494588852,
0.15278103947639465,
0.12719085812568665,
0.2033528834581375,
-0.0190582312643528,
-0.2184944450855255,
0.05752813443541527,
0.03732059895992279,
0.03014518693089485,
0.010120678693056107,
0.02059287205338478,
-0.3986666798591614,
-0.3616923391819,
-0.2793899178504944,
-0.18970930576324463,
-0.028048058971762657,
-0.0167594775557518,
-0.3066471219062805,
0.18953508138656616,
0.16523826122283936,
-0.041288986802101135,
0.4952773451805115,
-0.4397030174732208,
-0.31725358963012695,
-0.16642391681671143,
-0.053215391933918,
-0.029697176069021225,
-0.05806879699230194,
-0.07700296491384506,
0.07810688763856888,
0.13811099529266357,
0.00044769421219825745,
0.2322293519973755,
-0.15369543433189392,
0.006529487669467926,
-0.06640353053808212,
0.1553650051355362,
0.5056463479995728,
0.2278166264295578,
-0.5163939595222473,
0.40322524309158325,
0.12203781306743622,
-0.10343465209007263,
-0.19060859084129333,
-0.40013256669044495,
0.2510623335838318,
0.03332548961043358,
0.0789143294095993,
-0.2527692914009094,
-0.2046758085489273,
-0.327531099319458,
-0.09779050946235657,
-0.08906812965869904,
-0.4377537965774536,
-0.2646302282810211,
0.3256215751171112,
0.3944658637046814,
-0.22124023735523224,
0.1747536063194275,
-0.02351229265332222,
-0.012475334107875824,
0.20557913184165955,
0.27735936641693115,
0.37609994411468506,
0.6940301060676575,
0.33932751417160034,
-0.5378574132919312,
-0.15543900430202484,
-0.0061052702367305756,
0.5420436859130859,
0.16248901188373566,
0.3094436824321747,
0.3400323987007141,
0.10528501123189926,
0.07109859585762024,
0.14840146899223328,
-0.013076193630695343,
-0.10702832043170929,
-0.05083576589822769,
0.05177157744765282,
-0.009386923164129257,
-0.1301235407590866,
-0.21527564525604248,
0.19173036515712738,
-0.2951778173446655,
0.3661957383155823,
0.22710226476192474,
0.06304174661636353,
0.41095346212387085,
-0.39336806535720825,
0.11849261820316315,
-0.13639011979103088,
0.4170493185520172,
-0.30537232756614685,
-0.1046072319149971,
-0.0530778169631958,
0.14972171187400818,
0.316617488861084,
0.06044791638851166,
-0.062158163636922836,
0.3140232264995575,
-0.03282364085316658,
-0.0006157038733363152,
-0.5178094506263733,
0.02144593931734562,
-0.14719781279563904,
0.24320121109485626,
0.4907349646091461,
-0.16588135063648224,
0.33530837297439575,
0.03528789430856705,
-0.20570529997348785,
-0.11618900299072266,
-0.07510979473590851,
-0.039257876574993134,
-0.14959028363227844,
0.13191714882850647,
0.16473142802715302,
-0.33072149753570557,
-0.04931171238422394,
0.14114651083946228,
-0.23400241136550903,
-0.12051264941692352,
-0.4638797342777252,
-0.26517707109451294,
-0.11198271065950394,
0.04380321130156517,
0.05887855589389801,
0.12480506300926208,
0.7294571995735168,
0.4031345248222351,
-0.17870685458183289,
0.11423464864492416,
-0.32913485169410706,
-0.327053964138031,
-0.284677118062973,
-0.32334235310554504,
0.015220290049910545,
0.203533336520195,
0.49512147903442383,
0.23507556319236755,
0.23420387506484985,
-0.0066569894552230835,
0.08176353573799133,
-0.4140221178531647,
0.3776707053184509,
-0.16131487488746643,
0.22923514246940613,
0.15860287845134735,
-0.05945935845375061,
-0.1856846809387207,
-0.6518715023994446,
0.23339563608169556,
0.1942441314458847,
0.026492036879062653,
0.0053837914019823074,
0.10265795886516571,
0.19169126451015472,
0.23017150163650513,
-0.18369954824447632,
-0.03554809093475342,
-0.19699031114578247,
0.19963425397872925,
-0.17995822429656982,
-0.2979390323162079,
0.23011036217212677,
0.012466778047382832,
-0.031126782298088074,
0.0657944455742836,
0.12105438113212585,
0.017258092761039734,
0.01755324937403202,
0.16112478077411652,
0.5050216913223267,
-0.21666042506694794,
0.24417011439800262,
-0.2491687536239624,
0.05786086618900299,
0.12898209691047668,
0.275756299495697,
-0.14912177622318268,
0.15772882103919983,
0.006477337330579758,
-0.2537936270236969,
-0.25521019101142883,
-0.028960341587662697,
0.3861754536628723,
-0.26613330841064453,
-0.28217649459838867,
-0.07945217937231064,
0.20622199773788452,
0.2685995101928711,
0.3072514832019806,
0.0452335849404335,
-0.2817091643810272,
-0.05072081461548805,
0.06471654772758484,
0.31195586919784546,
0.2497105598449707,
-0.1956067532300949,
-0.03583027422428131,
-0.1050419956445694,
0.27996203303337097,
-0.3998774290084839,
0.06809720396995544,
-0.24019880592823029,
-0.3251275420188904
] |
https://github.com/huggingface/datasets/issues/406 | Faster Shuffling? | still slow even with update to `2.14.4` most recent as of this writing
```
Time it took: 4.301205635070801 seconds
--> batch_num=0
raw_text_batch=<datasets.iterable_dataset.IterableDataset object at 0x7f1fea7c2a40>
tokenized_batch=<datasets.iterable_dataset.IterableDataset object at 0x7f1fea7c2f20>
next(iter(raw_text_batch))={'text': "No matter which style you choose, you can be sure of one thing: our quality and craftsmanship are the best in the business. It's who we are and what we believe in. And it's evident every day on the factory floor where our dedicated teams take great pride in every stitch.", 'timestamp': '2019-04-19T06:43:50Z', 'url': 'https://institchescustoms.com/katzkin.html'}
next(iter(tokenized_batch))={'input_ids': tensor([ 2949, 2300, 543, 3918, 345, 3853, 11, 345, 460, 307,
1654, 286, 530, 1517, 25, 674, 3081, 290, 5977, 49820,
389, 262, 1266, 287, 262, 1597, 13, 632, 338, 508,
356, 389, 290, 644, 356, 1975, 287, 13, 843, 340,
338, 10678, 790, 1110, 319, 262, 8860, 4314, 810, 674,
7256, 3466, 1011, 1049, 11293, 287, 790, 24695, 13, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256]), 'attention_mask': tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0])}
Time it took: 102.99258613586426 seconds
``` | Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.) | 350 | Faster Shuffling?
Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.)
still slow even with update to `2.14.4` most recent as of this writing
```
Time it took: 4.301205635070801 seconds
--> batch_num=0
raw_text_batch=<datasets.iterable_dataset.IterableDataset object at 0x7f1fea7c2a40>
tokenized_batch=<datasets.iterable_dataset.IterableDataset object at 0x7f1fea7c2f20>
next(iter(raw_text_batch))={'text': "No matter which style you choose, you can be sure of one thing: our quality and craftsmanship are the best in the business. It's who we are and what we believe in. And it's evident every day on the factory floor where our dedicated teams take great pride in every stitch.", 'timestamp': '2019-04-19T06:43:50Z', 'url': 'https://institchescustoms.com/katzkin.html'}
next(iter(tokenized_batch))={'input_ids': tensor([ 2949, 2300, 543, 3918, 345, 3853, 11, 345, 460, 307,
1654, 286, 530, 1517, 25, 674, 3081, 290, 5977, 49820,
389, 262, 1266, 287, 262, 1597, 13, 632, 338, 508,
356, 389, 290, 644, 356, 1975, 287, 13, 843, 340,
338, 10678, 790, 1110, 319, 262, 8860, 4314, 810, 674,
7256, 3466, 1011, 1049, 11293, 287, 790, 24695, 13, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256,
50256, 50256, 50256, 50256, 50256, 50256, 50256, 50256]), 'attention_mask': tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0])}
Time it took: 102.99258613586426 seconds
``` | [
-0.18731752038002014,
0.10102176666259766,
-0.018620405346155167,
-0.055552005767822266,
-0.07189466804265976,
-0.10004174709320068,
0.15883399546146393,
0.5716676115989685,
-0.3471658229827881,
0.017677992582321167,
-0.08376006782054901,
0.5080451965332031,
-0.15363700687885284,
-0.23702538013458252,
0.12257006019353867,
-0.07175509631633759,
0.08988972008228302,
-0.08060197532176971,
-0.3085483908653259,
-0.04367925226688385,
-0.09328582882881165,
-0.3378390967845917,
-0.2458420991897583,
-0.25674426555633545,
0.005500313825905323,
-0.22179627418518066,
-0.18956811726093292,
0.07786691188812256,
-0.1898728311061859,
-0.0011904044076800346,
-0.15179651975631714,
0.20903998613357544,
-0.08892956376075745,
0.16304637491703033,
-0.00011801689834101126,
-0.13651898503303528,
0.09058859944343567,
0.19875086843967438,
-0.35480615496635437,
0.28593605756759644,
0.5174473524093628,
0.0023404983803629875,
-0.19236886501312256,
-0.16779938340187073,
0.17569544911384583,
-0.4106300473213196,
0.14837969839572906,
-0.10429595410823822,
-0.1886245757341385,
-0.06745199114084244,
0.08844596147537231,
0.3025560975074768,
-0.23348627984523773,
0.17231644690036774,
0.463875412940979,
0.1779543161392212,
-0.40667983889579773,
0.2389320284128189,
0.28944751620292664,
-0.0741959661245346,
-0.23723304271697998,
0.25555843114852905,
-0.13279621303081512,
0.015503709204494953,
0.13622376322746277,
0.1327916979789734,
0.10088545083999634,
0.3966450095176697,
0.15059185028076172,
0.4134679436683655,
0.3130512535572052,
-0.21495383977890015,
-0.30529147386550903,
-0.2704853117465973,
0.13914816081523895,
-0.07708083838224411,
0.13366097211837769,
0.15084809064865112,
-0.2210066318511963,
-0.2147999107837677,
-0.11683481931686401,
0.167278453707695,
0.23597970604896545,
-0.21961279213428497,
0.25729331374168396,
0.4691997766494751,
0.21157678961753845,
-0.07624921947717667,
0.7066112160682678,
-0.1660699099302292,
0.46481531858444214,
-0.13189446926116943,
-0.08221578598022461,
0.4747089743614197,
-0.40121474862098694,
-0.2959843873977661,
-0.23944351077079773,
-0.017484590411186218,
-0.06780796498060226,
0.2134302705526352,
0.5777273178100586,
0.2348235547542572,
0.19578410685062408,
-0.09298106282949448,
0.06023159250617027,
0.007187226787209511,
-0.280767560005188,
0.07619787007570267,
-0.10554808378219604,
0.11737056076526642,
0.3682364523410797,
0.11186716705560684,
-0.1448584496974945,
-0.3046397864818573,
-0.12514232099056244,
-0.23328450322151184,
-0.4776172637939453,
0.1471482217311859,
-0.00231131911277771,
-0.31108224391937256,
-0.13473781943321228,
-0.03949298337101936,
0.034320343285799026,
0.19104212522506714,
-0.13857141137123108,
0.26149001717567444,
-0.11657582968473434,
-0.19693703949451447,
-0.07127442955970764,
-0.016559844836592674,
0.00020685046911239624,
0.04513425752520561,
-0.1137826144695282,
0.06249042600393295,
0.07184626162052155,
0.4638594686985016,
-0.24543699622154236,
0.01943502202630043,
0.09013928472995758,
0.38228753209114075,
-0.04384402930736542,
-0.1339307427406311,
0.11083213239908218,
0.1257198601961136,
-0.11904408037662506,
-0.0703030377626419,
-0.14869579672813416,
0.008477732539176941,
-0.3260684609413147,
0.2975808084011078,
0.006669305264949799,
-0.12066110223531723,
0.10772836953401566,
0.11474648118019104,
0.2288423329591751,
-0.2840821444988251,
-0.5126509070396423,
-0.08892112970352173,
-0.011177517473697662,
-0.09688794612884521,
0.10307284444570541,
-0.11296084523200989,
0.06355297565460205,
-0.08552902936935425,
-0.0012247860431671143,
-0.251426100730896,
-0.048842743039131165,
0.1599644124507904,
-0.1045512706041336,
0.5384184122085571,
0.47512903809547424,
0.7129815816879272,
-0.07110144197940826,
0.15949073433876038,
0.04690223187208176,
0.0894777923822403,
0.6909584999084473,
0.1376243680715561,
-0.23234370350837708,
0.10361921787261963,
-0.11459154635667801,
0.10929117351770401,
0.3969622850418091,
0.19418370723724365,
0.17281128466129303,
-0.12561249732971191,
0.41878175735473633,
0.2462477684020996,
0.0626140758395195,
0.24051189422607422,
-0.4873206317424774,
-0.11394533514976501,
0.29152995347976685,
0.39216384291648865,
-0.4883558452129364,
-0.36114099621772766,
0.032560016959905624,
-0.21455904841423035,
0.36049479246139526,
-0.18408186733722687,
0.029617751017212868,
0.034383296966552734,
0.007317766547203064,
0.04221411421895027,
-0.07564612478017807,
0.1411687731742859,
-0.2548477053642273,
-0.08619129657745361,
0.060914747416973114,
-0.07412886619567871,
0.31999891996383667,
-0.35156428813934326,
0.21936625242233276,
-0.19271814823150635,
0.16402733325958252,
0.0817766785621643,
-0.017233069986104965,
-0.1236061304807663,
0.30984172224998474,
-0.17707519233226776,
-0.12266580760478973,
0.08208160847425461,
-0.3630765378475189,
0.06172029674053192,
-0.15919718146324158,
-0.16814535856246948,
0.13723698258399963,
-0.12407507002353668,
0.15175940096378326,
0.38847649097442627,
-0.3411983251571655,
0.039218608289957047,
0.1551494598388672,
0.29513317346572876,
-0.054773543030023575,
-0.16089759767055511,
0.12033510208129883,
0.3088842034339905,
-0.07445657253265381,
0.25546836853027344,
0.05064193531870842,
-0.24311228096485138,
0.13395190238952637,
-0.05441148951649666,
-0.3278610110282898,
0.511421263217926,
-0.45340368151664734,
0.35057201981544495,
0.23469699919223785,
-0.31446048617362976,
-0.08260611444711685,
0.2901926040649414,
-0.16550880670547485,
0.46738114953041077,
0.6438712477684021,
-0.007223658263683319,
0.12371556460857391,
0.3540791869163513,
-0.2842654287815094,
0.10989796370267868,
0.5359557867050171,
-0.006483519449830055,
-0.15243026614189148,
0.07444864511489868,
-0.03238522261381149,
-0.1734088957309723,
-0.09559103101491928,
0.10753554105758667,
0.2437998205423355,
0.23703229427337646,
0.14139550924301147,
-0.026397177949547768,
-0.08765807747840881,
-0.22739583253860474,
0.15740251541137695,
-0.06250977516174316,
0.08806240558624268,
-0.10954556614160538,
0.13422437012195587,
-0.007267634384334087,
-0.2219151258468628,
-0.234944149851799,
0.0967310294508934,
0.23096643388271332,
0.07421766221523285,
0.012344351038336754,
-0.1454114019870758,
-0.15927661955356598,
-0.1492004692554474,
-0.03318396955728531,
0.02902924455702305,
-0.13009051978588104,
0.1537751704454422,
0.3306047320365906,
-0.15101179480552673,
-0.24476449191570282,
-0.09190055727958679,
0.38454341888427734,
-0.09652971476316452,
-0.1874094158411026,
-0.23107829689979553,
0.04791820049285889,
-0.14480960369110107,
0.06911158561706543,
0.22379282116889954,
0.2444956749677658,
0.3204749524593353,
0.057470209896564484,
-0.2046557068824768,
0.0452386848628521,
0.009197413921356201,
-0.19587811827659607,
0.07650454342365265,
-0.40160542726516724,
-0.05538281798362732,
-0.13554733991622925,
-0.4165521264076233,
-0.28251808881759644,
0.07795853167772293,
-0.14140653610229492,
-0.1369684338569641,
0.3345832824707031,
0.07975506037473679,
-0.28076520562171936,
-0.12776139378547668,
-0.0868876501917839,
0.05449336767196655,
-0.36059820652008057,
0.28902435302734375,
-0.14048437774181366,
0.10338634252548218,
-0.020015835762023926,
-0.1793195754289627,
0.01675977185368538,
-0.48591288924217224,
-0.11931507289409637,
0.1318613588809967,
-0.12699155509471893,
0.29431453347206116,
0.05300308018922806,
-0.12081131339073181,
-0.42690399289131165,
0.050629064440727234,
-0.04384541139006615,
0.49408507347106934,
-0.12295877188444138,
0.250576913356781,
-0.3983767628669739,
-0.03256082534790039,
-0.05750219523906708,
0.08148840814828873,
0.49639245867729187,
-0.13186800479888916,
-0.11727830767631531,
0.28545984625816345,
0.12843863666057587,
0.10875578969717026,
0.24500563740730286,
0.1578417867422104,
0.1000063344836235,
0.18206796050071716,
0.2626528739929199,
0.49177366495132446,
-0.0006287228316068649,
0.2817710340023041,
-0.23910921812057495,
0.04499713331460953,
0.05829467996954918,
-0.3047429919242859,
0.11692851781845093,
0.24670547246932983,
0.04010986536741257,
-0.1257345974445343,
0.3249738812446594,
-0.1168627068400383,
-0.24365787208080292,
-0.04520861804485321,
0.4726753532886505,
0.17684176564216614,
-0.23690484464168549,
0.534510612487793,
-0.17484216392040253,
0.005845293402671814,
-0.0018448550254106522,
0.23896804451942444,
-0.05863925814628601,
-0.29217880964279175,
0.10602310299873352,
-0.013428114354610443,
-0.1270313560962677,
0.03299841284751892,
-0.6711915135383606,
-0.15177540481090546,
-0.7134920358657837,
0.21143653988838196,
0.22552450001239777,
0.5472393035888672,
0.24726824462413788,
-0.30371421575546265,
0.41028881072998047,
-0.1443973034620285,
0.35115933418273926,
0.1718488484621048,
-0.305151104927063,
0.2575013339519501,
-0.0476553849875927,
-0.3952089548110962,
-0.1195746511220932,
-0.36779308319091797,
-0.3196741044521332,
0.22150380909442902,
0.40037801861763,
-0.3219779431819916,
-0.05627720430493355,
-0.05872569978237152,
-0.1290820986032486,
-0.02340278960764408,
0.02735593169927597,
-0.37082189321517944,
-0.24577796459197998,
0.042883068323135376,
0.29425516724586487,
-0.03407594561576843,
0.06797318905591965,
-0.002192640909925103,
0.15744340419769287,
0.1811838001012802,
-0.07975758612155914,
0.10866620391607285,
-0.0045473091304302216,
-0.062265150249004364,
0.02804071269929409,
0.11136142909526825,
0.25719398260116577,
0.15008854866027832,
-0.061374373733997345,
-0.13035236299037933,
0.24757689237594604,
0.15179148316383362,
-0.03156724572181702,
-0.22138333320617676,
0.4151710271835327,
0.4004908502101898,
0.1334192007780075,
0.2198089361190796,
0.007064994424581528,
0.2726476192474365,
-0.008745345287024975,
-0.38262030482292175,
0.16406933963298798,
-0.3245126008987427,
-0.21091987192630768,
-0.6910423040390015,
0.18605279922485352,
0.2590295672416687,
0.11623309552669525,
0.30926498770713806,
-0.14137691259384155,
0.20130373537540436,
0.3487812876701355,
0.10898877680301666,
0.9491392374038696,
-0.38029348850250244,
0.43343308568000793,
0.2678207457065582,
-0.09838959574699402,
0.061905160546302795,
-0.30203843116760254,
0.47371190786361694,
-0.1719077080488205,
-0.08597805351018906,
0.2038843035697937,
-0.12212422490119934,
0.028354719281196594,
0.060583628714084625,
0.045147743076086044,
0.1714853197336197,
0.11538483202457428,
-0.11976513266563416,
-0.32999178767204285,
-0.052744556218385696,
-0.3212698996067047,
-0.4157409369945526,
-0.09237224608659744,
-0.004793398082256317,
-0.02514505386352539,
-0.17641690373420715,
0.13075295090675354,
0.10259884595870972,
-0.36655837297439575,
0.12681454420089722,
-0.19340521097183228,
-0.00652368925511837,
0.1022632047533989,
-0.037838879972696304,
0.26317477226257324,
-0.17254862189292908,
-0.1166178435087204,
-0.14812228083610535,
-0.1138811707496643,
0.07316085696220398,
0.1569039523601532,
0.16367994248867035,
0.23489248752593994,
0.34225696325302124,
0.37118759751319885,
-0.3003877103328705,
0.2194238007068634,
-0.044410254806280136,
0.29847460985183716,
0.10027807205915451,
-0.006273716688156128,
-0.7884971499443054,
-0.22981414198875427,
0.059913069009780884,
0.523070752620697,
-0.016099274158477783,
-0.013284573331475258,
0.24500253796577454,
-0.3582325875759125,
-0.07287880778312683,
0.07627619057893753,
-0.08073991537094116,
0.14108911156654358,
0.4289328455924988,
0.24953529238700867,
-0.25174474716186523,
0.012760831043124199,
0.3695790767669678,
0.032777901738882065,
0.13684728741645813,
0.280981183052063,
-0.03596120700240135,
-0.4645955562591553,
-0.24872809648513794,
0.10499649494886398,
0.1333598792552948,
-0.3505781888961792,
0.17604121565818787,
-0.000713548855856061,
-0.0710631012916565,
0.21504299342632294,
0.24742364883422852,
-0.05771298706531525,
-0.06892029196023941,
-0.344059556722641,
-0.09353931248188019,
0.1576921045780182,
0.449577271938324,
0.40071019530296326,
0.018101569265127182,
-0.0002726912498474121,
0.35446012020111084,
-0.41610288619995117,
-0.18757832050323486,
-0.2119784951210022,
-0.22973553836345673,
0.11104806512594223,
0.12803557515144348,
-0.14984790980815887,
-0.1741052269935608,
-0.1153973713517189,
0.1898466795682907,
0.08160216361284256,
0.20577698945999146,
0.011861789040267467,
-0.16238439083099365,
0.046585362404584885,
0.06441639363765717,
0.07906214892864227,
-0.023310566321015358,
0.007516653276979923,
-0.377926766872406,
-0.39164748787879944,
-0.3275792598724365,
-0.22932080924510956,
-0.07110793888568878,
-0.00548660010099411,
-0.27002832293510437,
0.21568737924098969,
0.15126349031925201,
-0.037350598722696304,
0.5059042572975159,
-0.37545114755630493,
-0.32213759422302246,
-0.17023156583309174,
-0.0117960125207901,
-0.007153641432523727,
-0.06728813797235489,
-0.042184703052043915,
0.13811185956001282,
0.18098536133766174,
-0.03849698603153229,
0.1966075897216797,
-0.18726183474063873,
0.016119379550218582,
-0.10789221525192261,
0.16561870276927948,
0.6152304410934448,
0.2548326253890991,
-0.5532248020172119,
0.3909721374511719,
0.052881211042404175,
-0.08034297823905945,
-0.19369322061538696,
-0.3097684383392334,
0.23396961390972137,
-0.04612639173865318,
0.05449020862579346,
-0.22596709430217743,
-0.19111698865890503,
-0.27441132068634033,
-0.07977083325386047,
-0.11654415726661682,
-0.5230130553245544,
-0.3064453601837158,
0.3215958774089813,
0.3455967307090759,
-0.24117736518383026,
0.21900935471057892,
-0.045480240136384964,
-0.015698730945587158,
0.25837886333465576,
0.22707808017730713,
0.36590301990509033,
0.7595508098602295,
0.3641909956932068,
-0.46746358275413513,
-0.1457088142633438,
-0.02806049957871437,
0.5723086595535278,
0.23643705248832703,
0.2964128255844116,
0.3612702488899231,
0.06835038214921951,
0.10249195992946625,
0.15393619239330292,
-0.10421093553304672,
-0.16314764320850372,
-0.03373587876558304,
0.006396850571036339,
0.06496562063694,
-0.15462440252304077,
-0.2913129925727844,
0.18273018300533295,
-0.3326783776283264,
0.3645736575126648,
0.28035345673561096,
0.00624566525220871,
0.4184589385986328,
-0.4656015634536743,
0.07512203603982925,
-0.1688646674156189,
0.396743506193161,
-0.2969878315925598,
-0.10839103907346725,
-0.11914916336536407,
0.10386200249195099,
0.2764231264591217,
0.04496162384748459,
-0.12149523198604584,
0.29342931509017944,
0.028740601614117622,
0.015994856134057045,
-0.553520679473877,
-0.004551634192466736,
-0.07227862626314163,
0.2973383665084839,
0.4545685052871704,
-0.2772749066352844,
0.28542250394821167,
-0.020751211792230606,
-0.14481309056282043,
-0.07903219759464264,
-0.12850365042686462,
-0.012414831668138504,
-0.13156120479106903,
0.13164423406124115,
0.16644616425037384,
-0.3364989161491394,
-0.02081092819571495,
0.15290537476539612,
-0.16737370193004608,
-0.13064952194690704,
-0.4695280194282532,
-0.2549014389514923,
-0.12296491861343384,
0.052944429218769073,
0.04126919433474541,
0.16877007484436035,
0.7029449343681335,
0.4296368658542633,
-0.20873519778251648,
0.19553500413894653,
-0.38730186223983765,
-0.2629590928554535,
-0.32542556524276733,
-0.3367847204208374,
0.06705547124147415,
0.22846074402332306,
0.5112081170082092,
0.25098705291748047,
0.2568204402923584,
0.010102391242980957,
0.014726174995303154,
-0.37825480103492737,
0.33828920125961304,
-0.15413698554039001,
0.2547067105770111,
0.2408965528011322,
-0.013939520344138145,
-0.23462000489234924,
-0.680610179901123,
0.18507713079452515,
0.21061109006404877,
-0.022898590192198753,
-0.005838371813297272,
0.08405232429504395,
0.20534752309322357,
0.1399793177843094,
-0.18495473265647888,
-0.027773940935730934,
-0.19325432181358337,
0.23302659392356873,
-0.16440865397453308,
-0.3396078050136566,
0.1995704025030136,
0.01306243147701025,
-0.02614954113960266,
0.040331125259399414,
0.09084342420101166,
0.04001560062170029,
0.025569884106516838,
0.1797499656677246,
0.49939239025115967,
-0.25196361541748047,
0.2278921753168106,
-0.2975967526435852,
0.11621888726949692,
0.0563824400305748,
0.29672035574913025,
-0.2519543766975403,
0.09384048730134964,
0.014314759522676468,
-0.28152960538864136,
-0.24121452867984772,
0.05201876908540726,
0.41675275564193726,
-0.35062411427497864,
-0.2381751537322998,
-0.06684241443872452,
0.16836650669574738,
0.3335951864719391,
0.2955028712749481,
0.093296580016613,
-0.2527213990688324,
-0.0623919814825058,
0.08021147549152374,
0.35310930013656616,
0.23166228830814362,
-0.18284647166728973,
0.029990937560796738,
-0.14833451807498932,
0.26368260383605957,
-0.4015667140483856,
0.029085801914334297,
-0.2746368944644928,
-0.3070034384727478
] |
https://github.com/huggingface/datasets/issues/406 | Faster Shuffling? | Shuffling leads to doing random access in many different locations on disk which is slower than reading contiguous data.
There is a super fast approximate shuffling algorithm implemented for iterable datasets though:
```python
iterable_dataset = dataset.to_iterable_dataset(num_shards=1024)
shuffled_dataset = iterable_dataset.shuffle(buffer_size=1000)
```
(the first batch might be a bit slow to get because the algorithm first fills a buffer before returning the first batch, see the [docs](https://huggingface.co/docs/datasets/v2.14.4/en/stream#shuffle) for more info) | Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.) | 68 | Faster Shuffling?
Consider shuffling bookcorpus:
```
dataset = nlp.load_dataset('bookcorpus', split='train')
dataset.shuffle()
```
According to tqdm, this will take around 2.5 hours on my machine to complete (even with the faster version of select from #405). I've also tried with `keep_in_memory=True` and `writer_batch_size=1000`.
But I can also just write the lines to a text file:
```
batch_size = 100000
with open('tmp.txt', 'w+') as out_f:
for i in tqdm(range(0, len(dataset), batch_size)):
batch = dataset[i:i+batch_size]['text']
print("\n".join(batch), file=out_f)
```
Which completes in a couple minutes, followed by `shuf tmp.txt > tmp2.txt` which completes in under a minute. And finally,
```
dataset = nlp.load_dataset('text', data_files='tmp2.txt')
```
Which completes in under 10 minutes. I read up on Apache Arrow this morning, and it seems like the columnar data format is not especially well-suited to shuffling rows, since moving items around requires a lot of book-keeping.
Is shuffle inherently slow, or am I just using it wrong? And if it is slow, would it make sense to try converting the data to a row-based format on disk and then shuffling? (Instead of calling select with a random permutation, as is currently done.)
Shuffling leads to doing random access in many different locations on disk which is slower than reading contiguous data.
There is a super fast approximate shuffling algorithm implemented for iterable datasets though:
```python
iterable_dataset = dataset.to_iterable_dataset(num_shards=1024)
shuffled_dataset = iterable_dataset.shuffle(buffer_size=1000)
```
(the first batch might be a bit slow to get because the algorithm first fills a buffer before returning the first batch, see the [docs](https://huggingface.co/docs/datasets/v2.14.4/en/stream#shuffle) for more info) | [
-0.18998369574546814,
0.04334913194179535,
-0.06364227831363678,
-0.10712790489196777,
-0.075883649289608,
-0.05409571900963783,
0.09422770887613297,
0.5228597521781921,
-0.25903356075286865,
0.0624392069876194,
-0.11306989938020706,
0.49536892771720886,
-0.14150825142860413,
-0.26539942622184753,
0.16340714693069458,
0.005603373050689697,
0.041933249682188034,
-0.045042991638183594,
-0.2569311261177063,
-0.0650133565068245,
-0.14248953759670258,
-0.36593008041381836,
-0.21816003322601318,
-0.29340970516204834,
0.07533910125494003,
-0.2823982536792755,
-0.25351861119270325,
0.10640642046928406,
-0.14289891719818115,
0.04250720515847206,
-0.13666020333766937,
0.2266208827495575,
-0.09647306054830551,
0.2788938879966736,
-0.0001135304119088687,
-0.10739199072122574,
-0.0008515715599060059,
0.1469707489013672,
-0.3403485417366028,
0.13450917601585388,
0.48345133662223816,
-0.02861621044576168,
-0.1875532567501068,
-0.21592192351818085,
0.152326762676239,
-0.3376961350440979,
0.1540941447019577,
-0.16969913244247437,
-0.139848992228508,
-0.08261566609144211,
0.12263502180576324,
0.3358756899833679,
-0.1855498105287552,
0.1886044293642044,
0.4431433379650116,
0.17886178195476532,
-0.35239431262016296,
0.3097498416900635,
0.28695327043533325,
-0.022968720644712448,
-0.1293451488018036,
0.18606095016002655,
-0.17222727835178375,
0.024429475888609886,
0.13566826283931732,
0.16469627618789673,
0.06191166117787361,
0.3490666151046753,
0.08600124716758728,
0.4208999574184418,
0.3005032539367676,
-0.29089751839637756,
-0.4249565303325653,
-0.3141756057739258,
0.1879766881465912,
-0.12873351573944092,
0.0940837562084198,
0.3365050256252289,
-0.2139803171157837,
-0.2189057171344757,
-0.09133102744817734,
0.1660078465938568,
0.22173833847045898,
-0.20987249910831451,
0.2099134624004364,
0.5080884099006653,
0.20188985764980316,
-0.08215882629156113,
0.6936171650886536,
-0.13062623143196106,
0.49431899189949036,
-0.15772967040538788,
-0.004593946039676666,
0.4729500412940979,
-0.38253045082092285,
-0.3154977858066559,
-0.23284199833869934,
-0.15358379483222961,
-0.04453106224536896,
0.15907542407512665,
0.7233774065971375,
0.18386581540107727,
0.16000542044639587,
-0.04297015815973282,
0.11168025434017181,
-0.01826200634241104,
-0.3935454785823822,
0.12077505141496658,
-0.10909819602966309,
0.1182778850197792,
0.277208149433136,
0.09660705924034119,
-0.09599415957927704,
-0.3288084864616394,
-0.06360237300395966,
-0.26261794567108154,
-0.4338548183441162,
0.15462206304073334,
-0.040358319878578186,
-0.32380327582359314,
-0.15008655190467834,
-0.05240510776638985,
0.016032438725233078,
0.1655559092760086,
-0.10276565700769424,
0.22635811567306519,
-0.11063652485609055,
-0.19399966299533844,
-0.07745791226625443,
0.054471489042043686,
-0.043723780661821365,
0.07392162084579468,
-0.1105852946639061,
0.044739946722984314,
0.03309584781527519,
0.3496640920639038,
-0.21232756972312927,
0.02097364515066147,
0.1111120879650116,
0.31802889704704285,
0.0161136407405138,
-0.14275957643985748,
0.11953171342611313,
0.07770926505327225,
-0.1111723780632019,
-0.11107102781534195,
-0.1538902223110199,
0.05621478706598282,
-0.3220289945602417,
0.34037306904792786,
0.0023525208234786987,
-0.08760339021682739,
0.14084528386592865,
0.14799846708774567,
0.22821374237537384,
-0.3017162084579468,
-0.43233707547187805,
-0.0767318606376648,
-0.019936785101890564,
-0.11704263091087341,
0.09187564253807068,
-0.015503637492656708,
0.019603069871664047,
-0.11142947524785995,
0.07147382944822311,
-0.24112467467784882,
-0.015517668798565865,
0.15033192932605743,
-0.014470573514699936,
0.4934772551059723,
0.41013380885124207,
0.7308831214904785,
-0.042121659964323044,
0.11606667190790176,
0.062471404671669006,
0.0640048086643219,
0.6505014300346375,
0.21514704823493958,
-0.3021700382232666,
0.13530956208705902,
-0.03276149183511734,
0.09005764126777649,
0.33035725355148315,
0.2349933683872223,
0.06514784693717957,
-0.10402318090200424,
0.38258102536201477,
0.25633811950683594,
0.023239927366375923,
0.2337963879108429,
-0.4871536195278168,
-0.09117118269205093,
0.2700176537036896,
0.3983624577522278,
-0.5237270593643188,
-0.35875752568244934,
0.03576362133026123,
-0.2652899920940399,
0.3921023905277252,
-0.19435995817184448,
-0.059595249593257904,
0.10231771320104599,
-0.04698764160275459,
0.07676652818918228,
-0.1347992867231369,
-0.005201084539294243,
-0.24579274654388428,
-0.034634288400411606,
0.042868733406066895,
-0.13106369972229004,
0.22513219714164734,
-0.3601115345954895,
0.2152964472770691,
-0.13089759647846222,
0.16726630926132202,
0.13941386342048645,
0.02804725617170334,
-0.15541285276412964,
0.40876877307891846,
-0.13712015748023987,
-0.1951667070388794,
-0.0014637652784585953,
-0.31454357504844666,
0.039872173219919205,
-0.18393242359161377,
-0.11403635889291763,
0.15433882176876068,
-0.16592779755592346,
0.15887519717216492,
0.4325021207332611,
-0.3427814841270447,
0.03573499992489815,
0.14874348044395447,
0.2570855915546417,
-0.04668312519788742,
-0.15073932707309723,
0.10312942415475845,
0.3057522177696228,
0.013169924728572369,
0.31744998693466187,
0.0761871263384819,
-0.1805611252784729,
0.18515872955322266,
0.009850062429904938,
-0.3388342261314392,
0.5529309511184692,
-0.5590696930885315,
0.31783974170684814,
0.20669881999492645,
-0.30577874183654785,
-0.0885484591126442,
0.2730313539505005,
-0.1460384875535965,
0.4660704433917999,
0.6712489128112793,
0.12093892693519592,
0.17835451662540436,
0.3397202789783478,
-0.29304081201553345,
0.059633318334817886,
0.5209373831748962,
-0.027558978646993637,
-0.13307344913482666,
0.015154298394918442,
0.00007030367851257324,
-0.12492632120847702,
-0.12624739110469818,
0.05178089812397957,
0.21381232142448425,
0.24359817802906036,
0.13012273609638214,
0.023338843137025833,
-0.13410891592502594,
-0.22008484601974487,
0.12733955681324005,
-0.03010696917772293,
0.13009972870349884,
-0.06647740304470062,
0.11135684698820114,
0.021413978189229965,
-0.23303565382957458,
-0.2337256819009781,
0.05377184599637985,
0.16591423749923706,
0.13644303381443024,
0.06693292409181595,
-0.12208837270736694,
-0.1817830502986908,
-0.148786261677742,
-0.03762271627783775,
-0.017857909202575684,
-0.15395593643188477,
0.11278727650642395,
0.3452710211277008,
-0.20370709896087646,
-0.28023791313171387,
-0.03910229355096817,
0.3314281702041626,
-0.08640603721141815,
-0.17316974699497223,
-0.16172152757644653,
0.00743052177131176,
-0.06109071522951126,
0.0627267062664032,
0.23787462711334229,
0.17999286949634552,
0.39192914962768555,
0.09837602078914642,
-0.24826541543006897,
0.002845965325832367,
0.06920137256383896,
-0.1947667896747589,
0.06363458931446075,
-0.3970247507095337,
-0.08441463112831116,
-0.16708911955356598,
-0.3384265899658203,
-0.2951732277870178,
0.07211591303348541,
-0.171063631772995,
-0.11450621485710144,
0.3426773250102997,
0.12244529277086258,
-0.24833166599273682,
-0.12598243355751038,
-0.053693629801273346,
-0.06508693099021912,
-0.37459486722946167,
0.32998496294021606,
-0.05743476375937462,
0.1652800440788269,
-0.03123260661959648,
-0.15282587707042694,
-0.032299336045980453,
-0.5148009061813354,
-0.10536617040634155,
0.1515268087387085,
-0.21183598041534424,
0.2696322798728943,
0.067093126475811,
-0.14216157793998718,
-0.38477906584739685,
-0.013355043716728687,
0.005155637860298157,
0.5499914288520813,
-0.08538493514060974,
0.15648239850997925,
-0.3555538058280945,
-0.03028658777475357,
-0.09551618993282318,
0.13681334257125854,
0.3952600359916687,
-0.1743740439414978,
-0.10508550703525543,
0.26171982288360596,
0.18176057934761047,
0.02390427142381668,
0.25896474719047546,
0.08354990184307098,
0.11625578254461288,
0.1916780173778534,
0.28130683302879333,
0.5088191032409668,
0.040672171860933304,
0.3321198523044586,
-0.16082599759101868,
0.04115598276257515,
-0.008502457290887833,
-0.3013300895690918,
0.09992539137601852,
0.1961214244365692,
0.013402596116065979,
-0.2133665680885315,
0.33157408237457275,
-0.09388940036296844,
-0.2950454354286194,
-0.09474349021911621,
0.40088334679603577,
0.14066243171691895,
-0.29638734459877014,
0.4990837872028351,
-0.19380952417850494,
0.04358694329857826,
-0.012025613337755203,
0.2301085889339447,
-0.09336259961128235,
-0.24748390913009644,
0.07615254819393158,
-0.07456760108470917,
-0.05426537245512009,
0.03097701258957386,
-0.553139865398407,
-0.16536101698875427,
-0.7295655012130737,
0.19154617190361023,
0.22678318619728088,
0.450454980134964,
0.34139978885650635,
-0.3347277045249939,
0.41751885414123535,
-0.16364262998104095,
0.36488789319992065,
0.2089643031358719,
-0.3448503613471985,
0.2426828145980835,
-0.11602775007486343,
-0.47756627202033997,
-0.0900864452123642,
-0.38412588834762573,
-0.27542147040367126,
0.134953111410141,
0.2834124267101288,
-0.3421768546104431,
-0.005680042318999767,
-0.10900358855724335,
-0.06664104014635086,
0.028636101633310318,
0.0333566814661026,
-0.39219334721565247,
-0.2840788662433624,
-0.033267635852098465,
0.2703614830970764,
-0.0446198433637619,
0.041854992508888245,
0.051539987325668335,
0.17746905982494354,
0.11504355072975159,
-0.021890468895435333,
0.11532782763242722,
-0.016278928145766258,
-0.057492971420288086,
0.05489841103553772,
0.14467929303646088,
0.2711787223815918,
0.1656751036643982,
-0.10289241373538971,
0.018451428040862083,
0.24028609693050385,
0.0693037360906601,
-0.10168147832155228,
-0.1734432727098465,
0.417993426322937,
0.37924450635910034,
0.2031460851430893,
0.19410282373428345,
0.04029149189591408,
0.2761719524860382,
-0.0671846941113472,
-0.4136357009410858,
0.10948400944471359,
-0.25996312499046326,
-0.26301491260528564,
-0.791657030582428,
0.21155554056167603,
0.2525086998939514,
0.16550593078136444,
0.31952041387557983,
-0.17388801276683807,
0.23961086571216583,
0.34402287006378174,
0.10979516059160233,
0.8745214343070984,
-0.386366605758667,
0.4415872097015381,
0.33583924174308777,
-0.08019798994064331,
0.07205630838871002,
-0.19281788170337677,
0.5011454820632935,
-0.13913697004318237,
-0.1731952577829361,
0.19779448211193085,
-0.1462719440460205,
-0.002778761088848114,
0.11096584051847458,
0.04802688583731651,
0.23140044510364532,
0.1479560136795044,
-0.25410088896751404,
-0.33104029297828674,
-0.01914897933602333,
-0.40681716799736023,
-0.39727485179901123,
-0.14503252506256104,
0.03718171268701553,
-0.04080641269683838,
-0.1264907270669937,
0.12012039870023727,
0.1172366663813591,
-0.2995406985282898,
0.2233511060476303,
-0.19867661595344543,
-0.05358131602406502,
0.06584906578063965,
-0.0023850351572036743,
0.18358416855335236,
-0.2418420910835266,
-0.16077175736427307,
-0.19321134686470032,
-0.11078022420406342,
0.11720208823680878,
0.1765233874320984,
0.12589076161384583,
0.2512112259864807,
0.29204627871513367,
0.2731574773788452,
-0.20954635739326477,
0.2632061541080475,
-0.025251222774386406,
0.28326910734176636,
0.05291283503174782,
0.03891461715102196,
-0.7609838843345642,
-0.19886136054992676,
0.08371879160404205,
0.47732794284820557,
-0.04124167561531067,
-0.01445607841014862,
0.2267117202281952,
-0.3546881377696991,
-0.08330880105495453,
0.09937150776386261,
-0.020413048565387726,
0.11266525834798813,
0.41533300280570984,
0.19013261795043945,
-0.2588379383087158,
-0.05816115811467171,
0.3233095109462738,
0.03799804300069809,
0.18521590530872345,
0.267642080783844,
-0.0590229332447052,
-0.44912344217300415,
-0.23584434390068054,
0.10912609845399857,
0.0001246882602572441,
-0.28255829215049744,
0.2839203476905823,
-0.020545730367302895,
0.004702702164649963,
0.15335308015346527,
0.23604610562324524,
-0.024989016354084015,
-0.11825955659151077,
-0.29784053564071655,
-0.1389549821615219,
0.1709902584552765,
0.4646441340446472,
0.520352303981781,
0.07088867574930191,
0.013498365879058838,
0.3260634243488312,
-0.4266984164714813,
-0.20174798369407654,
-0.24279122054576874,
-0.17516091465950012,
0.06599588692188263,
0.13683785498142242,
-0.10883258283138275,
-0.20003679394721985,
-0.18178434669971466,
0.184368297457695,
0.14414086937904358,
0.18971897661685944,
0.029483044520020485,
-0.2063387930393219,
0.060236867517232895,
0.027155518531799316,
0.05701659992337227,
-0.05805108696222305,
0.07211649417877197,
-0.398359477519989,
-0.3846551775932312,
-0.33796563744544983,
-0.19500592350959778,
-0.018722163513302803,
-0.0027511194348335266,
-0.25312745571136475,
0.20150357484817505,
0.1074448674917221,
-0.08623892813920975,
0.5288313627243042,
-0.38385653495788574,
-0.33948802947998047,
-0.18384841084480286,
0.050113994628190994,
0.023653123527765274,
-0.05445197969675064,
-0.0885394960641861,
0.0957840234041214,
0.1805059313774109,
-0.10775000602006912,
0.2601674497127533,
-0.172191321849823,
0.046397615224123,
-0.0038633972872048616,
0.25709399580955505,
0.6744361519813538,
0.2733136713504791,
-0.41148611903190613,
0.40392282605171204,
0.10789307951927185,
-0.12753793597221375,
-0.19363360106945038,
-0.2519063651561737,
0.20965638756752014,
0.07398678362369537,
0.0796557366847992,
-0.21329659223556519,
-0.13158050179481506,
-0.3288513422012329,
-0.1277965009212494,
-0.05659465119242668,
-0.5159258246421814,
-0.2451823353767395,
0.33721235394477844,
0.424227237701416,
-0.26852113008499146,
0.12846313416957855,
-0.03142243251204491,
0.014740824699401855,
0.2341587394475937,
0.1905776858329773,
0.41446423530578613,
0.6284831762313843,
0.26238635182380676,
-0.4222751557826996,
-0.1477680504322052,
-0.020102057605981827,
0.45932242274284363,
0.21741333603858948,
0.3234370946884155,
0.30625760555267334,
0.04300455003976822,
0.03736833855509758,
0.1963503211736679,
-0.06635314971208572,
-0.09629718959331512,
-0.029233865439891815,
0.026395034044981003,
0.04234587401151657,
-0.16045916080474854,
-0.21328920125961304,
0.1931905895471573,
-0.2945127785205841,
0.28084465861320496,
0.24216347932815552,
0.03528522700071335,
0.4712193012237549,
-0.47588080167770386,
0.22908520698547363,
-0.14321625232696533,
0.4489893317222595,
-0.3165745735168457,
-0.0823901891708374,
-0.0625578761100769,
0.11567510664463043,
0.25748223066329956,
0.03603736311197281,
-0.11766029894351959,
0.22607290744781494,
-0.08002126216888428,
0.10706962645053864,
-0.5735710263252258,
-0.01352067943662405,
-0.1401686668395996,
0.21306367218494415,
0.3563808500766754,
-0.12398563325405121,
0.3839801847934723,
0.024817543104290962,
-0.16251060366630554,
-0.09382516145706177,
-0.12667009234428406,
-0.0025652404874563217,
-0.22363267838954926,
0.059130653738975525,
0.10288004577159882,
-0.28795692324638367,
-0.017432115972042084,
0.14455071091651917,
-0.16153834760189056,
-0.15250520408153534,
-0.48598676919937134,
-0.2760086953639984,
-0.09732973575592041,
0.09289179742336273,
0.07159803807735443,
0.09904168546199799,
0.7189985513687134,
0.4212993383407593,
-0.13910600543022156,
0.21281032264232635,
-0.2853314280509949,
-0.3037577271461487,
-0.3048810064792633,
-0.2861926853656769,
-0.020104611292481422,
0.2181743085384369,
0.5267699956893921,
0.19958892464637756,
0.29619574546813965,
-0.04314298927783966,
0.05929045006632805,
-0.39881810545921326,
0.38148513436317444,
-0.157510906457901,
0.18043743073940277,
0.15135854482650757,
-0.03860058635473251,
-0.18361033499240875,
-0.6872535943984985,
0.1323758065700531,
0.07226210087537766,
0.002474408596754074,
0.03602434694766998,
0.09279131889343262,
0.16896572709083557,
0.19373755156993866,
-0.19940760731697083,
-0.02245044894516468,
-0.23488444089889526,
0.18506202101707458,
-0.13951486349105835,
-0.2913181483745575,
0.1940975934267044,
-0.04424037039279938,
0.06732618808746338,
0.02659304440021515,
0.07361644506454468,
0.052209511399269104,
0.04414306953549385,
0.19881223142147064,
0.47696301341056824,
-0.21969300508499146,
0.22038592398166656,
-0.30224889516830444,
0.059093229472637177,
0.10694446414709091,
0.29885050654411316,
-0.1968090683221817,
0.14378651976585388,
-0.0201643705368042,
-0.2306947112083435,
-0.17881092429161072,
0.05368737876415253,
0.3200222849845886,
-0.27186286449432373,
-0.2069067507982254,
-0.11714228242635727,
0.0753386914730072,
0.20872607827186584,
0.3197336196899414,
0.07764782756567001,
-0.2111855447292328,
0.021078675985336304,
0.02916816994547844,
0.31859955191612244,
0.195652037858963,
-0.14236150681972504,
-0.06687604635953903,
-0.13176891207695007,
0.31030789017677307,
-0.41272902488708496,
-0.025095727294683456,
-0.24028967320919037,
-0.3045573830604553
] |
https://github.com/huggingface/datasets/issues/388 | 🐛 [Dataset] Cannot download wmt14, wmt15 and wmt17 | similar slow download speed here for nlp.load_dataset('wmt14', 'fr-en')
`
Downloading: 100%|██████████████████████████████████████████████████████████| 658M/658M [1:00:42<00:00, 181kB/s]
Downloading: 100%|██████████████████████████████████████████████████████████| 918M/918M [1:39:38<00:00, 154kB/s]
Downloading: 2%|▉ | 40.9M/2.37G [04:48<5:03:06, 128kB/s]
`
Could we just download a specific subdataset in 'wmt14', such as 'newstest14'? | 1. I try downloading `wmt14`, `wmt15`, `wmt17`, `wmt19` with the following code:
```
nlp.load_dataset('wmt14','de-en')
nlp.load_dataset('wmt15','de-en')
nlp.load_dataset('wmt17','de-en')
nlp.load_dataset('wmt19','de-en')
```
The code runs but the download speed is **extremely slow**, the same behaviour is not observed on `wmt16` and `wmt18`
2. When trying to download `wmt17 zh-en`, I got the following error:
> ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-zh.tar.gz | 38 | 🐛 [Dataset] Cannot download wmt14, wmt15 and wmt17
1. I try downloading `wmt14`, `wmt15`, `wmt17`, `wmt19` with the following code:
```
nlp.load_dataset('wmt14','de-en')
nlp.load_dataset('wmt15','de-en')
nlp.load_dataset('wmt17','de-en')
nlp.load_dataset('wmt19','de-en')
```
The code runs but the download speed is **extremely slow**, the same behaviour is not observed on `wmt16` and `wmt18`
2. When trying to download `wmt17 zh-en`, I got the following error:
> ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-zh.tar.gz
similar slow download speed here for nlp.load_dataset('wmt14', 'fr-en')
`
Downloading: 100%|██████████████████████████████████████████████████████████| 658M/658M [1:00:42<00:00, 181kB/s]
Downloading: 100%|██████████████████████████████████████████████████████████| 918M/918M [1:39:38<00:00, 154kB/s]
Downloading: 2%|▉ | 40.9M/2.37G [04:48<5:03:06, 128kB/s]
`
Could we just download a specific subdataset in 'wmt14', such as 'newstest14'? | [
-0.27544549107551575,
-0.19817635416984558,
-0.01950569450855255,
0.4694991111755371,
0.06568701565265656,
0.19420188665390015,
0.027084797620773315,
0.2684629559516907,
0.08611847460269928,
-0.031172052025794983,
-0.2506633698940277,
-0.06791340559720993,
0.21257653832435608,
0.030787168070673943,
-0.06282251328229904,
-0.18905159831047058,
-0.14600250124931335,
0.1014118418097496,
-0.2369920015335083,
-0.026956632733345032,
-0.2904830574989319,
0.20361799001693726,
-0.09069599211215973,
0.12712639570236206,
0.2401779443025589,
0.07800306379795074,
-0.050166644155979156,
-0.19689613580703735,
-0.159640833735466,
-0.274823397397995,
0.5160510540008545,
0.3601163327693939,
0.058654025197029114,
0.14504468441009521,
-0.00012193865404697135,
0.08257351815700531,
0.18356628715991974,
-0.1369365006685257,
-0.3636045455932617,
-0.13873519003391266,
-0.5023857951164246,
-0.37979552149772644,
-0.05707061290740967,
-0.045134592801332474,
-0.02869473397731781,
-0.4139440655708313,
0.294800728559494,
-0.1618005633354187,
0.20845070481300354,
0.31495392322540283,
0.12140624225139618,
0.19129954278469086,
-0.18429599702358246,
0.058812059462070465,
0.22601208090782166,
-0.29734474420547485,
-0.1599634289741516,
0.1628725379705429,
0.09113748371601105,
-0.09987098723649979,
0.1882559061050415,
0.03944963589310646,
0.1054430902004242,
0.4685545861721039,
0.08817516267299652,
0.18371929228305817,
0.03437945991754532,
-0.33798158168792725,
0.1303820013999939,
0.4677028954029083,
0.7240514159202576,
0.013422328978776932,
-0.5606610774993896,
0.10949528962373734,
-0.18644386529922485,
-0.17934846878051758,
0.15904495120048523,
0.2385329306125641,
-0.3889274597167969,
-0.009706370532512665,
-0.25802507996559143,
0.1541270613670349,
-0.21500727534294128,
0.5520458817481995,
-0.1538667380809784,
0.6958835124969482,
0.23100978136062622,
0.10350033640861511,
0.20300117135047913,
-0.07915075123310089,
-0.08163273334503174,
-0.10970361530780792,
0.06498835980892181,
0.11401978135108948,
-0.4582257866859436,
-0.14196789264678955,
-0.29280975461006165,
-0.056524090468883514,
0.09610902518033981,
0.0370480976998806,
0.2588024437427521,
0.30044934153556824,
0.07329238951206207,
-0.09017200022935867,
0.21490198373794556,
-0.03725564852356911,
-0.13630259037017822,
-0.1615840345621109,
0.3071225881576538,
0.023427685722708702,
0.1086895614862442,
0.12783947587013245,
-0.014628899283707142,
-0.07349663972854614,
-0.333362877368927,
0.04294376075267792,
-0.06410367786884308,
0.09005358815193176,
-0.47141626477241516,
-0.18300898373126984,
-0.1725572645664215,
-0.30953171849250793,
-0.2633669674396515,
0.2749699056148529,
-0.14724314212799072,
0.20986586809158325,
0.03502097725868225,
0.16416220366954803,
-0.03738488256931305,
-0.2366253137588501,
-0.08513058722019196,
-0.07760009169578552,
-0.11943228542804718,
0.08527610450983047,
0.3873595595359802,
0.20087392628192902,
0.10212792456150055,
-0.19794319570064545,
-0.46242159605026245,
0.1757555902004242,
0.046251773834228516,
-0.15041808784008026,
-0.3103294372558594,
0.21442370116710663,
0.022912822663784027,
0.5044228434562683,
0.004304137080907822,
0.2673935294151306,
-0.2623715400695801,
-0.030695699155330658,
0.04746357351541519,
0.13353154063224792,
0.15918117761611938,
0.037539828568696976,
-0.178182914853096,
-0.07587441056966782,
-0.4116548001766205,
0.15831679105758667,
-0.19792523980140686,
0.03844841197133064,
-0.313321977853775,
-0.054228201508522034,
-0.4436589777469635,
-0.06379149109125137,
0.23253950476646423,
0.3726833164691925,
-0.29438841342926025,
-0.14047887921333313,
-0.39399397373199463,
-0.07723209261894226,
0.27610066533088684,
0.41654205322265625,
-0.011609201319515705,
0.03899683430790901,
-0.13222864270210266,
0.013520404696464539,
0.6128703355789185,
-0.06600476801395416,
-0.5310536026954651,
0.4080584943294525,
-0.3529971241950989,
0.0949898362159729,
0.24388903379440308,
0.22271773219108582,
0.041215501725673676,
-0.0381213016808033,
0.11256001889705658,
0.596707284450531,
-0.06554487347602844,
0.0432797446846962,
0.0339885912835598,
-0.39139968156814575,
0.4888463020324707,
0.15824656188488007,
-0.0716143250465393,
0.1904321014881134,
0.04067126661539078,
0.2375052124261856,
0.4658764600753784,
0.001644764095544815,
0.125679612159729,
-0.036769621074199677,
-0.07681776583194733,
-0.18691568076610565,
0.037169378250837326,
0.08056895434856415,
-0.8039487600326538,
0.35965919494628906,
-0.04265499860048294,
-0.0757528692483902,
0.05913858115673065,
0.049841731786727905,
-0.16872182488441467,
-0.338479220867157,
0.11574064195156097,
0.1946621537208557,
0.0570870041847229,
0.4249054193496704,
-0.02433158829808235,
-0.07355155050754547,
0.030615340918302536,
0.24240230023860931,
0.14008192718029022,
0.07456688582897186,
0.09311060607433319,
0.0142261553555727,
0.021062159910798073,
0.1914709508419037,
0.5240718126296997,
-0.23234790563583374,
0.1202666312456131,
-0.19814486801624298,
-0.04779910296201706,
0.04047983139753342,
-0.13486628234386444,
0.3278014361858368,
0.04727652668952942,
-0.10493598878383636,
0.006230459548532963,
-0.30153903365135193,
-0.02321944199502468,
0.5032978057861328,
0.0925627276301384,
-0.21297892928123474,
-0.07480161637067795,
0.20867685973644257,
0.3825480341911316,
0.3309424817562103,
0.3173203468322754,
0.12931272387504578,
0.39107224345207214,
-0.1069188117980957,
0.19997872412204742,
-0.17395800352096558,
0.2182220071554184,
0.12086184322834015,
-0.032522838562726974,
-0.048230260610580444,
-0.1440732479095459,
0.4479544162750244,
0.4699535369873047,
-0.04675082862377167,
0.03592541068792343,
0.2993106544017792,
0.00868178904056549,
-0.05881447345018387,
-0.21146240830421448,
0.43952861428260803,
0.4815121293067932,
0.0023182362783700228,
0.3339684009552002,
-0.03548825532197952,
0.2888123691082001,
-0.46056127548217773,
0.21123859286308289,
0.19931480288505554,
-0.3576085865497589,
0.1509038805961609,
0.05442522466182709,
-0.06240827962756157,
-0.15878134965896606,
0.054461318999528885,
0.3649357557296753,
0.3378578722476959,
-0.12094411253929138,
0.10752280801534653,
-0.6640236973762512,
-0.5608874559402466,
-0.14699363708496094,
-0.14501506090164185,
-0.12775199115276337,
-0.2961667776107788,
-0.03415893018245697,
0.3210785686969757,
-0.14420774579048157,
0.04917538911104202,
-0.005148325115442276,
0.17365466058254242,
-0.03599722310900688,
0.08244359493255615,
-0.3095356822013855,
-0.06275459378957748,
-0.263109415769577,
0.04139937087893486,
0.3632289469242096,
0.258867472410202,
0.3428499400615692,
-0.30351167917251587,
-0.2165747731924057,
-0.2507111728191376,
-0.08788973093032837,
-0.16289986670017242,
-0.1206064373254776,
0.04401775449514389,
-0.05094197392463684,
0.6214647889137268,
0.05943242460489273,
-0.2801194190979004,
0.09676608443260193,
0.008083807304501534,
-0.19963936507701874,
-0.029478667303919792,
-0.07286675274372101,
0.08129528164863586,
-0.08191458880901337,
-0.49503710865974426,
-0.5639943480491638,
-0.4488963484764099,
0.3042038679122925,
-0.02607811987400055,
0.4307364821434021,
0.18047934770584106,
-0.4492822289466858,
-0.02452368661761284,
0.20012307167053223,
0.17837639153003693,
-0.09939883649349213,
0.21117278933525085,
0.5299038290977478,
0.04873855784535408,
-0.3680868148803711,
0.1324004977941513,
0.18441438674926758,
0.1965639293193817,
0.5387359261512756,
-0.5226671099662781,
0.17225030064582825,
-0.1968166083097458,
-0.30200785398483276,
0.2634519338607788,
-0.25868964195251465,
0.1561909168958664,
-0.28696706891059875,
-0.12371230125427246,
-0.05307939276099205,
-0.16027197241783142,
0.003649994730949402,
0.19237592816352844,
0.26426437497138977,
0.10584232956171036,
0.20241573452949524,
0.086790531873703,
0.3931769132614136,
0.2769280672073364,
-0.012825511395931244,
0.41065433621406555,
0.029258685186505318,
-0.14758826792240143,
0.1673334538936615,
-0.26762422919273376,
0.05241794139146805,
-0.12297195196151733,
0.3658304214477539,
0.44811809062957764,
-0.2541320323944092,
-0.1831546425819397,
-0.3033005893230438,
0.09402626752853394,
-0.010096460580825806,
-0.3930918872356415,
0.004197830334305763,
0.012255970388650894,
0.05259549617767334,
0.21464429795742035,
-0.04006293788552284,
-0.03320034593343735,
-0.31058838963508606,
0.010870927944779396,
0.2935234010219574,
-0.04516107589006424,
0.18504932522773743,
-0.028055377304553986,
-0.09780879318714142,
-0.5492727160453796,
0.28949761390686035,
0.07632315903902054,
0.7073529362678528,
-0.13268016278743744,
0.15208807587623596,
0.0723668560385704,
-0.014537421986460686,
0.30306732654571533,
-0.17299285531044006,
0.4643152952194214,
0.1467852145433426,
-0.17201510071754456,
-0.3408593237400055,
-0.14191696047782898,
-0.16905362904071808,
-0.18522438406944275,
0.30358731746673584,
0.35251349210739136,
-0.5763115286827087,
-0.3394087255001068,
0.0019274596124887466,
0.18171852827072144,
-0.15632696449756622,
0.09981758892536163,
-0.11488443613052368,
-0.42487505078315735,
-0.07972655445337296,
-0.197315514087677,
-0.14185906946659088,
0.15135526657104492,
-0.025854330509901047,
-0.10205186903476715,
0.11128032952547073,
-0.11258132755756378,
0.10089356452226639,
0.09681381285190582,
0.011180801317095757,
0.41000479459762573,
0.2851950526237488,
0.12453023344278336,
0.12302780151367188,
0.12083407491445541,
0.48839834332466125,
0.22907765209674835,
0.05280805006623268,
0.20325663685798645,
-0.06111203506588936,
-0.10436887294054031,
0.5792747735977173,
0.018354065716266632,
0.24894216656684875,
-0.06978930532932281,
0.1338161826133728,
-0.06251934170722961,
0.14621485769748688,
0.2862613797187805,
-0.3440869152545929,
-0.20975658297538757,
-0.32659295201301575,
0.40350431203842163,
0.08485530316829681,
-0.10496170073747635,
0.32732272148132324,
-0.0833917111158371,
-0.23069921135902405,
-0.029858440160751343,
0.12379969656467438,
0.9365198612213135,
-0.1632588505744934,
0.19266510009765625,
-0.09682964533567429,
0.01930811256170273,
0.3620099723339081,
-0.006212241947650909,
0.12844370305538177,
-0.06104129180312157,
-0.35176903009414673,
-0.06684312224388123,
0.11291705071926117,
-0.024646811187267303,
0.3345569372177124,
-0.24193736910820007,
0.4412825107574463,
0.1158207505941391,
0.32514694333076477,
0.4289507269859314,
0.15136322379112244,
0.03478338569402695,
-0.040363799780607224,
-0.25475019216537476,
0.04589682072401047,
-0.1982334703207016,
0.48789143562316895,
-0.021124888211488724,
-0.3443233370780945,
-0.1988646388053894,
-0.09885337948799133,
-0.4196379780769348,
0.04158634692430496,
-0.39568260312080383,
0.03584950417280197,
-0.3102172315120697,
-0.09451214224100113,
0.15918031334877014,
0.0962362140417099,
0.20750944316387177,
0.07682313024997711,
-0.45668721199035645,
0.06209922954440117,
-0.6321642398834229,
-0.0321623831987381,
0.06858455389738083,
-0.13180367648601532,
-0.14245088398456573,
-0.196486234664917,
-0.11432956904172897,
-0.169612318277359,
0.10906293988227844,
-0.222417414188385,
-0.07567612081766129,
-0.1023714691400528,
-0.4478808045387268,
0.25474873185157776,
-0.17868083715438843,
-0.16087089478969574,
-0.25354087352752686,
-0.12254415452480316,
0.046651698648929596,
-0.16458849608898163,
-0.03970063850283623,
0.2860140800476074,
0.1273249089717865,
-0.19633318483829498,
-0.0019033066928386688,
0.619827151298523,
0.0029093343764543533,
0.10547758638858795,
0.3953414261341095,
0.05065467581152916,
-0.16048213839530945,
-0.2704816162586212,
-0.3811042308807373,
-0.10607916116714478,
-0.1625463217496872,
-0.07819116860628128,
-0.21014150977134705,
0.01403111219406128,
-0.006037909537553787,
0.4558543860912323,
-0.039255060255527496,
0.16820256412029266,
0.028010819107294083,
-0.6202654242515564,
-0.16097092628479004,
0.1318269968032837,
-0.1765398383140564,
0.11990021169185638,
-0.5219162702560425,
0.11923836171627045,
0.11358252167701721,
0.41603884100914,
-0.20921286940574646,
0.05656985938549042,
-0.3388041853904724,
0.047105323523283005,
0.28803929686546326,
-0.07068271189928055,
0.22899381816387177,
0.18862506747245789,
-0.034175463020801544,
0.025163404643535614,
-0.3593531847000122,
-0.05424061417579651,
-0.021897725760936737,
0.2447006106376648,
0.19392183423042297,
-0.37579435110092163,
0.20784620940685272,
-0.25652509927749634,
-0.08592486381530762,
-0.018844567239284515,
0.022074278444051743,
-0.11195656657218933,
0.059306588023900986,
0.038255736231803894,
0.2219020277261734,
0.141669362783432,
-0.2665587067604065,
0.17436832189559937,
0.030527278780937195,
0.37590140104293823,
0.10191121697425842,
0.29916542768478394,
0.0468897819519043,
-0.08483372628688812,
-0.45549604296684265,
-0.2001158595085144,
0.10271329432725906,
0.11048031598329544,
0.32432329654693604,
0.02502007782459259,
-0.020086493343114853,
0.00199635187163949,
0.1979023665189743,
0.5765166878700256,
0.01475539617240429,
-0.0014473684132099152,
0.10048483312129974,
0.02530825138092041,
-0.29220229387283325,
-0.12871021032333374,
0.41137418150901794,
-0.02010704204440117,
-0.040984027087688446,
0.061801932752132416,
0.12894757091999054,
-0.2663395404815674,
-0.009403087198734283,
-0.20226368308067322,
0.42153120040893555,
-0.07479611039161682,
0.09205105900764465,
0.3748514950275421,
0.16939401626586914,
0.0775662213563919,
-0.021824942901730537,
0.048516884446144104,
0.16034269332885742,
0.24484938383102417,
-0.25888141989707947,
0.22829985618591309,
-0.10189998894929886,
0.05284605175256729,
-0.10008134692907333,
-0.31351378560066223,
-0.15467926859855652,
0.628254771232605,
-0.02576693892478943,
0.009152807295322418,
0.23100289702415466,
0.09641266614198685,
-0.05311967805027962,
-0.24432387948036194,
-0.352806955575943,
0.17909590899944305,
0.25874438881874084,
-0.1399994194507599,
-0.22767850756645203,
-0.07662493735551834,
-0.44283053278923035,
0.15167711675167084,
-0.14572465419769287,
-0.4017065763473511,
0.26905614137649536,
0.2768543064594269,
0.06004234775900841,
-0.2822737693786621,
-0.3852896988391876,
-0.10959877818822861,
-0.04000876098871231,
-0.3327306807041168,
0.1910596638917923,
0.011470355093479156,
-0.13175740838050842,
0.19071485102176666,
0.16743573546409607,
-0.038651276379823685,
0.1761791855096817,
0.04614511877298355,
0.17674337327480316,
-0.057556379586458206,
-0.08590231835842133,
-0.09754090011119843,
0.2834542989730835,
0.25562989711761475,
-0.19364450871944427,
0.47116619348526,
-0.017448192462325096,
-0.05364016070961952,
0.18638595938682556,
0.19680571556091309,
-0.21368111670017242,
-0.16794437170028687,
0.47512540221214294,
-0.10479991137981415,
0.0741506889462471,
-0.06537261605262756,
-0.11764506250619888,
-0.2411348521709442,
-0.1365995705127716,
-0.048895854502916336,
-0.10711541771888733,
0.3333060145378113,
0.048465050756931305,
0.006460007280111313,
-0.15351855754852295,
0.9997267127037048,
-0.043617140501737595,
0.247396320104599,
-0.24256330728530884,
-0.3746010661125183,
-0.6246228218078613,
0.09660660475492477,
-0.23219677805900574,
0.08987922966480255,
0.21224813163280487,
0.13977201282978058,
0.10168159008026123,
0.2786843776702881,
0.09794429689645767,
0.5578716397285461,
-0.20367172360420227,
0.24890249967575073,
-0.4591289162635803,
-0.3036428391933441,
0.01576659083366394,
0.4082072973251343,
-0.2625911235809326,
-0.4670156240463257,
0.4813465476036072,
-0.3863248825073242,
-0.04986843466758728,
-0.05338313430547714,
-0.09023484587669373,
0.24367648363113403,
0.3555138409137726,
0.33868515491485596,
0.011722522787749767,
0.6352945566177368,
0.02851933240890503,
-0.1947275996208191,
-0.3011881709098816,
-0.04148649051785469,
-0.11973193287849426,
-0.006022073328495026,
0.16487614810466766,
0.19995594024658203,
0.04873087257146835,
0.45054689049720764,
-0.293501615524292,
0.22605089843273163,
-0.26806172728538513,
0.2887163460254669,
0.14744584262371063,
0.19202516973018646,
-0.1904371678829193,
0.08863119781017303,
0.12658056616783142,
-0.03108840435743332,
-0.05998867750167847,
-0.15645228326320648,
-0.5516496896743774,
-0.2328881174325943,
0.5788878202438354,
-0.2664410173892975,
-0.2547086179256439,
-0.15979903936386108,
0.35583674907684326,
-0.04259385168552399,
0.3084098696708679,
-0.03204509988427162,
0.20630612969398499,
0.1983068883419037,
-0.09434888511896133,
-0.3142535984516144,
0.2210627645254135,
0.09234462678432465,
-0.32649677991867065,
0.03958078846335411,
0.03556666895747185,
0.19239628314971924,
-0.42838239669799805,
-0.2856144905090332,
-0.21666650474071503
] |
https://github.com/huggingface/datasets/issues/388 | 🐛 [Dataset] Cannot download wmt14, wmt15 and wmt17 | > The code runs but the download speed is extremely slow, the same behaviour is not observed on wmt16 and wmt18
The original source for the files may provide slow download speeds.
We can probably host these files ourselves.
> When trying to download wmt17 zh-en, I got the following error:
> ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-zh.tar.gz
Looks like the file`UNv1.0.en-zh.tar.gz` is missing, or the url changed. We need to fix that
> Could we just download a specific subdataset in 'wmt14', such as 'newstest14'?
Right now I don't think it's possible. Maybe @patrickvonplaten knows more about it
| 1. I try downloading `wmt14`, `wmt15`, `wmt17`, `wmt19` with the following code:
```
nlp.load_dataset('wmt14','de-en')
nlp.load_dataset('wmt15','de-en')
nlp.load_dataset('wmt17','de-en')
nlp.load_dataset('wmt19','de-en')
```
The code runs but the download speed is **extremely slow**, the same behaviour is not observed on `wmt16` and `wmt18`
2. When trying to download `wmt17 zh-en`, I got the following error:
> ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-zh.tar.gz | 97 | 🐛 [Dataset] Cannot download wmt14, wmt15 and wmt17
1. I try downloading `wmt14`, `wmt15`, `wmt17`, `wmt19` with the following code:
```
nlp.load_dataset('wmt14','de-en')
nlp.load_dataset('wmt15','de-en')
nlp.load_dataset('wmt17','de-en')
nlp.load_dataset('wmt19','de-en')
```
The code runs but the download speed is **extremely slow**, the same behaviour is not observed on `wmt16` and `wmt18`
2. When trying to download `wmt17 zh-en`, I got the following error:
> ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-zh.tar.gz
> The code runs but the download speed is extremely slow, the same behaviour is not observed on wmt16 and wmt18
The original source for the files may provide slow download speeds.
We can probably host these files ourselves.
> When trying to download wmt17 zh-en, I got the following error:
> ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-zh.tar.gz
Looks like the file`UNv1.0.en-zh.tar.gz` is missing, or the url changed. We need to fix that
> Could we just download a specific subdataset in 'wmt14', such as 'newstest14'?
Right now I don't think it's possible. Maybe @patrickvonplaten knows more about it
| [
-0.26860928535461426,
-0.1404750943183899,
-0.007186409085988998,
0.5019999742507935,
-0.0168406181037426,
0.22515732049942017,
-0.05307811126112938,
0.2993670105934143,
0.09113475680351257,
-0.03681463003158569,
-0.22522702813148499,
-0.07992757856845856,
0.11619096249341965,
0.005876803770661354,
0.03430512920022011,
-0.20816576480865479,
-0.11932794004678726,
0.03418023884296417,
-0.3183061182498932,
0.008012853562831879,
-0.31161949038505554,
0.14688552916049957,
-0.08682157099246979,
0.07337017357349396,
0.22406426072120667,
-0.006965162232518196,
-0.20527847111225128,
-0.02547137439250946,
-0.1000094935297966,
-0.3394286334514618,
0.42789536714553833,
0.29475775361061096,
0.08440364897251129,
0.2282150387763977,
-0.00011492527846712619,
0.07099440693855286,
0.16644388437271118,
-0.18155641853809357,
-0.3427719175815582,
-0.09165260195732117,
-0.5097866058349609,
-0.4445602297782898,
-0.1338346153497696,
-0.0916886180639267,
-0.04989207535982132,
-0.49005648493766785,
0.25611546635627747,
-0.15688546001911163,
0.33148980140686035,
0.34185224771499634,
0.16443435847759247,
0.24183526635169983,
-0.14621344208717346,
-0.008507583290338516,
0.2681642174720764,
-0.24180282652378082,
-0.11912823468446732,
0.17687243223190308,
0.08581788837909698,
-0.06470664590597153,
0.20198744535446167,
0.05394356697797775,
0.0507226288318634,
0.4143848419189453,
0.06480139493942261,
0.11472632735967636,
-0.006697796285152435,
-0.2883557379245758,
0.06572972983121872,
0.4004985988140106,
0.7070286273956299,
0.02806871011853218,
-0.535003125667572,
0.09411405771970749,
-0.031239692121744156,
-0.12492650747299194,
0.19940254092216492,
0.24830904603004456,
-0.28390777111053467,
0.023875050246715546,
-0.2142186462879181,
0.0485210195183754,
-0.19468003511428833,
0.546266496181488,
-0.03357027843594551,
0.666264533996582,
0.23001183569431305,
0.05126802623271942,
0.08502113819122314,
-0.03452230244874954,
0.08300654590129852,
-0.12741678953170776,
0.0934068113565445,
0.00128219835460186,
-0.3166343569755554,
-0.09422628581523895,
-0.29094210267066956,
-0.017359450459480286,
0.04053127020597458,
0.008377166464924812,
0.29514989256858826,
0.2358810007572174,
0.018314499408006668,
-0.07128485292196274,
0.17815865576267242,
-0.10286608338356018,
-0.16707995533943176,
-0.23948651552200317,
0.31527888774871826,
0.1925610601902008,
0.13043679296970367,
0.14077240228652954,
-0.06345286965370178,
-0.1405700296163559,
-0.42652642726898193,
0.17940762639045715,
0.06780656427145004,
0.08191968500614166,
-0.30323830246925354,
-0.23598729074001312,
-0.09528498351573944,
-0.25852906703948975,
-0.2333584725856781,
0.23153918981552124,
-0.22320514917373657,
0.30335962772369385,
-0.014074167236685753,
0.08793066442012787,
-0.07828018814325333,
-0.3754118084907532,
-0.11158280819654465,
-0.06193634495139122,
-0.09473630785942078,
0.13759483397006989,
0.4606339633464813,
0.23278330266475677,
0.21258316934108734,
-0.18556228280067444,
-0.3248116374015808,
0.12201862037181854,
0.0827297791838646,
-0.008906451053917408,
-0.20343583822250366,
0.20949654281139374,
0.03890310600399971,
0.5146353840827942,
-0.015260566025972366,
0.24599675834178925,
-0.25954264402389526,
-0.01844077557325363,
-0.06530813127756119,
-0.02785712294280529,
0.1655278205871582,
0.09226364642381668,
-0.16114230453968048,
-0.14668239653110504,
-0.33697274327278137,
0.029697179794311523,
-0.19424226880073547,
-0.07962741702795029,
-0.315135657787323,
-0.09356708824634552,
-0.3342670202255249,
-0.12861981987953186,
0.24336007237434387,
0.4242478609085083,
-0.34870293736457825,
-0.008513446897268295,
-0.37594807147979736,
-0.03514382243156433,
0.29230859875679016,
0.35704392194747925,
-0.07959811389446259,
0.07169349491596222,
-0.15897420048713684,
-0.1769256591796875,
0.5281005501747131,
-0.1343880593776703,
-0.4725865423679352,
0.2704164385795593,
-0.3284674882888794,
0.17230115830898285,
0.24602338671684265,
0.18703439831733704,
0.0267484113574028,
-0.08350551873445511,
0.10471385717391968,
0.6350845694541931,
0.0012761875987052917,
0.05151122063398361,
-0.07068055868148804,
-0.3561583459377289,
0.3798072934150696,
0.19108757376670837,
-0.047855887562036514,
0.12341706454753876,
-0.026246704161167145,
0.22350455820560455,
0.4299485981464386,
-0.006066512316465378,
0.23879346251487732,
-0.019067861139774323,
-0.1557723581790924,
-0.13213740289211273,
0.029181890189647675,
0.07448979467153549,
-0.7336920499801636,
0.3186698257923126,
-0.10532882064580917,
-0.16525621712207794,
0.08107621967792511,
-0.003432542085647583,
-0.27512022852897644,
-0.3440808355808258,
0.07906025648117065,
0.09727616608142853,
0.10508805513381958,
0.5249675512313843,
-0.04128779098391533,
-0.08311988413333893,
0.00021348148584365845,
0.18629702925682068,
0.1373167186975479,
0.04022502526640892,
-0.041892897337675095,
0.05326654016971588,
-0.04454575479030609,
0.17131772637367249,
0.544014573097229,
-0.2567560076713562,
0.17173822224140167,
-0.2130446434020996,
-0.03713526204228401,
0.1358809769153595,
-0.17396439611911774,
0.36118030548095703,
0.11197134107351303,
-0.17929868400096893,
0.09265279769897461,
-0.37938979268074036,
0.037096310406923294,
0.5412626266479492,
0.06411755830049515,
-0.13621430099010468,
-0.07269459217786789,
0.18978473544120789,
0.144870325922966,
0.2603428363800049,
0.29212766885757446,
0.14364157617092133,
0.4012098014354706,
-0.1410464346408844,
0.1060657799243927,
-0.08868113160133362,
0.16131633520126343,
0.12437881529331207,
-0.13675597310066223,
-0.09580548852682114,
-0.1503303050994873,
0.41068777441978455,
0.4148618280887604,
-0.03722057119011879,
0.018788523972034454,
0.2357935905456543,
-0.06680361181497574,
-0.07496705651283264,
-0.22412317991256714,
0.532693088054657,
0.4717298150062561,
0.056289564818143845,
0.31552180647850037,
0.02736758626997471,
0.2627878785133362,
-0.4930698871612549,
0.25849980115890503,
0.20685197412967682,
-0.34417033195495605,
0.20358800888061523,
0.07712303847074509,
-0.13784117996692657,
-0.13747864961624146,
0.07162028551101685,
0.3822629749774933,
0.25731369853019714,
-0.19862967729568481,
0.05366028845310211,
-0.679352343082428,
-0.5351990461349487,
-0.34343892335891724,
-0.251122385263443,
-0.14825265109539032,
-0.3052470088005066,
0.12821584939956665,
0.27858811616897583,
-0.2804340422153473,
0.12026789784431458,
0.03178878501057625,
0.22599856555461884,
-0.17382875084877014,
0.19847939908504486,
-0.21390670537948608,
-0.13563567399978638,
-0.25482630729675293,
0.09767429530620575,
0.35864007472991943,
0.3376227617263794,
0.2934267818927765,
-0.3645833134651184,
-0.1957133710384369,
-0.31089475750923157,
-0.032551467418670654,
-0.1599155217409134,
-0.003614533692598343,
0.137274369597435,
-0.03901319205760956,
0.5934831500053406,
0.13249626755714417,
-0.39878883957862854,
0.15634284913539886,
-0.009373519569635391,
-0.04489945247769356,
-0.06346152722835541,
-0.0964994803071022,
0.09938489645719528,
-0.0341019481420517,
-0.6237545013427734,
-0.5904380083084106,
-0.523463785648346,
0.18603487312793732,
-0.03532489761710167,
0.443001389503479,
0.13969680666923523,
-0.3087504804134369,
-0.04156523942947388,
0.10248110443353653,
0.18441757559776306,
-0.056667644530534744,
-0.028025716543197632,
0.5375438332557678,
-0.1619541198015213,
-0.35539838671684265,
0.17279495298862457,
0.20596133172512054,
0.2009565681219101,
0.4632630944252014,
-0.5046474933624268,
0.06467835605144501,
-0.11976684629917145,
-0.2729343771934509,
0.18706853687763214,
-0.19812031090259552,
0.14202116429805756,
-0.18990331888198853,
-0.17568109929561615,
-0.09216208755970001,
-0.11020542681217194,
-0.047417350113391876,
0.15425866842269897,
0.36092573404312134,
0.10701567679643631,
0.058069344609975815,
0.054027628153562546,
0.5281318426132202,
0.21440544724464417,
0.028845028951764107,
0.3825378715991974,
0.06985612213611603,
-0.09675712883472443,
0.20062309503555298,
-0.22115083038806915,
0.05593334138393402,
-0.14933690428733826,
0.35215675830841064,
0.4451558589935303,
-0.17744562029838562,
-0.1599804311990738,
-0.3324053883552551,
0.013521268963813782,
-0.11741261929273605,
-0.41210103034973145,
0.06760899722576141,
0.07657696306705475,
0.08481600880622864,
0.25021159648895264,
-0.09072983264923096,
-0.10477057099342346,
-0.24862200021743774,
0.1401178389787674,
0.28660187125205994,
-0.055487968027591705,
0.22252970933914185,
-0.1112920492887497,
-0.08390594273805618,
-0.4219071865081787,
0.3272365927696228,
0.06965360045433044,
0.6666909456253052,
-0.07275748252868652,
0.09598792344331741,
0.08111827820539474,
-0.042773306369781494,
0.3269478976726532,
-0.25895175337791443,
0.36647742986679077,
0.1476515233516693,
-0.027038082480430603,
-0.3202751874923706,
-0.18055203557014465,
-0.1551135927438736,
-0.13633036613464355,
0.2854503393173218,
0.24136433005332947,
-0.5075768232345581,
-0.2647196352481842,
-0.012011837214231491,
0.30467575788497925,
-0.2263692319393158,
0.12715363502502441,
-0.09268063306808472,
-0.454677551984787,
-0.16863490641117096,
-0.24838650226593018,
-0.19523274898529053,
0.04767099767923355,
-0.06362266838550568,
-0.10804034769535065,
0.12068316340446472,
0.013032793998718262,
-0.008906446397304535,
0.10070841014385223,
0.11346089094877243,
0.4704127907752991,
0.2650998830795288,
0.1576220691204071,
0.2695900797843933,
0.20702439546585083,
0.44629910588264465,
0.15909340977668762,
0.08764249831438065,
0.11125688254833221,
-0.08229614794254303,
-0.015039138495922089,
0.589969277381897,
0.07582860440015793,
0.1944025754928589,
0.07974576950073242,
0.11392447352409363,
-0.11585534363985062,
0.16705936193466187,
0.3086412250995636,
-0.45667746663093567,
-0.15484975278377533,
-0.3943788707256317,
0.30803051590919495,
0.051821690052747726,
-0.1139824390411377,
0.3615950345993042,
-0.09870350360870361,
-0.2175687849521637,
0.056677572429180145,
0.1134926900267601,
1.0516215562820435,
-0.05844417214393616,
0.18158330023288727,
-0.13888868689537048,
-0.0930824801325798,
0.4372522234916687,
0.005629431456327438,
0.23013509809970856,
-0.0400012731552124,
-0.3949955403804779,
-0.03986983746290207,
0.13879746198654175,
0.000631377100944519,
0.33042633533477783,
-0.3092353343963623,
0.4790845215320587,
0.14807042479515076,
0.2751792073249817,
0.2732686400413513,
0.0889241099357605,
0.0763859748840332,
-0.09823544323444366,
-0.3572639226913452,
0.05401340126991272,
-0.20711131393909454,
0.45920202136039734,
-0.1164928525686264,
-0.3337395191192627,
-0.1740611344575882,
-0.06244773045182228,
-0.30345502495765686,
0.05112297087907791,
-0.28517502546310425,
0.05603260546922684,
-0.3349587023258209,
-0.05035919323563576,
0.10389813780784607,
0.07654985785484314,
0.2055119425058365,
0.12842747569084167,
-0.49393218755722046,
0.18279926478862762,
-0.5684787631034851,
-0.09731358289718628,
0.015015264973044395,
-0.09198621660470963,
-0.15245158970355988,
-0.24839577078819275,
-0.18203020095825195,
-0.1257845163345337,
0.08382591605186462,
-0.16857722401618958,
-0.048217855393886566,
-0.17962469160556793,
-0.28986483812332153,
0.23559018969535828,
-0.14086872339248657,
-0.10408848524093628,
-0.12622210383415222,
-0.21863935887813568,
0.1043439656496048,
-0.2395484298467636,
-0.10402476042509079,
0.2727035880088806,
0.10630765557289124,
-0.17497847974300385,
-0.03202087804675102,
0.614195704460144,
-0.002717830240726471,
0.1257404386997223,
0.5313012599945068,
0.182004913687706,
-0.10840202867984772,
-0.26233115792274475,
-0.3209674060344696,
-0.28575947880744934,
-0.32478252053260803,
-0.07233498245477676,
-0.1397089660167694,
0.04437342286109924,
-0.014888770878314972,
0.4144517481327057,
0.09394855797290802,
0.18574227392673492,
-0.006085190922021866,
-0.5259033441543579,
-0.13345324993133545,
0.12947769463062286,
0.042193807661533356,
0.09200053662061691,
-0.4193428158760071,
0.034506283700466156,
0.16744458675384521,
0.38627728819847107,
-0.28897029161453247,
0.09076671302318573,
-0.30847102403640747,
0.10500144213438034,
0.18382631242275238,
-0.014771893620491028,
0.1369226574897766,
0.218616783618927,
-0.020785003900527954,
-0.020585130900144577,
-0.26064440608024597,
-0.0791364461183548,
-0.02086811512708664,
0.23877564072608948,
0.08866928517818451,
-0.39160582423210144,
0.18319576978683472,
-0.24717693030834198,
-0.060422513633966446,
0.05260688066482544,
-0.06636415421962738,
-0.11418409645557404,
0.05837574228644371,
0.04718033969402313,
0.1464034467935562,
0.08835861086845398,
-0.25558537244796753,
0.2022087126970291,
0.04967702925205231,
0.3802536725997925,
0.06882290542125702,
0.2652398347854614,
0.06981170922517776,
-0.19442343711853027,
-0.37251681089401245,
-0.24814897775650024,
0.09053976833820343,
0.20646518468856812,
0.39349156618118286,
0.05170164257287979,
-0.055167533457279205,
0.10356494039297104,
0.20667357742786407,
0.6060751676559448,
0.09497025609016418,
-0.003731153905391693,
0.182651549577713,
0.08500532060861588,
-0.3482970595359802,
-0.10512646287679672,
0.42687469720840454,
-0.049398213624954224,
-0.1335228830575943,
-0.018276922404766083,
0.16041722893714905,
-0.2951154112815857,
-0.04828779399394989,
-0.10612799227237701,
0.3336075246334076,
-0.04469868540763855,
0.13482622802257538,
0.38308078050613403,
0.13186782598495483,
-0.02230783924460411,
-0.14582902193069458,
-0.011411048471927643,
0.18305703997612,
0.20753833651542664,
-0.2937127947807312,
0.29600492119789124,
0.0022071562707424164,
0.05122928321361542,
-0.06331264227628708,
-0.32413631677627563,
-0.06495073437690735,
0.5230965614318848,
0.19080345332622528,
0.05683141201734543,
0.21894977986812592,
0.16270002722740173,
-0.09953118115663528,
-0.16708603501319885,
-0.4335702061653137,
0.351161926984787,
0.30173516273498535,
-0.13930800557136536,
-0.36347267031669617,
-0.10486587882041931,
-0.4123685657978058,
0.18915803730487823,
-0.11283321678638458,
-0.303528368473053,
0.3537466824054718,
0.2534000277519226,
0.029121391475200653,
-0.403700590133667,
-0.3220401704311371,
-0.1665656864643097,
0.010588601231575012,
-0.36282455921173096,
0.17554855346679688,
0.2881411015987396,
-0.16961082816123962,
0.27123305201530457,
0.2734302878379822,
0.03426087647676468,
0.19408026337623596,
0.051492687314748764,
0.23070009052753448,
-0.052965689450502396,
-0.03963455930352211,
-0.12964172661304474,
0.32555681467056274,
0.27265745401382446,
-0.15674403309822083,
0.48068204522132874,
0.04428038001060486,
-0.12150625884532928,
0.15980245172977448,
0.07249493896961212,
-0.25592079758644104,
-0.17431822419166565,
0.4113016724586487,
-0.026931803673505783,
0.04572780430316925,
-0.0965428352355957,
-0.15214300155639648,
-0.29687371850013733,
-0.11952325701713562,
0.01698693446815014,
-0.0918756052851677,
0.2861557900905609,
-0.00048412405885756016,
0.02482355758547783,
-0.18856549263000488,
1.0825711488723755,
0.014579102396965027,
0.15328818559646606,
-0.20880837738513947,
-0.40536797046661377,
-0.696079432964325,
0.14334383606910706,
-0.24708107113838196,
0.09242353588342667,
0.10401666909456253,
0.12669889628887177,
0.09647268801927567,
0.24519352614879608,
0.07241242378950119,
0.42045858502388,
-0.14978443086147308,
0.3062480688095093,
-0.502448558807373,
-0.22264863550662994,
0.09422722458839417,
0.44026249647140503,
-0.2074294090270996,
-0.42511099576950073,
0.4701157510280609,
-0.23630325496196747,
-0.032365329563617706,
0.06432013213634491,
-0.15715840458869934,
0.24655818939208984,
0.298061341047287,
0.3182753324508667,
0.04088445007801056,
0.5406652092933655,
-0.054589200764894485,
-0.25723063945770264,
-0.44108355045318604,
-0.19291235506534576,
-0.07980348914861679,
0.03456750512123108,
0.15398238599300385,
0.259601891040802,
0.019587339833378792,
0.409236878156662,
-0.3668283522129059,
0.20182153582572937,
-0.23547965288162231,
0.3416224420070648,
0.07194362580776215,
0.0303546991199255,
-0.20264381170272827,
0.07768390327692032,
0.2446890026330948,
-0.052965596318244934,
-0.11593560874462128,
-0.17985385656356812,
-0.5251286625862122,
-0.27192091941833496,
0.6197149157524109,
-0.2890970706939697,
-0.22164468467235565,
-0.22768020629882812,
0.37580186128616333,
-0.08105585724115372,
0.3304465711116791,
0.021558284759521484,
0.23012042045593262,
0.2397795468568802,
0.017453856766223907,
-0.19030751287937164,
0.20941773056983948,
-0.034333135932683945,
-0.2718367874622345,
0.029139649122953415,
0.09310237318277359,
0.16945978999137878,
-0.45759010314941406,
-0.28639453649520874,
-0.10428252071142197
] |
https://github.com/huggingface/datasets/issues/388 | 🐛 [Dataset] Cannot download wmt14, wmt15 and wmt17 | Yeah, the download speed is sadly always extremely slow :-/.
I will try to check out the `wmt17 zh-en` bug :-) | 1. I try downloading `wmt14`, `wmt15`, `wmt17`, `wmt19` with the following code:
```
nlp.load_dataset('wmt14','de-en')
nlp.load_dataset('wmt15','de-en')
nlp.load_dataset('wmt17','de-en')
nlp.load_dataset('wmt19','de-en')
```
The code runs but the download speed is **extremely slow**, the same behaviour is not observed on `wmt16` and `wmt18`
2. When trying to download `wmt17 zh-en`, I got the following error:
> ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-zh.tar.gz | 21 | 🐛 [Dataset] Cannot download wmt14, wmt15 and wmt17
1. I try downloading `wmt14`, `wmt15`, `wmt17`, `wmt19` with the following code:
```
nlp.load_dataset('wmt14','de-en')
nlp.load_dataset('wmt15','de-en')
nlp.load_dataset('wmt17','de-en')
nlp.load_dataset('wmt19','de-en')
```
The code runs but the download speed is **extremely slow**, the same behaviour is not observed on `wmt16` and `wmt18`
2. When trying to download `wmt17 zh-en`, I got the following error:
> ConnectionError: Couldn't reach https://storage.googleapis.com/tfdataset-data/downloadataset/uncorpus/UNv1.0.en-zh.tar.gz
Yeah, the download speed is sadly always extremely slow :-/.
I will try to check out the `wmt17 zh-en` bug :-) | [
-0.3693390488624573,
-0.2487267702817917,
0.02165650948882103,
0.3820064663887024,
0.14801913499832153,
0.031584545969963074,
0.020614854991436005,
0.10976944863796234,
0.15086506307125092,
-0.022493451833724976,
-0.11922986060380936,
0.08131162077188492,
0.2570132911205292,
0.022129179909825325,
-0.05040562152862549,
-0.14980725944042206,
-0.06361869722604752,
-0.012731917202472687,
-0.3244120180606842,
-0.09937684237957001,
-0.35386523604393005,
0.20095738768577576,
-0.20646674931049347,
0.09059391170740128,
0.27523165941238403,
0.08329979330301285,
-0.13136065006256104,
-0.1531076729297638,
-0.29542285203933716,
-0.2548479437828064,
0.3610233664512634,
0.3276956379413605,
-0.05598543956875801,
0.28097736835479736,
-0.00011312153219478205,
-0.05602044612169266,
0.296732097864151,
-0.0383983738720417,
-0.2685249149799347,
-0.2018253356218338,
-0.5110462307929993,
-0.3942413628101349,
-0.0794065073132515,
0.08543557673692703,
-0.018409889191389084,
-0.29667699337005615,
0.24969378113746643,
-0.043967925012111664,
0.06491999328136444,
0.2494044303894043,
0.16832835972309113,
0.28793105483055115,
-0.06867513060569763,
-0.1455192118883133,
0.24070119857788086,
-0.20332367718219757,
-0.31074586510658264,
0.03997855633497238,
0.0785970687866211,
-0.17960497736930847,
0.15572133660316467,
0.058483511209487915,
0.0875244066119194,
0.33625972270965576,
0.17600834369659424,
0.09427385032176971,
0.05104656144976616,
-0.2017597109079361,
0.08279530704021454,
0.45040133595466614,
0.7103347778320312,
0.08515097200870514,
-0.49574992060661316,
0.28191739320755005,
-0.09189485758543015,
-0.2350524216890335,
0.3443359136581421,
0.31357601284980774,
-0.21587204933166504,
-0.07347150146961212,
-0.46691736578941345,
0.25728070735931396,
-0.13833275437355042,
0.489260733127594,
-0.09576234221458435,
0.7104787826538086,
0.13324186205863953,
0.1434033364057541,
0.31298238039016724,
-0.1106799840927124,
-0.08162114024162292,
-0.2723141014575958,
0.00018849223852157593,
0.033490974456071854,
-0.4814956784248352,
-0.03222963958978653,
-0.06586844474077225,
0.0954648032784462,
0.07542939484119415,
0.10160940885543823,
0.2850108742713928,
0.2121487259864807,
0.021025583148002625,
-0.05172594636678696,
0.20974965393543243,
-0.02190418913960457,
-0.2130880355834961,
-0.1640498787164688,
0.4323975443840027,
0.2450239658355713,
0.15230388939380646,
0.16774427890777588,
0.14670854806900024,
-0.04880053550004959,
-0.22991639375686646,
0.024273036047816277,
-0.050510771572589874,
0.0019592605531215668,
-0.40011078119277954,
-0.1665736883878708,
-0.1238350123167038,
-0.24533972144126892,
-0.16454097628593445,
0.3225749135017395,
-0.28404104709625244,
0.16989445686340332,
-0.12120512127876282,
0.1779884397983551,
-0.08428522944450378,
-0.24176664650440216,
-0.16136693954467773,
-0.15749958157539368,
-0.2656625509262085,
0.048712193965911865,
0.5434922575950623,
0.2756902277469635,
0.13496845960617065,
-0.02769451215863228,
-0.4596247673034668,
0.1299183964729309,
0.1053120493888855,
-0.1755293309688568,
-0.1506623923778534,
0.3081342875957489,
0.04140319302678108,
0.4511938989162445,
-0.11814786493778229,
0.21418999135494232,
-0.21801427006721497,
-0.014789208769798279,
-0.19125312566757202,
0.06831665337085724,
0.18333855271339417,
0.1696571707725525,
-0.1521887332201004,
-0.1954449713230133,
-0.1842021346092224,
0.07427263259887695,
-0.2544247806072235,
0.06591957807540894,
-0.2866131365299225,
-0.10902823507785797,
-0.3650814890861511,
-0.1189391165971756,
0.18130038678646088,
0.37887948751449585,
-0.31317436695098877,
-0.04576456546783447,
-0.30167055130004883,
-0.10566411912441254,
0.3926258981227875,
0.4808875024318695,
-0.0214607622474432,
-0.06908205896615982,
-0.26117703318595886,
-0.11332952976226807,
0.47933974862098694,
-0.05693938210606575,
-0.5938493609428406,
0.42854249477386475,
-0.17276892066001892,
0.0856163278222084,
0.1779768466949463,
0.17727144062519073,
-0.0855824425816536,
-0.08258207142353058,
0.12703421711921692,
0.7016557455062866,
0.005916781723499298,
0.06210668385028839,
-0.08234982192516327,
-0.3496221899986267,
0.4960261583328247,
0.0793752521276474,
-0.13106587529182434,
0.06298656016588211,
0.07747019827365875,
0.23088176548480988,
0.42806291580200195,
-0.04929540678858757,
0.12070724368095398,
0.2119649201631546,
0.006104540079832077,
-0.23262657225131989,
0.1675238460302353,
0.26138797402381897,
-0.8036826848983765,
0.3271985352039337,
-0.1731809377670288,
0.04207608848810196,
0.053372759371995926,
0.09867411851882935,
-0.09309911727905273,
-0.23251178860664368,
-0.11485753953456879,
0.11961932480335236,
0.0992339700460434,
0.4008772671222687,
-0.08089445531368256,
0.0385473407804966,
0.24408726394176483,
0.16372650861740112,
0.18601453304290771,
0.07212428748607635,
0.03751790151000023,
0.08900497108697891,
-0.1497061550617218,
0.1078929528594017,
0.41900843381881714,
-0.2034529745578766,
0.09057003259658813,
-0.22554469108581543,
-0.10613343864679337,
0.030130835250020027,
-0.11876425892114639,
0.3457850217819214,
0.034266434609889984,
0.012958317995071411,
0.18464411795139313,
-0.3644968569278717,
0.0430600680410862,
0.5446990728378296,
0.1592683047056198,
-0.2901194989681244,
-0.2831049859523773,
0.16040146350860596,
0.22948625683784485,
0.2556656002998352,
0.263852059841156,
-0.028795063495635986,
0.39430931210517883,
-0.027175836265087128,
0.06972356885671616,
-0.07047192752361298,
0.31184136867523193,
0.104193314909935,
-0.1764555424451828,
-0.10470554232597351,
-0.17862817645072937,
0.38371509313583374,
0.7334485054016113,
-0.02737387828528881,
0.044523149728775024,
0.21515777707099915,
-0.009700804948806763,
-0.27938517928123474,
-0.10212532430887222,
0.2419554442167282,
0.5307390689849854,
-0.01845678687095642,
0.3182319402694702,
-0.007591115310788155,
0.05282165855169296,
-0.46573710441589355,
0.2658326327800751,
0.03235071897506714,
-0.2632794678211212,
0.2083519995212555,
0.14618311822414398,
-0.11726220697164536,
-0.2702297568321228,
-0.03917759656906128,
0.3722790479660034,
0.3183620572090149,
-0.11375410109758377,
0.021598974242806435,
-0.5688729286193848,
-0.43375617265701294,
-0.041703976690769196,
-0.09722831845283508,
-0.23284068703651428,
-0.437325656414032,
-0.010616045445203781,
0.3592895567417145,
-0.11753109097480774,
0.08346613496541977,
0.011237289756536484,
0.051817819476127625,
0.03219383955001831,
0.11225172132253647,
-0.22323092818260193,
-0.050884172320365906,
-0.29367414116859436,
0.05064189061522484,
0.25019577145576477,
-0.004825551062822342,
0.34651559591293335,
-0.2549162805080414,
0.004322635009884834,
-0.24847668409347534,
-0.1828160583972931,
-0.07342241704463959,
-0.13284233212471008,
-0.009791804477572441,
0.021005943417549133,
0.37568312883377075,
-0.048472218215465546,
0.019790492951869965,
0.2677241265773773,
-0.13066905736923218,
-0.0933634415268898,
0.15001599490642548,
-0.14751653373241425,
-0.11639814078807831,
-0.14553199708461761,
-0.46186813712120056,
-0.4196476638317108,
-0.39093783497810364,
0.22834110260009766,
0.017712224274873734,
0.26472195982933044,
0.26651114225387573,
-0.24339555203914642,
-0.00908895768225193,
0.1340952217578888,
0.13581916689872742,
-0.21165190637111664,
0.10967883467674255,
0.5519052743911743,
-0.012211563065648079,
-0.4962177574634552,
0.28899386525154114,
0.308399498462677,
0.12821656465530396,
0.4666350483894348,
-0.5050541162490845,
0.08147915452718735,
-0.22450309991836548,
-0.08681879937648773,
0.21056540310382843,
-0.0806288793683052,
0.18034401535987854,
-0.20143339037895203,
-0.13207226991653442,
-0.06354667246341705,
-0.22663557529449463,
0.00034277886152267456,
0.33549681305885315,
0.29458725452423096,
0.05751631036400795,
0.07515455782413483,
0.11302356421947479,
0.25512462854385376,
0.32278120517730713,
0.035576485097408295,
0.4502710998058319,
0.05707833915948868,
-0.039556968957185745,
0.05555730685591698,
-0.1616862565279007,
0.0864987000823021,
-0.15083619952201843,
0.4195178151130676,
0.33063656091690063,
-0.17766109108924866,
-0.2543925642967224,
-0.22119684517383575,
0.20765115320682526,
0.15602898597717285,
-0.30326375365257263,
-0.03628382086753845,
0.09262867271900177,
-0.024728193879127502,
0.25823426246643066,
0.05453161150217056,
0.028099864721298218,
-0.4963300824165344,
0.15356333553791046,
0.28111743927001953,
-0.11596550792455673,
0.1709713488817215,
-0.05429145693778992,
-0.025125395506620407,
-0.5100094079971313,
0.26229435205459595,
-0.08693758398294449,
0.6925250291824341,
-0.24529549479484558,
0.1321936845779419,
0.15417996048927307,
-0.13343459367752075,
0.37956327199935913,
-0.3355478346347809,
0.4085904359817505,
0.24411320686340332,
-0.09982527792453766,
-0.31038931012153625,
-0.2699891924858093,
-0.30740877985954285,
-0.29783982038497925,
0.20704491436481476,
0.46715015172958374,
-0.40368613600730896,
-0.25953108072280884,
-0.0028817784041166306,
0.25275591015815735,
-0.08343325555324554,
0.032996322959661484,
-0.16558808088302612,
-0.42589154839515686,
-0.07593044638633728,
-0.1960383653640747,
-0.292361319065094,
0.0790405347943306,
-0.20441073179244995,
-0.07171621918678284,
0.1685200333595276,
0.004643939435482025,
-0.03877423703670502,
0.019535694271326065,
0.029073666781187057,
0.2013513743877411,
0.3527790307998657,
0.0411565788090229,
0.20881183445453644,
-0.004183007404208183,
0.488117516040802,
0.18260802328586578,
-0.01917906105518341,
0.20272555947303772,
-0.1937301605939865,
-0.1419256329536438,
0.4482380449771881,
0.06169756501913071,
0.11611247807741165,
-0.0197453536093235,
0.19268172979354858,
-0.12041439861059189,
-0.0646362155675888,
0.4672898054122925,
-0.31626027822494507,
-0.2791849970817566,
-0.22826191782951355,
0.2917950451374054,
0.09229856729507446,
-0.0632304698228836,
0.34061047434806824,
-0.07523030042648315,
-0.1006244644522667,
0.05426117777824402,
-0.07270584255456924,
0.8992089033126831,
-0.07506681978702545,
0.16761179268360138,
0.028445210307836533,
-0.012026295065879822,
0.3487119972705841,
-0.07879878580570221,
0.25816798210144043,
-0.17695966362953186,
-0.22498054802417755,
-0.003369562327861786,
0.03111463412642479,
0.027460332959890366,
0.21012581884860992,
-0.4092715084552765,
0.5043520927429199,
0.20173589885234833,
0.25965163111686707,
0.21108503639698029,
0.09160427749156952,
-0.0027353931218385696,
-0.08225436508655548,
-0.06914258003234863,
0.13383738696575165,
-0.12575849890708923,
0.5930081605911255,
-0.011536701582372189,
-0.3399752974510193,
-0.06330446898937225,
-0.05042492598295212,
-0.33756589889526367,
0.22890061140060425,
-0.22116315364837646,
0.10648779571056366,
-0.27809029817581177,
-0.028923507779836655,
0.1129971593618393,
-0.10822008550167084,
0.11689861118793488,
0.14735105633735657,
-0.43524065613746643,
0.10449805855751038,
-0.568690836429596,
0.12266737222671509,
0.04550614953041077,
-0.0656871572136879,
-0.07661736011505127,
-0.263223797082901,
-0.1547880321741104,
-0.19981741905212402,
-0.04941009357571602,
-0.07310248911380768,
-0.046988941729068756,
-0.11418591439723969,
-0.2927277684211731,
0.23077815771102905,
-0.03375031054019928,
-0.12792837619781494,
-0.25464847683906555,
-0.09520333260297775,
0.12392137944698334,
-0.027990810573101044,
0.0628989115357399,
0.403195321559906,
0.10705434530973434,
-0.26569899916648865,
-0.1343066543340683,
0.6130908727645874,
-0.15190953016281128,
0.15012042224407196,
0.3498304784297943,
0.1883086860179901,
-0.20841264724731445,
-0.3143332600593567,
-0.37197962403297424,
-0.08975259214639664,
-0.4002480208873749,
-0.06923060864210129,
-0.14408481121063232,
0.10016986727714539,
0.11705545336008072,
0.47557368874549866,
-0.0490255206823349,
0.05586657673120499,
0.05622628703713417,
-0.5779902338981628,
-0.07620994746685028,
-0.0173780620098114,
-0.0752178430557251,
0.060390882194042206,
-0.3815559148788452,
-0.06139726564288139,
0.3596579134464264,
0.0912114605307579,
-0.29727739095687866,
0.08413951098918915,
-0.28314268589019775,
-0.020584292709827423,
0.29910892248153687,
-0.19705802202224731,
0.13984932005405426,
0.12177664041519165,
0.03174524009227753,
-0.11539895832538605,
-0.5138583779335022,
-0.13495616614818573,
-0.012688569724559784,
0.19682620465755463,
0.2312018871307373,
-0.3998676538467407,
0.10133805125951767,
-0.26931536197662354,
-0.13870015740394592,
-0.02990845963358879,
0.0238056443631649,
-0.06971628963947296,
-0.11349917948246002,
0.015544542111456394,
0.015986528247594833,
0.1784762293100357,
-0.05226811766624451,
0.17897140979766846,
0.08107101917266846,
0.3983920216560364,
-0.03229657933115959,
0.21668510138988495,
0.14202292263507843,
-0.13067349791526794,
-0.4640178084373474,
-0.1250663697719574,
0.004228249192237854,
0.16688576340675354,
0.45574596524238586,
-0.1503380686044693,
0.11459670960903168,
-0.19031710922718048,
0.28947070240974426,
0.5473506450653076,
-0.019706588238477707,
-0.16597259044647217,
0.08184149861335754,
0.14173980057239532,
-0.2528594136238098,
-0.32409870624542236,
0.2707700729370117,
0.2660081088542938,
-0.0896599218249321,
-0.11656378954648972,
0.2668006718158722,
-0.22756700217723846,
0.004926852881908417,
-0.11710799485445023,
0.5208176374435425,
-0.16627290844917297,
-0.07325424253940582,
0.32509854435920715,
0.09123030304908752,
0.19147111475467682,
-0.04571977257728577,
-0.05150249972939491,
0.013542480766773224,
0.1461062729358673,
-0.10718979686498642,
0.19411909580230713,
0.13372337818145752,
0.18803291022777557,
-0.006420217454433441,
-0.4491778016090393,
-0.13419833779335022,
0.4470544159412384,
-0.10824184119701385,
0.0837215855717659,
0.277393639087677,
0.046839650720357895,
-0.18602034449577332,
-0.23363490402698517,
-0.5212217569351196,
0.24924109876155853,
0.1441929042339325,
-0.21762096881866455,
-0.15785805881023407,
-0.04063988849520683,
-0.38392096757888794,
0.30181407928466797,
-0.2011139690876007,
-0.10448412597179413,
0.33244138956069946,
0.1468764692544937,
0.05920115485787392,
-0.4044612646102905,
-0.2451428472995758,
-0.10186054557561874,
-0.011712320148944855,
-0.272013783454895,
0.13106216490268707,
0.04349697008728981,
-0.10835471749305725,
0.05095702409744263,
0.11661724746227264,
0.1323673129081726,
0.24665093421936035,
0.044190142303705215,
0.15147623419761658,
-0.055038999766111374,
-0.07698335498571396,
-0.12671205401420593,
0.5055842399597168,
0.3176567554473877,
-0.31328994035720825,
0.3788611590862274,
0.010559329763054848,
-0.12533214688301086,
0.161406472325325,
0.04764704033732414,
-0.11730238795280457,
-0.027812030166387558,
0.40965327620506287,
-0.1731017678976059,
0.007070429623126984,
-0.08085295557975769,
-0.029183439910411835,
-0.2272975742816925,
-0.048976048827171326,
0.22350871562957764,
-0.031447455286979675,
0.3116574287414551,
-0.1972493678331375,
0.06267590075731277,
-0.1403963267803192,
0.9632142782211304,
0.17470529675483704,
0.008198007941246033,
-0.18437117338180542,
-0.23486405611038208,
-0.6164389848709106,
0.10305570065975189,
-0.25227317214012146,
0.19881977140903473,
0.061646267771720886,
0.2748517096042633,
-0.03091023862361908,
0.21288108825683594,
0.17940913140773773,
0.49605628848075867,
-0.0012605106458067894,
0.3387591242790222,
-0.3486463725566864,
-0.15764488279819489,
0.0671234279870987,
0.23137861490249634,
-0.3162715435028076,
-0.5026994347572327,
0.5336249470710754,
-0.45304471254348755,
0.029982581734657288,
-0.18135367333889008,
-0.04188334569334984,
0.14481382071971893,
0.35954758524894714,
0.3521798849105835,
0.14094482362270355,
0.5347113013267517,
0.10010448843240738,
-0.23660679161548615,
-0.4052691161632538,
-0.06488293409347534,
0.08727701008319855,
-0.006619937717914581,
0.06285282224416733,
0.0696178749203682,
0.1808973103761673,
0.42582863569259644,
-0.33662107586860657,
0.24177655577659607,
-0.34102725982666016,
0.30199941992759705,
0.1489570438861847,
0.2037632316350937,
-0.15931649506092072,
0.08259020745754242,
0.1561182141304016,
-0.09601332992315292,
-0.04753682017326355,
-0.28082966804504395,
-0.466897189617157,
-0.27085891366004944,
0.38421791791915894,
-0.13621771335601807,
-0.23591239750385284,
-0.31623148918151855,
0.2579323947429657,
-0.10170697420835495,
0.20794332027435303,
-0.04330647736787796,
0.2353956401348114,
0.1794021874666214,
-0.1781788468360901,
-0.29377326369285583,
0.29732629656791687,
-0.009580830112099648,
-0.1704113930463791,
0.042689498513936996,
0.10260127484798431,
0.14127561450004578,
-0.4580462574958801,
-0.1470394730567932,
-0.039496857672929764
] |
https://github.com/huggingface/datasets/issues/387 | Conversion through to_pandas output numpy arrays for lists instead of python objects | To convert from arrow type we have three options: to_numpy, to_pandas and to_pydict/to_pylist.
- to_numpy and to_pandas return numpy arrays instead of lists but are very fast.
- to_pydict/to_pylist can be 100x slower and become the bottleneck for reading data, but at least they return lists.
Maybe we can have to_pydict/to_pylist as the default and use to_numpy or to_pandas when the format (set by `set_format`) is 'numpy' or 'pandas' | In a related question, the conversion through to_pandas output numpy arrays for the lists instead of python objects.
Here is an example:
```python
>>> dataset._data.slice(key, 1).to_pandas().to_dict("list")
{'sentence1': ['Amrozi accused his brother , whom he called " the witness " , of deliberately distorting his evidence .'], 'sentence2': ['Referring to him as only " the witness " , Amrozi accused his brother of deliberately distorting his evidence .'], 'label': [1], 'idx': [0], 'input_ids': [array([ 101, 7277, 2180, 5303, 4806, 1117, 1711, 117, 2292,
1119, 1270, 107, 1103, 7737, 107, 117, 1104, 9938,
4267, 12223, 21811, 1117, 2554, 119, 102])], 'token_type_ids': [array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0])], 'attention_mask': [array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1])]}
>>> type(dataset._data.slice(key, 1).to_pandas().to_dict("list")['input_ids'][0])
<class 'numpy.ndarray'>
>>> dataset._data.slice(key, 1).to_pydict()
{'sentence1': ['Amrozi accused his brother , whom he called " the witness " , of deliberately distorting his evidence .'], 'sentence2': ['Referring to him as only " the witness " , Amrozi accused his brother of deliberately distorting his evidence .'], 'label': [1], 'idx': [0], 'input_ids': [[101, 7277, 2180, 5303, 4806, 1117, 1711, 117, 2292, 1119, 1270, 107, 1103, 7737, 107, 117, 1104, 9938, 4267, 12223, 21811, 1117, 2554, 119, 102]], 'token_type_ids': [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], 'attention_mask': [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]}
``` | 69 | Conversion through to_pandas output numpy arrays for lists instead of python objects
In a related question, the conversion through to_pandas output numpy arrays for the lists instead of python objects.
Here is an example:
```python
>>> dataset._data.slice(key, 1).to_pandas().to_dict("list")
{'sentence1': ['Amrozi accused his brother , whom he called " the witness " , of deliberately distorting his evidence .'], 'sentence2': ['Referring to him as only " the witness " , Amrozi accused his brother of deliberately distorting his evidence .'], 'label': [1], 'idx': [0], 'input_ids': [array([ 101, 7277, 2180, 5303, 4806, 1117, 1711, 117, 2292,
1119, 1270, 107, 1103, 7737, 107, 117, 1104, 9938,
4267, 12223, 21811, 1117, 2554, 119, 102])], 'token_type_ids': [array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0])], 'attention_mask': [array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1])]}
>>> type(dataset._data.slice(key, 1).to_pandas().to_dict("list")['input_ids'][0])
<class 'numpy.ndarray'>
>>> dataset._data.slice(key, 1).to_pydict()
{'sentence1': ['Amrozi accused his brother , whom he called " the witness " , of deliberately distorting his evidence .'], 'sentence2': ['Referring to him as only " the witness " , Amrozi accused his brother of deliberately distorting his evidence .'], 'label': [1], 'idx': [0], 'input_ids': [[101, 7277, 2180, 5303, 4806, 1117, 1711, 117, 2292, 1119, 1270, 107, 1103, 7737, 107, 117, 1104, 9938, 4267, 12223, 21811, 1117, 2554, 119, 102]], 'token_type_ids': [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], 'attention_mask': [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]}
```
To convert from arrow type we have three options: to_numpy, to_pandas and to_pydict/to_pylist.
- to_numpy and to_pandas return numpy arrays instead of lists but are very fast.
- to_pydict/to_pylist can be 100x slower and become the bottleneck for reading data, but at least they return lists.
Maybe we can have to_pydict/to_pylist as the default and use to_numpy or to_pandas when the format (set by `set_format`) is 'numpy' or 'pandas' | [
0.2560272812843323,
-0.07245711237192154,
-0.23676353693008423,
-0.0092359259724617,
0.2625890374183655,
0.08429204672574997,
0.6678318977355957,
0.3210133910179138,
0.08501581847667694,
0.10968825966119766,
-0.22308436036109924,
0.6318758130073547,
0.046178966760635376,
-0.017982739955186844,
0.011641898192465305,
-0.17475038766860962,
0.09567449241876602,
0.25473999977111816,
-0.2903573215007782,
-0.068930983543396,
-0.2830672860145569,
0.015639852732419968,
-0.014375321567058563,
0.04701658710837364,
-0.031680721789598465,
-0.12294358760118484,
-0.2430112659931183,
-0.06696560233831406,
-0.00996357947587967,
-0.2817719578742981,
-0.11027339845895767,
-0.05220862105488777,
-0.15654750168323517,
0.10774767398834229,
-0.00009658549970481545,
0.011758856475353241,
0.10074643045663834,
0.1284487545490265,
-0.27789807319641113,
0.09881234914064407,
0.22089892625808716,
-0.4964870512485504,
0.12832102179527283,
-0.38988643884658813,
0.01942449063062668,
-0.37095120549201965,
-0.001158514991402626,
-0.23527254164218903,
0.2233625203371048,
0.23780439794063568,
0.32483723759651184,
0.08249989151954651,
0.0406746007502079,
-0.009181280620396137,
-0.15301114320755005,
-0.05365125834941864,
-0.11167363822460175,
-0.09680567681789398,
0.07402365654706955,
-0.00034532323479652405,
0.022482916712760925,
0.19682887196540833,
-0.2312166541814804,
-0.05409255251288414,
-0.1202840730547905,
0.07834314554929733,
0.17508742213249207,
-0.20166242122650146,
-0.05910957604646683,
0.13222625851631165,
0.07103358954191208,
-0.21810898184776306,
-0.27256566286087036,
-0.3579936623573303,
0.011065549217164516,
-0.10444122552871704,
-0.2819868326187134,
0.14973682165145874,
-0.041938502341508865,
0.3047567307949066,
-0.05672697722911835,
0.14159183204174042,
-0.19755704700946808,
0.13296782970428467,
-0.22346340119838715,
0.1334751397371292,
-0.0038776034489274025,
-0.026997573673725128,
0.11812582612037659,
-0.23266379535198212,
0.2993662655353546,
-0.15403082966804504,
0.2643846273422241,
0.008697601035237312,
-0.07155697047710419,
-0.13384154438972473,
0.19592919945716858,
-0.38730576634407043,
-0.03227260336279869,
-0.3329618573188782,
0.1830255687236786,
-0.05389515310525894,
-0.02353399619460106,
0.131984680891037,
0.12480317056179047,
0.23152723908424377,
-0.01031368225812912,
0.10864561051130295,
-0.03319137543439865,
-0.022217262536287308,
0.14282096922397614,
0.10673575103282928,
0.02081473171710968,
0.04767642915248871,
0.10392889380455017,
0.05435318499803543,
0.20670917630195618,
0.0948466807603836,
-0.39955252408981323,
0.021492067724466324,
-0.4321011006832123,
0.3727928400039673,
-0.1416669487953186,
0.08713320642709732,
-0.005686112679541111,
0.5033516883850098,
0.05709496885538101,
0.07840965688228607,
0.012077320367097855,
0.31285178661346436,
-0.2222590446472168,
0.26594293117523193,
0.008957449346780777,
-0.2215346246957779,
-0.02102704532444477,
0.3906451463699341,
0.004608276300132275,
0.005606166087090969,
0.27245113253593445,
0.05295184254646301,
0.009036835283041,
-0.057025276124477386,
0.3984915316104889,
0.15818631649017334,
-0.01832183077931404,
0.10295673459768295,
0.330505907535553,
-0.2735713720321655,
-0.07340873032808304,
0.3235860764980316,
0.08975523710250854,
0.09800322353839874,
-0.07304894179105759,
0.3501078188419342,
0.026744667440652847,
-0.1353609710931778,
0.12049306929111481,
0.19605626165866852,
0.09799177944660187,
0.039196815341711044,
-0.06270132213830948,
-0.39276832342147827,
0.12852880358695984,
-0.2342425286769867,
-0.025801248848438263,
0.0015652179718017578,
-0.42756181955337524,
0.10420951247215271,
0.04026888683438301,
-0.032683953642845154,
0.21900326013565063,
0.38475921750068665,
-0.015380042605102062,
-0.03114168345928192,
-0.10359635949134827,
0.19598855078220367,
-0.0700908824801445,
-0.21177656948566437,
-0.14313901960849762,
0.02596472017467022,
0.13563932478427887,
0.3213234543800354,
0.23091647028923035,
0.16768541932106018,
0.18781813979148865,
0.03334848955273628,
0.1708780825138092,
0.08543315529823303,
0.025394368916749954,
0.16540400683879852,
-0.21664297580718994,
-0.20080694556236267,
0.21756848692893982,
-0.050166867673397064,
-0.027714330703020096,
0.30131426453590393,
-0.14789193868637085,
-0.07523815333843231,
0.2646341323852539,
-0.35225871205329895,
-0.08639638125896454,
-0.1085292249917984,
0.12631484866142273,
-0.18569837510585785,
-0.07065830379724503,
-0.0009578242897987366,
0.09292230010032654,
0.009178075939416885,
-0.13110315799713135,
0.32574787735939026,
-0.22178135812282562,
-0.4243866205215454,
-0.34950804710388184,
0.0457589328289032,
-0.013223458081483841,
0.027682460844516754,
0.4024394154548645,
0.05684169381856918,
0.09816290438175201,
-0.08291482925415039,
0.17112551629543304,
0.04854201525449753,
-0.1781456023454666,
-0.036534447222948074,
-0.2771192193031311,
0.05102115869522095,
-0.16102302074432373,
-0.06166170537471771,
-0.01023731380701065,
0.26584720611572266,
0.041077498346567154,
0.1367577463388443,
0.25367069244384766,
0.15686221420764923,
0.22534801065921783,
-0.1363910436630249,
0.07895074784755707,
0.173140749335289,
0.14213521778583527,
-0.010740313678979874,
0.3149239420890808,
0.5039958357810974,
0.13780774176120758,
0.05067473649978638,
-0.03941328823566437,
0.5265210270881653,
0.10047468543052673,
0.06737660616636276,
0.14981846511363983,
0.24384212493896484,
0.2283337414264679,
0.22678959369659424,
-0.0221838541328907,
-0.16476741433143616,
-0.20458246767520905,
0.0883951187133789,
-0.03721038997173309,
0.07834514230489731,
-0.5608400106430054,
0.32966041564941406,
0.3871721923351288,
-0.12543611228466034,
0.2982022166252136,
-0.04294797033071518,
-0.11709209531545639,
-0.1296837329864502,
0.00928262434899807,
-0.08549775928258896,
0.06470577418804169,
0.3047468066215515,
0.13462305068969727,
-0.101119764149189,
-0.24635234475135803,
-0.15735659003257751,
0.17160341143608093,
0.14038869738578796,
0.14972522854804993,
-0.05192839354276657,
0.22851260006427765,
-0.21219845116138458,
-0.21408411860466003,
0.05723949894309044,
-0.2752459645271301,
0.10161970555782318,
-0.22886963188648224,
0.238946333527565,
-0.34866562485694885,
-0.21876689791679382,
-0.004796183668076992,
-0.16468657553195953,
0.2367774099111557,
-0.438748300075531,
0.11862530559301376,
0.08315347135066986,
-0.09628467261791229,
0.027575550600886345,
0.38944828510284424,
-0.010232731699943542,
0.30712491273880005,
0.11240257322788239,
-0.13750886917114258,
-0.21126556396484375,
0.017634615302085876,
0.3510562479496002,
-0.032505616545677185,
0.11014274507761002,
0.10012590885162354,
-0.06349489837884903,
-0.05700351670384407,
-0.13352544605731964,
-0.27513769268989563,
0.003109011799097061,
-0.2275828868150711,
0.1885088086128235,
0.2113189995288849,
0.28268757462501526,
-0.24877837300300598,
-0.04935161769390106,
-0.07172286510467529,
-0.05359330773353577,
-0.08644085377454758,
0.10110659152269363,
0.029637165367603302,
-0.012777156196534634,
-0.13915623724460602,
-0.27380743622779846,
-0.37086841464042664,
-0.24616113305091858,
0.2457750141620636,
0.19725707173347473,
0.14487800002098083,
0.041926898062229156,
0.372046560049057,
0.3241763412952423,
0.23554985225200653,
0.21289964020252228,
-0.1252492070198059,
0.12985195219516754,
0.2862125635147095,
-0.17854264378547668,
-0.32477542757987976,
-0.3495491147041321,
-0.04033562168478966,
-0.0918327122926712,
-0.22656475007534027,
-0.04711082577705383,
-0.4609470069408417,
-0.13547322154045105,
-0.012589734047651291,
0.19353270530700684,
-0.03266437351703644,
0.1490454077720642,
0.26809030771255493,
-0.3067966103553772,
-0.050204116851091385,
0.09719671308994293,
-0.042838625609874725,
0.043267831206321716,
-0.08406911045312881,
-0.06308596581220627,
0.05010836943984032,
0.15260536968708038,
0.21947434544563293,
0.09775933623313904,
-0.19591647386550903,
-0.13121218979358673,
-0.015270700678229332,
0.32804572582244873,
-0.16063067317008972,
-0.1010645404458046,
-0.24103142321109772,
-0.16821658611297607,
-0.0981953889131546,
0.12483006715774536,
-0.14720460772514343,
-0.3451806604862213,
0.003721054643392563,
0.2376689612865448,
-0.3825837969779968,
-0.09685942530632019,
0.11318644881248474,
-0.2335437536239624,
-0.04786200076341629,
0.04162919893860817,
0.21795958280563354,
-0.21251244843006134,
0.012761402875185013,
-0.17659655213356018,
-0.03603954613208771,
0.25042930245399475,
-0.1270270198583603,
-0.3720667064189911,
-0.27427974343299866,
-0.35559749603271484,
0.3058631420135498,
0.2006751447916031,
0.1969306319952011,
0.12455236911773682,
-0.4118642807006836,
-0.06826050579547882,
0.01907440274953842,
0.4703342318534851,
0.08217564225196838,
-0.3371402621269226,
0.36463114619255066,
0.020565427839756012,
-0.09616328030824661,
0.10426734387874603,
-0.5635346174240112,
0.009335070848464966,
0.16411083936691284,
0.10901224613189697,
-0.24528372287750244,
-0.059585027396678925,
0.0811375081539154,
0.21199683845043182,
0.011874821037054062,
0.17696161568164825,
-0.1113036721944809,
-0.30245959758758545,
-0.26145708560943604,
0.019808366894721985,
0.19834645092487335,
0.12581245601177216,
-0.4265234172344208,
-0.27482032775878906,
-0.16187311708927155,
-0.2216854989528656,
0.37594670057296753,
0.17749299108982086,
0.03466372936964035,
-0.040534261614084244,
-0.19333802163600922,
-0.20157262682914734,
0.23106320202350616,
0.15659499168395996,
-0.0567222535610199,
-0.22540274262428284,
-0.12002071738243103,
-0.09815976768732071,
-0.05513696372509003,
0.19930428266525269,
0.24184776842594147,
-0.0896877646446228,
-0.05645846575498581,
-0.24138256907463074,
-0.06638097763061523,
0.15018141269683838,
-0.14604660868644714,
0.22116878628730774,
0.07006140053272247,
-0.027651486918330193,
-0.32919639348983765,
0.12097735702991486,
0.04637591168284416,
-0.10512499511241913,
-0.022285379469394684,
-0.11526729166507721,
-0.2081453800201416,
0.26381856203079224,
0.03251170739531517,
0.8158712387084961,
-0.10561804473400116,
0.30055248737335205,
0.45929014682769775,
-0.19771648943424225,
0.4725377857685089,
0.22859545052051544,
0.1159963458776474,
-0.25189509987831116,
-0.057671211659908295,
-0.05947970226407051,
-0.010046493262052536,
0.20437121391296387,
0.25324201583862305,
-0.256130576133728,
0.1157732903957367,
-0.2948707044124603,
0.13164398074150085,
0.04822652041912079,
-0.0555582232773304,
0.038502149283885956,
-0.17735858261585236,
-0.5897297859191895,
0.3352951109409332,
0.05478013679385185,
-0.41746994853019714,
-0.030041005462408066,
-0.1306804120540619,
-0.3652651309967041,
0.16645802557468414,
0.17220403254032135,
0.01497582346200943,
0.23710167407989502,
0.2857072949409485,
0.11305250227451324,
-0.3973703980445862,
-0.3194501996040344,
0.2990199327468872,
0.07823628187179565,
0.14305590093135834,
0.0597054585814476,
-0.15943899750709534,
0.12496219575405121,
0.1096462830901146,
0.22937726974487305,
-0.05771959573030472,
0.49653854966163635,
0.10310743004083633,
-0.050057992339134216,
0.1760503202676773,
0.009271661750972271,
-0.21804344654083252,
-0.18851280212402344,
-0.027195975184440613,
0.007690247148275375,
-0.34653595089912415,
-0.1482534557580948,
-0.051614269614219666,
-0.41962119936943054,
-0.1843433976173401,
0.27708524465560913,
-0.03147522360086441,
-0.09959959238767624,
0.3277488648891449,
0.024616751819849014,
-0.07969038188457489,
-0.012031685560941696,
0.11325933039188385,
0.41377755999565125,
0.0345136895775795,
0.059179577976465225,
0.07014407217502594,
-0.3847643733024597,
-0.23871931433677673,
0.08254284411668777,
-0.15260931849479675,
0.07036017626523972,
0.42930376529693604,
-0.11218172311782837,
-0.1417977660894394,
-0.13935592770576477,
-0.10047511756420135,
-0.12531912326812744,
0.3728620409965515,
-0.4571978449821472,
-0.20463085174560547,
-0.2589765191078186,
0.18189853429794312,
0.09116601943969727,
0.3353270888328552,
0.23831695318222046,
0.13427677750587463,
-0.20935596525669098,
-0.2403196096420288,
-0.5028529763221741,
-0.17356379330158234,
-0.3184002935886383,
0.13169647753238678,
0.03487347811460495,
-0.2332938313484192,
-0.1063106507062912,
0.06224006041884422,
0.3776397705078125,
0.1625669002532959,
-0.007925361394882202,
-0.45199495553970337,
0.20446176826953888,
0.023530155420303345,
-0.010215792804956436,
-0.16325749456882477,
0.21163396537303925,
-0.020132457837462425,
-0.24783363938331604,
-0.24645757675170898,
0.012144282460212708,
0.03656315803527832,
-0.07958638668060303,
0.2235226184129715,
0.06538685411214828,
0.3287331759929657,
0.36746567487716675,
-0.12157319486141205,
-0.2407364845275879,
-0.06277790665626526,
-0.052008625119924545,
0.1585797369480133,
-0.0030759128276258707,
-0.05917023867368698,
0.04682442545890808,
0.2976480722427368,
-0.003187723457813263,
0.07744491100311279,
0.48091062903404236,
-0.04061882197856903,
-0.16912975907325745,
-0.04046744108200073,
0.3440825641155243,
0.08456055819988251,
-0.21108359098434448,
-0.09585695713758469,
0.00812324695289135,
0.40072327852249146,
-0.30732962489128113,
-0.10814807564020157,
0.1571555882692337,
-0.34838902950286865,
0.2309492528438568,
0.43120789527893066,
0.08350901305675507,
-0.011691831052303314,
0.10959676653146744,
-0.050153136253356934,
0.08158247172832489,
-0.26621007919311523,
-0.11645109951496124,
0.5820600986480713,
0.006645556539297104,
-0.10178858041763306,
0.07112176716327667,
-0.11626829206943512,
0.1665240079164505,
0.491871178150177,
0.02099216729402542,
0.4034591019153595,
0.1135590597987175,
0.025419730693101883,
0.25469741225242615,
0.3929942548274994,
0.07712773233652115,
0.07588772475719452,
-0.17330855131149292,
0.21354201436042786,
0.2939057946205139,
0.06929084658622742,
-0.20937232673168182,
0.1442486047744751,
-0.02910885214805603,
0.3133697211742401,
-0.2688261866569519,
-0.12920106947422028,
-0.10112771391868591,
-0.09361258149147034,
0.014550410211086273,
-0.3355529308319092,
-0.03518766537308693,
-0.22108663618564606,
0.20591378211975098,
-0.16742901504039764,
0.040228694677352905,
-0.06856124103069305,
0.2408030927181244,
-0.14090871810913086,
0.3462826907634735,
-0.05161996930837631,
-0.27998605370521545,
0.21196912229061127,
0.20597583055496216,
-0.06349258124828339,
0.24580547213554382,
0.44134703278541565,
0.02017907053232193,
-0.2248956710100174,
-0.003479147329926491,
-0.20184487104415894,
-0.4503284990787506,
-0.03091948665678501,
-0.02656244859099388,
0.09757836908102036,
0.14084209501743317,
0.18325720727443695,
0.3068816661834717,
-0.2546873986721039,
-0.030388329178094864,
0.15224595367908478,
-0.12552042305469513,
-0.035338036715984344,
0.3983752429485321,
-0.000699356198310852,
-0.41776788234710693,
-0.07955970615148544,
0.027520835399627686,
-0.46944549679756165,
-0.32354971766471863,
0.24520649015903473,
0.01984976977109909,
0.21740388870239258,
0.054799098521471024,
0.21190527081489563,
-0.02901328355073929,
0.2661045491695404,
-0.058565933257341385,
0.17666779458522797,
0.05873226746916771,
0.19917090237140656,
-0.16910311579704285,
0.1327243596315384,
0.23160497844219208,
-0.16869212687015533,
-0.14829491078853607,
0.06189322471618652,
0.1804654747247696,
0.2957524061203003,
-0.31978434324264526,
0.03633775934576988,
-0.0032567428424954414,
0.09500642865896225,
-0.1532212495803833,
0.05037052184343338,
-0.082219198346138,
-0.0826202854514122,
0.07403193414211273,
-0.16442790627479553,
0.07991465926170349,
-0.145308718085289,
0.3205460011959076,
-0.14640137553215027,
0.09492310881614685,
-0.09312416613101959,
0.4012177288532257,
-0.12921898066997528,
0.38588425517082214,
0.21962660551071167,
-0.18146151304244995,
-0.05601496994495392,
0.22214315831661224,
-0.0839761421084404,
-0.1339956670999527,
0.5022014379501343,
-0.06017749384045601,
0.07468748837709427,
-0.005045224912464619,
-0.12486764788627625,
0.24216096103191376,
0.23622103035449982,
0.2632470726966858,
-0.32272791862487793,
-0.2985232472419739,
0.2755729556083679,
-0.2742534875869751,
0.11196078360080719,
-0.11342647671699524,
0.22210079431533813,
0.17781317234039307,
0.05093255639076233,
-0.14030204713344574,
-0.4273497760295868,
0.1870020627975464,
-0.09685735404491425,
-0.4538883566856384,
-0.07896701991558075,
-0.06864351034164429,
-0.18964940309524536,
0.05281095951795578,
-0.3690462112426758,
-0.12069376558065414,
0.2917224168777466,
-0.23591753840446472,
-0.05865773186087608,
0.13374656438827515,
-0.03554470092058182,
0.1161903589963913,
-0.25655633211135864,
-0.13359643518924713,
0.059504419565200806,
0.05985867232084274,
-0.2248077094554901,
-0.3436230421066284
] |
https://github.com/huggingface/datasets/issues/378 | [dataset] Structure of MLQA seems unecessary nested | Same for the RACE dataset: https://github.com/huggingface/nlp/blob/master/datasets/race/race.py
Should we scan all the datasets to remove this pattern of un-necessary nesting? | The features of the MLQA dataset comprise several nested dictionaries with a single element inside (for `questions` and `ids`): https://github.com/huggingface/nlp/blob/master/datasets/mlqa/mlqa.py#L90-L97
Should we keep this @mariamabarham @patrickvonplaten? Was this added for compatibility with tfds?
```python
features=nlp.Features(
{
"context": nlp.Value("string"),
"questions": nlp.features.Sequence({"question": nlp.Value("string")}),
"answers": nlp.features.Sequence(
{"text": nlp.Value("string"), "answer_start": nlp.Value("int32"),}
),
"ids": nlp.features.Sequence({"idx": nlp.Value("string")})
``` | 19 | [dataset] Structure of MLQA seems unecessary nested
The features of the MLQA dataset comprise several nested dictionaries with a single element inside (for `questions` and `ids`): https://github.com/huggingface/nlp/blob/master/datasets/mlqa/mlqa.py#L90-L97
Should we keep this @mariamabarham @patrickvonplaten? Was this added for compatibility with tfds?
```python
features=nlp.Features(
{
"context": nlp.Value("string"),
"questions": nlp.features.Sequence({"question": nlp.Value("string")}),
"answers": nlp.features.Sequence(
{"text": nlp.Value("string"), "answer_start": nlp.Value("int32"),}
),
"ids": nlp.features.Sequence({"idx": nlp.Value("string")})
```
Same for the RACE dataset: https://github.com/huggingface/nlp/blob/master/datasets/race/race.py
Should we scan all the datasets to remove this pattern of un-necessary nesting? | [
-0.11614282429218292,
-0.05932142585515976,
-0.09396423399448395,
0.31995928287506104,
-0.049028098583221436,
0.24959614872932434,
0.08761235326528549,
0.24669888615608215,
-0.17529071867465973,
-0.14413698017597198,
0.013056217692792416,
0.1971587985754013,
0.05846535414457321,
0.6652589440345764,
-0.03760390356183052,
-0.06485693156719208,
0.2087632715702057,
-0.03774347901344299,
-0.05636182427406311,
0.12638156116008759,
-0.2246389389038086,
0.14463287591934204,
-0.220671609044075,
0.020903170108795166,
-0.09839227050542831,
-0.16495662927627563,
-0.3148607015609741,
0.10347799956798553,
0.052319251000881195,
-0.26340407133102417,
0.15100736916065216,
0.2403654307126999,
-0.11957477778196335,
-0.044326938688755035,
-0.00011096564412582666,
-0.07092082500457764,
0.14563727378845215,
-0.021637307479977608,
-0.05487759783864021,
0.04134844243526459,
0.03207933157682419,
-0.10994377732276917,
0.06950072944164276,
-0.2508449852466583,
-0.09897629171609879,
-0.2140035182237625,
0.07115787267684937,
-0.337264746427536,
0.2594274878501892,
-0.03828480467200279,
0.2054678350687027,
-0.04692225903272629,
-0.13063426315784454,
0.35191261768341064,
-0.1220625564455986,
0.10272862017154694,
0.017257289960980415,
-0.026211924850940704,
0.2594550848007202,
-0.12474784255027771,
-0.04309668391942978,
0.4153566062450409,
-0.11935846507549286,
-0.1493009328842163,
0.2905677556991577,
0.06845591962337494,
0.18489480018615723,
-0.5962700843811035,
-0.043292246758937836,
0.4557464122772217,
0.23678526282310486,
-0.2617448568344116,
-0.18492771685123444,
-0.4822607636451721,
-0.025991637259721756,
-0.22726751863956451,
0.16330301761627197,
0.16750824451446533,
0.0069012753665447235,
0.23476040363311768,
0.12636831402778625,
-0.14011704921722412,
0.043341368436813354,
0.03218947723507881,
-0.2222631871700287,
0.431247353553772,
0.11238953471183777,
0.055799148976802826,
-0.19167932868003845,
-0.19406241178512573,
0.3292730748653412,
-0.277632474899292,
-0.11524158716201782,
-0.06485065072774887,
-0.2658902406692505,
-0.26814472675323486,
0.1458916962146759,
0.05406718701124191,
0.09042780846357346,
-0.009161397814750671,
-0.10179883986711502,
-0.12732848525047302,
0.041513990610837936,
-0.11567861586809158,
0.44332221150398254,
0.03491216152906418,
0.04276435077190399,
-0.3553723692893982,
-0.018607325851917267,
-0.11106351763010025,
0.012849371880292892,
0.04410503804683685,
0.13790954649448395,
0.1818004846572876,
-0.550296425819397,
0.023032434284687042,
0.4006927013397217,
0.11820384860038757,
-0.35919249057769775,
-0.10370349138975143,
-0.6785640716552734,
-0.1690199077129364,
0.07193438708782196,
0.13725316524505615,
0.19108836352825165,
0.24389085173606873,
-0.07964599132537842,
0.09010650962591171,
-0.1095336303114891,
-0.14716896414756775,
-0.12802672386169434,
0.02619002014398575,
-0.0045824311673641205,
-0.1100141629576683,
-0.10384610295295715,
0.22535985708236694,
0.058313414454460144,
0.015287538059055805,
0.006283335387706757,
0.2510584592819214,
0.11594623327255249,
-0.16656585037708282,
0.20658710598945618,
0.22258029878139496,
-0.029714148491621017,
0.013378383591771126,
-0.015465468168258667,
-0.051296427845954895,
-0.2058115303516388,
0.20501387119293213,
-0.07762935012578964,
-0.21862614154815674,
0.01348833553493023,
0.20431512594223022,
-0.1696726381778717,
-0.1015765368938446,
0.1816950887441635,
0.756240725517273,
0.3734677731990814,
-0.09278027713298798,
0.09112631529569626,
0.009046753868460655,
-0.47483164072036743,
-0.2003762274980545,
-0.031352248042821884,
0.3942873477935791,
-0.3361499011516571,
0.0484471395611763,
-0.30532851815223694,
0.033399440348148346,
-0.012793727219104767,
0.3472161591053009,
-0.06655221432447433,
0.3393942415714264,
-0.20692972838878632,
0.28759264945983887,
-0.008972205221652985,
-0.37375399470329285,
-0.24232694506645203,
0.24170111119747162,
0.02020532637834549,
0.2550993859767914,
0.20074278116226196,
0.0926872193813324,
-0.13739848136901855,
-0.18378563225269318,
0.18897730112075806,
0.35552865266799927,
-0.1046038568019867,
-0.09232565015554428,
-0.0993933454155922,
-0.1669275313615799,
0.6348803043365479,
-0.03646361082792282,
-0.41407787799835205,
-0.23918381333351135,
-0.3432902991771698,
-0.05789359658956528,
0.3980112671852112,
-0.00948559120297432,
-0.19600190222263336,
-0.15095114707946777,
0.15138554573059082,
-0.14767520129680634,
-0.08296429365873337,
-0.15018704533576965,
-0.5748469233512878,
0.04417293518781662,
-0.2565101981163025,
0.11664579808712006,
-0.12939341366291046,
-0.413435697555542,
0.3103049099445343,
-0.018222849816083908,
-0.37763699889183044,
-0.14879363775253296,
0.22315853834152222,
-0.29802846908569336,
-0.11738909780979156,
0.05682593956589699,
-0.2501935064792633,
0.023359131067991257,
0.017860347405076027,
0.06141219288110733,
-0.33827266097068787,
0.2788204550743103,
-0.16053681075572968,
0.3084011673927307,
0.36501866579055786,
0.693207323551178,
-0.053536318242549896,
-0.1911393702030182,
0.20401448011398315,
0.11180701851844788,
-0.007511994335800409,
-0.1424809992313385,
0.04540880024433136,
0.27379652857780457,
0.3954080045223236,
-0.23208916187286377,
0.004434026777744293,
0.3511699438095093,
0.01592261716723442,
-0.2095693051815033,
-0.28489241003990173,
0.4127984642982483,
0.055721525102853775,
0.3499276638031006,
0.01852937787771225,
0.2035997360944748,
-0.01059926301240921,
-0.1132054477930069,
-0.07056791335344315,
-0.392746239900589,
0.10885287821292877,
0.10866424441337585,
0.03085692599415779,
0.42610791325569153,
-0.2589317560195923,
0.8457384705543518,
0.4656234681606293,
-0.05760359391570091,
0.03639274090528488,
0.005450353026390076,
0.13751104474067688,
-0.43879348039627075,
0.20270439982414246,
0.15133138000965118,
0.28264814615249634,
0.17429707944393158,
0.041709400713443756,
0.24607551097869873,
0.22677139937877655,
-0.22956576943397522,
0.398378849029541,
0.09900125116109848,
-0.06849473714828491,
0.12552505731582642,
0.3096332252025604,
0.1429218202829361,
-0.4244999885559082,
-0.2349424511194229,
-0.018527502194046974,
0.032828956842422485,
-0.20179951190948486,
0.2663801312446594,
-0.34013181924819946,
-0.8277875781059265,
0.09512631595134735,
-0.15956413745880127,
-0.3452220857143402,
-0.414337158203125,
0.10417716205120087,
-0.19091318547725677,
-0.14006569981575012,
0.2615067660808563,
0.3718318045139313,
0.3114878833293915,
0.05282406508922577,
0.15354564785957336,
-0.0749020129442215,
-0.09342052787542343,
-0.151210218667984,
0.14342913031578064,
0.196904256939888,
0.1803005337715149,
0.2717164158821106,
0.2582635283470154,
-0.010901683010160923,
-0.17250016331672668,
-0.6402468681335449,
0.20584715902805328,
-0.4038879871368408,
0.32667064666748047,
0.17482876777648926,
-0.020761944353580475,
-0.20761403441429138,
-0.260646790266037,
-0.03910503163933754,
0.6991739869117737,
-0.25779449939727783,
-0.0002876855432987213,
-0.031122159212827682,
-0.17653009295463562,
-0.15046033263206482,
-0.3982406556606293,
-0.4945940375328064,
-0.2323886901140213,
0.2652853727340698,
-0.20085608959197998,
0.45661383867263794,
0.20725731551647186,
-0.3831195533275604,
-0.24531961977481842,
0.028847254812717438,
-0.13441818952560425,
-0.19621022045612335,
0.13021816313266754,
0.13515686988830566,
-0.060355279594659805,
-0.16122934222221375,
-0.3660827577114105,
-0.29034847021102905,
0.30135291814804077,
-0.2624472379684448,
-0.43801844120025635,
-0.22538407146930695,
-0.11680817604064941,
0.15110991895198822,
0.22650480270385742,
-0.0880565494298935,
0.2082458734512329,
0.38004666566848755,
0.01481795497238636,
0.22962576150894165,
-0.062011122703552246,
0.10583090037107468,
0.14951714873313904,
0.3227382004261017,
0.01258617453277111,
0.4372131824493408,
0.10649235546588898,
0.2702872157096863,
0.6254133582115173,
0.1969486027956009,
0.07950673997402191,
0.12108707427978516,
0.2560328543186188,
-0.24260422587394714,
-0.2051142454147339,
0.4185653626918793,
0.14041434228420258,
-0.05884646251797676,
0.3224632143974304,
-0.150050550699234,
-0.07273295521736145,
0.12473267316818237,
0.1506257951259613,
0.19476410746574402,
-0.27973154187202454,
0.012281200848519802,
-0.5949560403823853,
0.2844962477684021,
0.021604277193546295,
-0.007740631699562073,
0.18752166628837585,
-0.2130334973335266,
-0.0691157802939415,
0.1293257176876068,
0.15605007112026215,
-0.001497020130045712,
-0.7965763807296753,
-0.6033443808555603,
-0.5060994625091553,
0.05774969980120659,
-0.03785322234034538,
0.14186303317546844,
-0.08463308215141296,
0.06584751605987549,
0.07114888727664948,
-0.06763128191232681,
0.518966794013977,
-0.2795138657093048,
-0.23457233607769012,
0.2563897371292114,
0.04275018721818924,
-0.15707890689373016,
0.01503802090883255,
-0.012921452522277832,
0.40847304463386536,
0.29668989777565,
-0.027669094502925873,
-0.3415408432483673,
-0.24200870096683502,
0.19116373360157013,
0.1286141574382782,
-0.4076526165008545,
-0.3557873070240021,
-0.1688462346792221,
-0.2850777506828308,
-0.031550128012895584,
-0.1503402590751648,
0.22856692969799042,
0.1309165060520172,
0.08498667925596237,
-0.2012486606836319,
-0.08133253455162048,
-0.3202270269393921,
0.41610187292099,
0.22947444021701813,
0.1594105362892151,
0.09487029910087585,
0.23963582515716553,
-0.11313748359680176,
0.2765880823135376,
-0.08313439041376114,
0.49266356229782104,
0.11508189141750336,
-0.07333208620548248,
-0.23578113317489624,
-0.16268520057201385,
0.49986544251441956,
0.2208074927330017,
-0.13017980754375458,
0.24570393562316895,
-0.1459178328514099,
-0.11419558525085449,
-0.4050402343273163,
-0.11082116514444351,
0.12244556099176407,
0.040771301835775375,
-0.06927546858787537,
-0.3382655680179596,
0.34297454357147217,
0.026600435376167297,
-0.24180743098258972,
-0.15076753497123718,
0.027508974075317383,
-0.3063724637031555,
0.4966259002685547,
0.04959408566355705,
0.7502151131629944,
0.08026950061321259,
0.22579914331436157,
0.49956804513931274,
0.1529827117919922,
0.4479934573173523,
-0.019674168899655342,
0.10599558800458908,
-0.22976399958133698,
-0.020185906440019608,
-0.0801839604973793,
-0.07720775902271271,
-0.03264031559228897,
0.22695468366146088,
-0.2821175456047058,
0.33594757318496704,
-0.0033659934997558594,
-0.34405580163002014,
-0.005583781749010086,
0.28393951058387756,
0.2938859760761261,
-0.1255468875169754,
-0.29250335693359375,
0.05541762709617615,
-0.02175307273864746,
0.04260627180337906,
-0.12310406565666199,
-0.109869085252285,
0.21333208680152893,
0.019409887492656708,
-0.11746643483638763,
-0.11519467830657959,
-0.3224742114543915,
0.267001211643219,
0.11726534366607666,
-0.1685052216053009,
0.44729819893836975,
0.2850077450275421,
0.12395733594894409,
0.007796168327331543,
-0.07119638472795486,
0.07813404500484467,
0.20802444219589233,
-0.0823080986738205,
0.16689427196979523,
-0.04284088313579559,
0.15705253183841705,
-0.0013510733842849731,
-0.0025430992245674133,
-0.005038000643253326,
0.2122475504875183,
0.15226200222969055,
-0.47205689549446106,
-0.09663663804531097,
-0.05234421044588089,
-0.1472117155790329,
-0.2569826543331146,
0.2628079950809479,
-0.08195880055427551,
0.032691311091184616,
0.07669849693775177,
0.02396145462989807,
-0.005239526275545359,
0.1885453164577484,
-0.1153901070356369,
-0.01737261563539505,
-0.025045450776815414,
0.12014255672693253,
0.402279257774353,
0.2349773347377777,
0.3080204427242279,
0.30026960372924805,
-0.06817138195037842,
-0.1803528368473053,
0.17134186625480652,
-0.12207754701375961,
0.2909735143184662,
0.1756090521812439,
0.14648105204105377,
-0.2375951111316681,
-0.30445975065231323,
0.11805105954408646,
0.01348051056265831,
0.06697135418653488,
-0.026001323014497757,
-0.18379102647304535,
-0.23541484773159027,
0.44257354736328125,
-0.11160506308078766,
-0.06375019252300262,
-0.12070106714963913,
0.3430422246456146,
-0.01114304643124342,
0.2345218062400818,
-0.32260727882385254,
-0.09017391502857208,
-0.03424965590238571,
-0.0006585288792848587,
-0.07214903086423874,
-0.395037442445755,
0.04854429140686989,
0.05626605823636055,
0.1170470118522644,
-0.33861708641052246,
-0.10398095846176147,
-0.20111656188964844,
0.016367632895708084,
0.09185121208429337,
0.1450989842414856,
-0.0100536048412323,
0.08328451216220856,
-0.0046010129153728485,
-0.12190066277980804,
-0.12631018459796906,
0.03349537402391434,
-0.213326096534729,
0.23030942678451538,
0.22418150305747986,
-0.24330581724643707,
-0.35254383087158203,
-0.1441265046596527,
0.04647038131952286,
0.12122435122728348,
-0.15298762917518616,
0.18837782740592957,
0.10763505846261978,
-0.1870584338903427,
-0.06022065877914429,
0.06111534684896469,
0.09295976161956787,
-0.23503826558589935,
0.022059807553887367,
0.260961651802063,
0.21356508135795593,
-0.20929290354251862,
0.1950675994157791,
0.09530199319124222,
0.5737608075141907,
-0.36216968297958374,
-0.12379538267850876,
-0.19613134860992432,
0.18014711141586304,
-0.39755263924598694,
0.10677836835384369,
-0.035771358758211136,
0.2692306637763977,
0.15088362991809845,
0.3243773877620697,
0.3548029363155365,
0.1190217137336731,
-0.22470934689044952,
-0.004598209634423256,
0.2842541038990021,
0.000805167481303215,
0.06461326777935028,
0.06524717807769775,
-0.0418841652572155,
0.09523585438728333,
0.479591965675354,
0.056891489773988724,
0.27372679114341736,
0.5982529520988464,
0.18818750977516174,
0.13395074009895325,
0.5289386510848999,
0.015870530158281326,
0.46540138125419617,
0.07246378064155579,
-0.07440932095050812,
0.1654359996318817,
0.16655319929122925,
-0.15099143981933594,
0.25892823934555054,
-0.08404173702001572,
-0.047069303691387177,
-0.5038695335388184,
0.06182017922401428,
0.1850280463695526,
-0.1930895745754242,
-0.32449597120285034,
0.13544100522994995,
0.0958600863814354,
-0.01902754232287407,
-0.13497380912303925,
-0.26542261242866516,
-0.34149008989334106,
0.13722354173660278,
-0.11110500991344452,
-0.01867365837097168,
-0.23643727600574493,
0.32979536056518555,
0.18047770857810974,
0.25031155347824097,
0.07628121972084045,
0.34376490116119385,
0.30481672286987305,
-0.10786180198192596,
-0.0460151843726635,
0.4059789180755615,
0.25081270933151245,
0.1334398090839386,
-0.7279353737831116,
0.07684779912233353,
-0.3143247067928314,
-0.1537240743637085,
-0.171271413564682,
0.019804228097200394,
-0.11105531454086304,
0.20670659840106964,
0.4055154025554657,
0.035541996359825134,
0.03322114050388336,
0.055463287979364395,
0.4479641616344452,
0.0331941694021225,
-0.22742174565792084,
0.3062977194786072,
-0.1743716597557068,
0.05574885755777359,
0.1576084941625595,
0.11946959048509598,
-0.4857301712036133,
-0.27086466550827026,
0.6146503686904907,
-0.023025905713438988,
0.14867451786994934,
-0.1452290564775467,
0.09348664432764053,
0.0028622429817914963,
0.6333820819854736,
0.1780218929052353,
0.035749707370996475,
-0.13035592436790466,
0.0039926692843437195,
-0.5874855518341064,
-0.2055060863494873,
-0.039707478135824203,
-0.07464765012264252,
0.1376367062330246,
0.28646230697631836,
-0.0014384165406227112,
0.22628971934318542,
-0.4077383875846863,
0.14048370718955994,
-0.3960297703742981,
-0.2935960590839386,
-0.6176455020904541,
0.03923620283603668,
-0.25117188692092896,
0.22112078964710236,
-0.19022706151008606,
0.015904411673545837,
0.27765876054763794,
0.13770443201065063,
-0.09554080665111542,
-0.03186456859111786,
-0.05506943166255951,
-0.08573485910892487,
0.13628003001213074,
-0.033625707030296326,
0.48733818531036377,
-0.03167538344860077,
0.0028376802802085876,
0.012323452159762383,
-0.10426349937915802,
0.003174619749188423,
-0.17775548994541168,
0.5362423062324524,
0.10622827708721161,
0.17822971940040588,
-0.18648549914360046,
0.12190103530883789,
0.14419205486774445,
0.11801635473966599,
0.19541464745998383,
-0.26493167877197266,
-0.41062766313552856,
0.39113208651542664,
0.11501435190439224,
0.41589444875717163,
-0.08289780467748642,
0.5141800045967102,
-0.14523206651210785,
0.10624051839113235,
-0.1097329705953598,
-0.3697821795940399,
0.42288732528686523,
-0.14515872299671173,
0.04343755170702934,
0.12982656061649323,
0.06356646120548248,
0.1955462098121643,
0.09209556132555008,
-0.41753485798835754,
-0.3561798930168152,
0.37265098094940186,
-0.42967838048934937,
-0.3153369128704071,
0.2559308111667633,
0.02545863389968872,
-0.47723010182380676,
-0.22108235955238342,
-0.04400430619716644,
-0.021368704736232758,
-0.4149133265018463,
0.07358904182910919,
-0.08630814403295517
] |
https://github.com/huggingface/datasets/issues/376 | to_pandas conversion doesn't always work | Could you try to update pyarrow to >=0.17.0 ? It should fix the `to_pandas` bug
Also I'm not sure that structures like list<struct> are fully supported in the lib (none of the datasets use that).
It can cause issues when using dataset transforms like `filter` for example | For some complex nested types, the conversion from Arrow to python dict through pandas doesn't seem to be possible.
Here is an example using the official SQUAD v2 JSON file.
This example was found while investigating #373.
```python
>>> squad = load_dataset('json', data_files={nlp.Split.TRAIN: ["./train-v2.0.json"]}, download_mode=nlp.GenerateMode.FORCE_REDOWNLOAD, version="1.0.0", field='data')
>>> squad['train']
Dataset(schema: {'title': 'string', 'paragraphs': 'list<item: struct<qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>, context: string>>'}, num_rows: 442)
>>> squad['train'][0]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/thomwolf/Documents/GitHub/datasets/src/nlp/arrow_dataset.py", line 589, in __getitem__
format_kwargs=self._format_kwargs,
File "/Users/thomwolf/Documents/GitHub/datasets/src/nlp/arrow_dataset.py", line 529, in _getitem
outputs = self._unnest(self._data.slice(key, 1).to_pandas().to_dict("list"))
File "pyarrow/array.pxi", line 559, in pyarrow.lib._PandasConvertible.to_pandas
File "pyarrow/table.pxi", line 1367, in pyarrow.lib.Table._to_pandas
File "/Users/thomwolf/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/pandas_compat.py", line 766, in table_to_blockmanager
blocks = _table_to_blocks(options, table, categories, ext_columns_dtypes)
File "/Users/thomwolf/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/pandas_compat.py", line 1101, in _table_to_blocks
list(extension_columns.keys()))
File "pyarrow/table.pxi", line 881, in pyarrow.lib.table_to_blocks
File "pyarrow/error.pxi", line 105, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Not implemented type for Arrow list to pandas: struct<qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>, context: string>
```
cc @lhoestq would we have a way to detect this from the schema maybe?
Here is the schema for this pretty complex JSON:
```python
>>> squad['train'].schema
title: string
paragraphs: list<item: struct<qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>, context: string>>
child 0, item: struct<qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>, context: string>
child 0, qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>
child 0, item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>
child 0, question: string
child 1, id: string
child 2, answers: list<item: struct<text: string, answer_start: int64>>
child 0, item: struct<text: string, answer_start: int64>
child 0, text: string
child 1, answer_start: int64
child 3, is_impossible: bool
child 4, plausible_answers: list<item: struct<text: string, answer_start: int64>>
child 0, item: struct<text: string, answer_start: int64>
child 0, text: string
child 1, answer_start: int64
child 1, context: string
``` | 47 | to_pandas conversion doesn't always work
For some complex nested types, the conversion from Arrow to python dict through pandas doesn't seem to be possible.
Here is an example using the official SQUAD v2 JSON file.
This example was found while investigating #373.
```python
>>> squad = load_dataset('json', data_files={nlp.Split.TRAIN: ["./train-v2.0.json"]}, download_mode=nlp.GenerateMode.FORCE_REDOWNLOAD, version="1.0.0", field='data')
>>> squad['train']
Dataset(schema: {'title': 'string', 'paragraphs': 'list<item: struct<qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>, context: string>>'}, num_rows: 442)
>>> squad['train'][0]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/thomwolf/Documents/GitHub/datasets/src/nlp/arrow_dataset.py", line 589, in __getitem__
format_kwargs=self._format_kwargs,
File "/Users/thomwolf/Documents/GitHub/datasets/src/nlp/arrow_dataset.py", line 529, in _getitem
outputs = self._unnest(self._data.slice(key, 1).to_pandas().to_dict("list"))
File "pyarrow/array.pxi", line 559, in pyarrow.lib._PandasConvertible.to_pandas
File "pyarrow/table.pxi", line 1367, in pyarrow.lib.Table._to_pandas
File "/Users/thomwolf/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/pandas_compat.py", line 766, in table_to_blockmanager
blocks = _table_to_blocks(options, table, categories, ext_columns_dtypes)
File "/Users/thomwolf/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/pandas_compat.py", line 1101, in _table_to_blocks
list(extension_columns.keys()))
File "pyarrow/table.pxi", line 881, in pyarrow.lib.table_to_blocks
File "pyarrow/error.pxi", line 105, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Not implemented type for Arrow list to pandas: struct<qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>, context: string>
```
cc @lhoestq would we have a way to detect this from the schema maybe?
Here is the schema for this pretty complex JSON:
```python
>>> squad['train'].schema
title: string
paragraphs: list<item: struct<qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>, context: string>>
child 0, item: struct<qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>, context: string>
child 0, qas: list<item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>>
child 0, item: struct<question: string, id: string, answers: list<item: struct<text: string, answer_start: int64>>, is_impossible: bool, plausible_answers: list<item: struct<text: string, answer_start: int64>>>
child 0, question: string
child 1, id: string
child 2, answers: list<item: struct<text: string, answer_start: int64>>
child 0, item: struct<text: string, answer_start: int64>
child 0, text: string
child 1, answer_start: int64
child 3, is_impossible: bool
child 4, plausible_answers: list<item: struct<text: string, answer_start: int64>>
child 0, item: struct<text: string, answer_start: int64>
child 0, text: string
child 1, answer_start: int64
child 1, context: string
```
Could you try to update pyarrow to >=0.17.0 ? It should fix the `to_pandas` bug
Also I'm not sure that structures like list<struct> are fully supported in the lib (none of the datasets use that).
It can cause issues when using dataset transforms like `filter` for example | [
0.034682031720876694,
0.1334797739982605,
-0.10313521325588226,
0.05421419069170952,
0.29663407802581787,
-0.0923534631729126,
0.3753245770931244,
0.46983397006988525,
-0.132777601480484,
-0.21645285189151764,
-0.21985159814357758,
0.8954610824584961,
0.17293806374073029,
0.07015391439199448,
-0.0751233920454979,
-0.006098948419094086,
0.14508020877838135,
0.15654513239860535,
0.008870385587215424,
-0.07089804857969284,
-0.05991019308567047,
0.2531315088272095,
-0.30041301250457764,
0.1826227456331253,
-0.09054803848266602,
-0.24548903107643127,
-0.06939912587404251,
0.20317324995994568,
-0.03727523982524872,
-0.41646668314933777,
0.31619688868522644,
-0.24165454506874084,
-0.006052402779459953,
0.3274356722831726,
-0.00010487268446013331,
0.16407042741775513,
0.27051404118537903,
-0.000003390014171600342,
-0.3173803687095642,
0.02245888113975525,
0.21172678470611572,
-0.2963276505470276,
0.38135868310928345,
-0.3474823832511902,
0.08694649487733841,
-0.35661980509757996,
0.017147233709692955,
-0.08357645571231842,
0.7314289212226868,
0.4084216058254242,
0.2785184681415558,
0.2500540614128113,
0.22122310101985931,
0.10547281801700592,
0.028330735862255096,
0.017516277730464935,
-0.12751679122447968,
0.09066668152809143,
0.0750311091542244,
-0.11025449633598328,
-0.09462163597345352,
-0.0678507536649704,
0.01896430365741253,
-0.12564557790756226,
-0.027246586978435516,
0.04046187922358513,
-0.09317349642515182,
-0.20960529148578644,
-0.0769638866186142,
0.2726135551929474,
0.09395931661128998,
-0.38738343119621277,
-0.3478510081768036,
-0.32791662216186523,
0.06293893605470657,
-0.0009639300405979156,
-0.040286704897880554,
0.09387313574552536,
-0.12865710258483887,
0.11512225866317749,
0.37401771545410156,
0.21216627955436707,
-0.19180288910865784,
0.044261183589696884,
-0.10552297532558441,
0.22870701551437378,
-0.1356021612882614,
0.05417432263493538,
-0.05787990614771843,
-0.3256850242614746,
0.09869518131017685,
-0.027754254639148712,
0.12784387171268463,
0.12531490623950958,
-0.346433162689209,
-0.2328878790140152,
-0.022337667644023895,
-0.5411041378974915,
0.028372306376695633,
-0.06019080430269241,
0.4258280098438263,
0.09072023630142212,
0.17179034650325775,
0.23119571805000305,
0.3668311536312103,
-0.014952898025512695,
0.03462449088692665,
0.16060253977775574,
0.11225549876689911,
0.08119068294763565,
-0.1864200234413147,
0.13482636213302612,
-0.16628867387771606,
-0.24216917157173157,
-0.0859452337026596,
-0.1153009906411171,
0.33117347955703735,
0.02543753758072853,
-0.439940869808197,
-0.05375341325998306,
-0.5590519905090332,
0.2023046314716339,
0.07109387964010239,
0.133867084980011,
-0.07466235756874084,
0.33007416129112244,
0.032563455402851105,
0.3296058773994446,
-0.11417727172374725,
0.2582935094833374,
-0.18877103924751282,
0.17038674652576447,
-0.0874275267124176,
-0.23653267323970795,
0.09821105003356934,
0.3039865493774414,
0.046602264046669006,
0.05049724876880646,
0.09189597517251968,
-0.08390241861343384,
-0.10969491302967072,
-0.001504889689385891,
0.13926470279693604,
0.06857703626155853,
0.035796452313661575,
-0.0865214541554451,
0.13930505514144897,
-0.5467725396156311,
-0.11631396412849426,
0.00849691778421402,
-0.19115635752677917,
0.004636760801076889,
-0.17469891905784607,
0.2353430539369583,
-0.20895124971866608,
-0.2094302624464035,
-0.2487301528453827,
0.30757880210876465,
0.25598427653312683,
-0.13447746634483337,
0.055490098893642426,
-0.21348313987255096,
0.10804352164268494,
-0.3103169798851013,
0.04281065613031387,
0.08124616742134094,
-0.5389334559440613,
-0.02032485604286194,
0.03079947456717491,
0.018450219184160233,
0.08580075949430466,
0.31025880575180054,
-0.11584878712892532,
0.13311369717121124,
-0.00830882042646408,
0.3600107431411743,
0.4705028235912323,
-0.5010068416595459,
-0.22720853984355927,
0.12339479476213455,
-0.10282184183597565,
0.04695720970630646,
-0.00941331684589386,
-0.06199890375137329,
0.11394352465867996,
-0.08478929102420807,
0.0009974539279937744,
0.41463613510131836,
0.08445455878973007,
-0.029538532719016075,
-0.31786033511161804,
-0.0425880067050457,
0.16574761271476746,
-0.04793715476989746,
-0.20704950392246246,
-0.04203421622514725,
0.10970613360404968,
0.15327516198158264,
0.2502882778644562,
-0.017326857894659042,
0.1595969796180725,
0.05328875035047531,
0.10937589406967163,
-0.1778443306684494,
0.12437783181667328,
-0.16074123978614807,
-0.4700012803077698,
0.048602573573589325,
-0.45373350381851196,
0.060893647372722626,
-0.414434015750885,
-0.2232550084590912,
-0.21283498406410217,
0.14734788239002228,
-0.18784239888191223,
0.025558501482009888,
0.35755130648612976,
-0.1679503470659256,
-0.051281265914440155,
-0.09644638001918793,
-0.1266191601753235,
-0.18820291757583618,
-0.20634038746356964,
0.17197386920452118,
-0.17085042595863342,
0.2271745800971985,
-0.11296836286783218,
-0.19934958219528198,
0.2624518573284149,
0.4142285883426666,
0.10864859819412231,
0.06142553314566612,
0.07964708656072617,
0.2213224172592163,
-0.054462775588035583,
-0.03178836405277252,
0.3201677203178406,
-0.2909972071647644,
-0.03131755441427231,
-0.26595035195350647,
0.014142714440822601,
0.3197632133960724,
0.15064118802547455,
-0.18041381239891052,
-0.3506353497505188,
0.5115054249763489,
-0.005945257842540741,
0.3427325487136841,
-0.04898669198155403,
0.2725573182106018,
0.2093355655670166,
0.03738826885819435,
-0.27115190029144287,
-0.0717703253030777,
-0.4835416376590729,
0.3345217704772949,
-0.020440546795725822,
-0.044702425599098206,
-0.2443450391292572,
0.3678499758243561,
0.5505480766296387,
-0.06893301010131836,
0.16166134178638458,
0.07750905305147171,
0.01619948074221611,
-0.26196780800819397,
0.064887635409832,
0.06906074285507202,
0.26397401094436646,
0.21404367685317993,
0.2403579205274582,
-0.1615491658449173,
-0.2850791811943054,
-0.07137329131364822,
0.2082889974117279,
0.09746326506137848,
0.5278191566467285,
0.07922717183828354,
0.500167191028595,
-0.034170810133218765,
-0.35750070214271545,
-0.19928041100502014,
-0.05163325369358063,
0.0686856135725975,
-0.28541842103004456,
0.25648826360702515,
-0.3057739734649658,
0.04774394631385803,
-0.02505676820874214,
-0.15959565341472626,
-0.018488556146621704,
-0.35921236872673035,
-0.031612180173397064,
-0.13781239092350006,
-0.13789145648479462,
0.2406533807516098,
0.026621107012033463,
0.08449466526508331,
0.23270763456821442,
-0.27753767371177673,
-0.15279781818389893,
-0.23520812392234802,
-0.26169320940971375,
0.2177620679140091,
0.33793696761131287,
0.041134994477033615,
-0.04852849245071411,
0.279426634311676,
-0.060433514416217804,
-0.06153300404548645,
-0.3725876212120056,
-0.008261185139417648,
-0.3359123468399048,
0.07153219729661942,
0.20276586711406708,
0.1623566597700119,
-0.26201963424682617,
-0.16556987166404724,
0.23156516253948212,
-0.01640556938946247,
-0.20914921164512634,
0.09470508992671967,
-0.1275329440832138,
-0.034624118357896805,
-0.14284107089042664,
-0.24694398045539856,
-0.2260986864566803,
-0.3014286756515503,
0.5213173627853394,
0.18876710534095764,
0.22195275127887726,
0.12497033923864365,
0.3326111435890198,
0.39146122336387634,
0.10528432577848434,
0.042373210191726685,
-0.06947711110115051,
0.0976862907409668,
0.2977072596549988,
-0.16969411075115204,
-0.37976983189582825,
-0.06988215446472168,
-0.18762226402759552,
0.2407640963792801,
-0.3310917615890503,
-0.19385898113250732,
-0.15038573741912842,
-0.08566547185182571,
0.2066681981086731,
-0.02671600878238678,
-0.041933901607990265,
0.24675829708576202,
0.20925822854042053,
-0.202810600399971,
-0.2000725269317627,
-0.034285057336091995,
0.1739804893732071,
0.17105725407600403,
0.03770987689495087,
-0.17123880982398987,
0.3040516674518585,
0.25859183073043823,
0.4388800859451294,
0.209982767701149,
-0.14609169960021973,
0.04097874462604523,
-0.07475756853818893,
0.17800769209861755,
-0.044651784002780914,
-0.12401974201202393,
0.05835351720452309,
-0.2827704846858978,
0.21704375743865967,
0.020870186388492584,
-0.04804520308971405,
-0.4201206564903259,
0.06627898663282394,
0.20974017679691315,
-0.25226569175720215,
-0.23288290202617645,
0.11302948743104935,
-0.26357531547546387,
-0.25862231850624084,
0.06002331152558327,
0.007231861352920532,
-0.2038668990135193,
0.0052686212584376335,
-0.11344631016254425,
-0.12820912897586823,
-0.07911542803049088,
0.054539185017347336,
-0.42793241143226624,
-0.26823753118515015,
-0.29557329416275024,
0.19402340054512024,
-0.027474908158183098,
0.32339900732040405,
0.2389303296804428,
-0.3229118287563324,
0.10851120948791504,
-0.262704461812973,
0.3716486692428589,
0.013256402686238289,
-0.060072630643844604,
0.36292770504951477,
0.33015012741088867,
-0.7625818252563477,
-0.045996151864528656,
-0.32562631368637085,
0.4142328202724457,
0.2585715055465698,
0.1136583536863327,
-0.3738935887813568,
-0.29702433943748474,
0.1337302029132843,
-0.06115894392132759,
0.03084160014986992,
0.12805333733558655,
-0.23782116174697876,
-0.337961345911026,
-0.20019112527370453,
0.2259795069694519,
0.35106274485588074,
0.29220661520957947,
-0.21159106492996216,
-0.4218180775642395,
-0.19450555741786957,
-0.19399529695510864,
0.1717281937599182,
0.21853160858154297,
0.13525736331939697,
0.02848014608025551,
-0.052735596895217896,
-0.14774586260318756,
0.2658386826515198,
0.08324064314365387,
0.46826642751693726,
-0.07063975930213928,
-0.10463595390319824,
0.10219964385032654,
0.039376456290483475,
0.3186957538127899,
0.29607272148132324,
-0.1890678107738495,
0.0780218169093132,
-0.1481001228094101,
0.011172942817211151,
0.20169369876384735,
-0.23846431076526642,
0.38594305515289307,
-0.016880961135029793,
0.002590146381407976,
-0.1516295224428177,
0.46555987000465393,
-0.020357180386781693,
-0.0327579639852047,
0.03834310173988342,
0.11359556019306183,
-0.11310917139053345,
0.46391618251800537,
0.2065853476524353,
0.87907874584198,
0.02624235302209854,
0.317167729139328,
0.5428174734115601,
-0.17100083827972412,
0.5304213762283325,
-0.05399550125002861,
0.1478680670261383,
-0.29385942220687866,
0.5065794587135315,
0.06451773643493652,
-0.14257702231407166,
-0.08630888909101486,
0.2681822180747986,
-0.23275966942310333,
0.025835616514086723,
-0.19606216251850128,
0.21700914204120636,
0.21070639789104462,
0.2751065194606781,
-0.030598653480410576,
-0.27559712529182434,
-0.6548109650611877,
0.2362293004989624,
0.11659184098243713,
-0.25149452686309814,
0.150236576795578,
-0.45652419328689575,
-0.44580313563346863,
-0.10747133195400238,
-0.014846138656139374,
0.2622070908546448,
-0.179508239030838,
0.31228190660476685,
0.316770076751709,
-0.34362882375717163,
0.19710221886634827,
0.5936038494110107,
-0.1254548728466034,
-0.22810931503772736,
-0.05505366623401642,
0.08613023161888123,
0.03467905893921852,
-0.010929596610367298,
0.10198643803596497,
-0.08541813492774963,
0.34365928173065186,
-0.06179989129304886,
-0.13431741297245026,
0.08106312900781631,
-0.03489454835653305,
-0.13049623370170593,
0.0797431468963623,
0.4892708659172058,
-0.16184593737125397,
-0.3484075367450714,
-0.09836971759796143,
-0.038470737636089325,
-0.39547300338745117,
-0.24171259999275208,
0.21162623167037964,
-0.009225331246852875,
-0.11256367713212967,
0.42551442980766296,
0.21379396319389343,
-0.08397860825061798,
0.14848488569259644,
0.2626097500324249,
0.09307350218296051,
0.3781287968158722,
0.5176308155059814,
0.08842971920967102,
-0.17638880014419556,
-0.27539658546447754,
0.17697685956954956,
0.13794943690299988,
-0.18899008631706238,
0.2807775139808655,
-0.18825964629650116,
-0.357673317193985,
0.04598984494805336,
0.02075960859656334,
-0.05893669277429581,
0.19556334614753723,
-0.25975555181503296,
-0.40569713711738586,
-0.27988576889038086,
0.22884692251682281,
-0.04088151827454567,
-0.006954062730073929,
-0.048640042543411255,
0.3339020609855652,
-0.014501642435789108,
-0.09634911268949509,
-0.3843575119972229,
0.2725992500782013,
-0.37165531516075134,
0.0740751400589943,
-0.3814619779586792,
-0.34599173069000244,
0.2668171525001526,
0.0308048278093338,
0.21607676148414612,
0.10986112803220749,
0.003686225041747093,
-0.3170912265777588,
-0.046104565262794495,
0.07813087105751038,
0.1460118442773819,
0.10289286822080612,
-0.015235754661262035,
0.04525979608297348,
-0.30043384432792664,
-0.15093547105789185,
-0.12128923833370209,
-0.055539436638355255,
-0.00963764637708664,
0.16066956520080566,
0.009900517761707306,
0.07402384281158447,
0.20944955945014954,
-0.15547394752502441,
-0.06924064457416534,
0.05239168554544449,
-0.07388252019882202,
0.25322991609573364,
-0.04902293533086777,
0.003950968384742737,
0.11222175508737564,
0.226232647895813,
-0.005849145352840424,
0.1865207850933075,
0.29580530524253845,
-0.16246509552001953,
-0.44131967425346375,
-0.21850037574768066,
0.3224138617515564,
0.5740989446640015,
-0.1763644963502884,
0.05707085132598877,
-0.20074984431266785,
0.2156662791967392,
-0.4009666442871094,
0.09818007797002792,
0.24204912781715393,
-0.1563887596130371,
0.16294153034687042,
0.18097400665283203,
0.027445677667856216,
-0.11565150320529938,
-0.01255623996257782,
0.06593581289052963,
0.20972177386283875,
-0.07659623771905899,
-0.05963500216603279,
0.213852658867836,
-0.016143597662448883,
0.019321810454130173,
0.40707138180732727,
-0.0857662707567215,
0.2633345425128937,
0.33296799659729004,
0.031226854771375656,
0.04262828081846237,
0.20170900225639343,
0.03907865285873413,
0.3710516095161438,
0.16235937178134918,
-0.05449533835053444,
0.17371003329753876,
0.2876291871070862,
-0.02208370715379715,
0.10960933566093445,
0.7406489849090576,
-0.09937015175819397,
-0.14961980283260345,
-0.0029147788882255554,
0.09649509191513062,
-0.19204086065292358,
-0.26092660427093506,
-0.362496942281723,
-0.1506774127483368,
-0.10666003078222275,
-0.3490464389324188,
-0.07085151970386505,
-0.2164480835199356,
-0.08915632963180542,
-0.07996901869773865,
0.11761335283517838,
-0.12785252928733826,
0.1915338635444641,
0.07219532132148743,
0.25208956003189087,
-0.01634233444929123,
0.17917540669441223,
0.191895991563797,
-0.007400445640087128,
-0.17814591526985168,
0.1820494383573532,
0.5045115351676941,
0.15603852272033691,
-0.4481220245361328,
-0.012412366457283497,
0.07526028156280518,
-0.35750696063041687,
0.01840391755104065,
0.10657674819231033,
0.1137404590845108,
-0.23784269392490387,
0.33567216992378235,
0.22902366518974304,
-0.18507780134677887,
-0.2165265828371048,
0.2224215269088745,
-0.07615594565868378,
0.11270278692245483,
0.2996039390563965,
-0.30521056056022644,
-0.32965052127838135,
-0.09446866810321808,
-0.0046698302030563354,
-0.26773402094841003,
-0.27658888697624207,
0.1584850698709488,
0.007112227380275726,
0.20486950874328613,
-0.21263545751571655,
0.15467435121536255,
0.06932611763477325,
0.5761983394622803,
-0.031088974326848984,
0.09480495750904083,
0.0794110968708992,
0.21028845012187958,
-0.47909411787986755,
0.13912421464920044,
-0.1064218133687973,
-0.11811961233615875,
0.06871570646762848,
0.49902546405792236,
0.06305819749832153,
0.15049049258232117,
0.15088368952274323,
0.01043257862329483,
-0.14351223409175873,
0.09686636179685593,
-0.3981224596500397,
0.010469337925314903,
0.1829184889793396,
0.05970245599746704,
0.16288240253925323,
-0.29815346002578735,
0.06474930793046951,
-0.1292550265789032,
0.13474062085151672,
-0.021799739450216293,
-0.21690812706947327,
-0.02702084183692932,
-0.10691620409488678,
0.2247484177350998,
0.10917934030294418,
0.17956143617630005,
-0.05862195044755936,
-0.23629820346832275,
-0.18980470299720764,
-0.16667678952217102,
-0.24859519302845,
0.47924697399139404,
-0.145441472530365,
0.23625564575195312,
-0.08577384799718857,
0.09412827342748642,
0.15623269975185394,
-0.026811540126800537,
0.11479784548282623,
-0.13401715457439423,
-0.32602033019065857,
0.3352854251861572,
-0.09693114459514618,
0.2485351413488388,
-0.2594832181930542,
0.3689168095588684,
-0.1254216581583023,
0.22033582627773285,
-0.35465914011001587,
-0.5474952459335327,
0.513451337814331,
-0.3442060053348541,
-0.353921115398407,
0.2588498294353485,
0.17081278562545776,
0.2654417157173157,
0.1027444526553154,
-0.16763994097709656,
-0.1582760512828827,
0.2111673206090927,
-0.17073452472686768,
-0.32021835446357727,
-0.005256926640868187,
-0.1648394763469696,
0.10093091428279877,
-0.2636694312095642,
-0.04309355467557907,
0.0050744712352752686,
0.10691428184509277,
-0.20345377922058105,
-0.39280641078948975
] |
https://github.com/huggingface/datasets/issues/375 | TypeError when computing bertscore | I am not able to reproduce this issue on my side.
Could you give us more details about the inputs you used ?
I do get another error though:
```
~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/bert_score/utils.py in bert_cos_score_idf(model, refs, hyps, tokenizer, idf_dict, verbose, batch_size, device, all_layers)
371 return sorted(list(set(l)), key=lambda x: len(x.split(" ")))
372
--> 373 sentences = dedup_and_sort(refs + hyps)
374 embs = []
375 iter_range = range(0, len(sentences), batch_size)
ValueError: operands could not be broadcast together with shapes (0,) (2,)
```
That's because it gets numpy arrays as input and not lists. See #387 | Hi,
I installed nlp 0.3.0 via pip, and my python version is 3.7.
When I tried to compute bertscore with the code:
```
import nlp
bertscore = nlp.load_metric('bertscore')
# load hyps and refs
...
print (bertscore.compute(hyps, refs, lang='en'))
```
I got the following error.
```
Traceback (most recent call last):
File "bert_score_evaluate.py", line 16, in <module>
print (bertscore.compute(hyps, refs, lang='en'))
File "/home/willywsm/anaconda3/envs/torcher/lib/python3.7/site-packages/nlp/metric.py", line 200, in compute
output = self._compute(predictions=predictions, references=references, **metrics_kwargs)
File "/home/willywsm/anaconda3/envs/torcher/lib/python3.7/site-packages/nlp/metrics/bertscore/fb176889831bf0ce995ed197edc94b2e9a83f647a869bb8c9477dbb2d04d0f08/bertscore.py", line 105, in _compute
hashcode = bert_score.utils.get_hash(model_type, num_layers, idf, rescale_with_baseline)
TypeError: get_hash() takes 3 positional arguments but 4 were given
```
It seems like there is something wrong with get_hash() function? | 91 | TypeError when computing bertscore
Hi,
I installed nlp 0.3.0 via pip, and my python version is 3.7.
When I tried to compute bertscore with the code:
```
import nlp
bertscore = nlp.load_metric('bertscore')
# load hyps and refs
...
print (bertscore.compute(hyps, refs, lang='en'))
```
I got the following error.
```
Traceback (most recent call last):
File "bert_score_evaluate.py", line 16, in <module>
print (bertscore.compute(hyps, refs, lang='en'))
File "/home/willywsm/anaconda3/envs/torcher/lib/python3.7/site-packages/nlp/metric.py", line 200, in compute
output = self._compute(predictions=predictions, references=references, **metrics_kwargs)
File "/home/willywsm/anaconda3/envs/torcher/lib/python3.7/site-packages/nlp/metrics/bertscore/fb176889831bf0ce995ed197edc94b2e9a83f647a869bb8c9477dbb2d04d0f08/bertscore.py", line 105, in _compute
hashcode = bert_score.utils.get_hash(model_type, num_layers, idf, rescale_with_baseline)
TypeError: get_hash() takes 3 positional arguments but 4 were given
```
It seems like there is something wrong with get_hash() function?
I am not able to reproduce this issue on my side.
Could you give us more details about the inputs you used ?
I do get another error though:
```
~/.virtualenvs/hf-datasets/lib/python3.7/site-packages/bert_score/utils.py in bert_cos_score_idf(model, refs, hyps, tokenizer, idf_dict, verbose, batch_size, device, all_layers)
371 return sorted(list(set(l)), key=lambda x: len(x.split(" ")))
372
--> 373 sentences = dedup_and_sort(refs + hyps)
374 embs = []
375 iter_range = range(0, len(sentences), batch_size)
ValueError: operands could not be broadcast together with shapes (0,) (2,)
```
That's because it gets numpy arrays as input and not lists. See #387 | [
0.27612558007240295,
-0.1318783462047577,
0.07569077610969543,
0.5165117979049683,
0.09885652363300323,
-0.08921433240175247,
0.1624639332294464,
0.47763001918792725,
-0.06896990537643433,
0.1780642569065094,
0.19733786582946777,
0.4109014570713043,
-0.22790680825710297,
-0.285977840423584,
-0.010782797820866108,
-0.4891376197338104,
-0.010812267661094666,
0.25762879848480225,
0.07523071765899658,
-0.19344402849674225,
-0.4337226152420044,
0.04549310356378555,
-0.30531686544418335,
0.22822512686252594,
0.2554675042629242,
0.08862869441509247,
-0.2604389786720276,
0.13486093282699585,
-0.22785982489585876,
-0.41585373878479004,
0.3323250412940979,
-0.17855463922023773,
0.007961438968777657,
0.27357277274131775,
-0.00011967582395300269,
-0.1642267107963562,
0.34228336811065674,
-0.05037578195333481,
0.1353788673877716,
-0.2967057228088379,
-0.5725340843200684,
-0.31059083342552185,
-0.03196163475513458,
-0.31771352887153625,
0.2614755928516388,
0.14892597496509552,
-0.13543425500392914,
-0.048101216554641724,
0.012342087924480438,
0.1812463253736496,
0.13395893573760986,
0.025417346507310867,
-0.21186362206935883,
0.017760733142495155,
0.26042431592941284,
0.0071909502148628235,
0.01854938082396984,
0.36357852816581726,
-0.402558833360672,
-0.30081677436828613,
0.01491258293390274,
0.32884031534194946,
0.013554060831665993,
0.08236438035964966,
0.20778349041938782,
0.2061750292778015,
0.06418626010417938,
0.18809054791927338,
-0.09990250319242477,
0.090854212641716,
-0.36081770062446594,
0.08363564312458038,
-0.3250645399093628,
0.23435461521148682,
0.056302424520254135,
-0.47850483655929565,
0.2022826075553894,
-0.11532819271087646,
-0.0014468599110841751,
-0.5615647435188293,
-0.2783876061439514,
-0.10059567540884018,
-0.3167916536331177,
0.19225329160690308,
0.3359634280204773,
-0.1287994682788849,
-0.10188642889261246,
0.17364349961280823,
0.4988456070423126,
-0.12606127560138702,
-0.11482428014278412,
-0.13571304082870483,
0.1316630244255066,
0.4445532560348511,
-0.09116089344024658,
0.10928070545196533,
0.136341854929924,
0.11333481222391129,
-0.030332816764712334,
-0.5219542980194092,
0.07191159576177597,
-0.02703969180583954,
-0.3086428642272949,
0.2734445631504059,
0.0143341775983572,
0.40411993861198425,
0.0988551452755928,
0.21380558609962463,
-0.17128920555114746,
0.09427910298109055,
0.1294124722480774,
-0.10194177180528641,
0.005688196048140526,
-0.1329759806394577,
0.27265477180480957,
0.4165841341018677,
-0.23633138835430145,
-0.1184181421995163,
0.12089867144823074,
-0.03051023930311203,
-0.5161265730857849,
-0.015683956444263458,
0.2908792793750763,
0.30360737442970276,
-0.03180592879652977,
0.3757748007774353,
0.05425085127353668,
0.12529730796813965,
-0.21856163442134857,
0.0710507482290268,
-0.16511468589305878,
0.4736366271972656,
-0.4104000926017761,
-0.09632930159568787,
0.2049657702445984,
-0.278707891702652,
0.25012102723121643,
0.02121422067284584,
0.13068009912967682,
0.05555230379104614,
-0.23201791942119598,
-0.2523786723613739,
0.1263786107301712,
-0.14106306433677673,
0.02728952094912529,
-0.013950574211776257,
0.2995970547199249,
0.2706364393234253,
-0.13691183924674988,
0.01816616579890251,
-0.4476977586746216,
-0.31434470415115356,
0.15596096217632294,
0.09911392629146576,
0.17961318790912628,
0.15777555108070374,
-0.21326109766960144,
-0.0983944982290268,
0.27187877893447876,
-0.279269278049469,
-0.24608376622200012,
-0.37670713663101196,
-0.18238769471645355,
-0.26218181848526,
0.1168278232216835,
0.20593729615211487,
-0.12124525010585785,
0.07937219738960266,
-0.33447232842445374,
0.38357120752334595,
0.41818952560424805,
0.25747165083885193,
-0.2473280280828476,
0.04520396143198013,
-0.04920575022697449,
0.3692500591278076,
0.512599766254425,
-0.5257791876792908,
-0.08675029128789902,
-0.14901141822338104,
0.3625633716583252,
-0.30877000093460083,
-0.03997328132390976,
-0.02408023551106453,
-0.33843669295310974,
0.02452145144343376,
0.058152515441179276,
-0.1452075093984604,
-0.1038011759519577,
0.013366037979722023,
-0.207016721367836,
0.03591512143611908,
0.23699939250946045,
0.017171617597341537,
0.2854468822479248,
-0.09815654903650284,
-0.08825670927762985,
0.3454076647758484,
-0.11927323788404465,
-0.13637471199035645,
0.034553300589323044,
0.050476573407649994,
0.30943527817726135,
-0.20218776166439056,
0.2588392496109009,
-0.16559356451034546,
0.10928244888782501,
0.06734717637300491,
-0.449125736951828,
0.28564533591270447,
-0.03114663064479828,
0.2148444801568985,
-0.17016059160232544,
-0.10167023539543152,
-0.08132590353488922,
0.004504421725869179,
0.03322865068912506,
0.08053232729434967,
0.2835667133331299,
0.05956173315644264,
-0.13740479946136475,
-0.3083924651145935,
-0.07903093844652176,
-0.25110292434692383,
-0.28636810183525085,
0.03992640972137451,
-0.3576807677745819,
-0.11139126867055893,
0.25295791029930115,
0.4223966896533966,
0.46086758375167847,
0.22826512157917023,
-0.17527130246162415,
0.1923556625843048,
0.012855486944317818,
-0.25308793783187866,
0.25284290313720703,
0.028912872076034546,
-0.03189396113157272,
-0.2653277814388275,
0.1053084284067154,
-0.08036454021930695,
0.3789342939853668,
-0.07781641185283661,
0.17001572251319885,
0.3666508197784424,
0.021599672734737396,
0.3864729702472687,
0.058427684009075165,
0.12905797362327576,
0.1458587497472763,
0.1078660786151886,
0.17750774323940277,
-0.11834611743688583,
0.30077171325683594,
0.07034775614738464,
-0.2067733258008957,
-0.266176700592041,
0.2243998646736145,
-0.397400826215744,
0.5296505689620972,
0.10973048210144043,
-0.044388338923454285,
0.3107476830482483,
0.04475171118974686,
-0.07975378632545471,
-0.3063564896583557,
-0.5760127305984497,
0.4189802408218384,
-0.14339542388916016,
-0.08124729990959167,
-0.00952361710369587,
-0.0576682984828949,
-0.03411611542105675,
0.1319587528705597,
0.14558768272399902,
-0.15138374269008636,
-0.16148391366004944,
0.0986195057630539,
-0.08650811016559601,
0.04164465516805649,
-0.20196186006069183,
0.03170083463191986,
0.5163313150405884,
-0.33230826258659363,
0.45920270681381226,
-0.2828938961029053,
-0.211226224899292,
-0.2713426947593689,
-0.6009108424186707,
-0.393034428358078,
-0.43929874897003174,
-0.06112480163574219,
-0.04875059053301811,
0.11802941560745239,
0.2116563618183136,
0.11267521977424622,
0.3243059813976288,
0.21351973712444305,
0.1973181962966919,
-0.11490354686975479,
-0.22645223140716553,
-0.42135515809059143,
-0.07052242010831833,
-0.1354672908782959,
0.06779894977807999,
0.15107668936252594,
-0.1498568058013916,
-0.14664705097675323,
-0.05144955962896347,
-0.24786555767059326,
0.08928440511226654,
-0.3712441325187683,
0.011481666937470436,
0.42872583866119385,
-0.25207316875457764,
-0.5686555504798889,
-0.18658341467380524,
0.4113081395626068,
-0.21121610701084137,
-0.13622310757637024,
0.605329692363739,
-0.10481088608503342,
0.0049575502052903175,
-0.14193102717399597,
-0.23258274793624878,
0.16318045556545258,
-0.026635587215423584,
0.24478885531425476,
0.11479818820953369,
0.3527393341064453,
0.06086184084415436,
-0.042631059885025024,
0.36705517768859863,
-0.24333932995796204,
-0.05458594113588333,
-0.2454434484243393,
-0.23380416631698608,
0.17395910620689392,
-0.16335493326187134,
-0.3638003170490265,
-0.23292109370231628,
-0.08394511789083481,
0.22059641778469086,
0.032696790993213654,
-0.07199162244796753,
-0.6988816261291504,
0.16091403365135193,
-0.08757364749908447,
-0.11307556927204132,
0.3430008590221405,
0.20707982778549194,
-0.026437943801283836,
-0.018562331795692444,
-0.20064225792884827,
-0.07355038821697235,
0.2997162342071533,
0.15677449107170105,
0.2876434624195099,
0.05523938313126564,
0.26819321513175964,
0.21057802438735962,
0.7750531435012817,
0.411039799451828,
-0.142795592546463,
0.4108359217643738,
0.09807069599628448,
-0.0665932297706604,
0.1418498456478119,
-0.45682579278945923,
0.053185928612947464,
0.0878208577632904,
0.2652167081832886,
0.17365090548992157,
-0.11302373558282852,
-0.01358151063323021,
-0.1446095108985901,
-0.14007538557052612,
-0.44882890582084656,
-0.2586406469345093,
0.11188245564699173,
-0.24775490164756775,
0.5019528269767761,
0.03937100991606712,
0.02825552225112915,
-0.40111929178237915,
-0.2987891435623169,
0.04371330887079239,
-0.13466309010982513,
0.16008922457695007,
-0.08500471711158752,
0.31991279125213623,
-0.4315066635608673,
-0.26094338297843933,
0.43255120515823364,
0.5315391421318054,
0.46023938059806824,
-0.04408445581793785,
0.2140747606754303,
0.028620555996894836,
0.043565113097429276,
0.3916592597961426,
-0.22875425219535828,
0.19572824239730835,
0.19390302896499634,
0.01256762444972992,
-0.24091771245002747,
0.09946148097515106,
-0.4506723880767822,
0.025902394205331802,
0.25222620368003845,
0.1966547667980194,
-0.18241968750953674,
0.08292170614004135,
0.2392498105764389,
-0.1913161277770996,
-0.21682266891002655,
-0.1717543601989746,
-0.39225369691848755,
-0.10345545411109924,
0.1337931603193283,
0.07086595147848129,
-0.18482853472232819,
0.3278144299983978,
0.11644149571657181,
0.342713862657547,
0.08105510473251343,
-0.0545407310128212,
0.16056688129901886,
0.05254757031798363,
-0.01575085148215294,
0.0007019324693828821,
0.007516112178564072,
0.010559940710663795,
-0.09696702659130096,
0.18034350872039795,
0.07531304657459259,
-0.03905167058110237,
-0.34069371223449707,
-0.011494278907775879,
0.15536409616470337,
0.5570813417434692,
0.04207290709018707,
-0.02593844383955002,
0.007409453392028809,
0.034868840128183365,
0.04519204422831535,
-0.09717246145009995,
0.11417903751134872,
0.6543457508087158,
-0.16234049201011658,
-0.27443814277648926,
-0.3511200249195099,
0.5985898971557617,
0.13912764191627502,
-0.04412321001291275,
-0.16028441488742828,
0.3554716110229492,
-0.10967910289764404,
0.25734227895736694,
0.4078996479511261,
0.9862609505653381,
0.007694359868764877,
0.0063674189150333405,
0.39518845081329346,
0.31465816497802734,
0.6596641540527344,
0.15788505971431732,
0.24318650364875793,
-0.4803037643432617,
0.09305132925510406,
-0.04703328013420105,
-0.18435949087142944,
-0.04330245405435562,
-0.1433940976858139,
-0.15192162990570068,
0.5336695909500122,
-0.1822415590286255,
-0.009078651666641235,
0.05950183421373367,
-0.09267590939998627,
0.14970780909061432,
-0.3648530840873718,
-0.22302734851837158,
0.09297718107700348,
-0.20578481256961823,
0.1314038187265396,
-0.1327211856842041,
-0.13585762679576874,
0.0986195057630539,
-0.3095800280570984,
-0.34879201650619507,
0.22004768252372742,
0.3045181930065155,
0.08683699369430542,
-0.06609047949314117,
-0.0008576363325119019,
0.17312267422676086,
-0.014482054859399796,
0.3831578493118286,
-0.030286084860563278,
-0.1866535246372223,
-0.022907815873622894,
0.07089830189943314,
-0.08817846328020096,
0.12048063427209854,
0.26675155758857727,
-0.14315979182720184,
-0.12799414992332458,
-0.03302855044603348,
0.11756809055805206,
-0.015954269096255302,
-0.2441243827342987,
-0.07702861726284027,
0.019763749092817307,
0.1707286387681961,
-0.007582947611808777,
0.05232098698616028,
-0.03471249341964722,
0.001345612108707428,
-0.03252091631293297,
0.07717994600534439,
0.06157306954264641,
-0.3198445439338684,
0.2046663463115692,
0.06109381094574928,
-0.1008354127407074,
0.26332250237464905,
0.3545151352882385,
0.18911096453666687,
0.07073409855365753,
0.43308785557746887,
0.013101283460855484,
-0.2483198046684265,
-0.0143438670784235,
-0.2957586348056793,
0.09108933806419373,
-0.3135703206062317,
0.01253296248614788,
0.14958462119102478,
0.25773537158966064,
0.04608439654111862,
0.3942517340183258,
0.09639424085617065,
0.054242029786109924,
0.011534485965967178,
-0.36254197359085083,
0.045456334948539734,
0.06286300718784332,
-0.24709562957286835,
-0.2727503478527069,
0.03838367015123367,
0.10211509466171265,
-0.13220781087875366,
0.3776409327983856,
-0.2192404568195343,
0.039075709879398346,
-0.3728846311569214,
0.35844144225120544,
-0.19263938069343567,
-0.08277415484189987,
0.25404924154281616,
0.19477248191833496,
0.03884517401456833,
0.3014283776283264,
-0.17670489847660065,
-0.07311214506626129,
-0.2100675404071808,
0.1635114699602127,
0.131047785282135,
-0.10002046823501587,
-0.14301860332489014,
-0.30092525482177734,
-0.23703059554100037,
-0.052840687334537506,
-0.5451622605323792,
0.09360519796609879,
-0.05051182955503464,
0.520359218120575,
-0.017581138759851456,
0.20935863256454468,
0.25861823558807373,
0.18822017312049866,
-0.08176857233047485,
0.34119850397109985,
-0.05027664452791214,
0.16446852684020996,
0.07339189201593399,
-0.16560477018356323,
-0.11883563548326492,
0.0411762110888958,
0.14328867197036743,
-0.018774263560771942,
0.2660481631755829,
-0.0018672943115234375,
0.3188212215900421,
-0.27431052923202515,
0.3269657790660858,
0.14027829468250275,
-0.039117589592933655,
-0.05687244236469269,
0.3071950376033783,
0.0340564027428627,
-0.1577090322971344,
-0.016701528802514076,
-0.3050072491168976,
0.1646965593099594,
-0.21073615550994873,
0.19125276803970337,
-0.19159555435180664,
-0.002443172037601471,
0.03654734045267105,
-0.2161625325679779,
-0.09616013616323471,
-0.24999292194843292,
-0.10512416064739227,
0.24062208831310272,
-0.15624243021011353,
0.09503792226314545,
0.3902392089366913,
0.10906349122524261,
0.1705680787563324,
0.27744680643081665,
-0.1277306079864502,
0.2209453582763672,
-0.36819395422935486,
-0.034156475216150284,
-0.11156680434942245,
-0.09622104465961456,
-0.4266491234302521,
0.3289458751678467,
0.38531017303466797,
0.21805965900421143,
-0.2089061737060547,
0.6197127103805542,
-0.24948330223560333,
0.00036229798570275307,
-0.40049099922180176,
0.4326595366001129,
0.1480339765548706,
-0.050917524844408035,
-0.22886553406715393,
-0.1270180642604828,
-0.24224290251731873,
0.024107087403535843,
-0.04773251339793205,
0.13675794005393982,
0.4916256070137024,
0.4510844945907593,
-0.05057959258556366,
-0.2604433000087738,
-0.325043261051178,
0.5483905673027039,
0.25604408979415894,
-0.30599743127822876,
-0.003351869061589241,
0.11297968775033951,
0.0017464086413383484,
-0.09002324938774109,
0.3348162770271301,
0.26296135783195496,
0.405659556388855,
-0.25611457228660583,
-0.238925963640213,
0.0008822474628686905,
0.0525389090180397,
0.04795173555612564,
0.2962495982646942,
0.31554943323135376,
0.36833032965660095,
0.14111332595348358,
-0.00894164852797985,
-0.04641850292682648,
0.16426098346710205,
-0.09952113032341003,
0.5115293264389038,
0.08945316076278687,
0.8424600958824158,
-0.07010891288518906,
0.22005915641784668,
-0.06431044638156891,
0.04334903880953789,
-0.4138906002044678,
0.22941142320632935,
-0.022455528378486633,
0.4532648026943207,
0.12200076133012772,
-0.049754466861486435,
0.03110409528017044,
-0.010385680943727493,
0.5032487511634827,
0.38426315784454346,
-0.16034820675849915,
-0.621765673160553,
-0.07053357362747192,
-0.18336811661720276,
0.08251985162496567,
-0.07315419614315033,
0.19359715282917023,
-0.013689536601305008,
0.060120515525341034,
-0.15868768095970154,
0.145727276802063,
-0.13828261196613312,
-0.12189584970474243,
-0.21103745698928833,
0.20931188762187958,
-0.2460126131772995,
-0.22010590136051178,
-0.2454259842634201,
-0.4443534016609192,
0.03820156306028366,
-0.027673518285155296,
-0.03580089285969734,
-0.22917623817920685,
0.026704393327236176,
-0.11504746973514557,
-0.2235095053911209,
0.08587853610515594,
0.5075316429138184,
0.25991854071617126,
0.387149453163147,
0.32450735569000244,
0.1401471197605133,
-0.20348915457725525,
0.05189768970012665,
-0.13275696337223053,
0.08784419298171997,
0.0638764351606369,
-0.3981200158596039,
0.17984355986118317,
-0.16468027234077454,
0.06775622814893723,
-0.5098584890365601,
0.3263382017612457,
-0.1633460819721222,
-0.1433933973312378,
-0.38051286339759827,
0.11970483511686325,
0.08513375371694565,
-0.01699117198586464,
-0.10535413771867752,
0.040198490023612976,
-0.03190305829048157,
0.3425038754940033,
-0.45043373107910156,
-0.007497800514101982,
0.6227501630783081,
-0.589815080165863,
-0.36556658148765564,
0.1650717854499817,
0.2566821575164795,
0.009977422654628754,
-0.17307309806346893,
-0.8751227259635925,
-0.12246393412351608,
0.3599115014076233,
0.10913854837417603,
-0.17431150376796722,
-0.13046738505363464,
-0.23086634278297424,
-0.030323036015033722,
0.03191153332591057,
-0.03290720283985138,
-0.0787346139550209,
-0.14700359106063843,
0.3145705461502075,
-0.09690705686807632
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.