html_url
stringlengths 51
51
| title
stringlengths 6
280
| comments
stringlengths 67
24.7k
| body
stringlengths 51
36.2k
| __index_level_0__
int64 1
1.17k
| comment_length
int64 16
1.45k
| text
stringlengths 190
38.3k
| embeddings
sequence |
---|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/3455 | Easier information editing | Hi ! I guess you are talking about the dataset cards that are in this repository on github ?
I think github allows to submit a PR even for 1 line though the `Edit file` button on the page of the dataset card.
Maybe let's mention this in `CONTRIBUTING.md` ? | **Is your feature request related to a problem? Please describe.**
It requires a lot of effort to improve a datasheet.
**Describe the solution you'd like**
UI or at least a link to the place where the code that needs to be edited is (and an easy way to edit this code directly from the site, without cloning, branching, makefile etc.)
**Describe alternatives you've considered**
The current Ux is to have the 8 steps for contribution while One just wishes to change a line a type etc.
| 1,044 | 50 | Easier information editing
**Is your feature request related to a problem? Please describe.**
It requires a lot of effort to improve a datasheet.
**Describe the solution you'd like**
UI or at least a link to the place where the code that needs to be edited is (and an easy way to edit this code directly from the site, without cloning, branching, makefile etc.)
**Describe alternatives you've considered**
The current Ux is to have the 8 steps for contribution while One just wishes to change a line a type etc.
Hi ! I guess you are talking about the dataset cards that are in this repository on github ?
I think github allows to submit a PR even for 1 line though the `Edit file` button on the page of the dataset card.
Maybe let's mention this in `CONTRIBUTING.md` ? | [
-1.270799160003662,
-1.032551646232605,
-0.864984929561615,
1.381093978881836,
-0.2250024825334549,
-1.3370503187179565,
0.12643757462501526,
-1.1519490480422974,
1.8320688009262085,
-0.7764866948127747,
0.2940022945404053,
-1.6415001153945923,
0.03281133249402046,
-0.6142187118530273,
-0.8827831745147705,
-0.8842887282371521,
-0.48499763011932373,
-0.8282646536827087,
0.9200553297996521,
2.4929652214050293,
0.9855765104293823,
-1.4783012866973877,
2.713374137878418,
0.7792958617210388,
-0.1840018630027771,
-0.9719650745391846,
0.3901488780975342,
0.10208117216825485,
-1.142946720123291,
-0.5416818261146545,
-0.9344304800033569,
-0.025132767856121063,
-0.5242749452590942,
-0.5130945444107056,
-0.0038848454132676125,
0.3618791401386261,
-0.21437066793441772,
-0.4821692407131195,
-0.5934041142463684,
-0.6923027038574219,
0.49332550168037415,
-0.4708711504936218,
0.9238340854644775,
-0.5204753875732422,
1.8386536836624146,
-0.5187612175941467,
0.3894898295402527,
0.796558678150177,
1.466338038444519,
0.21695061028003693,
0.011534157209098339,
0.39578187465667725,
0.44657543301582336,
-0.10894384235143661,
0.31149202585220337,
1.0883939266204834,
0.6131066679954529,
0.6277014017105103,
0.7933626770973206,
-2.1369004249572754,
1.483156681060791,
-1.1643924713134766,
0.34494051337242126,
1.4056063890457153,
-0.9665310978889465,
0.48598113656044006,
-1.7351738214492798,
-0.005387094337493181,
0.5626062154769897,
-2.388214111328125,
0.2557657063007355,
-1.2209694385528564,
-0.649381697177887,
0.8454115986824036,
0.2626578211784363,
-1.2836099863052368,
0.1660221964120865,
-0.5042985677719116,
0.9637660980224609,
0.47863897681236267,
1.108953595161438,
-1.7149487733840942,
-0.017300985753536224,
-0.31024548411369324,
-0.031156588345766068,
-1.3897130489349365,
-1.4249132871627808,
0.6506830453872681,
0.5195640921592712,
0.5993573665618896,
-0.11772724241018295,
0.943906843662262,
-0.9842804074287415,
0.9431651830673218,
-0.9103000164031982,
-1.555869698524475,
-1.405755639076233,
-2.1677277088165283,
-2.253875732421875,
0.9494649767875671,
-0.47812598943710327,
-0.5840126276016235,
1.9941376447677612,
-0.9801321029663086,
-1.6776350736618042,
1.2126426696777344,
0.20526176691055298,
0.07749348878860474,
2.3828558921813965,
0.16124239563941956,
-0.6237050890922546,
0.45390957593917847,
-0.6782113313674927,
0.9570199847221375,
-0.6294477581977844,
1.4435906410217285,
0.4030511677265167,
-1.016602873802185,
1.5593687295913696,
-0.4014631509780884,
0.5337729454040527,
-0.6061252951622009,
-0.6321869492530823,
-1.0197722911834717,
0.5489388704299927,
1.8169633150100708,
-0.2458907812833786,
1.5615144968032837,
-0.42390385270118713,
-1.5218007564544678,
-1.7279620170593262,
1.0065670013427734,
0.5456615090370178,
-0.877515435218811,
0.08377998322248459,
-0.28337955474853516,
0.08219736814498901,
-0.039713047444820404,
1.1323802471160889,
1.2566521167755127,
0.7032805681228638,
-0.31696176528930664,
-0.9177259802818298,
0.15573202073574066,
-0.15687456727027893,
-0.7326058745384216,
-1.8618987798690796,
-0.46499690413475037,
0.1695227026939392,
0.559968888759613,
-1.227988362312317,
1.5854296684265137,
0.9602654576301575,
1.9215139150619507,
1.0263372659683228,
-0.257498174905777,
1.4605329036712646,
-0.04123041778802872,
1.841415524482727,
-0.6122122406959534,
0.767378032207489,
-0.3487633168697357,
-0.992843747138977,
0.7776299118995667,
-0.35472574830055237,
-2.034047842025757,
-0.8285589218139648,
-0.9016161561012268,
-0.27806970477104187,
-0.6986567378044128,
0.9648013710975647,
-0.3354247212409973,
-1.2709486484527588,
0.2806449234485626,
-0.6131831407546997,
0.12273652851581573,
-1.241789698600769,
0.37934011220932007,
0.7736503481864929,
-0.6457304954528809,
-0.045490168035030365,
-0.22282736003398895,
-1.286461353302002,
-0.5147010087966919,
0.18615904450416565,
1.9524182081222534,
-0.8436321020126343,
0.908566415309906,
0.8898290991783142,
-0.7929391264915466,
-0.09327799826860428,
0.3940148949623108,
-0.2266383022069931,
0.7906515002250671,
-1.0264829397201538,
-0.2770165503025055,
1.1238902807235718,
-0.20057711005210876,
-0.49980565905570984,
1.5568077564239502,
0.6665863990783691,
-0.9368845820426941,
-0.1398342102766037,
-0.2983274459838867,
-0.9312724471092224,
-0.054071810096502304,
-1.5099272727966309,
-0.09238830953836441,
0.12282052636146545,
-1.4904272556304932,
-0.5426103472709656,
-0.31569111347198486,
1.1724640130996704,
-0.16821719706058502,
1.2352712154388428,
-0.29921942949295044,
-0.39333271980285645,
-0.48715534806251526,
-0.357904851436615,
0.17998106777668,
-0.2556518316268921,
-0.6896387934684753,
0.22284799814224243,
-0.7342613339424133,
0.4418889582157135,
1.4525829553604126,
0.40198975801467896,
0.03710717707872391,
0.5814264416694641,
1.0172734260559082,
0.29267072677612305,
-0.0003242483362555504,
-0.8045670986175537,
-1.493518352508545,
1.94248366355896,
-1.529131293296814,
1.913041353225708,
0.7710273265838623,
-0.07508958876132965,
-1.784356951713562,
-1.814704179763794,
1.3735284805297852,
1.289846420288086,
2.2373573780059814,
0.5873721241950989,
0.3063255548477173,
-0.8878929615020752,
-0.6799801588058472,
0.2109186053276062,
-1.174538016319275,
-0.7466640472412109,
-0.05809354409575462,
2.3035054206848145,
1.8403993844985962,
-0.6275733113288879,
-0.23263019323349,
-1.1232399940490723,
1.4662518501281738,
-0.06818776577711105,
0.20537246763706207,
1.9349366426467896,
-0.3819476366043091,
-1.1458951234817505,
1.2161997556686401,
-2.313795566558838,
0.006650893017649651,
1.9907320737838745,
0.3679904639720917,
0.06410608440637589,
-1.4362024068832397,
-0.5618305206298828,
-0.2336626499891281,
-0.3203186094760895,
-1.2727667093276978,
0.5410380959510803,
-0.3018355667591095,
-0.7182634472846985,
-1.5401439666748047,
0.1826997697353363,
-1.1475021839141846,
-1.4996564388275146,
0.34410205483436584,
1.9019933938980103,
1.9598926305770874,
-0.5808225274085999,
1.5377758741378784,
-0.1980089247226715,
0.20568108558654785,
1.2242052555084229,
1.0787642002105713,
3.100715160369873,
1.9212392568588257,
-1.1363427639007568,
0.5366069674491882,
-0.11469714343547821,
-0.437269002199173,
1.0643011331558228,
-1.0334978103637695,
1.3070049285888672,
-0.07215763628482819,
-0.9909631609916687,
-1.2409976720809937,
0.8390970826148987,
0.4946151077747345,
0.04974307864904404,
-0.5189470648765564,
1.2155849933624268,
0.04800406098365784,
1.3207675218582153,
0.44864708185195923,
-0.40448543429374695,
0.5996325612068176,
-0.4753728210926056,
-0.5559372305870056,
1.6408054828643799,
0.38650137186050415,
-1.3794081211090088,
-2.2874069213867188,
-0.1928630918264389,
-0.7263519763946533,
0.11437840014696121,
-0.5891281366348267,
-0.907306969165802,
1.7278697490692139,
0.45788320899009705,
-1.3005406856536865,
-0.2784501314163208,
-0.3493090867996216,
-0.7192658185958862,
2.6473264694213867,
-1.490504264831543,
-0.29456502199172974,
-0.8254210948944092,
-0.5449427962303162,
1.6977568864822388,
-1.2848453521728516,
-0.18406572937965393,
-1.013950228691101,
-0.5175941586494446,
-1.2830984592437744,
-0.520643949508667,
-0.17201317846775055,
-0.9309176802635193,
0.8509652614593506,
0.20596404373645782,
-1.0989919900894165,
-0.3081878423690796,
-0.8136328458786011,
0.7143443822860718,
-0.025794237852096558,
0.33913883566856384,
1.9247186183929443,
0.4154888391494751,
-0.34719333052635193,
0.7160360217094421,
1.1520963907241821,
0.5972503423690796,
-0.6594790816307068,
0.2428554743528366,
-0.6358546018600464,
0.33224159479141235,
-1.212839126586914,
0.30679377913475037,
-2.9121201038360596,
0.6407366991043091,
-0.08880258351564407,
-0.1593519151210785,
0.031209200620651245,
-1.309305191040039,
1.17214035987854,
2.578010082244873,
-1.1442458629608154,
0.43882644176483154,
0.23861056566238403,
1.1980913877487183,
-1.6358927488327026,
0.4491026997566223,
-0.36255723237991333,
2.200547218322754,
0.20905070006847382,
1.1085978746414185,
-0.6271339654922485,
-2.2225594520568848,
0.5386199355125427,
-1.124531865119934,
-1.2980977296829224,
0.5540696978569031,
-0.8218398094177246,
-0.019178209826350212,
-1.5653668642044067,
-0.2077033966779709,
-0.8803474307060242,
-1.2920899391174316,
0.8210455179214478,
0.17401573061943054,
0.43183884024620056,
-0.6865541934967041,
0.2459316998720169,
-2.209047555923462,
-1.4078189134597778,
-0.22772906720638275,
-0.8395990133285522,
0.5491952300071716,
-0.31240376830101013,
0.717972993850708,
-0.11334973573684692,
0.13562695682048798,
0.22863657772541046,
1.4118472337722778,
3.355597496032715,
0.17157238721847534,
0.5131785869598389,
-0.21012355387210846,
-0.8300503492355347,
1.365060567855835,
0.982758104801178,
0.09001483023166656,
-0.5896546840667725,
-1.0128417015075684,
1.2795027494430542,
1.928987741470337,
0.8564912676811218,
0.16072341799736023,
-0.6850221157073975,
-0.5115665793418884,
-0.023023223504424095,
0.2396724373102188,
0.42978423833847046,
0.9864423871040344,
0.007549225352704525,
0.11318273842334747,
1.4954924583435059,
1.3390923738479614,
-0.5287145376205444,
0.45987606048583984,
-0.7291639447212219,
-0.4756237268447876,
0.4373339116573334,
0.46850305795669556,
-0.05900165066123009,
0.24625451862812042,
-0.9184879064559937,
-0.231821209192276,
-0.30149751901626587,
-0.9723259210586548,
-0.7377001643180847,
-0.4282591640949249,
-0.44728583097457886,
1.724355936050415,
0.11500710994005203,
-0.5445838570594788,
-0.10959581285715103,
-0.7465516924858093,
-0.0698929950594902,
-1.06984281539917,
0.24823682010173798,
-0.039272841066122055,
-0.13159358501434326,
-0.04904552176594734,
1.8895699977874756,
-0.9389787316322327,
-2.0906996726989746,
0.29552191495895386,
0.2844540774822235,
-0.3931425213813782,
0.18526196479797363,
1.5468790531158447,
0.45326220989227295,
1.574481725692749,
1.3949757814407349,
0.9398574829101562,
-0.6662760972976685,
-1.3349759578704834,
0.6250926852226257,
0.847459077835083,
-1.3799569606781006,
0.6768481135368347,
0.15714465081691742,
-0.5246407985687256,
0.735481321811676,
1.2714425325393677,
0.39967185258865356,
-2.0038719177246094,
0.8792961835861206,
-0.8982758522033691,
0.8479843139648438,
0.7235808372497559,
0.633010983467102,
0.30944231152534485,
0.8920875191688538,
-1.224602222442627,
-1.2113970518112183,
-1.001420497894287,
-0.6817535161972046,
2.132551431655884,
-0.26684728264808655,
0.6087353825569153,
-0.067316934466362,
-1.2598965167999268,
-0.12296812981367111,
0.7198353409767151,
0.5021461844444275,
-0.2590479552745819,
0.6960347890853882,
-0.7678691148757935,
-1.1758768558502197,
-1.5289959907531738,
-0.381534606218338,
-0.9830411076545715,
-0.8442440032958984,
1.0395324230194092,
0.9200260043144226,
0.19794325530529022,
1.955329179763794,
0.6198299527168274,
0.2855720818042755,
-2.6723568439483643,
0.8131462335586548,
0.3402438163757324,
0.0003439253196120262,
0.9137378334999084,
0.4357011616230011,
0.940679132938385,
0.04744496941566467,
0.46473684906959534,
-2.3609962463378906,
2.244464635848999,
-0.3409478962421417,
0.7362110614776611,
-0.10857874900102615,
-0.17127294838428497,
1.2562026977539062,
0.4977264702320099,
0.59004807472229,
-1.05255126953125,
0.6131793260574341,
-0.4934301972389221,
1.3302836418151855,
1.0554617643356323,
-0.7068789005279541,
-0.010244484059512615,
1.2218313217163086,
0.5685107707977295,
-0.47065338492393494,
-0.9311814904212952,
-0.9696539640426636,
0.8856651186943054,
1.8166859149932861,
-0.19024571776390076,
0.007308116182684898,
0.7561330199241638,
0.6837627291679382,
-1.3019447326660156,
0.18812502920627594,
-0.88081294298172,
-0.8211025595664978,
1.602831482887268,
2.049759864807129,
-0.11607571691274643,
-0.10743740946054459,
-0.6685206890106201,
-1.272773265838623,
0.7726758718490601,
0.08289404213428497,
0.09571737051010132,
0.6723101139068604,
-0.6570801734924316,
1.0329669713974,
0.9441959857940674,
0.9008340835571289,
0.16588246822357178,
0.43043461441993713,
0.47137513756752014,
-0.2720189392566681,
-1.0326801538467407,
-0.2004595845937729,
-1.2310999631881714,
-2.4444215297698975,
0.4485033452510834,
-0.29810649156570435,
-1.3729087114334106,
-0.07782704383134842,
-1.0434151887893677,
0.9918704628944397,
-0.45115533471107483,
-1.1399351358413696,
-1.6004993915557861,
0.08106125891208649,
-0.0443069189786911,
0.9701059460639954,
-1.5776150226593018,
-0.09872603416442871,
1.2138351202011108,
0.7834866046905518,
-0.7404249310493469,
1.0628057718276978,
0.27415257692337036,
1.03946053981781,
0.8367865681648254,
-0.547685980796814,
0.3414774537086487,
0.023602955043315887,
-1.4070426225662231,
0.5677692890167236,
1.1312769651412964,
0.1943667232990265,
1.3663601875305176,
-0.6354508399963379,
0.04501448571681976,
0.40715306997299194,
-0.5096279978752136,
-0.25406840443611145,
-0.5608454942703247,
0.7377228736877441,
0.010482258163392544,
-0.9235605597496033,
0.1533012092113495,
-0.11537516117095947,
-0.3312496244907379,
0.15317639708518982,
-1.45607590675354,
-0.32086649537086487,
-0.42175915837287903,
-0.5088731050491333,
-1.1826006174087524,
-0.03031804785132408,
1.3302160501480103,
-0.6252070069313049,
-0.12247782945632935,
0.5747452974319458,
0.5940139889717102,
0.5687441229820251,
0.6866805553436279,
-0.6887499690055847,
-0.3841422498226166,
-0.25633561611175537,
-0.3001921772956848,
0.2831367552280426,
1.2701866626739502,
-0.27181339263916016,
-1.052878737449646,
0.7004867196083069,
-0.35697054862976074,
-0.019531507045030594,
1.9046952724456787,
0.09821484237909317,
-0.7797409892082214,
0.31268683075904846,
-0.7681385278701782,
1.952615737915039,
1.7000383138656616,
1.337098479270935,
-0.02675856277346611,
-0.8755829334259033,
0.5906417965888977,
-0.1820347011089325,
-0.3114089071750641,
0.9570456743240356,
0.5946836471557617,
-0.1759638786315918,
-1.476932406425476,
0.588159441947937,
1.2785964012145996,
-0.8959640860557556,
-0.8960795402526855,
0.04128214344382286,
-0.7307702898979187,
1.0787127017974854,
0.7596713304519653,
0.5949596762657166,
0.2453259378671646,
1.7715641260147095,
0.638062596321106,
-0.4958849847316742,
0.5271922945976257,
0.5324380397796631,
-0.20940549671649933,
-2.198591947555542,
-1.2456979751586914,
0.231440007686615,
-0.4623173475265503,
-1.4782801866531372,
1.4052716493606567,
-1.0745235681533813,
-0.838140606880188,
0.444312185049057,
0.11551501601934433,
1.5419447422027588,
0.35071536898612976,
1.5267659425735474,
2.083092451095581,
0.8541561365127563,
0.3467576503753662,
1.4684422016143799,
-0.1765136867761612,
-0.517433226108551,
1.9229118824005127,
-0.47087958455085754,
0.4543655812740326,
1.0682271718978882,
-0.3329145610332489,
-1.0661708116531372,
-0.7055345177650452,
-1.1044598817825317,
-0.6113826036453247,
1.062883973121643,
0.07190287858247757,
-1.143579125404358,
0.19330565631389618,
1.5271018743515015,
0.21359582245349884,
-0.4169752895832062,
0.39879411458969116,
0.5019508600234985,
-0.7348527312278748,
-0.0833774283528328,
-1.0073692798614502,
0.516434371471405,
-0.21291625499725342,
-0.3026658594608307,
0.3854564130306244,
0.42758721113204956,
1.1995848417282104,
-0.1332010179758072,
0.11523552238941193,
1.0892069339752197,
-1.5150411128997803,
1.4425983428955078,
-0.5467068552970886,
0.19875197112560272,
-2.428698778152466,
1.6022945642471313,
-0.635067880153656,
1.9427090883255005,
-2.676633834838867,
0.37138015031814575,
-0.7033753991127014,
-0.4204373061656952,
0.5318626165390015,
-0.3067876398563385,
0.23066574335098267,
-0.2282201647758484,
-1.205514669418335,
0.05287419259548187,
-0.6967929005622864,
0.45747312903404236,
1.0684118270874023,
1.2295773029327393,
-1.0762392282485962,
-0.22446119785308838,
-1.7182804346084595,
-0.11998879164457321,
-0.6770216822624207,
0.3720008432865143,
-2.1391990184783936,
-0.20909947156906128,
-1.8223257064819336,
-2.1461496353149414,
-1.3671261072158813,
-0.7989974617958069,
1.0538973808288574,
0.1266888827085495,
-0.9502966403961182,
1.1389858722686768,
-0.3913344144821167,
-1.8445676565170288,
1.0919302701950073,
-2.120330810546875
] |
https://github.com/huggingface/datasets/issues/3455 | Easier information editing | We now host all the datasets on the HF Hub, where you can easily edit them through UI (for single file changes) or Git workflow (for single/multiple file changes) | **Is your feature request related to a problem? Please describe.**
It requires a lot of effort to improve a datasheet.
**Describe the solution you'd like**
UI or at least a link to the place where the code that needs to be edited is (and an easy way to edit this code directly from the site, without cloning, branching, makefile etc.)
**Describe alternatives you've considered**
The current Ux is to have the 8 steps for contribution while One just wishes to change a line a type etc.
| 1,044 | 29 | Easier information editing
**Is your feature request related to a problem? Please describe.**
It requires a lot of effort to improve a datasheet.
**Describe the solution you'd like**
UI or at least a link to the place where the code that needs to be edited is (and an easy way to edit this code directly from the site, without cloning, branching, makefile etc.)
**Describe alternatives you've considered**
The current Ux is to have the 8 steps for contribution while One just wishes to change a line a type etc.
We now host all the datasets on the HF Hub, where you can easily edit them through UI (for single file changes) or Git workflow (for single/multiple file changes) | [
-1.327440619468689,
-1.0607659816741943,
-0.8132966756820679,
1.4227197170257568,
-0.23397600650787354,
-1.3496266603469849,
0.07851427793502808,
-1.130832314491272,
1.7561346292495728,
-0.7367553114891052,
0.31071221828460693,
-1.6398271322250366,
0.039102476090192795,
-0.5657334923744202,
-0.8767326474189758,
-0.8758536577224731,
-0.46474847197532654,
-0.8842584490776062,
0.9671894907951355,
2.556927442550659,
1.062699317932129,
-1.4565913677215576,
2.770409345626831,
0.7739126682281494,
-0.1976953148841858,
-0.9918828010559082,
0.39539822936058044,
0.08355382084846497,
-1.175976276397705,
-0.6416131258010864,
-0.9890699982643127,
-0.030076494440436363,
-0.5823356509208679,
-0.46858078241348267,
0.05579749494791031,
0.31341248750686646,
-0.17643648386001587,
-0.3725976347923279,
-0.6151629686355591,
-0.6744216084480286,
0.5397786498069763,
-0.47805237770080566,
0.8410345315933228,
-0.5057193636894226,
1.8313254117965698,
-0.5759299993515015,
0.36946460604667664,
0.6843241453170776,
1.6058603525161743,
0.2651219666004181,
-0.07910192012786865,
0.5194839835166931,
0.4254319965839386,
-0.10879166424274445,
0.3160313367843628,
1.092157244682312,
0.579612672328949,
0.6252241134643555,
0.7225871682167053,
-2.0855348110198975,
1.492930293083191,
-1.2712310552597046,
0.2692800760269165,
1.3924150466918945,
-0.9198988080024719,
0.5055394768714905,
-1.7095381021499634,
0.018636254593729973,
0.5483021140098572,
-2.456037998199463,
0.2020280659198761,
-1.1403703689575195,
-0.6188356876373291,
0.9136492609977722,
0.26437199115753174,
-1.3785933256149292,
0.17691591382026672,
-0.5566257834434509,
0.9870656132698059,
0.3820943534374237,
1.093337893486023,
-1.7405515909194946,
-0.0560513399541378,
-0.3424072861671448,
-0.11409218609333038,
-1.3752080202102661,
-1.4491642713546753,
0.628508985042572,
0.47999534010887146,
0.6149203181266785,
-0.06784860789775848,
0.9767937660217285,
-1.0375441312789917,
0.9218422174453735,
-0.933249294757843,
-1.5233235359191895,
-1.4291962385177612,
-2.221334218978882,
-2.184023141860962,
0.9365391731262207,
-0.48187026381492615,
-0.6565513610839844,
1.9351806640625,
-1.0373176336288452,
-1.6554664373397827,
1.1981816291809082,
0.22457286715507507,
0.048499058932065964,
2.489717721939087,
0.16199472546577454,
-0.5933184623718262,
0.5084357261657715,
-0.6636395454406738,
1.0270578861236572,
-0.6836966276168823,
1.4835975170135498,
0.3694332242012024,
-1.0098543167114258,
1.5524293184280396,
-0.4135768413543701,
0.4869723916053772,
-0.592262864112854,
-0.659861147403717,
-1.0748792886734009,
0.5855392813682556,
1.9201127290725708,
-0.24901744723320007,
1.6011587381362915,
-0.3487243950366974,
-1.454088568687439,
-1.6821348667144775,
0.9418041110038757,
0.5247044563293457,
-0.9509972333908081,
0.07439173758029938,
-0.2709687054157257,
0.07600144296884537,
0.05999762564897537,
1.046966791152954,
1.2279497385025024,
0.6204196214675903,
-0.30517807602882385,
-0.9761285781860352,
0.15987321734428406,
-0.17989793419837952,
-0.7509422302246094,
-1.836272120475769,
-0.43725037574768066,
0.08144522458314896,
0.5932514667510986,
-1.3139970302581787,
1.5481293201446533,
0.9465306997299194,
1.9451398849487305,
1.0384974479675293,
-0.26705777645111084,
1.3752180337905884,
-0.04280915483832359,
1.8000895977020264,
-0.6795350313186646,
0.8063826560974121,
-0.3845944404602051,
-1.0406510829925537,
0.7797864675521851,
-0.44915956258773804,
-2.0569651126861572,
-0.7995044589042664,
-0.7865196466445923,
-0.3008718192577362,
-0.733009397983551,
0.9834635853767395,
-0.3558328151702881,
-1.2920361757278442,
0.2660835385322571,
-0.6998364925384521,
0.16249743103981018,
-1.2391499280929565,
0.33207154273986816,
0.7703023552894592,
-0.6062817573547363,
-0.12040412425994873,
-0.24918484687805176,
-1.3008896112442017,
-0.5518786311149597,
0.137467622756958,
1.928125023841858,
-0.8203164339065552,
0.9423415064811707,
0.8640491366386414,
-0.73676997423172,
-0.09345600754022598,
0.3725714683532715,
-0.1775546371936798,
0.8735222816467285,
-1.0122485160827637,
-0.36172518134117126,
1.1903655529022217,
-0.15895643830299377,
-0.5075337886810303,
1.5248173475265503,
0.6014078855514526,
-1.0014197826385498,
-0.1555657684803009,
-0.29986971616744995,
-0.9205778241157532,
-0.01543085090816021,
-1.5407830476760864,
-0.06897038966417313,
0.1509130299091339,
-1.495377540588379,
-0.47989752888679504,
-0.20754852890968323,
1.2005252838134766,
-0.13235533237457275,
1.2423882484436035,
-0.34715938568115234,
-0.43567466735839844,
-0.4422776997089386,
-0.36136767268180847,
0.21013161540031433,
-0.23321309685707092,
-0.5600531697273254,
0.26210322976112366,
-0.8278540968894958,
0.49005240201950073,
1.452168583869934,
0.41008251905441284,
0.0899733453989029,
0.5854143500328064,
0.9682841300964355,
0.29825359582901,
-0.09696652740240097,
-0.8121436834335327,
-1.5290504693984985,
1.9581164121627808,
-1.4473729133605957,
1.9058849811553955,
0.8645245432853699,
-0.050814732909202576,
-1.7695319652557373,
-1.795215368270874,
1.3290263414382935,
1.3696609735488892,
2.2087016105651855,
0.5985538959503174,
0.2709234952926636,
-0.896337628364563,
-0.7202367186546326,
0.2560189366340637,
-1.1853896379470825,
-0.7225586771965027,
-0.09038854390382767,
2.34273099899292,
1.8739560842514038,
-0.5394322872161865,
-0.1988954246044159,
-1.096323013305664,
1.391241431236267,
-0.10453725606203079,
0.16941502690315247,
1.927078366279602,
-0.3794998526573181,
-1.152230143547058,
1.2245872020721436,
-2.2493462562561035,
0.048712026327848434,
1.9841067790985107,
0.4360973834991455,
0.05168537050485611,
-1.426364779472351,
-0.6048008799552917,
-0.17867478728294373,
-0.27968716621398926,
-1.2612894773483276,
0.5024363398551941,
-0.31926780939102173,
-0.7559539675712585,
-1.534158706665039,
0.08120937645435333,
-1.1443842649459839,
-1.4783251285552979,
0.4387156069278717,
1.9079022407531738,
2.012300491333008,
-0.5392850041389465,
1.4867597818374634,
-0.196427583694458,
0.18051880598068237,
1.182892918586731,
1.0624455213546753,
2.993088722229004,
1.8425865173339844,
-1.1273378133773804,
0.5545846819877625,
-0.1330198049545288,
-0.43048346042633057,
1.1066220998764038,
-1.0793362855911255,
1.3355287313461304,
-0.07485261559486389,
-1.0498584508895874,
-1.251128077507019,
0.9369375705718994,
0.43325868248939514,
0.002120381221175194,
-0.5479021668434143,
1.203343152999878,
0.0326651893556118,
1.2933604717254639,
0.4258435368537903,
-0.38319018483161926,
0.6005811095237732,
-0.4262382984161377,
-0.5954676866531372,
1.6247990131378174,
0.39868587255477905,
-1.3668450117111206,
-2.3505923748016357,
-0.11265364289283752,
-0.6804172396659851,
0.17681479454040527,
-0.5986491441726685,
-0.9170608520507812,
1.7627352476119995,
0.39128419756889343,
-1.287178635597229,
-0.32860612869262695,
-0.36721089482307434,
-0.6822212338447571,
2.685011148452759,
-1.5113732814788818,
-0.2532033622264862,
-0.899634063243866,
-0.4574883282184601,
1.6047126054763794,
-1.3053277730941772,
-0.14045903086662292,
-1.042537808418274,
-0.5871604084968567,
-1.1837209463119507,
-0.44716453552246094,
-0.15553969144821167,
-0.970241129398346,
0.8039337396621704,
0.16859471797943115,
-1.1178861856460571,
-0.3450060784816742,
-0.749211311340332,
0.7169735431671143,
-0.015665747225284576,
0.2646811902523041,
1.9001803398132324,
0.39489537477493286,
-0.34423524141311646,
0.7778428792953491,
1.2063552141189575,
0.628726065158844,
-0.6477934718132019,
0.1688583493232727,
-0.6194497346878052,
0.3840760886669159,
-1.2368346452713013,
0.31478846073150635,
-2.88427472114563,
0.5871920585632324,
-0.1039663627743721,
-0.1293359398841858,
0.022272523492574692,
-1.3064781427383423,
1.1557999849319458,
2.5499320030212402,
-1.119695782661438,
0.46784475445747375,
0.25234419107437134,
1.159105896949768,
-1.6263835430145264,
0.49520453810691833,
-0.42093896865844727,
2.1718509197235107,
0.22057291865348816,
1.034469485282898,
-0.7313715219497681,
-2.180163621902466,
0.5721111297607422,
-1.1539599895477295,
-1.2258435487747192,
0.47841066122055054,
-0.8587090373039246,
0.023970412090420723,
-1.625394582748413,
-0.13467004895210266,
-0.9171763062477112,
-1.2995984554290771,
0.787054181098938,
0.1649743914604187,
0.38031354546546936,
-0.6063351631164551,
0.2515057921409607,
-2.234551429748535,
-1.4210366010665894,
-0.17490437626838684,
-0.8444938659667969,
0.5528635382652283,
-0.4249955713748932,
0.7063338756561279,
-0.14473915100097656,
0.15251508355140686,
0.2564498484134674,
1.410257339477539,
3.3509912490844727,
0.15042954683303833,
0.49968335032463074,
-0.22168099880218506,
-0.814847469329834,
1.322288990020752,
0.9813849925994873,
0.06682748347520828,
-0.7163739204406738,
-0.9448804259300232,
1.33266282081604,
1.9593082666397095,
0.8963270783424377,
0.18173855543136597,
-0.7524547576904297,
-0.5035271048545837,
-0.026682492345571518,
0.27493247389793396,
0.41412967443466187,
0.9842385053634644,
0.03327890858054161,
0.09895598143339157,
1.471320629119873,
1.3393052816390991,
-0.5698922276496887,
0.44283416867256165,
-0.6586628556251526,
-0.44370797276496887,
0.38951632380485535,
0.4791332483291626,
0.022174200043082237,
0.3404444456100464,
-0.8218985199928284,
-0.2527823746204376,
-0.34350913763046265,
-1.0290039777755737,
-0.7686700820922852,
-0.4215044379234314,
-0.5214945077896118,
1.7326221466064453,
0.16454115509986877,
-0.5123960971832275,
-0.15874534845352173,
-0.7407974004745483,
-0.0594392828643322,
-1.0767688751220703,
0.27202579379081726,
0.033222656697034836,
-0.13109488785266876,
-0.05801893770694733,
1.8372502326965332,
-0.9403308629989624,
-2.1308298110961914,
0.2986259460449219,
0.28830501437187195,
-0.34621670842170715,
0.11179123818874359,
1.5351264476776123,
0.5069184303283691,
1.5477919578552246,
1.3753215074539185,
0.8523339033126831,
-0.6611872911453247,
-1.3672693967819214,
0.6050559878349304,
0.914804995059967,
-1.4227970838546753,
0.7913042306900024,
0.1420852243900299,
-0.5447850227355957,
0.7011609673500061,
1.3133870363235474,
0.4111170172691345,
-1.9591084718704224,
0.9023786187171936,
-0.9090157151222229,
0.9500374794006348,
0.7127136588096619,
0.6231145858764648,
0.3188299834728241,
0.8140391111373901,
-1.2667832374572754,
-1.2089080810546875,
-1.0114281177520752,
-0.6421483755111694,
2.14042329788208,
-0.27924811840057373,
0.6874425411224365,
-0.09934703260660172,
-1.2200932502746582,
-0.09949754923582077,
0.7083790898323059,
0.5046566128730774,
-0.24165120720863342,
0.7229772806167603,
-0.7027682065963745,
-1.1559100151062012,
-1.4967083930969238,
-0.4182012379169464,
-0.9322213530540466,
-0.8272330164909363,
1.1259888410568237,
0.9185276627540588,
0.1918887495994568,
1.9714826345443726,
0.6327012181282043,
0.26516538858413696,
-2.624295234680176,
0.8368874192237854,
0.32537588477134705,
0.01096075028181076,
0.9372831583023071,
0.39018580317497253,
0.893921434879303,
0.09141222387552261,
0.4552110433578491,
-2.2898690700531006,
2.229978322982788,
-0.28793054819107056,
0.7276588082313538,
-0.021985244005918503,
-0.0995829701423645,
1.326715111732483,
0.4979730546474457,
0.5710082650184631,
-1.0042048692703247,
0.5995364189147949,
-0.46986672282218933,
1.3396291732788086,
1.0660626888275146,
-0.6504294276237488,
0.0013980604708194733,
1.2327369451522827,
0.5730907917022705,
-0.4731384813785553,
-0.9728847146034241,
-0.8628218770027161,
0.8989149332046509,
1.84639310836792,
-0.12400951981544495,
-0.0010670693591237068,
0.7535536885261536,
0.7150804400444031,
-1.2519890069961548,
0.17817747592926025,
-0.8112570643424988,
-0.8088861107826233,
1.6216254234313965,
2.072554111480713,
-0.09998837113380432,
-0.1213715672492981,
-0.6288207173347473,
-1.2816170454025269,
0.7979481220245361,
0.041489921510219574,
0.2160191833972931,
0.6083475351333618,
-0.6114318370819092,
1.1042850017547607,
0.9219978451728821,
0.9075005650520325,
0.0790887400507927,
0.39392879605293274,
0.44166210293769836,
-0.2505219578742981,
-1.0291087627410889,
-0.2019568383693695,
-1.246335506439209,
-2.4870195388793945,
0.4370962381362915,
-0.2848178446292877,
-1.4384530782699585,
-0.05975911021232605,
-1.054350733757019,
0.995685338973999,
-0.4293369650840759,
-1.1203229427337646,
-1.6633028984069824,
0.06949944794178009,
-0.07597444951534271,
0.9748729467391968,
-1.6283522844314575,
-0.054830506443977356,
1.1714400053024292,
0.7997157573699951,
-0.6779403686523438,
1.0403989553451538,
0.2507941424846649,
1.0269865989685059,
0.8244871497154236,
-0.4854511618614197,
0.39304304122924805,
0.07341285794973373,
-1.3445909023284912,
0.5737097859382629,
1.1629992723464966,
0.17044979333877563,
1.2947447299957275,
-0.5832957625389099,
0.07050539553165436,
0.4229860007762909,
-0.5295543074607849,
-0.22537046670913696,
-0.5197533965110779,
0.7314954996109009,
0.0815863385796547,
-0.9176409840583801,
0.057468995451927185,
-0.13422393798828125,
-0.3439316153526306,
0.1420026421546936,
-1.4604771137237549,
-0.34953778982162476,
-0.4882877469062805,
-0.48615536093711853,
-1.2132515907287598,
-0.12985187768936157,
1.3427720069885254,
-0.6086755990982056,
-0.12054017931222916,
0.584236741065979,
0.5798582434654236,
0.5832822918891907,
0.7236882448196411,
-0.6692474484443665,
-0.3615920841693878,
-0.1551002860069275,
-0.3377113938331604,
0.34687063097953796,
1.2318402528762817,
-0.2587335705757141,
-0.9739909768104553,
0.7060153484344482,
-0.2738827168941498,
0.020828280597925186,
1.9317550659179688,
0.0806758776307106,
-0.809995710849762,
0.3745497465133667,
-0.7752620577812195,
1.8819328546524048,
1.6228567361831665,
1.2895102500915527,
-0.005546830594539642,
-0.8972408175468445,
0.5832363963127136,
-0.05533641576766968,
-0.33930474519729614,
0.8971729874610901,
0.5241643190383911,
-0.19796210527420044,
-1.5210418701171875,
0.5887802243232727,
1.2129186391830444,
-0.8672571778297424,
-0.896863579750061,
0.021652063354849815,
-0.7894415259361267,
1.0823489427566528,
0.6416536569595337,
0.5583662390708923,
0.25376173853874207,
1.7731438875198364,
0.6130040287971497,
-0.49515828490257263,
0.47700709104537964,
0.510195791721344,
-0.26291805505752563,
-2.2127864360809326,
-1.2239469289779663,
0.2649683654308319,
-0.4766152501106262,
-1.4828706979751587,
1.3338226079940796,
-1.137191653251648,
-0.7812685370445251,
0.4878818690776825,
0.17043492197990417,
1.5525535345077515,
0.3518575131893158,
1.654171109199524,
2.145782947540283,
0.9034285545349121,
0.2785719037055969,
1.5088508129119873,
-0.07361850887537003,
-0.45276883244514465,
1.8784068822860718,
-0.4164038598537445,
0.47475364804267883,
1.0033879280090332,
-0.36305198073387146,
-1.127483606338501,
-0.642636775970459,
-1.1205819845199585,
-0.672512412071228,
1.0379306077957153,
0.1628628373146057,
-1.1300835609436035,
0.1364409625530243,
1.5469428300857544,
0.24814844131469727,
-0.2898816168308258,
0.335641473531723,
0.5188332796096802,
-0.7255000472068787,
-0.11748600006103516,
-0.9591646790504456,
0.4464420676231384,
-0.13872277736663818,
-0.34247025847435,
0.2949344217777252,
0.48659446835517883,
1.1432039737701416,
-0.11434649676084518,
0.12921345233917236,
1.0123220682144165,
-1.5965452194213867,
1.4485057592391968,
-0.46287277340888977,
0.15177962183952332,
-2.4080774784088135,
1.5936012268066406,
-0.6391333937644958,
1.8918207883834839,
-2.6885762214660645,
0.44866588711738586,
-0.765945315361023,
-0.4951227307319641,
0.4929787814617157,
-0.3001241683959961,
0.2746233344078064,
-0.18595850467681885,
-1.2080069780349731,
0.07333510369062424,
-0.7022296786308289,
0.45775318145751953,
1.16327965259552,
1.210389494895935,
-1.065690040588379,
-0.2577168047428131,
-1.7570871114730835,
-0.14651170372962952,
-0.6595171689987183,
0.3696507513523102,
-2.171544075012207,
-0.23796886205673218,
-1.8368046283721924,
-2.0278584957122803,
-1.4581149816513062,
-0.8142264485359192,
1.0740283727645874,
0.14890378713607788,
-0.9721241593360901,
1.1062461137771606,
-0.44782784581184387,
-1.7825183868408203,
1.0940121412277222,
-2.2177159786224365
] |
https://github.com/huggingface/datasets/issues/3452 | why the stratify option is omitted from test_train_split function? | Hi ! It's simply not added yet :)
If someone wants to contribute to add the `stratify` parameter I'd be happy to give some pointers.
In the meantime, I guess you can use `sklearn` or other tools to do a stratified train/test split over the **indices** of your dataset and then do
```
train_dataset = dataset.select(train_indices)
test_dataset = dataset.select(test_indices)
``` | why the stratify option is omitted from test_train_split function?
is there any other way implement the stratify option while splitting the dataset? as it is important point to be considered while splitting the dataset. | 1,045 | 60 | why the stratify option is omitted from test_train_split function?
why the stratify option is omitted from test_train_split function?
is there any other way implement the stratify option while splitting the dataset? as it is important point to be considered while splitting the dataset.
Hi ! It's simply not added yet :)
If someone wants to contribute to add the `stratify` parameter I'd be happy to give some pointers.
In the meantime, I guess you can use `sklearn` or other tools to do a stratified train/test split over the **indices** of your dataset and then do
```
train_dataset = dataset.select(train_indices)
test_dataset = dataset.select(test_indices)
``` | [
-1.16575026512146,
-0.9775976538658142,
-0.702508807182312,
1.6107115745544434,
-0.19170857965946198,
-1.3233402967453003,
0.08666108548641205,
-1.0572830438613892,
1.6961183547973633,
-0.8715006113052368,
0.4174593687057495,
-1.6822686195373535,
0.030100801959633827,
-0.6381219029426575,
-0.769726037979126,
-0.866636335849762,
-0.5183834433555603,
-0.8530076146125793,
1.027500867843628,
2.440964937210083,
1.1620193719863892,
-1.4132766723632812,
2.631084442138672,
0.5600379109382629,
-0.13793839514255524,
-1.0790507793426514,
0.4709780216217041,
0.05436602234840393,
-1.2204777002334595,
-0.49666959047317505,
-0.9719833731651306,
-0.09956354647874832,
-0.5985910892486572,
-0.4541672170162201,
0.06140024960041046,
0.4643259048461914,
-0.23545826971530914,
-0.32898181676864624,
-0.46177777647972107,
-0.8353263139724731,
0.5390283465385437,
-0.4474497437477112,
0.9662055373191833,
-0.3957836925983429,
1.804003119468689,
-0.5004839897155762,
0.482013463973999,
0.7433387041091919,
1.4188408851623535,
0.1051313728094101,
-0.1471206545829773,
0.294467031955719,
0.3453173339366913,
-0.006076405756175518,
0.4127197265625,
1.0310747623443604,
0.511215329170227,
0.6848061680793762,
0.6080144047737122,
-2.2598116397857666,
1.3601824045181274,
-1.0703623294830322,
0.34215569496154785,
1.2936240434646606,
-1.0521842241287231,
0.38608571887016296,
-1.763197660446167,
-0.13206975162029266,
0.5505626797676086,
-2.2163360118865967,
0.2280004769563675,
-1.1691447496414185,
-0.4502102732658386,
1.0293090343475342,
0.3804665803909302,
-1.2632343769073486,
0.1481746882200241,
-0.43211400508880615,
1.0530004501342773,
0.40271449089050293,
0.9720167517662048,
-1.7873495817184448,
0.02468886412680149,
-0.3417241871356964,
0.0666058361530304,
-1.4026281833648682,
-1.4037843942642212,
0.6824418902397156,
0.6953406929969788,
0.5433691143989563,
-0.15565191209316254,
1.068261981010437,
-0.9230169653892517,
0.7388439178466797,
-1.0674527883529663,
-1.644248366355896,
-1.362880825996399,
-2.1651902198791504,
-2.2005372047424316,
0.7267758250236511,
-0.44061344861984253,
-0.6465088129043579,
2.1458280086517334,
-1.0051252841949463,
-1.697312831878662,
1.1074321269989014,
0.13940413296222687,
-0.0330885611474514,
2.330928087234497,
0.18061265349388123,
-0.6742029190063477,
0.3453514873981476,
-0.6972156763076782,
0.8242059350013733,
-0.3791773319244385,
1.3455690145492554,
0.3856775760650635,
-1.1562546491622925,
1.704902172088623,
-0.21911297738552094,
0.588894784450531,
-0.6339185237884521,
-0.672744631767273,
-0.8361081480979919,
0.24037466943264008,
1.9596357345581055,
-0.25515303015708923,
1.562482237815857,
-0.32154062390327454,
-1.5044214725494385,
-1.7112793922424316,
0.9480305314064026,
0.49143388867378235,
-0.7757231593132019,
0.05331483483314514,
-0.3023110330104828,
0.2869018018245697,
-0.11444957554340363,
1.2276300191879272,
1.2344597578048706,
0.7539829015731812,
-0.2907640337944031,
-0.8216103315353394,
0.22170843183994293,
0.011354750022292137,
-0.6569434404373169,
-1.7990810871124268,
-0.453169584274292,
0.1296815276145935,
0.645444929599762,
-1.0694537162780762,
1.7804169654846191,
0.962639331817627,
1.8939789533615112,
1.0622755289077759,
-0.16865506768226624,
1.3660227060317993,
-0.03807077556848526,
1.86024010181427,
-0.4386197626590729,
0.6075081825256348,
-0.2906734049320221,
-1.05037522315979,
0.817536473274231,
-0.21280527114868164,
-2.016397476196289,
-0.790386438369751,
-0.9856535196304321,
-0.1140202060341835,
-0.6393371224403381,
0.944744348526001,
-0.39179879426956177,
-1.2660473585128784,
0.21640266478061676,
-0.6267257332801819,
0.21534663438796997,
-1.1601665019989014,
0.3493095338344574,
0.7509030699729919,
-0.6294862627983093,
0.01548096165060997,
-0.31095409393310547,
-1.3196789026260376,
-0.44733795523643494,
0.3621584475040436,
1.9799062013626099,
-0.7688766717910767,
0.8501355051994324,
0.9269535541534424,
-0.6863132119178772,
-0.14128202199935913,
0.30834540724754333,
-0.18879419565200806,
0.8631832599639893,
-1.0145634412765503,
-0.3516985774040222,
1.168578863143921,
-0.2541905641555786,
-0.7539321184158325,
1.5553032159805298,
0.6904347538948059,
-0.9858689308166504,
-0.16479964554309845,
-0.4288055896759033,
-0.8256363272666931,
0.04674193263053894,
-1.637552261352539,
-0.20131532847881317,
0.36865589022636414,
-1.5737264156341553,
-0.40178442001342773,
-0.1281629353761673,
1.3519670963287354,
-0.24660749733448029,
1.304099678993225,
-0.3095735013484955,
-0.4040662348270416,
-0.3557203412055969,
-0.5588929653167725,
0.07667246460914612,
-0.13675542175769806,
-0.6780602931976318,
0.07746924459934235,
-0.7087535262107849,
0.3750520348548889,
1.4529255628585815,
0.336701899766922,
-0.04435005784034729,
0.6663707494735718,
1.036755084991455,
0.33170604705810547,
-0.09658853709697723,
-0.894888699054718,
-1.5171458721160889,
1.9704773426055908,
-1.418510913848877,
1.9869840145111084,
0.6813690662384033,
-0.0540924072265625,
-1.744674563407898,
-1.744195580482483,
1.465802788734436,
1.2967960834503174,
2.176485300064087,
0.6090918779373169,
0.40102511644363403,
-0.8536595702171326,
-0.5852689743041992,
0.3665471076965332,
-1.1278294324874878,
-0.8103247880935669,
0.06395916640758514,
2.3612310886383057,
1.7925832271575928,
-0.5069319605827332,
-0.2128768265247345,
-1.0267456769943237,
1.3645403385162354,
-0.07499159127473831,
0.27172285318374634,
1.9523272514343262,
-0.38106825947761536,
-1.122139573097229,
1.1943318843841553,
-2.308563232421875,
0.08787493407726288,
2.065171718597412,
0.29841867089271545,
-0.005074382293969393,
-1.3848419189453125,
-0.4756115972995758,
-0.22788289189338684,
-0.3916921615600586,
-1.4258772134780884,
0.5240154266357422,
-0.3310033977031708,
-0.7061812281608582,
-1.4103672504425049,
0.2475803941488266,
-1.1180028915405273,
-1.5849019289016724,
0.281534343957901,
1.907761573791504,
1.9458684921264648,
-0.5528563857078552,
1.5392751693725586,
-0.4111042022705078,
0.30190014839172363,
1.1656510829925537,
1.2355948686599731,
3.1171047687530518,
2.0067367553710938,
-1.2251780033111572,
0.6784136295318604,
-0.1731136292219162,
-0.5124768018722534,
1.0827842950820923,
-1.102246880531311,
1.2044260501861572,
-0.137583926320076,
-1.2765941619873047,
-1.2716124057769775,
0.8892911672592163,
0.574074923992157,
0.10515022277832031,
-0.47343072295188904,
1.2831088304519653,
0.055781230330467224,
1.3224079608917236,
0.4438398480415344,
-0.461287260055542,
0.6491076946258545,
-0.43419021368026733,
-0.6024667620658875,
1.5904607772827148,
0.19502365589141846,
-1.4419111013412476,
-2.2892158031463623,
-0.24617570638656616,
-0.7939183115959167,
0.04499179869890213,
-0.5729187726974487,
-0.8682336211204529,
1.6918697357177734,
0.3783695697784424,
-1.3932214975357056,
-0.23484228551387787,
-0.3706342875957489,
-0.7109239101409912,
2.669649839401245,
-1.3198875188827515,
-0.20159147679805756,
-1.0148983001708984,
-0.6462184190750122,
1.734063982963562,
-1.3785511255264282,
-0.29388105869293213,
-0.9318309426307678,
-0.5197757482528687,
-1.3052016496658325,
-0.5973137617111206,
-0.06135198473930359,
-0.8850237131118774,
0.939750075340271,
0.052399955689907074,
-1.2240206003189087,
-0.324411004781723,
-0.8041113615036011,
0.7870988845825195,
-0.19799509644508362,
0.18704713881015778,
1.7947032451629639,
0.39499664306640625,
-0.4475615620613098,
0.6095186471939087,
1.1566983461380005,
0.6564457416534424,
-0.5337182283401489,
0.31813767552375793,
-0.5613706111907959,
0.29817014932632446,
-1.1450868844985962,
0.280505895614624,
-2.9944047927856445,
0.6997513771057129,
-0.014036302454769611,
0.09083780646324158,
0.018530363216996193,
-1.3469772338867188,
1.0487364530563354,
2.6393699645996094,
-1.2965013980865479,
0.458575576543808,
0.29337555170059204,
1.0679469108581543,
-1.5427515506744385,
0.32368847727775574,
-0.39621248841285706,
2.108668565750122,
0.2282130867242813,
1.1718767881393433,
-0.4341866970062256,
-2.171663999557495,
0.5687445402145386,
-1.2350841760635376,
-1.338269829750061,
0.765684187412262,
-0.8662123084068298,
0.011456498876214027,
-1.3555049896240234,
-0.11355625838041306,
-0.9477682709693909,
-1.217833161354065,
0.8553117513656616,
0.15395639836788177,
0.49511727690696716,
-0.6283658742904663,
0.2606984078884125,
-2.2006566524505615,
-1.4224586486816406,
-0.3273783028125763,
-0.9498733878135681,
0.43804794549942017,
-0.3723275661468506,
0.6529486179351807,
-0.20655500888824463,
0.15335842967033386,
0.3372669816017151,
1.5106329917907715,
3.319835901260376,
0.20351436734199524,
0.4684964716434479,
-0.21475370228290558,
-0.8778876662254333,
1.5254215002059937,
0.9304286241531372,
0.017157215625047684,
-0.4125624895095825,
-1.0383012294769287,
1.1662455797195435,
2.0117270946502686,
0.9037153720855713,
0.0076604243367910385,
-0.8140194416046143,
-0.572890043258667,
-0.08462748676538467,
0.15211953222751617,
0.5951229333877563,
0.9307175874710083,
0.03448628634214401,
0.07353705167770386,
1.2624263763427734,
1.2374271154403687,
-0.48434728384017944,
0.34585869312286377,
-0.7364562749862671,
-0.4781477749347687,
0.46927741169929504,
0.3612915277481079,
-0.08748997747898102,
0.3121279180049896,
-0.8739803433418274,
-0.25587791204452515,
-0.3094139099121094,
-1.0641744136810303,
-0.6850419044494629,
-0.4424554407596588,
-0.42471155524253845,
1.701835036277771,
0.0585249587893486,
-0.5049399137496948,
-0.06348816305398941,
-0.7828619480133057,
-0.08000855147838593,
-1.0599634647369385,
0.2903409004211426,
-0.1144079938530922,
-0.1708482801914215,
-0.02857936918735504,
1.7165555953979492,
-0.9964364171028137,
-2.12052845954895,
0.45256099104881287,
0.2859838902950287,
-0.34327295422554016,
0.23703953623771667,
1.6742241382598877,
0.4641055166721344,
1.5002119541168213,
1.4153414964675903,
1.0592162609100342,
-0.7395293116569519,
-1.3872005939483643,
0.6484534740447998,
0.833791971206665,
-1.4510568380355835,
0.771708071231842,
0.13155929744243622,
-0.4372899532318115,
0.6593915820121765,
1.1333110332489014,
0.6071202158927917,
-2.0543606281280518,
0.8279487490653992,
-0.8685176968574524,
0.7268355488777161,
0.7943784594535828,
0.6459420323371887,
0.2595900893211365,
0.8736568689346313,
-1.0463546514511108,
-1.189841628074646,
-0.8287637233734131,
-0.7164391279220581,
1.836624026298523,
-0.3396514654159546,
0.6267065405845642,
-0.06355007737874985,
-1.4142733812332153,
-0.1363546997308731,
0.7896137237548828,
0.39715421199798584,
-0.4554506242275238,
0.6957311630249023,
-0.6423816680908203,
-1.1156318187713623,
-1.5183154344558716,
-0.42339545488357544,
-1.0087616443634033,
-0.9523912668228149,
0.9917625188827515,
0.7849335074424744,
0.133126363158226,
1.9352275133132935,
0.6373805403709412,
0.2225431203842163,
-2.542600393295288,
0.9036598205566406,
0.3355166018009186,
-0.0457618311047554,
0.849513053894043,
0.44842037558555603,
0.8978601694107056,
-0.013585640117526054,
0.5762151479721069,
-2.3276164531707764,
2.387131690979004,
-0.24286101758480072,
0.6335159540176392,
-0.11233468353748322,
-0.19963152706623077,
1.178941011428833,
0.47442516684532166,
0.5886037945747375,
-1.1140058040618896,
0.6899992823600769,
-0.6112120151519775,
1.2120096683502197,
0.900304913520813,
-0.7329291105270386,
-0.011927369050681591,
1.361505150794983,
0.5533990859985352,
-0.5989719033241272,
-0.9314886331558228,
-0.9823316335678101,
0.9870187640190125,
1.6902574300765991,
-0.12451903522014618,
-0.1856587529182434,
0.8616149425506592,
0.7212561964988708,
-1.2816526889801025,
0.08585827797651291,
-0.7680976390838623,
-0.7558411955833435,
1.5061078071594238,
1.981364369392395,
-0.07782351970672607,
-0.17880913615226746,
-0.8308396935462952,
-1.1006845235824585,
0.7142041325569153,
0.1005210280418396,
-0.027647025883197784,
0.6662664413452148,
-0.5935002565383911,
1.1784491539001465,
0.941822350025177,
0.981173038482666,
0.2125166952610016,
0.44607600569725037,
0.3786889910697937,
-0.17935137450695038,
-1.188215732574463,
-0.19814245402812958,
-1.1057231426239014,
-2.5663726329803467,
0.4005639851093292,
-0.40648770332336426,
-1.2457094192504883,
-0.019742831587791443,
-1.1327224969863892,
0.8461493253707886,
-0.5211374163627625,
-1.1144726276397705,
-1.5756793022155762,
0.047521770000457764,
0.029981890693306923,
0.8774113059043884,
-1.4802311658859253,
-0.05344986915588379,
1.2030903100967407,
0.8861493468284607,
-0.9072111248970032,
0.9873940348625183,
0.2170400768518448,
1.1144863367080688,
0.7846112251281738,
-0.5464232563972473,
0.5346388816833496,
0.004981224425137043,
-1.3167815208435059,
0.5647987127304077,
0.9559051990509033,
0.1714133471250534,
1.3050023317337036,
-0.5111244916915894,
-0.019487053155899048,
0.5836600661277771,
-0.5312785506248474,
-0.4315985143184662,
-0.7000097632408142,
0.7870469093322754,
-0.028407372534275055,
-0.8041471838951111,
0.16797393560409546,
-0.06752009689807892,
-0.23824334144592285,
0.2353651225566864,
-1.5486541986465454,
-0.18910443782806396,
-0.2878814935684204,
-0.5476620197296143,
-1.3903864622116089,
-0.08366299420595169,
1.3880565166473389,
-0.745522141456604,
-0.21135970950126648,
0.5043144822120667,
0.44670161604881287,
0.6361925601959229,
0.6750594973564148,
-0.7023946642875671,
-0.29089146852493286,
-0.26420196890830994,
-0.2486322522163391,
0.3719082176685333,
1.368340015411377,
-0.144391268491745,
-1.0474801063537598,
0.8080690503120422,
-0.286032110452652,
-0.012894856743514538,
1.9514230489730835,
0.05805298686027527,
-0.7695397734642029,
0.2499275952577591,
-0.727814257144928,
1.9312187433242798,
1.6311277151107788,
1.3254891633987427,
-0.12077338993549347,
-0.8816784620285034,
0.8086484670639038,
-0.2512516677379608,
-0.4013254642486572,
0.8943405747413635,
0.5094862580299377,
-0.19656707346439362,
-1.3863751888275146,
0.7122529745101929,
1.2169493436813354,
-0.726488471031189,
-1.0185151100158691,
0.013021375983953476,
-0.7611995339393616,
0.972351610660553,
0.6342870593070984,
0.45716214179992676,
0.31792712211608887,
1.679710865020752,
0.6560809016227722,
-0.4246394634246826,
0.5487202405929565,
0.5936650633811951,
-0.23318763077259064,
-2.177499771118164,
-1.2159607410430908,
0.3713867962360382,
-0.5234397053718567,
-1.683907151222229,
1.4460197687149048,
-1.1834272146224976,
-0.8978827595710754,
0.5262984037399292,
0.0976245254278183,
1.6040104627609253,
0.30661627650260925,
1.5264393091201782,
2.023665189743042,
0.9092721343040466,
0.45569339394569397,
1.5001028776168823,
-0.2046286016702652,
-0.5458824634552002,
1.9140833616256714,
-0.5779480338096619,
0.378846675157547,
1.2003263235092163,
-0.2486182600259781,
-1.0560964345932007,
-0.7350883483886719,
-1.143781304359436,
-0.7444788217544556,
1.2077274322509766,
0.11653753370046616,
-1.218271017074585,
0.1783009171485901,
1.4881788492202759,
0.21044202148914337,
-0.2678823173046112,
0.5210709571838379,
0.2892915904521942,
-0.7627968192100525,
-0.02317046746611595,
-0.8954908847808838,
0.6464221477508545,
-0.37936073541641235,
-0.34531113505363464,
0.38375124335289,
0.36772048473358154,
1.1991558074951172,
0.003958946093916893,
0.20544268190860748,
1.1279819011688232,
-1.3508713245391846,
1.384331464767456,
-0.5441856384277344,
0.3033759891986847,
-2.4025940895080566,
1.446681261062622,
-0.6894869804382324,
1.9848413467407227,
-2.6519994735717773,
0.338675856590271,
-0.7131587266921997,
-0.4511950612068176,
0.5024219155311584,
-0.3131043612957001,
0.08180712163448334,
-0.20886386930942535,
-1.1468514204025269,
-0.0069342246279120445,
-0.6448246836662292,
0.6596114039421082,
1.0738338232040405,
1.3447989225387573,
-1.039869785308838,
-0.3328915238380432,
-1.8429651260375977,
-0.1298818439245224,
-0.6650587916374207,
0.4132106900215149,
-2.162306070327759,
-0.14706175029277802,
-2.0096561908721924,
-2.3458878993988037,
-1.2245222330093384,
-0.7533015608787537,
1.0740680694580078,
0.12342853099107742,
-0.8079453110694885,
1.205445408821106,
-0.2568810284137726,
-1.8349902629852295,
1.1398553848266602,
-2.0343551635742188
] |
https://github.com/huggingface/datasets/issues/3452 | why the stratify option is omitted from test_train_split function? | Hi @lhoestq I would like to add `stratify` parameter, can you give me some pointers for adding the same ? | why the stratify option is omitted from test_train_split function?
is there any other way implement the stratify option while splitting the dataset? as it is important point to be considered while splitting the dataset. | 1,045 | 20 | why the stratify option is omitted from test_train_split function?
why the stratify option is omitted from test_train_split function?
is there any other way implement the stratify option while splitting the dataset? as it is important point to be considered while splitting the dataset.
Hi @lhoestq I would like to add `stratify` parameter, can you give me some pointers for adding the same ? | [
-1.2678985595703125,
-0.9528375864028931,
-0.7261689305305481,
1.6399744749069214,
-0.22290074825286865,
-1.2515684366226196,
0.10661201924085617,
-1.0665814876556396,
1.5532091856002808,
-1.0315991640090942,
0.4868909418582916,
-1.6381680965423584,
-0.09640081971883774,
-0.5357003808021545,
-0.7910084128379822,
-0.8286505341529846,
-0.4688419699668884,
-0.9487512111663818,
1.1073611974716187,
2.4379539489746094,
1.095029592514038,
-1.3486896753311157,
2.655318021774292,
0.5715601444244385,
-0.22410312294960022,
-0.9751648902893066,
0.3748054504394531,
-0.058089107275009155,
-1.2651525735855103,
-0.5436327457427979,
-1.2400654554367065,
-0.06065743416547775,
-0.5609259009361267,
-0.3915635645389557,
-0.04470796883106232,
0.40547212958335876,
-0.16263578832149506,
-0.39731118083000183,
-0.5062530040740967,
-0.8233082294464111,
0.5047417879104614,
-0.35775548219680786,
1.0199044942855835,
-0.2878384590148926,
1.8418265581130981,
-0.4073270857334137,
0.5332694053649902,
0.7920625805854797,
1.3600798845291138,
0.13582204282283783,
-0.04624446481466293,
0.14130881428718567,
0.4046092927455902,
-0.18635614216327667,
0.49300405383110046,
1.0174806118011475,
0.43438562750816345,
0.8016390800476074,
0.5903371572494507,
-2.2128167152404785,
1.4818637371063232,
-1.166961669921875,
0.19202357530593872,
1.4155954122543335,
-1.0895098447799683,
0.4315645098686218,
-1.7584209442138672,
-0.05456378310918808,
0.4080621302127838,
-2.127868413925171,
0.2811490595340729,
-0.986046314239502,
-0.4815886318683624,
0.896080493927002,
0.4220653176307678,
-1.4342278242111206,
0.048440150916576385,
-0.35135123133659363,
0.9741432666778564,
0.32615265250205994,
0.9813361167907715,
-1.7840195894241333,
0.12155605852603912,
-0.43893006443977356,
0.19789856672286987,
-1.2998931407928467,
-1.4072281122207642,
0.5550177097320557,
0.6286413669586182,
0.3790128529071808,
-0.2855195105075836,
1.0619598627090454,
-0.9209223389625549,
0.8400573134422302,
-0.9212715029716492,
-1.4959474802017212,
-1.359227180480957,
-2.1877119541168213,
-2.170680046081543,
0.6652421355247498,
-0.46749892830848694,
-0.8005086779594421,
2.0773119926452637,
-1.1685547828674316,
-1.6324406862258911,
1.1503750085830688,
0.009023001417517662,
0.11919304728507996,
2.4241278171539307,
0.22852177917957306,
-0.6371383666992188,
0.27567169070243835,
-0.7928521633148193,
0.8868430256843567,
-0.5188527703285217,
1.2100616693496704,
0.3724687993526459,
-1.098116159439087,
1.732482671737671,
-0.19383113086223602,
0.5858315825462341,
-0.5214793682098389,
-0.7531401515007019,
-0.8198634386062622,
0.13704858720302582,
1.8494436740875244,
-0.22125239670276642,
1.552492618560791,
-0.5203718543052673,
-1.4788281917572021,
-1.7098702192306519,
1.0060659646987915,
0.5007927417755127,
-0.7943673133850098,
0.19640734791755676,
-0.23855672776699066,
0.23237372934818268,
-0.16255225241184235,
1.113097906112671,
1.4022541046142578,
0.8725211024284363,
-0.29757434129714966,
-0.8417037129402161,
0.16328147053718567,
0.05230791121721268,
-0.7409271001815796,
-1.6611319780349731,
-0.3916566073894501,
0.033605776727199554,
0.700861930847168,
-1.1224851608276367,
1.7686973810195923,
1.0553010702133179,
1.797037959098816,
1.0015486478805542,
-0.2298431694507599,
1.3264906406402588,
-0.06160328537225723,
1.7465239763259888,
-0.4791458547115326,
0.5097882151603699,
-0.3474551737308502,
-1.154731273651123,
0.7667458057403564,
-0.10164541006088257,
-1.9158830642700195,
-0.7983896732330322,
-0.9124391674995422,
-0.14557328820228577,
-0.6876484751701355,
0.9465467929840088,
-0.43652570247650146,
-1.2330974340438843,
0.21515823900699615,
-0.4647577404975891,
0.16330327093601227,
-1.173893690109253,
0.4796542525291443,
0.6560295820236206,
-0.6621671319007874,
-0.060496389865875244,
-0.23767173290252686,
-1.2780402898788452,
-0.3495978116989136,
0.23931275308132172,
1.9500240087509155,
-0.7304918169975281,
0.8160500526428223,
0.8344098329544067,
-0.6776981353759766,
-0.2941909432411194,
0.3198809325695038,
-0.20960021018981934,
0.8433793187141418,
-0.9492843747138977,
-0.3842245042324066,
1.2754350900650024,
-0.16353701055049896,
-0.6777419447898865,
1.5014339685440063,
0.6229887008666992,
-0.9521560072898865,
-0.22561979293823242,
-0.4097102880477905,
-0.7795749306678772,
-0.028202511370182037,
-1.6191729307174683,
-0.23250818252563477,
0.21401973068714142,
-1.5898278951644897,
-0.3288975954055786,
-0.10259267687797546,
1.3702185153961182,
-0.2277897149324417,
1.3222229480743408,
-0.25302231311798096,
-0.3327040672302246,
-0.3834129869937897,
-0.5086566805839539,
0.1737445443868637,
-0.10290259122848511,
-0.6163353323936462,
0.10609544068574905,
-0.6625358462333679,
0.28265050053596497,
1.5403231382369995,
0.33019062876701355,
-0.03903916850686073,
0.6055018901824951,
0.9454749822616577,
0.40771183371543884,
0.022088857367634773,
-1.0091910362243652,
-1.4193793535232544,
1.9779466390609741,
-1.4544776678085327,
2.0357110500335693,
0.7795121073722839,
-0.061138033866882324,
-1.7544431686401367,
-1.7071819305419922,
1.3983347415924072,
1.4285818338394165,
2.1249873638153076,
0.6513679623603821,
0.40393567085266113,
-0.7563921809196472,
-0.5126197934150696,
0.3901740610599518,
-1.2059425115585327,
-0.8296119570732117,
0.12167137861251831,
2.364793539047241,
1.6150076389312744,
-0.47688987851142883,
-0.3134710490703583,
-1.0933743715286255,
1.2660934925079346,
0.06944536417722702,
0.20342491567134857,
1.8089269399642944,
-0.46710970997810364,
-1.1940542459487915,
1.107351303100586,
-2.3012876510620117,
0.16481001675128937,
2.0082755088806152,
0.3728070557117462,
0.01498749665915966,
-1.338813066482544,
-0.5197126269340515,
-0.0632849708199501,
-0.4740638732910156,
-1.3786325454711914,
0.6915539503097534,
-0.36957642436027527,
-0.7006092667579651,
-1.4184190034866333,
0.1492358148097992,
-1.044184923171997,
-1.560336709022522,
0.3342394530773163,
1.8515446186065674,
1.9631153345108032,
-0.6644728183746338,
1.5639902353286743,
-0.38199853897094727,
0.21585020422935486,
1.1554534435272217,
1.1792794466018677,
3.0877504348754883,
2.0196568965911865,
-1.2999155521392822,
0.7197193503379822,
-0.13542279601097107,
-0.5025855898857117,
0.9968900680541992,
-1.084700345993042,
1.2197160720825195,
-0.023753546178340912,
-1.1404212713241577,
-1.1609116792678833,
0.8418738842010498,
0.5295420289039612,
0.03001767210662365,
-0.411452978849411,
1.4205090999603271,
0.20302222669124603,
1.4459608793258667,
0.41462844610214233,
-0.42706263065338135,
0.6352792382240295,
-0.4358779191970825,
-0.569988489151001,
1.6318211555480957,
0.19482570886611938,
-1.345273733139038,
-2.2737457752227783,
-0.21380630135536194,
-0.6699509024620056,
0.14343182742595673,
-0.557689905166626,
-0.828460156917572,
1.7324955463409424,
0.39959749579429626,
-1.3954310417175293,
-0.28332868218421936,
-0.5670724511146545,
-0.6688171625137329,
2.5923712253570557,
-1.482092022895813,
-0.1539127081632614,
-0.9400777220726013,
-0.50712651014328,
1.6369264125823975,
-1.4536375999450684,
-0.2784024178981781,
-0.9279491901397705,
-0.4738348126411438,
-1.3654744625091553,
-0.6902701258659363,
-0.07849147170782089,
-0.8519651293754578,
0.7723779082298279,
0.171481654047966,
-1.186808705329895,
-0.4012163281440735,
-0.6124388575553894,
0.7862598896026611,
-0.11970186978578568,
0.3399101495742798,
1.7353047132492065,
0.4196275770664215,
-0.47243979573249817,
0.5408570766448975,
1.2807552814483643,
0.6363085508346558,
-0.46182048320770264,
0.2613559365272522,
-0.6076974868774414,
0.41281625628471375,
-1.0619581937789917,
0.13226938247680664,
-3.0262136459350586,
0.6991562247276306,
-0.10405059903860092,
0.009037939831614494,
-0.02948526293039322,
-1.4461426734924316,
1.1193349361419678,
2.588726758956909,
-1.2233686447143555,
0.37763068079948425,
0.28239405155181885,
0.9966471195220947,
-1.4981200695037842,
0.3784254789352417,
-0.4922962188720703,
2.0775835514068604,
0.341150164604187,
1.134719967842102,
-0.4131883978843689,
-2.217306137084961,
0.46561846137046814,
-1.2012265920639038,
-1.2580890655517578,
0.9033702611923218,
-0.8716670274734497,
-0.07275304943323135,
-1.2988609075546265,
-0.1198335736989975,
-0.9407309889793396,
-1.2304208278656006,
0.9220629334449768,
0.24295711517333984,
0.6473148465156555,
-0.7635043263435364,
0.3512570559978485,
-2.2751882076263428,
-1.3951693773269653,
-0.38294392824172974,
-0.863010585308075,
0.4472334086894989,
-0.4083469808101654,
0.6877326369285583,
-0.2746741771697998,
0.24610862135887146,
0.4003516435623169,
1.471030831336975,
3.2972819805145264,
0.18794399499893188,
0.5543684363365173,
-0.37475821375846863,
-0.9419022798538208,
1.5707621574401855,
1.0025920867919922,
0.03626658022403717,
-0.49501141905784607,
-0.8985267281532288,
1.144358515739441,
1.954207181930542,
0.8963517546653748,
0.040215276181697845,
-0.7544010281562805,
-0.481283038854599,
-0.07426022738218307,
0.21052807569503784,
0.47107723355293274,
1.12946617603302,
-0.018930789083242416,
0.1124037578701973,
1.2540428638458252,
1.159846544265747,
-0.5572215914726257,
0.3444060683250427,
-0.7136862874031067,
-0.4685628116130829,
0.4985238015651703,
0.4108463227748871,
-0.20847420394420624,
0.32536840438842773,
-0.767465353012085,
-0.34883376955986023,
-0.1777821183204651,
-1.0998576879501343,
-0.7533990740776062,
-0.34710705280303955,
-0.4164135158061981,
1.6895830631256104,
0.12654340267181396,
-0.5933696031570435,
-0.0671040415763855,
-0.7848215699195862,
-0.03362591937184334,
-1.2104815244674683,
0.18111544847488403,
-0.058344386518001556,
-0.015069840475916862,
0.04048321396112442,
1.872856855392456,
-1.03554105758667,
-2.0891597270965576,
0.545495331287384,
0.3558952212333679,
-0.26767951250076294,
0.1941288858652115,
1.758553147315979,
0.35809338092803955,
1.572891354560852,
1.3483408689498901,
1.03971529006958,
-0.6935914754867554,
-1.3367245197296143,
0.7019375562667847,
0.7806401252746582,
-1.5342656373977661,
0.7834343314170837,
0.1336040198802948,
-0.37682127952575684,
0.6280717849731445,
0.9981026649475098,
0.5866520404815674,
-2.0255184173583984,
0.8407918214797974,
-0.938261091709137,
0.7677502036094666,
0.7257105112075806,
0.7925592660903931,
0.16946013271808624,
0.9193386435508728,
-0.9690473079681396,
-1.1988551616668701,
-0.7638709545135498,
-0.6702762246131897,
1.9624255895614624,
-0.48510488867759705,
0.7511590719223022,
-0.04421243071556091,
-1.2551374435424805,
-0.11672614514827728,
0.8604892492294312,
0.1783429980278015,
-0.38604962825775146,
0.6449902653694153,
-0.6553110480308533,
-1.1062383651733398,
-1.5887125730514526,
-0.45867589116096497,
-0.998256504535675,
-0.9369636178016663,
1.0657262802124023,
0.8146587014198303,
0.09132742881774902,
2.0290775299072266,
0.4305749237537384,
0.2765617370605469,
-2.5761709213256836,
0.8594882488250732,
0.34301161766052246,
-0.065865658223629,
1.0392807722091675,
0.41008684039115906,
0.9030886292457581,
-0.0364069938659668,
0.5950775146484375,
-2.4082131385803223,
2.445152997970581,
-0.2073289155960083,
0.7039409279823303,
-0.20256274938583374,
-0.220478817820549,
1.2180124521255493,
0.5585615634918213,
0.660033643245697,
-1.2422977685928345,
0.6239822506904602,
-0.5737420916557312,
1.2076760530471802,
0.9792613387107849,
-0.7283369898796082,
-0.04824347794055939,
1.4282236099243164,
0.5637825727462769,
-0.5776661038398743,
-0.8571155071258545,
-0.9701523780822754,
0.9081940650939941,
1.6344914436340332,
-0.08558111637830734,
-0.046324871480464935,
0.7586187124252319,
0.7374992370605469,
-1.3311715126037598,
0.002553150989115238,
-0.8600946068763733,
-0.8838028907775879,
1.481886863708496,
2.083529233932495,
-0.126600444316864,
-0.17421138286590576,
-0.7629579305648804,
-1.0547598600387573,
0.73592209815979,
-0.027598194777965546,
0.1939782351255417,
0.6077799201011658,
-0.6178215742111206,
1.2018438577651978,
0.7180016040802002,
0.9837307929992676,
0.3242257535457611,
0.4239687919616699,
0.41267746686935425,
0.03332715481519699,
-1.0943970680236816,
-0.06219816952943802,
-1.1823198795318604,
-2.653843879699707,
0.4858890175819397,
-0.4080214500427246,
-1.316628098487854,
-0.039992108941078186,
-1.0374221801757812,
0.6463188529014587,
-0.40100225806236267,
-1.2285035848617554,
-1.5347778797149658,
-0.11468993127346039,
0.11241716146469116,
0.8843824863433838,
-1.505106806755066,
-0.057516343891620636,
1.2311985492706299,
1.0390514135360718,
-0.8894941210746765,
1.070681095123291,
0.23676900565624237,
1.194703221321106,
0.7584887146949768,
-0.538997232913971,
0.5208947062492371,
-0.11907103657722473,
-1.2493841648101807,
0.4946419894695282,
0.9777141213417053,
0.1841014176607132,
1.4377342462539673,
-0.45897671580314636,
0.01680765673518181,
0.6973523497581482,
-0.6267778873443604,
-0.6411333680152893,
-0.7086001634597778,
0.7276294827461243,
-0.07824356108903885,
-0.7718284130096436,
0.10169091820716858,
-0.14024370908737183,
-0.24370865523815155,
0.14132548868656158,
-1.466458797454834,
-0.265687495470047,
-0.4605674743652344,
-0.49490731954574585,
-1.5653611421585083,
-0.023121973499655724,
1.3819530010223389,
-0.7524317502975464,
-0.1432703137397766,
0.40887781977653503,
0.6093425750732422,
0.5544411540031433,
0.733934760093689,
-0.6857529282569885,
-0.38362258672714233,
-0.2407435029745102,
-0.2633471190929413,
0.47921016812324524,
1.4714868068695068,
-0.16634295880794525,
-1.1249028444290161,
0.6477877497673035,
-0.31413739919662476,
-0.006106183398514986,
1.9925024509429932,
0.020423216745257378,
-0.6574102640151978,
0.3373514711856842,
-0.7478291988372803,
1.8977601528167725,
1.4519219398498535,
1.354498028755188,
-0.0848018154501915,
-0.9140579700469971,
0.9531541466712952,
-0.23950456082820892,
-0.4621460735797882,
0.9515420794487,
0.4315643310546875,
-0.2985885739326477,
-1.4568930864334106,
0.5561488270759583,
1.186221718788147,
-0.7414200305938721,
-0.9765703678131104,
-0.14746320247650146,
-0.6509596705436707,
0.8644065856933594,
0.5680822134017944,
0.4371930956840515,
0.3956904411315918,
1.734835147857666,
0.6636026501655579,
-0.5769888162612915,
0.6634868383407593,
0.5772971510887146,
-0.20677076280117035,
-2.171513080596924,
-1.1334632635116577,
0.35011762380599976,
-0.5148857235908508,
-1.5720576047897339,
1.455459713935852,
-1.1570910215377808,
-1.156506896018982,
0.47383740544319153,
0.029800614342093468,
1.5552116632461548,
0.3960491418838501,
1.4828355312347412,
2.088203191757202,
0.8830133080482483,
0.41645902395248413,
1.531568169593811,
-0.31620514392852783,
-0.48692786693573,
1.9712306261062622,
-0.6654576063156128,
0.29445382952690125,
1.2372430562973022,
-0.10563577711582184,
-0.9711149334907532,
-0.7565490007400513,
-1.0510095357894897,
-0.8601284623146057,
1.305548071861267,
0.07667142897844315,
-1.116249918937683,
0.23769740760326385,
1.5456138849258423,
0.2414216697216034,
-0.34953126311302185,
0.47610554099082947,
0.3665562570095062,
-0.7088691592216492,
-0.043261028826236725,
-0.8791823387145996,
0.6058122515678406,
-0.4258502125740051,
-0.48126912117004395,
0.36211422085762024,
0.39528778195381165,
1.1224465370178223,
-0.09038213640451431,
0.2334573119878769,
1.0971721410751343,
-1.4721747636795044,
1.4860913753509521,
-0.5373886823654175,
0.21854105591773987,
-2.4958488941192627,
1.5269557237625122,
-0.5917630195617676,
2.035651206970215,
-2.74218487739563,
0.40302735567092896,
-0.5736984014511108,
-0.5534944534301758,
0.5627564191818237,
-0.2382287085056305,
0.11041535437107086,
-0.2826211452484131,
-0.9917539954185486,
-0.0700957328081131,
-0.6317755579948425,
0.6528711318969727,
0.9422048926353455,
1.2742234468460083,
-0.983722448348999,
-0.32625147700309753,
-1.6794483661651611,
-0.06583008915185928,
-0.6740091443061829,
0.3590751886367798,
-2.2423431873321533,
-0.24033282697200775,
-2.0917181968688965,
-2.2277863025665283,
-1.1883208751678467,
-0.5863330364227295,
1.109052300453186,
0.168962761759758,
-0.850924015045166,
1.0896567106246948,
-0.2707756757736206,
-2.0296518802642822,
1.107985258102417,
-2.00553035736084
] |
https://github.com/huggingface/datasets/issues/3452 | why the stratify option is omitted from test_train_split function? | Hi ! Sure :)
The `train_test_split` method is defined here:
https://github.com/huggingface/datasets/blob/dc62232fa1b3bcfe2fbddcb721f2d141f8908943/src/datasets/arrow_dataset.py#L3253-L3253
and inside `train_test_split ` we need to create the right `train_indices` and `test_indices` that are passed here to `.select()`:
https://github.com/huggingface/datasets/blob/dc62232fa1b3bcfe2fbddcb721f2d141f8908943/src/datasets/arrow_dataset.py#L3450-L3464
For example if your dataset is like
| | label |
|---:|--------:|
| 0 | 1 |
| 1 | 1 |
| 2 | 0 |
| 3 | 0 |
and the user passes `stratify=dataset["label"]`, then you should get indices that look like this
```
train_indices = [0, 2]
test_indices = [1, 3]
```
these indices will be passed to `.select` to return the stratified train and test splits :)
Feel free to îng me if you have any question ! | why the stratify option is omitted from test_train_split function?
is there any other way implement the stratify option while splitting the dataset? as it is important point to be considered while splitting the dataset. | 1,045 | 114 | why the stratify option is omitted from test_train_split function?
why the stratify option is omitted from test_train_split function?
is there any other way implement the stratify option while splitting the dataset? as it is important point to be considered while splitting the dataset.
Hi ! Sure :)
The `train_test_split` method is defined here:
https://github.com/huggingface/datasets/blob/dc62232fa1b3bcfe2fbddcb721f2d141f8908943/src/datasets/arrow_dataset.py#L3253-L3253
and inside `train_test_split ` we need to create the right `train_indices` and `test_indices` that are passed here to `.select()`:
https://github.com/huggingface/datasets/blob/dc62232fa1b3bcfe2fbddcb721f2d141f8908943/src/datasets/arrow_dataset.py#L3450-L3464
For example if your dataset is like
| | label |
|---:|--------:|
| 0 | 1 |
| 1 | 1 |
| 2 | 0 |
| 3 | 0 |
and the user passes `stratify=dataset["label"]`, then you should get indices that look like this
```
train_indices = [0, 2]
test_indices = [1, 3]
```
these indices will be passed to `.select` to return the stratified train and test splits :)
Feel free to îng me if you have any question ! | [
-1.127856731414795,
-0.8170427680015564,
-0.7949044704437256,
1.510657787322998,
-0.05451303720474243,
-1.2636194229125977,
0.10603076219558716,
-1.0488765239715576,
1.6394474506378174,
-0.848180890083313,
0.37198296189308167,
-1.694462776184082,
0.020922286435961723,
-0.6419022083282471,
-0.7330996990203857,
-0.8910359740257263,
-0.44332441687583923,
-0.7098467350006104,
1.0257079601287842,
2.5243914127349854,
1.3159520626068115,
-1.4001617431640625,
2.7001912593841553,
0.6829435229301453,
-0.2629484236240387,
-0.8978786468505859,
0.48044058680534363,
0.055993445217609406,
-1.2240678071975708,
-0.4161493480205536,
-0.809374988079071,
-0.12493309378623962,
-0.6462985873222351,
-0.5691081881523132,
0.024325935170054436,
0.5146971940994263,
-0.3189000189304352,
-0.3401332199573517,
-0.5194661617279053,
-0.8134117126464844,
0.5062777996063232,
-0.36643391847610474,
0.939470648765564,
-0.26827117800712585,
1.8529690504074097,
-0.5046058893203735,
0.3987596333026886,
0.7209023833274841,
1.2764554023742676,
0.11461861431598663,
0.026310252025723457,
0.3238523602485657,
0.22917255759239197,
-0.04030740261077881,
0.47863590717315674,
1.2144898176193237,
0.6547703742980957,
0.5475373268127441,
0.7435346841812134,
-2.1617000102996826,
1.374680519104004,
-0.9898744225502014,
0.2570315897464752,
1.3375211954116821,
-1.063520908355713,
0.3749438524246216,
-1.808038592338562,
-0.08234298974275589,
0.49778980016708374,
-2.2496936321258545,
0.17815181612968445,
-1.2135651111602783,
-0.5299938917160034,
1.0397576093673706,
0.2418919950723648,
-1.1560438871383667,
0.2065090835094452,
-0.45026543736457825,
1.1368993520736694,
0.41272804141044617,
1.094297170639038,
-1.808737874031067,
-0.010960590094327927,
-0.30554237961769104,
0.11629156023263931,
-1.4034454822540283,
-1.5932502746582031,
0.5229811072349548,
0.6668376326560974,
0.5625190734863281,
-0.07444500178098679,
1.056585431098938,
-0.9201877117156982,
0.7757173776626587,
-1.1307724714279175,
-1.6196695566177368,
-1.3329100608825684,
-2.3733081817626953,
-2.31697416305542,
0.7227168679237366,
-0.35053905844688416,
-0.5494630932807922,
2.00429368019104,
-0.9697328805923462,
-1.6963107585906982,
1.0481213331222534,
0.4112332761287689,
-0.0481160432100296,
2.3812549114227295,
0.23650497198104858,
-0.7904826402664185,
0.413022518157959,
-0.8127743601799011,
0.777702271938324,
-0.3737002909183502,
1.3184905052185059,
0.4716919958591461,
-1.086182951927185,
1.602951169013977,
-0.41728654503822327,
0.6312875747680664,
-0.809435248374939,
-0.5032386779785156,
-0.7606853246688843,
0.2517760097980499,
1.9617828130722046,
-0.29296740889549255,
1.5865720510482788,
-0.2820340692996979,
-1.4782589673995972,
-1.545697808265686,
0.8227497339248657,
0.43507152795791626,
-0.7979218363761902,
0.08945523202419281,
-0.32410621643066406,
0.12715975940227509,
-0.12067770212888718,
1.1014039516448975,
1.2398200035095215,
0.6614899635314941,
-0.3100067675113678,
-0.8083275556564331,
0.2373301237821579,
-0.04718726873397827,
-0.7108747363090515,
-1.7885545492172241,
-0.29019635915756226,
0.17278243601322174,
0.6151477098464966,
-1.1958812475204468,
1.80860435962677,
0.9070988893508911,
1.8946481943130493,
0.9537837505340576,
-0.4022955000400543,
1.416390061378479,
0.0015718210488557816,
1.931787133216858,
-0.4753431975841522,
0.6926200985908508,
-0.34849613904953003,
-1.1082769632339478,
0.858813464641571,
-0.22715696692466736,
-1.9952515363693237,
-0.7216044068336487,
-0.8556684851646423,
-0.14679871499538422,
-0.7003473043441772,
0.9014784097671509,
-0.24063929915428162,
-1.401882529258728,
0.21213407814502716,
-0.6266912817955017,
0.13689953088760376,
-1.202682375907898,
0.2476135641336441,
0.7114711403846741,
-0.5609070658683777,
0.01756345108151436,
-0.32443010807037354,
-1.2976056337356567,
-0.45682838559150696,
0.31344494223594666,
1.8694709539413452,
-0.6293851733207703,
0.8995761275291443,
1.0521290302276611,
-0.6549769043922424,
0.04827817529439926,
0.29664477705955505,
-0.27205514907836914,
0.8637603521347046,
-1.0258119106292725,
-0.3940071761608124,
1.1587990522384644,
-0.1314559429883957,
-0.6168246269226074,
1.5076087713241577,
0.7836185693740845,
-0.960463285446167,
-0.18554294109344482,
-0.25094959139823914,
-0.8768788576126099,
0.05004275590181351,
-1.623564600944519,
-0.10972084850072861,
0.30115604400634766,
-1.5524324178695679,
-0.4671646058559418,
-0.29460832476615906,
1.3559166193008423,
-0.2229127734899521,
1.409578800201416,
-0.29566314816474915,
-0.26167091727256775,
-0.37659457325935364,
-0.46681004762649536,
0.06560064852237701,
-0.11509544402360916,
-0.6104498505592346,
0.1742309182882309,
-0.7249970436096191,
0.2712738513946533,
1.5245091915130615,
0.326664537191391,
0.08505900949239731,
0.49235063791275024,
1.1814239025115967,
0.31824812293052673,
-0.0762750506401062,
-0.7513201832771301,
-1.5149439573287964,
1.9661545753479004,
-1.467578411102295,
2.024383544921875,
0.8611874580383301,
0.11845055967569351,
-1.7514349222183228,
-1.821738362312317,
1.5662413835525513,
1.1334782838821411,
2.3270273208618164,
0.6042264103889465,
0.40031126141548157,
-0.8187347650527954,
-0.6816050410270691,
0.3405362367630005,
-1.0113204717636108,
-0.697691023349762,
0.14655514061450958,
2.374191999435425,
1.728399395942688,
-0.5150120854377747,
-0.2405681014060974,
-0.8997597098350525,
1.386142373085022,
-0.12286724895238876,
0.21857155859470367,
1.9219720363616943,
-0.2904285788536072,
-1.057633638381958,
1.2411051988601685,
-2.4086477756500244,
0.057713113725185394,
1.990579605102539,
0.28227725625038147,
0.024171600118279457,
-1.3050190210342407,
-0.6403532028198242,
-0.31246477365493774,
-0.4849851131439209,
-1.3110657930374146,
0.41007640957832336,
-0.2317371666431427,
-0.7508771419525146,
-1.4589776992797852,
0.17470476031303406,
-1.1007540225982666,
-1.591403603553772,
0.3495728075504303,
1.889639973640442,
1.9540817737579346,
-0.7393757104873657,
1.5976603031158447,
-0.3679814636707306,
0.21703466773033142,
1.2519569396972656,
1.30794358253479,
3.1653034687042236,
1.7804968357086182,
-1.257628321647644,
0.6934028267860413,
-0.24465292692184448,
-0.572955310344696,
1.094475269317627,
-1.1599009037017822,
1.2230195999145508,
-0.12097931653261185,
-1.2250384092330933,
-1.333604097366333,
0.9430863261222839,
0.6189298629760742,
0.08429965376853943,
-0.5056449770927429,
1.262305498123169,
0.11108367890119553,
1.3374863862991333,
0.49974703788757324,
-0.302001953125,
0.5498721599578857,
-0.47759750485420227,
-0.5527796745300293,
1.578375220298767,
0.17880240082740784,
-1.3489259481430054,
-2.39428973197937,
-0.23019906878471375,
-0.8282952308654785,
-0.06512996554374695,
-0.7350168824195862,
-1.0712089538574219,
1.6243962049484253,
0.39420807361602783,
-1.2239439487457275,
-0.2837926149368286,
-0.4033167362213135,
-0.6517001986503601,
2.5511810779571533,
-1.4662176370620728,
-0.15738236904144287,
-0.9817211627960205,
-0.5897125005722046,
1.627582311630249,
-1.199116587638855,
-0.2318044751882553,
-1.023711919784546,
-0.5153963565826416,
-1.333530306816101,
-0.5459365844726562,
0.010221494361758232,
-0.8450068831443787,
0.8176029920578003,
0.11930868774652481,
-1.1528619527816772,
-0.35059651732444763,
-0.8740836977958679,
0.8566203117370605,
-0.1484614610671997,
0.23222056031227112,
1.743182897567749,
0.4692709743976593,
-0.3936135172843933,
0.7083403468132019,
1.1444358825683594,
0.6194926500320435,
-0.635595977306366,
0.22100929915905,
-0.6572721600532532,
0.36245301365852356,
-1.2865886688232422,
0.3085647225379944,
-2.9441750049591064,
0.6739646196365356,
-0.1128101646900177,
-0.0024658585898578167,
0.038626402616500854,
-1.363832712173462,
1.1385746002197266,
2.67964243888855,
-1.1856014728546143,
0.49287092685699463,
0.30079805850982666,
1.112815499305725,
-1.525874376296997,
0.27899694442749023,
-0.5272308588027954,
2.0929956436157227,
0.09089861810207367,
1.2329343557357788,
-0.48119762539863586,
-2.2402725219726562,
0.4650808572769165,
-1.1586707830429077,
-1.2399494647979736,
0.9336904287338257,
-0.8058652877807617,
0.11445935070514679,
-1.3719089031219482,
-0.22829343378543854,
-0.999060869216919,
-1.206504225730896,
0.7728527784347534,
0.08509360253810883,
0.5214084982872009,
-0.6755378246307373,
0.33330029249191284,
-2.2473180294036865,
-1.3851536512374878,
-0.1931200921535492,
-0.889072835445404,
0.5295834541320801,
-0.3770886957645416,
0.6384923458099365,
-0.04777184873819351,
0.06693341583013535,
0.31108757853507996,
1.4407962560653687,
3.308907985687256,
0.16611161828041077,
0.3875802159309387,
-0.17195850610733032,
-0.9676582217216492,
1.434543490409851,
0.8329752087593079,
-0.048543840646743774,
-0.46440595388412476,
-1.0004417896270752,
1.1481484174728394,
1.9930410385131836,
1.0846079587936401,
-0.11373107880353928,
-0.7772354483604431,
-0.6921813488006592,
0.0404941588640213,
0.20249146223068237,
0.4857065677642822,
0.963094174861908,
-0.03486030548810959,
0.10756916552782059,
1.2980718612670898,
1.2360966205596924,
-0.5264893174171448,
0.406572550535202,
-0.832740306854248,
-0.4198388457298279,
0.4055900573730469,
0.3173586130142212,
0.019930372014641762,
0.3704421818256378,
-0.9824898838996887,
-0.23597680032253265,
-0.37325385212898254,
-0.9322760105133057,
-0.7237648963928223,
-0.47158700227737427,
-0.3942280411720276,
1.6979961395263672,
-0.025594841688871384,
-0.5071896314620972,
0.07025939226150513,
-0.7892031073570251,
-0.11255686730146408,
-1.129098892211914,
0.247634157538414,
-0.21570317447185516,
-0.10400208085775375,
-0.08311083167791367,
1.7101491689682007,
-1.0120185613632202,
-2.1226704120635986,
0.3178100287914276,
0.23277819156646729,
-0.4347573220729828,
0.14580091834068298,
1.753588318824768,
0.5513467788696289,
1.4665464162826538,
1.331750512123108,
1.0198158025741577,
-0.7322971820831299,
-1.3072384595870972,
0.7032061815261841,
0.9794488549232483,
-1.2786093950271606,
0.7779209613800049,
0.04726950824260712,
-0.5227499604225159,
0.6624166965484619,
1.1978594064712524,
0.4633343517780304,
-2.0563549995422363,
0.7968673706054688,
-0.8941070437431335,
0.7195014357566833,
0.7110093235969543,
0.6908136010169983,
0.21662475168704987,
0.8425776958465576,
-1.15243661403656,
-1.1313468217849731,
-0.7245230078697205,
-0.6840465664863586,
1.865103840827942,
-0.1987728327512741,
0.5841487646102905,
-0.2031589150428772,
-1.33642578125,
-0.02963786944746971,
0.7755906581878662,
0.41737985610961914,
-0.43723633885383606,
0.725823163986206,
-0.6352536678314209,
-1.0056796073913574,
-1.4371041059494019,
-0.4651232659816742,
-1.028300166130066,
-0.9247361421585083,
0.9551275968551636,
0.7445306181907654,
0.27764183282852173,
1.9432729482650757,
0.6712450385093689,
0.19355027377605438,
-2.6018683910369873,
0.85056072473526,
0.3286747634410858,
-0.08589710295200348,
0.8964102864265442,
0.38194286823272705,
1.0954442024230957,
0.04979094862937927,
0.5666656494140625,
-2.3858602046966553,
2.3471179008483887,
-0.18073105812072754,
0.610213577747345,
-0.11174003779888153,
-0.2572287917137146,
1.1383355855941772,
0.5060843825340271,
0.517849326133728,
-1.0621604919433594,
0.7396634817123413,
-0.6945370435714722,
1.1425405740737915,
0.8682103157043457,
-0.8574942350387573,
0.008664252236485481,
1.4100996255874634,
0.49398308992385864,
-0.5238925814628601,
-0.8833752870559692,
-0.9682527184486389,
0.8720656037330627,
1.6670173406600952,
-0.017310697585344315,
-0.03263503313064575,
0.8095704913139343,
0.7218396067619324,
-1.265242576599121,
0.1395416408777237,
-0.7602027654647827,
-0.8240726590156555,
1.6565660238265991,
1.957486867904663,
-0.10274095833301544,
-0.16198623180389404,
-0.8367689251899719,
-1.1160154342651367,
0.7667822241783142,
0.05955822020769119,
0.06697282195091248,
0.6567990183830261,
-0.7132811546325684,
1.2890448570251465,
0.8544461131095886,
0.8720825910568237,
0.13205581903457642,
0.3290049731731415,
0.36896610260009766,
-0.3223380744457245,
-1.1303261518478394,
-0.23490560054779053,
-1.136177659034729,
-2.6079258918762207,
0.4732934236526489,
-0.15837961435317993,
-1.4058613777160645,
-0.018981637433171272,
-1.0167807340621948,
0.9415395259857178,
-0.5128610730171204,
-1.1400120258331299,
-1.5877118110656738,
0.2423945516347885,
-0.0016244547441601753,
0.9410597681999207,
-1.5665777921676636,
-0.0633169561624527,
1.2198829650878906,
0.8863398432731628,
-0.6839022636413574,
1.0073868036270142,
0.24042464792728424,
0.9730105996131897,
0.8589368462562561,
-0.3933306038379669,
0.4820055663585663,
0.04289168119430542,
-1.375024437904358,
0.4222845137119293,
1.1505987644195557,
0.14757907390594482,
1.4497407674789429,
-0.505442202091217,
0.024611761793494225,
0.3975565731525421,
-0.4332815408706665,
-0.516440212726593,
-0.6230453848838806,
0.6966853737831116,
0.06948788464069366,
-0.9259142279624939,
0.08987526595592499,
-0.09948757290840149,
-0.2027702033519745,
0.19479753077030182,
-1.5318896770477295,
-0.14229223132133484,
-0.3920607566833496,
-0.5894040465354919,
-1.3255960941314697,
0.03220975399017334,
1.318981409072876,
-0.7279913425445557,
-0.1990319788455963,
0.4944056272506714,
0.4571266174316406,
0.5512034296989441,
0.6634870171546936,
-0.6789355278015137,
-0.3605959415435791,
-0.30044928193092346,
-0.328353613615036,
0.27145814895629883,
1.2141655683517456,
-0.17305955290794373,
-0.9980535507202148,
0.7128130197525024,
-0.39060088992118835,
0.07533060759305954,
1.9359040260314941,
0.015496844425797462,
-0.7696470618247986,
0.3830561637878418,
-0.6692174077033997,
1.8945972919464111,
1.7860052585601807,
1.3877021074295044,
-0.09825626760721207,
-0.9845687747001648,
0.718390166759491,
-0.4094695448875427,
-0.3179796040058136,
1.0025582313537598,
0.40645962953567505,
-0.2040877640247345,
-1.3883389234542847,
0.5089271664619446,
1.3754451274871826,
-0.7741135358810425,
-0.809785008430481,
0.06462345272302628,
-0.8299660086631775,
1.062468409538269,
0.6858576536178589,
0.35796064138412476,
0.3467485308647156,
1.5768972635269165,
0.6533768177032471,
-0.5106278657913208,
0.6435920000076294,
0.41883641481399536,
-0.23047824203968048,
-2.126741647720337,
-1.1411550045013428,
0.35003459453582764,
-0.5419735312461853,
-1.5733458995819092,
1.4251590967178345,
-1.1495704650878906,
-0.9882843494415283,
0.5256055593490601,
-0.030866920948028564,
1.4728950262069702,
0.34914258122444153,
1.649800419807434,
2.082082748413086,
0.829145610332489,
0.3181794285774231,
1.2875698804855347,
-0.2334088385105133,
-0.43674564361572266,
1.8357738256454468,
-0.5892375111579895,
0.46619096398353577,
1.1198863983154297,
-0.33115705847740173,
-1.0142501592636108,
-0.7814220190048218,
-1.2492308616638184,
-0.7074719071388245,
1.2481509447097778,
0.0792950838804245,
-1.0713908672332764,
0.33126601576805115,
1.6739840507507324,
0.13680794835090637,
-0.314948707818985,
0.6465929746627808,
0.45329582691192627,
-0.8327746987342834,
-0.08206378668546677,
-0.9260655641555786,
0.5976110696792603,
-0.20330141484737396,
-0.31721046566963196,
0.33687523007392883,
0.5187420845031738,
1.2579636573791504,
-0.04415176063776016,
0.19294172525405884,
1.1942263841629028,
-1.3978230953216553,
1.5157526731491089,
-0.6416192054748535,
0.28696420788764954,
-2.3551552295684814,
1.4456499814987183,
-0.704556405544281,
1.94322669506073,
-2.632861375808716,
0.36179518699645996,
-0.5977193117141724,
-0.511398196220398,
0.38983747363090515,
-0.32862260937690735,
0.20304390788078308,
-0.16339059174060822,
-1.0592920780181885,
-0.21814768016338348,
-0.7373356819152832,
0.5841575264930725,
1.191702127456665,
1.3636255264282227,
-1.0161076784133911,
-0.2811315655708313,
-1.6620224714279175,
-0.12668316066265106,
-0.5930776596069336,
0.33892107009887695,
-2.0977494716644287,
-0.18372799456119537,
-2.003835439682007,
-2.481884002685547,
-1.3628028631210327,
-0.8941043615341187,
1.0669647455215454,
0.14855916798114777,
-0.9582425951957703,
1.0741437673568726,
-0.4198405146598816,
-1.8380110263824463,
1.1722018718719482,
-2.0369820594787598
] |
https://github.com/huggingface/datasets/issues/3450 | Unexpected behavior doing Split + Filter | Hi ! This is an issue with `datasets` 1.12. Sorry for the inconvenience. Can you update to `>=1.13` ?
see https://github.com/huggingface/datasets/issues/3190
Maybe we should also backport the bug fix to `1.12` (in a new version `1.12.2`) | ## Describe the bug
I observed unexpected behavior when applying 'train_test_split' followed by 'filter' on dataset. Elements of the training dataset eventually end up in the test dataset (after applying the 'filter')
## Steps to reproduce the bug
```
from datasets import Dataset
import pandas as pd
dic = {'x': [1,2,3,4,5,6,7,8,9], 'y':['q','w','e','r','t','y','u','i','o']}
df = pd.DataFrame.from_dict(dic)
dataset = Dataset.from_pandas(df)
split_dataset = dataset.train_test_split(test_size=0.5, shuffle=False, seed=42)
train_dataset = split_dataset["train"]
eval_dataset = split_dataset["test"]
eval_dataset_2 = eval_dataset.filter(lambda example: example['x'] % 2 == 0)
print( eval_dataset['x'])
print(eval_dataset_2['x'])
```
One observes that elements in eval_dataset2 are actually coming from the training dataset...
## Expected results
The expected results would be that the filtered eval dataset would only contain elements from the original eval dataset.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Windows 10
- Python version: 3.7
- PyArrow version: 5.0.0
| 1,046 | 36 | Unexpected behavior doing Split + Filter
## Describe the bug
I observed unexpected behavior when applying 'train_test_split' followed by 'filter' on dataset. Elements of the training dataset eventually end up in the test dataset (after applying the 'filter')
## Steps to reproduce the bug
```
from datasets import Dataset
import pandas as pd
dic = {'x': [1,2,3,4,5,6,7,8,9], 'y':['q','w','e','r','t','y','u','i','o']}
df = pd.DataFrame.from_dict(dic)
dataset = Dataset.from_pandas(df)
split_dataset = dataset.train_test_split(test_size=0.5, shuffle=False, seed=42)
train_dataset = split_dataset["train"]
eval_dataset = split_dataset["test"]
eval_dataset_2 = eval_dataset.filter(lambda example: example['x'] % 2 == 0)
print( eval_dataset['x'])
print(eval_dataset_2['x'])
```
One observes that elements in eval_dataset2 are actually coming from the training dataset...
## Expected results
The expected results would be that the filtered eval dataset would only contain elements from the original eval dataset.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: Windows 10
- Python version: 3.7
- PyArrow version: 5.0.0
Hi ! This is an issue with `datasets` 1.12. Sorry for the inconvenience. Can you update to `>=1.13` ?
see https://github.com/huggingface/datasets/issues/3190
Maybe we should also backport the bug fix to `1.12` (in a new version `1.12.2`) | [
-1.2512353658676147,
-0.9818410277366638,
-0.6898803114891052,
1.5430508852005005,
-0.19940820336341858,
-1.1067075729370117,
0.09632844477891922,
-1.0405023097991943,
1.70559823513031,
-0.7930051684379578,
0.13052330911159515,
-1.7240145206451416,
-0.02343760058283806,
-0.6239860653877258,
-0.7070834636688232,
-0.8784083127975464,
-0.33998894691467285,
-0.7094751596450806,
1.0820766687393188,
2.37896466255188,
1.1238080263137817,
-1.3827205896377563,
2.7527031898498535,
0.7420954704284668,
-0.113493911921978,
-1.0468661785125732,
0.547757625579834,
-0.003311268985271454,
-1.339656114578247,
-0.3624722957611084,
-0.975671112537384,
-0.0037003308534622192,
-0.5914626717567444,
-0.4723132848739624,
-0.028750117868185043,
0.392769992351532,
-0.3629181385040283,
-0.4823211431503296,
-0.46681147813796997,
-0.6681951284408569,
0.4034304618835449,
-0.3799118995666504,
0.8977436423301697,
-0.29706841707229614,
1.7664986848831177,
-0.5363211631774902,
0.39636290073394775,
0.702424943447113,
1.2348734140396118,
0.20483337342739105,
0.04874095693230629,
0.39703822135925293,
0.4007725119590759,
0.053403712809085846,
0.5252479910850525,
1.1793608665466309,
0.6257908344268799,
0.4467734694480896,
0.8130961060523987,
-2.3511362075805664,
1.2498183250427246,
-1.0489659309387207,
0.3398030996322632,
1.357559084892273,
-0.9459347724914551,
0.5060679912567139,
-1.703691005706787,
0.03148213028907776,
0.6383036971092224,
-2.240452289581299,
0.2828149199485779,
-1.3486673831939697,
-0.513209342956543,
0.9265507459640503,
0.41764771938323975,
-1.1379307508468628,
0.14629341661930084,
-0.48381203413009644,
1.0658564567565918,
0.48640966415405273,
1.0860595703125,
-1.7086660861968994,
-0.034782763570547104,
-0.23852069675922394,
0.1771051287651062,
-1.338056206703186,
-1.5465008020401,
0.5349143743515015,
0.718335747718811,
0.7004775404930115,
-0.17585985362529755,
1.0642220973968506,
-1.0664407014846802,
0.5863387584686279,
-1.0381453037261963,
-1.7690155506134033,
-1.3872367143630981,
-2.290613889694214,
-2.229825258255005,
0.6616122722625732,
-0.42350852489471436,
-0.5072779059410095,
2.0699105262756348,
-1.0182454586029053,
-1.806082010269165,
1.186863660812378,
0.3567487597465515,
0.01376691460609436,
2.4129886627197266,
0.1418321132659912,
-0.7349329590797424,
0.5012143850326538,
-0.7869560122489929,
0.7373987436294556,
-0.28138458728790283,
1.3018206357955933,
0.39918261766433716,
-0.9792771339416504,
1.6575254201889038,
-0.3925865888595581,
0.6223122477531433,
-0.6289703249931335,
-0.431546151638031,
-0.7655988931655884,
0.19334465265274048,
1.916588306427002,
-0.2139453887939453,
1.532634973526001,
-0.4069114327430725,
-1.5251657962799072,
-1.5846717357635498,
0.8569128513336182,
0.3691885471343994,
-0.7877289056777954,
0.07287914305925369,
-0.40229058265686035,
0.154841810464859,
-0.14043273031711578,
1.2014105319976807,
1.3031561374664307,
0.6687276363372803,
-0.2870202660560608,
-0.8428879976272583,
0.15374553203582764,
-0.17367242276668549,
-0.6941894888877869,
-1.8305126428604126,
-0.26844286918640137,
0.14468085765838623,
0.6946612596511841,
-1.1638598442077637,
1.6553312540054321,
0.8475049734115601,
1.8642221689224243,
1.067786455154419,
-0.44517165422439575,
1.3943138122558594,
0.19965258240699768,
1.7935783863067627,
-0.5602584481239319,
0.6613701581954956,
-0.41239529848098755,
-1.1454805135726929,
0.8459872603416443,
-0.33129000663757324,
-1.9578993320465088,
-0.6883489489555359,
-0.8058681488037109,
-0.20211759209632874,
-0.7543203830718994,
0.9276062250137329,
-0.3765423893928528,
-1.4822049140930176,
0.25095826387405396,
-0.7319149374961853,
0.2666080594062805,
-1.1839543581008911,
0.2351962924003601,
0.8194285035133362,
-0.5268951058387756,
0.06777878105640411,
-0.2782875895500183,
-1.3703522682189941,
-0.45557618141174316,
0.5076598525047302,
1.8084485530853271,
-0.7203071117401123,
0.8791816234588623,
1.0052658319473267,
-0.7179281711578369,
-0.012536238878965378,
0.20600830018520355,
-0.16988514363765717,
0.7808912992477417,
-0.9785977005958557,
-0.5292794108390808,
1.1917262077331543,
-0.2920606732368469,
-0.689458966255188,
1.4746356010437012,
0.7403226494789124,
-0.953807532787323,
-0.22919651865959167,
-0.1434749811887741,
-0.8183797001838684,
-0.06800518929958344,
-1.5523231029510498,
-0.15693724155426025,
0.4532727003097534,
-1.5821411609649658,
-0.47608816623687744,
-0.2673799991607666,
1.2777446508407593,
-0.1416713148355484,
1.3641825914382935,
-0.3243517279624939,
-0.17960283160209656,
-0.316982626914978,
-0.45873111486434937,
0.2391708940267563,
-0.27630239725112915,
-0.6061035394668579,
0.11716026067733765,
-0.8212473392486572,
0.3728160858154297,
1.4234119653701782,
0.4068993330001831,
0.024315033107995987,
0.5789614319801331,
1.1210026741027832,
0.4370694160461426,
-0.060617439448833466,
-0.8309215903282166,
-1.5650664567947388,
1.923933982849121,
-1.4525377750396729,
1.9570056200027466,
0.6347509622573853,
-0.0675559937953949,
-1.8279770612716675,
-1.8938453197479248,
1.3800275325775146,
1.1163746118545532,
2.2952849864959717,
0.5112708806991577,
0.432434618473053,
-0.838289737701416,
-0.7171688675880432,
0.1549510508775711,
-0.8839608430862427,
-0.738158643245697,
0.20083221793174744,
2.43951153755188,
1.7627577781677246,
-0.4754486680030823,
-0.16086550056934357,
-1.0255297422409058,
1.451233148574829,
-0.2573525905609131,
0.3592267632484436,
1.9928538799285889,
-0.2659866213798523,
-1.0422675609588623,
1.3510043621063232,
-2.412060499191284,
0.19625352323055267,
2.0107617378234863,
0.20756034553050995,
0.1026517003774643,
-1.3752386569976807,
-0.707301914691925,
-0.3057337999343872,
-0.4594292640686035,
-1.3123281002044678,
0.529009222984314,
-0.2810009717941284,
-0.7364881634712219,
-1.4269534349441528,
0.1522059589624405,
-1.0852315425872803,
-1.5936305522918701,
0.199066162109375,
1.9454973936080933,
2.0079894065856934,
-0.7376481890678406,
1.5533888339996338,
-0.2363155633211136,
0.24383436143398285,
1.2629287242889404,
1.1770727634429932,
3.0928595066070557,
1.9315279722213745,
-1.2403342723846436,
0.6720184087753296,
-0.07012167572975159,
-0.4435655474662781,
1.2333158254623413,
-1.1831543445587158,
1.2715893983840942,
-0.18680796027183533,
-1.2745369672775269,
-1.2672239542007446,
0.9746586084365845,
0.47518283128738403,
0.04494212940335274,
-0.5416920185089111,
1.2256492376327515,
-0.04451330751180649,
1.3140854835510254,
0.6135998964309692,
-0.3739861249923706,
0.5904399156570435,
-0.4412161111831665,
-0.580641508102417,
1.5526193380355835,
0.09202175587415695,
-1.4356664419174194,
-2.16296124458313,
-0.2814188599586487,
-0.7875816822052002,
0.030871085822582245,
-0.6091185808181763,
-0.9862157106399536,
1.637528657913208,
0.37988758087158203,
-1.158490538597107,
-0.2329791784286499,
-0.3162879943847656,
-0.5571860671043396,
2.708963632583618,
-1.3297555446624756,
-0.29737937450408936,
-1.0122127532958984,
-0.6668399572372437,
1.6813849210739136,
-1.1357309818267822,
-0.18418855965137482,
-1.0539883375167847,
-0.5795819163322449,
-1.3771216869354248,
-0.4991976022720337,
-0.01775425858795643,
-0.9490359425544739,
0.9316521883010864,
0.23671521246433258,
-1.1745343208312988,
-0.2997094392776489,
-0.8975978493690491,
0.9679904580116272,
-0.20556233823299408,
0.1770894080400467,
1.9468437433242798,
0.3074095845222473,
-0.3865816593170166,
0.7439676523208618,
1.0918880701065063,
0.7056369781494141,
-0.6650863289833069,
0.18621240556240082,
-0.6151345372200012,
0.3778586983680725,
-1.3588041067123413,
0.18499894440174103,
-2.9121389389038086,
0.6253924369812012,
-0.021227192133665085,
-0.06886756420135498,
0.008892111480236053,
-1.290346622467041,
1.0318533182144165,
2.540456533432007,
-1.2762153148651123,
0.474778950214386,
0.3227577805519104,
1.2872028350830078,
-1.6088389158248901,
0.2820799946784973,
-0.49203693866729736,
2.1269638538360596,
0.19508107006549835,
1.2145134210586548,
-0.44647490978240967,
-2.3972644805908203,
0.6137645244598389,
-1.1828877925872803,
-1.1652017831802368,
0.7846219539642334,
-0.9001620411872864,
0.23850633203983307,
-1.5087953805923462,
-0.23802731931209564,
-0.9295795559883118,
-1.1743229627609253,
0.671169638633728,
0.17633138597011566,
0.41124629974365234,
-0.6583212614059448,
0.35102033615112305,
-2.2236905097961426,
-1.3537485599517822,
-0.20155347883701324,
-0.9252744317054749,
0.5391721725463867,
-0.3454267382621765,
0.6646630764007568,
-0.1411358118057251,
-0.02009347826242447,
0.24054785072803497,
1.4751343727111816,
3.3751060962677,
0.18329079449176788,
0.31642788648605347,
-0.13123556971549988,
-0.9448176026344299,
1.4080337285995483,
0.9698816537857056,
-0.16697511076927185,
-0.508821427822113,
-1.1126781702041626,
1.294985055923462,
1.9234309196472168,
0.9476978778839111,
-0.005304084159433842,
-0.7587841749191284,
-0.7142995595932007,
0.07290972769260406,
0.17946216464042664,
0.5396682620048523,
0.8295932412147522,
0.09322372823953629,
0.12027895450592041,
1.4561684131622314,
1.1976029872894287,
-0.3279978632926941,
0.3175698518753052,
-0.9272291660308838,
-0.5220245122909546,
0.5056527256965637,
0.34176015853881836,
-0.10108044743537903,
0.36670762300491333,
-1.1460211277008057,
-0.15685516595840454,
-0.36412709951400757,
-0.8948125243186951,
-0.6589301824569702,
-0.3182287812232971,
-0.3319414258003235,
1.5623326301574707,
0.17452193796634674,
-0.5495719909667969,
-0.07093445956707001,
-0.7098606824874878,
-0.11113361269235611,
-1.0276464223861694,
0.36217933893203735,
-0.21659354865550995,
-0.11288098245859146,
-0.17091289162635803,
1.655674934387207,
-0.94773930311203,
-1.9880567789077759,
0.11626763641834259,
0.2730817198753357,
-0.21942950785160065,
0.177686870098114,
1.670177936553955,
0.5135396718978882,
1.503083348274231,
1.3885587453842163,
0.9422265291213989,
-0.5648279190063477,
-1.312069296836853,
0.6256729364395142,
0.9230539202690125,
-1.3269535303115845,
0.8312386274337769,
-0.026260383427143097,
-0.7043209671974182,
0.6476278901100159,
1.3628162145614624,
0.4147254228591919,
-2.047670841217041,
0.7823236584663391,
-1.0395114421844482,
0.7806735038757324,
0.7999296188354492,
0.8104865550994873,
0.2270207405090332,
0.8714274168014526,
-1.210586428642273,
-1.1521445512771606,
-0.7352847456932068,
-0.6974923610687256,
1.9752800464630127,
-0.3431025743484497,
0.5704070925712585,
-0.19463898241519928,
-1.3095189332962036,
-0.0477541908621788,
0.6386772394180298,
0.37787294387817383,
-0.48375988006591797,
0.8344786763191223,
-0.6875588893890381,
-1.1760473251342773,
-1.2943938970565796,
-0.5117836594581604,
-1.0201637744903564,
-0.9395551681518555,
0.9905354380607605,
0.8071399927139282,
0.2893117070198059,
1.7974317073822021,
0.5963150858879089,
0.22631917893886566,
-2.5879721641540527,
0.8814674615859985,
0.2511518597602844,
-0.11658570915460587,
0.7348523139953613,
0.3418799638748169,
1.0506759881973267,
0.002649606205523014,
0.6065466403961182,
-2.375579833984375,
2.2132434844970703,
-0.23842330276966095,
0.7228018641471863,
-0.1310623288154602,
-0.10189506411552429,
1.0295296907424927,
0.5557957291603088,
0.5868521332740784,
-0.9749311208724976,
0.7478612661361694,
-0.5631924867630005,
1.2819088697433472,
0.9800024032592773,
-0.7798483371734619,
-0.05832309275865555,
1.4424009323120117,
0.4280138611793518,
-0.5827791094779968,
-0.907741904258728,
-0.971248984336853,
0.9448570013046265,
1.7411025762557983,
-0.051710888743400574,
-0.04138370603322983,
0.8816094398498535,
0.6834214329719543,
-1.2801039218902588,
0.0928269550204277,
-0.6903656125068665,
-0.6018103361129761,
1.667823076248169,
2.0623655319213867,
-0.21056701242923737,
-0.060197051614522934,
-0.6924167275428772,
-1.2536072731018066,
0.7077772617340088,
0.049299098551273346,
0.03615795448422432,
0.754256546497345,
-0.6154516339302063,
0.9769183397293091,
0.7498816847801208,
0.9116434454917908,
0.13415449857711792,
0.3521474599838257,
0.3978506326675415,
-0.3822484612464905,
-1.2354440689086914,
-0.2594541907310486,
-0.9661849737167358,
-2.372100353240967,
0.38210558891296387,
-0.19717168807983398,
-1.4176932573318481,
0.13122417032718658,
-1.0294140577316284,
0.9814776182174683,
-0.6217160224914551,
-1.1921497583389282,
-1.4825776815414429,
0.22770436108112335,
-0.012079458683729172,
0.8512849807739258,
-1.6004877090454102,
-0.04576882719993591,
1.2203114032745361,
0.9029800295829773,
-0.6501336693763733,
1.0907191038131714,
0.3353291153907776,
1.0509151220321655,
0.8569712042808533,
-0.39669179916381836,
0.4918036460876465,
0.034638725221157074,
-1.3206868171691895,
0.44829416275024414,
1.138745665550232,
0.21663153171539307,
1.479698657989502,
-0.5897297859191895,
-0.15575192868709564,
0.47115761041641235,
-0.5801661014556885,
-0.4034433960914612,
-0.4891720414161682,
0.5804749131202698,
0.055348560214042664,
-0.7730838060379028,
-0.002566899172961712,
-0.008706768974661827,
-0.32086247205734253,
0.22701743245124817,
-1.4947744607925415,
-0.11876336485147476,
-0.4330899119377136,
-0.6011061668395996,
-1.2298095226287842,
0.04329536482691765,
1.4451630115509033,
-0.7221041321754456,
-0.2465764880180359,
0.511719286441803,
0.28539031744003296,
0.45341670513153076,
0.672070324420929,
-0.7016149759292603,
-0.2659457325935364,
-0.21522380411624908,
-0.3294350504875183,
0.2885815501213074,
1.3646419048309326,
-0.18669433891773224,
-1.0153818130493164,
0.6874617338180542,
-0.43830209970474243,
0.05073115602135658,
1.880241870880127,
-0.012441695667803288,
-0.8431146144866943,
0.28795456886291504,
-0.8227381110191345,
1.981852650642395,
1.747052788734436,
1.4138727188110352,
-0.19151908159255981,
-0.8921270370483398,
0.5828934907913208,
-0.3497050404548645,
-0.453669011592865,
0.8371982574462891,
0.4267656207084656,
-0.2486685961484909,
-1.3333474397659302,
0.8220522403717041,
1.1978282928466797,
-0.9403089880943298,
-0.7533627152442932,
0.2143995761871338,
-0.7775625586509705,
1.165273666381836,
0.6826686263084412,
0.3514465093612671,
0.23112696409225464,
1.6926072835922241,
0.8145474791526794,
-0.48400652408599854,
0.5524212121963501,
0.5843283534049988,
-0.20131389796733856,
-2.12135910987854,
-1.1589367389678955,
0.2942703366279602,
-0.5067082047462463,
-1.6721631288528442,
1.3786481618881226,
-1.100600004196167,
-0.9183899164199829,
0.4914242625236511,
0.10178440809249878,
1.2854740619659424,
0.3626443147659302,
1.5128705501556396,
2.0430901050567627,
0.8115203976631165,
0.47881627082824707,
1.2942161560058594,
-0.21071763336658478,
-0.4720432758331299,
1.764499545097351,
-0.4408110976219177,
0.6077858805656433,
1.1463327407836914,
-0.3265661597251892,
-1.084873914718628,
-0.7238749861717224,
-1.261061429977417,
-0.6305937767028809,
1.1847730875015259,
0.08909459412097931,
-1.1660735607147217,
0.289270281791687,
1.4528415203094482,
0.10216927528381348,
-0.3194906711578369,
0.7932651042938232,
0.43513303995132446,
-0.7790585160255432,
-0.1089329943060875,
-0.8750075101852417,
0.5553832650184631,
-0.3093758821487427,
-0.24534520506858826,
0.2829728126525879,
0.4236751198768616,
1.380899429321289,
0.03823225945234299,
0.1552271842956543,
1.215470314025879,
-1.3312135934829712,
1.5109045505523682,
-0.7676159143447876,
0.29987215995788574,
-2.430938243865967,
1.353767991065979,
-0.7664856314659119,
1.9742215871810913,
-2.6922073364257812,
0.48621970415115356,
-0.6259575486183167,
-0.47705596685409546,
0.33104246854782104,
-0.3327385187149048,
0.05346155911684036,
-0.08779866248369217,
-1.1715795993804932,
0.014266828075051308,
-0.7772337794303894,
0.5141528844833374,
1.1442196369171143,
1.3884233236312866,
-1.2271569967269897,
-0.2513978183269501,
-1.718935489654541,
-0.275229811668396,
-0.7962234616279602,
0.4265522360801697,
-2.0114197731018066,
-0.20392534136772156,
-1.8967444896697998,
-2.5238780975341797,
-1.1846134662628174,
-0.8044038414955139,
1.1533317565917969,
0.03848499432206154,
-0.9088817834854126,
1.3448808193206787,
-0.29223406314849854,
-1.838369607925415,
1.1158154010772705,
-2.1271681785583496
] |
https://github.com/huggingface/datasets/issues/3449 | Add `__add__()`, `__iadd__()` and similar to `Dataset` class | I was going through the codebase, and I believe the implementation of __add__() and __iadd__() will be similar to concatenate_datasets() after the elimination of code for arguments other than the list of datasets (info, split, axis).
(Assuming elimination of axis means concatenating over axis 1.) | **Is your feature request related to a problem? Please describe.**
No.
**Describe the solution you'd like**
I would like to be able to concatenate datasets as follows:
```python
>>> dataset["train"] += dataset["validation"]
```
... instead of using `concatenate_datasets()`:
```python
>>> raw_datasets["train"] = concatenate_datasets([raw_datasets["train"], raw_datasets["validation"]])
>>> del raw_datasets["validation"]
```
**Describe alternatives you've considered**
Well, I have considered `concatenate_datasets()` 😀
**Additional context**
N.a.
| 1,047 | 45 | Add `__add__()`, `__iadd__()` and similar to `Dataset` class
**Is your feature request related to a problem? Please describe.**
No.
**Describe the solution you'd like**
I would like to be able to concatenate datasets as follows:
```python
>>> dataset["train"] += dataset["validation"]
```
... instead of using `concatenate_datasets()`:
```python
>>> raw_datasets["train"] = concatenate_datasets([raw_datasets["train"], raw_datasets["validation"]])
>>> del raw_datasets["validation"]
```
**Describe alternatives you've considered**
Well, I have considered `concatenate_datasets()` 😀
**Additional context**
N.a.
I was going through the codebase, and I believe the implementation of __add__() and __iadd__() will be similar to concatenate_datasets() after the elimination of code for arguments other than the list of datasets (info, split, axis).
(Assuming elimination of axis means concatenating over axis 1.) | [
-1.2993899583816528,
-0.9251700639724731,
-0.7006308436393738,
1.4377737045288086,
-0.1633566915988922,
-1.366848111152649,
0.16590608656406403,
-1.097942590713501,
1.8292051553726196,
-0.8196502327919006,
0.3528701066970825,
-1.6418819427490234,
-0.021240854635834694,
-0.6370852589607239,
-0.9134168028831482,
-0.8291497826576233,
-0.433504581451416,
-0.7203003168106079,
0.93476402759552,
2.4143834114074707,
1.222374677658081,
-1.3614916801452637,
2.6919381618499756,
0.6567517518997192,
-0.05654009431600571,
-0.9447104930877686,
0.47531476616859436,
-0.013798955827951431,
-1.151945948600769,
-0.5581547021865845,
-0.8918480277061462,
-0.14080461859703064,
-0.5860245823860168,
-0.5778014063835144,
-0.030833717435598373,
0.3752240538597107,
-0.3821735680103302,
-0.48445871472358704,
-0.5874173641204834,
-0.8102152943611145,
0.38024473190307617,
-0.34772250056266785,
0.9726307392120361,
-0.4864867329597473,
1.8589462041854858,
-0.6938483715057373,
0.47407329082489014,
0.6891710162162781,
1.3297948837280273,
0.25151997804641724,
-0.031875427812337875,
0.42581433057785034,
0.4117026627063751,
0.050299134105443954,
0.494168221950531,
1.2002805471420288,
0.5866846442222595,
0.5634027719497681,
0.8586467504501343,
-2.176464796066284,
1.3064199686050415,
-1.120957612991333,
0.33545076847076416,
1.3932149410247803,
-0.8733865022659302,
0.35510194301605225,
-1.7517458200454712,
-0.0413622111082077,
0.6153188943862915,
-2.336427688598633,
0.23701852560043335,
-1.446674108505249,
-0.5635047554969788,
0.9627323746681213,
0.5031742453575134,
-1.2520962953567505,
0.12260694801807404,
-0.49234431982040405,
0.9762015342712402,
0.4766673445701599,
1.0382405519485474,
-1.762912631034851,
-0.03327062353491783,
-0.3906297981739044,
0.13111652433872223,
-1.2552199363708496,
-1.574678659439087,
0.7467791438102722,
0.5619893670082092,
0.5730288028717041,
-0.09857454150915146,
1.0561723709106445,
-1.0466537475585938,
0.7751051187515259,
-1.1075389385223389,
-1.6899343729019165,
-1.4637293815612793,
-2.1243441104888916,
-2.2202494144439697,
0.8263856768608093,
-0.4806663990020752,
-0.5842311978340149,
1.9791423082351685,
-0.9792507886886597,
-1.6966437101364136,
1.1106137037277222,
0.28887036442756653,
0.06755411624908447,
2.3558404445648193,
0.19949953258037567,
-0.7043278813362122,
0.4292347729206085,
-0.651087760925293,
0.8580873608589172,
-0.25952476263046265,
1.425065040588379,
0.47037938237190247,
-1.037318468093872,
1.6561367511749268,
-0.4084419310092926,
0.6320195198059082,
-0.5885118246078491,
-0.602921724319458,
-0.7609922289848328,
0.39417752623558044,
1.9297001361846924,
-0.1751331090927124,
1.567296028137207,
-0.28856876492500305,
-1.5712093114852905,
-1.6609652042388916,
1.017491340637207,
0.42423832416534424,
-0.8470165133476257,
0.08203158527612686,
-0.42390134930610657,
0.12645410001277924,
-0.08307549357414246,
1.373343586921692,
1.199000358581543,
0.7383183240890503,
-0.4128449261188507,
-0.7475622892379761,
0.09923840314149857,
-0.00039386842399835587,
-0.878206729888916,
-1.7589671611785889,
-0.3723464906215668,
0.15686702728271484,
0.5783947706222534,
-1.1099151372909546,
1.6748378276824951,
0.9112339019775391,
1.8452450037002563,
1.0729986429214478,
-0.2607308030128479,
1.3640438318252563,
-0.017710687592625618,
1.814854383468628,
-0.5474235415458679,
0.6336103081703186,
-0.2695773243904114,
-1.0189324617385864,
0.919783353805542,
-0.4273822009563446,
-2.17036771774292,
-0.8529641032218933,
-0.7640920281410217,
-0.10181193053722382,
-0.7042631506919861,
0.946453869342804,
-0.27112942934036255,
-1.4097442626953125,
0.2567305564880371,
-0.8379773497581482,
0.07538832724094391,
-1.1818475723266602,
0.29675403237342834,
0.7225798964500427,
-0.6920448541641235,
0.0017791623249650002,
-0.14568300545215607,
-1.308802604675293,
-0.43475979566574097,
0.2445475161075592,
1.9212656021118164,
-0.7567735314369202,
0.830564022064209,
0.9640968441963196,
-0.7534189224243164,
-0.0693100169301033,
0.26604199409484863,
-0.24485935270786285,
0.826917827129364,
-1.1078639030456543,
-0.35263165831565857,
1.2104157209396362,
-0.17788468301296234,
-0.5568295121192932,
1.5429691076278687,
0.6756235361099243,
-0.936565101146698,
-0.10038653016090393,
-0.23481528460979462,
-0.8961628675460815,
0.06228155270218849,
-1.5102285146713257,
-0.16712257266044617,
0.45494940876960754,
-1.5084744691848755,
-0.5484794974327087,
-0.14199227094650269,
1.3183315992355347,
-0.17491187155246735,
1.277809500694275,
-0.38264402747154236,
-0.32732418179512024,
-0.3183005452156067,
-0.3945258855819702,
0.11456114798784256,
-0.1897752285003662,
-0.6933956742286682,
0.09263836592435837,
-0.7285701036453247,
0.3870435357093811,
1.4030094146728516,
0.42551180720329285,
-0.03495614230632782,
0.5354902148246765,
1.200270652770996,
0.22113871574401855,
-0.0813545286655426,
-0.8665878772735596,
-1.5849597454071045,
1.946966290473938,
-1.4268758296966553,
1.944825530052185,
0.5460712313652039,
-0.09563325345516205,
-1.7240346670150757,
-1.871488094329834,
1.3820726871490479,
1.2404069900512695,
2.255617618560791,
0.5600821375846863,
0.27784308791160583,
-0.7910723090171814,
-0.7369210124015808,
0.33386680483818054,
-1.0222923755645752,
-0.6114396452903748,
0.10659115761518478,
2.2812373638153076,
1.8213098049163818,
-0.5873779058456421,
-0.1786251664161682,
-0.9653290510177612,
1.4397709369659424,
-0.3138735592365265,
0.1928071230649948,
1.9851226806640625,
-0.3351862132549286,
-1.154098629951477,
1.368597388267517,
-2.2321279048919678,
0.1434374749660492,
2.0409047603607178,
0.30259770154953003,
0.08683695644140244,
-1.3949435949325562,
-0.5986670851707458,
-0.4597093164920807,
-0.31563031673431396,
-1.3776189088821411,
0.4794970452785492,
-0.29052111506462097,
-0.7390613555908203,
-1.3590233325958252,
0.19301572442054749,
-1.0842279195785522,
-1.5399895906448364,
0.2592235505580902,
1.9591577053070068,
1.9505760669708252,
-0.5677533149719238,
1.606225609779358,
-0.3744776248931885,
0.11073456704616547,
1.2754249572753906,
1.2921735048294067,
3.122838258743286,
1.829158902168274,
-1.1724882125854492,
0.653547465801239,
-0.15472322702407837,
-0.5941406488418579,
1.2422945499420166,
-1.1937055587768555,
1.236106276512146,
-0.11772401630878448,
-1.1681005954742432,
-1.1700396537780762,
0.9448514580726624,
0.5230472087860107,
0.028801187872886658,
-0.6038299202919006,
1.2381829023361206,
-0.0981842428445816,
1.3244194984436035,
0.5589519143104553,
-0.3660774230957031,
0.5960128903388977,
-0.44407418370246887,
-0.4538370966911316,
1.5096216201782227,
0.2260117530822754,
-1.4795178174972534,
-2.272881031036377,
-0.11789197474718094,
-0.8348336815834045,
0.15670941770076752,
-0.5909387469291687,
-1.0230456590652466,
1.81610107421875,
0.3365415036678314,
-1.2964444160461426,
-0.26899200677871704,
-0.33082735538482666,
-0.6083348393440247,
2.804229736328125,
-1.2685381174087524,
-0.23792707920074463,
-0.9631685614585876,
-0.6336269378662109,
1.6712757349014282,
-1.218859076499939,
-0.19427956640720367,
-1.0166552066802979,
-0.500420331954956,
-1.3066585063934326,
-0.553794264793396,
-0.028952255845069885,
-1.0089671611785889,
0.9344356060028076,
0.035946015268564224,
-1.182396411895752,
-0.39771464467048645,
-0.9099361896514893,
0.7974762320518494,
-0.21711048483848572,
0.23516146838665009,
1.9555425643920898,
0.3746150732040405,
-0.3629991114139557,
0.7272440195083618,
1.2451385259628296,
0.7282931804656982,
-0.587178111076355,
0.16098903119564056,
-0.5220000147819519,
0.3434031307697296,
-1.3518167734146118,
0.2829824388027191,
-2.911303997039795,
0.7036083936691284,
-0.10019537061452866,
-0.11223327368497849,
0.04388662427663803,
-1.37363600730896,
1.065980315208435,
2.6399829387664795,
-1.3260446786880493,
0.38270264863967896,
0.2601872384548187,
1.0636649131774902,
-1.606289267539978,
0.3647344708442688,
-0.4271635115146637,
2.0967905521392822,
0.2179941087961197,
1.1928719282150269,
-0.4507458508014679,
-2.1481103897094727,
0.6903825998306274,
-1.1978721618652344,
-1.2725499868392944,
0.7121000289916992,
-0.8838229179382324,
0.15862882137298584,
-1.5151957273483276,
-0.2132236361503601,
-0.9268540143966675,
-1.1038494110107422,
0.7026521563529968,
0.22624999284744263,
0.300962895154953,
-0.5106183886528015,
0.2952191233634949,
-2.1980621814727783,
-1.4065041542053223,
-0.23359227180480957,
-0.9761632084846497,
0.6431097388267517,
-0.33463555574417114,
0.6392565369606018,
-0.10500365495681763,
0.04495836794376373,
0.40839552879333496,
1.6422983407974243,
3.343602180480957,
0.1730998456478119,
0.29386839270591736,
-0.2231733351945877,
-0.8905187845230103,
1.4567533731460571,
0.9355596899986267,
-0.009261894971132278,
-0.5158125758171082,
-0.9669350385665894,
1.4104551076889038,
1.931498646736145,
0.8969640135765076,
0.0012336354702711105,
-0.7846580743789673,
-0.5188956260681152,
-0.03721613809466362,
0.18889117240905762,
0.35385826230049133,
0.8297280669212341,
0.21527932584285736,
0.024305421859025955,
1.3576023578643799,
1.1482656002044678,
-0.4292169511318207,
0.39028358459472656,
-0.8143344521522522,
-0.4244435131549835,
0.6286104321479797,
0.2830891013145447,
-0.004755393601953983,
0.34769919514656067,
-0.9243590235710144,
-0.2641827166080475,
-0.36084285378456116,
-0.9317423701286316,
-0.701228141784668,
-0.45754191279411316,
-0.481482595205307,
1.6195743083953857,
0.03574727103114128,
-0.6202591061592102,
-0.0841081291437149,
-0.7017406821250916,
-0.1410883069038391,
-1.095584511756897,
0.2589344084262848,
-0.08008977025747299,
-0.13131292164325714,
-0.1830616593360901,
1.5977652072906494,
-0.9130851030349731,
-2.0075981616973877,
0.1724412739276886,
0.30308738350868225,
-0.4130050539970398,
0.24483829736709595,
1.5929791927337646,
0.5923139452934265,
1.4860488176345825,
1.3831942081451416,
0.9084829092025757,
-0.6365187168121338,
-1.2654856443405151,
0.562447190284729,
0.9129401445388794,
-1.4373530149459839,
0.8308770656585693,
0.07706515491008759,
-0.5584155321121216,
0.765580415725708,
1.2922223806381226,
0.49388206005096436,
-1.9522175788879395,
0.748589277267456,
-0.9370120167732239,
0.809941291809082,
0.6208822131156921,
0.6497321128845215,
0.33894869685173035,
0.9749048352241516,
-1.2091819047927856,
-1.1901553869247437,
-0.8284386992454529,
-0.7031075358390808,
1.9696468114852905,
-0.2973206341266632,
0.5696629285812378,
-0.2015870362520218,
-1.197074294090271,
-0.060351692140102386,
0.7406176924705505,
0.4893418550491333,
-0.40269073843955994,
0.7266284227371216,
-0.7413161993026733,
-1.0344438552856445,
-1.3384428024291992,
-0.37633922696113586,
-0.97003573179245,
-0.9186804294586182,
1.031252145767212,
0.8398945927619934,
0.41120290756225586,
1.8973772525787354,
0.6513833403587341,
0.26249492168426514,
-2.5440032482147217,
0.7849395275115967,
0.22393807768821716,
-0.10641783475875854,
0.8178575038909912,
0.3780800700187683,
1.0397982597351074,
-0.08548570424318314,
0.5821719169616699,
-2.370321273803711,
2.1896727085113525,
-0.2514782249927521,
0.6517557501792908,
-0.10565713793039322,
-0.11264989525079727,
1.171789526939392,
0.5520501732826233,
0.4896957278251648,
-1.123292326927185,
0.601174533367157,
-0.5099542737007141,
1.2366069555282593,
0.8711875081062317,
-0.7535668611526489,
0.02964199334383011,
1.445178747177124,
0.5853822827339172,
-0.6089755296707153,
-1.0613038539886475,
-0.8160704374313354,
0.931583046913147,
1.6029547452926636,
-0.0898614376783371,
-0.14974738657474518,
0.7880846858024597,
0.7160898447036743,
-1.1858534812927246,
0.20563547313213348,
-0.6609994769096375,
-0.7962104678153992,
1.5844917297363281,
2.0943753719329834,
-0.12208873778581619,
-0.020184148102998734,
-0.7074658274650574,
-1.2389386892318726,
0.8118528127670288,
0.044715072959661484,
0.0217188261449337,
0.562863826751709,
-0.5940433740615845,
1.071702241897583,
0.8892792463302612,
0.9462783336639404,
0.16033723950386047,
0.4853430688381195,
0.4786622226238251,
-0.20377883315086365,
-1.2211534976959229,
-0.3234238922595978,
-1.0697747468948364,
-2.522442102432251,
0.44585734605789185,
-0.4403919577598572,
-1.432227373123169,
-0.04864363744854927,
-1.0183465480804443,
0.9396552443504333,
-0.6242068409919739,
-1.0771528482437134,
-1.5984238386154175,
0.2663552463054657,
0.24961388111114502,
0.9385588765144348,
-1.5722920894622803,
-0.18921661376953125,
1.2054402828216553,
0.815409243106842,
-0.6644873023033142,
0.8876871466636658,
0.30227431654930115,
1.0172076225280762,
0.8739407062530518,
-0.5276884436607361,
0.4777250289916992,
-0.038461990654468536,
-1.3635120391845703,
0.6150833964347839,
1.189927339553833,
0.15121501684188843,
1.4355379343032837,
-0.4370519518852234,
0.0917842760682106,
0.42292043566703796,
-0.6225062012672424,
-0.40409350395202637,
-0.600590705871582,
0.5667332410812378,
0.08933180570602417,
-0.9368371963500977,
-0.15651804208755493,
-0.05054590851068497,
-0.3059226870536804,
0.23915718495845795,
-1.4746155738830566,
-0.1395753026008606,
-0.4598396122455597,
-0.5303683876991272,
-1.0902674198150635,
-0.19219481945037842,
1.4094829559326172,
-0.7056965827941895,
-0.208323135972023,
0.5464780330657959,
0.44090721011161804,
0.6311346292495728,
0.6127332448959351,
-0.7089714407920837,
-0.26397186517715454,
-0.41755154728889465,
-0.32698142528533936,
0.16993024945259094,
1.2867679595947266,
-0.17015421390533447,
-0.9873839616775513,
0.7188839912414551,
-0.32399559020996094,
-0.060399699956178665,
1.9004206657409668,
0.13595467805862427,
-0.7098127007484436,
0.3514927923679352,
-0.7489412426948547,
1.8959875106811523,
1.7442163228988647,
1.2289586067199707,
-0.0666135847568512,
-0.9404575824737549,
0.5844515562057495,
-0.3537854254245758,
-0.469644159078598,
0.7446089386940002,
0.41902023553848267,
-0.25385740399360657,
-1.38896644115448,
0.8586947917938232,
1.30062997341156,
-0.8860479593276978,
-0.8649432063102722,
0.08392945677042007,
-0.8136259913444519,
1.0239486694335938,
0.6187579035758972,
0.42894554138183594,
0.3731915354728699,
1.7350094318389893,
0.6687208414077759,
-0.40085354447364807,
0.3743473291397095,
0.7127041220664978,
-0.16004349291324615,
-2.1322128772735596,
-1.3492207527160645,
0.2954965829849243,
-0.5693911910057068,
-1.558009147644043,
1.3568322658538818,
-1.065617561340332,
-0.9279853105545044,
0.511410117149353,
0.1927136331796646,
1.4659769535064697,
0.444972962141037,
1.6404826641082764,
2.009227991104126,
0.789587676525116,
0.42735254764556885,
1.3408122062683105,
-0.08897724747657776,
-0.42063000798225403,
1.8710424900054932,
-0.3965207636356354,
0.5189930200576782,
1.1416407823562622,
-0.34540408849716187,
-1.2308709621429443,
-0.8301591277122498,
-1.272127628326416,
-0.6984713077545166,
1.0861351490020752,
0.04572894051671028,
-1.172795295715332,
0.19155709445476532,
1.5990551710128784,
0.1755531281232834,
-0.3520444929599762,
0.44857901334762573,
0.34200477600097656,
-0.7648893594741821,
-0.11271954327821732,
-1.1413261890411377,
0.5886486768722534,
-0.2171831727027893,
-0.30817362666130066,
0.29081445932388306,
0.5333435535430908,
1.3221367597579956,
-0.07889563590288162,
0.16740503907203674,
1.1584711074829102,
-1.4857429265975952,
1.4238038063049316,
-0.6705568432807922,
0.2522795498371124,
-2.3624579906463623,
1.4807794094085693,
-0.7531603574752808,
1.919771432876587,
-2.6933774948120117,
0.3868626654148102,
-0.5550509095191956,
-0.4884483218193054,
0.31918302178382874,
-0.3084757924079895,
0.1973007470369339,
-0.152817502617836,
-1.1898252964019775,
0.10566180944442749,
-0.6309847235679626,
0.6415997743606567,
1.1392300128936768,
1.5109341144561768,
-1.1832467317581177,
-0.2870858907699585,
-1.6966462135314941,
-0.10868337750434875,
-0.7522343993186951,
0.3644335865974426,
-2.0114593505859375,
-0.001827507745474577,
-1.8102877140045166,
-2.420405387878418,
-1.3228343725204468,
-0.7424055337905884,
1.0472062826156616,
0.09450045973062515,
-0.8149701356887817,
1.305555820465088,
-0.36451995372772217,
-1.8256604671478271,
1.152213215827942,
-2.131666421890259
] |
https://github.com/huggingface/datasets/issues/3449 | Add `__add__()`, `__iadd__()` and similar to `Dataset` class | Most data frame libraries (Polars, Pandas, ...) override `__add__` to perform (mathematical) summation, so having different behavior here is a bad idea. | **Is your feature request related to a problem? Please describe.**
No.
**Describe the solution you'd like**
I would like to be able to concatenate datasets as follows:
```python
>>> dataset["train"] += dataset["validation"]
```
... instead of using `concatenate_datasets()`:
```python
>>> raw_datasets["train"] = concatenate_datasets([raw_datasets["train"], raw_datasets["validation"]])
>>> del raw_datasets["validation"]
```
**Describe alternatives you've considered**
Well, I have considered `concatenate_datasets()` 😀
**Additional context**
N.a.
| 1,047 | 22 | Add `__add__()`, `__iadd__()` and similar to `Dataset` class
**Is your feature request related to a problem? Please describe.**
No.
**Describe the solution you'd like**
I would like to be able to concatenate datasets as follows:
```python
>>> dataset["train"] += dataset["validation"]
```
... instead of using `concatenate_datasets()`:
```python
>>> raw_datasets["train"] = concatenate_datasets([raw_datasets["train"], raw_datasets["validation"]])
>>> del raw_datasets["validation"]
```
**Describe alternatives you've considered**
Well, I have considered `concatenate_datasets()` 😀
**Additional context**
N.a.
Most data frame libraries (Polars, Pandas, ...) override `__add__` to perform (mathematical) summation, so having different behavior here is a bad idea. | [
-1.2249258756637573,
-0.9306952953338623,
-0.6791468858718872,
1.466762900352478,
-0.18603403866291046,
-1.3810114860534668,
0.17443743348121643,
-1.1069831848144531,
1.8750711679458618,
-0.785097062587738,
0.3735910654067993,
-1.693202018737793,
-0.06406684219837189,
-0.7253880500793457,
-0.8917975425720215,
-0.810823917388916,
-0.4084545969963074,
-0.7005608081817627,
0.9038150906562805,
2.4341719150543213,
1.1982488632202148,
-1.3269816637039185,
2.675293445587158,
0.6303815841674805,
-0.10602188110351562,
-0.9011640548706055,
0.5161691308021545,
0.03132864460349083,
-1.1384576559066772,
-0.5209290385246277,
-0.9184308648109436,
-0.1607401818037033,
-0.5708253979682922,
-0.6200010180473328,
0.013288128189742565,
0.385272353887558,
-0.37363988161087036,
-0.4763021171092987,
-0.6137362718582153,
-0.7635409832000732,
0.3816526234149933,
-0.39429205656051636,
1.0564231872558594,
-0.47216710448265076,
1.8572508096694946,
-0.6977077126502991,
0.48426905274391174,
0.7157289981842041,
1.3101246356964111,
0.24490101635456085,
-0.017180439084768295,
0.42315998673439026,
0.42882460355758667,
0.07447655498981476,
0.4992668032646179,
1.121359944343567,
0.5841900110244751,
0.5651557445526123,
0.8755329251289368,
-2.2032458782196045,
1.3205628395080566,
-1.1048284769058228,
0.2967003583908081,
1.3708640336990356,
-0.8551009297370911,
0.2987402677536011,
-1.7510703802108765,
-0.00636369688436389,
0.6384527087211609,
-2.3158862590789795,
0.20327268540859222,
-1.4802427291870117,
-0.5818520188331604,
0.9624750018119812,
0.5182763934135437,
-1.2434831857681274,
0.08676046133041382,
-0.4338061511516571,
0.9058794975280762,
0.4486645460128784,
1.0470631122589111,
-1.8110390901565552,
-0.024376973509788513,
-0.3949210047721863,
0.14749516546726227,
-1.2226310968399048,
-1.5240787267684937,
0.7913551926612854,
0.5679002404212952,
0.582194983959198,
-0.10174036026000977,
1.051537275314331,
-0.9992372393608093,
0.7381364703178406,
-1.1091259717941284,
-1.709365725517273,
-1.444239854812622,
-2.1108193397521973,
-2.2475502490997314,
0.7985672950744629,
-0.4910074770450592,
-0.5193291306495667,
1.9472508430480957,
-0.9505978226661682,
-1.7142908573150635,
1.0308252573013306,
0.28593751788139343,
0.1021144837141037,
2.323979616165161,
0.21587739884853363,
-0.6375536918640137,
0.3662785589694977,
-0.7029634118080139,
0.8256140947341919,
-0.20496951043605804,
1.437179684638977,
0.45360487699508667,
-1.0378934144973755,
1.6803425550460815,
-0.3529713749885559,
0.6713200807571411,
-0.5848276019096375,
-0.57646244764328,
-0.70055091381073,
0.3807334899902344,
1.9444712400436401,
-0.19833774864673615,
1.5241962671279907,
-0.30323728919029236,
-1.617179274559021,
-1.6630284786224365,
0.947597086429596,
0.43478816747665405,
-0.8379061818122864,
0.07343877106904984,
-0.38411033153533936,
0.14478573203086853,
-0.09585299342870712,
1.3998806476593018,
1.213944673538208,
0.8105965852737427,
-0.3777606785297394,
-0.7496345639228821,
0.08423193544149399,
0.027680478990077972,
-0.947795033454895,
-1.7785687446594238,
-0.4317896068096161,
0.14530108869075775,
0.6213867664337158,
-1.1013838052749634,
1.6891779899597168,
0.8723917007446289,
1.8365622758865356,
1.0570365190505981,
-0.2715398073196411,
1.3734785318374634,
-0.06827261298894882,
1.856530785560608,
-0.573975145816803,
0.5970003604888916,
-0.2984653115272522,
-1.0109679698944092,
0.8950803279876709,
-0.3905520439147949,
-2.1302342414855957,
-0.8365451097488403,
-0.7990684509277344,
-0.14940424263477325,
-0.682435154914856,
0.9448513984680176,
-0.2506905794143677,
-1.356365442276001,
0.22842273116111755,
-0.8564911484718323,
0.044022370129823685,
-1.1546422243118286,
0.28385546803474426,
0.7202521562576294,
-0.6993942856788635,
0.018119197338819504,
-0.133473202586174,
-1.3425265550613403,
-0.4907059371471405,
0.1858636438846588,
1.9750310182571411,
-0.7638370990753174,
0.8560580015182495,
0.9481043219566345,
-0.7677592635154724,
-0.0939030647277832,
0.259425550699234,
-0.2689283490180969,
0.7752224206924438,
-1.1345857381820679,
-0.3406410813331604,
1.175514578819275,
-0.1742294728755951,
-0.5597602725028992,
1.571584701538086,
0.6930968761444092,
-0.9969019889831543,
-0.13828261196613312,
-0.24451027810573578,
-0.8084551692008972,
0.10477586835622787,
-1.5078336000442505,
-0.2074243277311325,
0.4515531063079834,
-1.4880238771438599,
-0.580169141292572,
-0.14082832634449005,
1.317430019378662,
-0.09604275226593018,
1.1863582134246826,
-0.2875462472438812,
-0.37724030017852783,
-0.35487720370292664,
-0.41362181305885315,
0.09092202037572861,
-0.20717976987361908,
-0.6906783580780029,
0.10913269221782684,
-0.7200413942337036,
0.4066442549228668,
1.4339574575424194,
0.3537026643753052,
-0.040276579558849335,
0.5305370092391968,
1.1660510301589966,
0.20356573164463043,
-0.020976975560188293,
-0.8732762336730957,
-1.5728638172149658,
1.9402791261672974,
-1.4245407581329346,
1.9454039335250854,
0.5424998998641968,
-0.07103989273309708,
-1.7160996198654175,
-1.924620270729065,
1.4106870889663696,
1.2538427114486694,
2.2058188915252686,
0.5998446941375732,
0.2678242325782776,
-0.7710216641426086,
-0.6568769216537476,
0.3477186858654022,
-1.0318979024887085,
-0.6213201880455017,
0.13775554299354553,
2.315000534057617,
1.7788137197494507,
-0.6071348786354065,
-0.14013436436653137,
-0.9802989959716797,
1.4336351156234741,
-0.276828795671463,
0.1916293352842331,
2.0411179065704346,
-0.3327319025993347,
-1.189343810081482,
1.3555704355239868,
-2.206026077270508,
0.1360863596200943,
2.0277822017669678,
0.258257120847702,
0.1430802047252655,
-1.380467414855957,
-0.6425157189369202,
-0.43327847123146057,
-0.33328092098236084,
-1.3812839984893799,
0.47223973274230957,
-0.23417310416698456,
-0.7747689485549927,
-1.3981746435165405,
0.22258125245571136,
-1.1032873392105103,
-1.525887370109558,
0.23488172888755798,
1.9683847427368164,
1.9627788066864014,
-0.5843525528907776,
1.5759141445159912,
-0.3790185749530792,
0.09986767172813416,
1.282187581062317,
1.2842810153961182,
3.135504961013794,
1.8966144323349,
-1.1047883033752441,
0.6683725714683533,
-0.16659124195575714,
-0.5579538345336914,
1.2616380453109741,
-1.1878547668457031,
1.2211723327636719,
-0.19811955094337463,
-1.1090998649597168,
-1.1972429752349854,
0.9082595109939575,
0.5408725738525391,
-0.016840916126966476,
-0.5606186985969543,
1.2458248138427734,
-0.07853905111551285,
1.3489694595336914,
0.5738062262535095,
-0.3519763648509979,
0.6487305164337158,
-0.4523738920688629,
-0.38612309098243713,
1.5411436557769775,
0.30319270491600037,
-1.4157605171203613,
-2.330418109893799,
-0.11334982514381409,
-0.866726279258728,
0.14900170266628265,
-0.5321400165557861,
-1.0441348552703857,
1.8369779586791992,
0.35420697927474976,
-1.2718126773834229,
-0.2229025810956955,
-0.3428807854652405,
-0.5886949896812439,
2.844517946243286,
-1.2406771183013916,
-0.23203814029693604,
-0.9770556092262268,
-0.6383306384086609,
1.7149202823638916,
-1.2382266521453857,
-0.2413441389799118,
-1.0378838777542114,
-0.4524209499359131,
-1.328850507736206,
-0.5596135854721069,
-0.03297295793890953,
-1.0111626386642456,
0.9296550154685974,
0.02898665890097618,
-1.1928491592407227,
-0.40582582354545593,
-0.9386715292930603,
0.8270493745803833,
-0.2239694446325302,
0.19414974749088287,
1.9976285696029663,
0.3947473168373108,
-0.3655818998813629,
0.6701834201812744,
1.2618625164031982,
0.6938613653182983,
-0.6570879817008972,
0.2146267145872116,
-0.537204384803772,
0.33887189626693726,
-1.37418794631958,
0.27060461044311523,
-2.905984878540039,
0.6737899780273438,
-0.07151675224304199,
-0.11432857066392899,
0.09025710821151733,
-1.375025987625122,
1.0834928750991821,
2.664116382598877,
-1.357909917831421,
0.36771318316459656,
0.23029150068759918,
1.0569223165512085,
-1.5527490377426147,
0.3717607855796814,
-0.3965030908584595,
2.084620475769043,
0.22041557729244232,
1.1876568794250488,
-0.40760043263435364,
-2.1867620944976807,
0.725158154964447,
-1.1829360723495483,
-1.3133087158203125,
0.6771950721740723,
-0.8838738203048706,
0.10664884746074677,
-1.4996622800827026,
-0.18955117464065552,
-0.9290090203285217,
-1.148331880569458,
0.7196581363677979,
0.20922739803791046,
0.28732287883758545,
-0.5047715306282043,
0.2959984242916107,
-2.1536388397216797,
-1.422601580619812,
-0.24742816388607025,
-0.9860464334487915,
0.6740341782569885,
-0.3220452666282654,
0.6525952219963074,
-0.13427355885505676,
0.021736346185207367,
0.44175928831100464,
1.6192023754119873,
3.381711721420288,
0.12342718243598938,
0.2635419964790344,
-0.23192894458770752,
-0.8783532381057739,
1.4243263006210327,
0.9536083340644836,
0.010716048069298267,
-0.5018017292022705,
-0.9786109328269958,
1.3345462083816528,
2.018427848815918,
0.8812952041625977,
0.0026092547923326492,
-0.8515461087226868,
-0.5465118885040283,
-0.02713218703866005,
0.20425695180892944,
0.3455633819103241,
0.8180396556854248,
0.24827267229557037,
-0.04636528342962265,
1.3171594142913818,
1.1262388229370117,
-0.40653926134109497,
0.3483174741268158,
-0.7903660535812378,
-0.39521679282188416,
0.6598683595657349,
0.2722618579864502,
0.00045540928840637207,
0.33226755261421204,
-0.9096258878707886,
-0.22226989269256592,
-0.3135727047920227,
-0.9145681858062744,
-0.7183999419212341,
-0.4771425127983093,
-0.44239872694015503,
1.6354970932006836,
-0.015958089381456375,
-0.6006012558937073,
-0.09239208698272705,
-0.6637006402015686,
-0.06766824424266815,
-1.028008222579956,
0.2662411630153656,
-0.10064703971147537,
-0.14909665286540985,
-0.20268993079662323,
1.617121934890747,
-0.8999096155166626,
-1.9181138277053833,
0.2235005646944046,
0.2995544970035553,
-0.48117977380752563,
0.26224878430366516,
1.5502784252166748,
0.6763763427734375,
1.4961873292922974,
1.348364233970642,
0.9542074203491211,
-0.64164137840271,
-1.2909287214279175,
0.4948825240135193,
0.882627546787262,
-1.4023467302322388,
0.8250302672386169,
0.0892338752746582,
-0.5347863435745239,
0.7206041812896729,
1.3517227172851562,
0.49656379222869873,
-1.9150245189666748,
0.6979295611381531,
-0.9122187495231628,
0.8508320450782776,
0.6729534268379211,
0.6943446397781372,
0.3016553521156311,
0.9063050150871277,
-1.1593739986419678,
-1.1841803789138794,
-0.8385025262832642,
-0.6989726424217224,
2.031934976577759,
-0.2875846028327942,
0.5709470510482788,
-0.2365557998418808,
-1.2332350015640259,
-0.08342881500720978,
0.7080843448638916,
0.5279759764671326,
-0.42091768980026245,
0.7367488145828247,
-0.7061765789985657,
-1.0164152383804321,
-1.3265076875686646,
-0.40481773018836975,
-1.0009413957595825,
-0.9090672135353088,
1.0265671014785767,
0.8394657373428345,
0.46709808707237244,
1.9064769744873047,
0.6328219771385193,
0.26992976665496826,
-2.5441863536834717,
0.8348183035850525,
0.2279430776834488,
-0.10012255609035492,
0.8488396406173706,
0.393736869096756,
1.0586997270584106,
-0.16298136115074158,
0.5855677723884583,
-2.3585526943206787,
2.198888063430786,
-0.23053844273090363,
0.5913395881652832,
-0.05020824447274208,
-0.116989865899086,
1.0809848308563232,
0.5255532264709473,
0.4710986018180847,
-1.102744698524475,
0.5573182106018066,
-0.5263150334358215,
1.2229915857315063,
0.8078523874282837,
-0.7227291464805603,
0.020853038877248764,
1.4039685726165771,
0.6170207262039185,
-0.620375394821167,
-1.0655726194381714,
-0.884437620639801,
0.9398144483566284,
1.612401008605957,
-0.14802782237529755,
-0.17234709858894348,
0.7934399247169495,
0.7059292793273926,
-1.1717686653137207,
0.14468809962272644,
-0.6722476482391357,
-0.7621453404426575,
1.5632609128952026,
2.1274895668029785,
-0.12042050063610077,
-0.07722628861665726,
-0.7352511882781982,
-1.1665385961532593,
0.7851092219352722,
0.1197110265493393,
-0.008765192702412605,
0.5735836625099182,
-0.5368348956108093,
1.1389164924621582,
0.8663336634635925,
0.9611431360244751,
0.15156058967113495,
0.5605124831199646,
0.47558531165122986,
-0.2692394256591797,
-1.258293867111206,
-0.353190541267395,
-1.0436395406723022,
-2.5649399757385254,
0.49521803855895996,
-0.4426874816417694,
-1.425789713859558,
-0.05009675770998001,
-1.0379048585891724,
0.9234570860862732,
-0.5936527252197266,
-1.0505543947219849,
-1.5959304571151733,
0.26044386625289917,
0.21514664590358734,
1.009705662727356,
-1.606945276260376,
-0.13672256469726562,
1.252124309539795,
0.8463464379310608,
-0.7380737066268921,
0.9147560596466064,
0.3178396224975586,
1.02971613407135,
0.8660494089126587,
-0.4879782199859619,
0.4971744418144226,
-0.06995715200901031,
-1.3289207220077515,
0.591934084892273,
1.1740061044692993,
0.14139625430107117,
1.4051941633224487,
-0.47678688168525696,
0.08701064437627792,
0.42386025190353394,
-0.6275426745414734,
-0.3800165057182312,
-0.6130225658416748,
0.5976881980895996,
0.15124043822288513,
-0.9163290858268738,
-0.15086889266967773,
-0.018590964376926422,
-0.2798554599285126,
0.21576344966888428,
-1.4609545469284058,
-0.17242687940597534,
-0.4342019855976105,
-0.5361661911010742,
-1.0705738067626953,
-0.2533876299858093,
1.3428709506988525,
-0.6669415235519409,
-0.16522856056690216,
0.5616701245307922,
0.41070762276649475,
0.629427969455719,
0.571065366268158,
-0.7510053515434265,
-0.3112518787384033,
-0.4060201346874237,
-0.370894193649292,
0.16707879304885864,
1.3095606565475464,
-0.13026271760463715,
-1.0256924629211426,
0.711014986038208,
-0.3403661549091339,
-0.015803899616003036,
1.8948438167572021,
0.0764017105102539,
-0.782400369644165,
0.3020789623260498,
-0.7885918021202087,
1.8821067810058594,
1.6842014789581299,
1.176005482673645,
-0.031437136232852936,
-0.9676724076271057,
0.5684452652931213,
-0.3479136526584625,
-0.5033550262451172,
0.7390843629837036,
0.3769592046737671,
-0.26032519340515137,
-1.3293452262878418,
0.8330155611038208,
1.3169084787368774,
-0.9096585512161255,
-0.908497154712677,
0.10581035912036896,
-0.8045451641082764,
1.004594326019287,
0.6002492904663086,
0.38894858956336975,
0.3842427730560303,
1.6987088918685913,
0.6675880551338196,
-0.40025386214256287,
0.38924434781074524,
0.6567397117614746,
-0.18316134810447693,
-2.0822291374206543,
-1.3483304977416992,
0.2883790135383606,
-0.5912981629371643,
-1.6130976676940918,
1.353667140007019,
-1.0802407264709473,
-0.8966079950332642,
0.5276383757591248,
0.19584403932094574,
1.4863475561141968,
0.47845974564552307,
1.6749902963638306,
2.01456618309021,
0.7532176971435547,
0.436747670173645,
1.3545607328414917,
-0.08931752294301987,
-0.4643028974533081,
1.88002610206604,
-0.45804235339164734,
0.5517137050628662,
1.1327331066131592,
-0.2723972499370575,
-1.2180650234222412,
-0.8437353372573853,
-1.2948851585388184,
-0.7541062235832214,
1.0795038938522339,
0.04924139380455017,
-1.2496782541275024,
0.2141449749469757,
1.6243375539779663,
0.16050401329994202,
-0.37745600938796997,
0.48069146275520325,
0.2862170934677124,
-0.8234977126121521,
-0.09200946241617203,
-1.1331264972686768,
0.5680467486381531,
-0.20392751693725586,
-0.2740132212638855,
0.30446287989616394,
0.5493225455284119,
1.3189674615859985,
-0.039685364812612534,
0.17034685611724854,
1.1386440992355347,
-1.4479663372039795,
1.4860281944274902,
-0.6285120844841003,
0.269606351852417,
-2.349945068359375,
1.4919164180755615,
-0.7451848983764648,
1.9236204624176025,
-2.6857967376708984,
0.34282025694847107,
-0.4872026741504669,
-0.483216792345047,
0.2381546050310135,
-0.20388007164001465,
0.20756644010543823,
-0.14288140833377838,
-1.233941912651062,
0.12566612660884857,
-0.6537496447563171,
0.6256588697433472,
1.1194087266921997,
1.5181442499160767,
-1.195320963859558,
-0.2994120419025421,
-1.7728146314620972,
-0.07009700685739517,
-0.7136892080307007,
0.3508639633655548,
-1.9793025255203247,
-0.027583450078964233,
-1.749083161354065,
-2.4356534481048584,
-1.3466365337371826,
-0.7286480665206909,
1.0936368703842163,
0.050649385899305344,
-0.807748556137085,
1.2340269088745117,
-0.31623780727386475,
-1.8336092233657837,
1.1329588890075684,
-2.1406643390655518
] |
https://github.com/huggingface/datasets/issues/3448 | JSONDecodeError with HuggingFace dataset viewer | Hi ! I think the issue comes from the dataset_infos.json file: it has the "flat" field twice.
Can you try deleting this file and regenerating it please ? | ## Dataset viewer issue for 'pubmed_neg'
**Link:** https://huggingface.co/datasets/IGESML/pubmed_neg
I am getting the error:
Status code: 400
Exception: JSONDecodeError
Message: Expecting property name enclosed in double quotes: line 61 column 2 (char 1202)
I have checked all files - I am not using single quotes anywhere. Not sure what is causing this issue.
Am I the one who added this dataset ? Yes
| 1,048 | 28 | JSONDecodeError with HuggingFace dataset viewer
## Dataset viewer issue for 'pubmed_neg'
**Link:** https://huggingface.co/datasets/IGESML/pubmed_neg
I am getting the error:
Status code: 400
Exception: JSONDecodeError
Message: Expecting property name enclosed in double quotes: line 61 column 2 (char 1202)
I have checked all files - I am not using single quotes anywhere. Not sure what is causing this issue.
Am I the one who added this dataset ? Yes
Hi ! I think the issue comes from the dataset_infos.json file: it has the "flat" field twice.
Can you try deleting this file and regenerating it please ? | [
-1.2161409854888916,
-0.9272169470787048,
-0.8509913682937622,
1.4957696199417114,
-0.264835000038147,
-1.3012993335723877,
0.0948319360613823,
-1.0590105056762695,
1.646512508392334,
-0.6425424218177795,
0.3631484806537628,
-1.6988683938980103,
0.02141735702753067,
-0.4470374584197998,
-0.7410560250282288,
-0.9562681317329407,
-0.4570966064929962,
-0.845613956451416,
1.0873055458068848,
2.480891704559326,
1.1752690076828003,
-1.4798544645309448,
2.7863762378692627,
0.5918198227882385,
-0.2443966567516327,
-1.1164592504501343,
0.6173266768455505,
0.1849730759859085,
-1.1368024349212646,
-0.500455915927887,
-0.9048667550086975,
-0.09892520308494568,
-0.42482706904411316,
-0.4339441657066345,
-0.029602963477373123,
0.44192948937416077,
-0.11837036162614822,
-0.36538442969322205,
-0.5348449349403381,
-0.6859831213951111,
0.48309025168418884,
-0.30878251791000366,
0.8368532061576843,
-0.4470278024673462,
1.8802087306976318,
-0.425187885761261,
0.3144930899143219,
0.846630871295929,
1.3984980583190918,
0.21110475063323975,
-0.09185255318880081,
0.22404655814170837,
0.40551236271858215,
-0.15742169320583344,
0.37448975443840027,
1.1378612518310547,
0.5119268894195557,
0.556300699710846,
0.6453261971473694,
-2.1253409385681152,
1.3495286703109741,
-1.0211809873580933,
0.3604801595211029,
1.453538417816162,
-1.1718029975891113,
0.3747238516807556,
-1.771233081817627,
-0.01152113638818264,
0.5717417597770691,
-2.222399950027466,
0.2263200432062149,
-1.1711452007293701,
-0.5489363074302673,
1.0537482500076294,
0.21957358717918396,
-1.2558345794677734,
0.028062328696250916,
-0.44040483236312866,
1.1349343061447144,
0.433463454246521,
1.2224609851837158,
-1.620617389678955,
0.13335281610488892,
-0.3621886372566223,
0.0010585030540823936,
-1.3999899625778198,
-1.5058976411819458,
0.5040876865386963,
0.5570526123046875,
0.6639469861984253,
-0.025705039501190186,
0.9620177149772644,
-1.0033066272735596,
0.9482245445251465,
-0.8758276700973511,
-1.5103099346160889,
-1.4400475025177002,
-2.3380205631256104,
-2.279073715209961,
0.7935994863510132,
-0.5072595477104187,
-0.5091907978057861,
2.055539608001709,
-1.0586968660354614,
-1.7351077795028687,
1.2146449089050293,
0.21828700602054596,
0.08588166534900665,
2.340611457824707,
0.3177054822444916,
-0.7179138660430908,
0.3439542055130005,
-0.8148337006568909,
0.8091115951538086,
-0.3617587983608246,
1.4191571474075317,
0.5613803863525391,
-0.9443953037261963,
1.5956275463104248,
-0.3722591996192932,
0.5958876013755798,
-0.5313931703567505,
-0.6801601052284241,
-0.8489400744438171,
0.346488893032074,
1.8676711320877075,
-0.3522672653198242,
1.6155591011047363,
-0.3615820109844208,
-1.6644394397735596,
-1.5641653537750244,
0.8590486645698547,
0.5765106678009033,
-0.906069815158844,
0.1628594696521759,
-0.4430735409259796,
0.08008955419063568,
-0.039395809173583984,
1.0323755741119385,
1.1484779119491577,
0.6907490491867065,
-0.2931171953678131,
-0.9033066630363464,
0.2978724241256714,
0.059564437717199326,
-0.588946521282196,
-1.8113240003585815,
-0.2943146228790283,
0.049270182847976685,
0.6522843837738037,
-1.2084280252456665,
1.5927454233169556,
0.9033882021903992,
1.948099970817566,
0.9194945096969604,
-0.26037245988845825,
1.474748134613037,
-0.07961767911911011,
1.7455682754516602,
-0.5515316128730774,
0.6262216567993164,
-0.18076664209365845,
-1.0461968183517456,
0.8802576065063477,
-0.38965582847595215,
-2.078489065170288,
-0.8849359750747681,
-0.8873383402824402,
-0.11061577498912811,
-0.7566874623298645,
1.0647917985916138,
-0.2301417738199234,
-1.3999476432800293,
0.23273921012878418,
-0.6214749813079834,
0.15717929601669312,
-1.3118524551391602,
0.32199424505233765,
0.6959574818611145,
-0.6328809857368469,
-0.022719841450452805,
-0.1056549996137619,
-1.2842687368392944,
-0.426356703042984,
0.24293839931488037,
1.9939534664154053,
-0.8039273023605347,
1.0382336378097534,
0.9230961203575134,
-0.7631104588508606,
0.10305574536323547,
0.22661298513412476,
-0.26249009370803833,
0.928193211555481,
-1.0997918844223022,
-0.4250660836696625,
1.0414544343948364,
-0.25853365659713745,
-0.5552101731300354,
1.5174648761749268,
0.7568719983100891,
-1.049601435661316,
-0.2034052461385727,
-0.21947689354419708,
-0.8055102825164795,
-0.09799069166183472,
-1.5988109111785889,
-0.17891636490821838,
0.1435452550649643,
-1.47545325756073,
-0.5041217803955078,
-0.1782640665769577,
1.38212251663208,
-0.1493886113166809,
1.3687788248062134,
-0.3285853862762451,
-0.2644607126712799,
-0.36604583263397217,
-0.4306795299053192,
0.2934492528438568,
-0.22794996201992035,
-0.5588341951370239,
0.18273411691188812,
-0.8836053013801575,
0.25010350346565247,
1.387752652168274,
0.4330086410045624,
-0.010593483224511147,
0.593091607093811,
1.061531662940979,
0.4208805561065674,
-0.0833510011434555,
-0.8477879762649536,
-1.5191731452941895,
2.0394599437713623,
-1.5599772930145264,
2.0139801502227783,
0.7643847465515137,
-0.08304861187934875,
-1.7073158025741577,
-1.928145408630371,
1.438812255859375,
1.2361423969268799,
2.2223973274230957,
0.6228746771812439,
0.33443522453308105,
-0.9157063961029053,
-0.7467960119247437,
0.2759908139705658,
-1.1587384939193726,
-0.6878913044929504,
0.07756831496953964,
2.300421953201294,
1.7816532850265503,
-0.5692669749259949,
-0.23620900511741638,
-0.8796237707138062,
1.1882295608520508,
-0.07603101432323456,
0.14715000987052917,
2.026154041290283,
-0.28015124797821045,
-1.129319190979004,
1.169357180595398,
-2.3490889072418213,
0.09254864603281021,
2.0205705165863037,
0.3757796287536621,
0.09848444908857346,
-1.5123792886734009,
-0.6137568354606628,
-0.1993275135755539,
-0.49301227927207947,
-1.2125632762908936,
0.7318222522735596,
-0.3229849934577942,
-0.8764195442199707,
-1.4248998165130615,
0.18249677121639252,
-1.1017746925354004,
-1.700691819190979,
0.47021886706352234,
1.877397060394287,
2.0815627574920654,
-0.7847631573677063,
1.5371427536010742,
-0.25623905658721924,
0.22861982882022858,
1.262924075126648,
1.1447463035583496,
3.0317800045013428,
1.8633153438568115,
-1.252063274383545,
0.5629289150238037,
-0.1340624988079071,
-0.5493887066841125,
1.086640477180481,
-1.1132477521896362,
1.290367603302002,
-0.18494215607643127,
-1.167437195777893,
-1.2352643013000488,
0.9562225341796875,
0.4842546582221985,
0.07403387129306793,
-0.4545458257198334,
1.331233263015747,
0.05093386769294739,
1.310642123222351,
0.40746060013771057,
-0.2960367202758789,
0.5594971776008606,
-0.42822203040122986,
-0.47348639369010925,
1.595337152481079,
0.19880977272987366,
-1.4903903007507324,
-2.3455307483673096,
-0.3425094187259674,
-0.6622328758239746,
0.005242719314992428,
-0.5478811264038086,
-1.1064634323120117,
1.5831081867218018,
0.540058970451355,
-1.2387895584106445,
-0.4146944284439087,
-0.40358904004096985,
-0.6762754321098328,
2.7046658992767334,
-1.4070696830749512,
-0.14883223176002502,
-0.8747802972793579,
-0.5541460514068604,
1.7530035972595215,
-1.2008687257766724,
-0.22376440465450287,
-1.0467371940612793,
-0.6614573001861572,
-1.3748728036880493,
-0.6384234428405762,
0.021471112966537476,
-0.9537767767906189,
0.8031100034713745,
0.12547720968723297,
-1.0083216428756714,
-0.23893870413303375,
-0.8650445938110352,
0.8237249255180359,
-0.10243063420057297,
0.36245083808898926,
1.8929049968719482,
0.24589452147483826,
-0.4027629792690277,
0.6979408860206604,
1.1213905811309814,
0.706383228302002,
-0.6664893627166748,
0.16446776688098907,
-0.6890422105789185,
0.34212955832481384,
-1.291425108909607,
0.19242583215236664,
-3.0006611347198486,
0.7163519263267517,
-0.04884772002696991,
0.013582979328930378,
-0.06546656787395477,
-1.2588891983032227,
1.1358327865600586,
2.5955615043640137,
-1.1428349018096924,
0.5156381130218506,
0.40070658922195435,
1.145790696144104,
-1.6013063192367554,
0.38924458622932434,
-0.44259053468704224,
2.181631326675415,
0.13815994560718536,
1.3196446895599365,
-0.4780958890914917,
-2.179121255874634,
0.7117965817451477,
-1.2851626873016357,
-1.1739213466644287,
0.6558942198753357,
-0.8998690247535706,
0.06837059557437897,
-1.4420469999313354,
-0.19171738624572754,
-0.9771515130996704,
-1.2399351596832275,
0.7272549867630005,
0.2193612903356552,
0.31848183274269104,
-0.6281676888465881,
0.30149364471435547,
-2.1794822216033936,
-1.4074376821517944,
-0.2180074155330658,
-1.078374981880188,
0.41535213589668274,
-0.3630450665950775,
0.6608854532241821,
-0.14417734742164612,
0.1430504322052002,
0.3052014708518982,
1.4290953874588013,
3.4076526165008545,
0.18104791641235352,
0.3323558270931244,
-0.10804442316293716,
-0.9170840978622437,
1.5657832622528076,
1.0006873607635498,
-0.05931181460618973,
-0.645317792892456,
-1.08634614944458,
1.2574405670166016,
2.012564182281494,
1.0069133043289185,
0.02595902979373932,
-0.8129395842552185,
-0.6238076090812683,
-0.030326057225465775,
0.26737600564956665,
0.6515912413597107,
0.9040561318397522,
-0.02635158598423004,
0.03443581238389015,
1.4882001876831055,
1.1458121538162231,
-0.46350279450416565,
0.3676620423793793,
-0.9152786731719971,
-0.36938992142677307,
0.4163792133331299,
0.3343038856983185,
0.031713418662548065,
0.4385303258895874,
-0.9181387424468994,
-0.29904186725616455,
-0.21905943751335144,
-0.9962048530578613,
-0.6742866039276123,
-0.3608262240886688,
-0.4057372808456421,
1.622708797454834,
0.14147590100765228,
-0.5568138360977173,
-0.10019125044345856,
-0.7455345392227173,
-0.1345016211271286,
-1.0771443843841553,
0.2704288363456726,
-0.09980771690607071,
0.026264827698469162,
-0.14504410326480865,
1.8256230354309082,
-1.0248911380767822,
-2.270681619644165,
0.34005504846572876,
0.33655253052711487,
-0.36341777443885803,
0.15953628718852997,
1.4879848957061768,
0.5676766633987427,
1.3488136529922485,
1.261151909828186,
0.9622536897659302,
-0.7362879514694214,
-1.3279685974121094,
0.6178017258644104,
1.0155760049819946,
-1.3919252157211304,
0.7117303609848022,
-0.027917832136154175,
-0.45720744132995605,
0.636537492275238,
1.4379831552505493,
0.5428829193115234,
-1.9793645143508911,
0.8627980351448059,
-0.7406430840492249,
0.92385333776474,
0.6462840437889099,
0.7714967727661133,
0.28770777583122253,
0.8244540691375732,
-1.2445839643478394,
-1.1405222415924072,
-0.8472058176994324,
-0.6707543134689331,
1.902506709098816,
-0.2751578688621521,
0.670514702796936,
-0.14909596741199493,
-1.1638625860214233,
-0.11631350964307785,
0.5974071621894836,
0.26700034737586975,
-0.2211533486843109,
0.8674989938735962,
-0.6168637871742249,
-1.1611807346343994,
-1.3398772478103638,
-0.30175796151161194,
-0.9543870091438293,
-0.978878378868103,
1.0126692056655884,
0.6961553692817688,
0.3034965395927429,
1.8841465711593628,
0.5563645362854004,
0.2407514899969101,
-2.6827430725097656,
0.981235682964325,
0.26691174507141113,
0.019842535257339478,
0.8923909068107605,
0.2804613709449768,
1.1037029027938843,
-0.007317251525819302,
0.4607733190059662,
-2.26570463180542,
2.2255308628082275,
-0.22810696065425873,
0.722113847732544,
0.022890277206897736,
-0.28663167357444763,
1.2437862157821655,
0.5389522314071655,
0.6000669598579407,
-1.099239468574524,
0.718734085559845,
-0.6145637631416321,
1.174351453781128,
0.9532751441001892,
-0.7102760672569275,
0.011080141179263592,
1.258768916130066,
0.6043674945831299,
-0.4168432354927063,
-0.9893990159034729,
-0.8364391922950745,
0.9774723649024963,
1.73665189743042,
-0.01726357638835907,
-0.0677737221121788,
0.7408325672149658,
0.7015857100486755,
-1.167849063873291,
0.08509626239538193,
-0.7503852248191833,
-0.6773474216461182,
1.6944520473480225,
2.049177646636963,
0.023293785750865936,
-0.2583867013454437,
-0.8144745826721191,
-1.2077479362487793,
0.7545257806777954,
-0.1324826180934906,
0.16402269899845123,
0.6259183287620544,
-0.6959673166275024,
1.1648222208023071,
0.7762370705604553,
0.8710158467292786,
0.008907015435397625,
0.41975241899490356,
0.36650875210762024,
-0.17843075096607208,
-1.195852279663086,
-0.37560248374938965,
-1.1363259553909302,
-2.424224615097046,
0.40211331844329834,
-0.3119088411331177,
-1.2443428039550781,
-0.034058693796396255,
-1.0657023191452026,
0.9343998432159424,
-0.5564062595367432,
-1.0805360078811646,
-1.5545530319213867,
0.13319852948188782,
-0.12077751755714417,
0.9438691735267639,
-1.5474510192871094,
-0.16568775475025177,
1.419192910194397,
0.8669388890266418,
-0.7487823367118835,
1.0070785284042358,
0.12447632849216461,
0.9940662980079651,
0.6933741569519043,
-0.469804584980011,
0.5917145609855652,
0.15942105650901794,
-1.39848792552948,
0.6201902627944946,
1.1667120456695557,
0.11108297854661942,
1.478454828262329,
-0.5333245992660522,
-0.03852510079741478,
0.5488426685333252,
-0.6263874173164368,
-0.5722962021827698,
-0.5243264436721802,
0.7952602505683899,
0.0472886748611927,
-0.9906331896781921,
0.08426862210035324,
-0.16590455174446106,
-0.21928027272224426,
0.3021780848503113,
-1.560465931892395,
-0.3467504680156708,
-0.394205778837204,
-0.4742051362991333,
-1.3270752429962158,
-0.060930851846933365,
1.3732043504714966,
-0.6876012086868286,
-0.24443376064300537,
0.48003777861595154,
0.48347339034080505,
0.4600100815296173,
0.595231831073761,
-0.6611576080322266,
-0.3160402178764343,
-0.31663063168525696,
-0.2871798872947693,
0.3392423391342163,
1.076768398284912,
-0.24273739755153656,
-1.036137342453003,
0.6743036508560181,
-0.3037624955177307,
0.03771120309829712,
1.9531359672546387,
0.09735233336687088,
-0.7181777954101562,
0.42565786838531494,
-0.7456040382385254,
1.8997827768325806,
1.5281208753585815,
1.3470746278762817,
-0.1853429526090622,
-0.8707985877990723,
0.5236406326293945,
-0.24059078097343445,
-0.36954256892204285,
0.7775699496269226,
0.5549625754356384,
-0.16559982299804688,
-1.4721795320510864,
0.5996869802474976,
1.2882726192474365,
-1.0637195110321045,
-0.8466965556144714,
0.18125468492507935,
-0.8133332133293152,
0.9917680621147156,
0.5930342078208923,
0.4845997989177704,
0.3171447515487671,
1.5751625299453735,
0.6892582178115845,
-0.4831886291503906,
0.34787893295288086,
0.44714999198913574,
-0.14831364154815674,
-2.0077569484710693,
-1.042035460472107,
0.36456871032714844,
-0.6603571772575378,
-1.476118564605713,
1.4442914724349976,
-1.1064443588256836,
-0.9504727125167847,
0.5863797664642334,
0.07152245938777924,
1.3931108713150024,
0.26182863116264343,
1.6522001028060913,
1.9710655212402344,
0.9480259418487549,
0.27865609526634216,
1.3446383476257324,
-0.07410210371017456,
-0.4681996703147888,
1.895531177520752,
-0.46876806020736694,
0.4762097895145416,
1.105215311050415,
-0.409500390291214,
-1.080265998840332,
-0.9077682495117188,
-1.120116114616394,
-0.7106527090072632,
1.0436122417449951,
0.21845437586307526,
-1.2448816299438477,
0.13015232980251312,
1.4281941652297974,
0.2563856244087219,
-0.26821398735046387,
0.5173740983009338,
0.3808962404727936,
-0.8296220898628235,
-0.04964068531990051,
-0.9759716987609863,
0.4790794849395752,
-0.3188350200653076,
-0.39996838569641113,
0.2886495292186737,
0.5050495266914368,
1.3025425672531128,
-0.09459130465984344,
0.11131802201271057,
1.2690051794052124,
-1.373791217803955,
1.4773832559585571,
-0.5350152254104614,
0.2364339977502823,
-2.3984906673431396,
1.4064429998397827,
-0.647957444190979,
1.9981257915496826,
-2.6542885303497314,
0.47559791803359985,
-0.6827667951583862,
-0.27718111872673035,
0.33750802278518677,
-0.31773221492767334,
0.1935167908668518,
-0.17886582016944885,
-1.034401774406433,
-0.030810710042715073,
-0.6981896758079529,
0.550286591053009,
1.2229772806167603,
1.3795298337936401,
-0.9872722625732422,
-0.2793181240558624,
-1.7149118185043335,
-0.2722506821155548,
-0.7207266688346863,
0.34588080644607544,
-2.2133400440216064,
-0.14916883409023285,
-1.958780288696289,
-2.2520668506622314,
-1.345262050628662,
-0.8384318947792053,
1.148787260055542,
0.24107465147972107,
-0.9114145636558533,
1.0879223346710205,
-0.2983654737472534,
-1.5929621458053589,
1.1176944971084595,
-2.0780134201049805
] |
https://github.com/huggingface/datasets/issues/3448 | JSONDecodeError with HuggingFace dataset viewer | Thanks! That fixed that, but now I am getting:
Server Error
Status code: 400
Exception: KeyError
Message: 'feature'
I checked the dataset_infos.json and pubmed_neg.py script, I don't use 'feature' anywhere as a key. Is the dataset viewer expecting that I do? | ## Dataset viewer issue for 'pubmed_neg'
**Link:** https://huggingface.co/datasets/IGESML/pubmed_neg
I am getting the error:
Status code: 400
Exception: JSONDecodeError
Message: Expecting property name enclosed in double quotes: line 61 column 2 (char 1202)
I have checked all files - I am not using single quotes anywhere. Not sure what is causing this issue.
Am I the one who added this dataset ? Yes
| 1,048 | 41 | JSONDecodeError with HuggingFace dataset viewer
## Dataset viewer issue for 'pubmed_neg'
**Link:** https://huggingface.co/datasets/IGESML/pubmed_neg
I am getting the error:
Status code: 400
Exception: JSONDecodeError
Message: Expecting property name enclosed in double quotes: line 61 column 2 (char 1202)
I have checked all files - I am not using single quotes anywhere. Not sure what is causing this issue.
Am I the one who added this dataset ? Yes
Thanks! That fixed that, but now I am getting:
Server Error
Status code: 400
Exception: KeyError
Message: 'feature'
I checked the dataset_infos.json and pubmed_neg.py script, I don't use 'feature' anywhere as a key. Is the dataset viewer expecting that I do? | [
-1.2619680166244507,
-0.9738485217094421,
-0.8586421608924866,
1.4091025590896606,
-0.26587581634521484,
-1.2829627990722656,
0.04006031155586243,
-1.0784406661987305,
1.6151585578918457,
-0.6465967297554016,
0.3134849965572357,
-1.7291655540466309,
-0.009752306155860424,
-0.49015113711357117,
-0.7228220105171204,
-0.8940118551254272,
-0.3922829031944275,
-0.8788837790489197,
1.096144437789917,
2.523353099822998,
1.1207963228225708,
-1.5281795263290405,
2.789541482925415,
0.665860116481781,
-0.20900091528892517,
-1.178154706954956,
0.6079798340797424,
0.11571616679430008,
-1.1549285650253296,
-0.45202142000198364,
-0.9255749583244324,
-0.08620654046535492,
-0.4410971403121948,
-0.4335017204284668,
-0.022599589079618454,
0.37638649344444275,
-0.10675083100795746,
-0.40392005443573,
-0.5010495781898499,
-0.64274662733078,
0.46163204312324524,
-0.3272504508495331,
0.8253512978553772,
-0.4179776608943939,
1.8780450820922852,
-0.3934420049190521,
0.3603040277957916,
0.8517563343048096,
1.4260799884796143,
0.1830255389213562,
-0.09134239703416824,
0.26373639702796936,
0.419642835855484,
-0.11118972301483154,
0.3823765516281128,
1.1164435148239136,
0.5336141586303711,
0.4748140275478363,
0.6281156539916992,
-2.219343900680542,
1.297338843345642,
-1.0258005857467651,
0.38782545924186707,
1.510727047920227,
-1.1878719329833984,
0.3761204481124878,
-1.8052699565887451,
0.023840073496103287,
0.5815271139144897,
-2.153688430786133,
0.25786057114601135,
-1.1862818002700806,
-0.617696225643158,
0.9820756316184998,
0.23423224687576294,
-1.241163730621338,
0.09142614156007767,
-0.4153316915035248,
1.1476775407791138,
0.5189611315727234,
1.246203064918518,
-1.605488896369934,
0.12485910207033157,
-0.32091036438941956,
0.050707608461380005,
-1.4075018167495728,
-1.5356239080429077,
0.5429127812385559,
0.6039209365844727,
0.6515903472900391,
-0.03416607528924942,
0.9589123725891113,
-1.0096834897994995,
0.982358992099762,
-0.9613447785377502,
-1.5739030838012695,
-1.4443706274032593,
-2.3795883655548096,
-2.2633509635925293,
0.8162978887557983,
-0.47036778926849365,
-0.4885954260826111,
2.066002130508423,
-1.0299838781356812,
-1.7462496757507324,
1.2779793739318848,
0.2694055140018463,
0.0999244898557663,
2.3429179191589355,
0.35154208540916443,
-0.7141162157058716,
0.3188052773475647,
-0.922379732131958,
0.8716845512390137,
-0.3716912865638733,
1.4756593704223633,
0.6082409620285034,
-0.8064954876899719,
1.58440363407135,
-0.3836507797241211,
0.6013645529747009,
-0.5072932243347168,
-0.5966150164604187,
-0.7942029237747192,
0.35200023651123047,
1.9306753873825073,
-0.30059337615966797,
1.5846784114837646,
-0.4298524260520935,
-1.6479078531265259,
-1.569136381149292,
0.8747740387916565,
0.5378080010414124,
-0.9810610413551331,
0.2670704126358032,
-0.4461338222026825,
0.09378889203071594,
-0.11536625027656555,
1.041745662689209,
1.1962512731552124,
0.6543332934379578,
-0.32957345247268677,
-0.9377283453941345,
0.27463600039482117,
0.032875508069992065,
-0.6281227469444275,
-1.8031584024429321,
-0.32474416494369507,
0.026673253625631332,
0.6899747848510742,
-1.1868009567260742,
1.6188935041427612,
0.9200842380523682,
1.8943361043930054,
0.9289951324462891,
-0.27337250113487244,
1.4753001928329468,
-0.06428763270378113,
1.7569712400436401,
-0.6023727059364319,
0.6147168278694153,
-0.23194187879562378,
-1.0370792150497437,
0.9013305306434631,
-0.3899783790111542,
-2.1224894523620605,
-0.8175102472305298,
-0.9309836626052856,
-0.17422616481781006,
-0.7752290368080139,
0.9803701043128967,
-0.2499811053276062,
-1.4240679740905762,
0.23557889461517334,
-0.6561284065246582,
0.1952616572380066,
-1.281578540802002,
0.3335873782634735,
0.7265360951423645,
-0.5935913920402527,
-0.02225501835346222,
-0.16408172249794006,
-1.243876338005066,
-0.4216533899307251,
0.3234104514122009,
1.9392380714416504,
-0.7488834261894226,
0.9822595119476318,
0.9543891549110413,
-0.7046976685523987,
0.12258448451757431,
0.21576771140098572,
-0.21185290813446045,
0.899943470954895,
-1.0420833826065063,
-0.41440775990486145,
1.0749363899230957,
-0.2575189769268036,
-0.5637056827545166,
1.4956305027008057,
0.8022148609161377,
-1.0171706676483154,
-0.20315933227539062,
-0.21125808358192444,
-0.8179774284362793,
-0.12817460298538208,
-1.6367400884628296,
-0.24115127325057983,
0.17238685488700867,
-1.481580138206482,
-0.5254219770431519,
-0.23333528637886047,
1.3885825872421265,
-0.11484090983867645,
1.3458163738250732,
-0.3718951642513275,
-0.23335066437721252,
-0.32442519068717957,
-0.4474734961986542,
0.3477908670902252,
-0.2601364552974701,
-0.5200257301330566,
0.1252376139163971,
-0.9205110669136047,
0.30894404649734497,
1.3767001628875732,
0.4133731424808502,
0.03783562779426575,
0.5626484155654907,
1.0525169372558594,
0.41335293650627136,
-0.029882408678531647,
-0.8557949066162109,
-1.4974753856658936,
2.023819923400879,
-1.549353837966919,
1.9891210794448853,
0.7449275851249695,
-0.023512765765190125,
-1.7876973152160645,
-1.9173352718353271,
1.423633337020874,
1.1873854398727417,
2.1290745735168457,
0.65725177526474,
0.2976328134536743,
-0.9403651356697083,
-0.6998132467269897,
0.2925069034099579,
-1.0206923484802246,
-0.674239456653595,
0.062191545963287354,
2.304065227508545,
1.8396655321121216,
-0.6151413917541504,
-0.18422499299049377,
-0.8701521158218384,
1.2442001104354858,
-0.13297097384929657,
0.23883876204490662,
2.0681889057159424,
-0.33241647481918335,
-1.072756052017212,
1.224597454071045,
-2.469558000564575,
0.09845113009214401,
2.024547576904297,
0.32242196798324585,
0.12796133756637573,
-1.4652053117752075,
-0.6353033781051636,
-0.164138525724411,
-0.4880381226539612,
-1.1275475025177002,
0.6483338475227356,
-0.36718353629112244,
-0.8456149101257324,
-1.4480342864990234,
0.17131656408309937,
-1.104145884513855,
-1.7114593982696533,
0.43354368209838867,
1.8410308361053467,
2.064934730529785,
-0.7835691571235657,
1.5588735342025757,
-0.29748374223709106,
0.2394188940525055,
1.318527102470398,
1.1670559644699097,
2.97794508934021,
1.879477858543396,
-1.2138994932174683,
0.609725832939148,
-0.11226030439138412,
-0.5342693328857422,
1.0884456634521484,
-1.0399150848388672,
1.216213345527649,
-0.1516095995903015,
-1.1401832103729248,
-1.204609990119934,
0.9880520701408386,
0.47371959686279297,
0.10151644051074982,
-0.5027197003364563,
1.3101110458374023,
0.03307879716157913,
1.2630430459976196,
0.4794200360774994,
-0.318920761346817,
0.5186277031898499,
-0.44163358211517334,
-0.45735296607017517,
1.5818443298339844,
0.18003937602043152,
-1.5297859907150269,
-2.3018643856048584,
-0.3953208327293396,
-0.6666392087936401,
-0.026577310636639595,
-0.5626077651977539,
-1.145664930343628,
1.5618306398391724,
0.45424458384513855,
-1.2499390840530396,
-0.354543000459671,
-0.407981276512146,
-0.5867025256156921,
2.643784999847412,
-1.3699430227279663,
-0.23855063319206238,
-0.8477094173431396,
-0.5272205471992493,
1.6970484256744385,
-1.2011057138442993,
-0.16324394941329956,
-1.134437918663025,
-0.6547843217849731,
-1.3916847705841064,
-0.6316915154457092,
-0.00982721708714962,
-0.9445152878761292,
0.8135132193565369,
0.10939314216375351,
-0.99448561668396,
-0.21549394726753235,
-0.9042920470237732,
0.8335847854614258,
-0.16869476437568665,
0.3970975875854492,
1.8956152200698853,
0.28544360399246216,
-0.41316676139831543,
0.7216966152191162,
1.134710669517517,
0.6937208771705627,
-0.6706511378288269,
0.17725113034248352,
-0.6390894055366516,
0.37211140990257263,
-1.2735344171524048,
0.20306026935577393,
-3.011103868484497,
0.7253192067146301,
-0.018336573615670204,
-0.03329504281282425,
-0.07606983184814453,
-1.3652737140655518,
1.148239254951477,
2.605184316635132,
-1.2409796714782715,
0.5338813662528992,
0.3724607527256012,
1.2233036756515503,
-1.5621857643127441,
0.3940194547176361,
-0.36648547649383545,
2.1732356548309326,
0.11446722596883774,
1.307867407798767,
-0.4764040410518646,
-2.2402994632720947,
0.7017166018486023,
-1.258815884590149,
-1.1801317930221558,
0.6377542018890381,
-0.8822083473205566,
0.11464792490005493,
-1.501975655555725,
-0.178204745054245,
-0.947651207447052,
-1.1775442361831665,
0.7869303226470947,
0.2614014744758606,
0.318995863199234,
-0.6653003096580505,
0.31720271706581116,
-2.209325075149536,
-1.4277591705322266,
-0.12924423813819885,
-1.0344372987747192,
0.46467676758766174,
-0.35319486260414124,
0.6038431525230408,
-0.11515854299068451,
0.18117785453796387,
0.2904006540775299,
1.446238398551941,
3.4797980785369873,
0.16643786430358887,
0.3732689917087555,
-0.11674854159355164,
-0.8967886567115784,
1.5971877574920654,
0.9182191491127014,
-0.0014358190819621086,
-0.5717519521713257,
-1.1096245050430298,
1.275578260421753,
2.0410876274108887,
0.9997141361236572,
0.02240997552871704,
-0.7317427396774292,
-0.5992085337638855,
-0.04918936640024185,
0.22207477688789368,
0.6227349638938904,
0.8910984992980957,
-0.08086416125297546,
0.08404810726642609,
1.4465827941894531,
1.1540132761001587,
-0.5064607262611389,
0.43368983268737793,
-0.9309371113777161,
-0.43651705980300903,
0.40027910470962524,
0.27926328778266907,
0.026074688881635666,
0.42486560344696045,
-0.9383984804153442,
-0.27669191360473633,
-0.2140454649925232,
-0.936252236366272,
-0.6032490134239197,
-0.37806883454322815,
-0.39850306510925293,
1.537933111190796,
0.21360471844673157,
-0.5219054818153381,
-0.13578808307647705,
-0.7331502437591553,
-0.12307846546173096,
-1.0831366777420044,
0.16160976886749268,
-0.14278316497802734,
0.01526639610528946,
-0.1788344383239746,
1.780591607093811,
-1.0029356479644775,
-2.1895949840545654,
0.2876645624637604,
0.33194684982299805,
-0.3726654648780823,
0.22451293468475342,
1.5342665910720825,
0.6013001203536987,
1.3547860383987427,
1.2851157188415527,
1.0150043964385986,
-0.6649376153945923,
-1.2702730894088745,
0.6861904859542847,
0.9105105400085449,
-1.3202704191207886,
0.734967827796936,
-0.008935032412409782,
-0.48460811376571655,
0.6922371983528137,
1.4725582599639893,
0.5166212320327759,
-1.9619135856628418,
0.8279134035110474,
-0.7811599969863892,
0.9669868350028992,
0.662043035030365,
0.7718963027000427,
0.2741974890232086,
0.8889521956443787,
-1.2115522623062134,
-1.1100305318832397,
-0.9155439734458923,
-0.673729658126831,
1.958160638809204,
-0.27960503101348877,
0.6075983047485352,
-0.17053258419036865,
-1.2051703929901123,
-0.10909148305654526,
0.627241313457489,
0.27535900473594666,
-0.224071204662323,
0.8438847064971924,
-0.6443617939949036,
-1.2173593044281006,
-1.3328466415405273,
-0.30818381905555725,
-0.8859819769859314,
-0.9537522792816162,
1.0512877702713013,
0.7026818990707397,
0.25288712978363037,
1.9008233547210693,
0.5117403268814087,
0.19228383898735046,
-2.645465612411499,
0.9661139845848083,
0.20745939016342163,
0.02480706200003624,
0.8974124193191528,
0.2537170350551605,
1.1414799690246582,
-0.004682822152972221,
0.4649110436439514,
-2.2194101810455322,
2.190906286239624,
-0.21208930015563965,
0.7333404421806335,
0.005610371008515358,
-0.1553495228290558,
1.2180335521697998,
0.5371371507644653,
0.6038761734962463,
-1.0987751483917236,
0.7300925254821777,
-0.6178524494171143,
1.190431833267212,
1.0577683448791504,
-0.7060657143592834,
0.018659882247447968,
1.3147175312042236,
0.5334982872009277,
-0.5314244031906128,
-0.981331467628479,
-0.8459405303001404,
0.9760070443153381,
1.7189130783081055,
-0.03737787902355194,
-0.09108481556177139,
0.6927196383476257,
0.751349925994873,
-1.2316815853118896,
0.05574003607034683,
-0.7139626145362854,
-0.6761534214019775,
1.6768057346343994,
2.0687694549560547,
-0.07590695470571518,
-0.18208518624305725,
-0.7603256106376648,
-1.3519312143325806,
0.7225664854049683,
-0.15537256002426147,
0.08764644712209702,
0.5962212681770325,
-0.6396777033805847,
1.1428155899047852,
0.739052951335907,
0.839061439037323,
0.003738177940249443,
0.38450777530670166,
0.3120415508747101,
-0.20415177941322327,
-1.133913278579712,
-0.4198954105377197,
-1.1572139263153076,
-2.412046194076538,
0.4418279826641083,
-0.27917543053627014,
-1.296993374824524,
-0.06043792515993118,
-1.0408082008361816,
1.0345267057418823,
-0.546051561832428,
-1.035987377166748,
-1.5541242361068726,
0.1662272810935974,
-0.057475943118333817,
0.941309928894043,
-1.552346110343933,
-0.1618543267250061,
1.4036345481872559,
0.8228229880332947,
-0.7225815653800964,
1.0466887950897217,
0.17291295528411865,
1.0171093940734863,
0.6730965375900269,
-0.5143715739250183,
0.5613913536071777,
0.11645322293043137,
-1.4083939790725708,
0.6094287037849426,
1.1535815000534058,
0.09298665076494217,
1.470833659172058,
-0.47793954610824585,
-0.05632040649652481,
0.5466573238372803,
-0.6542471647262573,
-0.5682393908500671,
-0.46972960233688354,
0.7831581830978394,
0.024334605783224106,
-0.9912583231925964,
0.022583436220884323,
-0.1025364026427269,
-0.204179584980011,
0.3082886040210724,
-1.5785579681396484,
-0.30081868171691895,
-0.42827320098876953,
-0.46820035576820374,
-1.3611091375350952,
-0.0827125534415245,
1.4604967832565308,
-0.6383289694786072,
-0.2528958022594452,
0.4708775579929352,
0.47791290283203125,
0.4482552111148834,
0.6211071610450745,
-0.6199615001678467,
-0.2961426079273224,
-0.3347521126270294,
-0.28203511238098145,
0.2912653386592865,
1.0697444677352905,
-0.26153430342674255,
-1.0975254774093628,
0.658355176448822,
-0.31594401597976685,
0.06015283614397049,
1.923832893371582,
0.05059978738427162,
-0.7852635383605957,
0.40944525599479675,
-0.7183037996292114,
1.8829329013824463,
1.5716749429702759,
1.39213228225708,
-0.18592417240142822,
-0.8914611339569092,
0.5184047818183899,
-0.2380087673664093,
-0.31362998485565186,
0.7829189300537109,
0.53596431016922,
-0.15204975008964539,
-1.3668467998504639,
0.5957638025283813,
1.2630664110183716,
-1.042892336845398,
-0.8533218502998352,
0.19695013761520386,
-0.8346855640411377,
1.0644067525863647,
0.5780519843101501,
0.5227445960044861,
0.2831916809082031,
1.6027737855911255,
0.6797997951507568,
-0.535069465637207,
0.4459993541240692,
0.4712582230567932,
-0.1375628113746643,
-1.9925826787948608,
-1.0197821855545044,
0.28867286443710327,
-0.6117720603942871,
-1.5693610906600952,
1.3795255422592163,
-1.154847502708435,
-0.9155946969985962,
0.5884084105491638,
0.0993923470377922,
1.3473306894302368,
0.3107846975326538,
1.6392964124679565,
1.9270379543304443,
0.8914800882339478,
0.35431981086730957,
1.3043183088302612,
-0.10743865370750427,
-0.4422382116317749,
1.8931207656860352,
-0.4100508391857147,
0.4713907241821289,
1.1378240585327148,
-0.3983098268508911,
-1.0794825553894043,
-0.8988688588142395,
-1.1182630062103271,
-0.7161819338798523,
1.103449821472168,
0.1788138449192047,
-1.290640950202942,
0.12264009565114975,
1.4656273126602173,
0.18494004011154175,
-0.27265703678131104,
0.5598160624504089,
0.38867679238319397,
-0.8733361959457397,
-0.007380143739283085,
-1.0204417705535889,
0.41699767112731934,
-0.28935325145721436,
-0.42351141571998596,
0.34517577290534973,
0.4715631306171417,
1.2911323308944702,
-0.06570558249950409,
0.14394038915634155,
1.2773994207382202,
-1.3906415700912476,
1.4480805397033691,
-0.4903516173362732,
0.22988852858543396,
-2.3344106674194336,
1.3317965269088745,
-0.6752774119377136,
2.0389671325683594,
-2.693617820739746,
0.37473270297050476,
-0.6952294111251831,
-0.31211477518081665,
0.2759072780609131,
-0.32914870977401733,
0.10096472501754761,
-0.12441612035036087,
-1.0582139492034912,
-0.03605007007718086,
-0.7281825542449951,
0.5103719234466553,
1.235792875289917,
1.343876838684082,
-1.0121326446533203,
-0.2681330144405365,
-1.7074717283248901,
-0.2841523289680481,
-0.8029871582984924,
0.3402135670185089,
-2.223383903503418,
-0.17324447631835938,
-1.9792762994766235,
-2.2406110763549805,
-1.2855916023254395,
-0.8877037167549133,
1.130816102027893,
0.17130440473556519,
-0.8929768800735474,
1.0480157136917114,
-0.2834775447845459,
-1.6215267181396484,
1.1288284063339233,
-1.9769963026046753
] |
https://github.com/huggingface/datasets/issues/3448 | JSONDecodeError with HuggingFace dataset viewer | It seems that the `feature` key is missing from some feature type definition in your dataset_infos.json:
```json
"tokens": {
"dtype": "list",
"id": null,
"_type": "Sequence"
},
"tags": {
"dtype": "list",
"id": null,
"_type": "Sequence"
}
```
They should be
```json
"tokens": {
"dtype": "list",
"id": null,
"_type": "Sequence"
"feature": {"dtype": "string", "id": null, "_type": "Value"}
},
"tags": {
"dtype": "list",
"id": null,
"_type": "Sequence",
"feature": {"num_classes": 5, "names": ["-", "S", "H", "N", "C"], "names_file": null, "id": null, "_type": "ClassLabel"}
}
```
Note that you can generate the dataset_infos.json automatically to avoid mistakes:
```bash
datasets-cli test ./path/to/dataset --save_infos
``` | ## Dataset viewer issue for 'pubmed_neg'
**Link:** https://huggingface.co/datasets/IGESML/pubmed_neg
I am getting the error:
Status code: 400
Exception: JSONDecodeError
Message: Expecting property name enclosed in double quotes: line 61 column 2 (char 1202)
I have checked all files - I am not using single quotes anywhere. Not sure what is causing this issue.
Am I the one who added this dataset ? Yes
| 1,048 | 98 | JSONDecodeError with HuggingFace dataset viewer
## Dataset viewer issue for 'pubmed_neg'
**Link:** https://huggingface.co/datasets/IGESML/pubmed_neg
I am getting the error:
Status code: 400
Exception: JSONDecodeError
Message: Expecting property name enclosed in double quotes: line 61 column 2 (char 1202)
I have checked all files - I am not using single quotes anywhere. Not sure what is causing this issue.
Am I the one who added this dataset ? Yes
It seems that the `feature` key is missing from some feature type definition in your dataset_infos.json:
```json
"tokens": {
"dtype": "list",
"id": null,
"_type": "Sequence"
},
"tags": {
"dtype": "list",
"id": null,
"_type": "Sequence"
}
```
They should be
```json
"tokens": {
"dtype": "list",
"id": null,
"_type": "Sequence"
"feature": {"dtype": "string", "id": null, "_type": "Value"}
},
"tags": {
"dtype": "list",
"id": null,
"_type": "Sequence",
"feature": {"num_classes": 5, "names": ["-", "S", "H", "N", "C"], "names_file": null, "id": null, "_type": "ClassLabel"}
}
```
Note that you can generate the dataset_infos.json automatically to avoid mistakes:
```bash
datasets-cli test ./path/to/dataset --save_infos
``` | [
-1.0024412870407104,
-0.8224865198135376,
-0.8522354364395142,
1.5413542985916138,
-0.2555038034915924,
-1.098352313041687,
0.15100044012069702,
-1.2675737142562866,
1.5595499277114868,
-0.596299409866333,
0.47930482029914856,
-1.6620408296585083,
-0.058021701872348785,
-0.6022586822509766,
-0.6987790465354919,
-0.9240326285362244,
-0.464293509721756,
-0.6349688768386841,
0.9257892370223999,
2.5325710773468018,
1.3460086584091187,
-1.3924659490585327,
2.506138324737549,
0.6855313777923584,
-0.07759582996368408,
-0.8429222702980042,
0.6290103197097778,
0.031600095331668854,
-1.027214765548706,
-0.39217129349708557,
-0.8610491156578064,
-0.32414862513542175,
-0.40146586298942566,
-0.5043684244155884,
-0.15236283838748932,
0.6355908513069153,
-0.48806124925613403,
-0.4711226522922516,
-0.8118333220481873,
-0.9399527311325073,
0.4792218804359436,
-0.3974446952342987,
1.021946907043457,
-0.5341947674751282,
1.826310157775879,
-0.576914370059967,
0.5419150590896606,
0.7912787795066833,
1.1859123706817627,
0.44185519218444824,
0.17657199501991272,
0.21776294708251953,
0.438224196434021,
-0.22602185606956482,
0.5409338474273682,
1.1555472612380981,
0.634013831615448,
0.537837028503418,
0.8572155237197876,
-2.104727029800415,
1.0802183151245117,
-1.1866713762283325,
0.06397613137960434,
1.5709993839263916,
-0.7156266570091248,
0.27973291277885437,
-1.9194916486740112,
0.015117943286895752,
0.5784501433372498,
-2.08876895904541,
0.47630494832992554,
-1.2811914682388306,
-0.6390752196311951,
1.08291757106781,
0.3451087176799774,
-1.1147218942642212,
0.05011840909719467,
-0.16721443831920624,
0.809639036655426,
0.36018919944763184,
1.1272897720336914,
-1.612700343132019,
-0.04618952423334122,
-0.35380545258522034,
0.04116085171699524,
-1.2200058698654175,
-1.4658788442611694,
0.571812093257904,
0.29666075110435486,
0.47304779291152954,
-0.0554594025015831,
1.0427443981170654,
-1.1190600395202637,
0.8079396486282349,
-1.1321079730987549,
-1.6675320863723755,
-1.5268099308013916,
-2.225275754928589,
-2.2371973991394043,
0.8420681357383728,
-0.5234602689743042,
-0.4725222885608673,
1.9547924995422363,
-0.7959772348403931,
-1.447599172592163,
1.1150952577590942,
0.4776639938354492,
0.10536214709281921,
2.4235525131225586,
0.3265235126018524,
-0.7143586874008179,
0.5196554660797119,
-0.8221136927604675,
0.693517804145813,
-0.29177337884902954,
1.3553152084350586,
0.4574921131134033,
-0.9888321161270142,
1.6330351829528809,
-0.35076141357421875,
0.7080437541007996,
-0.5267764329910278,
-0.5526268482208252,
-0.5834858417510986,
0.40672171115875244,
1.7103456258773804,
-0.347771018743515,
1.4126120805740356,
-0.12259701639413834,
-1.5375683307647705,
-1.62295663356781,
0.9634110331535339,
0.46829861402511597,
-0.8109462857246399,
0.10082537680864334,
-0.31716498732566833,
0.121133953332901,
-0.40697187185287476,
1.1901822090148926,
1.2484568357467651,
0.8573004603385925,
-0.37020015716552734,
-0.7780458331108093,
0.11338444799184799,
0.0745355486869812,
-0.9863738417625427,
-1.5368746519088745,
-0.345017671585083,
0.2588435709476471,
0.5153950452804565,
-1.2871863842010498,
1.824642539024353,
0.921172559261322,
1.8246067762374878,
0.8775753378868103,
-0.39604654908180237,
1.4883983135223389,
0.0446741059422493,
1.7477538585662842,
-0.5364822149276733,
0.45040765404701233,
-0.2377529740333557,
-1.2231391668319702,
1.0143370628356934,
-0.2647590935230255,
-2.104170322418213,
-0.9482271075248718,
-0.9066858887672424,
-0.19644597172737122,
-0.6591684222221375,
0.9487428069114685,
-0.14823183417320251,
-1.3007001876831055,
0.1387723982334137,
-0.7432634830474854,
-0.20692746341228485,
-1.2732865810394287,
0.39160433411598206,
0.5255365371704102,
-0.7051948308944702,
0.06665222346782684,
0.041486479341983795,
-1.1344844102859497,
-0.45866498351097107,
0.13233080506324768,
2.0948281288146973,
-0.7836297154426575,
0.8625556826591492,
1.088277816772461,
-0.8850660920143127,
0.17425380647182465,
0.21794922649860382,
-0.5357180833816528,
0.8305322527885437,
-1.0571069717407227,
-0.6859021782875061,
1.0953967571258545,
-0.17614932358264923,
-0.6056604981422424,
1.4383060932159424,
0.6005218625068665,
-1.031014323234558,
-0.3508048355579376,
-0.18686871230602264,
-0.651394784450531,
0.09070760011672974,
-1.3698718547821045,
-0.07878083735704422,
0.36798810958862305,
-1.4787591695785522,
-0.566134512424469,
-0.10676964372396469,
1.2840646505355835,
-0.37070804834365845,
1.2585697174072266,
-0.3768770396709442,
-0.24915418028831482,
-0.3640609085559845,
-0.37871652841567993,
0.011310020461678505,
-0.27005860209465027,
-0.6819614768028259,
0.15356330573558807,
-0.8574218153953552,
0.30308398604393005,
1.2798200845718384,
0.3499171733856201,
-0.09020950645208359,
0.41725262999534607,
1.0808173418045044,
0.5704192519187927,
0.11758388578891754,
-0.9818608164787292,
-1.2422250509262085,
1.9545592069625854,
-1.5099642276763916,
2.050234794616699,
0.6837067604064941,
-0.014675777405500412,
-1.7336002588272095,
-2.092240571975708,
1.3580328226089478,
1.2270777225494385,
2.3088016510009766,
0.5101998448371887,
0.4317373037338257,
-0.8583575487136841,
-0.6746243238449097,
0.4083305895328522,
-1.085121750831604,
-0.46272221207618713,
0.31698277592658997,
2.3188655376434326,
1.7189126014709473,
-0.5956602692604065,
-0.2690941095352173,
-0.9368758201599121,
1.334265112876892,
-0.1080886647105217,
0.11003075540065765,
2.1402370929718018,
-0.25790002942085266,
-0.9989717602729797,
1.3646771907806396,
-2.2950923442840576,
0.08652480691671371,
1.9697229862213135,
0.3811521530151367,
0.13967649638652802,
-1.2167189121246338,
-0.7359247207641602,
-0.37217867374420166,
-0.5717365145683289,
-1.0710943937301636,
0.5251404047012329,
-0.1246674507856369,
-0.8097928166389465,
-1.3831729888916016,
0.22336548566818237,
-1.2326782941818237,
-1.5540151596069336,
0.20759990811347961,
1.8505460023880005,
2.104130744934082,
-0.9471033215522766,
1.5075018405914307,
-0.30911019444465637,
-0.11089649796485901,
1.2599037885665894,
1.3142932653427124,
3.046420097351074,
1.755788803100586,
-1.2479784488677979,
0.5050925612449646,
-0.1864849478006363,
-0.44035226106643677,
1.2008836269378662,
-1.3437730073928833,
1.285696029663086,
-0.10728378593921661,
-0.9016404747962952,
-1.0706881284713745,
0.7329534292221069,
0.37122926115989685,
0.13514350354671478,
-0.5310624241828918,
0.9411144852638245,
0.26292261481285095,
1.4049748182296753,
0.6557572484016418,
-0.23169872164726257,
0.6231926679611206,
-0.41295045614242554,
-0.2605145573616028,
1.490391731262207,
0.17470936477184296,
-1.4788711071014404,
-2.3221771717071533,
-0.19384047389030457,
-0.9395167827606201,
0.024050278589129448,
-0.46766185760498047,
-1.154517650604248,
1.8326630592346191,
0.2972562611103058,
-1.243535041809082,
-0.36401182413101196,
-0.43413591384887695,
-0.6107467412948608,
2.949354887008667,
-1.3799352645874023,
-0.1318642497062683,
-1.0057556629180908,
-0.753470242023468,
1.8275426626205444,
-1.0328587293624878,
-0.1629319190979004,
-1.097629427909851,
-0.38348478078842163,
-1.4857901334762573,
-0.5997527837753296,
0.26817792654037476,
-0.9518789052963257,
1.0606800317764282,
0.2556232511997223,
-1.1594750881195068,
-0.40825533866882324,
-0.89436936378479,
0.8034953474998474,
-0.2771279811859131,
0.21770504117012024,
2.0872371196746826,
0.42995741963386536,
-0.1326528787612915,
0.6444301009178162,
1.2306348085403442,
0.697172999382019,
-0.564804196357727,
0.23920704424381256,
-0.6660860180854797,
0.3208426833152771,
-1.295819640159607,
0.16625018417835236,
-2.6373162269592285,
0.5957488417625427,
-0.1119474247097969,
-0.07288672029972076,
0.07567401230335236,
-1.239380955696106,
1.1789195537567139,
2.597898483276367,
-1.2075254917144775,
0.4322386682033539,
0.3313596844673157,
1.1013447046279907,
-1.7086950540542603,
0.23536233603954315,
-0.3706595301628113,
2.0373685359954834,
-0.00033242255449295044,
1.0929372310638428,
-0.4971700608730316,
-2.208747625350952,
0.7524714469909668,
-1.4003506898880005,
-1.3689912557601929,
0.6820504665374756,
-0.9472987651824951,
0.29608792066574097,
-1.6035962104797363,
-0.23341304063796997,
-0.8782029151916504,
-1.194596290588379,
0.7170889973640442,
0.004947595298290253,
0.28508487343788147,
-0.4663146436214447,
0.45545488595962524,
-2.3692657947540283,
-1.6093498468399048,
-0.4223024547100067,
-0.9087957143783569,
0.5617421269416809,
-0.4467860162258148,
0.9462563395500183,
-0.18997415900230408,
0.023903219029307365,
0.4322952926158905,
1.523417592048645,
3.4298174381256104,
0.2429356575012207,
0.26413649320602417,
-0.286648154258728,
-1.0715723037719727,
1.6426892280578613,
0.8755146265029907,
0.14559735357761383,
-0.4825287163257599,
-1.1311180591583252,
1.0997117757797241,
2.0815513134002686,
1.1373095512390137,
-0.09713549166917801,
-0.8819844126701355,
-0.6727259755134583,
-0.18860797584056854,
0.19209522008895874,
0.3267273008823395,
0.9299314022064209,
-0.09465595334768295,
-0.07499337196350098,
1.5115966796875,
1.1051995754241943,
-0.30828312039375305,
0.022246116772294044,
-0.7307911515235901,
-0.41048288345336914,
0.6891463398933411,
0.18627212941646576,
0.19082732498645782,
0.5418197512626648,
-1.0073782205581665,
-0.47686898708343506,
-0.38269782066345215,
-0.8429847359657288,
-0.5441950559616089,
-0.5982769131660461,
-0.33053791522979736,
1.5612108707427979,
0.12715741991996765,
-0.5331128239631653,
-0.04292140156030655,
-0.9573445916175842,
-0.013492709025740623,
-1.266426920890808,
0.08614635467529297,
-0.09629378467798233,
-0.22079722583293915,
-0.27899235486984253,
1.782763123512268,
-0.961505115032196,
-2.0106565952301025,
0.1586982011795044,
0.422171026468277,
-0.28011849522590637,
0.22103390097618103,
1.5594942569732666,
0.6176500916481018,
1.4261555671691895,
1.0600826740264893,
0.9056268930435181,
-0.6982083916664124,
-1.3073188066482544,
0.5253430604934692,
1.2332265377044678,
-1.3424663543701172,
0.8427430987358093,
-0.0038081849925220013,
-0.33510497212409973,
0.3222362995147705,
1.2715063095092773,
0.5160677433013916,
-1.7350282669067383,
0.738236129283905,
-0.806109607219696,
0.9224969148635864,
0.559619665145874,
0.6818048357963562,
0.09740730375051498,
0.7237252593040466,
-1.120918869972229,
-1.0128246545791626,
-0.6851922869682312,
-0.6323277354240417,
1.979825735092163,
-0.3594247102737427,
0.7156530618667603,
-0.3343948423862457,
-1.1490145921707153,
0.003828139044344425,
0.7112678289413452,
0.41366612911224365,
-0.428290456533432,
0.8081719279289246,
-0.5187512636184692,
-0.8998910784721375,
-1.2959667444229126,
-0.2532930374145508,
-1.1089051961898804,
-0.9720687866210938,
1.1514617204666138,
0.7298279404640198,
0.34031468629837036,
1.8796757459640503,
0.9814231395721436,
0.3826533555984497,
-2.4826104640960693,
0.9655972719192505,
0.3523116707801819,
-0.10910766571760178,
0.9018658399581909,
0.43616247177124023,
1.0701677799224854,
-0.20580992102622986,
0.5748751163482666,
-2.450470447540283,
2.3504674434661865,
-0.05905432999134064,
0.6714164018630981,
0.11974909901618958,
-0.29562926292419434,
1.0737342834472656,
0.5250754356384277,
0.28427189588546753,
-1.087220549583435,
0.36664438247680664,
-0.4213058054447174,
1.08767831325531,
0.8747045397758484,
-0.6968886852264404,
0.08189965784549713,
1.3406672477722168,
0.7165786623954773,
-0.4606642723083496,
-1.0412585735321045,
-0.6504198312759399,
1.0432788133621216,
1.6050444841384888,
-0.11264841258525848,
-0.017566077411174774,
0.9932127594947815,
0.5470633506774902,
-1.2500141859054565,
-0.03915288671851158,
-0.8069518208503723,
-0.7065069079399109,
1.8172589540481567,
2.115781545639038,
-0.1568288952112198,
-0.3475903868675232,
-0.7289867997169495,
-1.347398042678833,
0.8671059608459473,
-0.06279328465461731,
0.31126803159713745,
0.5215808153152466,
-0.6854146122932434,
1.0545234680175781,
0.8363041281700134,
0.9843461513519287,
0.20582620799541473,
0.3449409306049347,
0.4852781295776367,
-0.436168909072876,
-1.0424152612686157,
-0.1951400637626648,
-1.0564543008804321,
-2.5759921073913574,
0.597327470779419,
-0.19362656772136688,
-1.2332206964492798,
-0.20856060087680817,
-0.9740002751350403,
1.1708934307098389,
-0.509082555770874,
-0.9541284441947937,
-1.5782546997070312,
0.27317410707473755,
0.11474655568599701,
1.146425724029541,
-1.5652039051055908,
-0.5279523730278015,
1.35361909866333,
0.9033521413803101,
-0.921846330165863,
0.6535056829452515,
0.02267736755311489,
1.1735037565231323,
0.6480980515480042,
-0.3866971731185913,
0.5639922022819519,
-0.17657043039798737,
-1.4768353700637817,
0.42704710364341736,
1.2234251499176025,
0.06905078142881393,
1.5522584915161133,
-0.37663426995277405,
0.2112414687871933,
0.3160107731819153,
-0.578245997428894,
-0.6324818134307861,
-0.48235413432121277,
0.5450937151908875,
0.10041473805904388,
-1.1007083654403687,
-0.09533717483282089,
0.05222988873720169,
-0.16613760590553284,
0.009859306737780571,
-1.2996852397918701,
-0.153352752327919,
-0.3782667815685272,
-0.6573866009712219,
-1.0640084743499756,
-0.23974817991256714,
1.1763275861740112,
-0.6965476870536804,
-0.08530498296022415,
0.43758711218833923,
0.14865434169769287,
0.47649046778678894,
0.41944804787635803,
-0.8013134598731995,
-0.37064969539642334,
-0.2842921018600464,
-0.3885287940502167,
0.2898806631565094,
1.3916467428207397,
-0.03993765637278557,
-1.0685714483261108,
0.6631911993026733,
-0.18772676587104797,
0.11924326419830322,
2.0027623176574707,
-0.009880398400127888,
-0.6641501188278198,
0.3068877160549164,
-0.5839810371398926,
1.7871922254562378,
1.645668387413025,
1.2984017133712769,
-0.2754676342010498,
-0.8247235417366028,
0.7095122933387756,
-0.5818192958831787,
-0.44054272770881653,
0.7036372423171997,
0.15731851756572723,
-0.29609671235084534,
-1.5751146078109741,
0.7971051335334778,
1.3762940168380737,
-1.08463454246521,
-0.7920864224433899,
0.393741250038147,
-0.8807002305984497,
1.0209535360336304,
0.48793825507164,
0.37654614448547363,
0.6109211444854736,
1.6448538303375244,
0.8783193230628967,
-0.36751100420951843,
0.3949856162071228,
0.7263950109481812,
-0.11730296909809113,
-1.9244698286056519,
-1.249603271484375,
0.445462167263031,
-0.795616626739502,
-1.489335536956787,
1.5668272972106934,
-1.1476796865463257,
-1.1670702695846558,
0.7410832047462463,
0.0856328085064888,
1.3530420064926147,
0.4423132538795471,
1.5533115863800049,
1.9922784566879272,
0.8011983633041382,
0.4679969847202301,
1.1220393180847168,
-0.11360535025596619,
-0.49732187390327454,
1.9069252014160156,
-0.4725063145160675,
0.39187946915626526,
1.0804933309555054,
-0.1768723726272583,
-1.2363663911819458,
-0.8324222564697266,
-1.354758858680725,
-0.9039526581764221,
1.294102430343628,
0.04605414718389511,
-1.071329951286316,
0.22810980677604675,
1.7485227584838867,
-0.008764862082898617,
-0.5687609910964966,
0.6158481240272522,
0.3438718616962433,
-1.0623807907104492,
0.01233666017651558,
-0.8732314705848694,
0.6305969953536987,
0.028229909017682076,
-0.31295663118362427,
0.2555655241012573,
0.5541777610778809,
1.6460870504379272,
-0.15991397202014923,
0.20703135430812836,
0.8175224661827087,
-1.4465787410736084,
1.7694072723388672,
-0.7810976505279541,
0.15765678882598877,
-2.279572010040283,
1.300920009613037,
-0.6860487461090088,
1.9847207069396973,
-2.5101869106292725,
0.4174182713031769,
-0.3583233952522278,
-0.36349382996559143,
0.09481941163539886,
-0.5442391633987427,
0.2288920134305954,
-0.03197799623012543,
-1.1229031085968018,
-0.006040253210812807,
-0.5460633635520935,
0.7089026570320129,
1.1532140970230103,
1.4756276607513428,
-1.1343843936920166,
-0.525103747844696,
-1.716940999031067,
-0.12238965928554535,
-0.7808506488800049,
0.059985555708408356,
-1.90242338180542,
-0.3117935061454773,
-1.7648476362228394,
-2.200991153717041,
-1.368809700012207,
-0.9118736386299133,
1.190625786781311,
0.08197833597660065,
-1.1247459650039673,
1.2203240394592285,
-0.40777719020843506,
-1.946656584739685,
1.3608722686767578,
-2.1276562213897705
] |
https://github.com/huggingface/datasets/issues/3447 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading | Hi ! Indeed it says "downloading and preparing" but in your case it didn't need to download anything since you used local files (it would have thrown an error otherwise). I think we can improve the logging to make it clearer in this case | ## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, datasets still tried to download "custom data configuration" for JSON, despite I have run the program once and cached all data into the same --cache_dir.
"Downloading" is not an issue when running with local disk, but crashes often with cloud storage because (1) multiply GPU processes try to access the same file, AND (2) FileLocker fails to synchronize all processes, due to storage throttling. 99% of times, when the main process releases FileLocker, the file is not actually ready for access in cloud storage and thus triggers "FileNotFound" errors for all other processes. Well, another way to resolve the problem is to investigate super reliable cloud storage, but that's out of scope here.
## Steps to reproduce the bug
```
export HF_DATASETS_OFFLINE=1
python run_clm.py --model_name_or_path=models/gpt-j-6B --train_file=trainpy.v2.train.json --validation_file=trainpy.v2.eval.json --cache_dir=datacache/trainpy.v2
```
## Expected results
datasets should stop all "downloading" behavior but reuse the cached JSON configuration. I think the problem here is part of the cache directory path, "default-471372bed4b51b53", is randomly generated, and it could change if some parameters changed. And I didn't find a way to use a fixed path to ensure datasets to reuse cached data every time.
## Actual results
The logging shows datasets are still downloading into "datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426".
```
12/16/2021 10:25:59 - WARNING - datasets.builder - Using custom data configuration default-471372bed4b51b53
12/16/2021 10:25:59 - INFO - datasets.builder - Generating dataset json (datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426)
Downloading and preparing dataset json/default to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426...
100%|██████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 17623.13it/s]
12/16/2021 10:25:59 - INFO - datasets.utils.download_manager - Downloading took 0.0 min
12/16/2021 10:26:00 - INFO - datasets.utils.download_manager - Checksum Computation took 0.0 min
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 1206.99it/s]
12/16/2021 10:26:00 - INFO - datasets.utils.info_utils - Unable to verify checksums.
12/16/2021 10:26:00 - INFO - datasets.builder - Generating split train
12/16/2021 10:26:01 - INFO - datasets.builder - Generating split validation
12/16/2021 10:26:02 - INFO - datasets.utils.info_utils - Unable to verify splits sizes.
Dataset json downloaded and prepared to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426. Subsequent calls will reuse this data.
100%|█████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 53.54it/s]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux
- Python version: 3.8.10
- PyArrow version: 6.0.1
| 1,049 | 44 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading
## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, datasets still tried to download "custom data configuration" for JSON, despite I have run the program once and cached all data into the same --cache_dir.
"Downloading" is not an issue when running with local disk, but crashes often with cloud storage because (1) multiply GPU processes try to access the same file, AND (2) FileLocker fails to synchronize all processes, due to storage throttling. 99% of times, when the main process releases FileLocker, the file is not actually ready for access in cloud storage and thus triggers "FileNotFound" errors for all other processes. Well, another way to resolve the problem is to investigate super reliable cloud storage, but that's out of scope here.
## Steps to reproduce the bug
```
export HF_DATASETS_OFFLINE=1
python run_clm.py --model_name_or_path=models/gpt-j-6B --train_file=trainpy.v2.train.json --validation_file=trainpy.v2.eval.json --cache_dir=datacache/trainpy.v2
```
## Expected results
datasets should stop all "downloading" behavior but reuse the cached JSON configuration. I think the problem here is part of the cache directory path, "default-471372bed4b51b53", is randomly generated, and it could change if some parameters changed. And I didn't find a way to use a fixed path to ensure datasets to reuse cached data every time.
## Actual results
The logging shows datasets are still downloading into "datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426".
```
12/16/2021 10:25:59 - WARNING - datasets.builder - Using custom data configuration default-471372bed4b51b53
12/16/2021 10:25:59 - INFO - datasets.builder - Generating dataset json (datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426)
Downloading and preparing dataset json/default to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426...
100%|██████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 17623.13it/s]
12/16/2021 10:25:59 - INFO - datasets.utils.download_manager - Downloading took 0.0 min
12/16/2021 10:26:00 - INFO - datasets.utils.download_manager - Checksum Computation took 0.0 min
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 1206.99it/s]
12/16/2021 10:26:00 - INFO - datasets.utils.info_utils - Unable to verify checksums.
12/16/2021 10:26:00 - INFO - datasets.builder - Generating split train
12/16/2021 10:26:01 - INFO - datasets.builder - Generating split validation
12/16/2021 10:26:02 - INFO - datasets.utils.info_utils - Unable to verify splits sizes.
Dataset json downloaded and prepared to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426. Subsequent calls will reuse this data.
100%|█████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 53.54it/s]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux
- Python version: 3.8.10
- PyArrow version: 6.0.1
Hi ! Indeed it says "downloading and preparing" but in your case it didn't need to download anything since you used local files (it would have thrown an error otherwise). I think we can improve the logging to make it clearer in this case | [
-1.2128112316131592,
-0.9091240763664246,
-0.7229031324386597,
1.3997721672058105,
-0.2259003221988678,
-1.2170780897140503,
0.06518329679965973,
-1.1197080612182617,
1.6044509410858154,
-0.8693190217018127,
0.23772253096103668,
-1.6282514333724976,
0.011626504361629486,
-0.5614458918571472,
-0.6727464199066162,
-0.8520410656929016,
-0.41112056374549866,
-0.8488376140594482,
0.9952138066291809,
2.494659900665283,
1.1456421613693237,
-1.3362147808074951,
2.7328991889953613,
0.7220589518547058,
-0.23535127937793732,
-0.9953088760375977,
0.5373188853263855,
0.07448630034923553,
-1.3168672323226929,
-0.4264557659626007,
-0.9558978080749512,
-0.015460407361388206,
-0.6419395804405212,
-0.485411137342453,
0.06004585325717926,
0.3730078935623169,
-0.31039664149284363,
-0.39902371168136597,
-0.5948604345321655,
-0.7285440564155579,
0.4801245629787445,
-0.3911287188529968,
0.9677850008010864,
-0.3805713951587677,
1.800246238708496,
-0.5043227672576904,
0.3800678849220276,
0.6841191053390503,
1.2424216270446777,
0.23423419892787933,
0.08936049044132233,
0.2509951889514923,
0.3632657825946808,
0.005416656844317913,
0.5160661339759827,
1.1199393272399902,
0.5780888795852661,
0.5112539529800415,
0.696144163608551,
-2.1715214252471924,
1.36017906665802,
-0.9438536167144775,
0.22436217963695526,
1.38999605178833,
-0.8989126086235046,
0.47202256321907043,
-1.8392126560211182,
-0.040412358939647675,
0.5951293706893921,
-2.268812894821167,
0.24774032831192017,
-1.2715519666671753,
-0.5559719204902649,
1.0381971597671509,
0.33321613073349,
-1.187940239906311,
0.17983153462409973,
-0.5300692915916443,
1.0208778381347656,
0.4343253970146179,
1.1134992837905884,
-1.721107006072998,
-0.08521944284439087,
-0.27767542004585266,
0.10919268429279327,
-1.3547446727752686,
-1.6052312850952148,
0.5904966592788696,
0.6713072061538696,
0.6207862496376038,
-0.07496638596057892,
1.0124214887619019,
-1.094344139099121,
0.8112867474555969,
-0.9619728326797485,
-1.6571145057678223,
-1.3695549964904785,
-2.305480718612671,
-2.287834644317627,
0.7692107558250427,
-0.48585453629493713,
-0.5613064169883728,
2.0288851261138916,
-1.0690916776657104,
-1.684676170349121,
1.118823766708374,
0.2340630739927292,
-0.02030295319855213,
2.4342737197875977,
0.22788269817829132,
-0.7596450448036194,
0.4563067555427551,
-0.7204938530921936,
0.7664738297462463,
-0.38903936743736267,
1.2999972105026245,
0.4520566761493683,
-1.053695797920227,
1.5845166444778442,
-0.3943536877632141,
0.5852004885673523,
-0.6516869068145752,
-0.5299769639968872,
-0.799798309803009,
0.29329416155815125,
1.883937120437622,
-0.3179500997066498,
1.5258734226226807,
-0.2914261221885681,
-1.5578196048736572,
-1.5815240144729614,
0.8995895981788635,
0.4912528991699219,
-0.8274989724159241,
0.06422137469053268,
-0.3843313455581665,
0.19328247010707855,
-0.08616287261247635,
1.0610949993133545,
1.3073108196258545,
0.7169788479804993,
-0.34489068388938904,
-0.8777452111244202,
0.19873479008674622,
-0.13718169927597046,
-0.7495943903923035,
-1.8343720436096191,
-0.3560488224029541,
0.0911288857460022,
0.6365315914154053,
-1.1845756769180298,
1.676034927368164,
0.9529820680618286,
1.8771445751190186,
1.0446134805679321,
-0.38039228320121765,
1.434155821800232,
0.06044307351112366,
1.816202163696289,
-0.5575466156005859,
0.6997092962265015,
-0.3313349187374115,
-1.1131083965301514,
0.792514979839325,
-0.3108305037021637,
-2.0305755138397217,
-0.7081592679023743,
-0.7540274858474731,
-0.2543638050556183,
-0.7314503192901611,
0.8763936161994934,
-0.29429569840431213,
-1.4717024564743042,
0.2327231764793396,
-0.6195646524429321,
0.11713843792676926,
-1.2220863103866577,
0.3025604784488678,
0.7110469937324524,
-0.6453651189804077,
0.10322286188602448,
-0.2642197012901306,
-1.2511521577835083,
-0.47936248779296875,
0.33202752470970154,
1.8589955568313599,
-0.7502122521400452,
0.9775336384773254,
1.0030062198638916,
-0.7446973323822021,
0.02834293060004711,
0.3895624577999115,
-0.27270814776420593,
0.7703532576560974,
-1.1262365579605103,
-0.46237361431121826,
1.1436247825622559,
-0.28983035683631897,
-0.5718799233436584,
1.3570750951766968,
0.7696071267127991,
-1.0948705673217773,
-0.23199576139450073,
-0.14764165878295898,
-0.9061101675033569,
0.07730352878570557,
-1.597367763519287,
-0.1723950058221817,
0.28371649980545044,
-1.5518137216567993,
-0.4658006727695465,
-0.23695795238018036,
1.3306399583816528,
-0.1566249430179596,
1.4373830556869507,
-0.3401356041431427,
-0.22825290262699127,
-0.2693396806716919,
-0.4476262331008911,
0.14585144817829132,
-0.12336549162864685,
-0.46923828125,
0.23458144068717957,
-0.8719609975814819,
0.23487147688865662,
1.451222538948059,
0.39731818437576294,
0.05742107331752777,
0.5117926001548767,
1.0340644121170044,
0.43055135011672974,
-0.07065963000059128,
-0.8904570937156677,
-1.5150686502456665,
1.9976396560668945,
-1.45980966091156,
2.036667585372925,
0.8126233220100403,
-0.0644395723938942,
-1.8068253993988037,
-1.868362307548523,
1.315333604812622,
1.1152265071868896,
2.376145839691162,
0.5619587898254395,
0.3879743814468384,
-0.7730233073234558,
-0.724976122379303,
0.4197748601436615,
-1.0020205974578857,
-0.7126829028129578,
0.13617488741874695,
2.3235747814178467,
1.7701305150985718,
-0.43066951632499695,
-0.22182229161262512,
-0.9650719165802002,
1.349571943283081,
-0.18067976832389832,
0.24150598049163818,
2.0524721145629883,
-0.3396686613559723,
-1.0529556274414062,
1.3291124105453491,
-2.3358423709869385,
0.223041832447052,
1.9466421604156494,
0.2567206621170044,
0.06981605291366577,
-1.3617831468582153,
-0.6742009520530701,
-0.2669760584831238,
-0.3709208071231842,
-1.2485172748565674,
0.573872983455658,
-0.32180294394493103,
-0.833305835723877,
-1.5336862802505493,
0.07607395201921463,
-1.2183386087417603,
-1.6991467475891113,
0.2987733483314514,
1.995497226715088,
2.037578582763672,
-0.7990922927856445,
1.507110595703125,
-0.2532719075679779,
0.08528926223516464,
1.2008904218673706,
1.2912341356277466,
3.1587846279144287,
1.8158812522888184,
-1.3188486099243164,
0.6356290578842163,
-0.11234907060861588,
-0.4629603624343872,
1.028734803199768,
-1.1455806493759155,
1.276870608329773,
-0.1533169150352478,
-1.1480835676193237,
-1.1920042037963867,
0.9765410423278809,
0.5028740167617798,
0.0551346018910408,
-0.4604173004627228,
1.2483055591583252,
0.06327270716428757,
1.354543924331665,
0.5011299252510071,
-0.3852388858795166,
0.6184772849082947,
-0.3829401731491089,
-0.6029573678970337,
1.5746099948883057,
0.20898987352848053,
-1.4222073554992676,
-2.3372256755828857,
-0.3287533223628998,
-0.8548968434333801,
0.08500219136476517,
-0.6119334697723389,
-0.9892894625663757,
1.6872408390045166,
0.36491525173187256,
-1.2068893909454346,
-0.25342264771461487,
-0.30472251772880554,
-0.5927007794380188,
2.6176435947418213,
-1.3209888935089111,
-0.1375962346792221,
-0.9074477553367615,
-0.6264339685440063,
1.5379638671875,
-1.201194405555725,
-0.22399502992630005,
-1.0762804746627808,
-0.5812642574310303,
-1.2859662771224976,
-0.5129167437553406,
0.09018079936504364,
-0.9632794260978699,
0.8430376648902893,
0.2309795767068863,
-1.1099276542663574,
-0.2812146246433258,
-0.9246478080749512,
0.8979701995849609,
-0.08426593244075775,
0.23272474110126495,
1.8357861042022705,
0.34984251856803894,
-0.39354950189590454,
0.6914623975753784,
1.192826271057129,
0.6225240230560303,
-0.6956488490104675,
0.11946456879377365,
-0.7220755219459534,
0.3445504605770111,
-1.2561792135238647,
0.3380805552005768,
-2.9025328159332275,
0.6681856513023376,
-0.10907100141048431,
-0.04784609377384186,
-0.0037953010760247707,
-1.3121140003204346,
1.0660597085952759,
2.6097874641418457,
-1.0833165645599365,
0.4352854788303375,
0.3464176058769226,
1.1640139818191528,
-1.5988103151321411,
0.4020000100135803,
-0.3916091322898865,
2.0598080158233643,
0.18096090853214264,
1.1703672409057617,
-0.49746882915496826,
-2.358447551727295,
0.5968474745750427,
-1.2219502925872803,
-1.1642214059829712,
0.8112425804138184,
-0.8542777895927429,
0.09595808386802673,
-1.4475595951080322,
-0.16328489780426025,
-0.9144487380981445,
-1.2314748764038086,
0.6592583656311035,
0.12306787818670273,
0.5037575960159302,
-0.6215693354606628,
0.3513394296169281,
-2.1617226600646973,
-1.407325029373169,
-0.23226802051067352,
-0.9087828993797302,
0.5001758337020874,
-0.3819921910762787,
0.7332515120506287,
-0.18739652633666992,
0.06670809537172318,
0.3584749400615692,
1.4458988904953003,
3.3593080043792725,
0.13110314309597015,
0.25220805406570435,
-0.1962403804063797,
-0.9761897921562195,
1.450291633605957,
0.9134853482246399,
-0.09186612814664841,
-0.6087304353713989,
-1.0676237344741821,
1.2281829118728638,
2.02917218208313,
1.0382674932479858,
0.0035039829090237617,
-0.8432276844978333,
-0.7096458673477173,
-0.024351876229047775,
0.17967337369918823,
0.5012338161468506,
0.8825017809867859,
0.02437523566186428,
0.08883534371852875,
1.4683661460876465,
1.246992588043213,
-0.43358170986175537,
0.364465594291687,
-0.8088430762290955,
-0.45647868514060974,
0.46415945887565613,
0.27947136759757996,
0.045028381049633026,
0.3302682638168335,
-1.0393779277801514,
-0.19948884844779968,
-0.44854936003685,
-0.9562407732009888,
-0.7195098996162415,
-0.40005889534950256,
-0.35455402731895447,
1.6949049234390259,
0.10713978856801987,
-0.48788022994995117,
-0.03325430676341057,
-0.7906549572944641,
-0.10973728448152542,
-1.0768201351165771,
0.267446368932724,
-0.08003950864076614,
-0.11486759781837463,
-0.05973842740058899,
1.7751528024673462,
-0.9750112891197205,
-2.059070587158203,
0.1853751689195633,
0.27653416991233826,
-0.2623661160469055,
0.17142890393733978,
1.7187893390655518,
0.5395018458366394,
1.475616216659546,
1.3407191038131714,
0.9046711921691895,
-0.7269671559333801,
-1.2337665557861328,
0.6924163103103638,
0.9257431030273438,
-1.4551339149475098,
0.8900943994522095,
-0.047852180898189545,
-0.5722012519836426,
0.7040218710899353,
1.3372869491577148,
0.4434374272823334,
-1.990358591079712,
0.8929746150970459,
-0.9763281941413879,
0.7286893725395203,
0.7303377985954285,
0.682723343372345,
0.1603831797838211,
0.8066375851631165,
-1.2458868026733398,
-1.1554502248764038,
-0.7337555885314941,
-0.56119304895401,
1.961624026298523,
-0.2773747444152832,
0.5500459671020508,
-0.16621218621730804,
-1.2415741682052612,
-0.05891209840774536,
0.7170072793960571,
0.416438490152359,
-0.3905998170375824,
0.7321069240570068,
-0.6785750389099121,
-1.104785442352295,
-1.3681648969650269,
-0.4100661873817444,
-1.0575989484786987,
-0.8617396354675293,
1.0193884372711182,
0.8079751133918762,
0.37362927198410034,
1.9023290872573853,
0.6565207242965698,
0.2862379848957062,
-2.6558218002319336,
0.9492352604866028,
0.31007570028305054,
-0.09858808666467667,
0.9995686411857605,
0.26854363083839417,
1.072436809539795,
0.015618430450558662,
0.5293040871620178,
-2.390292167663574,
2.2849481105804443,
-0.24659207463264465,
0.721009373664856,
0.004931862466037273,
-0.16284997761249542,
1.1522847414016724,
0.5964935421943665,
0.5800036191940308,
-1.0749579668045044,
0.7510753273963928,
-0.50652676820755,
1.1464468240737915,
0.9922865033149719,
-0.7832322716712952,
0.07148844748735428,
1.3028346300125122,
0.498465359210968,
-0.5138517618179321,
-0.8867772817611694,
-0.9050140976905823,
0.8855081796646118,
1.7966232299804688,
-0.06130649149417877,
-0.021931245923042297,
0.8157643675804138,
0.6884432435035706,
-1.3112759590148926,
0.11301116645336151,
-0.6747863292694092,
-0.7512363195419312,
1.6158664226531982,
2.075549602508545,
-0.05604834109544754,
-0.12914226949214935,
-0.7109437584877014,
-1.2961089611053467,
0.7968365550041199,
-0.04950851947069168,
0.23049239814281464,
0.6217911839485168,
-0.6571637988090515,
1.1267918348312378,
0.7832285165786743,
0.9886144995689392,
0.1278306543827057,
0.2478785514831543,
0.43073368072509766,
-0.33930498361587524,
-1.1138166189193726,
-0.2694706916809082,
-1.0056291818618774,
-2.54240083694458,
0.5196094512939453,
-0.225892573595047,
-1.4729405641555786,
-0.013895200565457344,
-0.9401446580886841,
0.9176416993141174,
-0.5191767811775208,
-1.0675045251846313,
-1.5431305170059204,
0.21239952743053436,
-0.12444376945495605,
0.9467182159423828,
-1.600172519683838,
-0.16530540585517883,
1.2294809818267822,
0.9276143908500671,
-0.6157875657081604,
1.0179290771484375,
0.20432738959789276,
1.0160908699035645,
0.7702763080596924,
-0.3705582320690155,
0.4702059328556061,
0.07109590619802475,
-1.3774354457855225,
0.38655704259872437,
1.192914366722107,
0.16630986332893372,
1.431180477142334,
-0.5209572911262512,
0.09678418934345245,
0.3975088894367218,
-0.5268892049789429,
-0.4874473512172699,
-0.44337931275367737,
0.7126907110214233,
-0.01767120137810707,
-0.859292209148407,
-0.04987810552120209,
-0.09550392627716064,
-0.20431464910507202,
0.18479515612125397,
-1.4495956897735596,
-0.25888898968696594,
-0.409231573343277,
-0.5363054275512695,
-1.2259939908981323,
-0.03248240798711777,
1.3750381469726562,
-0.773317813873291,
-0.2436026781797409,
0.4654654264450073,
0.39747729897499084,
0.5185979008674622,
0.6473659873008728,
-0.6994917392730713,
-0.3262924551963806,
-0.21542806923389435,
-0.39626559615135193,
0.3537151515483856,
1.332826018333435,
-0.11513025313615799,
-0.9448974132537842,
0.6262820959091187,
-0.3337165415287018,
0.0816304013133049,
1.9740999937057495,
0.08531598001718521,
-0.7489388585090637,
0.3146469295024872,
-0.7138426303863525,
1.8886367082595825,
1.7645145654678345,
1.3213245868682861,
-0.16037215292453766,
-0.9443032145500183,
0.6015148758888245,
-0.3296372592449188,
-0.3416203558444977,
0.9302166104316711,
0.4352627098560333,
-0.19722895324230194,
-1.4109728336334229,
0.6567928194999695,
1.2280535697937012,
-0.9154857397079468,
-0.7515888214111328,
0.11243046820163727,
-0.8272114992141724,
1.0902405977249146,
0.6263436675071716,
0.39848336577415466,
0.23897309601306915,
1.600427508354187,
0.7616950273513794,
-0.5408880710601807,
0.5299599766731262,
0.4741763770580292,
-0.2163495421409607,
-2.057298421859741,
-1.1374667882919312,
0.3285990059375763,
-0.4697294235229492,
-1.5321006774902344,
1.4517282247543335,
-1.1674120426177979,
-0.9996472001075745,
0.5328793525695801,
0.11267002671957016,
1.3619765043258667,
0.36246898770332336,
1.688423991203308,
2.1193783283233643,
0.9660225510597229,
0.35756823420524597,
1.303114652633667,
-0.18735244870185852,
-0.45289915800094604,
1.823399543762207,
-0.4740098714828491,
0.46242061257362366,
1.1223950386047363,
-0.352313369512558,
-1.0470936298370361,
-0.773016095161438,
-1.1256014108657837,
-0.6649350523948669,
1.1868736743927002,
0.09259827435016632,
-1.130393624305725,
0.2294102907180786,
1.6320586204528809,
0.09125135838985443,
-0.28893664479255676,
0.6704871654510498,
0.4981078505516052,
-0.7502208352088928,
-0.13387517631053925,
-0.9184492230415344,
0.5515010356903076,
-0.3174371123313904,
-0.41697582602500916,
0.2724057734012604,
0.4615740180015564,
1.350942850112915,
-0.0890171080827713,
0.10833974927663803,
1.2118659019470215,
-1.4196653366088867,
1.4391030073165894,
-0.678977906703949,
0.25604572892189026,
-2.3979575634002686,
1.3958444595336914,
-0.7319267392158508,
1.992955207824707,
-2.5746936798095703,
0.43842461705207825,
-0.5910963416099548,
-0.4818483889102936,
0.2902466356754303,
-0.3456929624080658,
0.1795603483915329,
-0.18770043551921844,
-1.0359376668930054,
-0.0982729122042656,
-0.6836331486701965,
0.6090502738952637,
1.1768507957458496,
1.4070018529891968,
-1.0918066501617432,
-0.23229964077472687,
-1.70760977268219,
-0.2653365135192871,
-0.7603604197502136,
0.2715798020362854,
-1.9644063711166382,
-0.20465092360973358,
-1.9622937440872192,
-2.427229404449463,
-1.4379520416259766,
-0.8503191471099854,
1.1053667068481445,
0.1522897481918335,
-0.9264236092567444,
1.2007439136505127,
-0.3687308430671692,
-1.8921141624450684,
1.1929749250411987,
-2.1602373123168945
] |
https://github.com/huggingface/datasets/issues/3447 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading | @lhoestq Thank you for explaining. I am sorry but I was not clear about my intention. I didn't want to kill internet traffic; I wanted to kill all write activity. In other words, you can imagine that my storage has only read access but crashes on write.
When run_clm.py is invoked with the same parameters, the hash in the cache directory "datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/..." doesn't change, and my job can load cached data properly. This is great.
Unfortunately, when params change (which happens sometimes), the hash changes and the old cache is invalid. datasets builder would create a new cache directory with the new hash and create JSON builder there, even though every JSON builder is the same. I didn't find a way to avoid such behavior.
This problem can be resolved when using datasets.map() for tokenizing and grouping text. This function allows me to specify output filenames with --cache_file_names, so that the cached files are always valid.
This is the code that I used to freeze cache filenames for tokenization. I wish I could do the same to datasets.load_dataset()
```
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset",
cache_file_names={k: os.path.join(model_args.cache_dir, f'{k}-tokenized') for k in raw_datasets},
)
``` | ## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, datasets still tried to download "custom data configuration" for JSON, despite I have run the program once and cached all data into the same --cache_dir.
"Downloading" is not an issue when running with local disk, but crashes often with cloud storage because (1) multiply GPU processes try to access the same file, AND (2) FileLocker fails to synchronize all processes, due to storage throttling. 99% of times, when the main process releases FileLocker, the file is not actually ready for access in cloud storage and thus triggers "FileNotFound" errors for all other processes. Well, another way to resolve the problem is to investigate super reliable cloud storage, but that's out of scope here.
## Steps to reproduce the bug
```
export HF_DATASETS_OFFLINE=1
python run_clm.py --model_name_or_path=models/gpt-j-6B --train_file=trainpy.v2.train.json --validation_file=trainpy.v2.eval.json --cache_dir=datacache/trainpy.v2
```
## Expected results
datasets should stop all "downloading" behavior but reuse the cached JSON configuration. I think the problem here is part of the cache directory path, "default-471372bed4b51b53", is randomly generated, and it could change if some parameters changed. And I didn't find a way to use a fixed path to ensure datasets to reuse cached data every time.
## Actual results
The logging shows datasets are still downloading into "datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426".
```
12/16/2021 10:25:59 - WARNING - datasets.builder - Using custom data configuration default-471372bed4b51b53
12/16/2021 10:25:59 - INFO - datasets.builder - Generating dataset json (datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426)
Downloading and preparing dataset json/default to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426...
100%|██████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 17623.13it/s]
12/16/2021 10:25:59 - INFO - datasets.utils.download_manager - Downloading took 0.0 min
12/16/2021 10:26:00 - INFO - datasets.utils.download_manager - Checksum Computation took 0.0 min
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 1206.99it/s]
12/16/2021 10:26:00 - INFO - datasets.utils.info_utils - Unable to verify checksums.
12/16/2021 10:26:00 - INFO - datasets.builder - Generating split train
12/16/2021 10:26:01 - INFO - datasets.builder - Generating split validation
12/16/2021 10:26:02 - INFO - datasets.utils.info_utils - Unable to verify splits sizes.
Dataset json downloaded and prepared to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426. Subsequent calls will reuse this data.
100%|█████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 53.54it/s]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux
- Python version: 3.8.10
- PyArrow version: 6.0.1
| 1,049 | 201 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading
## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, datasets still tried to download "custom data configuration" for JSON, despite I have run the program once and cached all data into the same --cache_dir.
"Downloading" is not an issue when running with local disk, but crashes often with cloud storage because (1) multiply GPU processes try to access the same file, AND (2) FileLocker fails to synchronize all processes, due to storage throttling. 99% of times, when the main process releases FileLocker, the file is not actually ready for access in cloud storage and thus triggers "FileNotFound" errors for all other processes. Well, another way to resolve the problem is to investigate super reliable cloud storage, but that's out of scope here.
## Steps to reproduce the bug
```
export HF_DATASETS_OFFLINE=1
python run_clm.py --model_name_or_path=models/gpt-j-6B --train_file=trainpy.v2.train.json --validation_file=trainpy.v2.eval.json --cache_dir=datacache/trainpy.v2
```
## Expected results
datasets should stop all "downloading" behavior but reuse the cached JSON configuration. I think the problem here is part of the cache directory path, "default-471372bed4b51b53", is randomly generated, and it could change if some parameters changed. And I didn't find a way to use a fixed path to ensure datasets to reuse cached data every time.
## Actual results
The logging shows datasets are still downloading into "datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426".
```
12/16/2021 10:25:59 - WARNING - datasets.builder - Using custom data configuration default-471372bed4b51b53
12/16/2021 10:25:59 - INFO - datasets.builder - Generating dataset json (datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426)
Downloading and preparing dataset json/default to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426...
100%|██████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 17623.13it/s]
12/16/2021 10:25:59 - INFO - datasets.utils.download_manager - Downloading took 0.0 min
12/16/2021 10:26:00 - INFO - datasets.utils.download_manager - Checksum Computation took 0.0 min
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 1206.99it/s]
12/16/2021 10:26:00 - INFO - datasets.utils.info_utils - Unable to verify checksums.
12/16/2021 10:26:00 - INFO - datasets.builder - Generating split train
12/16/2021 10:26:01 - INFO - datasets.builder - Generating split validation
12/16/2021 10:26:02 - INFO - datasets.utils.info_utils - Unable to verify splits sizes.
Dataset json downloaded and prepared to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426. Subsequent calls will reuse this data.
100%|█████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 53.54it/s]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux
- Python version: 3.8.10
- PyArrow version: 6.0.1
@lhoestq Thank you for explaining. I am sorry but I was not clear about my intention. I didn't want to kill internet traffic; I wanted to kill all write activity. In other words, you can imagine that my storage has only read access but crashes on write.
When run_clm.py is invoked with the same parameters, the hash in the cache directory "datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/..." doesn't change, and my job can load cached data properly. This is great.
Unfortunately, when params change (which happens sometimes), the hash changes and the old cache is invalid. datasets builder would create a new cache directory with the new hash and create JSON builder there, even though every JSON builder is the same. I didn't find a way to avoid such behavior.
This problem can be resolved when using datasets.map() for tokenizing and grouping text. This function allows me to specify output filenames with --cache_file_names, so that the cached files are always valid.
This is the code that I used to freeze cache filenames for tokenization. I wish I could do the same to datasets.load_dataset()
```
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=data_args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not data_args.overwrite_cache,
desc="Running tokenizer on dataset",
cache_file_names={k: os.path.join(model_args.cache_dir, f'{k}-tokenized') for k in raw_datasets},
)
``` | [
-1.2128112316131592,
-0.9091240763664246,
-0.7229031324386597,
1.3997721672058105,
-0.2259003221988678,
-1.2170780897140503,
0.06518329679965973,
-1.1197080612182617,
1.6044509410858154,
-0.8693190217018127,
0.23772253096103668,
-1.6282514333724976,
0.011626504361629486,
-0.5614458918571472,
-0.6727464199066162,
-0.8520410656929016,
-0.41112056374549866,
-0.8488376140594482,
0.9952138066291809,
2.494659900665283,
1.1456421613693237,
-1.3362147808074951,
2.7328991889953613,
0.7220589518547058,
-0.23535127937793732,
-0.9953088760375977,
0.5373188853263855,
0.07448630034923553,
-1.3168672323226929,
-0.4264557659626007,
-0.9558978080749512,
-0.015460407361388206,
-0.6419395804405212,
-0.485411137342453,
0.06004585325717926,
0.3730078935623169,
-0.31039664149284363,
-0.39902371168136597,
-0.5948604345321655,
-0.7285440564155579,
0.4801245629787445,
-0.3911287188529968,
0.9677850008010864,
-0.3805713951587677,
1.800246238708496,
-0.5043227672576904,
0.3800678849220276,
0.6841191053390503,
1.2424216270446777,
0.23423419892787933,
0.08936049044132233,
0.2509951889514923,
0.3632657825946808,
0.005416656844317913,
0.5160661339759827,
1.1199393272399902,
0.5780888795852661,
0.5112539529800415,
0.696144163608551,
-2.1715214252471924,
1.36017906665802,
-0.9438536167144775,
0.22436217963695526,
1.38999605178833,
-0.8989126086235046,
0.47202256321907043,
-1.8392126560211182,
-0.040412358939647675,
0.5951293706893921,
-2.268812894821167,
0.24774032831192017,
-1.2715519666671753,
-0.5559719204902649,
1.0381971597671509,
0.33321613073349,
-1.187940239906311,
0.17983153462409973,
-0.5300692915916443,
1.0208778381347656,
0.4343253970146179,
1.1134992837905884,
-1.721107006072998,
-0.08521944284439087,
-0.27767542004585266,
0.10919268429279327,
-1.3547446727752686,
-1.6052312850952148,
0.5904966592788696,
0.6713072061538696,
0.6207862496376038,
-0.07496638596057892,
1.0124214887619019,
-1.094344139099121,
0.8112867474555969,
-0.9619728326797485,
-1.6571145057678223,
-1.3695549964904785,
-2.305480718612671,
-2.287834644317627,
0.7692107558250427,
-0.48585453629493713,
-0.5613064169883728,
2.0288851261138916,
-1.0690916776657104,
-1.684676170349121,
1.118823766708374,
0.2340630739927292,
-0.02030295319855213,
2.4342737197875977,
0.22788269817829132,
-0.7596450448036194,
0.4563067555427551,
-0.7204938530921936,
0.7664738297462463,
-0.38903936743736267,
1.2999972105026245,
0.4520566761493683,
-1.053695797920227,
1.5845166444778442,
-0.3943536877632141,
0.5852004885673523,
-0.6516869068145752,
-0.5299769639968872,
-0.799798309803009,
0.29329416155815125,
1.883937120437622,
-0.3179500997066498,
1.5258734226226807,
-0.2914261221885681,
-1.5578196048736572,
-1.5815240144729614,
0.8995895981788635,
0.4912528991699219,
-0.8274989724159241,
0.06422137469053268,
-0.3843313455581665,
0.19328247010707855,
-0.08616287261247635,
1.0610949993133545,
1.3073108196258545,
0.7169788479804993,
-0.34489068388938904,
-0.8777452111244202,
0.19873479008674622,
-0.13718169927597046,
-0.7495943903923035,
-1.8343720436096191,
-0.3560488224029541,
0.0911288857460022,
0.6365315914154053,
-1.1845756769180298,
1.676034927368164,
0.9529820680618286,
1.8771445751190186,
1.0446134805679321,
-0.38039228320121765,
1.434155821800232,
0.06044307351112366,
1.816202163696289,
-0.5575466156005859,
0.6997092962265015,
-0.3313349187374115,
-1.1131083965301514,
0.792514979839325,
-0.3108305037021637,
-2.0305755138397217,
-0.7081592679023743,
-0.7540274858474731,
-0.2543638050556183,
-0.7314503192901611,
0.8763936161994934,
-0.29429569840431213,
-1.4717024564743042,
0.2327231764793396,
-0.6195646524429321,
0.11713843792676926,
-1.2220863103866577,
0.3025604784488678,
0.7110469937324524,
-0.6453651189804077,
0.10322286188602448,
-0.2642197012901306,
-1.2511521577835083,
-0.47936248779296875,
0.33202752470970154,
1.8589955568313599,
-0.7502122521400452,
0.9775336384773254,
1.0030062198638916,
-0.7446973323822021,
0.02834293060004711,
0.3895624577999115,
-0.27270814776420593,
0.7703532576560974,
-1.1262365579605103,
-0.46237361431121826,
1.1436247825622559,
-0.28983035683631897,
-0.5718799233436584,
1.3570750951766968,
0.7696071267127991,
-1.0948705673217773,
-0.23199576139450073,
-0.14764165878295898,
-0.9061101675033569,
0.07730352878570557,
-1.597367763519287,
-0.1723950058221817,
0.28371649980545044,
-1.5518137216567993,
-0.4658006727695465,
-0.23695795238018036,
1.3306399583816528,
-0.1566249430179596,
1.4373830556869507,
-0.3401356041431427,
-0.22825290262699127,
-0.2693396806716919,
-0.4476262331008911,
0.14585144817829132,
-0.12336549162864685,
-0.46923828125,
0.23458144068717957,
-0.8719609975814819,
0.23487147688865662,
1.451222538948059,
0.39731818437576294,
0.05742107331752777,
0.5117926001548767,
1.0340644121170044,
0.43055135011672974,
-0.07065963000059128,
-0.8904570937156677,
-1.5150686502456665,
1.9976396560668945,
-1.45980966091156,
2.036667585372925,
0.8126233220100403,
-0.0644395723938942,
-1.8068253993988037,
-1.868362307548523,
1.315333604812622,
1.1152265071868896,
2.376145839691162,
0.5619587898254395,
0.3879743814468384,
-0.7730233073234558,
-0.724976122379303,
0.4197748601436615,
-1.0020205974578857,
-0.7126829028129578,
0.13617488741874695,
2.3235747814178467,
1.7701305150985718,
-0.43066951632499695,
-0.22182229161262512,
-0.9650719165802002,
1.349571943283081,
-0.18067976832389832,
0.24150598049163818,
2.0524721145629883,
-0.3396686613559723,
-1.0529556274414062,
1.3291124105453491,
-2.3358423709869385,
0.223041832447052,
1.9466421604156494,
0.2567206621170044,
0.06981605291366577,
-1.3617831468582153,
-0.6742009520530701,
-0.2669760584831238,
-0.3709208071231842,
-1.2485172748565674,
0.573872983455658,
-0.32180294394493103,
-0.833305835723877,
-1.5336862802505493,
0.07607395201921463,
-1.2183386087417603,
-1.6991467475891113,
0.2987733483314514,
1.995497226715088,
2.037578582763672,
-0.7990922927856445,
1.507110595703125,
-0.2532719075679779,
0.08528926223516464,
1.2008904218673706,
1.2912341356277466,
3.1587846279144287,
1.8158812522888184,
-1.3188486099243164,
0.6356290578842163,
-0.11234907060861588,
-0.4629603624343872,
1.028734803199768,
-1.1455806493759155,
1.276870608329773,
-0.1533169150352478,
-1.1480835676193237,
-1.1920042037963867,
0.9765410423278809,
0.5028740167617798,
0.0551346018910408,
-0.4604173004627228,
1.2483055591583252,
0.06327270716428757,
1.354543924331665,
0.5011299252510071,
-0.3852388858795166,
0.6184772849082947,
-0.3829401731491089,
-0.6029573678970337,
1.5746099948883057,
0.20898987352848053,
-1.4222073554992676,
-2.3372256755828857,
-0.3287533223628998,
-0.8548968434333801,
0.08500219136476517,
-0.6119334697723389,
-0.9892894625663757,
1.6872408390045166,
0.36491525173187256,
-1.2068893909454346,
-0.25342264771461487,
-0.30472251772880554,
-0.5927007794380188,
2.6176435947418213,
-1.3209888935089111,
-0.1375962346792221,
-0.9074477553367615,
-0.6264339685440063,
1.5379638671875,
-1.201194405555725,
-0.22399502992630005,
-1.0762804746627808,
-0.5812642574310303,
-1.2859662771224976,
-0.5129167437553406,
0.09018079936504364,
-0.9632794260978699,
0.8430376648902893,
0.2309795767068863,
-1.1099276542663574,
-0.2812146246433258,
-0.9246478080749512,
0.8979701995849609,
-0.08426593244075775,
0.23272474110126495,
1.8357861042022705,
0.34984251856803894,
-0.39354950189590454,
0.6914623975753784,
1.192826271057129,
0.6225240230560303,
-0.6956488490104675,
0.11946456879377365,
-0.7220755219459534,
0.3445504605770111,
-1.2561792135238647,
0.3380805552005768,
-2.9025328159332275,
0.6681856513023376,
-0.10907100141048431,
-0.04784609377384186,
-0.0037953010760247707,
-1.3121140003204346,
1.0660597085952759,
2.6097874641418457,
-1.0833165645599365,
0.4352854788303375,
0.3464176058769226,
1.1640139818191528,
-1.5988103151321411,
0.4020000100135803,
-0.3916091322898865,
2.0598080158233643,
0.18096090853214264,
1.1703672409057617,
-0.49746882915496826,
-2.358447551727295,
0.5968474745750427,
-1.2219502925872803,
-1.1642214059829712,
0.8112425804138184,
-0.8542777895927429,
0.09595808386802673,
-1.4475595951080322,
-0.16328489780426025,
-0.9144487380981445,
-1.2314748764038086,
0.6592583656311035,
0.12306787818670273,
0.5037575960159302,
-0.6215693354606628,
0.3513394296169281,
-2.1617226600646973,
-1.407325029373169,
-0.23226802051067352,
-0.9087828993797302,
0.5001758337020874,
-0.3819921910762787,
0.7332515120506287,
-0.18739652633666992,
0.06670809537172318,
0.3584749400615692,
1.4458988904953003,
3.3593080043792725,
0.13110314309597015,
0.25220805406570435,
-0.1962403804063797,
-0.9761897921562195,
1.450291633605957,
0.9134853482246399,
-0.09186612814664841,
-0.6087304353713989,
-1.0676237344741821,
1.2281829118728638,
2.02917218208313,
1.0382674932479858,
0.0035039829090237617,
-0.8432276844978333,
-0.7096458673477173,
-0.024351876229047775,
0.17967337369918823,
0.5012338161468506,
0.8825017809867859,
0.02437523566186428,
0.08883534371852875,
1.4683661460876465,
1.246992588043213,
-0.43358170986175537,
0.364465594291687,
-0.8088430762290955,
-0.45647868514060974,
0.46415945887565613,
0.27947136759757996,
0.045028381049633026,
0.3302682638168335,
-1.0393779277801514,
-0.19948884844779968,
-0.44854936003685,
-0.9562407732009888,
-0.7195098996162415,
-0.40005889534950256,
-0.35455402731895447,
1.6949049234390259,
0.10713978856801987,
-0.48788022994995117,
-0.03325430676341057,
-0.7906549572944641,
-0.10973728448152542,
-1.0768201351165771,
0.267446368932724,
-0.08003950864076614,
-0.11486759781837463,
-0.05973842740058899,
1.7751528024673462,
-0.9750112891197205,
-2.059070587158203,
0.1853751689195633,
0.27653416991233826,
-0.2623661160469055,
0.17142890393733978,
1.7187893390655518,
0.5395018458366394,
1.475616216659546,
1.3407191038131714,
0.9046711921691895,
-0.7269671559333801,
-1.2337665557861328,
0.6924163103103638,
0.9257431030273438,
-1.4551339149475098,
0.8900943994522095,
-0.047852180898189545,
-0.5722012519836426,
0.7040218710899353,
1.3372869491577148,
0.4434374272823334,
-1.990358591079712,
0.8929746150970459,
-0.9763281941413879,
0.7286893725395203,
0.7303377985954285,
0.682723343372345,
0.1603831797838211,
0.8066375851631165,
-1.2458868026733398,
-1.1554502248764038,
-0.7337555885314941,
-0.56119304895401,
1.961624026298523,
-0.2773747444152832,
0.5500459671020508,
-0.16621218621730804,
-1.2415741682052612,
-0.05891209840774536,
0.7170072793960571,
0.416438490152359,
-0.3905998170375824,
0.7321069240570068,
-0.6785750389099121,
-1.104785442352295,
-1.3681648969650269,
-0.4100661873817444,
-1.0575989484786987,
-0.8617396354675293,
1.0193884372711182,
0.8079751133918762,
0.37362927198410034,
1.9023290872573853,
0.6565207242965698,
0.2862379848957062,
-2.6558218002319336,
0.9492352604866028,
0.31007570028305054,
-0.09858808666467667,
0.9995686411857605,
0.26854363083839417,
1.072436809539795,
0.015618430450558662,
0.5293040871620178,
-2.390292167663574,
2.2849481105804443,
-0.24659207463264465,
0.721009373664856,
0.004931862466037273,
-0.16284997761249542,
1.1522847414016724,
0.5964935421943665,
0.5800036191940308,
-1.0749579668045044,
0.7510753273963928,
-0.50652676820755,
1.1464468240737915,
0.9922865033149719,
-0.7832322716712952,
0.07148844748735428,
1.3028346300125122,
0.498465359210968,
-0.5138517618179321,
-0.8867772817611694,
-0.9050140976905823,
0.8855081796646118,
1.7966232299804688,
-0.06130649149417877,
-0.021931245923042297,
0.8157643675804138,
0.6884432435035706,
-1.3112759590148926,
0.11301116645336151,
-0.6747863292694092,
-0.7512363195419312,
1.6158664226531982,
2.075549602508545,
-0.05604834109544754,
-0.12914226949214935,
-0.7109437584877014,
-1.2961089611053467,
0.7968365550041199,
-0.04950851947069168,
0.23049239814281464,
0.6217911839485168,
-0.6571637988090515,
1.1267918348312378,
0.7832285165786743,
0.9886144995689392,
0.1278306543827057,
0.2478785514831543,
0.43073368072509766,
-0.33930498361587524,
-1.1138166189193726,
-0.2694706916809082,
-1.0056291818618774,
-2.54240083694458,
0.5196094512939453,
-0.225892573595047,
-1.4729405641555786,
-0.013895200565457344,
-0.9401446580886841,
0.9176416993141174,
-0.5191767811775208,
-1.0675045251846313,
-1.5431305170059204,
0.21239952743053436,
-0.12444376945495605,
0.9467182159423828,
-1.600172519683838,
-0.16530540585517883,
1.2294809818267822,
0.9276143908500671,
-0.6157875657081604,
1.0179290771484375,
0.20432738959789276,
1.0160908699035645,
0.7702763080596924,
-0.3705582320690155,
0.4702059328556061,
0.07109590619802475,
-1.3774354457855225,
0.38655704259872437,
1.192914366722107,
0.16630986332893372,
1.431180477142334,
-0.5209572911262512,
0.09678418934345245,
0.3975088894367218,
-0.5268892049789429,
-0.4874473512172699,
-0.44337931275367737,
0.7126907110214233,
-0.01767120137810707,
-0.859292209148407,
-0.04987810552120209,
-0.09550392627716064,
-0.20431464910507202,
0.18479515612125397,
-1.4495956897735596,
-0.25888898968696594,
-0.409231573343277,
-0.5363054275512695,
-1.2259939908981323,
-0.03248240798711777,
1.3750381469726562,
-0.773317813873291,
-0.2436026781797409,
0.4654654264450073,
0.39747729897499084,
0.5185979008674622,
0.6473659873008728,
-0.6994917392730713,
-0.3262924551963806,
-0.21542806923389435,
-0.39626559615135193,
0.3537151515483856,
1.332826018333435,
-0.11513025313615799,
-0.9448974132537842,
0.6262820959091187,
-0.3337165415287018,
0.0816304013133049,
1.9740999937057495,
0.08531598001718521,
-0.7489388585090637,
0.3146469295024872,
-0.7138426303863525,
1.8886367082595825,
1.7645145654678345,
1.3213245868682861,
-0.16037215292453766,
-0.9443032145500183,
0.6015148758888245,
-0.3296372592449188,
-0.3416203558444977,
0.9302166104316711,
0.4352627098560333,
-0.19722895324230194,
-1.4109728336334229,
0.6567928194999695,
1.2280535697937012,
-0.9154857397079468,
-0.7515888214111328,
0.11243046820163727,
-0.8272114992141724,
1.0902405977249146,
0.6263436675071716,
0.39848336577415466,
0.23897309601306915,
1.600427508354187,
0.7616950273513794,
-0.5408880710601807,
0.5299599766731262,
0.4741763770580292,
-0.2163495421409607,
-2.057298421859741,
-1.1374667882919312,
0.3285990059375763,
-0.4697294235229492,
-1.5321006774902344,
1.4517282247543335,
-1.1674120426177979,
-0.9996472001075745,
0.5328793525695801,
0.11267002671957016,
1.3619765043258667,
0.36246898770332336,
1.688423991203308,
2.1193783283233643,
0.9660225510597229,
0.35756823420524597,
1.303114652633667,
-0.18735244870185852,
-0.45289915800094604,
1.823399543762207,
-0.4740098714828491,
0.46242061257362366,
1.1223950386047363,
-0.352313369512558,
-1.0470936298370361,
-0.773016095161438,
-1.1256014108657837,
-0.6649350523948669,
1.1868736743927002,
0.09259827435016632,
-1.130393624305725,
0.2294102907180786,
1.6320586204528809,
0.09125135838985443,
-0.28893664479255676,
0.6704871654510498,
0.4981078505516052,
-0.7502208352088928,
-0.13387517631053925,
-0.9184492230415344,
0.5515010356903076,
-0.3174371123313904,
-0.41697582602500916,
0.2724057734012604,
0.4615740180015564,
1.350942850112915,
-0.0890171080827713,
0.10833974927663803,
1.2118659019470215,
-1.4196653366088867,
1.4391030073165894,
-0.678977906703949,
0.25604572892189026,
-2.3979575634002686,
1.3958444595336914,
-0.7319267392158508,
1.992955207824707,
-2.5746936798095703,
0.43842461705207825,
-0.5910963416099548,
-0.4818483889102936,
0.2902466356754303,
-0.3456929624080658,
0.1795603483915329,
-0.18770043551921844,
-1.0359376668930054,
-0.0982729122042656,
-0.6836331486701965,
0.6090502738952637,
1.1768507957458496,
1.4070018529891968,
-1.0918066501617432,
-0.23229964077472687,
-1.70760977268219,
-0.2653365135192871,
-0.7603604197502136,
0.2715798020362854,
-1.9644063711166382,
-0.20465092360973358,
-1.9622937440872192,
-2.427229404449463,
-1.4379520416259766,
-0.8503191471099854,
1.1053667068481445,
0.1522897481918335,
-0.9264236092567444,
1.2007439136505127,
-0.3687308430671692,
-1.8921141624450684,
1.1929749250411987,
-2.1602373123168945
] |
https://github.com/huggingface/datasets/issues/3447 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading | Hi ! `load_dataset` may re-generate your dataset if some parameters changed indeed. If you want to freeze a dataset loaded with `load_dataset`, I think the best solution is just to save it somewhere on your disk with `.save_to_disk(my_dataset_dir)` and reload it with `load_from_disk(my_dataset_dir)`. This way you will be able to reload the dataset without having to run `load_dataset` | ## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, datasets still tried to download "custom data configuration" for JSON, despite I have run the program once and cached all data into the same --cache_dir.
"Downloading" is not an issue when running with local disk, but crashes often with cloud storage because (1) multiply GPU processes try to access the same file, AND (2) FileLocker fails to synchronize all processes, due to storage throttling. 99% of times, when the main process releases FileLocker, the file is not actually ready for access in cloud storage and thus triggers "FileNotFound" errors for all other processes. Well, another way to resolve the problem is to investigate super reliable cloud storage, but that's out of scope here.
## Steps to reproduce the bug
```
export HF_DATASETS_OFFLINE=1
python run_clm.py --model_name_or_path=models/gpt-j-6B --train_file=trainpy.v2.train.json --validation_file=trainpy.v2.eval.json --cache_dir=datacache/trainpy.v2
```
## Expected results
datasets should stop all "downloading" behavior but reuse the cached JSON configuration. I think the problem here is part of the cache directory path, "default-471372bed4b51b53", is randomly generated, and it could change if some parameters changed. And I didn't find a way to use a fixed path to ensure datasets to reuse cached data every time.
## Actual results
The logging shows datasets are still downloading into "datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426".
```
12/16/2021 10:25:59 - WARNING - datasets.builder - Using custom data configuration default-471372bed4b51b53
12/16/2021 10:25:59 - INFO - datasets.builder - Generating dataset json (datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426)
Downloading and preparing dataset json/default to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426...
100%|██████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 17623.13it/s]
12/16/2021 10:25:59 - INFO - datasets.utils.download_manager - Downloading took 0.0 min
12/16/2021 10:26:00 - INFO - datasets.utils.download_manager - Checksum Computation took 0.0 min
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 1206.99it/s]
12/16/2021 10:26:00 - INFO - datasets.utils.info_utils - Unable to verify checksums.
12/16/2021 10:26:00 - INFO - datasets.builder - Generating split train
12/16/2021 10:26:01 - INFO - datasets.builder - Generating split validation
12/16/2021 10:26:02 - INFO - datasets.utils.info_utils - Unable to verify splits sizes.
Dataset json downloaded and prepared to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426. Subsequent calls will reuse this data.
100%|█████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 53.54it/s]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux
- Python version: 3.8.10
- PyArrow version: 6.0.1
| 1,049 | 58 | HF_DATASETS_OFFLINE=1 didn't stop datasets.builder from downloading
## Describe the bug
According to https://huggingface.co/docs/datasets/loading_datasets.html#loading-a-dataset-builder, setting HF_DATASETS_OFFLINE to 1 should make datasets to "run in full offline mode". It didn't work for me. At the very beginning, datasets still tried to download "custom data configuration" for JSON, despite I have run the program once and cached all data into the same --cache_dir.
"Downloading" is not an issue when running with local disk, but crashes often with cloud storage because (1) multiply GPU processes try to access the same file, AND (2) FileLocker fails to synchronize all processes, due to storage throttling. 99% of times, when the main process releases FileLocker, the file is not actually ready for access in cloud storage and thus triggers "FileNotFound" errors for all other processes. Well, another way to resolve the problem is to investigate super reliable cloud storage, but that's out of scope here.
## Steps to reproduce the bug
```
export HF_DATASETS_OFFLINE=1
python run_clm.py --model_name_or_path=models/gpt-j-6B --train_file=trainpy.v2.train.json --validation_file=trainpy.v2.eval.json --cache_dir=datacache/trainpy.v2
```
## Expected results
datasets should stop all "downloading" behavior but reuse the cached JSON configuration. I think the problem here is part of the cache directory path, "default-471372bed4b51b53", is randomly generated, and it could change if some parameters changed. And I didn't find a way to use a fixed path to ensure datasets to reuse cached data every time.
## Actual results
The logging shows datasets are still downloading into "datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426".
```
12/16/2021 10:25:59 - WARNING - datasets.builder - Using custom data configuration default-471372bed4b51b53
12/16/2021 10:25:59 - INFO - datasets.builder - Generating dataset json (datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426)
Downloading and preparing dataset json/default to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426...
100%|██████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 17623.13it/s]
12/16/2021 10:25:59 - INFO - datasets.utils.download_manager - Downloading took 0.0 min
12/16/2021 10:26:00 - INFO - datasets.utils.download_manager - Checksum Computation took 0.0 min
100%|███████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 1206.99it/s]
12/16/2021 10:26:00 - INFO - datasets.utils.info_utils - Unable to verify checksums.
12/16/2021 10:26:00 - INFO - datasets.builder - Generating split train
12/16/2021 10:26:01 - INFO - datasets.builder - Generating split validation
12/16/2021 10:26:02 - INFO - datasets.utils.info_utils - Unable to verify splits sizes.
Dataset json downloaded and prepared to datacache/trainpy.v2/json/default-471372bed4b51b53/0.0.0/c2d554c3377ea79c7664b93dc65d0803b45e3279000f993c7bfd18937fd7f426. Subsequent calls will reuse this data.
100%|█████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 53.54it/s]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux
- Python version: 3.8.10
- PyArrow version: 6.0.1
Hi ! `load_dataset` may re-generate your dataset if some parameters changed indeed. If you want to freeze a dataset loaded with `load_dataset`, I think the best solution is just to save it somewhere on your disk with `.save_to_disk(my_dataset_dir)` and reload it with `load_from_disk(my_dataset_dir)`. This way you will be able to reload the dataset without having to run `load_dataset` | [
-1.2128112316131592,
-0.9091240763664246,
-0.7229031324386597,
1.3997721672058105,
-0.2259003221988678,
-1.2170780897140503,
0.06518329679965973,
-1.1197080612182617,
1.6044509410858154,
-0.8693190217018127,
0.23772253096103668,
-1.6282514333724976,
0.011626504361629486,
-0.5614458918571472,
-0.6727464199066162,
-0.8520410656929016,
-0.41112056374549866,
-0.8488376140594482,
0.9952138066291809,
2.494659900665283,
1.1456421613693237,
-1.3362147808074951,
2.7328991889953613,
0.7220589518547058,
-0.23535127937793732,
-0.9953088760375977,
0.5373188853263855,
0.07448630034923553,
-1.3168672323226929,
-0.4264557659626007,
-0.9558978080749512,
-0.015460407361388206,
-0.6419395804405212,
-0.485411137342453,
0.06004585325717926,
0.3730078935623169,
-0.31039664149284363,
-0.39902371168136597,
-0.5948604345321655,
-0.7285440564155579,
0.4801245629787445,
-0.3911287188529968,
0.9677850008010864,
-0.3805713951587677,
1.800246238708496,
-0.5043227672576904,
0.3800678849220276,
0.6841191053390503,
1.2424216270446777,
0.23423419892787933,
0.08936049044132233,
0.2509951889514923,
0.3632657825946808,
0.005416656844317913,
0.5160661339759827,
1.1199393272399902,
0.5780888795852661,
0.5112539529800415,
0.696144163608551,
-2.1715214252471924,
1.36017906665802,
-0.9438536167144775,
0.22436217963695526,
1.38999605178833,
-0.8989126086235046,
0.47202256321907043,
-1.8392126560211182,
-0.040412358939647675,
0.5951293706893921,
-2.268812894821167,
0.24774032831192017,
-1.2715519666671753,
-0.5559719204902649,
1.0381971597671509,
0.33321613073349,
-1.187940239906311,
0.17983153462409973,
-0.5300692915916443,
1.0208778381347656,
0.4343253970146179,
1.1134992837905884,
-1.721107006072998,
-0.08521944284439087,
-0.27767542004585266,
0.10919268429279327,
-1.3547446727752686,
-1.6052312850952148,
0.5904966592788696,
0.6713072061538696,
0.6207862496376038,
-0.07496638596057892,
1.0124214887619019,
-1.094344139099121,
0.8112867474555969,
-0.9619728326797485,
-1.6571145057678223,
-1.3695549964904785,
-2.305480718612671,
-2.287834644317627,
0.7692107558250427,
-0.48585453629493713,
-0.5613064169883728,
2.0288851261138916,
-1.0690916776657104,
-1.684676170349121,
1.118823766708374,
0.2340630739927292,
-0.02030295319855213,
2.4342737197875977,
0.22788269817829132,
-0.7596450448036194,
0.4563067555427551,
-0.7204938530921936,
0.7664738297462463,
-0.38903936743736267,
1.2999972105026245,
0.4520566761493683,
-1.053695797920227,
1.5845166444778442,
-0.3943536877632141,
0.5852004885673523,
-0.6516869068145752,
-0.5299769639968872,
-0.799798309803009,
0.29329416155815125,
1.883937120437622,
-0.3179500997066498,
1.5258734226226807,
-0.2914261221885681,
-1.5578196048736572,
-1.5815240144729614,
0.8995895981788635,
0.4912528991699219,
-0.8274989724159241,
0.06422137469053268,
-0.3843313455581665,
0.19328247010707855,
-0.08616287261247635,
1.0610949993133545,
1.3073108196258545,
0.7169788479804993,
-0.34489068388938904,
-0.8777452111244202,
0.19873479008674622,
-0.13718169927597046,
-0.7495943903923035,
-1.8343720436096191,
-0.3560488224029541,
0.0911288857460022,
0.6365315914154053,
-1.1845756769180298,
1.676034927368164,
0.9529820680618286,
1.8771445751190186,
1.0446134805679321,
-0.38039228320121765,
1.434155821800232,
0.06044307351112366,
1.816202163696289,
-0.5575466156005859,
0.6997092962265015,
-0.3313349187374115,
-1.1131083965301514,
0.792514979839325,
-0.3108305037021637,
-2.0305755138397217,
-0.7081592679023743,
-0.7540274858474731,
-0.2543638050556183,
-0.7314503192901611,
0.8763936161994934,
-0.29429569840431213,
-1.4717024564743042,
0.2327231764793396,
-0.6195646524429321,
0.11713843792676926,
-1.2220863103866577,
0.3025604784488678,
0.7110469937324524,
-0.6453651189804077,
0.10322286188602448,
-0.2642197012901306,
-1.2511521577835083,
-0.47936248779296875,
0.33202752470970154,
1.8589955568313599,
-0.7502122521400452,
0.9775336384773254,
1.0030062198638916,
-0.7446973323822021,
0.02834293060004711,
0.3895624577999115,
-0.27270814776420593,
0.7703532576560974,
-1.1262365579605103,
-0.46237361431121826,
1.1436247825622559,
-0.28983035683631897,
-0.5718799233436584,
1.3570750951766968,
0.7696071267127991,
-1.0948705673217773,
-0.23199576139450073,
-0.14764165878295898,
-0.9061101675033569,
0.07730352878570557,
-1.597367763519287,
-0.1723950058221817,
0.28371649980545044,
-1.5518137216567993,
-0.4658006727695465,
-0.23695795238018036,
1.3306399583816528,
-0.1566249430179596,
1.4373830556869507,
-0.3401356041431427,
-0.22825290262699127,
-0.2693396806716919,
-0.4476262331008911,
0.14585144817829132,
-0.12336549162864685,
-0.46923828125,
0.23458144068717957,
-0.8719609975814819,
0.23487147688865662,
1.451222538948059,
0.39731818437576294,
0.05742107331752777,
0.5117926001548767,
1.0340644121170044,
0.43055135011672974,
-0.07065963000059128,
-0.8904570937156677,
-1.5150686502456665,
1.9976396560668945,
-1.45980966091156,
2.036667585372925,
0.8126233220100403,
-0.0644395723938942,
-1.8068253993988037,
-1.868362307548523,
1.315333604812622,
1.1152265071868896,
2.376145839691162,
0.5619587898254395,
0.3879743814468384,
-0.7730233073234558,
-0.724976122379303,
0.4197748601436615,
-1.0020205974578857,
-0.7126829028129578,
0.13617488741874695,
2.3235747814178467,
1.7701305150985718,
-0.43066951632499695,
-0.22182229161262512,
-0.9650719165802002,
1.349571943283081,
-0.18067976832389832,
0.24150598049163818,
2.0524721145629883,
-0.3396686613559723,
-1.0529556274414062,
1.3291124105453491,
-2.3358423709869385,
0.223041832447052,
1.9466421604156494,
0.2567206621170044,
0.06981605291366577,
-1.3617831468582153,
-0.6742009520530701,
-0.2669760584831238,
-0.3709208071231842,
-1.2485172748565674,
0.573872983455658,
-0.32180294394493103,
-0.833305835723877,
-1.5336862802505493,
0.07607395201921463,
-1.2183386087417603,
-1.6991467475891113,
0.2987733483314514,
1.995497226715088,
2.037578582763672,
-0.7990922927856445,
1.507110595703125,
-0.2532719075679779,
0.08528926223516464,
1.2008904218673706,
1.2912341356277466,
3.1587846279144287,
1.8158812522888184,
-1.3188486099243164,
0.6356290578842163,
-0.11234907060861588,
-0.4629603624343872,
1.028734803199768,
-1.1455806493759155,
1.276870608329773,
-0.1533169150352478,
-1.1480835676193237,
-1.1920042037963867,
0.9765410423278809,
0.5028740167617798,
0.0551346018910408,
-0.4604173004627228,
1.2483055591583252,
0.06327270716428757,
1.354543924331665,
0.5011299252510071,
-0.3852388858795166,
0.6184772849082947,
-0.3829401731491089,
-0.6029573678970337,
1.5746099948883057,
0.20898987352848053,
-1.4222073554992676,
-2.3372256755828857,
-0.3287533223628998,
-0.8548968434333801,
0.08500219136476517,
-0.6119334697723389,
-0.9892894625663757,
1.6872408390045166,
0.36491525173187256,
-1.2068893909454346,
-0.25342264771461487,
-0.30472251772880554,
-0.5927007794380188,
2.6176435947418213,
-1.3209888935089111,
-0.1375962346792221,
-0.9074477553367615,
-0.6264339685440063,
1.5379638671875,
-1.201194405555725,
-0.22399502992630005,
-1.0762804746627808,
-0.5812642574310303,
-1.2859662771224976,
-0.5129167437553406,
0.09018079936504364,
-0.9632794260978699,
0.8430376648902893,
0.2309795767068863,
-1.1099276542663574,
-0.2812146246433258,
-0.9246478080749512,
0.8979701995849609,
-0.08426593244075775,
0.23272474110126495,
1.8357861042022705,
0.34984251856803894,
-0.39354950189590454,
0.6914623975753784,
1.192826271057129,
0.6225240230560303,
-0.6956488490104675,
0.11946456879377365,
-0.7220755219459534,
0.3445504605770111,
-1.2561792135238647,
0.3380805552005768,
-2.9025328159332275,
0.6681856513023376,
-0.10907100141048431,
-0.04784609377384186,
-0.0037953010760247707,
-1.3121140003204346,
1.0660597085952759,
2.6097874641418457,
-1.0833165645599365,
0.4352854788303375,
0.3464176058769226,
1.1640139818191528,
-1.5988103151321411,
0.4020000100135803,
-0.3916091322898865,
2.0598080158233643,
0.18096090853214264,
1.1703672409057617,
-0.49746882915496826,
-2.358447551727295,
0.5968474745750427,
-1.2219502925872803,
-1.1642214059829712,
0.8112425804138184,
-0.8542777895927429,
0.09595808386802673,
-1.4475595951080322,
-0.16328489780426025,
-0.9144487380981445,
-1.2314748764038086,
0.6592583656311035,
0.12306787818670273,
0.5037575960159302,
-0.6215693354606628,
0.3513394296169281,
-2.1617226600646973,
-1.407325029373169,
-0.23226802051067352,
-0.9087828993797302,
0.5001758337020874,
-0.3819921910762787,
0.7332515120506287,
-0.18739652633666992,
0.06670809537172318,
0.3584749400615692,
1.4458988904953003,
3.3593080043792725,
0.13110314309597015,
0.25220805406570435,
-0.1962403804063797,
-0.9761897921562195,
1.450291633605957,
0.9134853482246399,
-0.09186612814664841,
-0.6087304353713989,
-1.0676237344741821,
1.2281829118728638,
2.02917218208313,
1.0382674932479858,
0.0035039829090237617,
-0.8432276844978333,
-0.7096458673477173,
-0.024351876229047775,
0.17967337369918823,
0.5012338161468506,
0.8825017809867859,
0.02437523566186428,
0.08883534371852875,
1.4683661460876465,
1.246992588043213,
-0.43358170986175537,
0.364465594291687,
-0.8088430762290955,
-0.45647868514060974,
0.46415945887565613,
0.27947136759757996,
0.045028381049633026,
0.3302682638168335,
-1.0393779277801514,
-0.19948884844779968,
-0.44854936003685,
-0.9562407732009888,
-0.7195098996162415,
-0.40005889534950256,
-0.35455402731895447,
1.6949049234390259,
0.10713978856801987,
-0.48788022994995117,
-0.03325430676341057,
-0.7906549572944641,
-0.10973728448152542,
-1.0768201351165771,
0.267446368932724,
-0.08003950864076614,
-0.11486759781837463,
-0.05973842740058899,
1.7751528024673462,
-0.9750112891197205,
-2.059070587158203,
0.1853751689195633,
0.27653416991233826,
-0.2623661160469055,
0.17142890393733978,
1.7187893390655518,
0.5395018458366394,
1.475616216659546,
1.3407191038131714,
0.9046711921691895,
-0.7269671559333801,
-1.2337665557861328,
0.6924163103103638,
0.9257431030273438,
-1.4551339149475098,
0.8900943994522095,
-0.047852180898189545,
-0.5722012519836426,
0.7040218710899353,
1.3372869491577148,
0.4434374272823334,
-1.990358591079712,
0.8929746150970459,
-0.9763281941413879,
0.7286893725395203,
0.7303377985954285,
0.682723343372345,
0.1603831797838211,
0.8066375851631165,
-1.2458868026733398,
-1.1554502248764038,
-0.7337555885314941,
-0.56119304895401,
1.961624026298523,
-0.2773747444152832,
0.5500459671020508,
-0.16621218621730804,
-1.2415741682052612,
-0.05891209840774536,
0.7170072793960571,
0.416438490152359,
-0.3905998170375824,
0.7321069240570068,
-0.6785750389099121,
-1.104785442352295,
-1.3681648969650269,
-0.4100661873817444,
-1.0575989484786987,
-0.8617396354675293,
1.0193884372711182,
0.8079751133918762,
0.37362927198410034,
1.9023290872573853,
0.6565207242965698,
0.2862379848957062,
-2.6558218002319336,
0.9492352604866028,
0.31007570028305054,
-0.09858808666467667,
0.9995686411857605,
0.26854363083839417,
1.072436809539795,
0.015618430450558662,
0.5293040871620178,
-2.390292167663574,
2.2849481105804443,
-0.24659207463264465,
0.721009373664856,
0.004931862466037273,
-0.16284997761249542,
1.1522847414016724,
0.5964935421943665,
0.5800036191940308,
-1.0749579668045044,
0.7510753273963928,
-0.50652676820755,
1.1464468240737915,
0.9922865033149719,
-0.7832322716712952,
0.07148844748735428,
1.3028346300125122,
0.498465359210968,
-0.5138517618179321,
-0.8867772817611694,
-0.9050140976905823,
0.8855081796646118,
1.7966232299804688,
-0.06130649149417877,
-0.021931245923042297,
0.8157643675804138,
0.6884432435035706,
-1.3112759590148926,
0.11301116645336151,
-0.6747863292694092,
-0.7512363195419312,
1.6158664226531982,
2.075549602508545,
-0.05604834109544754,
-0.12914226949214935,
-0.7109437584877014,
-1.2961089611053467,
0.7968365550041199,
-0.04950851947069168,
0.23049239814281464,
0.6217911839485168,
-0.6571637988090515,
1.1267918348312378,
0.7832285165786743,
0.9886144995689392,
0.1278306543827057,
0.2478785514831543,
0.43073368072509766,
-0.33930498361587524,
-1.1138166189193726,
-0.2694706916809082,
-1.0056291818618774,
-2.54240083694458,
0.5196094512939453,
-0.225892573595047,
-1.4729405641555786,
-0.013895200565457344,
-0.9401446580886841,
0.9176416993141174,
-0.5191767811775208,
-1.0675045251846313,
-1.5431305170059204,
0.21239952743053436,
-0.12444376945495605,
0.9467182159423828,
-1.600172519683838,
-0.16530540585517883,
1.2294809818267822,
0.9276143908500671,
-0.6157875657081604,
1.0179290771484375,
0.20432738959789276,
1.0160908699035645,
0.7702763080596924,
-0.3705582320690155,
0.4702059328556061,
0.07109590619802475,
-1.3774354457855225,
0.38655704259872437,
1.192914366722107,
0.16630986332893372,
1.431180477142334,
-0.5209572911262512,
0.09678418934345245,
0.3975088894367218,
-0.5268892049789429,
-0.4874473512172699,
-0.44337931275367737,
0.7126907110214233,
-0.01767120137810707,
-0.859292209148407,
-0.04987810552120209,
-0.09550392627716064,
-0.20431464910507202,
0.18479515612125397,
-1.4495956897735596,
-0.25888898968696594,
-0.409231573343277,
-0.5363054275512695,
-1.2259939908981323,
-0.03248240798711777,
1.3750381469726562,
-0.773317813873291,
-0.2436026781797409,
0.4654654264450073,
0.39747729897499084,
0.5185979008674622,
0.6473659873008728,
-0.6994917392730713,
-0.3262924551963806,
-0.21542806923389435,
-0.39626559615135193,
0.3537151515483856,
1.332826018333435,
-0.11513025313615799,
-0.9448974132537842,
0.6262820959091187,
-0.3337165415287018,
0.0816304013133049,
1.9740999937057495,
0.08531598001718521,
-0.7489388585090637,
0.3146469295024872,
-0.7138426303863525,
1.8886367082595825,
1.7645145654678345,
1.3213245868682861,
-0.16037215292453766,
-0.9443032145500183,
0.6015148758888245,
-0.3296372592449188,
-0.3416203558444977,
0.9302166104316711,
0.4352627098560333,
-0.19722895324230194,
-1.4109728336334229,
0.6567928194999695,
1.2280535697937012,
-0.9154857397079468,
-0.7515888214111328,
0.11243046820163727,
-0.8272114992141724,
1.0902405977249146,
0.6263436675071716,
0.39848336577415466,
0.23897309601306915,
1.600427508354187,
0.7616950273513794,
-0.5408880710601807,
0.5299599766731262,
0.4741763770580292,
-0.2163495421409607,
-2.057298421859741,
-1.1374667882919312,
0.3285990059375763,
-0.4697294235229492,
-1.5321006774902344,
1.4517282247543335,
-1.1674120426177979,
-0.9996472001075745,
0.5328793525695801,
0.11267002671957016,
1.3619765043258667,
0.36246898770332336,
1.688423991203308,
2.1193783283233643,
0.9660225510597229,
0.35756823420524597,
1.303114652633667,
-0.18735244870185852,
-0.45289915800094604,
1.823399543762207,
-0.4740098714828491,
0.46242061257362366,
1.1223950386047363,
-0.352313369512558,
-1.0470936298370361,
-0.773016095161438,
-1.1256014108657837,
-0.6649350523948669,
1.1868736743927002,
0.09259827435016632,
-1.130393624305725,
0.2294102907180786,
1.6320586204528809,
0.09125135838985443,
-0.28893664479255676,
0.6704871654510498,
0.4981078505516052,
-0.7502208352088928,
-0.13387517631053925,
-0.9184492230415344,
0.5515010356903076,
-0.3174371123313904,
-0.41697582602500916,
0.2724057734012604,
0.4615740180015564,
1.350942850112915,
-0.0890171080827713,
0.10833974927663803,
1.2118659019470215,
-1.4196653366088867,
1.4391030073165894,
-0.678977906703949,
0.25604572892189026,
-2.3979575634002686,
1.3958444595336914,
-0.7319267392158508,
1.992955207824707,
-2.5746936798095703,
0.43842461705207825,
-0.5910963416099548,
-0.4818483889102936,
0.2902466356754303,
-0.3456929624080658,
0.1795603483915329,
-0.18770043551921844,
-1.0359376668930054,
-0.0982729122042656,
-0.6836331486701965,
0.6090502738952637,
1.1768507957458496,
1.4070018529891968,
-1.0918066501617432,
-0.23229964077472687,
-1.70760977268219,
-0.2653365135192871,
-0.7603604197502136,
0.2715798020362854,
-1.9644063711166382,
-0.20465092360973358,
-1.9622937440872192,
-2.427229404449463,
-1.4379520416259766,
-0.8503191471099854,
1.1053667068481445,
0.1522897481918335,
-0.9264236092567444,
1.2007439136505127,
-0.3687308430671692,
-1.8921141624450684,
1.1929749250411987,
-2.1602373123168945
] |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | Yes I agree, these should be as aligned as possible. Maybe we can also check the feedback in the survey at http://hf.co/oss-survey and see if people mentioned related things on the API (in particular if we go the breaking change way, it would be good to be sure we are taking the right direction for the community). | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger | 1,051 | 57 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger
Yes I agree, these should be as aligned as possible. Maybe we can also check the feedback in the survey at http://hf.co/oss-survey and see if people mentioned related things on the API (in particular if we go the breaking change way, it would be good to be sure we are taking the right direction for the community). | [
-1.165069341659546,
-0.9137279391288757,
-0.7034327983856201,
1.4775683879852295,
-0.182785302400589,
-1.2899360656738281,
0.22895671427249908,
-1.0863122940063477,
1.6649971008300781,
-0.8457667231559753,
0.37291669845581055,
-1.6002495288848877,
0.060649629682302475,
-0.5887289047241211,
-0.7210293412208557,
-0.7617984414100647,
-0.43534573912620544,
-0.8846697211265564,
1.082593560218811,
2.421595811843872,
1.1886775493621826,
-1.3998439311981201,
2.7131896018981934,
0.6548430323600769,
-0.2995055019855499,
-0.9161980152130127,
0.4264586269855499,
-0.12470431625843048,
-1.252764344215393,
-0.5706902742385864,
-0.8707075715065002,
-0.1465669721364975,
-0.5931786894798279,
-0.4224770665168762,
-0.08767490088939667,
0.444755882024765,
-0.18410322070121765,
-0.4144452214241028,
-0.4630773663520813,
-0.7575943470001221,
0.5515730977058411,
-0.32713374495506287,
1.0184587240219116,
-0.2847948670387268,
1.7861952781677246,
-0.5492554306983948,
0.5621044039726257,
0.7648176550865173,
1.2359033823013306,
0.1613176316022873,
-0.046242859214544296,
0.29210329055786133,
0.35932764410972595,
-0.018789248540997505,
0.6023290753364563,
1.0469105243682861,
0.645359218120575,
0.5573264360427856,
0.6635415554046631,
-2.2354066371917725,
1.3910791873931885,
-1.0483919382095337,
0.3897513449192047,
1.3463795185089111,
-0.8964346647262573,
0.3106921315193176,
-1.7830784320831299,
0.023385830223560333,
0.6352533102035522,
-2.157705068588257,
0.3833595812320709,
-1.2640968561172485,
-0.486579954624176,
1.0741419792175293,
0.3563194274902344,
-1.2671877145767212,
0.15089784562587738,
-0.4514319598674774,
1.0023735761642456,
0.4079919457435608,
0.9403281211853027,
-1.7653977870941162,
0.027217160910367966,
-0.25800272822380066,
0.15414635837078094,
-1.2031601667404175,
-1.5868600606918335,
0.6799666285514832,
0.5566564202308655,
0.5006989240646362,
-0.13728724420070648,
1.074215292930603,
-1.0951550006866455,
0.8684979677200317,
-1.151162028312683,
-1.6218972206115723,
-1.3844923973083496,
-2.2667219638824463,
-2.2322919368743896,
0.7019857168197632,
-0.554528534412384,
-0.4608031213283539,
2.0926578044891357,
-1.0583382844924927,
-1.550857663154602,
1.1991633176803589,
0.20265474915504456,
0.10543936491012573,
2.2998688220977783,
0.16701970994472504,
-0.6153276562690735,
0.4437970817089081,
-0.8798969984054565,
0.92386394739151,
-0.3762107491493225,
1.2628918886184692,
0.30149659514427185,
-1.0730514526367188,
1.4779385328292847,
-0.4023773670196533,
0.5579099059104919,
-0.5391546487808228,
-0.659578800201416,
-0.7896273136138916,
0.3209342360496521,
1.882327675819397,
-0.20722602307796478,
1.4966853857040405,
-0.33818352222442627,
-1.5308277606964111,
-1.6291362047195435,
0.9577271938323975,
0.3994768261909485,
-0.8671972751617432,
0.12122032046318054,
-0.48738977313041687,
0.1888248473405838,
-0.17548316717147827,
1.1323702335357666,
1.2923719882965088,
0.77382493019104,
-0.44357943534851074,
-0.8782188892364502,
0.10976804792881012,
-0.1755269467830658,
-0.8671227693557739,
-1.7223135232925415,
-0.34490904211997986,
0.0063753556460142136,
0.6389137506484985,
-1.1570959091186523,
1.7805182933807373,
1.0037870407104492,
1.9926033020019531,
0.9668293595314026,
-0.3569318652153015,
1.4431062936782837,
0.10631215572357178,
1.8408203125,
-0.5491238832473755,
0.6157233715057373,
-0.4085213541984558,
-1.1301679611206055,
0.9052014350891113,
-0.303369402885437,
-2.0772852897644043,
-0.804172933101654,
-0.6799111366271973,
-0.29347720742225647,
-0.7902155518531799,
0.9142588376998901,
-0.25206828117370605,
-1.431322455406189,
0.21250927448272705,
-0.6551389694213867,
0.16823840141296387,
-1.1360244750976562,
0.2788585424423218,
0.6652074456214905,
-0.68938148021698,
0.02729199081659317,
-0.17535270750522614,
-1.2333815097808838,
-0.47359326481819153,
0.2979842722415924,
1.9259750843048096,
-0.6645284295082092,
0.9807983040809631,
1.0841429233551025,
-0.5943360924720764,
-0.03391864895820618,
0.1944340467453003,
-0.26384568214416504,
0.766354501247406,
-1.1115700006484985,
-0.6042917966842651,
1.2473666667938232,
-0.30150920152664185,
-0.5400582551956177,
1.482526183128357,
0.5570260882377625,
-1.0982303619384766,
-0.2157067060470581,
-0.10938133299350739,
-0.8523957133293152,
0.11863183975219727,
-1.582978367805481,
-0.012734751217067242,
0.47600314021110535,
-1.5716270208358765,
-0.37470558285713196,
-0.15978913009166718,
1.2463066577911377,
-0.05592427775263786,
1.4309697151184082,
-0.33789709210395813,
-0.21420897543430328,
-0.36891502141952515,
-0.3598773181438446,
0.16767646372318268,
-0.12969741225242615,
-0.5132169127464294,
0.08360555768013,
-0.787693202495575,
0.3843601942062378,
1.4683014154434204,
0.13820423185825348,
0.01858028769493103,
0.41669410467147827,
1.0318262577056885,
0.43592187762260437,
0.021374469622969627,
-0.877274215221405,
-1.4379627704620361,
2.0525646209716797,
-1.4884192943572998,
1.9607393741607666,
0.8747599720954895,
-0.010838774032890797,
-1.8204479217529297,
-1.7931787967681885,
1.2240995168685913,
1.1092338562011719,
2.170463800430298,
0.4556483328342438,
0.3283384144306183,
-0.888292670249939,
-0.6415586471557617,
0.3633909523487091,
-0.9732125401496887,
-0.6852800250053406,
0.14069493114948273,
2.49464750289917,
1.751508355140686,
-0.32400816679000854,
-0.20010456442832947,
-0.9342746138572693,
1.4188945293426514,
-0.22894300520420074,
0.2895158529281616,
2.0242278575897217,
-0.29350152611732483,
-1.1301060914993286,
1.3972231149673462,
-2.4456069469451904,
0.24635432660579681,
2.0436198711395264,
0.38498127460479736,
0.17992275953292847,
-1.3342957496643066,
-0.5747502446174622,
-0.2640361487865448,
-0.3764503002166748,
-1.2330753803253174,
0.5529394745826721,
-0.22356358170509338,
-0.8260068893432617,
-1.3847877979278564,
0.2538537383079529,
-1.1984601020812988,
-1.6936043500900269,
0.34130072593688965,
1.85084068775177,
2.1332919597625732,
-0.6693000793457031,
1.5045363903045654,
-0.3996897041797638,
0.1609160602092743,
1.1934441328048706,
1.3432250022888184,
3.0246474742889404,
1.9061166048049927,
-1.3269699811935425,
0.5724182724952698,
-0.25514549016952515,
-0.4938659369945526,
1.0792630910873413,
-1.1933554410934448,
1.2660425901412964,
-0.11809416115283966,
-1.1339141130447388,
-1.1952897310256958,
0.9951735138893127,
0.4138599932193756,
0.10620440542697906,
-0.5030744671821594,
1.266261339187622,
0.12659549713134766,
1.320824384689331,
0.670116662979126,
-0.4019485414028168,
0.5002732276916504,
-0.4977375268936157,
-0.5325846672058105,
1.5777119398117065,
0.26616355776786804,
-1.4104044437408447,
-2.2472681999206543,
-0.22536706924438477,
-0.8736492395401001,
0.11750385165214539,
-0.6476702094078064,
-0.9723302125930786,
1.6149911880493164,
0.2486780732870102,
-1.3172943592071533,
-0.31735992431640625,
-0.31564751267433167,
-0.47142577171325684,
2.6629204750061035,
-1.3425554037094116,
-0.2086380273103714,
-0.9534834623336792,
-0.6637805700302124,
1.6370141506195068,
-1.3108354806900024,
-0.2999853789806366,
-1.0953421592712402,
-0.6026521325111389,
-1.11228609085083,
-0.4086052179336548,
0.007203040644526482,
-1.0063894987106323,
0.9450002908706665,
0.22550790011882782,
-1.1799159049987793,
-0.3892969489097595,
-0.8328654170036316,
0.9312035441398621,
-0.1909664422273636,
0.27463072538375854,
1.6117862462997437,
0.3024437725543976,
-0.3333493173122406,
0.8382742404937744,
1.243570327758789,
0.7128844857215881,
-0.7027834057807922,
0.010628033429384232,
-0.6084732413291931,
0.508722186088562,
-1.1731410026550293,
0.3725678622722626,
-2.9359514713287354,
0.5779475569725037,
-0.16632407903671265,
-0.05471654608845711,
-0.10372795164585114,
-1.405120611190796,
1.0828535556793213,
2.569363594055176,
-1.1373505592346191,
0.4741891622543335,
0.39076459407806396,
1.126697063446045,
-1.6344658136367798,
0.3739917278289795,
-0.5125447511672974,
2.1616318225860596,
0.1786031723022461,
1.2984075546264648,
-0.5312674641609192,
-2.4161770343780518,
0.6591798663139343,
-1.2779555320739746,
-1.2505171298980713,
0.7549480199813843,
-0.9042500257492065,
0.1313367336988449,
-1.4658502340316772,
-0.2678976356983185,
-0.8721604943275452,
-1.3265937566757202,
0.6764591932296753,
0.19426241517066956,
0.39881783723831177,
-0.5768412947654724,
0.2740838825702667,
-2.284177780151367,
-1.4188634157180786,
-0.16329634189605713,
-0.9463228583335876,
0.4917406439781189,
-0.5635092258453369,
0.752348780632019,
-0.06547631323337555,
0.05756251886487007,
0.4059801697731018,
1.4995594024658203,
3.5098042488098145,
0.15741068124771118,
0.3083840310573578,
-0.33780235052108765,
-0.9533418416976929,
1.4086204767227173,
0.9064763784408569,
-0.08109760284423828,
-0.6267821192741394,
-1.0264948606491089,
1.1964499950408936,
2.1515231132507324,
0.8627890348434448,
-0.020296040922403336,
-0.8252351880073547,
-0.6391072869300842,
-0.10551920533180237,
0.17565122246742249,
0.5346301198005676,
0.9028369188308716,
0.09143099188804626,
0.08891332149505615,
1.4391049146652222,
1.0424009561538696,
-0.2953517735004425,
0.29126688838005066,
-0.6817395687103271,
-0.46215420961380005,
0.5352842807769775,
0.2667047679424286,
0.009308172389864922,
0.42007511854171753,
-0.9795219302177429,
-0.30939358472824097,
-0.40643608570098877,
-0.8469188809394836,
-0.7349671721458435,
-0.390153169631958,
-0.41294431686401367,
1.5932966470718384,
0.12183310091495514,
-0.4873456060886383,
0.01374484971165657,
-0.6351829767227173,
-0.09372025728225708,
-1.1517620086669922,
0.23282313346862793,
-0.14708146452903748,
-0.1191922128200531,
-0.16576240956783295,
1.7243815660476685,
-0.9610468745231628,
-2.03244686126709,
0.1465366929769516,
0.2616293430328369,
-0.16093461215496063,
0.16912157833576202,
1.681993842124939,
0.520663321018219,
1.5330408811569214,
1.252151370048523,
0.9533661007881165,
-0.7244002223014832,
-1.364048719406128,
0.7555742859840393,
0.9456987977027893,
-1.3924685716629028,
0.6754716634750366,
-0.05408454313874245,
-0.4628545939922333,
0.7125422358512878,
1.1922444105148315,
0.4977198839187622,
-2.069204092025757,
0.8478282690048218,
-1.1619441509246826,
0.9616836309432983,
0.8263775706291199,
0.7356089353561401,
0.186698317527771,
0.8372570872306824,
-1.2618257999420166,
-1.058336853981018,
-0.696169376373291,
-0.8000527620315552,
2.0064735412597656,
-0.47005683183670044,
0.6199464201927185,
-0.09055545926094055,
-1.3140249252319336,
-0.04738731309771538,
0.815670371055603,
0.387663334608078,
-0.4360212981700897,
0.7093985080718994,
-0.6473932862281799,
-1.0019060373306274,
-1.3755372762680054,
-0.422527015209198,
-1.1191309690475464,
-0.97452712059021,
1.0402517318725586,
0.7271957397460938,
0.2961887717247009,
1.9201276302337646,
0.6935776472091675,
0.36195138096809387,
-2.587791681289673,
0.928610622882843,
0.30007806420326233,
-0.14589446783065796,
0.9814666509628296,
0.4424009919166565,
1.0658693313598633,
0.1665668487548828,
0.6304965615272522,
-2.5639805793762207,
2.3627710342407227,
-0.1363212913274765,
0.6189362406730652,
0.0015277890488505363,
-0.24101467430591583,
1.1730496883392334,
0.5915514230728149,
0.47167789936065674,
-1.1006616353988647,
0.712860107421875,
-0.5364336967468262,
1.1537264585494995,
0.882372260093689,
-0.7585843801498413,
-0.029873445630073547,
1.3820141553878784,
0.4969380497932434,
-0.6287575364112854,
-0.8858625292778015,
-0.9950641393661499,
0.8725322484970093,
1.747145175933838,
-0.17276892066001892,
-0.05783669650554657,
0.7182848453521729,
0.6667262315750122,
-1.1712768077850342,
0.0033385539427399635,
-0.6970219016075134,
-0.9014253616333008,
1.5452191829681396,
2.064971685409546,
-0.1712680459022522,
-0.0232706256210804,
-0.7462741732597351,
-1.2492469549179077,
0.7955523729324341,
-0.10508213937282562,
0.019649768248200417,
0.5347956418991089,
-0.6461905241012573,
1.0071794986724854,
0.8089328408241272,
0.9566134214401245,
0.15744876861572266,
0.2871793508529663,
0.4045611321926117,
-0.34651944041252136,
-1.0523079633712769,
-0.36013153195381165,
-1.1152209043502808,
-2.6556625366210938,
0.44753772020339966,
-0.28615817427635193,
-1.4973996877670288,
-0.026206789538264275,
-0.9127772450447083,
0.9438372850418091,
-0.5017410516738892,
-1.1338533163070679,
-1.5483598709106445,
0.21668143570423126,
-0.009669159539043903,
1.0281158685684204,
-1.625978708267212,
-0.22174663841724396,
1.136313557624817,
0.7729389667510986,
-0.6914101243019104,
0.939318835735321,
0.25625476241111755,
0.927103579044342,
0.7944145202636719,
-0.3337653875350952,
0.6426162123680115,
0.13026641309261322,
-1.3538912534713745,
0.47593533992767334,
1.2799828052520752,
0.12183481454849243,
1.5072516202926636,
-0.38683953881263733,
0.024174872785806656,
0.4597751796245575,
-0.5944525599479675,
-0.46902692317962646,
-0.4133993983268738,
0.653835117816925,
0.01567963883280754,
-0.8868880271911621,
-0.0173628106713295,
-0.09260259568691254,
-0.3338455259799957,
0.1272624135017395,
-1.4117367267608643,
-0.22263145446777344,
-0.4669632911682129,
-0.4737541377544403,
-1.3206321001052856,
-0.16652964055538177,
1.5020148754119873,
-0.594205379486084,
-0.14512386918067932,
0.5335870385169983,
0.5084038376808167,
0.5054812431335449,
0.7146012187004089,
-0.7053340077400208,
-0.3757607936859131,
-0.27113279700279236,
-0.2653205692768097,
0.32023516297340393,
1.4217642545700073,
0.02507771924138069,
-1.016866683959961,
0.7406759858131409,
-0.35291731357574463,
0.06288705766201019,
1.899940848350525,
0.18562307953834534,
-0.721761167049408,
0.48260393738746643,
-0.7645069360733032,
1.8061113357543945,
1.6450608968734741,
1.1557772159576416,
-0.11431881785392761,
-1.0166819095611572,
0.6680693030357361,
-0.3822704553604126,
-0.332781046628952,
0.9145166277885437,
0.35837891697883606,
-0.3143892288208008,
-1.5264357328414917,
0.7580780982971191,
1.1342028379440308,
-0.8446318507194519,
-0.8495675921440125,
0.24064211547374725,
-0.8010891675949097,
1.2421011924743652,
0.4321366548538208,
0.46849772334098816,
0.2198667675256729,
1.6330422163009644,
0.7926153540611267,
-0.4764977693557739,
0.6142343282699585,
0.4997788071632385,
-0.2646474242210388,
-2.094884157180786,
-1.2126692533493042,
0.38957586884498596,
-0.5842023491859436,
-1.4882608652114868,
1.3816492557525635,
-1.0580440759658813,
-1.1294015645980835,
0.6141340732574463,
0.029517728835344315,
1.3289093971252441,
0.47678619623184204,
1.5943055152893066,
2.1438000202178955,
0.8119164705276489,
0.49652552604675293,
1.2985917329788208,
-0.2389676719903946,
-0.4923678934574127,
1.8433634042739868,
-0.4213621914386749,
0.49154067039489746,
1.1578823328018188,
-0.31695613265037537,
-1.0848546028137207,
-0.7655255794525146,
-1.191514492034912,
-0.7202454209327698,
0.9913901686668396,
0.024039853364229202,
-1.0799401998519897,
0.3255975842475891,
1.5635629892349243,
0.17173422873020172,
-0.2217494249343872,
0.6094962954521179,
0.4118882715702057,
-0.7974968552589417,
-0.13081921637058258,
-0.9329267740249634,
0.44329050183296204,
-0.35560572147369385,
-0.3135940432548523,
0.35800793766975403,
0.5404992699623108,
1.2832530736923218,
-0.15239745378494263,
0.049499254673719406,
1.026794672012329,
-1.5307937860488892,
1.395458459854126,
-0.5903017520904541,
0.3076063096523285,
-2.3052151203155518,
1.185557246208191,
-0.6316250562667847,
2.001802682876587,
-2.631988525390625,
0.3948175609111786,
-0.5919204354286194,
-0.6154922842979431,
0.35810422897338867,
-0.15504732728004456,
0.23128578066825867,
-0.21579930186271667,
-1.074648380279541,
-0.005383648443967104,
-0.630715548992157,
0.6261085867881775,
1.0644793510437012,
1.4238249063491821,
-1.1015512943267822,
-0.28419044613838196,
-1.6171380281448364,
-0.07670357823371887,
-0.6974972486495972,
0.18124082684516907,
-1.9751585721969604,
-0.16136939823627472,
-1.978554368019104,
-2.2135441303253174,
-1.325952410697937,
-0.8151348233222961,
1.1821955442428589,
0.14485034346580505,
-0.864274799823761,
1.200278639793396,
-0.35577160120010376,
-1.843315601348877,
1.0793453454971313,
-2.069668769836426
] |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | I like this proposal.
> There is also an important difference in terms of behavior:
Dataset.map adds new columns (with dict.update)
BUT
IterableDataset discards previous columns (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.
> The main breaking change would be the change of behavior of IterableDataset.map, because currently it discards all the previous columns instead of keeping them.
Yes, this behavior of `IterableDataset.map` was surprising to me the first time I used it because I was expecting the same behavior as `Dataset.map`, so I'm OK with the breaking change here.
> IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
\+ it's also missing the actual formatting code (we return unformatted tensors)
> We could have a completely aligned map method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
> For information, TFDS does lazy map by default, and has an additional .cache() method.
If I understand this part correctly, the idea would be for `Dataset.map` to behave similarly to `Dataset.with_transform` (lazy processing) and to have an option to cache processed data (with `.cache()`). This idea is really nice because it can also be applied to `IterableDataset` to fix https://github.com/huggingface/datasets/issues/3142 (again we get the aligned APIs). However, this change would break a lot of things, so I'm still not sure if this is a step in the right direction (maybe it's OK for Datasets 2.0?)
> If the two APIs are more aligned it would be awesome for the examples in transformers, and it would create a satisfactory experience for users that want to switch from one mode to the other.
Yes, it would be amazing to have an option to easily switch between these two modes.
I agree with the rest.
| ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger | 1,051 | 322 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger
I like this proposal.
> There is also an important difference in terms of behavior:
Dataset.map adds new columns (with dict.update)
BUT
IterableDataset discards previous columns (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.
> The main breaking change would be the change of behavior of IterableDataset.map, because currently it discards all the previous columns instead of keeping them.
Yes, this behavior of `IterableDataset.map` was surprising to me the first time I used it because I was expecting the same behavior as `Dataset.map`, so I'm OK with the breaking change here.
> IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
\+ it's also missing the actual formatting code (we return unformatted tensors)
> We could have a completely aligned map method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
> For information, TFDS does lazy map by default, and has an additional .cache() method.
If I understand this part correctly, the idea would be for `Dataset.map` to behave similarly to `Dataset.with_transform` (lazy processing) and to have an option to cache processed data (with `.cache()`). This idea is really nice because it can also be applied to `IterableDataset` to fix https://github.com/huggingface/datasets/issues/3142 (again we get the aligned APIs). However, this change would break a lot of things, so I'm still not sure if this is a step in the right direction (maybe it's OK for Datasets 2.0?)
> If the two APIs are more aligned it would be awesome for the examples in transformers, and it would create a satisfactory experience for users that want to switch from one mode to the other.
Yes, it would be amazing to have an option to easily switch between these two modes.
I agree with the rest.
| [
-1.165069341659546,
-0.9137279391288757,
-0.7034327983856201,
1.4775683879852295,
-0.182785302400589,
-1.2899360656738281,
0.22895671427249908,
-1.0863122940063477,
1.6649971008300781,
-0.8457667231559753,
0.37291669845581055,
-1.6002495288848877,
0.060649629682302475,
-0.5887289047241211,
-0.7210293412208557,
-0.7617984414100647,
-0.43534573912620544,
-0.8846697211265564,
1.082593560218811,
2.421595811843872,
1.1886775493621826,
-1.3998439311981201,
2.7131896018981934,
0.6548430323600769,
-0.2995055019855499,
-0.9161980152130127,
0.4264586269855499,
-0.12470431625843048,
-1.252764344215393,
-0.5706902742385864,
-0.8707075715065002,
-0.1465669721364975,
-0.5931786894798279,
-0.4224770665168762,
-0.08767490088939667,
0.444755882024765,
-0.18410322070121765,
-0.4144452214241028,
-0.4630773663520813,
-0.7575943470001221,
0.5515730977058411,
-0.32713374495506287,
1.0184587240219116,
-0.2847948670387268,
1.7861952781677246,
-0.5492554306983948,
0.5621044039726257,
0.7648176550865173,
1.2359033823013306,
0.1613176316022873,
-0.046242859214544296,
0.29210329055786133,
0.35932764410972595,
-0.018789248540997505,
0.6023290753364563,
1.0469105243682861,
0.645359218120575,
0.5573264360427856,
0.6635415554046631,
-2.2354066371917725,
1.3910791873931885,
-1.0483919382095337,
0.3897513449192047,
1.3463795185089111,
-0.8964346647262573,
0.3106921315193176,
-1.7830784320831299,
0.023385830223560333,
0.6352533102035522,
-2.157705068588257,
0.3833595812320709,
-1.2640968561172485,
-0.486579954624176,
1.0741419792175293,
0.3563194274902344,
-1.2671877145767212,
0.15089784562587738,
-0.4514319598674774,
1.0023735761642456,
0.4079919457435608,
0.9403281211853027,
-1.7653977870941162,
0.027217160910367966,
-0.25800272822380066,
0.15414635837078094,
-1.2031601667404175,
-1.5868600606918335,
0.6799666285514832,
0.5566564202308655,
0.5006989240646362,
-0.13728724420070648,
1.074215292930603,
-1.0951550006866455,
0.8684979677200317,
-1.151162028312683,
-1.6218972206115723,
-1.3844923973083496,
-2.2667219638824463,
-2.2322919368743896,
0.7019857168197632,
-0.554528534412384,
-0.4608031213283539,
2.0926578044891357,
-1.0583382844924927,
-1.550857663154602,
1.1991633176803589,
0.20265474915504456,
0.10543936491012573,
2.2998688220977783,
0.16701970994472504,
-0.6153276562690735,
0.4437970817089081,
-0.8798969984054565,
0.92386394739151,
-0.3762107491493225,
1.2628918886184692,
0.30149659514427185,
-1.0730514526367188,
1.4779385328292847,
-0.4023773670196533,
0.5579099059104919,
-0.5391546487808228,
-0.659578800201416,
-0.7896273136138916,
0.3209342360496521,
1.882327675819397,
-0.20722602307796478,
1.4966853857040405,
-0.33818352222442627,
-1.5308277606964111,
-1.6291362047195435,
0.9577271938323975,
0.3994768261909485,
-0.8671972751617432,
0.12122032046318054,
-0.48738977313041687,
0.1888248473405838,
-0.17548316717147827,
1.1323702335357666,
1.2923719882965088,
0.77382493019104,
-0.44357943534851074,
-0.8782188892364502,
0.10976804792881012,
-0.1755269467830658,
-0.8671227693557739,
-1.7223135232925415,
-0.34490904211997986,
0.0063753556460142136,
0.6389137506484985,
-1.1570959091186523,
1.7805182933807373,
1.0037870407104492,
1.9926033020019531,
0.9668293595314026,
-0.3569318652153015,
1.4431062936782837,
0.10631215572357178,
1.8408203125,
-0.5491238832473755,
0.6157233715057373,
-0.4085213541984558,
-1.1301679611206055,
0.9052014350891113,
-0.303369402885437,
-2.0772852897644043,
-0.804172933101654,
-0.6799111366271973,
-0.29347720742225647,
-0.7902155518531799,
0.9142588376998901,
-0.25206828117370605,
-1.431322455406189,
0.21250927448272705,
-0.6551389694213867,
0.16823840141296387,
-1.1360244750976562,
0.2788585424423218,
0.6652074456214905,
-0.68938148021698,
0.02729199081659317,
-0.17535270750522614,
-1.2333815097808838,
-0.47359326481819153,
0.2979842722415924,
1.9259750843048096,
-0.6645284295082092,
0.9807983040809631,
1.0841429233551025,
-0.5943360924720764,
-0.03391864895820618,
0.1944340467453003,
-0.26384568214416504,
0.766354501247406,
-1.1115700006484985,
-0.6042917966842651,
1.2473666667938232,
-0.30150920152664185,
-0.5400582551956177,
1.482526183128357,
0.5570260882377625,
-1.0982303619384766,
-0.2157067060470581,
-0.10938133299350739,
-0.8523957133293152,
0.11863183975219727,
-1.582978367805481,
-0.012734751217067242,
0.47600314021110535,
-1.5716270208358765,
-0.37470558285713196,
-0.15978913009166718,
1.2463066577911377,
-0.05592427775263786,
1.4309697151184082,
-0.33789709210395813,
-0.21420897543430328,
-0.36891502141952515,
-0.3598773181438446,
0.16767646372318268,
-0.12969741225242615,
-0.5132169127464294,
0.08360555768013,
-0.787693202495575,
0.3843601942062378,
1.4683014154434204,
0.13820423185825348,
0.01858028769493103,
0.41669410467147827,
1.0318262577056885,
0.43592187762260437,
0.021374469622969627,
-0.877274215221405,
-1.4379627704620361,
2.0525646209716797,
-1.4884192943572998,
1.9607393741607666,
0.8747599720954895,
-0.010838774032890797,
-1.8204479217529297,
-1.7931787967681885,
1.2240995168685913,
1.1092338562011719,
2.170463800430298,
0.4556483328342438,
0.3283384144306183,
-0.888292670249939,
-0.6415586471557617,
0.3633909523487091,
-0.9732125401496887,
-0.6852800250053406,
0.14069493114948273,
2.49464750289917,
1.751508355140686,
-0.32400816679000854,
-0.20010456442832947,
-0.9342746138572693,
1.4188945293426514,
-0.22894300520420074,
0.2895158529281616,
2.0242278575897217,
-0.29350152611732483,
-1.1301060914993286,
1.3972231149673462,
-2.4456069469451904,
0.24635432660579681,
2.0436198711395264,
0.38498127460479736,
0.17992275953292847,
-1.3342957496643066,
-0.5747502446174622,
-0.2640361487865448,
-0.3764503002166748,
-1.2330753803253174,
0.5529394745826721,
-0.22356358170509338,
-0.8260068893432617,
-1.3847877979278564,
0.2538537383079529,
-1.1984601020812988,
-1.6936043500900269,
0.34130072593688965,
1.85084068775177,
2.1332919597625732,
-0.6693000793457031,
1.5045363903045654,
-0.3996897041797638,
0.1609160602092743,
1.1934441328048706,
1.3432250022888184,
3.0246474742889404,
1.9061166048049927,
-1.3269699811935425,
0.5724182724952698,
-0.25514549016952515,
-0.4938659369945526,
1.0792630910873413,
-1.1933554410934448,
1.2660425901412964,
-0.11809416115283966,
-1.1339141130447388,
-1.1952897310256958,
0.9951735138893127,
0.4138599932193756,
0.10620440542697906,
-0.5030744671821594,
1.266261339187622,
0.12659549713134766,
1.320824384689331,
0.670116662979126,
-0.4019485414028168,
0.5002732276916504,
-0.4977375268936157,
-0.5325846672058105,
1.5777119398117065,
0.26616355776786804,
-1.4104044437408447,
-2.2472681999206543,
-0.22536706924438477,
-0.8736492395401001,
0.11750385165214539,
-0.6476702094078064,
-0.9723302125930786,
1.6149911880493164,
0.2486780732870102,
-1.3172943592071533,
-0.31735992431640625,
-0.31564751267433167,
-0.47142577171325684,
2.6629204750061035,
-1.3425554037094116,
-0.2086380273103714,
-0.9534834623336792,
-0.6637805700302124,
1.6370141506195068,
-1.3108354806900024,
-0.2999853789806366,
-1.0953421592712402,
-0.6026521325111389,
-1.11228609085083,
-0.4086052179336548,
0.007203040644526482,
-1.0063894987106323,
0.9450002908706665,
0.22550790011882782,
-1.1799159049987793,
-0.3892969489097595,
-0.8328654170036316,
0.9312035441398621,
-0.1909664422273636,
0.27463072538375854,
1.6117862462997437,
0.3024437725543976,
-0.3333493173122406,
0.8382742404937744,
1.243570327758789,
0.7128844857215881,
-0.7027834057807922,
0.010628033429384232,
-0.6084732413291931,
0.508722186088562,
-1.1731410026550293,
0.3725678622722626,
-2.9359514713287354,
0.5779475569725037,
-0.16632407903671265,
-0.05471654608845711,
-0.10372795164585114,
-1.405120611190796,
1.0828535556793213,
2.569363594055176,
-1.1373505592346191,
0.4741891622543335,
0.39076459407806396,
1.126697063446045,
-1.6344658136367798,
0.3739917278289795,
-0.5125447511672974,
2.1616318225860596,
0.1786031723022461,
1.2984075546264648,
-0.5312674641609192,
-2.4161770343780518,
0.6591798663139343,
-1.2779555320739746,
-1.2505171298980713,
0.7549480199813843,
-0.9042500257492065,
0.1313367336988449,
-1.4658502340316772,
-0.2678976356983185,
-0.8721604943275452,
-1.3265937566757202,
0.6764591932296753,
0.19426241517066956,
0.39881783723831177,
-0.5768412947654724,
0.2740838825702667,
-2.284177780151367,
-1.4188634157180786,
-0.16329634189605713,
-0.9463228583335876,
0.4917406439781189,
-0.5635092258453369,
0.752348780632019,
-0.06547631323337555,
0.05756251886487007,
0.4059801697731018,
1.4995594024658203,
3.5098042488098145,
0.15741068124771118,
0.3083840310573578,
-0.33780235052108765,
-0.9533418416976929,
1.4086204767227173,
0.9064763784408569,
-0.08109760284423828,
-0.6267821192741394,
-1.0264948606491089,
1.1964499950408936,
2.1515231132507324,
0.8627890348434448,
-0.020296040922403336,
-0.8252351880073547,
-0.6391072869300842,
-0.10551920533180237,
0.17565122246742249,
0.5346301198005676,
0.9028369188308716,
0.09143099188804626,
0.08891332149505615,
1.4391049146652222,
1.0424009561538696,
-0.2953517735004425,
0.29126688838005066,
-0.6817395687103271,
-0.46215420961380005,
0.5352842807769775,
0.2667047679424286,
0.009308172389864922,
0.42007511854171753,
-0.9795219302177429,
-0.30939358472824097,
-0.40643608570098877,
-0.8469188809394836,
-0.7349671721458435,
-0.390153169631958,
-0.41294431686401367,
1.5932966470718384,
0.12183310091495514,
-0.4873456060886383,
0.01374484971165657,
-0.6351829767227173,
-0.09372025728225708,
-1.1517620086669922,
0.23282313346862793,
-0.14708146452903748,
-0.1191922128200531,
-0.16576240956783295,
1.7243815660476685,
-0.9610468745231628,
-2.03244686126709,
0.1465366929769516,
0.2616293430328369,
-0.16093461215496063,
0.16912157833576202,
1.681993842124939,
0.520663321018219,
1.5330408811569214,
1.252151370048523,
0.9533661007881165,
-0.7244002223014832,
-1.364048719406128,
0.7555742859840393,
0.9456987977027893,
-1.3924685716629028,
0.6754716634750366,
-0.05408454313874245,
-0.4628545939922333,
0.7125422358512878,
1.1922444105148315,
0.4977198839187622,
-2.069204092025757,
0.8478282690048218,
-1.1619441509246826,
0.9616836309432983,
0.8263775706291199,
0.7356089353561401,
0.186698317527771,
0.8372570872306824,
-1.2618257999420166,
-1.058336853981018,
-0.696169376373291,
-0.8000527620315552,
2.0064735412597656,
-0.47005683183670044,
0.6199464201927185,
-0.09055545926094055,
-1.3140249252319336,
-0.04738731309771538,
0.815670371055603,
0.387663334608078,
-0.4360212981700897,
0.7093985080718994,
-0.6473932862281799,
-1.0019060373306274,
-1.3755372762680054,
-0.422527015209198,
-1.1191309690475464,
-0.97452712059021,
1.0402517318725586,
0.7271957397460938,
0.2961887717247009,
1.9201276302337646,
0.6935776472091675,
0.36195138096809387,
-2.587791681289673,
0.928610622882843,
0.30007806420326233,
-0.14589446783065796,
0.9814666509628296,
0.4424009919166565,
1.0658693313598633,
0.1665668487548828,
0.6304965615272522,
-2.5639805793762207,
2.3627710342407227,
-0.1363212913274765,
0.6189362406730652,
0.0015277890488505363,
-0.24101467430591583,
1.1730496883392334,
0.5915514230728149,
0.47167789936065674,
-1.1006616353988647,
0.712860107421875,
-0.5364336967468262,
1.1537264585494995,
0.882372260093689,
-0.7585843801498413,
-0.029873445630073547,
1.3820141553878784,
0.4969380497932434,
-0.6287575364112854,
-0.8858625292778015,
-0.9950641393661499,
0.8725322484970093,
1.747145175933838,
-0.17276892066001892,
-0.05783669650554657,
0.7182848453521729,
0.6667262315750122,
-1.1712768077850342,
0.0033385539427399635,
-0.6970219016075134,
-0.9014253616333008,
1.5452191829681396,
2.064971685409546,
-0.1712680459022522,
-0.0232706256210804,
-0.7462741732597351,
-1.2492469549179077,
0.7955523729324341,
-0.10508213937282562,
0.019649768248200417,
0.5347956418991089,
-0.6461905241012573,
1.0071794986724854,
0.8089328408241272,
0.9566134214401245,
0.15744876861572266,
0.2871793508529663,
0.4045611321926117,
-0.34651944041252136,
-1.0523079633712769,
-0.36013153195381165,
-1.1152209043502808,
-2.6556625366210938,
0.44753772020339966,
-0.28615817427635193,
-1.4973996877670288,
-0.026206789538264275,
-0.9127772450447083,
0.9438372850418091,
-0.5017410516738892,
-1.1338533163070679,
-1.5483598709106445,
0.21668143570423126,
-0.009669159539043903,
1.0281158685684204,
-1.625978708267212,
-0.22174663841724396,
1.136313557624817,
0.7729389667510986,
-0.6914101243019104,
0.939318835735321,
0.25625476241111755,
0.927103579044342,
0.7944145202636719,
-0.3337653875350952,
0.6426162123680115,
0.13026641309261322,
-1.3538912534713745,
0.47593533992767334,
1.2799828052520752,
0.12183481454849243,
1.5072516202926636,
-0.38683953881263733,
0.024174872785806656,
0.4597751796245575,
-0.5944525599479675,
-0.46902692317962646,
-0.4133993983268738,
0.653835117816925,
0.01567963883280754,
-0.8868880271911621,
-0.0173628106713295,
-0.09260259568691254,
-0.3338455259799957,
0.1272624135017395,
-1.4117367267608643,
-0.22263145446777344,
-0.4669632911682129,
-0.4737541377544403,
-1.3206321001052856,
-0.16652964055538177,
1.5020148754119873,
-0.594205379486084,
-0.14512386918067932,
0.5335870385169983,
0.5084038376808167,
0.5054812431335449,
0.7146012187004089,
-0.7053340077400208,
-0.3757607936859131,
-0.27113279700279236,
-0.2653205692768097,
0.32023516297340393,
1.4217642545700073,
0.02507771924138069,
-1.016866683959961,
0.7406759858131409,
-0.35291731357574463,
0.06288705766201019,
1.899940848350525,
0.18562307953834534,
-0.721761167049408,
0.48260393738746643,
-0.7645069360733032,
1.8061113357543945,
1.6450608968734741,
1.1557772159576416,
-0.11431881785392761,
-1.0166819095611572,
0.6680693030357361,
-0.3822704553604126,
-0.332781046628952,
0.9145166277885437,
0.35837891697883606,
-0.3143892288208008,
-1.5264357328414917,
0.7580780982971191,
1.1342028379440308,
-0.8446318507194519,
-0.8495675921440125,
0.24064211547374725,
-0.8010891675949097,
1.2421011924743652,
0.4321366548538208,
0.46849772334098816,
0.2198667675256729,
1.6330422163009644,
0.7926153540611267,
-0.4764977693557739,
0.6142343282699585,
0.4997788071632385,
-0.2646474242210388,
-2.094884157180786,
-1.2126692533493042,
0.38957586884498596,
-0.5842023491859436,
-1.4882608652114868,
1.3816492557525635,
-1.0580440759658813,
-1.1294015645980835,
0.6141340732574463,
0.029517728835344315,
1.3289093971252441,
0.47678619623184204,
1.5943055152893066,
2.1438000202178955,
0.8119164705276489,
0.49652552604675293,
1.2985917329788208,
-0.2389676719903946,
-0.4923678934574127,
1.8433634042739868,
-0.4213621914386749,
0.49154067039489746,
1.1578823328018188,
-0.31695613265037537,
-1.0848546028137207,
-0.7655255794525146,
-1.191514492034912,
-0.7202454209327698,
0.9913901686668396,
0.024039853364229202,
-1.0799401998519897,
0.3255975842475891,
1.5635629892349243,
0.17173422873020172,
-0.2217494249343872,
0.6094962954521179,
0.4118882715702057,
-0.7974968552589417,
-0.13081921637058258,
-0.9329267740249634,
0.44329050183296204,
-0.35560572147369385,
-0.3135940432548523,
0.35800793766975403,
0.5404992699623108,
1.2832530736923218,
-0.15239745378494263,
0.049499254673719406,
1.026794672012329,
-1.5307937860488892,
1.395458459854126,
-0.5903017520904541,
0.3076063096523285,
-2.3052151203155518,
1.185557246208191,
-0.6316250562667847,
2.001802682876587,
-2.631988525390625,
0.3948175609111786,
-0.5919204354286194,
-0.6154922842979431,
0.35810422897338867,
-0.15504732728004456,
0.23128578066825867,
-0.21579930186271667,
-1.074648380279541,
-0.005383648443967104,
-0.630715548992157,
0.6261085867881775,
1.0644793510437012,
1.4238249063491821,
-1.1015512943267822,
-0.28419044613838196,
-1.6171380281448364,
-0.07670357823371887,
-0.6974972486495972,
0.18124082684516907,
-1.9751585721969604,
-0.16136939823627472,
-1.978554368019104,
-2.2135441303253174,
-1.325952410697937,
-0.8151348233222961,
1.1821955442428589,
0.14485034346580505,
-0.864274799823761,
1.200278639793396,
-0.35577160120010376,
-1.843315601348877,
1.0793453454971313,
-2.069668769836426
] |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | > If I understand this part correctly, the idea would be for Dataset.map to behave similarly to Dataset.with_transform (lazy processing) and to have an option to cache processed data (with .cache()). This idea is really nice because it can also be applied to IterableDataset to fix #3142 (again we get the aligned APIs). However, this change would break a lot of things, so I'm still not sure if this is a step in the right direction (maybe it's OK for Datasets 2.0?)
Yea this is too big of a change in my opinion. Anyway it's fine as it is right now with streaming=lazy and regular=eager. | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger | 1,051 | 105 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger
> If I understand this part correctly, the idea would be for Dataset.map to behave similarly to Dataset.with_transform (lazy processing) and to have an option to cache processed data (with .cache()). This idea is really nice because it can also be applied to IterableDataset to fix #3142 (again we get the aligned APIs). However, this change would break a lot of things, so I'm still not sure if this is a step in the right direction (maybe it's OK for Datasets 2.0?)
Yea this is too big of a change in my opinion. Anyway it's fine as it is right now with streaming=lazy and regular=eager. | [
-1.165069341659546,
-0.9137279391288757,
-0.7034327983856201,
1.4775683879852295,
-0.182785302400589,
-1.2899360656738281,
0.22895671427249908,
-1.0863122940063477,
1.6649971008300781,
-0.8457667231559753,
0.37291669845581055,
-1.6002495288848877,
0.060649629682302475,
-0.5887289047241211,
-0.7210293412208557,
-0.7617984414100647,
-0.43534573912620544,
-0.8846697211265564,
1.082593560218811,
2.421595811843872,
1.1886775493621826,
-1.3998439311981201,
2.7131896018981934,
0.6548430323600769,
-0.2995055019855499,
-0.9161980152130127,
0.4264586269855499,
-0.12470431625843048,
-1.252764344215393,
-0.5706902742385864,
-0.8707075715065002,
-0.1465669721364975,
-0.5931786894798279,
-0.4224770665168762,
-0.08767490088939667,
0.444755882024765,
-0.18410322070121765,
-0.4144452214241028,
-0.4630773663520813,
-0.7575943470001221,
0.5515730977058411,
-0.32713374495506287,
1.0184587240219116,
-0.2847948670387268,
1.7861952781677246,
-0.5492554306983948,
0.5621044039726257,
0.7648176550865173,
1.2359033823013306,
0.1613176316022873,
-0.046242859214544296,
0.29210329055786133,
0.35932764410972595,
-0.018789248540997505,
0.6023290753364563,
1.0469105243682861,
0.645359218120575,
0.5573264360427856,
0.6635415554046631,
-2.2354066371917725,
1.3910791873931885,
-1.0483919382095337,
0.3897513449192047,
1.3463795185089111,
-0.8964346647262573,
0.3106921315193176,
-1.7830784320831299,
0.023385830223560333,
0.6352533102035522,
-2.157705068588257,
0.3833595812320709,
-1.2640968561172485,
-0.486579954624176,
1.0741419792175293,
0.3563194274902344,
-1.2671877145767212,
0.15089784562587738,
-0.4514319598674774,
1.0023735761642456,
0.4079919457435608,
0.9403281211853027,
-1.7653977870941162,
0.027217160910367966,
-0.25800272822380066,
0.15414635837078094,
-1.2031601667404175,
-1.5868600606918335,
0.6799666285514832,
0.5566564202308655,
0.5006989240646362,
-0.13728724420070648,
1.074215292930603,
-1.0951550006866455,
0.8684979677200317,
-1.151162028312683,
-1.6218972206115723,
-1.3844923973083496,
-2.2667219638824463,
-2.2322919368743896,
0.7019857168197632,
-0.554528534412384,
-0.4608031213283539,
2.0926578044891357,
-1.0583382844924927,
-1.550857663154602,
1.1991633176803589,
0.20265474915504456,
0.10543936491012573,
2.2998688220977783,
0.16701970994472504,
-0.6153276562690735,
0.4437970817089081,
-0.8798969984054565,
0.92386394739151,
-0.3762107491493225,
1.2628918886184692,
0.30149659514427185,
-1.0730514526367188,
1.4779385328292847,
-0.4023773670196533,
0.5579099059104919,
-0.5391546487808228,
-0.659578800201416,
-0.7896273136138916,
0.3209342360496521,
1.882327675819397,
-0.20722602307796478,
1.4966853857040405,
-0.33818352222442627,
-1.5308277606964111,
-1.6291362047195435,
0.9577271938323975,
0.3994768261909485,
-0.8671972751617432,
0.12122032046318054,
-0.48738977313041687,
0.1888248473405838,
-0.17548316717147827,
1.1323702335357666,
1.2923719882965088,
0.77382493019104,
-0.44357943534851074,
-0.8782188892364502,
0.10976804792881012,
-0.1755269467830658,
-0.8671227693557739,
-1.7223135232925415,
-0.34490904211997986,
0.0063753556460142136,
0.6389137506484985,
-1.1570959091186523,
1.7805182933807373,
1.0037870407104492,
1.9926033020019531,
0.9668293595314026,
-0.3569318652153015,
1.4431062936782837,
0.10631215572357178,
1.8408203125,
-0.5491238832473755,
0.6157233715057373,
-0.4085213541984558,
-1.1301679611206055,
0.9052014350891113,
-0.303369402885437,
-2.0772852897644043,
-0.804172933101654,
-0.6799111366271973,
-0.29347720742225647,
-0.7902155518531799,
0.9142588376998901,
-0.25206828117370605,
-1.431322455406189,
0.21250927448272705,
-0.6551389694213867,
0.16823840141296387,
-1.1360244750976562,
0.2788585424423218,
0.6652074456214905,
-0.68938148021698,
0.02729199081659317,
-0.17535270750522614,
-1.2333815097808838,
-0.47359326481819153,
0.2979842722415924,
1.9259750843048096,
-0.6645284295082092,
0.9807983040809631,
1.0841429233551025,
-0.5943360924720764,
-0.03391864895820618,
0.1944340467453003,
-0.26384568214416504,
0.766354501247406,
-1.1115700006484985,
-0.6042917966842651,
1.2473666667938232,
-0.30150920152664185,
-0.5400582551956177,
1.482526183128357,
0.5570260882377625,
-1.0982303619384766,
-0.2157067060470581,
-0.10938133299350739,
-0.8523957133293152,
0.11863183975219727,
-1.582978367805481,
-0.012734751217067242,
0.47600314021110535,
-1.5716270208358765,
-0.37470558285713196,
-0.15978913009166718,
1.2463066577911377,
-0.05592427775263786,
1.4309697151184082,
-0.33789709210395813,
-0.21420897543430328,
-0.36891502141952515,
-0.3598773181438446,
0.16767646372318268,
-0.12969741225242615,
-0.5132169127464294,
0.08360555768013,
-0.787693202495575,
0.3843601942062378,
1.4683014154434204,
0.13820423185825348,
0.01858028769493103,
0.41669410467147827,
1.0318262577056885,
0.43592187762260437,
0.021374469622969627,
-0.877274215221405,
-1.4379627704620361,
2.0525646209716797,
-1.4884192943572998,
1.9607393741607666,
0.8747599720954895,
-0.010838774032890797,
-1.8204479217529297,
-1.7931787967681885,
1.2240995168685913,
1.1092338562011719,
2.170463800430298,
0.4556483328342438,
0.3283384144306183,
-0.888292670249939,
-0.6415586471557617,
0.3633909523487091,
-0.9732125401496887,
-0.6852800250053406,
0.14069493114948273,
2.49464750289917,
1.751508355140686,
-0.32400816679000854,
-0.20010456442832947,
-0.9342746138572693,
1.4188945293426514,
-0.22894300520420074,
0.2895158529281616,
2.0242278575897217,
-0.29350152611732483,
-1.1301060914993286,
1.3972231149673462,
-2.4456069469451904,
0.24635432660579681,
2.0436198711395264,
0.38498127460479736,
0.17992275953292847,
-1.3342957496643066,
-0.5747502446174622,
-0.2640361487865448,
-0.3764503002166748,
-1.2330753803253174,
0.5529394745826721,
-0.22356358170509338,
-0.8260068893432617,
-1.3847877979278564,
0.2538537383079529,
-1.1984601020812988,
-1.6936043500900269,
0.34130072593688965,
1.85084068775177,
2.1332919597625732,
-0.6693000793457031,
1.5045363903045654,
-0.3996897041797638,
0.1609160602092743,
1.1934441328048706,
1.3432250022888184,
3.0246474742889404,
1.9061166048049927,
-1.3269699811935425,
0.5724182724952698,
-0.25514549016952515,
-0.4938659369945526,
1.0792630910873413,
-1.1933554410934448,
1.2660425901412964,
-0.11809416115283966,
-1.1339141130447388,
-1.1952897310256958,
0.9951735138893127,
0.4138599932193756,
0.10620440542697906,
-0.5030744671821594,
1.266261339187622,
0.12659549713134766,
1.320824384689331,
0.670116662979126,
-0.4019485414028168,
0.5002732276916504,
-0.4977375268936157,
-0.5325846672058105,
1.5777119398117065,
0.26616355776786804,
-1.4104044437408447,
-2.2472681999206543,
-0.22536706924438477,
-0.8736492395401001,
0.11750385165214539,
-0.6476702094078064,
-0.9723302125930786,
1.6149911880493164,
0.2486780732870102,
-1.3172943592071533,
-0.31735992431640625,
-0.31564751267433167,
-0.47142577171325684,
2.6629204750061035,
-1.3425554037094116,
-0.2086380273103714,
-0.9534834623336792,
-0.6637805700302124,
1.6370141506195068,
-1.3108354806900024,
-0.2999853789806366,
-1.0953421592712402,
-0.6026521325111389,
-1.11228609085083,
-0.4086052179336548,
0.007203040644526482,
-1.0063894987106323,
0.9450002908706665,
0.22550790011882782,
-1.1799159049987793,
-0.3892969489097595,
-0.8328654170036316,
0.9312035441398621,
-0.1909664422273636,
0.27463072538375854,
1.6117862462997437,
0.3024437725543976,
-0.3333493173122406,
0.8382742404937744,
1.243570327758789,
0.7128844857215881,
-0.7027834057807922,
0.010628033429384232,
-0.6084732413291931,
0.508722186088562,
-1.1731410026550293,
0.3725678622722626,
-2.9359514713287354,
0.5779475569725037,
-0.16632407903671265,
-0.05471654608845711,
-0.10372795164585114,
-1.405120611190796,
1.0828535556793213,
2.569363594055176,
-1.1373505592346191,
0.4741891622543335,
0.39076459407806396,
1.126697063446045,
-1.6344658136367798,
0.3739917278289795,
-0.5125447511672974,
2.1616318225860596,
0.1786031723022461,
1.2984075546264648,
-0.5312674641609192,
-2.4161770343780518,
0.6591798663139343,
-1.2779555320739746,
-1.2505171298980713,
0.7549480199813843,
-0.9042500257492065,
0.1313367336988449,
-1.4658502340316772,
-0.2678976356983185,
-0.8721604943275452,
-1.3265937566757202,
0.6764591932296753,
0.19426241517066956,
0.39881783723831177,
-0.5768412947654724,
0.2740838825702667,
-2.284177780151367,
-1.4188634157180786,
-0.16329634189605713,
-0.9463228583335876,
0.4917406439781189,
-0.5635092258453369,
0.752348780632019,
-0.06547631323337555,
0.05756251886487007,
0.4059801697731018,
1.4995594024658203,
3.5098042488098145,
0.15741068124771118,
0.3083840310573578,
-0.33780235052108765,
-0.9533418416976929,
1.4086204767227173,
0.9064763784408569,
-0.08109760284423828,
-0.6267821192741394,
-1.0264948606491089,
1.1964499950408936,
2.1515231132507324,
0.8627890348434448,
-0.020296040922403336,
-0.8252351880073547,
-0.6391072869300842,
-0.10551920533180237,
0.17565122246742249,
0.5346301198005676,
0.9028369188308716,
0.09143099188804626,
0.08891332149505615,
1.4391049146652222,
1.0424009561538696,
-0.2953517735004425,
0.29126688838005066,
-0.6817395687103271,
-0.46215420961380005,
0.5352842807769775,
0.2667047679424286,
0.009308172389864922,
0.42007511854171753,
-0.9795219302177429,
-0.30939358472824097,
-0.40643608570098877,
-0.8469188809394836,
-0.7349671721458435,
-0.390153169631958,
-0.41294431686401367,
1.5932966470718384,
0.12183310091495514,
-0.4873456060886383,
0.01374484971165657,
-0.6351829767227173,
-0.09372025728225708,
-1.1517620086669922,
0.23282313346862793,
-0.14708146452903748,
-0.1191922128200531,
-0.16576240956783295,
1.7243815660476685,
-0.9610468745231628,
-2.03244686126709,
0.1465366929769516,
0.2616293430328369,
-0.16093461215496063,
0.16912157833576202,
1.681993842124939,
0.520663321018219,
1.5330408811569214,
1.252151370048523,
0.9533661007881165,
-0.7244002223014832,
-1.364048719406128,
0.7555742859840393,
0.9456987977027893,
-1.3924685716629028,
0.6754716634750366,
-0.05408454313874245,
-0.4628545939922333,
0.7125422358512878,
1.1922444105148315,
0.4977198839187622,
-2.069204092025757,
0.8478282690048218,
-1.1619441509246826,
0.9616836309432983,
0.8263775706291199,
0.7356089353561401,
0.186698317527771,
0.8372570872306824,
-1.2618257999420166,
-1.058336853981018,
-0.696169376373291,
-0.8000527620315552,
2.0064735412597656,
-0.47005683183670044,
0.6199464201927185,
-0.09055545926094055,
-1.3140249252319336,
-0.04738731309771538,
0.815670371055603,
0.387663334608078,
-0.4360212981700897,
0.7093985080718994,
-0.6473932862281799,
-1.0019060373306274,
-1.3755372762680054,
-0.422527015209198,
-1.1191309690475464,
-0.97452712059021,
1.0402517318725586,
0.7271957397460938,
0.2961887717247009,
1.9201276302337646,
0.6935776472091675,
0.36195138096809387,
-2.587791681289673,
0.928610622882843,
0.30007806420326233,
-0.14589446783065796,
0.9814666509628296,
0.4424009919166565,
1.0658693313598633,
0.1665668487548828,
0.6304965615272522,
-2.5639805793762207,
2.3627710342407227,
-0.1363212913274765,
0.6189362406730652,
0.0015277890488505363,
-0.24101467430591583,
1.1730496883392334,
0.5915514230728149,
0.47167789936065674,
-1.1006616353988647,
0.712860107421875,
-0.5364336967468262,
1.1537264585494995,
0.882372260093689,
-0.7585843801498413,
-0.029873445630073547,
1.3820141553878784,
0.4969380497932434,
-0.6287575364112854,
-0.8858625292778015,
-0.9950641393661499,
0.8725322484970093,
1.747145175933838,
-0.17276892066001892,
-0.05783669650554657,
0.7182848453521729,
0.6667262315750122,
-1.1712768077850342,
0.0033385539427399635,
-0.6970219016075134,
-0.9014253616333008,
1.5452191829681396,
2.064971685409546,
-0.1712680459022522,
-0.0232706256210804,
-0.7462741732597351,
-1.2492469549179077,
0.7955523729324341,
-0.10508213937282562,
0.019649768248200417,
0.5347956418991089,
-0.6461905241012573,
1.0071794986724854,
0.8089328408241272,
0.9566134214401245,
0.15744876861572266,
0.2871793508529663,
0.4045611321926117,
-0.34651944041252136,
-1.0523079633712769,
-0.36013153195381165,
-1.1152209043502808,
-2.6556625366210938,
0.44753772020339966,
-0.28615817427635193,
-1.4973996877670288,
-0.026206789538264275,
-0.9127772450447083,
0.9438372850418091,
-0.5017410516738892,
-1.1338533163070679,
-1.5483598709106445,
0.21668143570423126,
-0.009669159539043903,
1.0281158685684204,
-1.625978708267212,
-0.22174663841724396,
1.136313557624817,
0.7729389667510986,
-0.6914101243019104,
0.939318835735321,
0.25625476241111755,
0.927103579044342,
0.7944145202636719,
-0.3337653875350952,
0.6426162123680115,
0.13026641309261322,
-1.3538912534713745,
0.47593533992767334,
1.2799828052520752,
0.12183481454849243,
1.5072516202926636,
-0.38683953881263733,
0.024174872785806656,
0.4597751796245575,
-0.5944525599479675,
-0.46902692317962646,
-0.4133993983268738,
0.653835117816925,
0.01567963883280754,
-0.8868880271911621,
-0.0173628106713295,
-0.09260259568691254,
-0.3338455259799957,
0.1272624135017395,
-1.4117367267608643,
-0.22263145446777344,
-0.4669632911682129,
-0.4737541377544403,
-1.3206321001052856,
-0.16652964055538177,
1.5020148754119873,
-0.594205379486084,
-0.14512386918067932,
0.5335870385169983,
0.5084038376808167,
0.5054812431335449,
0.7146012187004089,
-0.7053340077400208,
-0.3757607936859131,
-0.27113279700279236,
-0.2653205692768097,
0.32023516297340393,
1.4217642545700073,
0.02507771924138069,
-1.016866683959961,
0.7406759858131409,
-0.35291731357574463,
0.06288705766201019,
1.899940848350525,
0.18562307953834534,
-0.721761167049408,
0.48260393738746643,
-0.7645069360733032,
1.8061113357543945,
1.6450608968734741,
1.1557772159576416,
-0.11431881785392761,
-1.0166819095611572,
0.6680693030357361,
-0.3822704553604126,
-0.332781046628952,
0.9145166277885437,
0.35837891697883606,
-0.3143892288208008,
-1.5264357328414917,
0.7580780982971191,
1.1342028379440308,
-0.8446318507194519,
-0.8495675921440125,
0.24064211547374725,
-0.8010891675949097,
1.2421011924743652,
0.4321366548538208,
0.46849772334098816,
0.2198667675256729,
1.6330422163009644,
0.7926153540611267,
-0.4764977693557739,
0.6142343282699585,
0.4997788071632385,
-0.2646474242210388,
-2.094884157180786,
-1.2126692533493042,
0.38957586884498596,
-0.5842023491859436,
-1.4882608652114868,
1.3816492557525635,
-1.0580440759658813,
-1.1294015645980835,
0.6141340732574463,
0.029517728835344315,
1.3289093971252441,
0.47678619623184204,
1.5943055152893066,
2.1438000202178955,
0.8119164705276489,
0.49652552604675293,
1.2985917329788208,
-0.2389676719903946,
-0.4923678934574127,
1.8433634042739868,
-0.4213621914386749,
0.49154067039489746,
1.1578823328018188,
-0.31695613265037537,
-1.0848546028137207,
-0.7655255794525146,
-1.191514492034912,
-0.7202454209327698,
0.9913901686668396,
0.024039853364229202,
-1.0799401998519897,
0.3255975842475891,
1.5635629892349243,
0.17173422873020172,
-0.2217494249343872,
0.6094962954521179,
0.4118882715702057,
-0.7974968552589417,
-0.13081921637058258,
-0.9329267740249634,
0.44329050183296204,
-0.35560572147369385,
-0.3135940432548523,
0.35800793766975403,
0.5404992699623108,
1.2832530736923218,
-0.15239745378494263,
0.049499254673719406,
1.026794672012329,
-1.5307937860488892,
1.395458459854126,
-0.5903017520904541,
0.3076063096523285,
-2.3052151203155518,
1.185557246208191,
-0.6316250562667847,
2.001802682876587,
-2.631988525390625,
0.3948175609111786,
-0.5919204354286194,
-0.6154922842979431,
0.35810422897338867,
-0.15504732728004456,
0.23128578066825867,
-0.21579930186271667,
-1.074648380279541,
-0.005383648443967104,
-0.630715548992157,
0.6261085867881775,
1.0644793510437012,
1.4238249063491821,
-1.1015512943267822,
-0.28419044613838196,
-1.6171380281448364,
-0.07670357823371887,
-0.6974972486495972,
0.18124082684516907,
-1.9751585721969604,
-0.16136939823627472,
-1.978554368019104,
-2.2135441303253174,
-1.325952410697937,
-0.8151348233222961,
1.1821955442428589,
0.14485034346580505,
-0.864274799823761,
1.200278639793396,
-0.35577160120010376,
-1.843315601348877,
1.0793453454971313,
-2.069668769836426
] |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | Yes indeed, thanks. I added it to the list of methods to align in the first post | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger | 1,051 | 17 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger
Yes indeed, thanks. I added it to the list of methods to align in the first post | [
-1.165069341659546,
-0.9137279391288757,
-0.7034327983856201,
1.4775683879852295,
-0.182785302400589,
-1.2899360656738281,
0.22895671427249908,
-1.0863122940063477,
1.6649971008300781,
-0.8457667231559753,
0.37291669845581055,
-1.6002495288848877,
0.060649629682302475,
-0.5887289047241211,
-0.7210293412208557,
-0.7617984414100647,
-0.43534573912620544,
-0.8846697211265564,
1.082593560218811,
2.421595811843872,
1.1886775493621826,
-1.3998439311981201,
2.7131896018981934,
0.6548430323600769,
-0.2995055019855499,
-0.9161980152130127,
0.4264586269855499,
-0.12470431625843048,
-1.252764344215393,
-0.5706902742385864,
-0.8707075715065002,
-0.1465669721364975,
-0.5931786894798279,
-0.4224770665168762,
-0.08767490088939667,
0.444755882024765,
-0.18410322070121765,
-0.4144452214241028,
-0.4630773663520813,
-0.7575943470001221,
0.5515730977058411,
-0.32713374495506287,
1.0184587240219116,
-0.2847948670387268,
1.7861952781677246,
-0.5492554306983948,
0.5621044039726257,
0.7648176550865173,
1.2359033823013306,
0.1613176316022873,
-0.046242859214544296,
0.29210329055786133,
0.35932764410972595,
-0.018789248540997505,
0.6023290753364563,
1.0469105243682861,
0.645359218120575,
0.5573264360427856,
0.6635415554046631,
-2.2354066371917725,
1.3910791873931885,
-1.0483919382095337,
0.3897513449192047,
1.3463795185089111,
-0.8964346647262573,
0.3106921315193176,
-1.7830784320831299,
0.023385830223560333,
0.6352533102035522,
-2.157705068588257,
0.3833595812320709,
-1.2640968561172485,
-0.486579954624176,
1.0741419792175293,
0.3563194274902344,
-1.2671877145767212,
0.15089784562587738,
-0.4514319598674774,
1.0023735761642456,
0.4079919457435608,
0.9403281211853027,
-1.7653977870941162,
0.027217160910367966,
-0.25800272822380066,
0.15414635837078094,
-1.2031601667404175,
-1.5868600606918335,
0.6799666285514832,
0.5566564202308655,
0.5006989240646362,
-0.13728724420070648,
1.074215292930603,
-1.0951550006866455,
0.8684979677200317,
-1.151162028312683,
-1.6218972206115723,
-1.3844923973083496,
-2.2667219638824463,
-2.2322919368743896,
0.7019857168197632,
-0.554528534412384,
-0.4608031213283539,
2.0926578044891357,
-1.0583382844924927,
-1.550857663154602,
1.1991633176803589,
0.20265474915504456,
0.10543936491012573,
2.2998688220977783,
0.16701970994472504,
-0.6153276562690735,
0.4437970817089081,
-0.8798969984054565,
0.92386394739151,
-0.3762107491493225,
1.2628918886184692,
0.30149659514427185,
-1.0730514526367188,
1.4779385328292847,
-0.4023773670196533,
0.5579099059104919,
-0.5391546487808228,
-0.659578800201416,
-0.7896273136138916,
0.3209342360496521,
1.882327675819397,
-0.20722602307796478,
1.4966853857040405,
-0.33818352222442627,
-1.5308277606964111,
-1.6291362047195435,
0.9577271938323975,
0.3994768261909485,
-0.8671972751617432,
0.12122032046318054,
-0.48738977313041687,
0.1888248473405838,
-0.17548316717147827,
1.1323702335357666,
1.2923719882965088,
0.77382493019104,
-0.44357943534851074,
-0.8782188892364502,
0.10976804792881012,
-0.1755269467830658,
-0.8671227693557739,
-1.7223135232925415,
-0.34490904211997986,
0.0063753556460142136,
0.6389137506484985,
-1.1570959091186523,
1.7805182933807373,
1.0037870407104492,
1.9926033020019531,
0.9668293595314026,
-0.3569318652153015,
1.4431062936782837,
0.10631215572357178,
1.8408203125,
-0.5491238832473755,
0.6157233715057373,
-0.4085213541984558,
-1.1301679611206055,
0.9052014350891113,
-0.303369402885437,
-2.0772852897644043,
-0.804172933101654,
-0.6799111366271973,
-0.29347720742225647,
-0.7902155518531799,
0.9142588376998901,
-0.25206828117370605,
-1.431322455406189,
0.21250927448272705,
-0.6551389694213867,
0.16823840141296387,
-1.1360244750976562,
0.2788585424423218,
0.6652074456214905,
-0.68938148021698,
0.02729199081659317,
-0.17535270750522614,
-1.2333815097808838,
-0.47359326481819153,
0.2979842722415924,
1.9259750843048096,
-0.6645284295082092,
0.9807983040809631,
1.0841429233551025,
-0.5943360924720764,
-0.03391864895820618,
0.1944340467453003,
-0.26384568214416504,
0.766354501247406,
-1.1115700006484985,
-0.6042917966842651,
1.2473666667938232,
-0.30150920152664185,
-0.5400582551956177,
1.482526183128357,
0.5570260882377625,
-1.0982303619384766,
-0.2157067060470581,
-0.10938133299350739,
-0.8523957133293152,
0.11863183975219727,
-1.582978367805481,
-0.012734751217067242,
0.47600314021110535,
-1.5716270208358765,
-0.37470558285713196,
-0.15978913009166718,
1.2463066577911377,
-0.05592427775263786,
1.4309697151184082,
-0.33789709210395813,
-0.21420897543430328,
-0.36891502141952515,
-0.3598773181438446,
0.16767646372318268,
-0.12969741225242615,
-0.5132169127464294,
0.08360555768013,
-0.787693202495575,
0.3843601942062378,
1.4683014154434204,
0.13820423185825348,
0.01858028769493103,
0.41669410467147827,
1.0318262577056885,
0.43592187762260437,
0.021374469622969627,
-0.877274215221405,
-1.4379627704620361,
2.0525646209716797,
-1.4884192943572998,
1.9607393741607666,
0.8747599720954895,
-0.010838774032890797,
-1.8204479217529297,
-1.7931787967681885,
1.2240995168685913,
1.1092338562011719,
2.170463800430298,
0.4556483328342438,
0.3283384144306183,
-0.888292670249939,
-0.6415586471557617,
0.3633909523487091,
-0.9732125401496887,
-0.6852800250053406,
0.14069493114948273,
2.49464750289917,
1.751508355140686,
-0.32400816679000854,
-0.20010456442832947,
-0.9342746138572693,
1.4188945293426514,
-0.22894300520420074,
0.2895158529281616,
2.0242278575897217,
-0.29350152611732483,
-1.1301060914993286,
1.3972231149673462,
-2.4456069469451904,
0.24635432660579681,
2.0436198711395264,
0.38498127460479736,
0.17992275953292847,
-1.3342957496643066,
-0.5747502446174622,
-0.2640361487865448,
-0.3764503002166748,
-1.2330753803253174,
0.5529394745826721,
-0.22356358170509338,
-0.8260068893432617,
-1.3847877979278564,
0.2538537383079529,
-1.1984601020812988,
-1.6936043500900269,
0.34130072593688965,
1.85084068775177,
2.1332919597625732,
-0.6693000793457031,
1.5045363903045654,
-0.3996897041797638,
0.1609160602092743,
1.1934441328048706,
1.3432250022888184,
3.0246474742889404,
1.9061166048049927,
-1.3269699811935425,
0.5724182724952698,
-0.25514549016952515,
-0.4938659369945526,
1.0792630910873413,
-1.1933554410934448,
1.2660425901412964,
-0.11809416115283966,
-1.1339141130447388,
-1.1952897310256958,
0.9951735138893127,
0.4138599932193756,
0.10620440542697906,
-0.5030744671821594,
1.266261339187622,
0.12659549713134766,
1.320824384689331,
0.670116662979126,
-0.4019485414028168,
0.5002732276916504,
-0.4977375268936157,
-0.5325846672058105,
1.5777119398117065,
0.26616355776786804,
-1.4104044437408447,
-2.2472681999206543,
-0.22536706924438477,
-0.8736492395401001,
0.11750385165214539,
-0.6476702094078064,
-0.9723302125930786,
1.6149911880493164,
0.2486780732870102,
-1.3172943592071533,
-0.31735992431640625,
-0.31564751267433167,
-0.47142577171325684,
2.6629204750061035,
-1.3425554037094116,
-0.2086380273103714,
-0.9534834623336792,
-0.6637805700302124,
1.6370141506195068,
-1.3108354806900024,
-0.2999853789806366,
-1.0953421592712402,
-0.6026521325111389,
-1.11228609085083,
-0.4086052179336548,
0.007203040644526482,
-1.0063894987106323,
0.9450002908706665,
0.22550790011882782,
-1.1799159049987793,
-0.3892969489097595,
-0.8328654170036316,
0.9312035441398621,
-0.1909664422273636,
0.27463072538375854,
1.6117862462997437,
0.3024437725543976,
-0.3333493173122406,
0.8382742404937744,
1.243570327758789,
0.7128844857215881,
-0.7027834057807922,
0.010628033429384232,
-0.6084732413291931,
0.508722186088562,
-1.1731410026550293,
0.3725678622722626,
-2.9359514713287354,
0.5779475569725037,
-0.16632407903671265,
-0.05471654608845711,
-0.10372795164585114,
-1.405120611190796,
1.0828535556793213,
2.569363594055176,
-1.1373505592346191,
0.4741891622543335,
0.39076459407806396,
1.126697063446045,
-1.6344658136367798,
0.3739917278289795,
-0.5125447511672974,
2.1616318225860596,
0.1786031723022461,
1.2984075546264648,
-0.5312674641609192,
-2.4161770343780518,
0.6591798663139343,
-1.2779555320739746,
-1.2505171298980713,
0.7549480199813843,
-0.9042500257492065,
0.1313367336988449,
-1.4658502340316772,
-0.2678976356983185,
-0.8721604943275452,
-1.3265937566757202,
0.6764591932296753,
0.19426241517066956,
0.39881783723831177,
-0.5768412947654724,
0.2740838825702667,
-2.284177780151367,
-1.4188634157180786,
-0.16329634189605713,
-0.9463228583335876,
0.4917406439781189,
-0.5635092258453369,
0.752348780632019,
-0.06547631323337555,
0.05756251886487007,
0.4059801697731018,
1.4995594024658203,
3.5098042488098145,
0.15741068124771118,
0.3083840310573578,
-0.33780235052108765,
-0.9533418416976929,
1.4086204767227173,
0.9064763784408569,
-0.08109760284423828,
-0.6267821192741394,
-1.0264948606491089,
1.1964499950408936,
2.1515231132507324,
0.8627890348434448,
-0.020296040922403336,
-0.8252351880073547,
-0.6391072869300842,
-0.10551920533180237,
0.17565122246742249,
0.5346301198005676,
0.9028369188308716,
0.09143099188804626,
0.08891332149505615,
1.4391049146652222,
1.0424009561538696,
-0.2953517735004425,
0.29126688838005066,
-0.6817395687103271,
-0.46215420961380005,
0.5352842807769775,
0.2667047679424286,
0.009308172389864922,
0.42007511854171753,
-0.9795219302177429,
-0.30939358472824097,
-0.40643608570098877,
-0.8469188809394836,
-0.7349671721458435,
-0.390153169631958,
-0.41294431686401367,
1.5932966470718384,
0.12183310091495514,
-0.4873456060886383,
0.01374484971165657,
-0.6351829767227173,
-0.09372025728225708,
-1.1517620086669922,
0.23282313346862793,
-0.14708146452903748,
-0.1191922128200531,
-0.16576240956783295,
1.7243815660476685,
-0.9610468745231628,
-2.03244686126709,
0.1465366929769516,
0.2616293430328369,
-0.16093461215496063,
0.16912157833576202,
1.681993842124939,
0.520663321018219,
1.5330408811569214,
1.252151370048523,
0.9533661007881165,
-0.7244002223014832,
-1.364048719406128,
0.7555742859840393,
0.9456987977027893,
-1.3924685716629028,
0.6754716634750366,
-0.05408454313874245,
-0.4628545939922333,
0.7125422358512878,
1.1922444105148315,
0.4977198839187622,
-2.069204092025757,
0.8478282690048218,
-1.1619441509246826,
0.9616836309432983,
0.8263775706291199,
0.7356089353561401,
0.186698317527771,
0.8372570872306824,
-1.2618257999420166,
-1.058336853981018,
-0.696169376373291,
-0.8000527620315552,
2.0064735412597656,
-0.47005683183670044,
0.6199464201927185,
-0.09055545926094055,
-1.3140249252319336,
-0.04738731309771538,
0.815670371055603,
0.387663334608078,
-0.4360212981700897,
0.7093985080718994,
-0.6473932862281799,
-1.0019060373306274,
-1.3755372762680054,
-0.422527015209198,
-1.1191309690475464,
-0.97452712059021,
1.0402517318725586,
0.7271957397460938,
0.2961887717247009,
1.9201276302337646,
0.6935776472091675,
0.36195138096809387,
-2.587791681289673,
0.928610622882843,
0.30007806420326233,
-0.14589446783065796,
0.9814666509628296,
0.4424009919166565,
1.0658693313598633,
0.1665668487548828,
0.6304965615272522,
-2.5639805793762207,
2.3627710342407227,
-0.1363212913274765,
0.6189362406730652,
0.0015277890488505363,
-0.24101467430591583,
1.1730496883392334,
0.5915514230728149,
0.47167789936065674,
-1.1006616353988647,
0.712860107421875,
-0.5364336967468262,
1.1537264585494995,
0.882372260093689,
-0.7585843801498413,
-0.029873445630073547,
1.3820141553878784,
0.4969380497932434,
-0.6287575364112854,
-0.8858625292778015,
-0.9950641393661499,
0.8725322484970093,
1.747145175933838,
-0.17276892066001892,
-0.05783669650554657,
0.7182848453521729,
0.6667262315750122,
-1.1712768077850342,
0.0033385539427399635,
-0.6970219016075134,
-0.9014253616333008,
1.5452191829681396,
2.064971685409546,
-0.1712680459022522,
-0.0232706256210804,
-0.7462741732597351,
-1.2492469549179077,
0.7955523729324341,
-0.10508213937282562,
0.019649768248200417,
0.5347956418991089,
-0.6461905241012573,
1.0071794986724854,
0.8089328408241272,
0.9566134214401245,
0.15744876861572266,
0.2871793508529663,
0.4045611321926117,
-0.34651944041252136,
-1.0523079633712769,
-0.36013153195381165,
-1.1152209043502808,
-2.6556625366210938,
0.44753772020339966,
-0.28615817427635193,
-1.4973996877670288,
-0.026206789538264275,
-0.9127772450447083,
0.9438372850418091,
-0.5017410516738892,
-1.1338533163070679,
-1.5483598709106445,
0.21668143570423126,
-0.009669159539043903,
1.0281158685684204,
-1.625978708267212,
-0.22174663841724396,
1.136313557624817,
0.7729389667510986,
-0.6914101243019104,
0.939318835735321,
0.25625476241111755,
0.927103579044342,
0.7944145202636719,
-0.3337653875350952,
0.6426162123680115,
0.13026641309261322,
-1.3538912534713745,
0.47593533992767334,
1.2799828052520752,
0.12183481454849243,
1.5072516202926636,
-0.38683953881263733,
0.024174872785806656,
0.4597751796245575,
-0.5944525599479675,
-0.46902692317962646,
-0.4133993983268738,
0.653835117816925,
0.01567963883280754,
-0.8868880271911621,
-0.0173628106713295,
-0.09260259568691254,
-0.3338455259799957,
0.1272624135017395,
-1.4117367267608643,
-0.22263145446777344,
-0.4669632911682129,
-0.4737541377544403,
-1.3206321001052856,
-0.16652964055538177,
1.5020148754119873,
-0.594205379486084,
-0.14512386918067932,
0.5335870385169983,
0.5084038376808167,
0.5054812431335449,
0.7146012187004089,
-0.7053340077400208,
-0.3757607936859131,
-0.27113279700279236,
-0.2653205692768097,
0.32023516297340393,
1.4217642545700073,
0.02507771924138069,
-1.016866683959961,
0.7406759858131409,
-0.35291731357574463,
0.06288705766201019,
1.899940848350525,
0.18562307953834534,
-0.721761167049408,
0.48260393738746643,
-0.7645069360733032,
1.8061113357543945,
1.6450608968734741,
1.1557772159576416,
-0.11431881785392761,
-1.0166819095611572,
0.6680693030357361,
-0.3822704553604126,
-0.332781046628952,
0.9145166277885437,
0.35837891697883606,
-0.3143892288208008,
-1.5264357328414917,
0.7580780982971191,
1.1342028379440308,
-0.8446318507194519,
-0.8495675921440125,
0.24064211547374725,
-0.8010891675949097,
1.2421011924743652,
0.4321366548538208,
0.46849772334098816,
0.2198667675256729,
1.6330422163009644,
0.7926153540611267,
-0.4764977693557739,
0.6142343282699585,
0.4997788071632385,
-0.2646474242210388,
-2.094884157180786,
-1.2126692533493042,
0.38957586884498596,
-0.5842023491859436,
-1.4882608652114868,
1.3816492557525635,
-1.0580440759658813,
-1.1294015645980835,
0.6141340732574463,
0.029517728835344315,
1.3289093971252441,
0.47678619623184204,
1.5943055152893066,
2.1438000202178955,
0.8119164705276489,
0.49652552604675293,
1.2985917329788208,
-0.2389676719903946,
-0.4923678934574127,
1.8433634042739868,
-0.4213621914386749,
0.49154067039489746,
1.1578823328018188,
-0.31695613265037537,
-1.0848546028137207,
-0.7655255794525146,
-1.191514492034912,
-0.7202454209327698,
0.9913901686668396,
0.024039853364229202,
-1.0799401998519897,
0.3255975842475891,
1.5635629892349243,
0.17173422873020172,
-0.2217494249343872,
0.6094962954521179,
0.4118882715702057,
-0.7974968552589417,
-0.13081921637058258,
-0.9329267740249634,
0.44329050183296204,
-0.35560572147369385,
-0.3135940432548523,
0.35800793766975403,
0.5404992699623108,
1.2832530736923218,
-0.15239745378494263,
0.049499254673719406,
1.026794672012329,
-1.5307937860488892,
1.395458459854126,
-0.5903017520904541,
0.3076063096523285,
-2.3052151203155518,
1.185557246208191,
-0.6316250562667847,
2.001802682876587,
-2.631988525390625,
0.3948175609111786,
-0.5919204354286194,
-0.6154922842979431,
0.35810422897338867,
-0.15504732728004456,
0.23128578066825867,
-0.21579930186271667,
-1.074648380279541,
-0.005383648443967104,
-0.630715548992157,
0.6261085867881775,
1.0644793510437012,
1.4238249063491821,
-1.1015512943267822,
-0.28419044613838196,
-1.6171380281448364,
-0.07670357823371887,
-0.6974972486495972,
0.18124082684516907,
-1.9751585721969604,
-0.16136939823627472,
-1.978554368019104,
-2.2135441303253174,
-1.325952410697937,
-0.8151348233222961,
1.1821955442428589,
0.14485034346580505,
-0.864274799823761,
1.200278639793396,
-0.35577160120010376,
-1.843315601348877,
1.0793453454971313,
-2.069668769836426
] |
https://github.com/huggingface/datasets/issues/3444 | Align the Dataset and IterableDataset processing API | I just encountered the problem of the missing `fn_kwargs` parameter in the `map` method. I am commenting to give a workaround in case someone has the same problem and does not find a solution.
You can wrap your function call inside a class that contains the other parameters needed by the function called by map, like this:
```python
def my_func(x, y, z):
# Do things
class MyFuncWrapper:
def __init__(self, y, z):
self.y = y
self.z = z
def __call__(self, x):
return my_func(x, self.y, self.z)
```
Then, give an instance of the `MyFuncWrapper` to the map function. | ## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger | 1,051 | 96 | Align the Dataset and IterableDataset processing API
## Intro
items marked like <s>this</s> are done already :)
Currently the two classes have two distinct API for processing:
### The `.map()` method
Both have those parameters in common: function, batched, batch_size
- IterableDataset is missing those parameters:
<s>with_indices</s>, with_rank, <s>input_columns</s>, <s>drop_last_batch</s>, <s>remove_columns</s>, features, disable_nullable, fn_kwargs, num_proc
- Dataset also has additional parameters that are exclusive, due to caching:
keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, suffix_template, new_fingerprint
- <s>There is also an important difference in terms of behavior:
**Dataset.map adds new columns** (with dict.update)
BUT
**IterableDataset discards previous columns** (it overwrites the dict)
IMO the two methods should have the same behavior. This would be an important breaking change though.</s>
- Dataset.map is eager while IterableDataset.map is lazy
### The `.shuffle()` method
- <s>Both have an optional seed parameter, but IterableDataset requires a mandatory parameter buffer_size to control the size of the local buffer used for approximate shuffling.</s>
- <s>IterableDataset is missing the parameter generator</s>
- Also Dataset has exclusive parameters due to caching: keep_in_memory, load_from_cache_file, indices_cache_file_name, writer_batch_size, new_fingerprint
### The `.with_format()` method
- IterableDataset only supports "torch" (it misses tf, jax, pandas, arrow) and is missing the parameters: columns, output_all_columns and format_kwargs
- other methods like `set_format`, `reset_format` or `formatted_as` are also missing
### Other methods
- Both have the same `remove_columns` method
- IterableDataset is missing: <s>cast</s>, <s>cast_column</s>, <s>filter</s>, <s>rename_column</s>, <s>rename_columns</s>, class_encode_column, flatten, prepare_for_task, train_test_split, shard
- Some other methods are missing but we can discuss them: set_transform, formatted_as, with_transform
- And others don't really make sense for an iterable dataset: select, sort, add_column, add_item
- Dataset is missing skip and take, that IterableDataset implements.
## Questions
I think it would be nice to be able to switch between streaming and regular dataset easily, without changing the processing code significantly.
1. What should be aligned and what shouldn't between those two APIs ?
IMO the minimum is to align the main processing methods.
It would mean aligning breaking the current `Iterable.map` to have the same behavior as `Dataset.map` (add columns with dict.update), and add multiprocessing as well as the missing parameters. DONE ✅
It would also mean implementing the missing methods: cast, cast_column, filter, rename_column, rename_columns, class_encode_column, flatten, prepare_for_task, train_test_split, shard. WIP 🟠
2. What are the breaking changes for IterableDataset ?
The main breaking change would be the change of behavior of `IterableDataset.map`, because currently it discards all the previous columns instead of keeping them. DONE ✅
3. Shall we also do some changes for regular datasets ?
I agree the simplest would be to have the exact same methods for both Dataset and IterableDataset. However this is probably not a good idea because it would prevent users from using the best benefits of them. That's why we can keep some aspects of regular datasets as they are:
- keep the eager Dataset.map with caching
- keep the with_transform method for lazy processing
- keep Dataset.select (it could also be added to IterableDataset even though it's not recommended)
We could have a completely aligned `map` method if both methods were lazy by default, but this is a very big breaking change so I'm not sure we can consider doing that.
For information, TFDS does lazy map by default, and has an additional `.cache()` method.
## Opinions ?
I'd love to gather some opinions about this here. If the two APIs are more aligned it would be awesome for the examples in `transformers`, and it would create a satisfactory experience for users that want to switch from one mode to the other.
cc @mariosasko @albertvillanova @thomwolf @patrickvonplaten @sgugger
I just encountered the problem of the missing `fn_kwargs` parameter in the `map` method. I am commenting to give a workaround in case someone has the same problem and does not find a solution.
You can wrap your function call inside a class that contains the other parameters needed by the function called by map, like this:
```python
def my_func(x, y, z):
# Do things
class MyFuncWrapper:
def __init__(self, y, z):
self.y = y
self.z = z
def __call__(self, x):
return my_func(x, self.y, self.z)
```
Then, give an instance of the `MyFuncWrapper` to the map function. | [
-1.165069341659546,
-0.9137279391288757,
-0.7034327983856201,
1.4775683879852295,
-0.182785302400589,
-1.2899360656738281,
0.22895671427249908,
-1.0863122940063477,
1.6649971008300781,
-0.8457667231559753,
0.37291669845581055,
-1.6002495288848877,
0.060649629682302475,
-0.5887289047241211,
-0.7210293412208557,
-0.7617984414100647,
-0.43534573912620544,
-0.8846697211265564,
1.082593560218811,
2.421595811843872,
1.1886775493621826,
-1.3998439311981201,
2.7131896018981934,
0.6548430323600769,
-0.2995055019855499,
-0.9161980152130127,
0.4264586269855499,
-0.12470431625843048,
-1.252764344215393,
-0.5706902742385864,
-0.8707075715065002,
-0.1465669721364975,
-0.5931786894798279,
-0.4224770665168762,
-0.08767490088939667,
0.444755882024765,
-0.18410322070121765,
-0.4144452214241028,
-0.4630773663520813,
-0.7575943470001221,
0.5515730977058411,
-0.32713374495506287,
1.0184587240219116,
-0.2847948670387268,
1.7861952781677246,
-0.5492554306983948,
0.5621044039726257,
0.7648176550865173,
1.2359033823013306,
0.1613176316022873,
-0.046242859214544296,
0.29210329055786133,
0.35932764410972595,
-0.018789248540997505,
0.6023290753364563,
1.0469105243682861,
0.645359218120575,
0.5573264360427856,
0.6635415554046631,
-2.2354066371917725,
1.3910791873931885,
-1.0483919382095337,
0.3897513449192047,
1.3463795185089111,
-0.8964346647262573,
0.3106921315193176,
-1.7830784320831299,
0.023385830223560333,
0.6352533102035522,
-2.157705068588257,
0.3833595812320709,
-1.2640968561172485,
-0.486579954624176,
1.0741419792175293,
0.3563194274902344,
-1.2671877145767212,
0.15089784562587738,
-0.4514319598674774,
1.0023735761642456,
0.4079919457435608,
0.9403281211853027,
-1.7653977870941162,
0.027217160910367966,
-0.25800272822380066,
0.15414635837078094,
-1.2031601667404175,
-1.5868600606918335,
0.6799666285514832,
0.5566564202308655,
0.5006989240646362,
-0.13728724420070648,
1.074215292930603,
-1.0951550006866455,
0.8684979677200317,
-1.151162028312683,
-1.6218972206115723,
-1.3844923973083496,
-2.2667219638824463,
-2.2322919368743896,
0.7019857168197632,
-0.554528534412384,
-0.4608031213283539,
2.0926578044891357,
-1.0583382844924927,
-1.550857663154602,
1.1991633176803589,
0.20265474915504456,
0.10543936491012573,
2.2998688220977783,
0.16701970994472504,
-0.6153276562690735,
0.4437970817089081,
-0.8798969984054565,
0.92386394739151,
-0.3762107491493225,
1.2628918886184692,
0.30149659514427185,
-1.0730514526367188,
1.4779385328292847,
-0.4023773670196533,
0.5579099059104919,
-0.5391546487808228,
-0.659578800201416,
-0.7896273136138916,
0.3209342360496521,
1.882327675819397,
-0.20722602307796478,
1.4966853857040405,
-0.33818352222442627,
-1.5308277606964111,
-1.6291362047195435,
0.9577271938323975,
0.3994768261909485,
-0.8671972751617432,
0.12122032046318054,
-0.48738977313041687,
0.1888248473405838,
-0.17548316717147827,
1.1323702335357666,
1.2923719882965088,
0.77382493019104,
-0.44357943534851074,
-0.8782188892364502,
0.10976804792881012,
-0.1755269467830658,
-0.8671227693557739,
-1.7223135232925415,
-0.34490904211997986,
0.0063753556460142136,
0.6389137506484985,
-1.1570959091186523,
1.7805182933807373,
1.0037870407104492,
1.9926033020019531,
0.9668293595314026,
-0.3569318652153015,
1.4431062936782837,
0.10631215572357178,
1.8408203125,
-0.5491238832473755,
0.6157233715057373,
-0.4085213541984558,
-1.1301679611206055,
0.9052014350891113,
-0.303369402885437,
-2.0772852897644043,
-0.804172933101654,
-0.6799111366271973,
-0.29347720742225647,
-0.7902155518531799,
0.9142588376998901,
-0.25206828117370605,
-1.431322455406189,
0.21250927448272705,
-0.6551389694213867,
0.16823840141296387,
-1.1360244750976562,
0.2788585424423218,
0.6652074456214905,
-0.68938148021698,
0.02729199081659317,
-0.17535270750522614,
-1.2333815097808838,
-0.47359326481819153,
0.2979842722415924,
1.9259750843048096,
-0.6645284295082092,
0.9807983040809631,
1.0841429233551025,
-0.5943360924720764,
-0.03391864895820618,
0.1944340467453003,
-0.26384568214416504,
0.766354501247406,
-1.1115700006484985,
-0.6042917966842651,
1.2473666667938232,
-0.30150920152664185,
-0.5400582551956177,
1.482526183128357,
0.5570260882377625,
-1.0982303619384766,
-0.2157067060470581,
-0.10938133299350739,
-0.8523957133293152,
0.11863183975219727,
-1.582978367805481,
-0.012734751217067242,
0.47600314021110535,
-1.5716270208358765,
-0.37470558285713196,
-0.15978913009166718,
1.2463066577911377,
-0.05592427775263786,
1.4309697151184082,
-0.33789709210395813,
-0.21420897543430328,
-0.36891502141952515,
-0.3598773181438446,
0.16767646372318268,
-0.12969741225242615,
-0.5132169127464294,
0.08360555768013,
-0.787693202495575,
0.3843601942062378,
1.4683014154434204,
0.13820423185825348,
0.01858028769493103,
0.41669410467147827,
1.0318262577056885,
0.43592187762260437,
0.021374469622969627,
-0.877274215221405,
-1.4379627704620361,
2.0525646209716797,
-1.4884192943572998,
1.9607393741607666,
0.8747599720954895,
-0.010838774032890797,
-1.8204479217529297,
-1.7931787967681885,
1.2240995168685913,
1.1092338562011719,
2.170463800430298,
0.4556483328342438,
0.3283384144306183,
-0.888292670249939,
-0.6415586471557617,
0.3633909523487091,
-0.9732125401496887,
-0.6852800250053406,
0.14069493114948273,
2.49464750289917,
1.751508355140686,
-0.32400816679000854,
-0.20010456442832947,
-0.9342746138572693,
1.4188945293426514,
-0.22894300520420074,
0.2895158529281616,
2.0242278575897217,
-0.29350152611732483,
-1.1301060914993286,
1.3972231149673462,
-2.4456069469451904,
0.24635432660579681,
2.0436198711395264,
0.38498127460479736,
0.17992275953292847,
-1.3342957496643066,
-0.5747502446174622,
-0.2640361487865448,
-0.3764503002166748,
-1.2330753803253174,
0.5529394745826721,
-0.22356358170509338,
-0.8260068893432617,
-1.3847877979278564,
0.2538537383079529,
-1.1984601020812988,
-1.6936043500900269,
0.34130072593688965,
1.85084068775177,
2.1332919597625732,
-0.6693000793457031,
1.5045363903045654,
-0.3996897041797638,
0.1609160602092743,
1.1934441328048706,
1.3432250022888184,
3.0246474742889404,
1.9061166048049927,
-1.3269699811935425,
0.5724182724952698,
-0.25514549016952515,
-0.4938659369945526,
1.0792630910873413,
-1.1933554410934448,
1.2660425901412964,
-0.11809416115283966,
-1.1339141130447388,
-1.1952897310256958,
0.9951735138893127,
0.4138599932193756,
0.10620440542697906,
-0.5030744671821594,
1.266261339187622,
0.12659549713134766,
1.320824384689331,
0.670116662979126,
-0.4019485414028168,
0.5002732276916504,
-0.4977375268936157,
-0.5325846672058105,
1.5777119398117065,
0.26616355776786804,
-1.4104044437408447,
-2.2472681999206543,
-0.22536706924438477,
-0.8736492395401001,
0.11750385165214539,
-0.6476702094078064,
-0.9723302125930786,
1.6149911880493164,
0.2486780732870102,
-1.3172943592071533,
-0.31735992431640625,
-0.31564751267433167,
-0.47142577171325684,
2.6629204750061035,
-1.3425554037094116,
-0.2086380273103714,
-0.9534834623336792,
-0.6637805700302124,
1.6370141506195068,
-1.3108354806900024,
-0.2999853789806366,
-1.0953421592712402,
-0.6026521325111389,
-1.11228609085083,
-0.4086052179336548,
0.007203040644526482,
-1.0063894987106323,
0.9450002908706665,
0.22550790011882782,
-1.1799159049987793,
-0.3892969489097595,
-0.8328654170036316,
0.9312035441398621,
-0.1909664422273636,
0.27463072538375854,
1.6117862462997437,
0.3024437725543976,
-0.3333493173122406,
0.8382742404937744,
1.243570327758789,
0.7128844857215881,
-0.7027834057807922,
0.010628033429384232,
-0.6084732413291931,
0.508722186088562,
-1.1731410026550293,
0.3725678622722626,
-2.9359514713287354,
0.5779475569725037,
-0.16632407903671265,
-0.05471654608845711,
-0.10372795164585114,
-1.405120611190796,
1.0828535556793213,
2.569363594055176,
-1.1373505592346191,
0.4741891622543335,
0.39076459407806396,
1.126697063446045,
-1.6344658136367798,
0.3739917278289795,
-0.5125447511672974,
2.1616318225860596,
0.1786031723022461,
1.2984075546264648,
-0.5312674641609192,
-2.4161770343780518,
0.6591798663139343,
-1.2779555320739746,
-1.2505171298980713,
0.7549480199813843,
-0.9042500257492065,
0.1313367336988449,
-1.4658502340316772,
-0.2678976356983185,
-0.8721604943275452,
-1.3265937566757202,
0.6764591932296753,
0.19426241517066956,
0.39881783723831177,
-0.5768412947654724,
0.2740838825702667,
-2.284177780151367,
-1.4188634157180786,
-0.16329634189605713,
-0.9463228583335876,
0.4917406439781189,
-0.5635092258453369,
0.752348780632019,
-0.06547631323337555,
0.05756251886487007,
0.4059801697731018,
1.4995594024658203,
3.5098042488098145,
0.15741068124771118,
0.3083840310573578,
-0.33780235052108765,
-0.9533418416976929,
1.4086204767227173,
0.9064763784408569,
-0.08109760284423828,
-0.6267821192741394,
-1.0264948606491089,
1.1964499950408936,
2.1515231132507324,
0.8627890348434448,
-0.020296040922403336,
-0.8252351880073547,
-0.6391072869300842,
-0.10551920533180237,
0.17565122246742249,
0.5346301198005676,
0.9028369188308716,
0.09143099188804626,
0.08891332149505615,
1.4391049146652222,
1.0424009561538696,
-0.2953517735004425,
0.29126688838005066,
-0.6817395687103271,
-0.46215420961380005,
0.5352842807769775,
0.2667047679424286,
0.009308172389864922,
0.42007511854171753,
-0.9795219302177429,
-0.30939358472824097,
-0.40643608570098877,
-0.8469188809394836,
-0.7349671721458435,
-0.390153169631958,
-0.41294431686401367,
1.5932966470718384,
0.12183310091495514,
-0.4873456060886383,
0.01374484971165657,
-0.6351829767227173,
-0.09372025728225708,
-1.1517620086669922,
0.23282313346862793,
-0.14708146452903748,
-0.1191922128200531,
-0.16576240956783295,
1.7243815660476685,
-0.9610468745231628,
-2.03244686126709,
0.1465366929769516,
0.2616293430328369,
-0.16093461215496063,
0.16912157833576202,
1.681993842124939,
0.520663321018219,
1.5330408811569214,
1.252151370048523,
0.9533661007881165,
-0.7244002223014832,
-1.364048719406128,
0.7555742859840393,
0.9456987977027893,
-1.3924685716629028,
0.6754716634750366,
-0.05408454313874245,
-0.4628545939922333,
0.7125422358512878,
1.1922444105148315,
0.4977198839187622,
-2.069204092025757,
0.8478282690048218,
-1.1619441509246826,
0.9616836309432983,
0.8263775706291199,
0.7356089353561401,
0.186698317527771,
0.8372570872306824,
-1.2618257999420166,
-1.058336853981018,
-0.696169376373291,
-0.8000527620315552,
2.0064735412597656,
-0.47005683183670044,
0.6199464201927185,
-0.09055545926094055,
-1.3140249252319336,
-0.04738731309771538,
0.815670371055603,
0.387663334608078,
-0.4360212981700897,
0.7093985080718994,
-0.6473932862281799,
-1.0019060373306274,
-1.3755372762680054,
-0.422527015209198,
-1.1191309690475464,
-0.97452712059021,
1.0402517318725586,
0.7271957397460938,
0.2961887717247009,
1.9201276302337646,
0.6935776472091675,
0.36195138096809387,
-2.587791681289673,
0.928610622882843,
0.30007806420326233,
-0.14589446783065796,
0.9814666509628296,
0.4424009919166565,
1.0658693313598633,
0.1665668487548828,
0.6304965615272522,
-2.5639805793762207,
2.3627710342407227,
-0.1363212913274765,
0.6189362406730652,
0.0015277890488505363,
-0.24101467430591583,
1.1730496883392334,
0.5915514230728149,
0.47167789936065674,
-1.1006616353988647,
0.712860107421875,
-0.5364336967468262,
1.1537264585494995,
0.882372260093689,
-0.7585843801498413,
-0.029873445630073547,
1.3820141553878784,
0.4969380497932434,
-0.6287575364112854,
-0.8858625292778015,
-0.9950641393661499,
0.8725322484970093,
1.747145175933838,
-0.17276892066001892,
-0.05783669650554657,
0.7182848453521729,
0.6667262315750122,
-1.1712768077850342,
0.0033385539427399635,
-0.6970219016075134,
-0.9014253616333008,
1.5452191829681396,
2.064971685409546,
-0.1712680459022522,
-0.0232706256210804,
-0.7462741732597351,
-1.2492469549179077,
0.7955523729324341,
-0.10508213937282562,
0.019649768248200417,
0.5347956418991089,
-0.6461905241012573,
1.0071794986724854,
0.8089328408241272,
0.9566134214401245,
0.15744876861572266,
0.2871793508529663,
0.4045611321926117,
-0.34651944041252136,
-1.0523079633712769,
-0.36013153195381165,
-1.1152209043502808,
-2.6556625366210938,
0.44753772020339966,
-0.28615817427635193,
-1.4973996877670288,
-0.026206789538264275,
-0.9127772450447083,
0.9438372850418091,
-0.5017410516738892,
-1.1338533163070679,
-1.5483598709106445,
0.21668143570423126,
-0.009669159539043903,
1.0281158685684204,
-1.625978708267212,
-0.22174663841724396,
1.136313557624817,
0.7729389667510986,
-0.6914101243019104,
0.939318835735321,
0.25625476241111755,
0.927103579044342,
0.7944145202636719,
-0.3337653875350952,
0.6426162123680115,
0.13026641309261322,
-1.3538912534713745,
0.47593533992767334,
1.2799828052520752,
0.12183481454849243,
1.5072516202926636,
-0.38683953881263733,
0.024174872785806656,
0.4597751796245575,
-0.5944525599479675,
-0.46902692317962646,
-0.4133993983268738,
0.653835117816925,
0.01567963883280754,
-0.8868880271911621,
-0.0173628106713295,
-0.09260259568691254,
-0.3338455259799957,
0.1272624135017395,
-1.4117367267608643,
-0.22263145446777344,
-0.4669632911682129,
-0.4737541377544403,
-1.3206321001052856,
-0.16652964055538177,
1.5020148754119873,
-0.594205379486084,
-0.14512386918067932,
0.5335870385169983,
0.5084038376808167,
0.5054812431335449,
0.7146012187004089,
-0.7053340077400208,
-0.3757607936859131,
-0.27113279700279236,
-0.2653205692768097,
0.32023516297340393,
1.4217642545700073,
0.02507771924138069,
-1.016866683959961,
0.7406759858131409,
-0.35291731357574463,
0.06288705766201019,
1.899940848350525,
0.18562307953834534,
-0.721761167049408,
0.48260393738746643,
-0.7645069360733032,
1.8061113357543945,
1.6450608968734741,
1.1557772159576416,
-0.11431881785392761,
-1.0166819095611572,
0.6680693030357361,
-0.3822704553604126,
-0.332781046628952,
0.9145166277885437,
0.35837891697883606,
-0.3143892288208008,
-1.5264357328414917,
0.7580780982971191,
1.1342028379440308,
-0.8446318507194519,
-0.8495675921440125,
0.24064211547374725,
-0.8010891675949097,
1.2421011924743652,
0.4321366548538208,
0.46849772334098816,
0.2198667675256729,
1.6330422163009644,
0.7926153540611267,
-0.4764977693557739,
0.6142343282699585,
0.4997788071632385,
-0.2646474242210388,
-2.094884157180786,
-1.2126692533493042,
0.38957586884498596,
-0.5842023491859436,
-1.4882608652114868,
1.3816492557525635,
-1.0580440759658813,
-1.1294015645980835,
0.6141340732574463,
0.029517728835344315,
1.3289093971252441,
0.47678619623184204,
1.5943055152893066,
2.1438000202178955,
0.8119164705276489,
0.49652552604675293,
1.2985917329788208,
-0.2389676719903946,
-0.4923678934574127,
1.8433634042739868,
-0.4213621914386749,
0.49154067039489746,
1.1578823328018188,
-0.31695613265037537,
-1.0848546028137207,
-0.7655255794525146,
-1.191514492034912,
-0.7202454209327698,
0.9913901686668396,
0.024039853364229202,
-1.0799401998519897,
0.3255975842475891,
1.5635629892349243,
0.17173422873020172,
-0.2217494249343872,
0.6094962954521179,
0.4118882715702057,
-0.7974968552589417,
-0.13081921637058258,
-0.9329267740249634,
0.44329050183296204,
-0.35560572147369385,
-0.3135940432548523,
0.35800793766975403,
0.5404992699623108,
1.2832530736923218,
-0.15239745378494263,
0.049499254673719406,
1.026794672012329,
-1.5307937860488892,
1.395458459854126,
-0.5903017520904541,
0.3076063096523285,
-2.3052151203155518,
1.185557246208191,
-0.6316250562667847,
2.001802682876587,
-2.631988525390625,
0.3948175609111786,
-0.5919204354286194,
-0.6154922842979431,
0.35810422897338867,
-0.15504732728004456,
0.23128578066825867,
-0.21579930186271667,
-1.074648380279541,
-0.005383648443967104,
-0.630715548992157,
0.6261085867881775,
1.0644793510437012,
1.4238249063491821,
-1.1015512943267822,
-0.28419044613838196,
-1.6171380281448364,
-0.07670357823371887,
-0.6974972486495972,
0.18124082684516907,
-1.9751585721969604,
-0.16136939823627472,
-1.978554368019104,
-2.2135441303253174,
-1.325952410697937,
-0.8151348233222961,
1.1821955442428589,
0.14485034346580505,
-0.864274799823761,
1.200278639793396,
-0.35577160120010376,
-1.843315601348877,
1.0793453454971313,
-2.069668769836426
] |
https://github.com/huggingface/datasets/issues/3440 | datasets keeps reading from cached files, although I disabled it | Hi ! What version of `datasets` are you using ? Can you also provide the logs you get before it raises the error ? | ## Describe the bug
Hi,
I am trying to avoid dataset library using cached files, I get the following bug when this tried to read the cached files. I tried to do the followings:
```
from datasets import set_caching_enabled
set_caching_enabled(False)
```
also force redownlaod:
```
download_mode='force_redownload'
```
but none worked so far, this is on a cluster and on some of the machines this reads from the cached files, I really appreciate any idea on how to fully remove caching @lhoestq
many thanks
```
File "run_clm.py", line 496, in <module>
main()
File "run_clm.py", line 419, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 943, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/transformers/trainer.py", line 1445, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 172, in evaluate
output = self.eval_loop(
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 241, in eval_loop
metrics = self.compute_pet_metrics(eval_datasets, model, self.extra_info[metric_key_prefix], task=task)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 268, in compute_pet_metrics
centroids = self._compute_per_token_train_centroids(model, task=task)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 353, in _compute_per_token_train_centroids
data = get_label_samples(self.get_per_task_train_dataset(task), label)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 350, in get_label_samples
return dataset.filter(lambda example: int(example['labels']) == label)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 470, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/fingerprint.py", line 406, in wrapper
out = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2519, in filter
indices = self.map(
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2036, in map
return self._map_single(
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 503, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 470, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/fingerprint.py", line 406, in wrapper
out = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2248, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 654, in from_file
return cls(
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 593, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/features/features.py", line 1092, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/features/features.py", line 1081, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'candidates_ids': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'labels': Value(dtype='int64', id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'extra_fields': {}, 'task': Value(dtype='string', id=None)}
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: linux
- Python version: 3.8.12
- PyArrow version: 6.0.1
| 1,053 | 24 | datasets keeps reading from cached files, although I disabled it
## Describe the bug
Hi,
I am trying to avoid dataset library using cached files, I get the following bug when this tried to read the cached files. I tried to do the followings:
```
from datasets import set_caching_enabled
set_caching_enabled(False)
```
also force redownlaod:
```
download_mode='force_redownload'
```
but none worked so far, this is on a cluster and on some of the machines this reads from the cached files, I really appreciate any idea on how to fully remove caching @lhoestq
many thanks
```
File "run_clm.py", line 496, in <module>
main()
File "run_clm.py", line 419, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 943, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/transformers/trainer.py", line 1445, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 172, in evaluate
output = self.eval_loop(
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 241, in eval_loop
metrics = self.compute_pet_metrics(eval_datasets, model, self.extra_info[metric_key_prefix], task=task)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 268, in compute_pet_metrics
centroids = self._compute_per_token_train_centroids(model, task=task)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 353, in _compute_per_token_train_centroids
data = get_label_samples(self.get_per_task_train_dataset(task), label)
File "/users/dara/codes/fewshot/debug/fewshot/third_party/trainers/trainer.py", line 350, in get_label_samples
return dataset.filter(lambda example: int(example['labels']) == label)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 470, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/fingerprint.py", line 406, in wrapper
out = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2519, in filter
indices = self.map(
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2036, in map
return self._map_single(
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 503, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 470, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/fingerprint.py", line 406, in wrapper
out = func(self, *args, **kwargs)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2248, in _map_single
return Dataset.from_file(cache_file_name, info=info, split=self.split)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 654, in from_file
return cls(
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 593, in __init__
self.info.features = self.info.features.reorder_fields_as(inferred_features)
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/features/features.py", line 1092, in reorder_fields_as
return Features(recursive_reorder(self, other))
File "/users/dara/conda/envs/multisuccess/lib/python3.8/site-packages/datasets/features/features.py", line 1081, in recursive_reorder
raise ValueError(f"Keys mismatch: between {source} and {target}" + stack_position)
ValueError: Keys mismatch: between {'indices': Value(dtype='uint64', id=None)} and {'candidates_ids': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'labels': Value(dtype='int64', id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'extra_fields': {}, 'task': Value(dtype='string', id=None)}
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: linux
- Python version: 3.8.12
- PyArrow version: 6.0.1
Hi ! What version of `datasets` are you using ? Can you also provide the logs you get before it raises the error ? | [
-1.1905330419540405,
-0.9409248232841492,
-0.7222281694412231,
1.552437424659729,
-0.11655577272176743,
-1.2518243789672852,
0.1415204107761383,
-1.0617421865463257,
1.5763055086135864,
-0.7522287964820862,
0.22530804574489594,
-1.6429297924041748,
-0.05864434316754341,
-0.57920241355896,
-0.7122769951820374,
-0.8983104825019836,
-0.35701310634613037,
-0.9604462385177612,
1.038538932800293,
2.4109578132629395,
1.3572046756744385,
-1.3161317110061646,
2.7154412269592285,
0.7241830825805664,
-0.2889043688774109,
-1.0077097415924072,
0.5860845446586609,
-0.0395645909011364,
-1.1115121841430664,
-0.5562522411346436,
-0.8758717179298401,
-0.04764334484934807,
-0.5609104633331299,
-0.31922563910484314,
0.053275689482688904,
0.49320125579833984,
-0.25228261947631836,
-0.21876901388168335,
-0.6230347156524658,
-0.7082763314247131,
0.5382117033004761,
-0.3520733714103699,
0.9414634704589844,
-0.28996995091438293,
1.782049536705017,
-0.6808810830116272,
0.3824326992034912,
0.7448040246963501,
1.2850780487060547,
0.1382092535495758,
0.0413227379322052,
0.20160280168056488,
0.28908848762512207,
-0.07315777242183685,
0.6353304982185364,
1.132392406463623,
0.5697558522224426,
0.6217490434646606,
0.646611213684082,
-2.229825019836426,
1.255972146987915,
-1.0051510334014893,
0.28674930334091187,
1.3741228580474854,
-0.7992057204246521,
0.35181036591529846,
-1.777713656425476,
-0.043414920568466187,
0.6958612203598022,
-2.1963155269622803,
0.3174998462200165,
-1.33885657787323,
-0.4620252549648285,
0.9467247724533081,
0.2951452136039734,
-1.2242799997329712,
0.19370652735233307,
-0.46580204367637634,
1.1554460525512695,
0.428530752658844,
0.9614973068237305,
-1.7078121900558472,
-0.03844195604324341,
-0.17390631139278412,
0.06053467094898224,
-1.341442584991455,
-1.6754652261734009,
0.4994194507598877,
0.5017505884170532,
0.6321002244949341,
-0.12328334897756577,
1.08364999294281,
-1.150396704673767,
0.8349747061729431,
-0.9640272855758667,
-1.519020915031433,
-1.4258604049682617,
-2.3616573810577393,
-2.264850616455078,
0.766330897808075,
-0.6255430579185486,
-0.4882091283798218,
2.065054178237915,
-0.9541659951210022,
-1.6612188816070557,
1.1312100887298584,
0.3106403648853302,
0.13248944282531738,
2.384693145751953,
0.22412768006324768,
-0.6992607116699219,
0.40412238240242004,
-0.7880325317382812,
0.7856225371360779,
-0.3504255414009094,
1.294390320777893,
0.4675683379173279,
-1.0493601560592651,
1.6059353351593018,
-0.497575581073761,
0.6088582277297974,
-0.6681100130081177,
-0.5309642553329468,
-0.872467577457428,
0.26394665241241455,
1.7778524160385132,
-0.29608768224716187,
1.5373871326446533,
-0.28411367535591125,
-1.4956034421920776,
-1.5808924436569214,
0.8427090644836426,
0.42048022150993347,
-0.9600232839584351,
0.035053133964538574,
-0.5018399953842163,
0.2840389013290405,
-0.13728006184101105,
1.2022676467895508,
1.2297852039337158,
0.6651765704154968,
-0.39317724108695984,
-0.7877109050750732,
0.19168518483638763,
-0.14187438786029816,
-0.705995500087738,
-1.8468701839447021,
-0.32432642579078674,
0.2720804512500763,
0.5740514993667603,
-1.1191909313201904,
1.911707878112793,
0.8976356387138367,
1.9700373411178589,
0.9605627655982971,
-0.4095712900161743,
1.455253005027771,
-0.003182739485055208,
1.8386564254760742,
-0.5221535563468933,
0.6113079786300659,
-0.34605103731155396,
-1.2292455434799194,
0.932300865650177,
-0.3514735698699951,
-1.9364274740219116,
-0.8849525451660156,
-0.6923666000366211,
-0.2243112474679947,
-0.737396240234375,
0.8553026914596558,
-0.4207582175731659,
-1.5069211721420288,
0.10215093940496445,
-0.6207547187805176,
0.2058461606502533,
-1.2304089069366455,
0.2843015491962433,
0.5804567337036133,
-0.6113351583480835,
0.053435370326042175,
-0.20168909430503845,
-1.2101361751556396,
-0.505378007888794,
0.41019877791404724,
1.9903709888458252,
-0.5764840841293335,
0.9499184489250183,
1.0649877786636353,
-0.7125257849693298,
0.05708785355091095,
0.27098140120506287,
-0.2839449346065521,
0.7536418437957764,
-1.0806139707565308,
-0.4901362359523773,
1.2482303380966187,
-0.26783379912376404,
-0.7501210570335388,
1.4395617246627808,
0.8161686062812805,
-1.1100947856903076,
-0.2563929259777069,
-0.28689515590667725,
-0.8543666005134583,
0.012448051013052464,
-1.462179183959961,
-0.13339048624038696,
0.4550890028476715,
-1.4535791873931885,
-0.3247230052947998,
-0.15131117403507233,
1.4635002613067627,
-0.3488965928554535,
1.3907538652420044,
-0.359186589717865,
-0.18284396827220917,
-0.21808373928070068,
-0.4713675081729889,
0.2218608409166336,
-0.13053183257579803,
-0.5781092047691345,
0.173529714345932,
-0.7961239814758301,
0.3213006556034088,
1.4897388219833374,
0.23453779518604279,
0.06566283106803894,
0.37202170491218567,
1.0823529958724976,
0.3600292205810547,
0.04713824763894081,
-1.0111149549484253,
-1.4786573648452759,
1.9001812934875488,
-1.4510786533355713,
1.9521209001541138,
0.8004910945892334,
-0.1226416602730751,
-1.75255286693573,
-1.8008496761322021,
1.1985352039337158,
1.1779316663742065,
2.2995498180389404,
0.4644368290901184,
0.3897410035133362,
-0.8557978272438049,
-0.7733139991760254,
0.2903560698032379,
-1.079472303390503,
-0.6938701868057251,
0.17080476880073547,
2.3455398082733154,
1.8299784660339355,
-0.5065179467201233,
-0.225249782204628,
-0.9217947721481323,
1.2826852798461914,
-0.26869291067123413,
0.2715580463409424,
2.156780958175659,
-0.28129854798316956,
-1.0252165794372559,
1.3099488019943237,
-2.4415526390075684,
0.25458213686943054,
2.1087229251861572,
0.26792657375335693,
0.17891834676265717,
-1.500077247619629,
-0.5892019271850586,
-0.31979429721832275,
-0.5172525644302368,
-1.2507967948913574,
0.6116931438446045,
-0.2660277187824249,
-0.8077796697616577,
-1.3910067081451416,
0.08286625146865845,
-1.2005558013916016,
-1.7927120923995972,
0.3164767026901245,
1.9756468534469604,
2.1934945583343506,
-0.7442055940628052,
1.4141618013381958,
-0.29773756861686707,
-0.021024951711297035,
1.3197944164276123,
1.4458280801773071,
3.0283467769622803,
1.8414651155471802,
-1.246598243713379,
0.6460837721824646,
-0.24803565442562103,
-0.47943902015686035,
1.151375412940979,
-1.1250271797180176,
1.1228224039077759,
-0.1269000917673111,
-1.1710617542266846,
-1.2854573726654053,
0.9897980690002441,
0.5148980617523193,
0.04922621324658394,
-0.4962746202945709,
1.2649809122085571,
0.24502645432949066,
1.3382594585418701,
0.6471354961395264,
-0.4216775894165039,
0.5230944156646729,
-0.36065953969955444,
-0.5928032398223877,
1.6302851438522339,
0.18680566549301147,
-1.4940993785858154,
-2.3333890438079834,
-0.30909135937690735,
-0.9399985074996948,
-0.04697730019688606,
-0.5751334428787231,
-1.0520260334014893,
1.5692884922027588,
0.3255581259727478,
-1.2561312913894653,
-0.24957016110420227,
-0.20251896977424622,
-0.4982187747955322,
2.717477560043335,
-1.1444966793060303,
-0.13099344074726105,
-0.9500926733016968,
-0.5721587538719177,
1.601852536201477,
-1.2910157442092896,
-0.19611689448356628,
-1.064023494720459,
-0.6420189142227173,
-1.2837539911270142,
-0.4168952405452728,
0.08239798247814178,
-1.0579092502593994,
0.8182836174964905,
0.20865118503570557,
-1.1065772771835327,
-0.37595993280410767,
-0.8661695122718811,
1.0535920858383179,
-0.0008478080853819847,
0.24717502295970917,
1.8385096788406372,
0.23120762407779694,
-0.37648746371269226,
0.749934732913971,
1.193025827407837,
0.6414077877998352,
-0.549986720085144,
0.0908864215016365,
-0.5751413106918335,
0.4521288573741913,
-1.367269515991211,
0.22763435542583466,
-2.9918203353881836,
0.7637656331062317,
-0.19122353196144104,
-0.1515122801065445,
-0.1548357754945755,
-1.3525453805923462,
1.0883632898330688,
2.5526652336120605,
-1.1299771070480347,
0.38928428292274475,
0.456382155418396,
1.1621910333633423,
-1.6488643884658813,
0.3618139326572418,
-0.543015718460083,
2.072267770767212,
0.13702411949634552,
1.241705060005188,
-0.4666452407836914,
-2.2416155338287354,
0.642027735710144,
-1.2268753051757812,
-1.0361506938934326,
0.881426215171814,
-0.866877555847168,
0.2685966193675995,
-1.4611670970916748,
-0.2349923700094223,
-0.9303566217422485,
-1.2330964803695679,
0.7216891050338745,
0.10732578486204147,
0.39023151993751526,
-0.545601487159729,
0.3230164051055908,
-2.1681623458862305,
-1.3748893737792969,
-0.14740100502967834,
-0.9757843613624573,
0.5253682732582092,
-0.42728257179260254,
0.6189422011375427,
-0.03545316681265831,
0.1281418800354004,
0.3364889323711395,
1.6422474384307861,
3.425318479537964,
0.1482565850019455,
0.2617822289466858,
-0.11199380457401276,
-1.002100944519043,
1.4288811683654785,
0.8627729415893555,
-0.07376131415367126,
-0.5608711838722229,
-1.0862622261047363,
1.2724473476409912,
2.0331082344055176,
1.06727135181427,
0.08840303868055344,
-0.8717919588088989,
-0.733267068862915,
-0.06785456836223602,
0.21210895478725433,
0.5422552227973938,
0.9088864326477051,
0.011360078118741512,
-0.050178248435258865,
1.3561136722564697,
1.1231229305267334,
-0.3368285298347473,
0.3719295561313629,
-0.958564281463623,
-0.36587876081466675,
0.37991634011268616,
0.14775057137012482,
0.017575141042470932,
0.4225121736526489,
-0.9627097249031067,
-0.2973902225494385,
-0.30521562695503235,
-0.82511967420578,
-0.801989734172821,
-0.403629332780838,
-0.4405103921890259,
1.5112065076828003,
0.13717155158519745,
-0.4967939257621765,
0.16061998903751373,
-0.7144291996955872,
-0.179873526096344,
-1.1686259508132935,
0.09958067536354065,
-0.1553366482257843,
-0.10017386078834534,
-0.19424812495708466,
1.6226165294647217,
-0.931462824344635,
-2.0065393447875977,
0.0941525250673294,
0.31690722703933716,
-0.26333969831466675,
0.2778473198413849,
1.7816609144210815,
0.44186726212501526,
1.429002285003662,
1.220141887664795,
0.9926835298538208,
-0.6543397307395935,
-1.2879782915115356,
0.7775772213935852,
0.9294292330741882,
-1.350700855255127,
0.9632750153541565,
-0.24647195637226105,
-0.43059831857681274,
0.677101194858551,
1.2961676120758057,
0.3949328660964966,
-2.062471866607666,
0.8940565586090088,
-1.0300002098083496,
0.827131986618042,
0.719610333442688,
0.7572915554046631,
0.32993924617767334,
0.8158211708068848,
-1.1708879470825195,
-1.1524807214736938,
-0.6335148215293884,
-0.7472543120384216,
1.9985532760620117,
-0.3080192804336548,
0.6444478631019592,
-0.08276577293872833,
-1.2605764865875244,
-0.12341587245464325,
0.8336166739463806,
0.46847599744796753,
-0.4317072629928589,
0.9090670943260193,
-0.6481240391731262,
-0.9001341462135315,
-1.2551895380020142,
-0.3922381103038788,
-1.1126831769943237,
-0.9401006102561951,
1.0259264707565308,
0.7457513213157654,
0.3505743145942688,
1.9461771249771118,
0.6345118880271912,
0.47007182240486145,
-2.5632550716400146,
0.8949108719825745,
0.3014829456806183,
-0.09829501062631607,
0.8814519047737122,
0.30156049132347107,
1.091334342956543,
0.0510559044778347,
0.5644710063934326,
-2.3588743209838867,
2.2820754051208496,
-0.1578689068555832,
0.5523785948753357,
0.04029504954814911,
-0.3179396986961365,
1.1863315105438232,
0.6321990489959717,
0.5472111701965332,
-1.0476102828979492,
0.66327303647995,
-0.5628744959831238,
1.123031735420227,
0.8661103844642639,
-0.9189167618751526,
0.05397021025419235,
1.4893676042556763,
0.4288382828235626,
-0.4446786344051361,
-0.9338727593421936,
-0.9221007227897644,
1.0174782276153564,
1.639175534248352,
-0.06881498545408249,
-0.12886250019073486,
0.8029803037643433,
0.6464437246322632,
-1.1507295370101929,
0.12974455952644348,
-0.7479854226112366,
-0.7233371734619141,
1.6361244916915894,
2.0684475898742676,
-0.20865488052368164,
-0.1858852505683899,
-0.789872944355011,
-1.2351468801498413,
0.7381424903869629,
-0.20832525193691254,
0.057484522461891174,
0.49244338274002075,
-0.6653603315353394,
0.9903566837310791,
0.6854280829429626,
1.037438988685608,
0.03485533967614174,
0.40347805619239807,
0.390868216753006,
-0.449964702129364,
-1.1994317770004272,
-0.37669214606285095,
-1.1411497592926025,
-2.6358394622802734,
0.3899281919002533,
-0.2552671432495117,
-1.468912124633789,
0.07646623998880386,
-1.0759660005569458,
0.8245865702629089,
-0.5712499618530273,
-1.146427869796753,
-1.431349515914917,
0.29788070917129517,
-0.1492890864610672,
0.964545726776123,
-1.6301465034484863,
-0.17940647900104523,
1.173742413520813,
0.7605812549591064,
-0.6257309913635254,
0.9104421734809875,
0.11066962778568268,
1.056085467338562,
0.7575815916061401,
-0.4394107162952423,
0.6460866332054138,
-0.027066465467214584,
-1.3428794145584106,
0.4371240735054016,
1.2136967182159424,
0.17219911515712738,
1.4255647659301758,
-0.3873150050640106,
0.14088264107704163,
0.3772468864917755,
-0.7839494943618774,
-0.5696668028831482,
-0.3157675266265869,
0.6558159589767456,
0.044902436435222626,
-0.9942120313644409,
-0.06655337661504745,
-0.05809826776385307,
-0.36007240414619446,
0.1505528688430786,
-1.5122097730636597,
-0.3598785996437073,
-0.3841467499732971,
-0.45083630084991455,
-1.3368619680404663,
0.06506255269050598,
1.3709988594055176,
-0.6087445616722107,
-0.2696347236633301,
0.4156571626663208,
0.39589783549308777,
0.5649351477622986,
0.5997937917709351,
-0.8015357851982117,
-0.290671169757843,
-0.31706666946411133,
-0.31970134377479553,
0.3517930805683136,
1.2594568729400635,
-0.018728267401456833,
-0.9228335618972778,
0.6468588709831238,
-0.3843759000301361,
0.18139487504959106,
1.9991984367370605,
0.07059351354837418,
-0.6870570182800293,
0.40119174122810364,
-0.6782123446464539,
1.7971524000167847,
1.7254303693771362,
1.153326392173767,
-0.07038328051567078,
-0.7977752089500427,
0.6253543496131897,
-0.35853707790374756,
-0.3136059045791626,
0.9631897211074829,
0.29529044032096863,
-0.2554466426372528,
-1.439182162284851,
0.6922670602798462,
1.2667886018753052,
-0.7624366283416748,
-0.8133718371391296,
0.17096072435379028,
-0.8950084447860718,
1.2144054174423218,
0.5469035506248474,
0.3776973485946655,
0.29584553837776184,
1.5480401515960693,
0.8041661977767944,
-0.4495788514614105,
0.5079507827758789,
0.5369974374771118,
-0.23138344287872314,
-2.15287184715271,
-1.0602556467056274,
0.31511977314949036,
-0.5439908504486084,
-1.5826854705810547,
1.4417822360992432,
-1.1099340915679932,
-1.0293607711791992,
0.6633126139640808,
0.12202834337949753,
1.29847252368927,
0.38076797127723694,
1.6407490968704224,
2.072500467300415,
0.8551011681556702,
0.4188346564769745,
1.2101904153823853,
-0.10873934626579285,
-0.5481262803077698,
1.8529525995254517,
-0.4228783845901489,
0.4710237979888916,
1.0553202629089355,
-0.3644891381263733,
-1.116689920425415,
-0.8067315816879272,
-1.1758732795715332,
-0.6424042582511902,
1.2468786239624023,
0.09587057679891586,
-0.9625399708747864,
0.20892685651779175,
1.6714808940887451,
0.137812539935112,
-0.2139119654893875,
0.7301782965660095,
0.41614148020744324,
-0.7855855822563171,
-0.09035287797451019,
-0.8011815547943115,
0.5079986453056335,
-0.1706899106502533,
-0.297481507062912,
0.33930784463882446,
0.5081738829612732,
1.3163033723831177,
-0.1142309159040451,
0.12324344366788864,
0.9645933508872986,
-1.4218815565109253,
1.6010218858718872,
-0.5341200828552246,
0.36365118622779846,
-2.4929492473602295,
1.327858328819275,
-0.6609405279159546,
2.012988567352295,
-2.551362991333008,
0.3868243396282196,
-0.5663964152336121,
-0.5462266206741333,
0.2394637018442154,
-0.43857377767562866,
0.11051234602928162,
-0.1497344672679901,
-0.9440749883651733,
0.023746367543935776,
-0.7339578866958618,
0.6032007932662964,
1.1648467779159546,
1.471392035484314,
-1.14848792552948,
-0.29000324010849,
-1.7283871173858643,
-0.15226072072982788,
-0.8233763575553894,
0.27696502208709717,
-1.9839513301849365,
-0.20243412256240845,
-1.9882667064666748,
-2.2482621669769287,
-1.40070641040802,
-0.7831812500953674,
1.052180528640747,
0.19106952846050262,
-0.838871955871582,
1.2263187170028687,
-0.3700856566429138,
-1.7792043685913086,
1.0704033374786377,
-2.1349546909332275
] |
https://github.com/huggingface/datasets/issues/3431 | Unable to resolve any data file after loading once | Hi ! `load_dataset` accepts as input either a local dataset directory or a dataset name from the Hugging Face Hub.
So here you are getting this error the second time because it tries to load the local `wiki_dpr` directory, instead of `wiki_dpr` from the Hub. It doesn't work since it's a **cache** directory, not a **dataset** directory in itself.
To fix that you can use another cache directory like `cache_dir="/data2/whr/lzy/open_domain_data/retrieval/cache"` | when I rerun my program, it occurs this error
" Unable to resolve any data file that matches '['**train*']' at /data2/whr/lzy/open_domain_data/retrieval/wiki_dpr with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'zip']", so how could i deal with this problem?
thx.
And below is my code .
![image](https://user-images.githubusercontent.com/84694183/146023446-d75fdec8-65c1-484f-80d8-6c20ff5e994b.png)
| 1,055 | 70 | Unable to resolve any data file after loading once
when I rerun my program, it occurs this error
" Unable to resolve any data file that matches '['**train*']' at /data2/whr/lzy/open_domain_data/retrieval/wiki_dpr with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'zip']", so how could i deal with this problem?
thx.
And below is my code .
![image](https://user-images.githubusercontent.com/84694183/146023446-d75fdec8-65c1-484f-80d8-6c20ff5e994b.png)
Hi ! `load_dataset` accepts as input either a local dataset directory or a dataset name from the Hugging Face Hub.
So here you are getting this error the second time because it tries to load the local `wiki_dpr` directory, instead of `wiki_dpr` from the Hub. It doesn't work since it's a **cache** directory, not a **dataset** directory in itself.
To fix that you can use another cache directory like `cache_dir="/data2/whr/lzy/open_domain_data/retrieval/cache"` | [
-1.2503613233566284,
-0.9823615550994873,
-0.7632808685302734,
1.4688056707382202,
-0.16970011591911316,
-1.1598427295684814,
0.06924519687891006,
-0.9807865619659424,
1.6372408866882324,
-0.7814298868179321,
0.2274397313594818,
-1.6704798936843872,
-0.09019704163074493,
-0.6215403079986572,
-0.7233414649963379,
-0.8641743659973145,
-0.3059365451335907,
-0.833136260509491,
0.9544001221656799,
2.493429660797119,
1.0763882398605347,
-1.4029409885406494,
2.7578489780426025,
0.6435157060623169,
-0.18228760361671448,
-1.0757979154586792,
0.40667852759361267,
0.08941071480512619,
-1.0526988506317139,
-0.5620461702346802,
-0.9136209487915039,
-0.006161892786622047,
-0.6020076870918274,
-0.46986979246139526,
0.10812394320964813,
0.40160199999809265,
-0.14100608229637146,
-0.3552648723125458,
-0.4709322452545166,
-0.7125744223594666,
0.49227175116539,
-0.4968622028827667,
0.919680118560791,
-0.34856611490249634,
1.8027267456054688,
-0.6182432770729065,
0.2965320348739624,
0.6583465933799744,
1.338301420211792,
0.24253851175308228,
0.019754676148295403,
0.3073694705963135,
0.4489081799983978,
-0.028102032840251923,
0.4895593523979187,
1.193923830986023,
0.5753868222236633,
0.5271177887916565,
0.7040092945098877,
-2.3142149448394775,
1.2910559177398682,
-1.0616469383239746,
0.2655240297317505,
1.3727599382400513,
-0.9307540059089661,
0.5442153215408325,
-1.8197330236434937,
0.032040733844041824,
0.559760570526123,
-2.3333423137664795,
0.27308008074760437,
-1.2457311153411865,
-0.5284467339515686,
0.8815264105796814,
0.28718745708465576,
-1.3566688299179077,
0.18167221546173096,
-0.4411477744579315,
1.0726474523544312,
0.41573482751846313,
0.9939538836479187,
-1.7750903367996216,
-0.05363045632839203,
-0.1874852180480957,
0.10620675981044769,
-1.3383485078811646,
-1.5677340030670166,
0.5482496619224548,
0.5175387859344482,
0.664462685585022,
-0.10847622156143188,
0.9419050812721252,
-1.136360764503479,
0.855566143989563,
-1.1115604639053345,
-1.4880883693695068,
-1.3878453969955444,
-2.2884490489959717,
-2.2911691665649414,
0.8691739439964294,
-0.46878939867019653,
-0.5385258197784424,
1.9250298738479614,
-0.8975234627723694,
-1.7581273317337036,
1.1837702989578247,
0.3161323368549347,
0.04122459888458252,
2.4577696323394775,
0.2127957046031952,
-0.7949286699295044,
0.45067593455314636,
-0.7486047148704529,
0.8558515310287476,
-0.45340248942375183,
1.4532721042633057,
0.4958062469959259,
-0.9188066720962524,
1.6859644651412964,
-0.4812380373477936,
0.5607044696807861,
-0.6613938808441162,
-0.5923986434936523,
-0.9255605340003967,
0.377794474363327,
1.9240097999572754,
-0.20622718334197998,
1.5823948383331299,
-0.44747817516326904,
-1.5605075359344482,
-1.5409425497055054,
0.9407579302787781,
0.4860140085220337,
-0.8919910192489624,
0.04507466033101082,
-0.41991347074508667,
0.21947577595710754,
-0.1881265938282013,
1.1043328046798706,
1.1723445653915405,
0.678567111492157,
-0.3277687728404999,
-0.9013779163360596,
0.21898582577705383,
-0.10742409527301788,
-0.6516332030296326,
-1.8843384981155396,
-0.32614192366600037,
0.2342378795146942,
0.655327320098877,
-1.2925610542297363,
1.688785433769226,
0.8718976378440857,
1.979358434677124,
1.002566933631897,
-0.35812175273895264,
1.4572607278823853,
0.03319515660405159,
1.9316521883010864,
-0.5804342031478882,
0.6695207357406616,
-0.29760420322418213,
-1.08725905418396,
0.788479745388031,
-0.36936432123184204,
-2.0026423931121826,
-0.8315346240997314,
-0.9123052954673767,
-0.2419377863407135,
-0.7525439858436584,
0.8829092979431152,
-0.3042668104171753,
-1.42721426486969,
0.19399261474609375,
-0.628996729850769,
0.2986511290073395,
-1.2586089372634888,
0.27121785283088684,
0.7884916663169861,
-0.6370406150817871,
0.07129703462123871,
-0.25682127475738525,
-1.3653961420059204,
-0.4934370815753937,
0.3235822916030884,
2.0097925662994385,
-0.7405323386192322,
0.9154441952705383,
0.923568844795227,
-0.692704439163208,
0.01918296329677105,
0.341251403093338,
-0.24639946222305298,
0.7527477741241455,
-1.0609550476074219,
-0.45830294489860535,
1.1765159368515015,
-0.2843739092350006,
-0.5483577847480774,
1.4369405508041382,
0.8460433483123779,
-0.9510196447372437,
-0.24045050144195557,
-0.32526329159736633,
-0.781847357749939,
-0.05005733296275139,
-1.514451026916504,
-0.18165114521980286,
0.32468846440315247,
-1.414218544960022,
-0.42954492568969727,
-0.2844225764274597,
1.269536018371582,
-0.20024645328521729,
1.3691951036453247,
-0.3452252447605133,
-0.22204792499542236,
-0.307902455329895,
-0.5157260298728943,
0.21478530764579773,
-0.28452953696250916,
-0.7035467624664307,
0.1660079061985016,
-0.7566428184509277,
0.2862321436405182,
1.4953248500823975,
0.4538056552410126,
-0.010865593329071999,
0.5263004899024963,
1.1694424152374268,
0.34018802642822266,
0.0637136921286583,
-0.9016836285591125,
-1.5053554773330688,
2.0367166996002197,
-1.5040996074676514,
1.892233967781067,
0.7210548520088196,
-0.06915678083896637,
-1.6951953172683716,
-1.7692278623580933,
1.3999621868133545,
1.190887451171875,
2.3650999069213867,
0.5739317536354065,
0.4312867522239685,
-0.8807985782623291,
-0.7027105093002319,
0.23363447189331055,
-1.0201234817504883,
-0.7446460127830505,
0.021781694144010544,
2.3912932872772217,
1.782916784286499,
-0.5895140171051025,
-0.2190660536289215,
-0.9872692227363586,
1.3341078758239746,
-0.26411202549934387,
0.33789360523223877,
2.0376598834991455,
-0.33225730061531067,
-1.1053688526153564,
1.2425001859664917,
-2.3910458087921143,
0.229378342628479,
2.0551071166992188,
0.37599310278892517,
0.11977816373109818,
-1.450842261314392,
-0.6153739094734192,
-0.2651360332965851,
-0.35541313886642456,
-1.3033313751220703,
0.5969600677490234,
-0.3247379660606384,
-0.8288052082061768,
-1.515501618385315,
0.13310620188713074,
-1.1400436162948608,
-1.5704407691955566,
0.412065327167511,
1.9146424531936646,
2.075969934463501,
-0.7127168774604797,
1.434234857559204,
-0.15063700079917908,
0.23310256004333496,
1.299681544303894,
1.2931430339813232,
3.029125928878784,
1.8818116188049316,
-1.1781920194625854,
0.5806114077568054,
-0.2790445387363434,
-0.511478066444397,
1.1132850646972656,
-1.0576730966567993,
1.1410834789276123,
-0.11361537128686905,
-1.164569616317749,
-1.2368468046188354,
0.9355591535568237,
0.4896945357322693,
-0.01684730313718319,
-0.5286372303962708,
1.2513864040374756,
0.07260796427726746,
1.300248384475708,
0.6078537702560425,
-0.3618481755256653,
0.4562196731567383,
-0.45629552006721497,
-0.5784512162208557,
1.6296268701553345,
0.1068841964006424,
-1.554526448249817,
-2.261143445968628,
-0.17682841420173645,
-0.9445707201957703,
-0.061348337680101395,
-0.5588995814323425,
-1.0457203388214111,
1.634802222251892,
0.409978449344635,
-1.2027989625930786,
-0.2557711601257324,
-0.34052085876464844,
-0.647452175617218,
2.6763572692871094,
-1.3805385828018188,
-0.3008630871772766,
-0.9454952478408813,
-0.5453062653541565,
1.6618915796279907,
-1.192715048789978,
-0.12341556698083878,
-0.9695107340812683,
-0.5988937616348267,
-1.3655524253845215,
-0.48651623725891113,
-0.09502112120389938,
-0.9736685752868652,
0.8627896308898926,
0.3240220546722412,
-1.1192071437835693,
-0.32609865069389343,
-0.8940762281417847,
0.839354395866394,
-0.09308799356222153,
0.3008691668510437,
1.8260687589645386,
0.3401618003845215,
-0.3778771758079529,
0.8064524531364441,
1.2675715684890747,
0.6617469787597656,
-0.5979322195053101,
0.07961434870958328,
-0.5799368023872375,
0.34322184324264526,
-1.2987971305847168,
0.2747659981250763,
-2.955030918121338,
0.7052305936813354,
-0.07684116065502167,
-0.20870503783226013,
-0.04820173606276512,
-1.3383209705352783,
1.168674111366272,
2.5061962604522705,
-1.1721628904342651,
0.4805121421813965,
0.39222273230552673,
1.3154133558273315,
-1.573409080505371,
0.31511732935905457,
-0.41969186067581177,
2.1645545959472656,
0.1893717646598816,
1.2172163724899292,
-0.5472822189331055,
-2.3440074920654297,
0.6126192212104797,
-1.1963428258895874,
-1.0738943815231323,
0.6542149782180786,
-0.8619152307510376,
0.18029260635375977,
-1.554490566253662,
-0.19619035720825195,
-1.0138580799102783,
-1.2497923374176025,
0.7825199961662292,
0.16858571767807007,
0.3747829794883728,
-0.6334589123725891,
0.3581939935684204,
-2.125619649887085,
-1.4260647296905518,
-0.27403125166893005,
-0.9356708526611328,
0.5979069471359253,
-0.3597795367240906,
0.717760443687439,
-0.1319728046655655,
0.10539652407169342,
0.25234365463256836,
1.5948745012283325,
3.311148166656494,
0.26257026195526123,
0.48181161284446716,
-0.08323213458061218,
-0.8740608096122742,
1.3819808959960938,
1.0042849779129028,
-0.059558212757110596,
-0.5089187622070312,
-1.0746210813522339,
1.3460832834243774,
2.0063083171844482,
0.9762886762619019,
0.08882888406515121,
-0.7505110502243042,
-0.6647995114326477,
-0.04123247414827347,
0.23160496354103088,
0.49489232897758484,
0.9057433009147644,
0.007402580231428146,
0.15554913878440857,
1.3618024587631226,
1.2601559162139893,
-0.4727115333080292,
0.3742714822292328,
-0.8839102387428284,
-0.3980816900730133,
0.5123871564865112,
0.18037199974060059,
-0.01990680769085884,
0.36661428213119507,
-1.015107274055481,
-0.25378885865211487,
-0.2530718445777893,
-0.9537948369979858,
-0.7214503884315491,
-0.4552552402019501,
-0.38573262095451355,
1.6378949880599976,
0.15561985969543457,
-0.5366111993789673,
-0.0009720902889966965,
-0.7196062207221985,
-0.07375825941562653,
-1.0878328084945679,
0.16886842250823975,
-0.10279621928930283,
-0.10891888290643692,
-0.10400372743606567,
1.8247140645980835,
-0.8913367986679077,
-2.1001641750335693,
0.1387062966823578,
0.42512673139572144,
-0.4183233976364136,
0.14335504174232483,
1.6528332233428955,
0.4941599667072296,
1.4683396816253662,
1.3616176843643188,
0.9768475890159607,
-0.5888293981552124,
-1.3022209405899048,
0.6044764518737793,
0.904513955116272,
-1.2631210088729858,
0.8414061665534973,
0.02024831995368004,
-0.4892944395542145,
0.7413355112075806,
1.3921035528182983,
0.3741878867149353,
-1.9979420900344849,
0.769906759262085,
-0.9564194083213806,
0.7775031328201294,
0.7491766810417175,
0.7484602928161621,
0.3040083646774292,
0.9231919050216675,
-1.2649413347244263,
-1.1607179641723633,
-0.8532244563102722,
-0.5777032375335693,
1.9515106678009033,
-0.27440106868743896,
0.5032772421836853,
-0.07349134236574173,
-1.2155317068099976,
-0.07472158223390579,
0.7699539661407471,
0.43850383162498474,
-0.27815571427345276,
0.8295230865478516,
-0.7362350225448608,
-1.0605854988098145,
-1.3938796520233154,
-0.4698987603187561,
-0.8608699440956116,
-0.9349948763847351,
0.9905881285667419,
0.901997983455658,
0.3187124729156494,
1.8675867319107056,
0.6902529001235962,
0.23735305666923523,
-2.5791401863098145,
0.9426866769790649,
0.24821466207504272,
-0.053567156195640564,
0.8634796142578125,
0.29521122574806213,
1.1375677585601807,
0.08772893249988556,
0.5431793332099915,
-2.4464781284332275,
2.2291994094848633,
-0.27693307399749756,
0.7015858888626099,
-0.08136998862028122,
-0.12811651825904846,
1.2157047986984253,
0.5265108942985535,
0.5015355944633484,
-1.07649827003479,
0.7378131747245789,
-0.5843788981437683,
1.219113826751709,
0.9531764984130859,
-0.7999725937843323,
0.11658624559640884,
1.3665472269058228,
0.45417678356170654,
-0.5953707098960876,
-0.9879556894302368,
-0.8680968284606934,
0.9155807495117188,
1.7515090703964233,
-0.0812016949057579,
-0.052924539893865585,
0.858676552772522,
0.658663272857666,
-1.2256919145584106,
0.14193308353424072,
-0.6450673937797546,
-0.7545132637023926,
1.65972101688385,
2.0877838134765625,
-0.14156904816627502,
-0.13600435853004456,
-0.652031421661377,
-1.2299898862838745,
0.6467500925064087,
0.06847076863050461,
0.03334750235080719,
0.7538814544677734,
-0.6810112595558167,
1.0952627658843994,
0.7670729160308838,
0.9056416749954224,
0.07699324190616608,
0.40826472640037537,
0.4069676697254181,
-0.3993067741394043,
-1.1567761898040771,
-0.3553115427494049,
-1.2388672828674316,
-2.517765998840332,
0.3675349950790405,
-0.2874210774898529,
-1.4213511943817139,
0.07300671190023422,
-1.0360602140426636,
0.9732546806335449,
-0.62602299451828,
-1.2398598194122314,
-1.473590612411499,
0.18764781951904297,
-0.055060870945453644,
0.8112717866897583,
-1.6449726819992065,
-0.14774838089942932,
1.23435640335083,
0.8930407166481018,
-0.5762768983840942,
1.0208256244659424,
0.259157657623291,
1.0651934146881104,
0.7845722436904907,
-0.46886906027793884,
0.5089964866638184,
-0.023081369698047638,
-1.3213613033294678,
0.5131242275238037,
1.2277758121490479,
0.20502635836601257,
1.4022951126098633,
-0.44985464215278625,
-0.006918621249496937,
0.5037245154380798,
-0.5870965123176575,
-0.5177698731422424,
-0.4815717339515686,
0.6886558532714844,
0.14452147483825684,
-0.9143292903900146,
0.0355902761220932,
-0.026605604216456413,
-0.23282870650291443,
0.2116999626159668,
-1.4761871099472046,
-0.26263535022735596,
-0.43438830971717834,
-0.5054560303688049,
-1.2618205547332764,
-0.027174891903996468,
1.2809531688690186,
-0.7431606650352478,
-0.29488348960876465,
0.5381008982658386,
0.38750630617141724,
0.5912761092185974,
0.6048425436019897,
-0.735526442527771,
-0.39410486817359924,
-0.312401682138443,
-0.2399715781211853,
0.25486019253730774,
1.1682918071746826,
-0.15070956945419312,
-1.0286355018615723,
0.6336302161216736,
-0.339945524930954,
0.052474476397037506,
1.820870280265808,
-0.018606433644890785,
-0.8107579946517944,
0.3654027283191681,
-0.7090818881988525,
1.8950084447860718,
1.5878738164901733,
1.257973313331604,
-0.1324971467256546,
-0.8623215556144714,
0.5693662166595459,
-0.31034162640571594,
-0.43364185094833374,
0.8598703742027283,
0.4462674856185913,
-0.18756049871444702,
-1.3911492824554443,
0.620337188243866,
1.2472589015960693,
-0.8358967304229736,
-0.7774783968925476,
0.14260947704315186,
-0.8816897869110107,
1.1307648420333862,
0.6093659996986389,
0.4018978476524353,
0.25267282128334045,
1.7693778276443481,
0.7507414817810059,
-0.5080623030662537,
0.5713042616844177,
0.52761310338974,
-0.24679648876190186,
-2.1026968955993652,
-1.170025110244751,
0.19643419981002808,
-0.3795795142650604,
-1.524294376373291,
1.3749332427978516,
-1.1119773387908936,
-0.8651461005210876,
0.6072465181350708,
0.21635621786117554,
1.378147006034851,
0.3386463224887848,
1.6223628520965576,
2.0764691829681396,
0.7892670631408691,
0.4088450074195862,
1.2752394676208496,
-0.12900933623313904,
-0.6083004474639893,
1.9009923934936523,
-0.38102784752845764,
0.512730062007904,
1.067043662071228,
-0.368073433637619,
-1.1247669458389282,
-0.743888258934021,
-1.2098292112350464,
-0.6169759035110474,
1.0636671781539917,
0.1358693540096283,
-1.1626596450805664,
0.15082761645317078,
1.5504236221313477,
0.12217853218317032,
-0.37856581807136536,
0.5490479469299316,
0.43947094678878784,
-0.7547000646591187,
-0.057946983724832535,
-1.0262068510055542,
0.5060995221138,
-0.16763952374458313,
-0.2136422097682953,
0.22912812232971191,
0.5115522146224976,
1.273323893547058,
-0.0901411920785904,
0.14091753959655762,
1.1620951890945435,
-1.4145736694335938,
1.467215895652771,
-0.6907422542572021,
0.3074205219745636,
-2.4542815685272217,
1.3619635105133057,
-0.7441856861114502,
2.0063986778259277,
-2.5492725372314453,
0.38964593410491943,
-0.7080022692680359,
-0.472589910030365,
0.3501129746437073,
-0.39393749833106995,
0.11955863982439041,
-0.07871751487255096,
-1.0966802835464478,
0.026421990245580673,
-0.7942519783973694,
0.5171351432800293,
1.2224200963974,
1.3458006381988525,
-1.1113265752792358,
-0.22516003251075745,
-1.6655149459838867,
-0.10758233815431595,
-0.7511889338493347,
0.3735068142414093,
-2.050386667251587,
-0.1126691997051239,
-1.9576581716537476,
-2.141785144805908,
-1.4236825704574585,
-0.8572953343391418,
1.0325382947921753,
0.08378174155950546,
-0.9564748406410217,
1.1749839782714844,
-0.2694106101989746,
-1.695200800895691,
1.047301173210144,
-2.1209824085235596
] |
https://github.com/huggingface/datasets/issues/3425 | Getting configs names takes too long | It looks like it's currently calling `HfFileSystem.ls()` ~8 times at the root and for each subdirectory:
- ""
- "en.noblocklist"
- "en.noclean"
- "en"
- "multilingual"
- "realnewslike"
Currently `ls` is slow because it iterates on all the files inside the repository.
An easy optimization would be to cache the result of each call to `ls`.
We can also optimize `ls` by using a tree structure per directory instead of a list of all the files.
|
## Steps to reproduce the bug
```python
from datasets import get_dataset_config_names
get_dataset_config_names("allenai/c4")
```
## Expected results
I would expect to get the answer quickly, at least in less than 10s
## Actual results
It takes about 45s on my environment
## Environment info
- `datasets` version: 1.16.1
- Platform: Linux-5.11.0-1022-aws-x86_64-with-glibc2.31
- Python version: 3.9.6
- PyArrow version: 4.0.1 | 1,056 | 76 | Getting configs names takes too long
## Steps to reproduce the bug
```python
from datasets import get_dataset_config_names
get_dataset_config_names("allenai/c4")
```
## Expected results
I would expect to get the answer quickly, at least in less than 10s
## Actual results
It takes about 45s on my environment
## Environment info
- `datasets` version: 1.16.1
- Platform: Linux-5.11.0-1022-aws-x86_64-with-glibc2.31
- Python version: 3.9.6
- PyArrow version: 4.0.1
It looks like it's currently calling `HfFileSystem.ls()` ~8 times at the root and for each subdirectory:
- ""
- "en.noblocklist"
- "en.noclean"
- "en"
- "multilingual"
- "realnewslike"
Currently `ls` is slow because it iterates on all the files inside the repository.
An easy optimization would be to cache the result of each call to `ls`.
We can also optimize `ls` by using a tree structure per directory instead of a list of all the files.
| [
-1.1646945476531982,
-0.8112624287605286,
-0.827190101146698,
1.449440598487854,
-0.13085152208805084,
-1.2656939029693604,
0.12187100946903229,
-1.1145333051681519,
1.7491620779037476,
-0.9064728617668152,
0.35007262229919434,
-1.6142659187316895,
0.05056920275092125,
-0.5789403319358826,
-0.8216987252235413,
-0.8438573479652405,
-0.37165379524230957,
-0.7036625146865845,
1.0512903928756714,
2.496204137802124,
1.1812903881072998,
-1.3088748455047607,
2.6952028274536133,
0.6873101592063904,
-0.1416625827550888,
-0.8497112393379211,
0.4891591966152191,
0.013654335401952267,
-1.3592852354049683,
-0.4015355408191681,
-0.898860514163971,
-0.11469453573226929,
-0.5651702880859375,
-0.594741702079773,
0.029428936541080475,
0.39474913477897644,
-0.31501585245132446,
-0.4796900153160095,
-0.528955340385437,
-0.8503455519676208,
0.4079227149486542,
-0.33915889263153076,
0.9989944100379944,
-0.5011735558509827,
1.8330819606781006,
-0.5805683135986328,
0.457638144493103,
0.7111383676528931,
1.290877103805542,
0.28044259548187256,
0.01397103164345026,
0.25564664602279663,
0.3856157958507538,
-0.018385369330644608,
0.5345121622085571,
1.1217929124832153,
0.6265630722045898,
0.5469670295715332,
0.7826659679412842,
-2.138010025024414,
1.3616806268692017,
-1.0537869930267334,
0.20211617648601532,
1.3370486497879028,
-0.9176875948905945,
0.3467745780944824,
-1.7645530700683594,
-0.048783883452415466,
0.5553380250930786,
-2.241873264312744,
0.27337750792503357,
-1.281197428703308,
-0.523488461971283,
1.0640071630477905,
0.3179996609687805,
-1.2438209056854248,
-0.006416790187358856,
-0.42220449447631836,
0.8998864889144897,
0.4646133780479431,
1.1818938255310059,
-1.6932899951934814,
-0.013006774708628654,
-0.3412729799747467,
0.08961915224790573,
-1.328377366065979,
-1.5097501277923584,
0.5456676483154297,
0.6353947520256042,
0.5276244878768921,
-0.06264114379882812,
0.9710184335708618,
-0.959824800491333,
0.8011571168899536,
-0.9686235785484314,
-1.7440892457962036,
-1.4252973794937134,
-2.2904410362243652,
-2.2746005058288574,
0.7683186531066895,
-0.42767730355262756,
-0.5437901020050049,
2.0592377185821533,
-1.0059247016906738,
-1.7992247343063354,
1.066808819770813,
0.2822778820991516,
0.013359093107283115,
2.3579201698303223,
0.22955869138240814,
-0.6945044994354248,
0.4733982980251312,
-0.7321469187736511,
0.6994136571884155,
-0.5078087449073792,
1.2641664743423462,
0.410735547542572,
-1.0194621086120605,
1.588287591934204,
-0.47858357429504395,
0.5912959575653076,
-0.6620398759841919,
-0.45013856887817383,
-0.7009897828102112,
0.33241021633148193,
1.9048402309417725,
-0.2697999179363251,
1.583492398262024,
-0.2779739499092102,
-1.5587881803512573,
-1.5732598304748535,
0.8288715481758118,
0.4615401327610016,
-0.700432538986206,
0.11964303255081177,
-0.29332926869392395,
0.10899869352579117,
-0.15251529216766357,
1.1361675262451172,
1.2154186964035034,
0.854516327381134,
-0.29791349172592163,
-0.8628441691398621,
0.224955216050148,
0.04163089394569397,
-0.8078482747077942,
-1.7260459661483765,
-0.3145503103733063,
0.11787088215351105,
0.612840473651886,
-1.3039734363555908,
1.828192949295044,
0.8936323523521423,
1.9162554740905762,
0.9966931939125061,
-0.2405296117067337,
1.5438944101333618,
0.09495899081230164,
1.909913420677185,
-0.3843965530395508,
0.6939738988876343,
-0.35086727142333984,
-1.158550500869751,
0.7730705142021179,
-0.3757230043411255,
-2.0275115966796875,
-0.7206089496612549,
-0.9389795660972595,
-0.10901037603616714,
-0.7974480390548706,
0.9243062138557434,
-0.22923952341079712,
-1.357192873954773,
0.20414146780967712,
-0.7429619431495667,
0.041785262525081635,
-1.265953779220581,
0.38278496265411377,
0.7276224493980408,
-0.667538583278656,
0.12786398828029633,
-0.2547430694103241,
-1.3438949584960938,
-0.45758360624313354,
0.2830280363559723,
1.9397026300430298,
-0.8396109938621521,
0.9297935962677002,
0.9970393776893616,
-0.7285292744636536,
-0.0645260214805603,
0.3938508629798889,
-0.39575737714767456,
0.863314151763916,
-1.1195409297943115,
-0.38325953483581543,
1.2316606044769287,
-0.2096252590417862,
-0.572689414024353,
1.465263843536377,
0.6646586060523987,
-1.019576072692871,
-0.21503658592700958,
-0.0977570191025734,
-0.7879287600517273,
-0.0011582477018237114,
-1.5573089122772217,
-0.0904076024889946,
0.28188735246658325,
-1.503106951713562,
-0.5368432998657227,
-0.08660362660884857,
1.2722020149230957,
-0.19212378561496735,
1.3923817873001099,
-0.3219188153743744,
-0.19392605125904083,
-0.42068785429000854,
-0.4169112741947174,
0.10200571268796921,
-0.1744196116924286,
-0.625039279460907,
0.27037569880485535,
-0.742738664150238,
0.24930702149868011,
1.4348517656326294,
0.35554417967796326,
-0.0008252216503024101,
0.5955164432525635,
1.1105303764343262,
0.3620305061340332,
-0.027018830180168152,
-0.8935267329216003,
-1.5516679286956787,
2.057201385498047,
-1.4684937000274658,
2.0379748344421387,
0.7620587944984436,
-0.08553554862737656,
-1.7033109664916992,
-1.9496735334396362,
1.396394968032837,
1.0989458560943604,
2.315126419067383,
0.5853645205497742,
0.38854363560676575,
-0.820149302482605,
-0.688285231590271,
0.41742658615112305,
-1.015817403793335,
-0.7412431240081787,
0.11632397770881653,
2.3534491062164307,
1.7018868923187256,
-0.42286545038223267,
-0.16444888710975647,
-0.980455219745636,
1.4498883485794067,
-0.1660066694021225,
0.2530575692653656,
1.938461422920227,
-0.28558820486068726,
-1.0321377515792847,
1.2396425008773804,
-2.293788194656372,
0.23404081165790558,
1.9745475053787231,
0.2786075472831726,
0.05168021470308304,
-1.3586500883102417,
-0.7386735677719116,
-0.2401685118675232,
-0.3730514943599701,
-1.1165997982025146,
0.5697342157363892,
-0.19415025413036346,
-0.7279307842254639,
-1.4378254413604736,
0.21756286919116974,
-1.10652756690979,
-1.6859333515167236,
0.26467302441596985,
1.8370287418365479,
2.0314416885375977,
-0.7682065963745117,
1.4823318719863892,
-0.2858598232269287,
0.13744743168354034,
1.273870587348938,
1.234457015991211,
3.2410826683044434,
1.8754262924194336,
-1.2707910537719727,
0.6182750463485718,
-0.047323379665613174,
-0.44695815443992615,
1.1721296310424805,
-1.1623406410217285,
1.2931848764419556,
-0.13180780410766602,
-1.102034330368042,
-1.287973403930664,
0.8422031402587891,
0.43880611658096313,
0.0208282507956028,
-0.44507861137390137,
1.166448712348938,
0.0724126473069191,
1.3879998922348022,
0.5720291137695312,
-0.3160305917263031,
0.6651498079299927,
-0.33159521222114563,
-0.42365309596061707,
1.5471299886703491,
0.21305514872074127,
-1.438902497291565,
-2.2812275886535645,
-0.17980994284152985,
-0.8921493291854858,
0.006143788807094097,
-0.6269761919975281,
-0.992091953754425,
1.7451797723770142,
0.4963989555835724,
-1.1508042812347412,
-0.3010011315345764,
-0.3804771602153778,
-0.6970012784004211,
2.7926108837127686,
-1.5096591711044312,
-0.19818158447742462,
-1.0115491151809692,
-0.5915895700454712,
1.6601065397262573,
-1.2465485334396362,
-0.2094554603099823,
-1.0434399843215942,
-0.5334979891777039,
-1.3532161712646484,
-0.5916916728019714,
-0.04074036702513695,
-0.9062637686729431,
0.8807640075683594,
0.194907084107399,
-1.187339186668396,
-0.36114656925201416,
-0.9525389075279236,
0.78296959400177,
-0.09068047255277634,
0.19567491114139557,
1.8489410877227783,
0.3949160873889923,
-0.36060938239097595,
0.7147334218025208,
1.1969413757324219,
0.6967339515686035,
-0.6098083257675171,
0.3141646683216095,
-0.6482753753662109,
0.38530945777893066,
-1.2803902626037598,
0.3221001923084259,
-2.9138708114624023,
0.5685031414031982,
-0.12713642418384552,
-0.11470603197813034,
-0.0935123935341835,
-1.3314827680587769,
1.102542757987976,
2.526844024658203,
-1.1310756206512451,
0.506900429725647,
0.25064024329185486,
1.124891757965088,
-1.6679909229278564,
0.26422014832496643,
-0.4240407645702362,
2.076889991760254,
0.13419438898563385,
1.2312322854995728,
-0.46888288855552673,
-2.29302716255188,
0.717093288898468,
-1.352197289466858,
-1.1983000040054321,
0.8398236632347107,
-0.8589984178543091,
0.0722656399011612,
-1.3356369733810425,
-0.18065541982650757,
-0.8160869479179382,
-1.2384246587753296,
0.7005777955055237,
0.07956133782863617,
0.498688668012619,
-0.5334948897361755,
0.37779033184051514,
-2.242777109146118,
-1.3234705924987793,
-0.3088700771331787,
-0.9349417090415955,
0.43498140573501587,
-0.39057210087776184,
0.7519688606262207,
-0.2251989096403122,
0.02819027006626129,
0.47252583503723145,
1.4029278755187988,
3.355388879776001,
0.1776340901851654,
0.4230809509754181,
-0.24819466471672058,
-0.9832979440689087,
1.4619845151901245,
0.9155511260032654,
-0.17606841027736664,
-0.511215329170227,
-1.0696117877960205,
1.2620481252670288,
1.9168590307235718,
1.0329149961471558,
-0.04575854912400246,
-0.8145297765731812,
-0.6986977458000183,
-0.05884036049246788,
0.12605464458465576,
0.400296688079834,
0.9189574718475342,
0.1471405327320099,
0.11655290424823761,
1.460015892982483,
1.2076019048690796,
-0.3607785701751709,
0.3327708840370178,
-0.7426342368125916,
-0.42288902401924133,
0.618069052696228,
0.40499237179756165,
-0.07439304888248444,
0.2657010853290558,
-0.9766031503677368,
-0.2817109525203705,
-0.37259042263031006,
-0.8769749402999878,
-0.693689227104187,
-0.455194890499115,
-0.3550759255886078,
1.7228528261184692,
0.07326769083738327,
-0.552552342414856,
-0.09481847286224365,
-0.8889671564102173,
-0.029159173369407654,
-1.0699710845947266,
0.2980964779853821,
-0.1320706158876419,
-0.1581946760416031,
-0.08664693683385849,
1.7599276304244995,
-0.9806330800056458,
-2.046754837036133,
0.22047707438468933,
0.1934785395860672,
-0.37701207399368286,
0.14545856416225433,
1.640551209449768,
0.5727826356887817,
1.4359560012817383,
1.3771103620529175,
0.9438348412513733,
-0.7645213007926941,
-1.3059123754501343,
0.5640078186988831,
0.9758400917053223,
-1.513787031173706,
0.8000881671905518,
-0.03451482951641083,
-0.5280410647392273,
0.5463218688964844,
1.2116762399673462,
0.46900540590286255,
-1.8682894706726074,
0.7475889325141907,
-0.9171960949897766,
0.799476683139801,
0.6771181225776672,
0.7674393653869629,
0.14031235873699188,
0.7422277927398682,
-1.1875511407852173,
-1.0802996158599854,
-0.6955719590187073,
-0.6283994317054749,
1.8610607385635376,
-0.33548012375831604,
0.5594159960746765,
-0.22158274054527283,
-1.3236140012741089,
-0.0391010046005249,
0.6038413047790527,
0.3123384118080139,
-0.3533600866794586,
0.7489946484565735,
-0.6951637864112854,
-1.1565698385238647,
-1.4080144166946411,
-0.46220871806144714,
-1.05116605758667,
-0.9409992098808289,
1.083094596862793,
0.8302063941955566,
0.37392812967300415,
1.935672640800476,
0.7081143260002136,
0.2719392776489258,
-2.604304790496826,
0.8617400527000427,
0.3321525454521179,
-0.03446126729249954,
0.8378614783287048,
0.3116535246372223,
1.0435662269592285,
-0.14529791474342346,
0.5436052083969116,
-2.4203429222106934,
2.3730969429016113,
-0.253450870513916,
0.7047863602638245,
0.018009629100561142,
-0.166565403342247,
1.1197357177734375,
0.6167136430740356,
0.5442501306533813,
-1.1728352308273315,
0.6754588484764099,
-0.6171842217445374,
1.2699940204620361,
0.9271879196166992,
-0.8084273934364319,
-0.018934151157736778,
1.3067337274551392,
0.4670485556125641,
-0.5545709133148193,
-0.9988174438476562,
-0.9909894466400146,
0.9685384631156921,
1.7091715335845947,
0.01989683136343956,
0.03314260393381119,
0.8462300896644592,
0.6271539330482483,
-1.2683947086334229,
0.07887512445449829,
-0.7675292491912842,
-0.8040164709091187,
1.6789957284927368,
2.0230391025543213,
-0.053936541080474854,
-0.22141437232494354,
-0.7234424948692322,
-1.2883338928222656,
0.8259080648422241,
0.10977538675069809,
0.0733746737241745,
0.6024611592292786,
-0.6156688928604126,
1.120722770690918,
0.9743374586105347,
0.9047834277153015,
0.15868216753005981,
0.2703875005245209,
0.2852330207824707,
-0.2958684265613556,
-1.2268707752227783,
-0.19673745334148407,
-1.0029189586639404,
-2.5899581909179688,
0.5168691277503967,
-0.2552225887775421,
-1.416877031326294,
-0.08169367909431458,
-1.0300509929656982,
0.8598829507827759,
-0.5009289383888245,
-1.1100093126296997,
-1.4663480520248413,
0.11580254137516022,
-0.03859963268041611,
0.8439465761184692,
-1.5106589794158936,
-0.1584300994873047,
1.2811157703399658,
0.976452112197876,
-0.7252945899963379,
0.957616925239563,
0.14462527632713318,
1.0604772567749023,
0.860005259513855,
-0.3605367839336395,
0.479491263628006,
0.10695389658212662,
-1.3751415014266968,
0.4415143132209778,
1.2674897909164429,
0.156419038772583,
1.5419390201568604,
-0.5918483734130859,
0.1578906923532486,
0.4061830937862396,
-0.43384847044944763,
-0.4403051733970642,
-0.7138522267341614,
0.7547725439071655,
-0.034291598945856094,
-0.8188467025756836,
0.012635543011128902,
-0.09300192445516586,
-0.15465012192726135,
0.1284618079662323,
-1.508680820465088,
-0.10329444706439972,
-0.3184286653995514,
-0.6519452929496765,
-1.1962051391601562,
-0.07678060233592987,
1.2985297441482544,
-0.815331757068634,
-0.14783082902431488,
0.4781896471977234,
0.27554818987846375,
0.538563072681427,
0.5962885022163391,
-0.6986562609672546,
-0.3674548268318176,
-0.22954341769218445,
-0.3153996169567108,
0.36987146735191345,
1.3710167407989502,
-0.05747045949101448,
-0.9695311188697815,
0.6288892030715942,
-0.30444759130477905,
0.08423200994729996,
1.9376171827316284,
0.10718657821416855,
-0.7759402990341187,
0.31273841857910156,
-0.6973991990089417,
1.9878919124603271,
1.7024956941604614,
1.3316305875778198,
-0.09860984236001968,
-1.0366923809051514,
0.6728911399841309,
-0.3556065559387207,
-0.42881855368614197,
0.86898273229599,
0.4173557162284851,
-0.2558839023113251,
-1.4075084924697876,
0.6453030109405518,
1.1914739608764648,
-0.865431547164917,
-0.8128644227981567,
0.13146492838859558,
-0.8354511857032776,
0.9989106059074402,
0.6946709752082825,
0.4059370756149292,
0.33092910051345825,
1.7078921794891357,
0.8056862354278564,
-0.551799476146698,
0.4951672852039337,
0.5060828924179077,
-0.11297035962343216,
-2.0189170837402344,
-1.0466984510421753,
0.38826870918273926,
-0.5336586833000183,
-1.5627542734146118,
1.4520788192749023,
-1.135086178779602,
-0.9124162793159485,
0.5976982712745667,
0.1462412029504776,
1.4378716945648193,
0.37046679854393005,
1.630240559577942,
1.9995540380477905,
0.8842659592628479,
0.36923786997795105,
1.2241606712341309,
-0.2540379762649536,
-0.38173943758010864,
1.7278729677200317,
-0.4848654866218567,
0.5074527859687805,
1.091037392616272,
-0.412551611661911,
-1.141601800918579,
-0.8110861778259277,
-1.2561845779418945,
-0.7495574355125427,
1.1670420169830322,
0.12590794265270233,
-1.1166315078735352,
0.22526997327804565,
1.6284942626953125,
0.03733920305967331,
-0.27064380049705505,
0.6651857495307922,
0.3817436695098877,
-0.7600748538970947,
-0.07270664721727371,
-1.01213800907135,
0.5533623099327087,
-0.19446998834609985,
-0.4185684621334076,
0.3250243663787842,
0.4559202194213867,
1.3363115787506104,
0.009852352552115917,
0.13462819159030914,
1.2610743045806885,
-1.4042394161224365,
1.4585628509521484,
-0.8130385279655457,
0.19220764935016632,
-2.340059518814087,
1.4682270288467407,
-0.8610904812812805,
1.8862122297286987,
-2.6282169818878174,
0.3809625506401062,
-0.5519300699234009,
-0.42982304096221924,
0.2698213756084442,
-0.3600272834300995,
0.19209536910057068,
-0.10175548493862152,
-1.1654014587402344,
-0.09293953329324722,
-0.7055376768112183,
0.6068954467773438,
1.1296412944793701,
1.368098497390747,
-1.088322401046753,
-0.33690494298934937,
-1.6692593097686768,
-0.15618133544921875,
-0.6863654851913452,
0.34314849972724915,
-1.856774926185608,
-0.16390152275562286,
-1.9352011680603027,
-2.3484084606170654,
-1.3710741996765137,
-0.7567821145057678,
1.1298383474349976,
0.057190969586372375,
-0.848200261592865,
1.1163673400878906,
-0.4033534526824951,
-1.859747290611267,
1.1428112983703613,
-2.1878585815429688
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | Hi ! Thanks for reporting :)
When using a PyTorch's data loader with `num_workers>1` and an iterable dataset, each worker streams the exact same data by default, resulting in duplicate data when iterating using the data loader.
We can probably fix this in `datasets` by checking `torch.utils.data.get_worker_info()` which gives the worker id if it happens. | ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 55 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
Hi ! Thanks for reporting :)
When using a PyTorch's data loader with `num_workers>1` and an iterable dataset, each worker streams the exact same data by default, resulting in duplicate data when iterating using the data loader.
We can probably fix this in `datasets` by checking `torch.utils.data.get_worker_info()` which gives the worker id if it happens. | [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | > Hi ! Thanks for reporting :)
>
> When using a PyTorch's data loader with `num_workers>1` and an iterable dataset, each worker streams the exact same data by default, resulting in duplicate data when iterating using the data loader.
>
> We can probably fix this in `datasets` by checking `torch.utils.data.get_worker_info()` which gives the worker id if it happens.
Hi ! Thanks for reply
Do u have some plans to fix the problem?
| ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 74 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
> Hi ! Thanks for reporting :)
>
> When using a PyTorch's data loader with `num_workers>1` and an iterable dataset, each worker streams the exact same data by default, resulting in duplicate data when iterating using the data loader.
>
> We can probably fix this in `datasets` by checking `torch.utils.data.get_worker_info()` which gives the worker id if it happens.
Hi ! Thanks for reply
Do u have some plans to fix the problem?
| [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | Isn’t that somehow a bug on PyTorch side? (Just asking because this behavior seems quite general and maybe not what would be intended) | ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 23 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
Isn’t that somehow a bug on PyTorch side? (Just asking because this behavior seems quite general and maybe not what would be intended) | [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | From PyTorch's documentation [here](https://pytorch.org/docs/stable/data.html#dataset-types):
> When using an IterableDataset with multi-process data loading. The same dataset object is replicated on each worker process, and thus the replicas must be configured differently to avoid duplicated data. See [IterableDataset](https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset) documentations for how to achieve this.
It looks like an intended behavior from PyTorch
As suggested in the [docstring of the IterableDataset class](https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset), we could pass a `worker_init_fn` to the DataLoader to fix this. It could be called `streaming_worker_init_fn` for example.
However, while this solution works, I'm worried that many users simply don't know about this parameter and just start their training with duplicate data without knowing it. That's why I'm more in favor of integrating the check on the worker id directly in `datasets` in our implementation of `IterableDataset.__iter__`. | ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 127 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
From PyTorch's documentation [here](https://pytorch.org/docs/stable/data.html#dataset-types):
> When using an IterableDataset with multi-process data loading. The same dataset object is replicated on each worker process, and thus the replicas must be configured differently to avoid duplicated data. See [IterableDataset](https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset) documentations for how to achieve this.
It looks like an intended behavior from PyTorch
As suggested in the [docstring of the IterableDataset class](https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset), we could pass a `worker_init_fn` to the DataLoader to fix this. It could be called `streaming_worker_init_fn` for example.
However, while this solution works, I'm worried that many users simply don't know about this parameter and just start their training with duplicate data without knowing it. That's why I'm more in favor of integrating the check on the worker id directly in `datasets` in our implementation of `IterableDataset.__iter__`. | [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | Hi there @lhoestq @cloudyuyuyu
I met that problem recently, and #4375 is really useful because I finally found out I am training with duplicate data.
However, in multi-GPU training, I'm using DDP mode and IterableDataset, which still yields duplicate data for each progress. And this is dangerous because users maybe not realize this behavior. | ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 54 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
Hi there @lhoestq @cloudyuyuyu
I met that problem recently, and #4375 is really useful because I finally found out I am training with duplicate data.
However, in multi-GPU training, I'm using DDP mode and IterableDataset, which still yields duplicate data for each progress. And this is dangerous because users maybe not realize this behavior. | [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | If the worker_info.id is unique per process it should work fine, could you check that they're unique ?
The code to get the worker_info in each worker is `torch.utils.data.get_worker_info()` | ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 29 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
If the worker_info.id is unique per process it should work fine, could you check that they're unique ?
The code to get the worker_info in each worker is `torch.utils.data.get_worker_info()` | [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | test.py
```python
import json
import os
import torch
from torch.utils.data import IterableDataset, DataLoader
from transformers import PreTrainedTokenizer, TrainingArguments
from common.arguments import DataTrainingArguments, ModelArguments
class MyIterableDataset(IterableDataset):
def __iter__(self):
worker_info = torch.utils.data.get_worker_info()
print(worker_info)
return iter(range(3))
if __name__ == '__main__':
dataset = MyIterableDataset()
dataloader = DataLoader(dataset, num_workers=1)
for i in dataloader:
print(i)
```
```sh
$ python3 -m torch.distributed.launch \
--nproc_per_node=2 test.py
WorkerInfo(id=0, num_workers=1, seed=5545685212307804959, dataset=<__main__.MyIterableDataset object at 0x7f92648cf6a0>)
WorkerInfo(id=0, num_workers=1, seed=3174108029709729025, dataset=<__main__.MyIterableDataset object at 0x7f19ab961670>)
tensor([0])
tensor([1])
tensor([2])
tensor([0])
tensor([1])
tensor([2])
```
@lhoestq they are not unique | ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 84 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
test.py
```python
import json
import os
import torch
from torch.utils.data import IterableDataset, DataLoader
from transformers import PreTrainedTokenizer, TrainingArguments
from common.arguments import DataTrainingArguments, ModelArguments
class MyIterableDataset(IterableDataset):
def __iter__(self):
worker_info = torch.utils.data.get_worker_info()
print(worker_info)
return iter(range(3))
if __name__ == '__main__':
dataset = MyIterableDataset()
dataloader = DataLoader(dataset, num_workers=1)
for i in dataloader:
print(i)
```
```sh
$ python3 -m torch.distributed.launch \
--nproc_per_node=2 test.py
WorkerInfo(id=0, num_workers=1, seed=5545685212307804959, dataset=<__main__.MyIterableDataset object at 0x7f92648cf6a0>)
WorkerInfo(id=0, num_workers=1, seed=3174108029709729025, dataset=<__main__.MyIterableDataset object at 0x7f19ab961670>)
tensor([0])
tensor([1])
tensor([2])
tensor([0])
tensor([1])
tensor([2])
```
@lhoestq they are not unique | [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | It looks like a bug from pytorch no ? How can we know which data should go in which process when using DDP ?
I guess we need to check `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` as well. Not fan of the design here tbh, but that's how it is | ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 47 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
It looks like a bug from pytorch no ? How can we know which data should go in which process when using DDP ?
I guess we need to check `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` as well. Not fan of the design here tbh, but that's how it is | [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | > It looks like a bug from pytorch no ? How can we know which data should go in which process when using DDP ?
>
> I guess we need to check `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` as well. Not fan of the design here tbh, but that's how it is
Maybe we should document it? | ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 55 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
> It looks like a bug from pytorch no ? How can we know which data should go in which process when using DDP ?
>
> I guess we need to check `torch.distributed.get_world_size()` and `torch.distributed.get_rank()` as well. Not fan of the design here tbh, but that's how it is
Maybe we should document it? | [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3423 | data duplicate when setting num_works > 1 with streaming data | hmm actually let me open a new issue on DDP - original post was for single node | ## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
| 1,057 | 17 | data duplicate when setting num_works > 1 with streaming data
## Describe the bug
The data is repeated num_works times when we load_dataset with streaming and set num_works > 1 when construct dataloader
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import pandas as pd
import numpy as np
import os
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm import tqdm
import shutil
NUM_OF_USER = 1000000
NUM_OF_ACTION = 50000
NUM_OF_SEQUENCE = 10000
NUM_OF_FILES = 32
NUM_OF_WORKERS = 16
if __name__ == "__main__":
shutil.rmtree("./dataset")
for i in range(NUM_OF_FILES):
sequence_data = pd.DataFrame(
{
"imei": np.random.randint(1, NUM_OF_USER, size=NUM_OF_SEQUENCE),
"sequence": np.random.randint(1, NUM_OF_ACTION, size=NUM_OF_SEQUENCE)
}
)
if not os.path.exists("./dataset"):
os.makedirs("./dataset")
sequence_data.to_csv(f"./dataset/sequence_data_{i}.csv",
index=False)
dataset = load_dataset("csv",
data_files=[os.path.join("./dataset",file) for file in os.listdir("./dataset") if file.endswith(".csv")],
split="train",
streaming=True).with_format("torch")
data_loader = DataLoader(dataset,
batch_size=1024,
num_workers=NUM_OF_WORKERS)
result = pd.DataFrame()
for i, batch in tqdm(enumerate(data_loader)):
result = pd.concat([result,
pd.DataFrame(batch)],
axis=0)
result.to_csv(f"num_work_{NUM_OF_WORKERS}.csv", index=False)
```
## Expected results
data do not duplicate
## Actual results
data duplicate NUM_OF_WORKERS = 16
![image](https://user-images.githubusercontent.com/16486492/145748707-9d2df25b-2f4f-4d7b-a83e-242be4fc8934.png)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:datasets==1.14.0
- Platform:transformers==4.11.3
- Python version:3.8
- PyArrow version:
hmm actually let me open a new issue on DDP - original post was for single node | [
-1.3504884243011475,
-1.011925458908081,
-0.5748721361160278,
1.5038915872573853,
-0.2050914466381073,
-1.1292259693145752,
0.21734878420829773,
-1.009335994720459,
1.4990720748901367,
-0.9021900296211243,
0.2625328302383423,
-1.6789026260375977,
0.023144036531448364,
-0.5312081575393677,
-0.6556284427642822,
-0.9282603859901428,
-0.45663508772850037,
-0.6487982869148254,
1.2004082202911377,
2.4020395278930664,
1.222909688949585,
-1.3871285915374756,
2.6918952465057373,
0.7262192964553833,
-0.14191921055316925,
-1.0412384271621704,
0.5448496341705322,
0.06972163915634155,
-1.1291594505310059,
-0.4037998914718628,
-0.9336948394775391,
-0.11019084602594376,
-0.49230095744132996,
-0.30765801668167114,
-0.03393634036183357,
0.4365668296813965,
-0.330005943775177,
-0.4037737250328064,
-0.6754322052001953,
-0.7433245778083801,
0.49194616079330444,
-0.37289419770240784,
0.8084220290184021,
-0.3528572916984558,
1.7975605726242065,
-0.6499359011650085,
0.5705387592315674,
0.7772560715675354,
1.239706039428711,
0.20960183441638947,
0.03674747049808502,
0.38630685210227966,
0.3782394528388977,
0.008801691234111786,
0.5821170806884766,
1.2795801162719727,
0.6160849928855896,
0.4828290045261383,
0.6607640981674194,
-2.221928119659424,
1.2816931009292603,
-1.0201706886291504,
0.28365692496299744,
1.4151413440704346,
-0.9811323285102844,
0.4147409498691559,
-1.6775246858596802,
-0.13261692225933075,
0.6125007271766663,
-2.2290422916412354,
0.34483879804611206,
-1.3846970796585083,
-0.51795893907547,
0.9659878611564636,
0.5067366361618042,
-1.104234218597412,
0.05994023382663727,
-0.49563902616500854,
1.1000006198883057,
0.3827000558376312,
0.9602571129798889,
-1.6109496355056763,
-0.08428215235471725,
-0.21803374588489532,
0.09442824125289917,
-1.3760157823562622,
-1.5875142812728882,
0.5331569910049438,
0.6709456443786621,
0.576459527015686,
-0.20110954344272614,
1.1073672771453857,
-1.1971286535263062,
0.7757111191749573,
-1.0977646112442017,
-1.583936333656311,
-1.4640191793441772,
-2.3750293254852295,
-2.240194797515869,
0.747111976146698,
-0.3810715079307556,
-0.5868675112724304,
2.0595643520355225,
-1.0650664567947388,
-1.6756916046142578,
1.192386507987976,
0.10570286959409714,
0.002821539528667927,
2.4218313694000244,
0.22177399694919586,
-0.7097921371459961,
0.44965261220932007,
-0.8223161697387695,
0.7097672820091248,
-0.242545947432518,
1.2985339164733887,
0.48594748973846436,
-1.055250644683838,
1.627681016921997,
-0.23152121901512146,
0.6017764806747437,
-0.5804709792137146,
-0.5214912295341492,
-0.6848343014717102,
0.2635345458984375,
1.8800404071807861,
-0.25805604457855225,
1.4897774457931519,
-0.3211197257041931,
-1.5332658290863037,
-1.6665623188018799,
0.9400867819786072,
0.4236854910850525,
-0.7323386073112488,
0.14409275352954865,
-0.5274969935417175,
0.16346752643585205,
-0.08450289070606232,
1.1901289224624634,
1.3222377300262451,
0.7341752052307129,
-0.46061861515045166,
-0.7455084919929504,
0.10312825441360474,
-0.07427279651165009,
-0.5933976173400879,
-1.797025442123413,
-0.33684906363487244,
0.11422506719827652,
0.6013823747634888,
-1.0884946584701538,
1.796698808670044,
1.0167500972747803,
1.8435050249099731,
0.982621431350708,
-0.29335641860961914,
1.3860677480697632,
0.05976381152868271,
1.8243170976638794,
-0.46166378259658813,
0.6403293013572693,
-0.2759019732475281,
-1.1447771787643433,
0.8391609787940979,
-0.3168659210205078,
-2.029966354370117,
-0.9068881869316101,
-0.6340602040290833,
-0.18553267419338226,
-0.8383367657661438,
0.9102881550788879,
-0.3169120252132416,
-1.5086785554885864,
0.18808065354824066,
-0.7392542362213135,
0.24069377779960632,
-1.1149433851242065,
0.3245587944984436,
0.6503373980522156,
-0.6776368021965027,
0.07942230999469757,
-0.19906367361545563,
-1.1646876335144043,
-0.4382810890674591,
0.3216053247451782,
1.9316787719726562,
-0.7386730909347534,
0.7984592318534851,
1.1538323163986206,
-0.742655873298645,
0.10746410489082336,
0.16861487925052643,
-0.25303223729133606,
0.7828637957572937,
-1.024105191230774,
-0.44339486956596375,
1.2294811010360718,
-0.2754172682762146,
-0.657635509967804,
1.6062363386154175,
0.7923085689544678,
-1.0253751277923584,
-0.22624936699867249,
-0.16349565982818604,
-0.8032187819480896,
0.0019417805597186089,
-1.5709117650985718,
-0.13505321741104126,
0.5861600041389465,
-1.4654427766799927,
-0.3977462649345398,
-0.1386747658252716,
1.4058358669281006,
-0.18734930455684662,
1.5324589014053345,
-0.39184752106666565,
-0.1290416419506073,
-0.2585891783237457,
-0.34233909845352173,
0.19529472291469574,
-0.1100919172167778,
-0.5308945178985596,
0.08423860371112823,
-0.901218593120575,
0.29859909415245056,
1.5556577444076538,
0.3858753740787506,
0.03966639190912247,
0.4598417282104492,
1.1082079410552979,
0.3820329010486603,
-0.08800835907459259,
-0.8611670136451721,
-1.5503480434417725,
1.8636090755462646,
-1.4250774383544922,
2.057523488998413,
0.6514587998390198,
-0.14307214319705963,
-1.8271331787109375,
-1.8047019243240356,
1.1685928106307983,
1.1408401727676392,
2.426164150238037,
0.36945074796676636,
0.3715764582157135,
-0.8637639880180359,
-0.7697792053222656,
0.34947946667671204,
-1.0696502923965454,
-0.5839595198631287,
0.24591264128684998,
2.3202929496765137,
1.794007658958435,
-0.4635274112224579,
-0.13631387054920197,
-1.0022666454315186,
1.3131015300750732,
-0.20145882666110992,
0.3317427635192871,
2.062074661254883,
-0.22430461645126343,
-0.9921607971191406,
1.404517412185669,
-2.3904595375061035,
0.1893196552991867,
2.065793037414551,
0.31504958868026733,
0.10984489321708679,
-1.3780615329742432,
-0.5865938067436218,
-0.41672763228416443,
-0.4307108223438263,
-1.277134895324707,
0.4933808445930481,
-0.32260462641716003,
-0.8530945777893066,
-1.219483733177185,
0.11755546927452087,
-1.1225237846374512,
-1.6980462074279785,
0.2606538236141205,
1.7520809173583984,
2.0981996059417725,
-0.7580530643463135,
1.4412498474121094,
-0.3035863935947418,
0.10469222813844681,
1.2266420125961304,
1.3845583200454712,
3.053917407989502,
1.8623005151748657,
-1.3721708059310913,
0.6635868549346924,
-0.23726047575473785,
-0.451272189617157,
1.1371002197265625,
-1.3215150833129883,
1.2866992950439453,
-0.06377775967121124,
-1.2605271339416504,
-1.180734634399414,
1.119804859161377,
0.4321214556694031,
0.126241534948349,
-0.4748031795024872,
1.2380781173706055,
0.0877743810415268,
1.4640235900878906,
0.5866982936859131,
-0.3872435688972473,
0.5539306402206421,
-0.47214609384536743,
-0.5696759819984436,
1.618731141090393,
0.19900298118591309,
-1.5130271911621094,
-2.15655255317688,
-0.19856947660446167,
-0.9363670349121094,
0.026932761073112488,
-0.565416693687439,
-0.9911437630653381,
1.5881755352020264,
0.29710811376571655,
-1.326641321182251,
-0.2675148546695709,
-0.3478289842605591,
-0.5969803929328918,
2.7773051261901855,
-1.2317283153533936,
-0.25914323329925537,
-1.0299758911132812,
-0.6902262568473816,
1.7057174444198608,
-1.242767095565796,
-0.24556854367256165,
-0.9705624580383301,
-0.5134211182594299,
-1.2535617351531982,
-0.4770105481147766,
0.11716005206108093,
-1.1074658632278442,
0.8847033977508545,
0.08835577964782715,
-1.1614670753479004,
-0.3960592746734619,
-0.7678366899490356,
1.0246862173080444,
-0.17708517611026764,
0.18138796091079712,
1.7573646306991577,
0.22648558020591736,
-0.3980223834514618,
0.8371247053146362,
1.1515188217163086,
0.6367261409759521,
-0.6773300766944885,
0.10341144353151321,
-0.6296049952507019,
0.309431791305542,
-1.2799961566925049,
0.2566136121749878,
-2.887866735458374,
0.6218734979629517,
-0.10744938254356384,
-0.10028001666069031,
-0.07571647316217422,
-1.2929679155349731,
1.044404149055481,
2.6047511100769043,
-1.1853687763214111,
0.48691412806510925,
0.4207255244255066,
1.1546685695648193,
-1.4950333833694458,
0.31277045607566833,
-0.4947146475315094,
1.9649254083633423,
0.2997339963912964,
1.2318572998046875,
-0.43958669900894165,
-2.2583961486816406,
0.75167316198349,
-1.18451726436615,
-1.0913089513778687,
0.8050222396850586,
-0.9774841666221619,
0.24610385298728943,
-1.394702672958374,
-0.34359264373779297,
-0.8361111879348755,
-1.068778157234192,
0.5626331567764282,
0.17564937472343445,
0.34917953610420227,
-0.5226297378540039,
0.321164608001709,
-2.306075096130371,
-1.2257139682769775,
-0.2693527042865753,
-1.021409034729004,
0.5236482620239258,
-0.47002819180488586,
0.6132825613021851,
-0.13032585382461548,
0.07106799632310867,
0.31126514077186584,
1.5857759714126587,
3.323955774307251,
0.1895418018102646,
0.17114584147930145,
-0.18684113025665283,
-0.9203783869743347,
1.4777618646621704,
0.8584381937980652,
-0.020951375365257263,
-0.5729194283485413,
-1.0648504495620728,
1.190854787826538,
1.8180090188980103,
0.9818965792655945,
-0.08266499638557434,
-0.8563396334648132,
-0.724775493144989,
-0.12206105887889862,
0.1300159990787506,
0.5210955739021301,
1.0045949220657349,
-0.038688354194164276,
0.055949680507183075,
1.448299527168274,
1.2183326482772827,
-0.4863533675670624,
0.16811418533325195,
-1.003368854522705,
-0.4125197231769562,
0.5270252823829651,
0.16482821106910706,
0.035131800919771194,
0.3829233944416046,
-1.0389363765716553,
-0.21495169401168823,
-0.35793355107307434,
-0.9201431274414062,
-0.7677140831947327,
-0.4486115872859955,
-0.4025774300098419,
1.54453706741333,
0.24470803141593933,
-0.5288310050964355,
-0.07056781649589539,
-0.778179407119751,
-0.29174894094467163,
-1.1708506345748901,
0.27003949880599976,
0.06953839957714081,
-0.16181936860084534,
-0.21138308942317963,
1.7001500129699707,
-0.8814017176628113,
-2.112584352493286,
0.2644137442111969,
0.21016566455364227,
-0.180278480052948,
0.267519474029541,
1.698472023010254,
0.5254954695701599,
1.4255180358886719,
1.2370210886001587,
0.90836501121521,
-0.46569666266441345,
-1.209107756614685,
0.7385727167129517,
0.9412664771080017,
-1.488069772720337,
0.8815841674804688,
-0.11128953844308853,
-0.45703446865081787,
0.6337262988090515,
1.2128221988677979,
0.5446853637695312,
-2.0322189331054688,
0.8001744747161865,
-1.1782488822937012,
0.812648594379425,
0.6636008620262146,
0.6055982708930969,
0.2204374372959137,
0.9472659230232239,
-1.1775842905044556,
-1.1913169622421265,
-0.6665117740631104,
-0.745200514793396,
1.9610470533370972,
-0.3498525321483612,
0.6512236595153809,
-0.2433406114578247,
-1.2015914916992188,
-0.017558066174387932,
0.7744787335395813,
0.23676757514476776,
-0.4800906479358673,
0.9420936703681946,
-0.6833433508872986,
-1.091517448425293,
-1.2946419715881348,
-0.42191386222839355,
-1.1319574117660522,
-0.949931800365448,
1.067588210105896,
0.6767714619636536,
0.23108981549739838,
1.8617775440216064,
0.6364249587059021,
0.3848498463630676,
-2.594691038131714,
0.9196099638938904,
0.13611793518066406,
-0.014021079987287521,
0.8356038331985474,
0.2742167115211487,
0.9667718410491943,
-0.01697065494954586,
0.4553755223751068,
-2.558321237564087,
2.2974421977996826,
-0.19723334908485413,
0.6146467328071594,
-0.05653204023838043,
-0.15332664549350739,
1.1281518936157227,
0.7148115038871765,
0.5476342439651489,
-1.0434694290161133,
0.638393759727478,
-0.5385890603065491,
1.1882497072219849,
0.7632636427879333,
-0.7907326221466064,
0.01609904319047928,
1.432247519493103,
0.4541543424129486,
-0.5112445950508118,
-0.8808497786521912,
-1.0087201595306396,
0.9369584918022156,
1.6923985481262207,
-0.07540830224752426,
-0.06799627095460892,
0.7716628909111023,
0.6492676138877869,
-1.238588571548462,
-0.016659796237945557,
-0.6705814599990845,
-0.5693131685256958,
1.6474123001098633,
2.083627700805664,
-0.20151197910308838,
-0.14271597564220428,
-0.585797905921936,
-1.2829899787902832,
0.7608815431594849,
-0.1402795910835266,
0.13815544545650482,
0.6601487994194031,
-0.5984464883804321,
0.9386534690856934,
0.6854185461997986,
0.9028932452201843,
0.23152199387550354,
0.2828062176704407,
0.49334973096847534,
-0.3833414912223816,
-1.184813141822815,
-0.3251742720603943,
-1.0886822938919067,
-2.6236698627471924,
0.3263571560382843,
-0.2562325894832611,
-1.4571657180786133,
0.09841907024383545,
-1.0578975677490234,
0.9732688069343567,
-0.6042777299880981,
-1.0852296352386475,
-1.5195868015289307,
0.19400884211063385,
0.04152335226535797,
1.031069278717041,
-1.6550127267837524,
-0.1920921504497528,
1.1790767908096313,
0.8464991450309753,
-0.6042497754096985,
0.9640849828720093,
0.32593420147895813,
1.1161848306655884,
0.6777646541595459,
-0.5029277205467224,
0.6406071782112122,
-0.037062063813209534,
-1.3925246000289917,
0.5246659517288208,
1.249206304550171,
0.17148560285568237,
1.5205076932907104,
-0.3963990807533264,
0.0235862135887146,
0.38637852668762207,
-0.8690805435180664,
-0.5063455104827881,
-0.32218030095100403,
0.6945003867149353,
-0.0969223901629448,
-0.9975997805595398,
-0.12750837206840515,
0.010927366092801094,
-0.33699727058410645,
0.17310196161270142,
-1.3970211744308472,
-0.18844854831695557,
-0.4230145215988159,
-0.6105803847312927,
-1.321608543395996,
-0.002109728753566742,
1.408109426498413,
-0.8951372504234314,
-0.16626863181591034,
0.4035356342792511,
0.3015749454498291,
0.5850675702095032,
0.6537801623344421,
-0.7298990488052368,
-0.2143259048461914,
-0.2606877386569977,
-0.20841190218925476,
0.36604583263397217,
1.3241204023361206,
-0.1515463888645172,
-0.9514351487159729,
0.8444048166275024,
-0.3154856860637665,
0.1598028987646103,
1.9037573337554932,
0.12142015993595123,
-0.6403173208236694,
0.2610732913017273,
-0.724793553352356,
1.943750262260437,
1.648628830909729,
1.364622712135315,
-0.16392968595027924,
-0.7730354070663452,
0.5203673839569092,
-0.41287174820899963,
-0.32792842388153076,
0.7095735669136047,
0.475135862827301,
-0.2779953181743622,
-1.3342150449752808,
0.8677172660827637,
1.2339812517166138,
-0.8405387997627258,
-0.7385186553001404,
0.20278942584991455,
-0.7846488356590271,
1.2133220434188843,
0.6370767951011658,
0.31191444396972656,
0.24504277110099792,
1.6107301712036133,
0.7777500152587891,
-0.37883231043815613,
0.5519759058952332,
0.6413236260414124,
-0.097213514149189,
-2.2147293090820312,
-1.1246548891067505,
0.3311326205730438,
-0.555668830871582,
-1.5293214321136475,
1.396666407585144,
-1.0632156133651733,
-1.1180213689804077,
0.5800765752792358,
0.11290816217660904,
1.387349009513855,
0.40758761763572693,
1.547013282775879,
2.0219740867614746,
0.9327379465103149,
0.46474921703338623,
1.2665969133377075,
-0.05803713947534561,
-0.4891442656517029,
1.8454691171646118,
-0.38944974541664124,
0.4227375388145447,
1.0667973756790161,
-0.208101287484169,
-1.1110029220581055,
-0.7731608152389526,
-1.2095603942871094,
-0.6960908770561218,
1.1678546667099,
0.051471464335918427,
-0.9712013006210327,
0.16852131485939026,
1.4613229036331177,
0.21240073442459106,
-0.2559083104133606,
0.6296358108520508,
0.28505176305770874,
-0.7481594085693359,
-0.06970594823360443,
-0.88065105676651,
0.592876672744751,
-0.3097999095916748,
-0.3246953785419464,
0.29182758927345276,
0.47152286767959595,
1.3503738641738892,
-0.21281155943870544,
0.22107258439064026,
1.1315115690231323,
-1.4792453050613403,
1.6174532175064087,
-0.6448304057121277,
0.30414119362831116,
-2.4253902435302734,
1.3470567464828491,
-0.7846946120262146,
1.9722270965576172,
-2.74212908744812,
0.5284419655799866,
-0.577324628829956,
-0.5824521780014038,
0.2621639668941498,
-0.4415293037891388,
-0.046460554003715515,
-0.040668535977602005,
-1.1540184020996094,
0.07854922115802765,
-0.577528178691864,
0.6178886890411377,
1.1368179321289062,
1.365343451499939,
-1.2463927268981934,
-0.2378898561000824,
-1.695435643196106,
-0.17492668330669403,
-0.9446066617965698,
0.4316651523113251,
-2.067483901977539,
-0.1812777817249298,
-1.930753231048584,
-2.3553571701049805,
-1.1650094985961914,
-0.8472712635993958,
1.0895109176635742,
0.16892923414707184,
-0.8584306240081787,
1.3183280229568481,
-0.37352728843688965,
-1.8700158596038818,
1.1465086936950684,
-2.1302430629730225
] |
https://github.com/huggingface/datasets/issues/3422 | Error about load_metric | Hi ! I wasn't able to reproduce your error.
Can you try to clear your cache at `~/.cache/huggingface/modules` and try again ? | ## Describe the bug
File "/opt/conda/lib/python3.8/site-packages/datasets/load.py", line 1371, in load_metric
metric = metric_cls(
TypeError: 'NoneType' object is not callable
## Steps to reproduce the bug
```python
metric = load_metric("glue", "sst2")
```
## Environment info
- `datasets` version: 1.16.1
- Platform: Linux-4.15.0-161-generic-x86_64-with-glibc2.10
- Python version: 3.8.3
- PyArrow version: 6.0.1
| 1,058 | 22 | Error about load_metric
## Describe the bug
File "/opt/conda/lib/python3.8/site-packages/datasets/load.py", line 1371, in load_metric
metric = metric_cls(
TypeError: 'NoneType' object is not callable
## Steps to reproduce the bug
```python
metric = load_metric("glue", "sst2")
```
## Environment info
- `datasets` version: 1.16.1
- Platform: Linux-4.15.0-161-generic-x86_64-with-glibc2.10
- Python version: 3.8.3
- PyArrow version: 6.0.1
Hi ! I wasn't able to reproduce your error.
Can you try to clear your cache at `~/.cache/huggingface/modules` and try again ? | [
-1.1386854648590088,
-0.8698148727416992,
-0.7837600111961365,
1.4753111600875854,
-0.1829530894756317,
-1.2777299880981445,
0.1578904092311859,
-1.0117899179458618,
1.5906562805175781,
-0.838032066822052,
0.3484135866165161,
-1.6045069694519043,
0.05237429961562157,
-0.6006535887718201,
-0.6670010685920715,
-0.8274383544921875,
-0.2712448239326477,
-0.6324085593223572,
1.0121359825134277,
2.602116346359253,
1.2071388959884644,
-1.2575100660324097,
2.7879638671875,
0.6271834373474121,
-0.19799034297466278,
-0.9862587451934814,
0.49116024374961853,
0.06832647323608398,
-1.2521469593048096,
-0.31991422176361084,
-0.9221158623695374,
-0.02758820913732052,
-0.5647947788238525,
-0.5079114437103271,
0.08323080837726593,
0.38644254207611084,
-0.3079490661621094,
-0.3869060277938843,
-0.5413371324539185,
-0.8042568564414978,
0.47226500511169434,
-0.3398418128490448,
0.9057968258857727,
-0.4958016276359558,
1.694345474243164,
-0.5361767411231995,
0.48477911949157715,
0.7756540775299072,
1.3145443201065063,
0.20059706270694733,
0.08749188482761383,
0.3882991373538971,
0.42209726572036743,
0.018570872023701668,
0.4917178452014923,
1.0837692022323608,
0.5451604127883911,
0.511318564414978,
0.6135373711585999,
-2.238795280456543,
1.3309699296951294,
-0.962448239326477,
0.24716249108314514,
1.3341256380081177,
-0.9324787855148315,
0.3039470613002777,
-1.7602109909057617,
-0.12767890095710754,
0.5124605894088745,
-2.334144353866577,
0.3313387334346771,
-1.2887444496154785,
-0.6018390655517578,
0.9308354258537292,
0.42599767446517944,
-1.3384041786193848,
-0.04506935551762581,
-0.40656766295433044,
0.9692836999893188,
0.459430992603302,
1.0891215801239014,
-1.6857014894485474,
0.06387525796890259,
-0.26732978224754333,
0.10267211496829987,
-1.3357272148132324,
-1.5131287574768066,
0.5674281716346741,
0.590316653251648,
0.7074943780899048,
-0.06794977188110352,
0.8883281350135803,
-1.0456758737564087,
0.8395061492919922,
-0.9375646710395813,
-1.7230498790740967,
-1.352595567703247,
-2.472919464111328,
-2.299895763397217,
0.8432746529579163,
-0.405385285615921,
-0.4445636570453644,
2.0469958782196045,
-1.0333359241485596,
-1.8383208513259888,
1.13835608959198,
0.283416748046875,
-0.00801061000674963,
2.362104654312134,
0.23144680261611938,
-0.6658849716186523,
0.48321887850761414,
-0.8109557628631592,
0.7745841145515442,
-0.45859795808792114,
1.316150188446045,
0.4238470196723938,
-1.02922785282135,
1.5579148530960083,
-0.38141560554504395,
0.6083804965019226,
-0.6552621722221375,
-0.41938573122024536,
-0.8057692050933838,
0.21605294942855835,
1.902971863746643,
-0.26911675930023193,
1.4695851802825928,
-0.32912322878837585,
-1.5017801523208618,
-1.5237270593643188,
0.8139346241950989,
0.5677410364151001,
-0.6882661581039429,
0.23885886371135712,
-0.2759387493133545,
0.16359589993953705,
0.04539642482995987,
1.09183669090271,
1.281968593597412,
0.7650421261787415,
-0.24658766388893127,
-0.9784276485443115,
0.25536617636680603,
-0.04546356201171875,
-0.7537731528282166,
-1.872055172920227,
-0.2805294692516327,
0.07418332993984222,
0.6495459079742432,
-1.2568508386611938,
1.7859357595443726,
0.9019865393638611,
1.9806057214736938,
0.9526835680007935,
-0.21261478960514069,
1.5077743530273438,
0.01304570771753788,
1.892350673675537,
-0.43056973814964294,
0.7083926796913147,
-0.41380396485328674,
-1.0893725156784058,
0.7437854409217834,
-0.3754735291004181,
-2.0232481956481934,
-0.7302492260932922,
-0.9435410499572754,
-0.18880698084831238,
-0.8303107023239136,
0.9656079411506653,
-0.3559391498565674,
-1.3906009197235107,
0.17464925348758698,
-0.7256505489349365,
0.1254412829875946,
-1.2949426174163818,
0.28888198733329773,
0.6960457563400269,
-0.6855542659759521,
-0.0003983844071626663,
-0.354866087436676,
-1.2629624605178833,
-0.506861686706543,
0.37189793586730957,
1.8976598978042603,
-0.760533332824707,
1.0565427541732788,
0.971129298210144,
-0.771030843257904,
-0.010065635666251183,
0.4026448428630829,
-0.388661652803421,
0.7965337634086609,
-1.067521333694458,
-0.4854543209075928,
1.233205795288086,
-0.2414701133966446,
-0.6405802965164185,
1.4748218059539795,
0.7590318918228149,
-1.0412166118621826,
-0.22006648778915405,
-0.2573549747467041,
-0.6892367601394653,
0.001401817426085472,
-1.6621410846710205,
-0.16659016907215118,
0.29916852712631226,
-1.4175342321395874,
-0.49499478936195374,
-0.12273453176021576,
1.3085094690322876,
-0.16432471573352814,
1.4205999374389648,
-0.25791531801223755,
-0.27829188108444214,
-0.39515992999076843,
-0.43351566791534424,
0.19496461749076843,
-0.1642601191997528,
-0.6747919321060181,
0.29613158106803894,
-0.7326894402503967,
0.34298399090766907,
1.4006050825119019,
0.19517387449741364,
0.10184231400489807,
0.5915042161941528,
1.0082484483718872,
0.336611270904541,
-0.022028010338544846,
-0.8979505896568298,
-1.6047947406768799,
1.9810781478881836,
-1.4503661394119263,
2.0516197681427,
0.7340336441993713,
-0.13437117636203766,
-1.8800394535064697,
-1.9651490449905396,
1.4314496517181396,
1.2560601234436035,
2.337268114089966,
0.5246480107307434,
0.3711513578891754,
-0.8142290115356445,
-0.8014523386955261,
0.27566730976104736,
-1.013527274131775,
-0.7768104076385498,
0.08656202256679535,
2.3862557411193848,
1.7542184591293335,
-0.4748837947845459,
-0.22455428540706635,
-1.0999356508255005,
1.2902121543884277,
-0.09784278273582458,
0.22903653979301453,
2.0125510692596436,
-0.38342171907424927,
-1.0558799505233765,
1.2540560960769653,
-2.315366268157959,
0.24662715196609497,
2.0338735580444336,
0.24395456910133362,
0.10073354840278625,
-1.4211636781692505,
-0.7178629040718079,
-0.2451397031545639,
-0.4137504994869232,
-1.2926714420318604,
0.5312419533729553,
-0.1848447620868683,
-0.8433259129524231,
-1.387436032295227,
0.11498761177062988,
-1.0856541395187378,
-1.7152880430221558,
0.3140013515949249,
1.857485055923462,
2.0668022632598877,
-0.792209804058075,
1.414599061012268,
-0.19120420515537262,
0.18069322407245636,
1.2901896238327026,
1.2178184986114502,
3.0862951278686523,
1.9283391237258911,
-1.3422648906707764,
0.7936371564865112,
-0.08264940977096558,
-0.403923362493515,
1.2587554454803467,
-1.0401583909988403,
1.217779517173767,
-0.18372371792793274,
-1.112080454826355,
-1.2650686502456665,
0.8409380316734314,
0.4433809220790863,
-0.04113670438528061,
-0.4226471483707428,
1.1947720050811768,
0.10562723875045776,
1.3376103639602661,
0.6048586368560791,
-0.31406500935554504,
0.6816002130508423,
-0.41160842776298523,
-0.4227365255355835,
1.621384859085083,
0.20950181782245636,
-1.5368539094924927,
-2.352372407913208,
-0.1947316974401474,
-0.9553313255310059,
-0.05252596363425255,
-0.597084641456604,
-1.0067553520202637,
1.602418065071106,
0.4780990779399872,
-1.0971486568450928,
-0.18416160345077515,
-0.36186593770980835,
-0.6136412024497986,
2.7112035751342773,
-1.4644745588302612,
-0.2215888649225235,
-1.0067708492279053,
-0.5597553253173828,
1.6278250217437744,
-1.2800394296646118,
-0.13908720016479492,
-1.0820611715316772,
-0.5356003046035767,
-1.3321694135665894,
-0.5144874453544617,
0.003091772086918354,
-0.9265297651290894,
0.8265236020088196,
0.1096935123205185,
-1.2338531017303467,
-0.35571372509002686,
-0.946341872215271,
0.8900930881500244,
-0.10237164795398712,
0.20102469623088837,
1.8200056552886963,
0.39092573523521423,
-0.3124297857284546,
0.7531208992004395,
1.165271282196045,
0.5634787082672119,
-0.6541414856910706,
0.324176549911499,
-0.6038492321968079,
0.4085441827774048,
-1.2794150114059448,
0.24937614798545837,
-2.926382303237915,
0.6277363896369934,
-0.11027128994464874,
-0.15373928844928741,
-0.1752171814441681,
-1.369919776916504,
1.0655337572097778,
2.518507957458496,
-1.2199690341949463,
0.5960017442703247,
0.2572270631790161,
1.1738569736480713,
-1.534302830696106,
0.15077011287212372,
-0.5031112432479858,
2.1071743965148926,
0.18386194109916687,
1.1342406272888184,
-0.5216325521469116,
-2.1898038387298584,
0.6827861070632935,
-1.272452473640442,
-1.0464026927947998,
0.7097846269607544,
-0.7464529275894165,
0.25125652551651,
-1.2371858358383179,
-0.1370023488998413,
-0.769416332244873,
-1.2428447008132935,
0.7177456617355347,
0.0984315276145935,
0.5555121302604675,
-0.549563467502594,
0.34406569600105286,
-2.1466104984283447,
-1.330717921257019,
-0.17481505870819092,
-0.993008553981781,
0.5069422125816345,
-0.30103108286857605,
0.6525243520736694,
-0.1677350550889969,
0.007927807047963142,
0.3218986988067627,
1.3405002355575562,
3.425229787826538,
0.040211424231529236,
0.31596076488494873,
-0.15402241051197052,
-1.0283664464950562,
1.4794102907180786,
0.9286791682243347,
-0.00040008313953876495,
-0.5838973522186279,
-1.103029489517212,
1.226369857788086,
1.9748109579086304,
1.0965276956558228,
0.2014809250831604,
-0.8506661653518677,
-0.711635172367096,
0.0012804102152585983,
0.14290151000022888,
0.47069308161735535,
0.9193715453147888,
-0.029858557507395744,
0.11442035436630249,
1.4404021501541138,
1.237140417098999,
-0.3286396265029907,
0.31520938873291016,
-0.8476864695549011,
-0.3807590901851654,
0.540990948677063,
0.3351353108882904,
0.011381778866052628,
0.35601964592933655,
-0.9830542206764221,
-0.2846830189228058,
-0.266503244638443,
-0.8763934969902039,
-0.7225109338760376,
-0.45788103342056274,
-0.4143986403942108,
1.6464710235595703,
0.05551782622933388,
-0.4716474115848541,
-0.07660260796546936,
-0.841834306716919,
-0.05023016408085823,
-0.9863629341125488,
0.2368592917919159,
-0.18715308606624603,
-0.07214440405368805,
-0.10918921232223511,
1.7837523221969604,
-0.9904688000679016,
-2.160327672958374,
0.21560142934322357,
0.2714367210865021,
-0.293379008769989,
0.2073175460100174,
1.6503393650054932,
0.6545850038528442,
1.3853504657745361,
1.348908543586731,
0.9988831281661987,
-0.6190678477287292,
-1.226656436920166,
0.6562184691429138,
0.952349841594696,
-1.4673939943313599,
0.7760401368141174,
-0.058160148561000824,
-0.506891131401062,
0.7034870386123657,
1.2820358276367188,
0.4680914878845215,
-1.9393856525421143,
0.7251062393188477,
-0.918594479560852,
0.802135705947876,
0.7894814014434814,
0.7879769802093506,
0.1994253545999527,
0.8819119930267334,
-1.2270302772521973,
-1.0522280931472778,
-0.743780791759491,
-0.6962695717811584,
1.9143519401550293,
-0.3898884952068329,
0.5142877697944641,
-0.218959778547287,
-1.2984732389450073,
-0.12262855470180511,
0.6973622441291809,
0.32345566153526306,
-0.44184377789497375,
0.8380171656608582,
-0.6599549651145935,
-1.0817070007324219,
-1.373408317565918,
-0.455020934343338,
-1.0381039381027222,
-0.8867950439453125,
1.0496923923492432,
0.871472954750061,
0.45755308866500854,
1.9879918098449707,
0.6345479488372803,
0.20132997632026672,
-2.6191012859344482,
0.8686586022377014,
0.2651524543762207,
0.019890418276190758,
0.8407601714134216,
0.27639058232307434,
1.201149344444275,
-0.06255461275577545,
0.5726650953292847,
-2.3510565757751465,
2.2743988037109375,
-0.17433345317840576,
0.7026649117469788,
0.10147805511951447,
-0.07066494226455688,
1.0411981344223022,
0.4813263714313507,
0.5774008631706238,
-1.1512997150421143,
0.7245984077453613,
-0.6139578223228455,
1.3405741453170776,
0.9735423922538757,
-0.8604245185852051,
0.06647498905658722,
1.2774938344955444,
0.44068625569343567,
-0.4285486936569214,
-0.9184808731079102,
-0.9293658137321472,
0.9978816509246826,
1.7043203115463257,
-0.11263005435466766,
0.03415403515100479,
0.8126893043518066,
0.680770218372345,
-1.3521547317504883,
-0.03003002516925335,
-0.7770788669586182,
-0.6493974328041077,
1.7319085597991943,
2.0360612869262695,
-0.12958964705467224,
-0.1877535879611969,
-0.7879688739776611,
-1.2561249732971191,
0.7642477750778198,
0.08960078656673431,
0.04271576553583145,
0.7223058938980103,
-0.6260495781898499,
1.11400306224823,
0.780586838722229,
0.9245672821998596,
0.1087263822555542,
0.27484872937202454,
0.2775784134864807,
-0.3608596920967102,
-1.2412054538726807,
-0.325642853975296,
-1.078626036643982,
-2.6113576889038086,
0.4495471119880676,
-0.34715399146080017,
-1.3398187160491943,
-0.023392844945192337,
-1.1098178625106812,
0.8626901507377625,
-0.5910832285881042,
-1.1013860702514648,
-1.3885092735290527,
0.17229384183883667,
-0.23160770535469055,
0.8174170851707458,
-1.66912841796875,
-0.14484117925167084,
1.3800723552703857,
0.9429082870483398,
-0.6493217945098877,
0.9959002733230591,
0.2296116203069687,
1.0240427255630493,
0.8584357500076294,
-0.402400940656662,
0.5837103724479675,
0.1179577112197876,
-1.3616386651992798,
0.48506981134414673,
1.246922254562378,
0.2232344150543213,
1.4385966062545776,
-0.5401838421821594,
0.1359843909740448,
0.45168596506118774,
-0.4656544029712677,
-0.601852297782898,
-0.5994466543197632,
0.777988851070404,
-0.04808880016207695,
-0.994821310043335,
0.013592533767223358,
-0.035685375332832336,
-0.23173707723617554,
0.19197632372379303,
-1.4388165473937988,
-0.17253762483596802,
-0.28758904337882996,
-0.619238018989563,
-1.3825284242630005,
-0.0609985888004303,
1.2491556406021118,
-0.83029705286026,
-0.13338029384613037,
0.4414118528366089,
0.2146725207567215,
0.6093031764030457,
0.5771776437759399,
-0.6702063679695129,
-0.38115590810775757,
-0.24815423786640167,
-0.37308430671691895,
0.3917290270328522,
1.3258960247039795,
-0.09485878050327301,
-1.051559329032898,
0.6549421548843384,
-0.3388126492500305,
0.23616184294223785,
2.013558864593506,
-0.04319233074784279,
-0.8461979627609253,
0.3454803228378296,
-0.7368512749671936,
1.940581202507019,
1.6441198587417603,
1.2297252416610718,
-0.12683679163455963,
-0.9417523145675659,
0.5813099145889282,
-0.2548006474971771,
-0.33952710032463074,
0.8656372427940369,
0.48351868987083435,
-0.24122487008571625,
-1.3212226629257202,
0.6249096989631653,
1.340995192527771,
-0.8316051363945007,
-0.9009438157081604,
0.1593320369720459,
-0.8736141920089722,
1.0639909505844116,
0.7472609877586365,
0.3630392849445343,
0.29946887493133545,
1.6431910991668701,
0.7355000972747803,
-0.5623021721839905,
0.5264849066734314,
0.43384167551994324,
-0.21575377881526947,
-2.040337324142456,
-1.0315589904785156,
0.3061685562133789,
-0.49812477827072144,
-1.5912859439849854,
1.3314310312271118,
-1.1342401504516602,
-0.9592702984809875,
0.571012556552887,
0.2047235369682312,
1.404227375984192,
0.2813653349876404,
1.5929375886917114,
1.896559238433838,
0.9216112494468689,
0.40352562069892883,
1.2663593292236328,
-0.2130611687898636,
-0.49159476161003113,
1.792181372642517,
-0.4707307815551758,
0.4846915900707245,
1.0925828218460083,
-0.40440690517425537,
-1.1033304929733276,
-0.8428401350975037,
-1.1037817001342773,
-0.7524225115776062,
1.1844700574874878,
0.22583693265914917,
-1.1270976066589355,
0.1854240894317627,
1.5992002487182617,
0.14394418895244598,
-0.2721092402935028,
0.7345625162124634,
0.3420599400997162,
-0.7547197341918945,
0.006562037393450737,
-1.023726224899292,
0.5436096787452698,
-0.20143716037273407,
-0.34387698769569397,
0.28663569688796997,
0.4757658839225769,
1.2840832471847534,
-0.06302444636821747,
0.1274782121181488,
1.1910736560821533,
-1.3493711948394775,
1.4476696252822876,
-0.7209954261779785,
0.2784862518310547,
-2.3621435165405273,
1.4197875261306763,
-0.8107126355171204,
1.8534948825836182,
-2.577897787094116,
0.4279223084449768,
-0.5854606032371521,
-0.3714258372783661,
0.21790330111980438,
-0.3144642114639282,
0.13531866669654846,
-0.16140642762184143,
-1.0768969058990479,
-0.026043610647320747,
-0.8618828058242798,
0.5083073377609253,
1.2160109281539917,
1.264431357383728,
-1.0942922830581665,
-0.24133740365505219,
-1.7410168647766113,
-0.1240740567445755,
-0.7901279926300049,
0.34565410017967224,
-2.0000343322753906,
-0.19352318346500397,
-1.8663501739501953,
-2.319000720977783,
-1.2783461809158325,
-0.8634687066078186,
1.1420460939407349,
0.13065873086452484,
-0.8491957783699036,
1.108318567276001,
-0.32129746675491333,
-1.774433970451355,
1.1492605209350586,
-2.216028928756714
] |
https://github.com/huggingface/datasets/issues/3419 | `.to_json` is extremely slow after `.select` | Hi ! It's slower indeed because a datasets on which `select`/`shard`/`train_test_split`/`shuffle` has been called has to do additional steps to retrieve the data of the dataset table in the right order.
Indeed, if you call `dataset.select([0, 5, 10])`, the underlying table of the dataset is not altered to keep the examples at index 0, 5, and 10. Instead, an indices mapping is added on top of the table, that says that the first example is at index 0, the second at index 5 and the last one at index 10.
Therefore accessing the examples of the dataset is slower because of the additional step that uses the indices mapping.
The step that takes the most time is to query the dataset table from a list of indices here:
https://github.com/huggingface/datasets/blob/047dc756ed20fbf06e6bcaf910464aba0e20610a/src/datasets/formatting/formatting.py#L61-L63
In your case it can be made significantly faster by checking if the indices are contiguous. If they're contiguous, we could pass a python `slice` or `range` instead of a list of integers to `_query_table`. This way `_query_table` will do only one lookup to get the queried batch instead of `batch_size` lookups.
Given that calling `select` with contiguous indices is a common use case I'm in favor of implementing such an optimization :)
Let me know what you think | ## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 1,059 | 208 | `.to_json` is extremely slow after `.select`
## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
Hi ! It's slower indeed because a datasets on which `select`/`shard`/`train_test_split`/`shuffle` has been called has to do additional steps to retrieve the data of the dataset table in the right order.
Indeed, if you call `dataset.select([0, 5, 10])`, the underlying table of the dataset is not altered to keep the examples at index 0, 5, and 10. Instead, an indices mapping is added on top of the table, that says that the first example is at index 0, the second at index 5 and the last one at index 10.
Therefore accessing the examples of the dataset is slower because of the additional step that uses the indices mapping.
The step that takes the most time is to query the dataset table from a list of indices here:
https://github.com/huggingface/datasets/blob/047dc756ed20fbf06e6bcaf910464aba0e20610a/src/datasets/formatting/formatting.py#L61-L63
In your case it can be made significantly faster by checking if the indices are contiguous. If they're contiguous, we could pass a python `slice` or `range` instead of a list of integers to `_query_table`. This way `_query_table` will do only one lookup to get the queried batch instead of `batch_size` lookups.
Given that calling `select` with contiguous indices is a common use case I'm in favor of implementing such an optimization :)
Let me know what you think | [
-1.1980186700820923,
-0.8708008527755737,
-0.7748603224754333,
1.5083295106887817,
-0.12620854377746582,
-1.2463676929473877,
0.14649905264377594,
-1.087815284729004,
1.7454273700714111,
-0.7944000959396362,
0.32971641421318054,
-1.6080174446105957,
0.03371157869696617,
-0.5898577570915222,
-0.7461829781532288,
-0.8133506774902344,
-0.4536796510219574,
-0.7198998928070068,
1.0047969818115234,
2.5047926902770996,
1.2997705936431885,
-1.380828619003296,
2.744635581970215,
0.661272406578064,
-0.20974113047122955,
-0.9731675982475281,
0.49612241983413696,
-0.015410220250487328,
-1.2894548177719116,
-0.46709418296813965,
-0.8978378176689148,
-0.09741342067718506,
-0.4902935326099396,
-0.5715365409851074,
0.05884497985243797,
0.4567805230617523,
-0.34759289026260376,
-0.4035968780517578,
-0.45044440031051636,
-0.7944362163543701,
0.40336427092552185,
-0.3283767104148865,
0.9400990009307861,
-0.30871012806892395,
1.768296241760254,
-0.5292396545410156,
0.47222045063972473,
0.7495162487030029,
1.298366904258728,
0.1449914127588272,
-0.03548354282975197,
0.35458245873451233,
0.3777698576450348,
0.007422543130815029,
0.5857815742492676,
1.228701114654541,
0.7107667922973633,
0.48969805240631104,
0.718124270439148,
-2.219451427459717,
1.3201004266738892,
-1.0186678171157837,
0.27185824513435364,
1.2985813617706299,
-0.9733282923698425,
0.3399973213672638,
-1.7817546129226685,
-0.07025384157896042,
0.5073888301849365,
-2.3015809059143066,
0.21867668628692627,
-1.323785424232483,
-0.48755359649658203,
1.0955431461334229,
0.338813841342926,
-1.2417409420013428,
0.08925291895866394,
-0.43485042452812195,
1.0321584939956665,
0.4796125292778015,
1.1784467697143555,
-1.7020734548568726,
-0.08400195091962814,
-0.26567134261131287,
0.16466642916202545,
-1.2416062355041504,
-1.538800835609436,
0.5976561307907104,
0.5949926972389221,
0.6089039444923401,
-0.13273261487483978,
1.063973069190979,
-1.0318121910095215,
0.7540841698646545,
-1.0337947607040405,
-1.7399873733520508,
-1.3901232481002808,
-2.2609307765960693,
-2.3086860179901123,
0.770905613899231,
-0.47763192653656006,
-0.502575159072876,
2.1529860496520996,
-1.061077356338501,
-1.7716476917266846,
1.0055036544799805,
0.32759836316108704,
-0.07620012015104294,
2.4338138103485107,
0.22587616741657257,
-0.7106190323829651,
0.4890860319137573,
-0.6398669481277466,
0.732650637626648,
-0.3575807809829712,
1.2633702754974365,
0.414833664894104,
-1.1279853582382202,
1.5389758348464966,
-0.30694514513015747,
0.6273778080940247,
-0.701353132724762,
-0.4342551827430725,
-0.7556766271591187,
0.27268198132514954,
1.9425722360610962,
-0.32679736614227295,
1.4835288524627686,
-0.32592570781707764,
-1.5714095830917358,
-1.610021710395813,
0.847477376461029,
0.5267621278762817,
-0.7796935439109802,
0.1637144237756729,
-0.438870370388031,
0.0996914729475975,
-0.034386832267045975,
1.177733302116394,
1.2512352466583252,
0.7947630882263184,
-0.3169431686401367,
-0.7876554131507874,
0.22502148151397705,
-0.03801582381129265,
-0.6799628734588623,
-1.7467788457870483,
-0.3356642425060272,
0.12568159401416779,
0.6192127466201782,
-1.172421932220459,
1.7641726732254028,
0.8369540572166443,
1.883583903312683,
1.0950373411178589,
-0.3467433452606201,
1.4953351020812988,
0.07700437307357788,
1.8171919584274292,
-0.45787176489830017,
0.5961621403694153,
-0.37362760305404663,
-1.152619481086731,
0.8032448291778564,
-0.33890196681022644,
-2.114583969116211,
-0.7528300881385803,
-0.7698546051979065,
-0.17310839891433716,
-0.7865028977394104,
0.9072294235229492,
-0.24618585407733917,
-1.338673710823059,
0.18591386079788208,
-0.6876381039619446,
0.06243807449936867,
-1.2330682277679443,
0.3889770209789276,
0.7305295467376709,
-0.66668701171875,
0.09398271888494492,
-0.31523939967155457,
-1.2998265027999878,
-0.5053374767303467,
0.35155338048934937,
1.8744009733200073,
-0.7452642321586609,
0.9949827194213867,
1.0117790699005127,
-0.731443464756012,
-0.030268065631389618,
0.3277588188648224,
-0.3330565094947815,
0.8404958844184875,
-1.0571058988571167,
-0.4429824948310852,
1.1895699501037598,
-0.24923372268676758,
-0.606831967830658,
1.438179850578308,
0.6391868591308594,
-0.985751748085022,
-0.17188739776611328,
-0.12805849313735962,
-0.8648388385772705,
0.04372165724635124,
-1.5891284942626953,
-0.15164615213871002,
0.43574562668800354,
-1.5851969718933105,
-0.4771653115749359,
-0.1847527176141739,
1.327170729637146,
-0.13737823069095612,
1.4122904539108276,
-0.27718526124954224,
-0.16371847689151764,
-0.3860538601875305,
-0.35614821314811707,
0.05663825944066048,
-0.14397871494293213,
-0.6234101057052612,
0.23449353873729706,
-0.7457951307296753,
0.3289944529533386,
1.4437415599822998,
0.387297660112381,
0.010393870063126087,
0.5652329325675964,
1.1065003871917725,
0.38981571793556213,
-0.10188455134630203,
-0.8818240761756897,
-1.5734113454818726,
2.0692105293273926,
-1.4438344240188599,
1.9806395769119263,
0.7698370218276978,
-0.05138342082500458,
-1.7780770063400269,
-1.9389774799346924,
1.404829978942871,
1.130033016204834,
2.3725950717926025,
0.5489316582679749,
0.4276619553565979,
-0.7576733827590942,
-0.6748991012573242,
0.33161070942878723,
-1.034205675125122,
-0.778835117816925,
0.10645060241222382,
2.430466413497925,
1.7895222902297974,
-0.43111705780029297,
-0.19764763116836548,
-0.9927891492843628,
1.3962008953094482,
-0.2554135024547577,
0.18829618394374847,
1.9578889608383179,
-0.2648051977157593,
-1.0154125690460205,
1.3062214851379395,
-2.3350179195404053,
0.10300614684820175,
2.005014181137085,
0.22304286062717438,
0.0006978511810302734,
-1.3995946645736694,
-0.5951488018035889,
-0.20077258348464966,
-0.4643494784832001,
-1.299150824546814,
0.47681042551994324,
-0.2815159261226654,
-0.7736758589744568,
-1.4280778169631958,
0.15652301907539368,
-1.1437312364578247,
-1.6047782897949219,
0.22207029163837433,
1.8871381282806396,
1.9923175573349,
-0.6811285018920898,
1.566298007965088,
-0.2598518431186676,
0.1369159072637558,
1.1992411613464355,
1.2190508842468262,
3.164173126220703,
1.9027438163757324,
-1.3428303003311157,
0.6268745064735413,
-0.16437961161136627,
-0.5275339484214783,
1.1733506917953491,
-1.220757246017456,
1.239148497581482,
-0.1660739779472351,
-1.2487280368804932,
-1.2517913579940796,
0.9389677047729492,
0.4996309280395508,
0.07313372939825058,
-0.5032888650894165,
1.1953942775726318,
0.05646086111664772,
1.307131052017212,
0.5286224484443665,
-0.3272014558315277,
0.682508111000061,
-0.44915884733200073,
-0.5049826502799988,
1.5406495332717896,
0.17344491183757782,
-1.3975589275360107,
-2.3191609382629395,
-0.2287590056657791,
-0.829330325126648,
0.1446441262960434,
-0.5859283208847046,
-0.9201594591140747,
1.6608548164367676,
0.46415719389915466,
-1.241478681564331,
-0.24524931609630585,
-0.31383827328681946,
-0.6444905996322632,
2.6751468181610107,
-1.325284719467163,
-0.19335289299488068,
-1.0369641780853271,
-0.6625505089759827,
1.6432100534439087,
-1.1929792165756226,
-0.19284802675247192,
-0.9876012206077576,
-0.5229904651641846,
-1.3161674737930298,
-0.5947607755661011,
0.026815272867679596,
-0.8792492151260376,
0.8821407556533813,
0.135473370552063,
-1.1931501626968384,
-0.3085327446460724,
-0.8899623155593872,
0.9037914276123047,
-0.19129599630832672,
0.09741169959306717,
1.824654459953308,
0.41477519273757935,
-0.4658936858177185,
0.7433565258979797,
1.1462434530258179,
0.6216694116592407,
-0.600896954536438,
0.2736189663410187,
-0.7403446435928345,
0.350547730922699,
-1.2787750959396362,
0.2999562919139862,
-2.8706843852996826,
0.6005249619483948,
-0.07162921130657196,
-0.03656991198658943,
-0.03965913876891136,
-1.3030601739883423,
1.0068929195404053,
2.5985970497131348,
-1.1796377897262573,
0.5175405740737915,
0.27239304780960083,
1.2072728872299194,
-1.5566346645355225,
0.2074466049671173,
-0.5213465690612793,
2.094954013824463,
0.23274797201156616,
1.2428576946258545,
-0.43179696798324585,
-2.266097068786621,
0.6037744879722595,
-1.2576167583465576,
-1.205714225769043,
0.7762085795402527,
-0.8840908408164978,
0.1068829894065857,
-1.311747670173645,
-0.18262618780136108,
-0.816861629486084,
-1.141005516052246,
0.6976476907730103,
0.15297521650791168,
0.5058830976486206,
-0.6122639179229736,
0.29691386222839355,
-2.1339752674102783,
-1.3232712745666504,
-0.23433423042297363,
-0.9747681617736816,
0.4053957164287567,
-0.35984912514686584,
0.7053549885749817,
-0.15520945191383362,
-0.01655440405011177,
0.34058550000190735,
1.3959541320800781,
3.261031150817871,
0.15090075135231018,
0.3149667978286743,
-0.2634652256965637,
-0.9943279027938843,
1.4748972654342651,
0.8975891470909119,
-0.15669690072536469,
-0.5295050144195557,
-1.0910189151763916,
1.212473750114441,
1.9539583921432495,
1.0239434242248535,
0.05164273455739021,
-0.875933825969696,
-0.7564553022384644,
-0.027979347854852676,
0.18153227865695953,
0.5292274355888367,
0.8922626376152039,
0.09780481457710266,
0.06884241849184036,
1.4008125066757202,
1.2108598947525024,
-0.3108653724193573,
0.4702850580215454,
-0.7949337959289551,
-0.4528331160545349,
0.48776009678840637,
0.30657726526260376,
-0.07953464239835739,
0.3209799826145172,
-1.020278811454773,
-0.24584554135799408,
-0.44067564606666565,
-0.9514041543006897,
-0.6949352025985718,
-0.3213193714618683,
-0.36287251114845276,
1.7307862043380737,
0.05697622522711754,
-0.5196860432624817,
-0.024107739329338074,
-0.839893639087677,
-0.07040320336818695,
-0.9896568655967712,
0.31495487689971924,
-0.21845166385173798,
-0.15974365174770355,
-0.07828101515769958,
1.7490718364715576,
-0.932788074016571,
-2.0536446571350098,
0.3068754971027374,
0.19467304646968842,
-0.324564129114151,
0.2137123942375183,
1.6343857049942017,
0.6082953810691833,
1.4576902389526367,
1.381474256515503,
1.027572512626648,
-0.6694203019142151,
-1.2599585056304932,
0.6760088801383972,
0.9829164147377014,
-1.3945261240005493,
0.7925089597702026,
-0.014804858714342117,
-0.5180177688598633,
0.6153865456581116,
1.2355427742004395,
0.4850555956363678,
-2.001005172729492,
0.8022284507751465,
-0.9152127504348755,
0.7355996966362,
0.7292734384536743,
0.6678218245506287,
0.2377726137638092,
0.8291236162185669,
-1.2387464046478271,
-1.1708056926727295,
-0.6781988143920898,
-0.7149621248245239,
1.988624930381775,
-0.29783469438552856,
0.6232581734657288,
-0.19301868975162506,
-1.3829973936080933,
-0.11778566986322403,
0.6634198427200317,
0.3206225037574768,
-0.47509896755218506,
0.8100751042366028,
-0.6029866933822632,
-1.062671184539795,
-1.4078428745269775,
-0.45178037881851196,
-1.0798566341400146,
-0.883595883846283,
1.0515669584274292,
0.8264898657798767,
0.2894960343837738,
1.8683463335037231,
0.613758385181427,
0.26852819323539734,
-2.5848045349121094,
0.8587648868560791,
0.328520268201828,
-0.08973250538110733,
0.8499097228050232,
0.38745251297950745,
1.0109676122665405,
-0.022764936089515686,
0.6045516133308411,
-2.402026891708374,
2.3251335620880127,
-0.15770862996578217,
0.694317102432251,
0.06771653145551682,
-0.20409910380840302,
1.0592029094696045,
0.5696422457695007,
0.5784124732017517,
-1.1440131664276123,
0.663591206073761,
-0.607542097568512,
1.2606412172317505,
0.8986023664474487,
-0.8391851186752319,
-0.046702101826667786,
1.3858699798583984,
0.46417105197906494,
-0.5215170979499817,
-0.9515594244003296,
-1.0551332235336304,
0.9641005992889404,
1.814441442489624,
-0.07081560790538788,
0.012106622569262981,
0.8679415583610535,
0.7512901425361633,
-1.3181043863296509,
0.10957024991512299,
-0.7367624640464783,
-0.8036174774169922,
1.5780177116394043,
2.103050708770752,
-0.10802529007196426,
-0.14985524117946625,
-0.7685264348983765,
-1.2024556398391724,
0.7938404083251953,
0.05063017085194588,
0.07724298536777496,
0.7289416790008545,
-0.6274529099464417,
1.157671570777893,
0.8971760869026184,
0.9340210556983948,
0.17663425207138062,
0.32913315296173096,
0.29130807518959045,
-0.35205233097076416,
-1.1674662828445435,
-0.19797730445861816,
-0.9826194643974304,
-2.583249092102051,
0.42044001817703247,
-0.26800426840782166,
-1.3705991506576538,
0.025205358862876892,
-1.0085835456848145,
0.8406269550323486,
-0.5504502654075623,
-1.1725345849990845,
-1.4902023077011108,
0.1837543398141861,
-0.08133628219366074,
0.9311607480049133,
-1.5929419994354248,
-0.08279213309288025,
1.227968454360962,
0.9364948272705078,
-0.7092002630233765,
0.9498937726020813,
0.2463172823190689,
1.001859188079834,
0.8550736904144287,
-0.38398119807243347,
0.5136420726776123,
0.06839840114116669,
-1.3757857084274292,
0.41551172733306885,
1.1707628965377808,
0.18132798373699188,
1.4783623218536377,
-0.6016364097595215,
-0.01907194033265114,
0.44661593437194824,
-0.47623690962791443,
-0.4764573574066162,
-0.5301241278648376,
0.70191490650177,
-0.0066186198964715,
-0.9069874882698059,
0.09395769983530045,
-0.021625792607665062,
-0.23895476758480072,
0.17797839641571045,
-1.49325430393219,
-0.11977024376392365,
-0.37764278054237366,
-0.6007313132286072,
-1.2447831630706787,
-0.07882252335548401,
1.3118369579315186,
-0.8345589637756348,
-0.24004524946212769,
0.4691033959388733,
0.2992493212223053,
0.5203653573989868,
0.6147047281265259,
-0.7049395442008972,
-0.3702681064605713,
-0.27043378353118896,
-0.44135650992393494,
0.30027785897254944,
1.332627296447754,
-0.0627918541431427,
-0.9444478154182434,
0.6285680532455444,
-0.323709100484848,
0.08418973535299301,
1.9092525243759155,
0.06356583535671234,
-0.7991039156913757,
0.2825033366680145,
-0.6974495053291321,
1.8539204597473145,
1.7026714086532593,
1.392665982246399,
-0.11294960230588913,
-0.9907419681549072,
0.6383224129676819,
-0.386229008436203,
-0.37928590178489685,
0.9083790183067322,
0.345809668302536,
-0.21444116532802582,
-1.389175295829773,
0.6677887439727783,
1.2207876443862915,
-0.9107459783554077,
-0.8047568798065186,
0.0938136950135231,
-0.8077617287635803,
1.1295931339263916,
0.6764156818389893,
0.30132371187210083,
0.22106099128723145,
1.5661782026290894,
0.7735545039176941,
-0.45832738280296326,
0.5330259799957275,
0.5159028768539429,
-0.131099671125412,
-2.0590291023254395,
-1.1035412549972534,
0.291573703289032,
-0.49255675077438354,
-1.5528669357299805,
1.3928290605545044,
-1.171080231666565,
-0.9525570869445801,
0.5239588022232056,
0.06906121969223022,
1.4672235250473022,
0.35049867630004883,
1.5998061895370483,
2.0865166187286377,
0.929639458656311,
0.3902672231197357,
1.2972882986068726,
-0.15984582901000977,
-0.44440943002700806,
1.7665929794311523,
-0.461072713136673,
0.44474539160728455,
1.0911469459533691,
-0.3337065875530243,
-1.0742346048355103,
-0.788798451423645,
-1.2313578128814697,
-0.7680097818374634,
1.1875596046447754,
0.07655233144760132,
-1.0889365673065186,
0.23528386652469635,
1.5712153911590576,
0.21169421076774597,
-0.23814994096755981,
0.6093059182167053,
0.42945602536201477,
-0.7737031579017639,
-0.06593696773052216,
-0.8733271360397339,
0.5675822496414185,
-0.25892311334609985,
-0.39817503094673157,
0.3547360301017761,
0.4058479368686676,
1.2823203802108765,
-0.03069748729467392,
0.08730100095272064,
1.2285019159317017,
-1.4415655136108398,
1.4809626340866089,
-0.7385529279708862,
0.2933504283428192,
-2.403763771057129,
1.468867540359497,
-0.8613057136535645,
1.9238927364349365,
-2.635399341583252,
0.46437957882881165,
-0.5546785593032837,
-0.38168099522590637,
0.3280788064002991,
-0.29563236236572266,
0.1500474065542221,
-0.15464600920677185,
-1.1472328901290894,
-0.14116637408733368,
-0.730328381061554,
0.5733800530433655,
1.1391820907592773,
1.3615516424179077,
-1.083668828010559,
-0.3367830514907837,
-1.7405661344528198,
-0.13112355768680573,
-0.6493484973907471,
0.34908708930015564,
-1.930169701576233,
-0.19493918120861053,
-1.9204317331314087,
-2.4805991649627686,
-1.2920650243759155,
-0.8858808875083923,
1.1129717826843262,
0.0950736254453659,
-0.8872062563896179,
1.1935088634490967,
-0.34224408864974976,
-1.827102780342102,
1.1338430643081665,
-2.1952717304229736
] |
https://github.com/huggingface/datasets/issues/3419 | `.to_json` is extremely slow after `.select` | Hi, thanks for the response!
I still don't understand why it is so much slower than iterating and saving:
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 99 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 47 seconds
selected_subset3 = original.select([i for i in range(len(original)) if i % 2 == 0])
selected_subset3.to_json("from_select3.json") # Takes 49 seconds
import json
import time
def fast_to_json(dataset, path):
start = time.time()
with open(path, mode="w") as f:
for example in dataset:
f.write(json.dumps(example, separators=(',', ':')) + "\n")
end = time.time()
print(f"Saved {len(dataset)} examples to {path} in {end - start} seconds.")
fast_to_json(original, "from_original_fast.json")
fast_to_json(selected_subset1, "from_select1_fast.json")
fast_to_json(selected_subset2, "from_select2_fast.json")
fast_to_json(selected_subset3, "from_select3_fast.json")
```
```
Saved 87599 examples to from_original_fast.json in 8 seconds.
Saved 87599 examples to from_select1_fast.json in 10 seconds.
Saved 43799 examples to from_select2_fast.json in 6 seconds.
Saved 43800 examples to from_select3_fast.json in 5 seconds.
``` | ## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 1,059 | 157 | `.to_json` is extremely slow after `.select`
## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
Hi, thanks for the response!
I still don't understand why it is so much slower than iterating and saving:
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 99 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 47 seconds
selected_subset3 = original.select([i for i in range(len(original)) if i % 2 == 0])
selected_subset3.to_json("from_select3.json") # Takes 49 seconds
import json
import time
def fast_to_json(dataset, path):
start = time.time()
with open(path, mode="w") as f:
for example in dataset:
f.write(json.dumps(example, separators=(',', ':')) + "\n")
end = time.time()
print(f"Saved {len(dataset)} examples to {path} in {end - start} seconds.")
fast_to_json(original, "from_original_fast.json")
fast_to_json(selected_subset1, "from_select1_fast.json")
fast_to_json(selected_subset2, "from_select2_fast.json")
fast_to_json(selected_subset3, "from_select3_fast.json")
```
```
Saved 87599 examples to from_original_fast.json in 8 seconds.
Saved 87599 examples to from_select1_fast.json in 10 seconds.
Saved 43799 examples to from_select2_fast.json in 6 seconds.
Saved 43800 examples to from_select3_fast.json in 5 seconds.
``` | [
-1.3038921356201172,
-0.8778291344642639,
-0.6919503808021545,
1.5664963722229004,
-0.16626447439193726,
-1.168644666671753,
0.13345003128051758,
-1.0528616905212402,
1.7277023792266846,
-0.8051007390022278,
0.3866065740585327,
-1.553945779800415,
0.05732356756925583,
-0.5609080195426941,
-0.728971540927887,
-0.7859945893287659,
-0.43171602487564087,
-0.6560031175613403,
1.0555477142333984,
2.515110492706299,
1.3516976833343506,
-1.3774464130401611,
2.7973432540893555,
0.6337066292762756,
-0.22059431672096252,
-1.0153040885925293,
0.4801902770996094,
0.02924303710460663,
-1.2576525211334229,
-0.4396407902240753,
-0.9595773816108704,
-0.12181729823350906,
-0.4016859233379364,
-0.5282660126686096,
0.08571632951498032,
0.4621303677558899,
-0.33656230568885803,
-0.45014306902885437,
-0.48562055826187134,
-0.7571436762809753,
0.4245578348636627,
-0.34518975019454956,
0.9204728007316589,
-0.2905741333961487,
1.750462532043457,
-0.5620908141136169,
0.5724250078201294,
0.7240168452262878,
1.2769320011138916,
0.11525601148605347,
0.02621881291270256,
0.41569504141807556,
0.3806167244911194,
0.04894818365573883,
0.6631401181221008,
1.2247843742370605,
0.7081003189086914,
0.4470255374908447,
0.696437418460846,
-2.1381888389587402,
1.2761080265045166,
-1.031367301940918,
0.2551169693470001,
1.2841835021972656,
-0.988368570804596,
0.400946706533432,
-1.7161555290222168,
-0.0800270214676857,
0.5783159136772156,
-2.2736892700195312,
0.223368301987648,
-1.3603167533874512,
-0.5320553183555603,
1.1304543018341064,
0.3248627185821533,
-1.2615530490875244,
-0.005101399961858988,
-0.49900054931640625,
1.0057649612426758,
0.4038146436214447,
1.0890681743621826,
-1.6425187587738037,
-0.055565543472766876,
-0.2375207096338272,
0.13372401893138885,
-1.1894629001617432,
-1.5107042789459229,
0.5782326459884644,
0.6069469451904297,
0.6430922746658325,
-0.09765047580003738,
1.087902545928955,
-1.0693397521972656,
0.7716198563575745,
-0.9895733594894409,
-1.7269926071166992,
-1.4304542541503906,
-2.3463826179504395,
-2.2773849964141846,
0.7891729474067688,
-0.42876431345939636,
-0.5427749156951904,
2.1425893306732178,
-1.1093010902404785,
-1.7893140316009521,
1.0262610912322998,
0.2778782248497009,
-0.06502880156040192,
2.457632541656494,
0.23234808444976807,
-0.7805370092391968,
0.5562558770179749,
-0.6734877228736877,
0.7020165920257568,
-0.3313264548778534,
1.2501368522644043,
0.43272608518600464,
-1.0675454139709473,
1.5537264347076416,
-0.2864181101322174,
0.6389011144638062,
-0.6328074336051941,
-0.42837637662887573,
-0.7849180698394775,
0.260346919298172,
2.0102427005767822,
-0.2737453281879425,
1.4951515197753906,
-0.315756618976593,
-1.6263787746429443,
-1.5754761695861816,
0.8195512294769287,
0.5427829027175903,
-0.7453780770301819,
0.16618604958057404,
-0.5156243443489075,
0.0797620341181755,
-0.0038620331324636936,
1.1681790351867676,
1.267636775970459,
0.8622267842292786,
-0.33147186040878296,
-0.7747352123260498,
0.21690987050533295,
0.020845703780651093,
-0.6824389696121216,
-1.7463841438293457,
-0.3300255537033081,
0.13504783809185028,
0.6343278288841248,
-1.1728649139404297,
1.7606046199798584,
0.8466750979423523,
1.8323485851287842,
1.1205472946166992,
-0.27546408772468567,
1.5305583477020264,
0.05184369161725044,
1.7971763610839844,
-0.46829554438591003,
0.616548478603363,
-0.33209338784217834,
-1.1706006526947021,
0.7343450784683228,
-0.3473217487335205,
-2.131500005722046,
-0.8086555600166321,
-0.704111635684967,
-0.1275440752506256,
-0.8212811350822449,
0.9252298474311829,
-0.27196764945983887,
-1.37037992477417,
0.19523662328720093,
-0.7480908036231995,
0.10161604732275009,
-1.206876277923584,
0.3747401833534241,
0.7105211615562439,
-0.6573429703712463,
0.1015603318810463,
-0.2824971377849579,
-1.2920804023742676,
-0.40765631198883057,
0.329524427652359,
1.887132167816162,
-0.7757573127746582,
0.9873102307319641,
0.9948611855506897,
-0.7158311605453491,
-0.007312817499041557,
0.28944823145866394,
-0.3620329797267914,
0.8612192869186401,
-1.0858149528503418,
-0.4025332033634186,
1.2101824283599854,
-0.2406194657087326,
-0.5798397660255432,
1.4268593788146973,
0.6515998840332031,
-0.9448886513710022,
-0.22692906856536865,
-0.11611383408308029,
-0.8523744344711304,
0.0636582300066948,
-1.5957658290863037,
-0.17540140450000763,
0.5067425966262817,
-1.5210986137390137,
-0.50461345911026,
-0.13458216190338135,
1.2934973239898682,
-0.130588099360466,
1.4377262592315674,
-0.2967686951160431,
-0.13904769718647003,
-0.32348132133483887,
-0.3930925726890564,
0.06587420403957367,
-0.16047878563404083,
-0.6132947206497192,
0.17101314663887024,
-0.7451235055923462,
0.3668392300605774,
1.4280898571014404,
0.32379037141799927,
0.03319118544459343,
0.5862184166908264,
1.1064269542694092,
0.4051833152770996,
-0.167624369263649,
-0.8845878839492798,
-1.6333179473876953,
2.060811758041382,
-1.4456589221954346,
2.0062501430511475,
0.7449569702148438,
-0.11569345742464066,
-1.7620563507080078,
-1.9584321975708008,
1.3689210414886475,
1.1766400337219238,
2.372559070587158,
0.4978289008140564,
0.42983028292655945,
-0.7504648566246033,
-0.7645573616027832,
0.28546902537345886,
-1.0690290927886963,
-0.7710030674934387,
0.11849753558635712,
2.444598436355591,
1.8423287868499756,
-0.4036817252635956,
-0.20477576553821564,
-0.9439584016799927,
1.4121911525726318,
-0.310306578874588,
0.20391982793807983,
1.9530751705169678,
-0.22537830471992493,
-1.0098356008529663,
1.3349618911743164,
-2.3203976154327393,
0.14843715727329254,
2.015846014022827,
0.29509687423706055,
0.03580133244395256,
-1.4008843898773193,
-0.5736549496650696,
-0.2472122758626938,
-0.3995102643966675,
-1.3094241619110107,
0.5239080190658569,
-0.28537362813949585,
-0.8427616357803345,
-1.344285488128662,
0.14546501636505127,
-1.1450726985931396,
-1.6059620380401611,
0.19043107330799103,
1.8531858921051025,
2.0450570583343506,
-0.7287743091583252,
1.5601882934570312,
-0.26495248079299927,
0.15262259542942047,
1.156766414642334,
1.2000877857208252,
3.109027147293091,
1.9024105072021484,
-1.3404669761657715,
0.6113479733467102,
-0.19320328533649445,
-0.5275912880897522,
1.130223035812378,
-1.3129982948303223,
1.2715368270874023,
-0.10924742370843887,
-1.2215259075164795,
-1.1998636722564697,
0.9788711071014404,
0.47940534353256226,
0.014803212136030197,
-0.48242366313934326,
1.2137272357940674,
0.04789460822939873,
1.3279931545257568,
0.4956205487251282,
-0.31325143575668335,
0.6724445223808289,
-0.4356728792190552,
-0.4402022361755371,
1.5060129165649414,
0.14267760515213013,
-1.4618234634399414,
-2.206639289855957,
-0.19896060228347778,
-0.8361988663673401,
0.1416313350200653,
-0.587011456489563,
-0.9379112124443054,
1.6466422080993652,
0.4466504752635956,
-1.214712142944336,
-0.24319547414779663,
-0.29879996180534363,
-0.6309934258460999,
2.702965259552002,
-1.2562508583068848,
-0.23315148055553436,
-1.0962436199188232,
-0.6973178386688232,
1.6302332878112793,
-1.1979031562805176,
-0.17219863831996918,
-0.987654983997345,
-0.5266522169113159,
-1.3086981773376465,
-0.581345796585083,
0.0481143593788147,
-0.9066111445426941,
0.8045399785041809,
0.1065114438533783,
-1.1856822967529297,
-0.3170459568500519,
-0.8788394331932068,
0.9556450843811035,
-0.2055923044681549,
0.05811771750450134,
1.7543175220489502,
0.318911075592041,
-0.4291074872016907,
0.7641974687576294,
1.1724441051483154,
0.6417638659477234,
-0.6516821980476379,
0.24735963344573975,
-0.7817705869674683,
0.3872159421443939,
-1.3014588356018066,
0.30785948038101196,
-2.8629159927368164,
0.6359974145889282,
-0.05080121010541916,
-0.05237981304526329,
-0.044096097350120544,
-1.3263123035430908,
1.049360752105713,
2.601367473602295,
-1.1644742488861084,
0.5553640127182007,
0.30088281631469727,
1.182508945465088,
-1.572174310684204,
0.2257029265165329,
-0.4826144576072693,
2.0984699726104736,
0.2846945524215698,
1.3099641799926758,
-0.4350491166114807,
-2.274911880493164,
0.6975166201591492,
-1.292020559310913,
-1.1698343753814697,
0.7174972891807556,
-0.949042022228241,
0.13958346843719482,
-1.2787744998931885,
-0.2320508062839508,
-0.828711986541748,
-1.0803780555725098,
0.5723828077316284,
0.16997629404067993,
0.46247363090515137,
-0.5478754639625549,
0.2916012704372406,
-2.167625665664673,
-1.3254046440124512,
-0.21702148020267487,
-1.0425169467926025,
0.4264134466648102,
-0.42100757360458374,
0.6898468732833862,
-0.11288599669933319,
-0.0015466101467609406,
0.34326478838920593,
1.4324820041656494,
3.2215771675109863,
0.12731797993183136,
0.28709113597869873,
-0.2359451800584793,
-1.0238573551177979,
1.4699435234069824,
0.821942150592804,
-0.2018326371908188,
-0.5608869791030884,
-1.0887119770050049,
1.25888991355896,
1.9212474822998047,
1.028334617614746,
0.056227512657642365,
-0.9323076009750366,
-0.8168060779571533,
-0.009754220023751259,
0.14240731298923492,
0.4894225597381592,
0.9169327020645142,
0.09027931839227676,
0.043025389313697815,
1.4180848598480225,
1.1932673454284668,
-0.2772584557533264,
0.39425423741340637,
-0.8541887402534485,
-0.42510879039764404,
0.5020699501037598,
0.25504130125045776,
-0.0933990404009819,
0.2893950939178467,
-1.0325818061828613,
-0.22797751426696777,
-0.438767671585083,
-0.8815284967422485,
-0.7412245869636536,
-0.3046496510505676,
-0.3479417860507965,
1.7288362979888916,
0.09247283637523651,
-0.5606078505516052,
-0.024776574224233627,
-0.8490319848060608,
-0.10965967923402786,
-0.9774982929229736,
0.2554137706756592,
-0.18376211822032928,
-0.19034337997436523,
-0.13588961958885193,
1.7796621322631836,
-0.938454270362854,
-2.098194122314453,
0.2688256800174713,
0.1775386929512024,
-0.2287507951259613,
0.18550363183021545,
1.643928050994873,
0.6560676097869873,
1.4438626766204834,
1.3535892963409424,
1.0124876499176025,
-0.6503818035125732,
-1.2344355583190918,
0.7274739742279053,
0.986440122127533,
-1.3957812786102295,
0.7645823359489441,
-0.07638111710548401,
-0.49769294261932373,
0.5273298025131226,
1.2432234287261963,
0.5236027836799622,
-1.95172119140625,
0.797231137752533,
-0.9751918315887451,
0.7474826574325562,
0.7317716479301453,
0.6354438066482544,
0.2205347865819931,
0.8398823738098145,
-1.2147307395935059,
-1.1404693126678467,
-0.6840735077857971,
-0.7592328786849976,
2.0685744285583496,
-0.35332241654396057,
0.6392778754234314,
-0.2291327714920044,
-1.3402984142303467,
-0.10105394572019577,
0.6555618047714233,
0.31803587079048157,
-0.4590618312358856,
0.8384522795677185,
-0.6403839588165283,
-1.0307748317718506,
-1.4032464027404785,
-0.4298189580440521,
-1.0785188674926758,
-0.9219104647636414,
1.0296063423156738,
0.7675355076789856,
0.3305153548717499,
1.8677735328674316,
0.6625518798828125,
0.29555460810661316,
-2.6145215034484863,
0.9087122082710266,
0.22947551310062408,
-0.06302066892385483,
0.8314048647880554,
0.3592655062675476,
1.0068881511688232,
-0.06472127139568329,
0.5797023177146912,
-2.396761178970337,
2.2741293907165527,
-0.09642831236124039,
0.7299190759658813,
0.04141949862241745,
-0.16689413785934448,
1.0864894390106201,
0.5943066477775574,
0.5713120102882385,
-1.1659314632415771,
0.6297436356544495,
-0.5303281545639038,
1.2726781368255615,
0.8053611516952515,
-0.8237723112106323,
-0.058537065982818604,
1.3940558433532715,
0.41895967721939087,
-0.567538857460022,
-1.0105462074279785,
-0.9790349006652832,
0.9635002613067627,
1.770472764968872,
-0.07458430528640747,
-0.028639350086450577,
0.8020029067993164,
0.7091707587242126,
-1.2905364036560059,
0.02016397751867771,
-0.6959222555160522,
-0.7579292058944702,
1.637463092803955,
2.202967882156372,
-0.11734404414892197,
-0.21676380932331085,
-0.7204126715660095,
-1.2600486278533936,
0.8083010911941528,
0.0034135011956095695,
0.10254929959774017,
0.7458595037460327,
-0.6239104866981506,
1.1382648944854736,
0.91452556848526,
0.963499903678894,
0.13226385414600372,
0.29054495692253113,
0.3197311758995056,
-0.3228645622730255,
-1.2168891429901123,
-0.27448028326034546,
-0.9778518676757812,
-2.6530513763427734,
0.3620634973049164,
-0.29886406660079956,
-1.36543607711792,
0.06615890562534332,
-0.9934134483337402,
0.8412536382675171,
-0.5857375860214233,
-1.1258375644683838,
-1.481487512588501,
0.1890609711408615,
-0.10332348197698593,
0.9306893348693848,
-1.61177659034729,
-0.12063799053430557,
1.2404191493988037,
0.9782660603523254,
-0.6525784134864807,
0.9805442690849304,
0.20813848078250885,
0.989965558052063,
0.8060481548309326,
-0.3931575417518616,
0.5809703469276428,
0.06085309386253357,
-1.3718342781066895,
0.4397647976875305,
1.1860902309417725,
0.20484986901283264,
1.495225429534912,
-0.5580558180809021,
-0.031059948727488518,
0.4763062596321106,
-0.5435441136360168,
-0.47966083884239197,
-0.40635165572166443,
0.719027578830719,
0.026622723788022995,
-0.9919257164001465,
-0.014057403430342674,
-0.02047911286354065,
-0.26429250836372375,
0.145006462931633,
-1.5103554725646973,
-0.10004757344722748,
-0.3919033706188202,
-0.6443671584129333,
-1.192253828048706,
-0.10611776262521744,
1.2844712734222412,
-0.9172492623329163,
-0.2026107907295227,
0.39983317255973816,
0.29936131834983826,
0.5362418293952942,
0.6261158585548401,
-0.7441422343254089,
-0.28806498646736145,
-0.2735564708709717,
-0.41049641370773315,
0.31947779655456543,
1.3324682712554932,
-0.021771037951111794,
-0.9830825924873352,
0.5592832565307617,
-0.3492048978805542,
0.15547281503677368,
1.8784270286560059,
0.07015164941549301,
-0.7576010823249817,
0.3021024763584137,
-0.7561335563659668,
1.8863804340362549,
1.6341447830200195,
1.3815038204193115,
-0.13094887137413025,
-0.9613221883773804,
0.5954053401947021,
-0.40565189719200134,
-0.37014272809028625,
0.8073367476463318,
0.33577343821525574,
-0.21244452893733978,
-1.3782579898834229,
0.774692714214325,
1.2201581001281738,
-0.9414061903953552,
-0.7623286247253418,
0.10883843898773193,
-0.833921492099762,
1.1253807544708252,
0.6736158728599548,
0.27880263328552246,
0.30367162823677063,
1.608083963394165,
0.814815104007721,
-0.4932769536972046,
0.5200798511505127,
0.5358422994613647,
-0.13239255547523499,
-2.0573248863220215,
-1.0595998764038086,
0.2964622378349304,
-0.5784121155738831,
-1.4944393634796143,
1.3823504447937012,
-1.1450512409210205,
-0.9448732137680054,
0.5386159420013428,
0.13917534053325653,
1.4764502048492432,
0.39981788396835327,
1.6022229194641113,
2.067484140396118,
0.9264821410179138,
0.3837331533432007,
1.2355878353118896,
-0.1902233213186264,
-0.45099443197250366,
1.7325146198272705,
-0.46518805623054504,
0.43603000044822693,
1.0383217334747314,
-0.3479720652103424,
-1.1043999195098877,
-0.8153782486915588,
-1.257291316986084,
-0.8082252144813538,
1.1320075988769531,
0.1143440380692482,
-1.0620064735412598,
0.18656180799007416,
1.5961227416992188,
0.2586379647254944,
-0.24377815425395966,
0.5995445251464844,
0.42623889446258545,
-0.7769513130187988,
-0.050924282521009445,
-0.8685505390167236,
0.5520622730255127,
-0.24656324088573456,
-0.41339778900146484,
0.29430198669433594,
0.4467637836933136,
1.2783126831054688,
-0.03188987821340561,
0.026987824589014053,
1.2375030517578125,
-1.5025360584259033,
1.4843463897705078,
-0.7329947352409363,
0.33916714787483215,
-2.406686305999756,
1.4569063186645508,
-0.8907885551452637,
1.9317631721496582,
-2.633923292160034,
0.5106679797172546,
-0.5442759394645691,
-0.3935103714466095,
0.2507142126560211,
-0.2922338545322418,
0.1451045125722885,
-0.06418807804584503,
-1.1764709949493408,
-0.1417500525712967,
-0.6896942257881165,
0.638897180557251,
1.1552822589874268,
1.3405048847198486,
-1.0772626399993896,
-0.24969281256198883,
-1.7694573402404785,
-0.0670265257358551,
-0.7539393305778503,
0.2842005491256714,
-1.93741774559021,
-0.21580985188484192,
-1.8494255542755127,
-2.4072043895721436,
-1.2355458736419678,
-0.8785359859466553,
1.11488938331604,
0.09535206854343414,
-0.8618103265762329,
1.235048770904541,
-0.3003608286380768,
-1.8184597492218018,
1.142754077911377,
-2.2440667152404785
] |
https://github.com/huggingface/datasets/issues/3419 | `.to_json` is extremely slow after `.select` | There are slight differences between what you're doing and what `to_json` is actually doing.
In particular `to_json` currently converts batches of rows (as an arrow table) to a pandas dataframe, and then to JSON Lines. From your benchmark it looks like it's faster if we don't use pandas.
Thanks for investigating, I think we can optimize `to_json` significantly thanks to your test. | ## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 1,059 | 62 | `.to_json` is extremely slow after `.select`
## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
There are slight differences between what you're doing and what `to_json` is actually doing.
In particular `to_json` currently converts batches of rows (as an arrow table) to a pandas dataframe, and then to JSON Lines. From your benchmark it looks like it's faster if we don't use pandas.
Thanks for investigating, I think we can optimize `to_json` significantly thanks to your test. | [
-1.2284789085388184,
-0.9025799036026001,
-0.7333709597587585,
1.5844007730484009,
-0.13178019225597382,
-1.17592453956604,
0.12564809620380402,
-1.0512464046478271,
1.7521895170211792,
-0.8051429390907288,
0.4094242751598358,
-1.5988495349884033,
0.05281617492437363,
-0.5915942788124084,
-0.7249827980995178,
-0.7912605404853821,
-0.41436994075775146,
-0.674848198890686,
1.0387688875198364,
2.517930030822754,
1.288766860961914,
-1.4170219898223877,
2.7245609760284424,
0.6412410736083984,
-0.23473139107227325,
-0.9805443286895752,
0.4852927625179291,
0.03994825482368469,
-1.2396135330200195,
-0.4255741834640503,
-0.9030951857566833,
-0.11212985217571259,
-0.4960561990737915,
-0.5400040745735168,
0.07105622440576553,
0.46646803617477417,
-0.3230559527873993,
-0.41495683789253235,
-0.4894293248653412,
-0.7597086429595947,
0.4422188699245453,
-0.33670082688331604,
0.9197061061859131,
-0.28816646337509155,
1.7369554042816162,
-0.5517920255661011,
0.5421498417854309,
0.7289276123046875,
1.2750732898712158,
0.13654062151908875,
-0.0041887229308485985,
0.37560105323791504,
0.38319477438926697,
0.009001730009913445,
0.6301021575927734,
1.1834603548049927,
0.6972001194953918,
0.470445454120636,
0.6994360089302063,
-2.171917200088501,
1.3077373504638672,
-1.021710991859436,
0.2787174880504608,
1.2921639680862427,
-0.9818002581596375,
0.3663003444671631,
-1.7455337047576904,
-0.10286065936088562,
0.5655129551887512,
-2.259159803390503,
0.22608187794685364,
-1.3489983081817627,
-0.5004469156265259,
1.097759485244751,
0.3178964853286743,
-1.3006768226623535,
0.018621541559696198,
-0.4773351550102234,
1.0146071910858154,
0.426166832447052,
1.0859938859939575,
-1.7158468961715698,
-0.08355522900819778,
-0.2624805271625519,
0.15396113693714142,
-1.2484374046325684,
-1.5121972560882568,
0.5528724193572998,
0.6168922781944275,
0.6376081705093384,
-0.09509612619876862,
1.0254980325698853,
-1.1159820556640625,
0.7594221830368042,
-1.0212558507919312,
-1.7361853122711182,
-1.3757939338684082,
-2.2933316230773926,
-2.3309996128082275,
0.75999516248703,
-0.4111713171005249,
-0.5304420590400696,
2.150312900543213,
-1.0547784566879272,
-1.799681305885315,
1.0186132192611694,
0.29107654094696045,
-0.0979742780327797,
2.4586281776428223,
0.22061944007873535,
-0.7599536776542664,
0.5070130825042725,
-0.6854714155197144,
0.7098333835601807,
-0.34006690979003906,
1.2892951965332031,
0.4286380410194397,
-1.0841026306152344,
1.6014182567596436,
-0.2933306396007538,
0.6352589130401611,
-0.6865885257720947,
-0.44717922806739807,
-0.7752721309661865,
0.24721576273441315,
1.9898974895477295,
-0.2788673937320709,
1.4744398593902588,
-0.3371698260307312,
-1.581134557723999,
-1.5663928985595703,
0.8482030034065247,
0.5130906105041504,
-0.7601374387741089,
0.144500732421875,
-0.4610314667224884,
0.10226931422948837,
-0.0011586248874664307,
1.1699509620666504,
1.264825701713562,
0.84161376953125,
-0.33986955881118774,
-0.7888187170028687,
0.20481964945793152,
-0.02133331447839737,
-0.6702345013618469,
-1.7810219526290894,
-0.32158005237579346,
0.11284714192152023,
0.6392151117324829,
-1.1812878847122192,
1.7688744068145752,
0.8376643657684326,
1.8599079847335815,
1.0950243473052979,
-0.3112962245941162,
1.4979467391967773,
0.02020314708352089,
1.8591980934143066,
-0.4323575794696808,
0.6459358334541321,
-0.36640143394470215,
-1.1491883993148804,
0.7937365174293518,
-0.3279052674770355,
-2.1281673908233643,
-0.7623854279518127,
-0.7407652139663696,
-0.15048326551914215,
-0.7788131237030029,
0.917828381061554,
-0.24972999095916748,
-1.3697266578674316,
0.2271851897239685,
-0.7043377161026001,
0.14076130092144012,
-1.2172468900680542,
0.3794648349285126,
0.7018113732337952,
-0.6654680371284485,
0.1409701108932495,
-0.2935555875301361,
-1.293870449066162,
-0.480778306722641,
0.36787739396095276,
1.8557164669036865,
-0.7715098261833191,
0.9617219567298889,
0.9935703873634338,
-0.7234867811203003,
-0.012404964305460453,
0.3153819739818573,
-0.3477106988430023,
0.8630455732345581,
-1.0733716487884521,
-0.40960147976875305,
1.1864447593688965,
-0.255874365568161,
-0.6183089017868042,
1.4758360385894775,
0.6842290759086609,
-0.9631119966506958,
-0.20837262272834778,
-0.1537153720855713,
-0.8319842219352722,
0.06836789101362228,
-1.6172659397125244,
-0.16625270247459412,
0.46742963790893555,
-1.5405809879302979,
-0.4860503077507019,
-0.18039895594120026,
1.31356680393219,
-0.1435999870300293,
1.433763861656189,
-0.29062673449516296,
-0.16723814606666565,
-0.36265823245048523,
-0.4091531038284302,
0.06535592675209045,
-0.15614578127861023,
-0.6010576486587524,
0.2330971509218216,
-0.710317075252533,
0.37162134051322937,
1.4441134929656982,
0.3256661295890808,
0.02503020502626896,
0.5418708324432373,
1.0967638492584229,
0.400349497795105,
-0.147565096616745,
-0.887066125869751,
-1.6100192070007324,
2.0809555053710938,
-1.4642724990844727,
2.034665107727051,
0.7623506188392639,
-0.06459949910640717,
-1.786918044090271,
-1.9303390979766846,
1.3975260257720947,
1.1635828018188477,
2.3719899654388428,
0.5731958746910095,
0.4284021854400635,
-0.7842286229133606,
-0.7172737121582031,
0.30524083971977234,
-1.0654085874557495,
-0.8129138946533203,
0.11724971234798431,
2.4114344120025635,
1.7798371315002441,
-0.4197290539741516,
-0.15121987462043762,
-0.9888976812362671,
1.4126486778259277,
-0.2498144805431366,
0.21589329838752747,
1.976869821548462,
-0.2494407743215561,
-1.038242220878601,
1.3457987308502197,
-2.3395469188690186,
0.1587260365486145,
2.018622636795044,
0.265306681394577,
0.05041872709989548,
-1.381771206855774,
-0.5847607254981995,
-0.2609769403934479,
-0.37386515736579895,
-1.2891665697097778,
0.4846351146697998,
-0.2346794158220291,
-0.8092542290687561,
-1.4476372003555298,
0.16391396522521973,
-1.1453428268432617,
-1.6081558465957642,
0.2377103865146637,
1.8611611127853394,
2.054354667663574,
-0.7226809859275818,
1.5803383588790894,
-0.24690724909305573,
0.1659560650587082,
1.190591812133789,
1.1882929801940918,
3.1107585430145264,
1.8909051418304443,
-1.3532379865646362,
0.6115844249725342,
-0.16677911579608917,
-0.5431573987007141,
1.1330534219741821,
-1.2587741613388062,
1.2564765214920044,
-0.16764849424362183,
-1.1930866241455078,
-1.247192144393921,
0.9713747501373291,
0.49983808398246765,
0.04458843916654587,
-0.49655017256736755,
1.1972781419754028,
0.06819435209035873,
1.3297024965286255,
0.5061901211738586,
-0.30325114727020264,
0.651113748550415,
-0.44765356183052063,
-0.4586314558982849,
1.5653753280639648,
0.16912952065467834,
-1.4461777210235596,
-2.2680671215057373,
-0.2290763109922409,
-0.8365328907966614,
0.10406684130430222,
-0.5648802518844604,
-0.9341009259223938,
1.63203763961792,
0.4652658700942993,
-1.212083339691162,
-0.2339746206998825,
-0.25577402114868164,
-0.6509186625480652,
2.6836583614349365,
-1.294584035873413,
-0.21155807375907898,
-1.0722920894622803,
-0.7074004411697388,
1.6310926675796509,
-1.2203665971755981,
-0.19250980019569397,
-0.9602169990539551,
-0.5275021195411682,
-1.3046057224273682,
-0.5497869253158569,
0.030826350674033165,
-0.9209257960319519,
0.8341189622879028,
0.13965855538845062,
-1.1835808753967285,
-0.3445112109184265,
-0.9024043083190918,
0.8888358473777771,
-0.20020005106925964,
0.1240578144788742,
1.7531152963638306,
0.36125439405441284,
-0.4249628484249115,
0.744670569896698,
1.1668511629104614,
0.6501203179359436,
-0.6532880663871765,
0.2557208836078644,
-0.7375354766845703,
0.3657405972480774,
-1.2679927349090576,
0.31663015484809875,
-2.8596813678741455,
0.6315264701843262,
-0.06236640363931656,
-0.0803624615073204,
-0.04397871345281601,
-1.3263181447982788,
1.065771460533142,
2.588479518890381,
-1.1766490936279297,
0.5469679832458496,
0.2534395754337311,
1.1934744119644165,
-1.5444161891937256,
0.21764029562473297,
-0.45909708738327026,
2.0892975330352783,
0.2518819570541382,
1.253587245941162,
-0.438862681388855,
-2.2853667736053467,
0.6240153312683105,
-1.2512013912200928,
-1.1636078357696533,
0.7297846078872681,
-0.9057259559631348,
0.09509345889091492,
-1.2504627704620361,
-0.19417570531368256,
-0.8519382476806641,
-1.1259682178497314,
0.5948266386985779,
0.16211454570293427,
0.4547157287597656,
-0.5974850654602051,
0.3291163146495819,
-2.1550142765045166,
-1.3536421060562134,
-0.23350857198238373,
-1.0333867073059082,
0.43904873728752136,
-0.3878008723258972,
0.6977673172950745,
-0.12402687966823578,
0.001749582588672638,
0.3456614911556244,
1.4347654581069946,
3.250206232070923,
0.15077023208141327,
0.37526851892471313,
-0.24686607718467712,
-1.00521719455719,
1.4819834232330322,
0.873710572719574,
-0.15137004852294922,
-0.5617954730987549,
-1.112159013748169,
1.2246447801589966,
1.9641116857528687,
1.0294537544250488,
0.04168429225683212,
-0.8732984662055969,
-0.7997699975967407,
-0.03642193228006363,
0.17472581565380096,
0.5135188102722168,
0.9239335656166077,
0.11588294804096222,
0.057049110531806946,
1.40000319480896,
1.2279164791107178,
-0.32175391912460327,
0.3875107765197754,
-0.8055773377418518,
-0.4092962443828583,
0.46457934379577637,
0.2859874963760376,
-0.06537849456071854,
0.2693882882595062,
-1.0435303449630737,
-0.22192907333374023,
-0.44198307394981384,
-0.9087165594100952,
-0.7757635116577148,
-0.3661835491657257,
-0.3724086880683899,
1.7528867721557617,
0.03350769728422165,
-0.5278948545455933,
-0.020891916006803513,
-0.8416898846626282,
-0.05023324489593506,
-0.9968715906143188,
0.29506635665893555,
-0.16646166145801544,
-0.17800909280776978,
-0.09477078169584274,
1.7852226495742798,
-0.9683131575584412,
-2.100897789001465,
0.27959027886390686,
0.1634126603603363,
-0.3150050640106201,
0.21827055513858795,
1.6312952041625977,
0.6163402199745178,
1.4485126733779907,
1.3779939413070679,
1.0015844106674194,
-0.6906929612159729,
-1.236610770225525,
0.679764449596405,
0.9840887188911438,
-1.4140808582305908,
0.7388745546340942,
-0.038650669157505035,
-0.49108120799064636,
0.5905831456184387,
1.2455594539642334,
0.5039070248603821,
-1.9745452404022217,
0.7807002663612366,
-0.9703580737113953,
0.7386938333511353,
0.7359866499900818,
0.6228935122489929,
0.2228352576494217,
0.7997576594352722,
-1.2307631969451904,
-1.1031382083892822,
-0.7028821110725403,
-0.7461032867431641,
2.0091869831085205,
-0.3485557436943054,
0.6197348833084106,
-0.1628861427307129,
-1.340821385383606,
-0.0947713628411293,
0.6945868134498596,
0.38003009557724,
-0.4686601459980011,
0.8063352108001709,
-0.6062198281288147,
-1.064740777015686,
-1.3906166553497314,
-0.44286519289016724,
-1.0735220909118652,
-0.9116706252098083,
1.0081595182418823,
0.7651224136352539,
0.2979527413845062,
1.8691352605819702,
0.6503366827964783,
0.2949574291706085,
-2.6041927337646484,
0.9281520247459412,
0.28711560368537903,
-0.08365663886070251,
0.868417501449585,
0.40227019786834717,
0.9884268045425415,
-0.0670810118317604,
0.5830652713775635,
-2.385953664779663,
2.3311209678649902,
-0.12812839448451996,
0.71678626537323,
0.05349025875329971,
-0.16472697257995605,
1.0815197229385376,
0.566644012928009,
0.5386794209480286,
-1.1620430946350098,
0.6684485673904419,
-0.5852717161178589,
1.2895009517669678,
0.783768355846405,
-0.8042111396789551,
-0.05636297166347504,
1.3435606956481934,
0.402464359998703,
-0.5530022978782654,
-0.9882202744483948,
-1.0234260559082031,
0.9378947019577026,
1.7689086198806763,
-0.111882783472538,
-0.024872999638319016,
0.8276597857475281,
0.7206481695175171,
-1.334052562713623,
0.04599294066429138,
-0.7106386423110962,
-0.7569664716720581,
1.595010757446289,
2.115597724914551,
-0.09370455890893936,
-0.19166666269302368,
-0.7832027077674866,
-1.2751317024230957,
0.8025922179222107,
0.04637879133224487,
0.09773978590965271,
0.7279190421104431,
-0.6366803050041199,
1.1528196334838867,
0.9313167333602905,
0.9308264255523682,
0.13992375135421753,
0.29537320137023926,
0.31834322214126587,
-0.3702516555786133,
-1.1868606805801392,
-0.23955443501472473,
-0.9936276078224182,
-2.6148810386657715,
0.4099195599555969,
-0.2843702435493469,
-1.363335371017456,
0.048283666372299194,
-0.9904558062553406,
0.8395493626594543,
-0.5635323524475098,
-1.141319990158081,
-1.51567542552948,
0.20097187161445618,
-0.14677494764328003,
0.9328559041023254,
-1.5726062059402466,
-0.09121665358543396,
1.2612841129302979,
0.9747026562690735,
-0.6720538139343262,
1.0148898363113403,
0.19707831740379333,
0.9699833393096924,
0.8134921789169312,
-0.3751596212387085,
0.5805221796035767,
0.0690108984708786,
-1.3637117147445679,
0.4159393906593323,
1.1936452388763428,
0.22075925767421722,
1.4521275758743286,
-0.5953190326690674,
-0.014099480584263802,
0.4118514358997345,
-0.49204304814338684,
-0.4754505157470703,
-0.47086983919143677,
0.7414167523384094,
-0.012701883912086487,
-0.9577701687812805,
0.08497645705938339,
-0.028457483276724815,
-0.2016885131597519,
0.1619514673948288,
-1.5253440141677856,
-0.12078572809696198,
-0.4062189757823944,
-0.6382425427436829,
-1.1708930730819702,
-0.08834612369537354,
1.3000974655151367,
-0.8709278106689453,
-0.21405529975891113,
0.40944617986679077,
0.3425982892513275,
0.5439115166664124,
0.6397823691368103,
-0.7031561732292175,
-0.3449181914329529,
-0.27745193243026733,
-0.4068290591239929,
0.3651655912399292,
1.326698660850525,
-0.013767657801508904,
-0.9709561467170715,
0.6272248029708862,
-0.3883417844772339,
0.127249613404274,
1.8977491855621338,
0.055546991527080536,
-0.8041670918464661,
0.2969939112663269,
-0.7231823801994324,
1.918584942817688,
1.6754724979400635,
1.3523390293121338,
-0.1064440980553627,
-0.976292073726654,
0.6397049427032471,
-0.38881561160087585,
-0.36825817823410034,
0.8518247008323669,
0.3303626775741577,
-0.23898276686668396,
-1.3358933925628662,
0.7012998461723328,
1.248220443725586,
-0.8957259058952332,
-0.8089993596076965,
0.1413211077451706,
-0.7986127734184265,
1.0983996391296387,
0.6942764520645142,
0.32491999864578247,
0.25859034061431885,
1.5693738460540771,
0.7828339338302612,
-0.4676802456378937,
0.532913088798523,
0.49663522839546204,
-0.16314469277858734,
-2.02982234954834,
-1.0926895141601562,
0.30469468235969543,
-0.5916016101837158,
-1.5394176244735718,
1.3941518068313599,
-1.1858410835266113,
-0.9357736706733704,
0.5558286309242249,
0.10738364607095718,
1.4899823665618896,
0.37736520171165466,
1.6050704717636108,
2.0607781410217285,
0.9152814149856567,
0.38845357298851013,
1.249139666557312,
-0.2127387672662735,
-0.477870911359787,
1.7787529230117798,
-0.4801911413669586,
0.45026305317878723,
1.0994858741760254,
-0.3243884742259979,
-1.0646181106567383,
-0.8196322917938232,
-1.2004531621932983,
-0.7655234932899475,
1.1477010250091553,
0.12982067465782166,
-1.0841703414916992,
0.19545456767082214,
1.6103832721710205,
0.23239213228225708,
-0.2732786536216736,
0.6098272204399109,
0.36572280526161194,
-0.76677006483078,
-0.05920018255710602,
-0.8996458649635315,
0.5684013962745667,
-0.269729346036911,
-0.38897377252578735,
0.33351385593414307,
0.40543049573898315,
1.258599042892456,
-0.002032061107456684,
0.07487651705741882,
1.2413631677627563,
-1.463794231414795,
1.463517427444458,
-0.7171989679336548,
0.3387608528137207,
-2.3904812335968018,
1.4552749395370483,
-0.8298712372779846,
1.9337425231933594,
-2.648059129714966,
0.45344433188438416,
-0.5646547079086304,
-0.37596291303634644,
0.2546437084674835,
-0.24630829691886902,
0.16651159524917603,
-0.13908720016479492,
-1.163047432899475,
-0.20237497985363007,
-0.7345784902572632,
0.584154486656189,
1.1296542882919312,
1.3243601322174072,
-1.0389448404312134,
-0.2871418297290802,
-1.7671217918395996,
-0.08514244854450226,
-0.6933971047401428,
0.3301808536052704,
-1.9507255554199219,
-0.22610121965408325,
-1.869579553604126,
-2.4045705795288086,
-1.269339680671692,
-0.8581830263137817,
1.1266722679138184,
0.07769053429365158,
-0.8268750309944153,
1.2104572057724,
-0.31274497509002686,
-1.8105173110961914,
1.107548713684082,
-2.2362136840820312
] |
https://github.com/huggingface/datasets/issues/3419 | `.to_json` is extremely slow after `.select` | Thanks for your observations, @eladsegal! I spent some time with this and tried different approaches. Turns out that https://github.com/huggingface/datasets/blob/bb13373637b1acc55f8a468a8927a56cf4732230/src/datasets/io/json.py#L100 is giving the problem when we use `to_json` after `select`. This is when `indices` parameter in `query_table` is not `None` (if it is `None` then `to_json` should work as expected)
In order to circumvent this problem, I found out instead of doing Arrow Table -> Pandas-> JSON we can directly go to JSON by using `to_pydict()` which is a little slower than the current approach but at least `select` works properly now. Lmk what you guys think of it @lhoestq, @eladsegal? | ## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 1,059 | 100 | `.to_json` is extremely slow after `.select`
## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
Thanks for your observations, @eladsegal! I spent some time with this and tried different approaches. Turns out that https://github.com/huggingface/datasets/blob/bb13373637b1acc55f8a468a8927a56cf4732230/src/datasets/io/json.py#L100 is giving the problem when we use `to_json` after `select`. This is when `indices` parameter in `query_table` is not `None` (if it is `None` then `to_json` should work as expected)
In order to circumvent this problem, I found out instead of doing Arrow Table -> Pandas-> JSON we can directly go to JSON by using `to_pydict()` which is a little slower than the current approach but at least `select` works properly now. Lmk what you guys think of it @lhoestq, @eladsegal? | [
-1.2045809030532837,
-0.8603864908218384,
-0.696190595626831,
1.5420427322387695,
-0.13700370490550995,
-1.2184455394744873,
0.16163291037082672,
-1.0629035234451294,
1.7412495613098145,
-0.7753244638442993,
0.37411004304885864,
-1.621715784072876,
0.014850432984530926,
-0.6092142462730408,
-0.7343021631240845,
-0.7651050686836243,
-0.41247910261154175,
-0.702936053276062,
1.0146605968475342,
2.512209415435791,
1.3198997974395752,
-1.3478621244430542,
2.7628064155578613,
0.6329423189163208,
-0.257186621427536,
-0.9606435894966125,
0.4785631597042084,
-0.016315439715981483,
-1.2653340101242065,
-0.44063594937324524,
-0.8936334848403931,
-0.09700120985507965,
-0.44197994470596313,
-0.5663938522338867,
0.05962004512548447,
0.4765918254852295,
-0.33205217123031616,
-0.40523722767829895,
-0.4983575642108917,
-0.7791107892990112,
0.42789819836616516,
-0.3451314866542816,
0.930438220500946,
-0.2836657464504242,
1.7765114307403564,
-0.5709495544433594,
0.49934449791908264,
0.7444035410881042,
1.2924678325653076,
0.12589393556118011,
-0.012269900180399418,
0.35379666090011597,
0.34801825881004333,
0.056586481630802155,
0.6324573755264282,
1.2320687770843506,
0.6907288432121277,
0.46920275688171387,
0.7066910266876221,
-2.1734108924865723,
1.2751715183258057,
-0.9650365114212036,
0.25119298696517944,
1.2945845127105713,
-0.9673872590065002,
0.3364085257053375,
-1.7827425003051758,
-0.06582988798618317,
0.5315845608711243,
-2.2720654010772705,
0.22287747263908386,
-1.3293927907943726,
-0.5012865662574768,
1.0525397062301636,
0.28066322207450867,
-1.2917312383651733,
0.030362535268068314,
-0.4684743583202362,
1.0153080224990845,
0.4390813112258911,
1.1255394220352173,
-1.670360803604126,
-0.07510790228843689,
-0.26120734214782715,
0.1612042486667633,
-1.2304441928863525,
-1.5359101295471191,
0.5617414116859436,
0.6505996584892273,
0.634822428226471,
-0.12708094716072083,
1.0389535427093506,
-1.0585081577301025,
0.7524117827415466,
-1.0008383989334106,
-1.753556728363037,
-1.3820593357086182,
-2.2587244510650635,
-2.2641074657440186,
0.7498859763145447,
-0.4584892988204956,
-0.5401244163513184,
2.089592933654785,
-1.058186411857605,
-1.8412128686904907,
0.9873920679092407,
0.32802385091781616,
-0.05459468066692352,
2.4182357788085938,
0.2657512128353119,
-0.7562933564186096,
0.507980465888977,
-0.6457458734512329,
0.6822978258132935,
-0.3436816334724426,
1.2913254499435425,
0.42841190099716187,
-1.0818718671798706,
1.5832221508026123,
-0.3404076397418976,
0.6485483646392822,
-0.7125934362411499,
-0.4252985715866089,
-0.7599066495895386,
0.27364352345466614,
1.9734349250793457,
-0.32052740454673767,
1.459303855895996,
-0.3337313234806061,
-1.6101206541061401,
-1.5574535131454468,
0.8265485763549805,
0.5339347720146179,
-0.7183314561843872,
0.14895394444465637,
-0.48070627450942993,
0.07932066917419434,
-0.02405901998281479,
1.125186562538147,
1.2590302228927612,
0.8435824513435364,
-0.30522534251213074,
-0.7802016735076904,
0.23650754988193512,
0.010694381780922413,
-0.6599531173706055,
-1.775425672531128,
-0.2802761495113373,
0.19180572032928467,
0.6167401671409607,
-1.1686240434646606,
1.8181041479110718,
0.8429330587387085,
1.8910890817642212,
1.1141880750656128,
-0.2912706136703491,
1.5296293497085571,
0.037137411534786224,
1.851563811302185,
-0.429436594247818,
0.6104080080986023,
-0.3168719410896301,
-1.1536697149276733,
0.785883367061615,
-0.33084413409233093,
-2.1310741901397705,
-0.7530460357666016,
-0.7509264349937439,
-0.15345428884029388,
-0.7991335391998291,
0.9037792682647705,
-0.2416485995054245,
-1.3631001710891724,
0.17125965654850006,
-0.7064504027366638,
0.10364430397748947,
-1.2279409170150757,
0.3432558476924896,
0.7139548063278198,
-0.6744444370269775,
0.09594613313674927,
-0.28219202160835266,
-1.2989212274551392,
-0.4859268367290497,
0.37886548042297363,
1.8891940116882324,
-0.7596507668495178,
0.9744513034820557,
1.0315780639648438,
-0.7273656725883484,
0.017787713557481766,
0.3318786919116974,
-0.3665105104446411,
0.8427749276161194,
-1.0682281255722046,
-0.3928840756416321,
1.2041099071502686,
-0.20582236349582672,
-0.6246896982192993,
1.4586443901062012,
0.7264824509620667,
-0.9916209578514099,
-0.1981588900089264,
-0.16444943845272064,
-0.8261905312538147,
0.05436006933450699,
-1.6125437021255493,
-0.14995761215686798,
0.42253798246383667,
-1.485874891281128,
-0.488303005695343,
-0.1861215978860855,
1.3283756971359253,
-0.12734797596931458,
1.4148600101470947,
-0.27606216073036194,
-0.13930733501911163,
-0.36372432112693787,
-0.41111505031585693,
0.044574618339538574,
-0.18626362085342407,
-0.642921507358551,
0.21586814522743225,
-0.7138440012931824,
0.3636077046394348,
1.457505226135254,
0.3220217227935791,
0.02277914062142372,
0.5756848454475403,
1.1215423345565796,
0.40289661288261414,
-0.1248953714966774,
-0.8968629837036133,
-1.605888843536377,
2.066924810409546,
-1.4572325944900513,
1.9985113143920898,
0.7446907758712769,
-0.0616721585392952,
-1.7662209272384644,
-1.9362603425979614,
1.432458758354187,
1.16254723072052,
2.41322660446167,
0.5695783495903015,
0.42349371314048767,
-0.7750206589698792,
-0.7186866998672485,
0.29813864827156067,
-1.0365310907363892,
-0.7697863578796387,
0.12107128649950027,
2.443448305130005,
1.8198975324630737,
-0.47082406282424927,
-0.1750742644071579,
-0.9874212741851807,
1.363936185836792,
-0.26417428255081177,
0.2039497345685959,
1.9973795413970947,
-0.26162710785865784,
-1.0152740478515625,
1.3231899738311768,
-2.3267667293548584,
0.18995881080627441,
2.001373291015625,
0.24774985015392303,
0.06122059375047684,
-1.3820050954818726,
-0.6030359268188477,
-0.2411983758211136,
-0.3946753442287445,
-1.2970253229141235,
0.5226079821586609,
-0.23431523144245148,
-0.8262987732887268,
-1.414613962173462,
0.15977656841278076,
-1.1160835027694702,
-1.6325716972351074,
0.25579833984375,
1.870253086090088,
2.0141005516052246,
-0.7410944700241089,
1.5738048553466797,
-0.2583830654621124,
0.1508680135011673,
1.2043817043304443,
1.2405465841293335,
3.1325981616973877,
1.8939155340194702,
-1.3415381908416748,
0.6757021546363831,
-0.19845563173294067,
-0.5486128926277161,
1.1633055210113525,
-1.2313263416290283,
1.2397723197937012,
-0.20123888552188873,
-1.2219185829162598,
-1.2385783195495605,
0.9565610885620117,
0.5396140217781067,
0.048132602125406265,
-0.5031858682632446,
1.2064993381500244,
0.1124713197350502,
1.3182916641235352,
0.5228949785232544,
-0.3103902339935303,
0.6857483983039856,
-0.4091758131980896,
-0.4354461133480072,
1.5321147441864014,
0.17409123480319977,
-1.4473901987075806,
-2.291635274887085,
-0.2184801995754242,
-0.8451566100120544,
0.09951797872781754,
-0.5642556548118591,
-0.9488454461097717,
1.622047781944275,
0.4779050350189209,
-1.2229100465774536,
-0.21754413843154907,
-0.2833611071109772,
-0.6196538805961609,
2.666543483734131,
-1.3269026279449463,
-0.20559270679950714,
-1.0805548429489136,
-0.6480593681335449,
1.6333197355270386,
-1.2154711484909058,
-0.19100533425807953,
-0.9964021444320679,
-0.5252044200897217,
-1.299897313117981,
-0.5824658274650574,
0.030194547027349472,
-0.8640899062156677,
0.8524569272994995,
0.15576507151126862,
-1.2021573781967163,
-0.3464875817298889,
-0.9256978631019592,
0.955254852771759,
-0.22350698709487915,
0.07708757370710373,
1.7547255754470825,
0.4042893052101135,
-0.45506739616394043,
0.7693578600883484,
1.1416391134262085,
0.5913428068161011,
-0.632054328918457,
0.29452434182167053,
-0.7604602575302124,
0.35949844121932983,
-1.3622090816497803,
0.26408371329307556,
-2.864227294921875,
0.6429418921470642,
-0.06512938439846039,
-0.04113753139972687,
-0.058090634644031525,
-1.3546245098114014,
1.0682533979415894,
2.5903470516204834,
-1.1774173974990845,
0.5139568448066711,
0.3025693893432617,
1.2118231058120728,
-1.5562165975570679,
0.20118136703968048,
-0.4747065603733063,
2.0862200260162354,
0.1954054981470108,
1.2832820415496826,
-0.44259902834892273,
-2.2538561820983887,
0.6068731546401978,
-1.2695542573928833,
-1.1538522243499756,
0.7482531666755676,
-0.8684414625167847,
0.1285044252872467,
-1.293312430381775,
-0.19577160477638245,
-0.8653674125671387,
-1.132298469543457,
0.6733545660972595,
0.1596750020980835,
0.44875916838645935,
-0.617729902267456,
0.3125947117805481,
-2.118374824523926,
-1.348349928855896,
-0.2218346893787384,
-1.01760733127594,
0.4273087680339813,
-0.3446267247200012,
0.6860103607177734,
-0.14651764929294586,
-0.007212014868855476,
0.3670026361942291,
1.4097404479980469,
3.258110284805298,
0.1466105580329895,
0.3443233370780945,
-0.24962328374385834,
-1.015068769454956,
1.4694854021072388,
0.8495211005210876,
-0.1919413059949875,
-0.5153698325157166,
-1.0642719268798828,
1.1745362281799316,
1.9591847658157349,
1.0502859354019165,
0.0551583468914032,
-0.9356117248535156,
-0.8507623672485352,
-0.010486258193850517,
0.15352506935596466,
0.49358323216438293,
0.9002103805541992,
0.07884117215871811,
0.044332511723041534,
1.354658842086792,
1.17133629322052,
-0.34996548295021057,
0.45896175503730774,
-0.7988733649253845,
-0.4048556089401245,
0.4729838967323303,
0.2781667113304138,
-0.042387090623378754,
0.30363935232162476,
-1.0484975576400757,
-0.2300105094909668,
-0.38875120878219604,
-0.8973761200904846,
-0.7670946717262268,
-0.3896366059780121,
-0.33521968126296997,
1.7348747253417969,
0.03405403345823288,
-0.5428146123886108,
-0.009240704588592052,
-0.848564624786377,
-0.0459916852414608,
-0.9562004208564758,
0.2644062340259552,
-0.20470239222049713,
-0.1468883603811264,
-0.07614654302597046,
1.7473104000091553,
-0.981601357460022,
-2.0840492248535156,
0.317769318819046,
0.21851691603660583,
-0.3102724850177765,
0.22873865067958832,
1.6619820594787598,
0.6366339325904846,
1.4334652423858643,
1.3785114288330078,
1.0552626848220825,
-0.6761327385902405,
-1.260890245437622,
0.7193068265914917,
0.9746848940849304,
-1.3861331939697266,
0.780224084854126,
-0.03898199275135994,
-0.4957590401172638,
0.5728297829627991,
1.2892147302627563,
0.4956717789173126,
-1.97007155418396,
0.7541852593421936,
-0.93321692943573,
0.7153383493423462,
0.719596803188324,
0.6955086588859558,
0.2259696125984192,
0.826726496219635,
-1.2344688177108765,
-1.1507067680358887,
-0.7019055485725403,
-0.7307848930358887,
1.9920227527618408,
-0.2828921675682068,
0.5758139491081238,
-0.15575797855854034,
-1.3755252361297607,
-0.09704121947288513,
0.7175270318984985,
0.34552231431007385,
-0.4827258586883545,
0.7843267321586609,
-0.6061466336250305,
-1.0199946165084839,
-1.3510299921035767,
-0.4607531428337097,
-1.065231442451477,
-0.9193330407142639,
0.984650731086731,
0.7903635501861572,
0.3443025052547455,
1.8602486848831177,
0.6710605025291443,
0.27147290110588074,
-2.6063666343688965,
0.9087845683097839,
0.30903294682502747,
-0.050824884325265884,
0.8536022305488586,
0.39862677454948425,
1.0203638076782227,
-0.04838544875383377,
0.613351047039032,
-2.40358567237854,
2.306816339492798,
-0.1242491751909256,
0.6717742681503296,
0.03280354291200638,
-0.21821507811546326,
1.0667614936828613,
0.5468624830245972,
0.5377704501152039,
-1.1604561805725098,
0.6661487817764282,
-0.6131224632263184,
1.2498078346252441,
0.8149000406265259,
-0.8782942891120911,
-0.015685956925153732,
1.357028603553772,
0.4303499758243561,
-0.5358208417892456,
-0.9623236656188965,
-1.007688283920288,
0.969852864742279,
1.7427388429641724,
-0.08895032852888107,
0.0008559534326195717,
0.8548511862754822,
0.748188853263855,
-1.3247567415237427,
0.062390848994255066,
-0.7014838457107544,
-0.7581319808959961,
1.6682194471359253,
2.1213767528533936,
-0.09164378046989441,
-0.21115422248840332,
-0.7964794635772705,
-1.2242989540100098,
0.797059178352356,
0.04839921370148659,
0.09703635424375534,
0.7306793928146362,
-0.6504976749420166,
1.192265510559082,
0.8587262630462646,
0.9596361517906189,
0.13650880753993988,
0.3140403628349304,
0.3341340124607086,
-0.3841937482357025,
-1.1897621154785156,
-0.2601029872894287,
-1.043133020401001,
-2.6213321685791016,
0.4002716839313507,
-0.2561376988887787,
-1.3710315227508545,
0.03446858003735542,
-1.0128190517425537,
0.797443151473999,
-0.58249431848526,
-1.1367813348770142,
-1.469536304473877,
0.20851492881774902,
-0.13569113612174988,
0.8997216820716858,
-1.5990424156188965,
-0.10728942602872849,
1.2620254755020142,
0.9602351188659668,
-0.6897122263908386,
0.9798942804336548,
0.2125992625951767,
0.998748242855072,
0.8639487028121948,
-0.36894726753234863,
0.5676592588424683,
0.049602240324020386,
-1.3482507467269897,
0.4236767888069153,
1.1928201913833618,
0.1967245638370514,
1.4849114418029785,
-0.5761674642562866,
-0.0016512684524059296,
0.45337414741516113,
-0.505555272102356,
-0.5206892490386963,
-0.5005638003349304,
0.697054386138916,
0.014616214670240879,
-0.9799989461898804,
0.0646234080195427,
-0.03430234268307686,
-0.21337027847766876,
0.1832006573677063,
-1.546866774559021,
-0.10810020565986633,
-0.3783535361289978,
-0.6278414130210876,
-1.1984591484069824,
-0.0768260657787323,
1.300608515739441,
-0.8386062383651733,
-0.23465873301029205,
0.43413516879081726,
0.27029702067375183,
0.548098623752594,
0.5916433930397034,
-0.7254945635795593,
-0.34822309017181396,
-0.2915395498275757,
-0.4404493570327759,
0.3562913239002228,
1.333405613899231,
-0.021621517837047577,
-0.9951813817024231,
0.6112141609191895,
-0.42524442076683044,
0.12119366973638535,
1.930540680885315,
0.04961438104510307,
-0.7815856337547302,
0.28633958101272583,
-0.720192551612854,
1.8568427562713623,
1.6645606756210327,
1.3636856079101562,
-0.07729995995759964,
-0.9880220890045166,
0.6493082642555237,
-0.3796117305755615,
-0.36278966069221497,
0.9158698916435242,
0.3336593806743622,
-0.2621922492980957,
-1.3570386171340942,
0.6886656880378723,
1.272231101989746,
-0.8679845333099365,
-0.7986456155776978,
0.08001361787319183,
-0.8358545899391174,
1.1214089393615723,
0.7194193601608276,
0.256582647562027,
0.2752689719200134,
1.5612860918045044,
0.7527033686637878,
-0.46828460693359375,
0.5411053895950317,
0.46884703636169434,
-0.13698408007621765,
-2.052015781402588,
-1.0602695941925049,
0.31294092535972595,
-0.5109315514564514,
-1.5389188528060913,
1.3720653057098389,
-1.2070612907409668,
-0.9388314485549927,
0.5069124698638916,
0.1248440071940422,
1.4592421054840088,
0.37670841813087463,
1.6246061325073242,
2.083082914352417,
0.9160719513893127,
0.3810865879058838,
1.2311681509017944,
-0.1995016634464264,
-0.4487297236919403,
1.7546021938323975,
-0.49335306882858276,
0.45178475975990295,
1.0349653959274292,
-0.3408272862434387,
-1.11673104763031,
-0.8581215143203735,
-1.2430238723754883,
-0.7600784301757812,
1.1957297325134277,
0.09426111727952957,
-1.1041136980056763,
0.23638997972011566,
1.6071815490722656,
0.2161852866411209,
-0.28215786814689636,
0.6529149413108826,
0.4027068316936493,
-0.7942630052566528,
-0.07127276062965393,
-0.8722413182258606,
0.5347669720649719,
-0.2291325032711029,
-0.37162718176841736,
0.31881412863731384,
0.49149659276008606,
1.2461241483688354,
-0.013112564571201801,
0.0506959967315197,
1.2196818590164185,
-1.4224294424057007,
1.461227536201477,
-0.737899124622345,
0.3282051086425781,
-2.4049015045166016,
1.4512064456939697,
-0.8290539979934692,
1.9158750772476196,
-2.615957498550415,
0.44658881425857544,
-0.5369291305541992,
-0.38219791650772095,
0.2750774919986725,
-0.26112493872642517,
0.1481705605983734,
-0.11769405752420425,
-1.1630231142044067,
-0.19487853348255157,
-0.7457050681114197,
0.6088724732398987,
1.1593900918960571,
1.3524600267410278,
-1.0473928451538086,
-0.2750651240348816,
-1.7949784994125366,
-0.10676391422748566,
-0.713460385799408,
0.3164369463920593,
-1.9476158618927002,
-0.2428686022758484,
-1.930474042892456,
-2.391338586807251,
-1.2852439880371094,
-0.8670664429664612,
1.0899349451065063,
0.11470768600702286,
-0.8768930435180664,
1.1579668521881104,
-0.3669334053993225,
-1.8185983896255493,
1.0897542238235474,
-2.218409299850464
] |
https://github.com/huggingface/datasets/issues/3419 | `.to_json` is extremely slow after `.select` | Posting it in @eladsegal's format:
For `squad`:
Saving examples using current `to_json` in 3.63 secs
Saving examples to `from_select1_fast.json` in 5.00 secs
Saving examples to `from_select2_fast.json` in 2.45 secs
Saving examples to `from_select3_fast.json` in 2.50 secs
For `squad_v2`:
Saving examples using current `to_json` in 5.26 secs
Saving examples to `from_select1_fast.json` in 7.54 secs
Saving examples to `from_select2_fast.json` in 3.80 secs
Saving examples to `from_select3_fast.json` in 3.67 secs | ## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 1,059 | 67 | `.to_json` is extremely slow after `.select`
## Describe the bug
Saving a dataset to JSON with `to_json` is extremely slow after using `.select` on the original dataset.
## Steps to reproduce the bug
```python
from datasets import load_dataset
original = load_dataset("squad", split="train")
original.to_json("from_original.json") # Takes 0 seconds
selected_subset1 = original.select([i for i in range(len(original))])
selected_subset1.to_json("from_select1.json") # Takes 212 seconds
selected_subset2 = original.select([i for i in range(int(len(original) / 2))])
selected_subset2.to_json("from_select2.json") # Takes 90 seconds
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master (https://github.com/huggingface/datasets/commit/6090f3cfb5c819f441dd4a4bb635e037c875b044)
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 6.0.0
Posting it in @eladsegal's format:
For `squad`:
Saving examples using current `to_json` in 3.63 secs
Saving examples to `from_select1_fast.json` in 5.00 secs
Saving examples to `from_select2_fast.json` in 2.45 secs
Saving examples to `from_select3_fast.json` in 2.50 secs
For `squad_v2`:
Saving examples using current `to_json` in 5.26 secs
Saving examples to `from_select1_fast.json` in 7.54 secs
Saving examples to `from_select2_fast.json` in 3.80 secs
Saving examples to `from_select3_fast.json` in 3.67 secs | [
-1.2137080430984497,
-0.8372902870178223,
-0.6714797616004944,
1.591268539428711,
-0.1291210651397705,
-1.2330650091171265,
0.14826054871082306,
-1.109679102897644,
1.7774358987808228,
-0.7751173973083496,
0.37465742230415344,
-1.573467493057251,
0.05918078124523163,
-0.6332323551177979,
-0.7682444453239441,
-0.7659955620765686,
-0.4470490515232086,
-0.6855776309967041,
1.0072795152664185,
2.5083324909210205,
1.3094679117202759,
-1.3739222288131714,
2.7336535453796387,
0.640549898147583,
-0.19902105629444122,
-0.9582007527351379,
0.4582649767398834,
0.024686014279723167,
-1.256427526473999,
-0.408905029296875,
-0.9291317462921143,
-0.15018276870250702,
-0.4573093354701996,
-0.5531607270240784,
0.10880324989557266,
0.45802828669548035,
-0.3942616283893585,
-0.4486306607723236,
-0.4734397828578949,
-0.7568912506103516,
0.3994843065738678,
-0.3184531331062317,
0.9778416752815247,
-0.32555389404296875,
1.72575843334198,
-0.5445041656494141,
0.5762755870819092,
0.7769297957420349,
1.290474772453308,
0.11952494829893112,
0.002407907508313656,
0.38400527834892273,
0.35180893540382385,
0.03018880821764469,
0.6435171365737915,
1.160801649093628,
0.7112809419631958,
0.45366033911705017,
0.7033937573432922,
-2.173259735107422,
1.2854329347610474,
-0.9788285493850708,
0.21074903011322021,
1.337427020072937,
-0.9878935217857361,
0.31685182452201843,
-1.7612205743789673,
-0.03684057667851448,
0.5813978910446167,
-2.2744967937469482,
0.29438528418540955,
-1.3468718528747559,
-0.4873446822166443,
1.18769371509552,
0.3384079039096832,
-1.258029580116272,
0.015981096774339676,
-0.45038479566574097,
1.0410977602005005,
0.4042283594608307,
1.1130626201629639,
-1.6454288959503174,
-0.06354080140590668,
-0.23003897070884705,
0.12890169024467468,
-1.2033995389938354,
-1.499556303024292,
0.5960560441017151,
0.5873303413391113,
0.6504996418952942,
-0.1592886745929718,
0.9929193258285522,
-1.0476531982421875,
0.7333348989486694,
-1.0194426774978638,
-1.807669758796692,
-1.3520790338516235,
-2.2988815307617188,
-2.299868106842041,
0.7356550693511963,
-0.43523943424224854,
-0.5311713814735413,
2.1626124382019043,
-1.0258718729019165,
-1.782921314239502,
0.9625974297523499,
0.23788048326969147,
-0.07590221613645554,
2.409205913543701,
0.2435602843761444,
-0.7197288274765015,
0.48857757449150085,
-0.6362506747245789,
0.6592596769332886,
-0.27970924973487854,
1.2437793016433716,
0.4110601246356964,
-1.1211738586425781,
1.5379759073257446,
-0.29616570472717285,
0.6588623523712158,
-0.6838601231575012,
-0.4280351400375366,
-0.710878849029541,
0.27877098321914673,
2.0060665607452393,
-0.2613571286201477,
1.4302332401275635,
-0.25864091515541077,
-1.6451760530471802,
-1.6110869646072388,
0.8208406567573547,
0.5590331554412842,
-0.6515827775001526,
0.18199509382247925,
-0.497232049703598,
0.10900985449552536,
-0.047969624400138855,
1.1786233186721802,
1.2989063262939453,
0.8571467995643616,
-0.37758326530456543,
-0.7710138559341431,
0.2362184077501297,
-0.012140808627009392,
-0.7537173628807068,
-1.774520754814148,
-0.2720029950141907,
0.11432082206010818,
0.6327452659606934,
-1.1695326566696167,
1.7811790704727173,
0.7856499552726746,
1.8637056350708008,
1.1071922779083252,
-0.30372074246406555,
1.5239827632904053,
0.008174914866685867,
1.8644071817398071,
-0.42689621448516846,
0.5466166138648987,
-0.3180651366710663,
-1.1278352737426758,
0.7904641032218933,
-0.36539119482040405,
-2.179394006729126,
-0.7465603351593018,
-0.7127201557159424,
-0.15276211500167847,
-0.7511016130447388,
0.9267981052398682,
-0.16100792586803436,
-1.3248525857925415,
0.18059298396110535,
-0.7151966094970703,
0.1121186763048172,
-1.2264169454574585,
0.38172784447669983,
0.6810038089752197,
-0.677982747554779,
0.10439863055944443,
-0.320779949426651,
-1.3118022680282593,
-0.47443708777427673,
0.38079705834388733,
1.8714405298233032,
-0.7762084603309631,
0.9523302316665649,
1.0174978971481323,
-0.7605644464492798,
-0.0038499096408486366,
0.3516097962856293,
-0.36648106575012207,
0.8317007422447205,
-1.136433482170105,
-0.40949851274490356,
1.15950608253479,
-0.2576006054878235,
-0.6073765158653259,
1.4634805917739868,
0.6616864800453186,
-1.0298988819122314,
-0.15954650938510895,
-0.1576874703168869,
-0.8475634455680847,
0.09907890111207962,
-1.5822582244873047,
-0.14885906875133514,
0.45877546072006226,
-1.560928463935852,
-0.49567165970802307,
-0.15135081112384796,
1.362007975578308,
-0.14409451186656952,
1.4577512741088867,
-0.20701636373996735,
-0.1627969890832901,
-0.31309646368026733,
-0.38095584511756897,
0.011480076238512993,
-0.13243445754051208,
-0.5840935707092285,
0.20609384775161743,
-0.7229498028755188,
0.4093731641769409,
1.3979724645614624,
0.273854523897171,
-0.048429109156131744,
0.5607413649559021,
1.077839732170105,
0.37764814496040344,
-0.16253073513507843,
-0.8971874713897705,
-1.6435812711715698,
2.0617687702178955,
-1.428838849067688,
1.995671272277832,
0.7198930382728577,
-0.04153144359588623,
-1.7458621263504028,
-1.9703236818313599,
1.4547946453094482,
1.1098593473434448,
2.4199934005737305,
0.5265308618545532,
0.43167951703071594,
-0.7945575714111328,
-0.7333788871765137,
0.3224983811378479,
-0.9989746809005737,
-0.7615947723388672,
0.13431917130947113,
2.4354970455169678,
1.783478021621704,
-0.3853157162666321,
-0.15412244200706482,
-0.940540075302124,
1.4208818674087524,
-0.27850422263145447,
0.15587367117404938,
2.0055861473083496,
-0.21213556826114655,
-0.9944948554039001,
1.3668711185455322,
-2.3520896434783936,
0.19453659653663635,
2.0304031372070312,
0.19697047770023346,
0.04634471982717514,
-1.40126633644104,
-0.578635573387146,
-0.24665074050426483,
-0.3638211488723755,
-1.2586654424667358,
0.5373331308364868,
-0.22342655062675476,
-0.8014398813247681,
-1.396301031112671,
0.21883849799633026,
-1.1160708665847778,
-1.625508189201355,
0.1852724552154541,
1.8935614824295044,
2.014347553253174,
-0.7642648220062256,
1.6270331144332886,
-0.2516535520553589,
0.12491557747125626,
1.1963200569152832,
1.1942881345748901,
3.164121150970459,
1.9323716163635254,
-1.4032164812088013,
0.6763256192207336,
-0.17546260356903076,
-0.5160280466079712,
1.083134412765503,
-1.2705591917037964,
1.2741234302520752,
-0.21868295967578888,
-1.2346103191375732,
-1.2582242488861084,
0.9656978249549866,
0.564658522605896,
0.07369613647460938,
-0.48837581276893616,
1.1665748357772827,
0.058104828000068665,
1.3611165285110474,
0.4792975187301636,
-0.31087663769721985,
0.6597527861595154,
-0.4514112174510956,
-0.4534182548522949,
1.545310378074646,
0.1748083382844925,
-1.382669448852539,
-2.2592904567718506,
-0.26858919858932495,
-0.8528195023536682,
0.11483597010374069,
-0.5880743265151978,
-0.9068962335586548,
1.6124656200408936,
0.4800436794757843,
-1.2212001085281372,
-0.2936323285102844,
-0.22388948500156403,
-0.618057370185852,
2.680602550506592,
-1.3020262718200684,
-0.15084485709667206,
-1.1180959939956665,
-0.6875455379486084,
1.6328829526901245,
-1.1726484298706055,
-0.248247891664505,
-1.017461895942688,
-0.5366277098655701,
-1.2721662521362305,
-0.5494992733001709,
0.09753834456205368,
-0.869268536567688,
0.8865725994110107,
0.11187433451414108,
-1.255617618560791,
-0.321854829788208,
-0.884462296962738,
0.9918502569198608,
-0.1791306436061859,
0.0443706139922142,
1.6957794427871704,
0.33055201172828674,
-0.43932661414146423,
0.6840270757675171,
1.145277976989746,
0.6330736875534058,
-0.6730411052703857,
0.2616565227508545,
-0.8154237270355225,
0.39466801285743713,
-1.2952961921691895,
0.3280717432498932,
-2.8381805419921875,
0.6233226656913757,
-0.09067592769861221,
-0.04997923970222473,
-0.06223698705434799,
-1.3395909070968628,
1.0758811235427856,
2.6435046195983887,
-1.1758513450622559,
0.555865466594696,
0.3021339476108551,
1.1795138120651245,
-1.5244158506393433,
0.2108452469110489,
-0.4515005946159363,
2.1116561889648438,
0.15428952872753143,
1.30618155002594,
-0.42554718255996704,
-2.3151185512542725,
0.6841660737991333,
-1.269591212272644,
-1.1853550672531128,
0.7660461664199829,
-0.8655824661254883,
0.07596174627542496,
-1.2206612825393677,
-0.20848938822746277,
-0.8038433790206909,
-1.152321696281433,
0.617475152015686,
0.14968648552894592,
0.4777325689792633,
-0.6251083612442017,
0.33966079354286194,
-2.1557209491729736,
-1.3035297393798828,
-0.21983011066913605,
-1.036381721496582,
0.40102460980415344,
-0.37280458211898804,
0.6846343874931335,
-0.13362626731395721,
0.030038027092814445,
0.37477239966392517,
1.4546098709106445,
3.2750682830810547,
0.06634398549795151,
0.3022305965423584,
-0.26637086272239685,
-0.9805994629859924,
1.4349910020828247,
0.8440648317337036,
-0.16606268286705017,
-0.5542799830436707,
-1.129827857017517,
1.1378084421157837,
1.9747735261917114,
1.0107991695404053,
0.0436757430434227,
-0.9764325022697449,
-0.7839135527610779,
-0.0031518395990133286,
0.1412229984998703,
0.5303491353988647,
0.921937108039856,
0.10082133114337921,
-0.05068482458591461,
1.3699045181274414,
1.2126356363296509,
-0.2697070837020874,
0.3810509741306305,
-0.8153538703918457,
-0.4325569272041321,
0.5014054179191589,
0.3046260476112366,
-0.08171749114990234,
0.22590863704681396,
-1.0278593301773071,
-0.15052112936973572,
-0.4274239242076874,
-0.886065661907196,
-0.7524296045303345,
-0.38793739676475525,
-0.3623918294906616,
1.744320034980774,
0.07294081151485443,
-0.5694651007652283,
-0.04867599159479141,
-0.8299556374549866,
-0.00173244159668684,
-0.9786695241928101,
0.30924874544143677,
-0.20935554802417755,
-0.1636698693037033,
-0.15136492252349854,
1.727035403251648,
-0.999750018119812,
-2.0369246006011963,
0.29166340827941895,
0.18730048835277557,
-0.3033188283443451,
0.2294723391532898,
1.6327351331710815,
0.6780492067337036,
1.469638705253601,
1.310490369796753,
1.0647351741790771,
-0.7304340600967407,
-1.305024266242981,
0.629927933216095,
0.9980571269989014,
-1.4337222576141357,
0.6703954339027405,
-0.03399721533060074,
-0.46562400460243225,
0.5310900807380676,
1.2889456748962402,
0.4606764614582062,
-2.0021255016326904,
0.8167604804039001,
-0.9498937129974365,
0.7000705003738403,
0.7137395143508911,
0.6505101919174194,
0.188113734126091,
0.7930816411972046,
-1.220616340637207,
-1.1075130701065063,
-0.692521870136261,
-0.7719897031784058,
2.00506329536438,
-0.33910003304481506,
0.6010715365409851,
-0.16531407833099365,
-1.3939251899719238,
-0.11510571092367172,
0.6945681571960449,
0.41045570373535156,
-0.4600638449192047,
0.7743926048278809,
-0.6356791853904724,
-1.0381489992141724,
-1.391707420349121,
-0.49816620349884033,
-1.0630158185958862,
-0.9031818509101868,
1.0052586793899536,
0.7887699604034424,
0.3855404555797577,
1.8299353122711182,
0.6484178304672241,
0.33953356742858887,
-2.58162522315979,
0.8911802172660828,
0.3007626235485077,
-0.10836739838123322,
0.8471418619155884,
0.4457375705242157,
0.9889260530471802,
-0.040027376264333725,
0.6015666723251343,
-2.390414237976074,
2.3305773735046387,
-0.10078655183315277,
0.6322951316833496,
0.027149422094225883,
-0.207622691988945,
1.0665228366851807,
0.5411627292633057,
0.556815505027771,
-1.1531651020050049,
0.7022947072982788,
-0.5868847370147705,
1.3015007972717285,
0.7516821622848511,
-0.811560869216919,
-0.12690672278404236,
1.295224666595459,
0.4022434651851654,
-0.5764225721359253,
-1.007347583770752,
-1.0625747442245483,
0.9607418179512024,
1.7506589889526367,
-0.14047667384147644,
0.01058419793844223,
0.8047235608100891,
0.7592630386352539,
-1.3353369235992432,
0.026458287611603737,
-0.7556158304214478,
-0.7988256216049194,
1.6142456531524658,
2.1393489837646484,
-0.08568580448627472,
-0.23346224427223206,
-0.8708032369613647,
-1.2156484127044678,
0.8287525773048401,
0.07722687721252441,
0.037477873265743256,
0.676129162311554,
-0.6046927571296692,
1.1111105680465698,
0.9304865598678589,
0.9797770977020264,
0.12372557073831558,
0.35023263096809387,
0.32717782258987427,
-0.37336257100105286,
-1.1887569427490234,
-0.2437325268983841,
-0.9531711339950562,
-2.612720251083374,
0.4379538297653198,
-0.22591572999954224,
-1.3848516941070557,
-0.0003695618361234665,
-0.9692196249961853,
0.8341394662857056,
-0.5726975202560425,
-1.1646301746368408,
-1.4497350454330444,
0.20362898707389832,
-0.14112655818462372,
0.975453794002533,
-1.5518732070922852,
-0.11499450355768204,
1.2508071660995483,
0.9751724004745483,
-0.6935309767723083,
0.9772884845733643,
0.15471650660037994,
0.9605604410171509,
0.8503352999687195,
-0.2958202660083771,
0.5344946384429932,
0.061643026769161224,
-1.316149115562439,
0.4439781606197357,
1.206594705581665,
0.20921209454536438,
1.4823803901672363,
-0.6311560273170471,
-0.032749779522418976,
0.4382874667644501,
-0.5264405012130737,
-0.45450904965400696,
-0.4796206057071686,
0.7398930191993713,
0.02408543787896633,
-0.9331197738647461,
0.057198524475097656,
-0.024603212252259254,
-0.15854790806770325,
0.11544250696897507,
-1.521429181098938,
-0.056717537343502045,
-0.3132634162902832,
-0.6188369989395142,
-1.1856008768081665,
-0.06290202587842941,
1.2409380674362183,
-0.8317865133285522,
-0.24692529439926147,
0.40778836607933044,
0.31491050124168396,
0.5358268022537231,
0.6234681606292725,
-0.7648147344589233,
-0.3241834044456482,
-0.3334294259548187,
-0.38568153977394104,
0.3196198642253876,
1.3380628824234009,
0.025736281648278236,
-0.9519559741020203,
0.6397778987884521,
-0.3730250895023346,
0.11176417022943497,
1.9074972867965698,
0.10262297093868256,
-0.8239616751670837,
0.3156243562698364,
-0.7436437606811523,
1.9036399126052856,
1.6983075141906738,
1.326210618019104,
-0.08976048231124878,
-1.0801820755004883,
0.6447534561157227,
-0.44318851828575134,
-0.38182881474494934,
0.9177013039588928,
0.34054121375083923,
-0.2774598300457001,
-1.3454179763793945,
0.6701339483261108,
1.2757368087768555,
-0.9096791744232178,
-0.8116845488548279,
0.17641696333885193,
-0.7905758023262024,
1.0613375902175903,
0.7459900975227356,
0.2990579605102539,
0.2673180401325226,
1.5221748352050781,
0.7871147394180298,
-0.4980360269546509,
0.5401542782783508,
0.4882745146751404,
-0.1696302890777588,
-1.9643902778625488,
-1.0952798128128052,
0.3589800298213959,
-0.6151493787765503,
-1.5359933376312256,
1.4024845361709595,
-1.1882394552230835,
-0.9583380222320557,
0.5007747411727905,
0.08848903328180313,
1.502877950668335,
0.4053182005882263,
1.6004830598831177,
2.07161808013916,
0.9509392976760864,
0.40371251106262207,
1.282960295677185,
-0.22607426345348358,
-0.5252519845962524,
1.789477825164795,
-0.5544893741607666,
0.4085959494113922,
1.1168334484100342,
-0.31003355979919434,
-1.0769336223602295,
-0.8945695161819458,
-1.1815297603607178,
-0.7665340900421143,
1.1537171602249146,
0.10817815363407135,
-1.0723825693130493,
0.22992689907550812,
1.630523681640625,
0.25372350215911865,
-0.24335625767707825,
0.6455568075180054,
0.36657771468162537,
-0.8060865998268127,
-0.07471519708633423,
-0.8422040939331055,
0.5806839466094971,
-0.30577412247657776,
-0.37683066725730896,
0.3179028332233429,
0.4428505003452301,
1.2849828004837036,
-0.03831043839454651,
0.04197250306606293,
1.1858890056610107,
-1.4554307460784912,
1.4899189472198486,
-0.6908493638038635,
0.3559272587299347,
-2.3800835609436035,
1.4079883098602295,
-0.8390436768531799,
1.920454502105713,
-2.6318273544311523,
0.44437888264656067,
-0.53216552734375,
-0.3987196683883667,
0.2310517430305481,
-0.25484663248062134,
0.17832110822200775,
-0.12517769634723663,
-1.2171725034713745,
-0.23284290730953217,
-0.7171300053596497,
0.6659539341926575,
1.1028027534484863,
1.3465006351470947,
-1.0247946977615356,
-0.26132941246032715,
-1.7708910703659058,
-0.1915821135044098,
-0.6938557028770447,
0.35368213057518005,
-1.899638295173645,
-0.21805211901664734,
-1.8900418281555176,
-2.4038589000701904,
-1.2453383207321167,
-0.8293294310569763,
1.1426701545715332,
0.06863750517368317,
-0.8970735669136047,
1.234129786491394,
-0.2820341885089874,
-1.7854127883911133,
1.1337971687316895,
-2.203592538833618
] |
https://github.com/huggingface/datasets/issues/3416 | disaster_response_messages unavailable | Hi, thanks for reporting! This is a duplicate of https://github.com/huggingface/datasets/issues/3240. We are working on a fix.
| ## Dataset viewer issue for '* disaster_response_messages*'
**Link:** https://huggingface.co/datasets/disaster_response_messages
Dataset unavailable. Link dead: https://datasets.appen.com/appen_datasets/disaster_response_data/disaster_response_messages_training.csv
Am I the one who added this dataset ?No
| 1,060 | 16 | disaster_response_messages unavailable
## Dataset viewer issue for '* disaster_response_messages*'
**Link:** https://huggingface.co/datasets/disaster_response_messages
Dataset unavailable. Link dead: https://datasets.appen.com/appen_datasets/disaster_response_data/disaster_response_messages_training.csv
Am I the one who added this dataset ?No
Hi, thanks for reporting! This is a duplicate of https://github.com/huggingface/datasets/issues/3240. We are working on a fix.
| [
-1.1833727359771729,
-0.9605250358581543,
-0.8368156552314758,
1.4942713975906372,
-0.17585493624210358,
-1.4638535976409912,
0.1453184336423874,
-0.8957908153533936,
1.6195783615112305,
-0.6461469531059265,
0.14801852405071259,
-1.7512753009796143,
-0.15674875676631927,
-0.4989166557788849,
-0.6371636986732483,
-0.9897916316986084,
-0.3872760534286499,
-0.7977967262268066,
0.9974715113639832,
2.3815560340881348,
1.2117295265197754,
-1.359946370124817,
2.742544174194336,
0.5626236796379089,
-0.35162803530693054,
-1.1205193996429443,
0.5650873780250549,
0.14360399544239044,
-1.1144161224365234,
-0.5424140691757202,
-0.7823197841644287,
0.005732085555791855,
-0.5155245661735535,
-0.269276887178421,
0.11667598783969879,
0.6520354151725769,
-0.10849282145500183,
-0.25885117053985596,
-0.5240135788917542,
-0.6538097858428955,
0.3992065489292145,
-0.3394809663295746,
0.9214444160461426,
-0.4719623923301697,
1.7036941051483154,
-0.6454110741615295,
0.30641692876815796,
0.7826991677284241,
1.3581024408340454,
0.06111203134059906,
-0.03590220957994461,
0.07908900082111359,
0.38408762216567993,
0.017757317051291466,
0.3919401168823242,
1.1486287117004395,
0.41250234842300415,
0.507727324962616,
0.5217803716659546,
-2.189927816390991,
1.4176723957061768,
-0.8853288292884827,
0.32247722148895264,
1.4926246404647827,
-0.8879300951957703,
0.35575371980667114,
-1.7220358848571777,
0.01160743460059166,
0.6709879636764526,
-2.3635239601135254,
0.221082404255867,
-1.3136099576950073,
-0.6805340647697449,
0.8499749302864075,
0.3717260956764221,
-1.180184245109558,
0.10792373865842819,
-0.5270922183990479,
1.0780267715454102,
0.6968392133712769,
1.0654957294464111,
-1.6007192134857178,
-0.05980359762907028,
-0.1162262037396431,
-0.1750551015138626,
-1.3824470043182373,
-1.452842354774475,
0.5946223139762878,
0.6072438359260559,
0.7743815183639526,
-0.08866401761770248,
0.840284526348114,
-0.9817092418670654,
0.8886669278144836,
-0.9950109124183655,
-1.5183806419372559,
-1.4333815574645996,
-2.4318692684173584,
-2.416003465652466,
0.8614531755447388,
-0.4527812898159027,
-0.4318888783454895,
1.9134901762008667,
-0.9295107126235962,
-1.8099151849746704,
1.1004793643951416,
0.32336243987083435,
0.22005198895931244,
2.3893883228302,
0.2693338394165039,
-0.737948477268219,
0.32845866680145264,
-0.8084093332290649,
0.8316345810890198,
-0.3797077536582947,
1.4139395952224731,
0.6931123733520508,
-0.9700061678886414,
1.5128657817840576,
-0.45336446166038513,
0.5940075516700745,
-0.6689832210540771,
-0.6761450171470642,
-0.8670332431793213,
0.32145243883132935,
1.789312720298767,
-0.2683703899383545,
1.6080420017242432,
-0.44979920983314514,
-1.6195365190505981,
-1.4919719696044922,
0.8852491974830627,
0.4693452715873718,
-1.0467833280563354,
0.03293097764253616,
-0.5423904061317444,
0.010009035468101501,
-0.1646835207939148,
1.1884673833847046,
1.0174082517623901,
0.7098944187164307,
-0.5404146313667297,
-0.7376186847686768,
0.27236634492874146,
-0.09957583248615265,
-0.7375196814537048,
-1.8267322778701782,
-0.37298160791397095,
0.2812320590019226,
0.5274955630302429,
-1.2231539487838745,
1.6500422954559326,
0.9191266894340515,
2.085273265838623,
0.7938024401664734,
-0.38976550102233887,
1.3581353425979614,
-0.19680580496788025,
1.7906286716461182,
-0.6641808152198792,
0.618490993976593,
-0.2723935842514038,
-1.0901858806610107,
0.816588282585144,
-0.38678961992263794,
-1.9801180362701416,
-1.0196503400802612,
-0.9331499338150024,
-0.15586194396018982,
-0.6936482787132263,
0.913330614566803,
-0.31190940737724304,
-1.4467236995697021,
-0.015057098120450974,
-0.6395896077156067,
0.21860754489898682,
-1.2580641508102417,
0.13114669919013977,
0.7971314191818237,
-0.5613005757331848,
-0.15724775195121765,
-0.15361659228801727,
-1.3527566194534302,
-0.5647197961807251,
0.5398570895195007,
1.848798394203186,
-0.5871807932853699,
0.903857409954071,
0.8777062892913818,
-0.703917384147644,
0.28862467408180237,
0.01335006020963192,
-0.2803930938243866,
0.789695143699646,
-0.9900486469268799,
-0.38264572620391846,
1.1469836235046387,
-0.2950455844402313,
-0.7937304377555847,
1.7049148082733154,
0.8085780739784241,
-0.9272645711898804,
-0.2514992654323578,
-0.33752524852752686,
-0.7803509831428528,
-0.027140041813254356,
-1.5018123388290405,
-0.14466644823551178,
0.24671678245067596,
-1.4185808897018433,
-0.45583856105804443,
-0.1990266889333725,
1.4134271144866943,
-0.2058926373720169,
1.285792350769043,
-0.281773179769516,
-0.2368529886007309,
-0.49214300513267517,
-0.3954674005508423,
0.2751559615135193,
-0.31351232528686523,
-0.5339672565460205,
0.23387400805950165,
-0.9736734628677368,
0.28711965680122375,
1.4580224752426147,
0.3342249393463135,
0.10723195225000381,
0.48511096835136414,
1.0817285776138306,
0.31007838249206543,
-0.18374866247177124,
-0.8196821808815002,
-1.5305182933807373,
1.8915640115737915,
-1.4547860622406006,
1.810328722000122,
0.6457093358039856,
-0.20615768432617188,
-1.7500261068344116,
-1.920993447303772,
1.208713412284851,
1.1670423746109009,
2.249849557876587,
0.40440815687179565,
0.328756183385849,
-0.8519768118858337,
-0.8700414299964905,
0.16014768183231354,
-1.0831024646759033,
-0.5724923610687256,
0.08175074309110641,
2.2725939750671387,
1.7990635633468628,
-0.7188505530357361,
-0.22625473141670227,
-1.0041232109069824,
1.2651759386062622,
-0.24760118126869202,
0.38943853974342346,
2.061836004257202,
-0.37828296422958374,
-0.8438568711280823,
1.2944377660751343,
-2.2926433086395264,
0.26946985721588135,
2.1445987224578857,
0.3945544362068176,
0.22513358294963837,
-1.5711426734924316,
-0.6352869272232056,
-0.41128093004226685,
-0.5098820328712463,
-1.156670331954956,
0.6642018556594849,
-0.312407910823822,
-1.015121340751648,
-1.3279082775115967,
0.12273895740509033,
-1.170474648475647,
-1.7874109745025635,
0.47636890411376953,
1.9379712343215942,
2.008735418319702,
-0.7216379642486572,
1.3893810510635376,
-0.2585497200489044,
-0.024486925452947617,
1.3636995553970337,
1.2097902297973633,
2.978255033493042,
1.8298981189727783,
-1.099064826965332,
0.8347604274749756,
-0.052719056606292725,
-0.45852911472320557,
1.1128151416778564,
-1.0598753690719604,
1.0960025787353516,
-0.3051561713218689,
-1.1624950170516968,
-1.3532443046569824,
1.101234793663025,
0.594291090965271,
0.04152216762304306,
-0.5872246623039246,
1.3433226346969604,
-0.024906033650040627,
1.2867172956466675,
0.6122126579284668,
-0.5753114223480225,
0.5149029493331909,
-0.4898283779621124,
-0.5511191487312317,
1.5130479335784912,
0.3043025732040405,
-1.7038778066635132,
-2.2808148860931396,
-0.38094672560691833,
-0.7999364733695984,
-0.14949138462543488,
-0.5419132113456726,
-1.1084309816360474,
1.6558042764663696,
0.5594784021377563,
-1.3378214836120605,
-0.26827335357666016,
-0.24557249248027802,
-0.4872967004776001,
2.7307255268096924,
-1.2040116786956787,
-0.04804527014493942,
-0.7989897727966309,
-0.36706826090812683,
1.8514114618301392,
-1.2427618503570557,
-0.168762668967247,
-1.0553309917449951,
-0.7326875329017639,
-1.4126132726669312,
-0.3724188208580017,
0.04862350970506668,
-1.0582672357559204,
0.8117220401763916,
-0.19919492304325104,
-1.0097867250442505,
-0.29926958680152893,
-0.7866790294647217,
1.1799252033233643,
-0.0800752341747284,
0.20270857214927673,
1.9127510786056519,
0.31821107864379883,
-0.398464173078537,
0.7057251930236816,
1.2005831003189087,
0.6832288503646851,
-0.7961167097091675,
0.06872767210006714,
-0.5160356760025024,
0.2926143705844879,
-1.442294955253601,
0.2626814842224121,
-3.094939708709717,
0.7047297954559326,
-0.11317308247089386,
-0.1848979890346527,
-0.116151362657547,
-1.3766762018203735,
1.272573709487915,
2.4942688941955566,
-1.2999484539031982,
0.5157230496406555,
0.4631239175796509,
1.0473681688308716,
-1.5336717367172241,
0.4991660416126251,
-0.4771876931190491,
2.0559568405151367,
0.20021387934684753,
1.3723376989364624,
-0.5369023084640503,
-1.9184234142303467,
0.6633316874504089,
-1.2200640439987183,
-0.9326655864715576,
0.7737827897071838,
-0.9657281637191772,
0.38863083720207214,
-1.6766794919967651,
-0.12227264791727066,
-0.8995147943496704,
-1.410793662071228,
0.7411572337150574,
0.2045753449201584,
0.2697868049144745,
-0.5572177767753601,
0.45136192440986633,
-2.2260751724243164,
-1.3446918725967407,
-0.2613627314567566,
-0.9856299757957458,
0.5232231020927429,
-0.398023396730423,
0.5122148990631104,
0.1365222930908203,
0.23016539216041565,
0.24213244020938873,
1.4219210147857666,
3.4578001499176025,
0.05426236242055893,
0.12346474826335907,
-0.027699103578925133,
-0.9356710910797119,
1.4589896202087402,
1.2060625553131104,
0.14000225067138672,
-0.5627754330635071,
-0.8654348850250244,
1.3586292266845703,
2.050260066986084,
1.1002545356750488,
0.08415596187114716,
-0.8365060091018677,
-0.5954075455665588,
-0.02700388804078102,
0.22031137347221375,
0.63504958152771,
0.9239656925201416,
-0.04185709357261658,
0.13736259937286377,
1.4174646139144897,
1.1820157766342163,
-0.22365380823612213,
0.45580801367759705,
-1.1459194421768188,
-0.40629762411117554,
0.29226380586624146,
0.2212272435426712,
-0.03804304450750351,
0.6911794543266296,
-1.0935646295547485,
-0.21469666063785553,
-0.23251959681510925,
-0.9234893321990967,
-0.6453584432601929,
-0.5021645426750183,
-0.6205898523330688,
1.6181303262710571,
0.11626741290092468,
-0.5730984807014465,
0.08524477481842041,
-0.6337843537330627,
-0.25871217250823975,
-1.1133347749710083,
0.26298099756240845,
-0.10827705264091492,
0.024577612057328224,
-0.27694129943847656,
1.6957486867904663,
-0.9619949460029602,
-2.1907384395599365,
0.1577388346195221,
0.3660051226615906,
-0.407686710357666,
0.09984124451875687,
1.6263142824172974,
0.43207645416259766,
1.4048590660095215,
1.2455427646636963,
1.0425786972045898,
-0.5579161047935486,
-1.2988364696502686,
0.6347784996032715,
1.040505051612854,
-1.2730330228805542,
0.9975563883781433,
-0.17678211629390717,
-0.44978055357933044,
0.7538858652114868,
1.224151611328125,
0.40880483388900757,
-1.9690842628479004,
0.9061133861541748,
-0.9391016364097595,
0.9007195234298706,
0.6432377099990845,
0.8905050158500671,
0.3654959499835968,
0.9327613115310669,
-1.2641929388046265,
-1.1452622413635254,
-0.8513427376747131,
-0.6600276231765747,
1.9327093362808228,
-0.2551702558994293,
0.6156184077262878,
-0.10761003941297531,
-1.001557469367981,
-0.12151609361171722,
0.8224111795425415,
0.43388697504997253,
-0.3917188048362732,
0.9463983774185181,
-0.5309200286865234,
-0.8432868719100952,
-1.2217414379119873,
-0.4238886535167694,
-0.8599562644958496,
-0.9935656189918518,
0.9829260110855103,
0.8292561769485474,
0.5199007391929626,
1.8098629713058472,
0.5127253532409668,
0.45391595363616943,
-2.621133327484131,
0.8738937973976135,
0.2719308137893677,
0.16002176702022552,
0.8234330415725708,
0.24847452342510223,
1.2811574935913086,
0.045677848160266876,
0.4901232421398163,
-2.2197182178497314,
2.034496307373047,
-0.17569345235824585,
0.5447112917900085,
0.08789438009262085,
-0.1187090054154396,
1.1781470775604248,
0.6017267107963562,
0.5553127527236938,
-1.097191333770752,
0.8598002791404724,
-0.445097416639328,
1.0639961957931519,
0.9002595543861389,
-0.7422073483467102,
-0.022463900968432426,
1.4048104286193848,
0.6346670389175415,
-0.40240535140037537,
-1.0005751848220825,
-0.696399450302124,
0.8892933130264282,
1.5999168157577515,
-0.015126221813261509,
-0.11323007196187973,
0.8327895998954773,
0.6033648252487183,
-1.0490007400512695,
0.06044229120016098,
-0.6627564430236816,
-0.5063229203224182,
1.72023606300354,
2.0587778091430664,
-0.10423225164413452,
-0.08148886263370514,
-0.6316642165184021,
-1.0776467323303223,
0.5776857137680054,
-0.17898571491241455,
-0.008536305278539658,
0.6451544761657715,
-0.619881808757782,
1.0788177251815796,
0.4372299015522003,
0.9972615838050842,
-0.23755203187465668,
0.43618711829185486,
0.40466922521591187,
-0.20207983255386353,
-1.3594534397125244,
-0.47247904539108276,
-1.211737871170044,
-2.6124937534332275,
0.44649386405944824,
-0.4118352234363556,
-1.377672791481018,
0.019972866401076317,
-1.336741328239441,
1.0216447114944458,
-0.7161061763763428,
-1.1137794256210327,
-1.509379267692566,
0.21056634187698364,
-0.17948584258556366,
0.947906494140625,
-1.636196494102478,
-0.11299613863229752,
1.3427118062973022,
0.6484881043434143,
-0.6591858267784119,
1.0632941722869873,
0.3488450348377228,
1.1029083728790283,
0.5692455172538757,
-0.3766840398311615,
0.49105140566825867,
0.12851294875144958,
-1.4264010190963745,
0.5895337462425232,
1.1464977264404297,
0.14258460700511932,
1.3724172115325928,
-0.6016165614128113,
0.16608545184135437,
0.6488398909568787,
-0.7483590841293335,
-0.4568443298339844,
-0.4232487976551056,
0.865367591381073,
0.17495611310005188,
-1.1496074199676514,
-0.0015368182212114334,
-0.2875884175300598,
-0.3864656984806061,
0.2927868962287903,
-1.481637716293335,
-0.5216076970100403,
-0.3713446259498596,
-0.4183131754398346,
-1.3878079652786255,
0.12766699492931366,
1.2826532125473022,
-0.7292248606681824,
-0.2424042820930481,
0.5093874335289001,
0.48512008786201477,
0.609247624874115,
0.7469761371612549,
-0.7532784938812256,
-0.0386759415268898,
-0.44172826409339905,
-0.16678386926651,
0.24816514551639557,
1.2646243572235107,
-0.15368762612342834,
-1.0801289081573486,
0.7774100303649902,
-0.4070422947406769,
0.10491606593132019,
2.18751859664917,
0.05293212831020355,
-0.809361457824707,
0.383029967546463,
-0.7630645036697388,
1.8848096132278442,
1.5104938745498657,
1.2971198558807373,
-0.11921554058790207,
-0.7449284791946411,
0.47106027603149414,
-0.11062345653772354,
-0.28839972615242004,
0.7555537223815918,
0.5525188446044922,
-0.1992451548576355,
-1.3606247901916504,
0.6566571593284607,
1.182744026184082,
-0.9962015151977539,
-0.8257027268409729,
0.2013629972934723,
-0.847366213798523,
1.2598460912704468,
0.6316120624542236,
0.4073764681816101,
0.34496548771858215,
1.4848541021347046,
0.6861774921417236,
-0.4354552924633026,
0.33717137575149536,
0.5647915601730347,
-0.11480461806058884,
-2.001516103744507,
-0.9751619100570679,
0.366405189037323,
-0.5560799241065979,
-1.4857808351516724,
1.2607412338256836,
-1.0970169305801392,
-0.9955971837043762,
0.5108064413070679,
0.15001121163368225,
1.4923505783081055,
0.37912318110466003,
1.8092033863067627,
1.9898490905761719,
0.9417415261268616,
0.25169262290000916,
1.4099633693695068,
-0.051462218165397644,
-0.46642443537712097,
1.8491495847702026,
-0.3825710415840149,
0.6117740273475647,
1.1520447731018066,
-0.4272167980670929,
-1.0740711688995361,
-0.7421051859855652,
-1.0277214050292969,
-0.46129873394966125,
1.17214834690094,
0.320472776889801,
-1.1342012882232666,
0.1269676834344864,
1.4033253192901611,
0.26864346861839294,
-0.10224652290344238,
0.5672839283943176,
0.3766264021396637,
-0.782591700553894,
0.00481104850769043,
-0.899370551109314,
0.4354499876499176,
-0.15189096331596375,
-0.3593207597732544,
0.202825665473938,
0.5233813524246216,
1.2073278427124023,
-0.1528678834438324,
0.22595714032649994,
1.0706895589828491,
-1.4049147367477417,
1.4613710641860962,
-0.498626172542572,
0.15225623548030853,
-2.475909948348999,
1.351155161857605,
-0.7256636619567871,
1.9325424432754517,
-2.737943410873413,
0.40720710158348083,
-0.5783578753471375,
-0.4510824978351593,
0.27698251605033875,
-0.42939358949661255,
0.03163860738277435,
-0.07379955798387527,
-1.1345223188400269,
0.11220237612724304,
-0.7573365569114685,
0.5698253512382507,
1.2260324954986572,
1.3083778619766235,
-1.1688653230667114,
-0.33524465560913086,
-1.7103155851364136,
-0.21322248876094818,
-0.95815110206604,
0.44435930252075195,
-2.141324758529663,
0.04522570222616196,
-1.8429752588272095,
-2.2463295459747314,
-1.4219640493392944,
-0.8833519220352173,
1.0321297645568848,
0.2763899266719818,
-0.9237003326416016,
1.177107334136963,
-0.26063480973243713,
-1.694799542427063,
0.9641568660736084,
-2.2036192417144775
] |
https://github.com/huggingface/datasets/issues/3415 | Non-deterministic tests: CI tests randomly fail | I think it might come from two different issues:
1. Google Drive is an unreliable host, mainly because of quota limitations
2. the staging environment can sometimes raise some errors
For Google Drive tests we could set up some retries with backup URLs if necessary I guess.
For staging on the other hand, I guess we can investigate what causes this and discuss with the back-end team | ## Describe the bug
Some CI tests fail randomly.
1. In https://github.com/huggingface/datasets/pull/3375/commits/c10275fe36085601cb7bdb9daee9a8f1fc734f48, there were 3 failing tests, only on Linux:
```
=========================== short test summary info ============================
FAILED tests/test_streaming_download_manager.py::test_streaming_dl_manager_get_extraction_protocol[https://drive.google.com/uc?export=download&id=1k92sUfpHxKq8PXWRr7Y5aNHXwOCNUmqh-zip]
FAILED tests/test_streaming_download_manager.py::test_streaming_gg_drive - Fi...
FAILED tests/test_streaming_download_manager.py::test_streaming_gg_drive_zipped
= 3 failed, 3553 passed, 2950 skipped, 2 xfailed, 1 xpassed, 125 warnings in 192.79s (0:03:12) =
```
2. After re-running the CI (without any change in the code) in https://github.com/huggingface/datasets/pull/3375/commits/57bfe1f342cd3c59d2510b992d5f06a0761eb147, there was only 1 failing test (one on Linux and a different one on Windows):
- On Linux:
```
=========================== short test summary info ============================
FAILED tests/test_streaming_download_manager.py::test_streaming_gg_drive_zipped
= 1 failed, 3555 passed, 2950 skipped, 2 xfailed, 1 xpassed, 125 warnings in 199.76s (0:03:19) =
```
- On Windows:
```
=========================== short test summary info ===========================
FAILED tests/test_load.py::test_load_dataset_builder_for_community_dataset_without_script
= 1 failed, 3551 passed, 2954 skipped, 2 xfailed, 1 xpassed, 121 warnings in 478.58s (0:07:58) =
```
The test `tests/test_streaming_download_manager.py::test_streaming_gg_drive_zipped` passes locally.
3. After re-running again the CI (without any change in the code) in https://github.com/huggingface/datasets/pull/3375/commits/39f32f2119cf91b86867216bb5c356c586503c6a, ALL the tests passed.
| 1,061 | 67 | Non-deterministic tests: CI tests randomly fail
## Describe the bug
Some CI tests fail randomly.
1. In https://github.com/huggingface/datasets/pull/3375/commits/c10275fe36085601cb7bdb9daee9a8f1fc734f48, there were 3 failing tests, only on Linux:
```
=========================== short test summary info ============================
FAILED tests/test_streaming_download_manager.py::test_streaming_dl_manager_get_extraction_protocol[https://drive.google.com/uc?export=download&id=1k92sUfpHxKq8PXWRr7Y5aNHXwOCNUmqh-zip]
FAILED tests/test_streaming_download_manager.py::test_streaming_gg_drive - Fi...
FAILED tests/test_streaming_download_manager.py::test_streaming_gg_drive_zipped
= 3 failed, 3553 passed, 2950 skipped, 2 xfailed, 1 xpassed, 125 warnings in 192.79s (0:03:12) =
```
2. After re-running the CI (without any change in the code) in https://github.com/huggingface/datasets/pull/3375/commits/57bfe1f342cd3c59d2510b992d5f06a0761eb147, there was only 1 failing test (one on Linux and a different one on Windows):
- On Linux:
```
=========================== short test summary info ============================
FAILED tests/test_streaming_download_manager.py::test_streaming_gg_drive_zipped
= 1 failed, 3555 passed, 2950 skipped, 2 xfailed, 1 xpassed, 125 warnings in 199.76s (0:03:19) =
```
- On Windows:
```
=========================== short test summary info ===========================
FAILED tests/test_load.py::test_load_dataset_builder_for_community_dataset_without_script
= 1 failed, 3551 passed, 2954 skipped, 2 xfailed, 1 xpassed, 121 warnings in 478.58s (0:07:58) =
```
The test `tests/test_streaming_download_manager.py::test_streaming_gg_drive_zipped` passes locally.
3. After re-running again the CI (without any change in the code) in https://github.com/huggingface/datasets/pull/3375/commits/39f32f2119cf91b86867216bb5c356c586503c6a, ALL the tests passed.
I think it might come from two different issues:
1. Google Drive is an unreliable host, mainly because of quota limitations
2. the staging environment can sometimes raise some errors
For Google Drive tests we could set up some retries with backup URLs if necessary I guess.
For staging on the other hand, I guess we can investigate what causes this and discuss with the back-end team | [
-1.3706775903701782,
-1.1006470918655396,
-0.5325406789779663,
1.6729052066802979,
-0.31542307138442993,
-0.9156807661056519,
0.24562186002731323,
-0.9856854677200317,
1.4901353120803833,
-0.8412423133850098,
0.28548502922058105,
-1.3652236461639404,
-0.09722921997308731,
-0.6031020879745483,
-0.5637824535369873,
-0.9478112459182739,
-0.352592408657074,
-0.5863786935806274,
1.2326079607009888,
2.2606029510498047,
1.5882633924484253,
-1.3040865659713745,
2.7504372596740723,
1.061686635017395,
-0.4105086922645569,
-1.0364930629730225,
0.5771244764328003,
0.15081466734409332,
-1.201926589012146,
-0.465099960565567,
-0.8967782258987427,
-0.22463658452033997,
-0.5669209957122803,
-0.25802552700042725,
-0.14908632636070251,
0.36458587646484375,
-0.3869645893573761,
-0.2654522955417633,
-0.5295504331588745,
-0.7411975860595703,
0.5597734451293945,
-0.46938368678092957,
0.6133209466934204,
-0.3113614618778229,
1.8778928518295288,
-0.6227302551269531,
0.28420108556747437,
0.8114943504333496,
1.0644813776016235,
0.07818008959293365,
-0.04705396667122841,
0.2720824182033539,
0.3469345271587372,
-0.10406661033630371,
0.7233028411865234,
1.3597731590270996,
0.6935088634490967,
0.5215164422988892,
0.7293112277984619,
-2.143874406814575,
1.2890089750289917,
-0.8921999931335449,
0.47993066906929016,
1.367161750793457,
-0.9227428436279297,
0.5136768817901611,
-1.770429253578186,
-0.056776199489831924,
0.605471134185791,
-2.4230198860168457,
0.5696808099746704,
-1.3887851238250732,
-0.8018096685409546,
0.9156253337860107,
0.2504498362541199,
-1.1284379959106445,
-0.030864400789141655,
-0.7065448760986328,
1.275281310081482,
0.512757420539856,
0.8605525493621826,
-1.7777167558670044,
-0.11177300661802292,
-0.3131597340106964,
0.1544230431318283,
-1.5978243350982666,
-1.4410011768341064,
0.44034019112586975,
0.5610822439193726,
0.7337057590484619,
0.004162698984146118,
1.4090741872787476,
-1.0382174253463745,
0.8129111528396606,
-0.9063961505889893,
-1.5064868927001953,
-1.6646294593811035,
-2.5225300788879395,
-2.0198004245758057,
0.5079759359359741,
-0.32072755694389343,
-0.6121114492416382,
2.0196468830108643,
-0.9892148971557617,
-1.646388053894043,
1.1544464826583862,
0.014802619814872742,
-0.03782735764980316,
2.4018802642822266,
0.14578106999397278,
-0.7897160053253174,
0.29783082008361816,
-0.9161592721939087,
0.6320592164993286,
-0.3109385073184967,
1.3671408891677856,
0.6129409074783325,
-1.162634253501892,
1.6812514066696167,
-0.49251553416252136,
0.4048265516757965,
-0.8055294752120972,
-0.5847570896148682,
-0.6863834857940674,
-0.014523951336741447,
2.0275583267211914,
-0.3422929644584656,
1.510013222694397,
-0.43801578879356384,
-1.2926212549209595,
-1.7464544773101807,
1.0519343614578247,
0.4547867774963379,
-0.7075889110565186,
0.2664041519165039,
-0.3681371510028839,
0.13802289962768555,
-0.08501660078763962,
0.9546626806259155,
1.3924671411514282,
0.6593210697174072,
-0.3065609335899353,
-0.565674901008606,
-0.03483493626117706,
-0.2334887832403183,
-0.6085314750671387,
-1.80343759059906,
-0.34268006682395935,
-0.1091156005859375,
0.5640207529067993,
-1.3435543775558472,
1.650071144104004,
1.0129611492156982,
1.7328463792800903,
0.945664644241333,
-0.4814763069152832,
1.4771188497543335,
0.019721223041415215,
1.625948429107666,
-0.5864344835281372,
0.7896900177001953,
-0.3744405508041382,
-1.210717797279358,
0.776640772819519,
-0.11598394811153412,
-1.9929581880569458,
-0.6824681758880615,
-0.5471640825271606,
-0.09747204184532166,
-0.9136670827865601,
0.7925801277160645,
-0.5039317607879639,
-1.5593550205230713,
0.12921354174613953,
-0.730445146560669,
0.318830281496048,
-1.1703617572784424,
0.4795735478401184,
0.6827397346496582,
-0.5864619016647339,
0.022008594125509262,
-0.3137885332107544,
-0.7785918712615967,
-0.7070759534835815,
0.36501944065093994,
1.8139634132385254,
-0.48112979531288147,
0.6737710237503052,
1.0344510078430176,
-0.7972487211227417,
0.0728706493973732,
0.3815654218196869,
-0.021399417892098427,
0.8245420455932617,
-0.9728595018386841,
-0.5904046297073364,
1.0484131574630737,
-0.13735845685005188,
-0.8797658681869507,
1.4837226867675781,
1.0015407800674438,
-0.8098354339599609,
-0.2862562835216522,
-0.24512691795825958,
-0.7230352163314819,
0.1271706521511078,
-1.3091014623641968,
-0.11051612347364426,
0.5387544631958008,
-1.4647154808044434,
-0.38560670614242554,
-0.17614521086215973,
1.5437328815460205,
-0.37145861983299255,
1.588140606880188,
-0.2063736468553543,
-0.07137132436037064,
-0.15080884099006653,
-0.24027451872825623,
0.16333842277526855,
-0.01759950816631317,
-0.5098245143890381,
0.030205529183149338,
-0.8325046300888062,
0.15228167176246643,
1.533762812614441,
0.36281758546829224,
0.029350772500038147,
0.3307112157344818,
1.1294682025909424,
0.3637235760688782,
-0.24114474654197693,
-1.0435904264450073,
-1.1906541585922241,
1.4964863061904907,
-1.6128778457641602,
2.2221012115478516,
0.9777578115463257,
0.048286985605955124,
-1.7539249658584595,
-1.8026851415634155,
1.0902106761932373,
1.2430087327957153,
2.4308040142059326,
0.5800515413284302,
0.34799888730049133,
-0.9765219688415527,
-0.7842434644699097,
0.1504126489162445,
-1.1811060905456543,
-0.8615808486938477,
0.29246485233306885,
2.3368637561798096,
1.834802269935608,
-0.27468687295913696,
-0.21746434271335602,
-1.0374122858047485,
1.4733227491378784,
-0.0271486584097147,
0.17143605649471283,
1.8396021127700806,
-0.026891717687249184,
-1.1184860467910767,
1.0707898139953613,
-2.499865770339966,
0.03214873746037483,
1.86098313331604,
0.42125841975212097,
0.3258742392063141,
-1.3590766191482544,
-0.748008131980896,
-0.22370421886444092,
-0.7665238380432129,
-1.3530523777008057,
0.19511504471302032,
-0.3871554434299469,
-0.6163375377655029,
-1.3124347925186157,
0.25122740864753723,
-1.068839430809021,
-1.6774195432662964,
0.13600865006446838,
2.0540108680725098,
1.8908265829086304,
-0.8746557235717773,
1.5767098665237427,
-0.43483078479766846,
-0.018969116732478142,
1.2011277675628662,
1.5937391519546509,
3.0390236377716064,
1.9650609493255615,
-1.354834794998169,
0.6287596225738525,
-0.12442231178283691,
-0.36694812774658203,
1.021505355834961,
-1.2379064559936523,
1.2158944606781006,
-0.09265770018100739,
-1.1150856018066406,
-1.2684721946716309,
1.0398510694503784,
0.7029756307601929,
-0.06327340006828308,
-0.5096659660339355,
1.1511560678482056,
0.23441973328590393,
1.6406307220458984,
0.6140681505203247,
-0.4007364511489868,
0.6042526960372925,
-0.29273155331611633,
-0.35863780975341797,
1.6804616451263428,
0.1035737618803978,
-1.1229609251022339,
-2.1072938442230225,
-0.1085008978843689,
-0.7897876501083374,
0.0797247514128685,
-0.6255544424057007,
-1.1838221549987793,
1.8101087808609009,
0.352516233921051,
-1.265181541442871,
-0.11589498817920685,
-0.2225947231054306,
-0.5914654731750488,
2.536759614944458,
-1.2161695957183838,
-0.1260201334953308,
-0.9983623027801514,
-0.6707744598388672,
1.5941628217697144,
-1.13491690158844,
-0.34112414717674255,
-1.0489329099655151,
-0.6190637350082397,
-1.2325230836868286,
-0.4074040651321411,
-0.12379296869039536,
-0.8891705274581909,
0.7719874382019043,
0.23609241843223572,
-1.2818632125854492,
-0.6260093450546265,
-0.6132868528366089,
1.14833664894104,
0.013894760981202126,
0.16741478443145752,
1.7770310640335083,
0.06854073703289032,
-0.5507766008377075,
0.7894874811172485,
1.0935322046279907,
0.4230453670024872,
-0.5925000905990601,
0.577075719833374,
-0.5652198791503906,
0.27219685912132263,
-1.309874415397644,
0.30724743008613586,
-3.009726047515869,
0.6321074962615967,
-0.07872498780488968,
0.007927697151899338,
-0.12790802121162415,
-1.1084635257720947,
1.2013804912567139,
2.564004421234131,
-0.953245997428894,
0.48087748885154724,
0.414250910282135,
1.0886569023132324,
-1.7793327569961548,
0.34570038318634033,
-0.4380919337272644,
1.8061171770095825,
0.37877652049064636,
1.508833885192871,
-0.5603142976760864,
-2.5912137031555176,
0.3137741684913635,
-1.103179931640625,
-1.095582127571106,
1.0016809701919556,
-0.6672136783599854,
0.13151904940605164,
-1.337977647781372,
-0.5378799438476562,
-0.9731112718582153,
-1.1568349599838257,
0.6805230379104614,
0.45021185278892517,
0.4560769498348236,
-0.6788955926895142,
0.4164748191833496,
-2.215329170227051,
-1.0373640060424805,
-0.12469962984323502,
-0.7767233848571777,
0.5205299854278564,
-0.410826176404953,
0.6024819612503052,
-0.012457720004022121,
-0.05825432389974594,
0.30918002128601074,
1.5976375341415405,
3.187952756881714,
0.12885239720344543,
0.2302548736333847,
-0.08489742875099182,
-0.8137929439544678,
1.4823942184448242,
0.8692907094955444,
-0.0007116096094250679,
-0.5975813865661621,
-1.304814338684082,
1.191563367843628,
1.5516635179519653,
1.0078119039535522,
-0.030586695298552513,
-0.8360955715179443,
-0.7892118692398071,
-0.2822554409503937,
0.24853521585464478,
0.38327541947364807,
1.1613997220993042,
0.14176249504089355,
0.08664996922016144,
1.3206660747528076,
1.2873347997665405,
-0.6629326343536377,
0.2317139357328415,
-1.0018293857574463,
-0.5670570135116577,
0.21078693866729736,
0.20740613341331482,
-0.2693444490432739,
0.24605834484100342,
-1.1656674146652222,
-0.20187583565711975,
-0.2460079938173294,
-0.9051804542541504,
-0.5907711982727051,
-0.3228292167186737,
-0.41836977005004883,
1.489619255065918,
0.15664581954479218,
-0.3141406178474426,
0.04312548413872719,
-0.8811743259429932,
-0.3449437618255615,
-1.3494811058044434,
0.4087166488170624,
-0.07161104679107666,
-0.14724387228488922,
-0.19063033163547516,
1.7790327072143555,
-0.6659183502197266,
-2.1474850177764893,
0.26109203696250916,
0.10456949472427368,
-0.06341254711151123,
0.48081257939338684,
1.793806552886963,
0.31797003746032715,
1.180311679840088,
1.0861259698867798,
0.9754992723464966,
-0.478091299533844,
-1.259660005569458,
0.8083533048629761,
1.1601632833480835,
-1.4516228437423706,
0.7827974557876587,
-0.17143218219280243,
-0.4214954376220703,
0.5778994560241699,
1.1936029195785522,
0.5270839929580688,
-2.1171634197235107,
0.7982592582702637,
-1.073479175567627,
0.8564876317977905,
0.8717539310455322,
0.5216267108917236,
0.43413782119750977,
1.0259543657302856,
-1.138811707496643,
-1.0280885696411133,
-0.4697156250476837,
-0.8259871006011963,
1.8395620584487915,
-0.36764922738075256,
0.639911413192749,
-0.3033764660358429,
-1.268484354019165,
0.09111392498016357,
0.7059298753738403,
0.21713586151599884,
-0.6321718692779541,
0.9698162078857422,
-0.6954861879348755,
-1.2097057104110718,
-1.1422953605651855,
-0.49163296818733215,
-1.0495598316192627,
-0.9703848361968994,
0.8662722110748291,
0.811630129814148,
-0.0038437610492110252,
2.0118935108184814,
0.6016119718551636,
0.3673535883426666,
-2.7056076526641846,
0.8388311862945557,
0.16331614553928375,
0.10951090604066849,
0.9678212404251099,
0.3086089789867401,
1.013601303100586,
0.3182014524936676,
0.45341193675994873,
-2.7306272983551025,
2.559021472930908,
-0.11740100383758545,
0.5885199308395386,
-0.023827848955988884,
-0.1576320379972458,
1.2790251970291138,
0.7880691289901733,
0.4415268003940582,
-0.704456090927124,
0.6070082187652588,
-0.5293697118759155,
1.2943848371505737,
0.8064079284667969,
-0.8201391696929932,
-0.14279654622077942,
1.1081533432006836,
0.2866482138633728,
-0.538048505783081,
-0.7294445037841797,
-1.046165108680725,
0.8114643096923828,
1.7346192598342896,
0.32696324586868286,
0.0738329291343689,
0.7746105194091797,
0.6103159189224243,
-1.1606454849243164,
0.04366667568683624,
-0.6077359914779663,
-0.8435268402099609,
1.6331028938293457,
2.03495454788208,
-0.34478744864463806,
-0.40509217977523804,
-0.5088064670562744,
-1.3806270360946655,
0.9114047288894653,
-0.3264877200126648,
0.34592968225479126,
0.553983211517334,
-0.6493278741836548,
0.7506310939788818,
0.7711272239685059,
0.9198062419891357,
0.2947613596916199,
0.307698130607605,
0.6409780979156494,
-0.5875787734985352,
-1.3482582569122314,
-0.03765289485454559,
-1.2059704065322876,
-2.793752431869507,
0.4803830683231354,
0.07515744119882584,
-1.0956525802612305,
0.10975673794746399,
-1.154700517654419,
0.8611557483673096,
-0.7031987905502319,
-1.10508394241333,
-1.4964618682861328,
-0.044794995337724686,
-0.33239105343818665,
0.8881254196166992,
-1.5633033514022827,
0.011738751083612442,
1.2234190702438354,
0.8787626028060913,
-0.5071603059768677,
1.14224374294281,
0.13139134645462036,
1.2609859704971313,
0.9531641006469727,
-0.27428701519966125,
0.6759046316146851,
-0.15865682065486908,
-1.3853060007095337,
0.2927670180797577,
1.2481908798217773,
0.14235076308250427,
1.7926392555236816,
-0.5555675029754639,
-0.15804843604564667,
0.42835208773612976,
-0.6544902324676514,
-0.46151649951934814,
-0.4097636044025421,
0.49234357476234436,
-0.049906324595212936,
-1.1298092603683472,
-0.07528359442949295,
-0.11672680079936981,
-0.2684208154678345,
0.010679841041564941,
-1.4384273290634155,
-0.04274763539433479,
-0.6372658014297485,
-0.5634493827819824,
-1.436948537826538,
0.19386279582977295,
1.234737515449524,
-0.6503037214279175,
-0.33342915773391724,
0.29983898997306824,
0.33542999625205994,
0.5931531190872192,
0.738801121711731,
-0.8473466634750366,
-0.375103622674942,
-0.031085317954421043,
-0.4189242720603943,
0.586311936378479,
1.3547524213790894,
-0.32198965549468994,
-0.8737407922744751,
0.5230636596679688,
-0.36028438806533813,
0.25181370973587036,
2.0311996936798096,
-0.10426060110330582,
-0.6493244171142578,
0.15138830244541168,
-0.8745807409286499,
1.9323937892913818,
1.5390573740005493,
1.343907356262207,
-0.5507636070251465,
-0.4525453746318817,
0.5734790563583374,
-0.5513656139373779,
-0.3821609616279602,
0.7644264698028564,
0.5837415456771851,
-0.17933358252048492,
-1.5324819087982178,
0.7108018398284912,
1.3546154499053955,
-0.7900677919387817,
-0.8255088329315186,
0.1465584933757782,
-0.34545063972473145,
1.0259032249450684,
0.6206270456314087,
0.1693483591079712,
0.370635986328125,
1.5310957431793213,
0.8428589105606079,
-0.5375679731369019,
0.6151647567749023,
0.3599358797073364,
-0.19732284545898438,
-2.2486164569854736,
-1.1514707803726196,
0.3384488523006439,
-0.8037058115005493,
-1.645497441291809,
1.343084454536438,
-0.9050869941711426,
-1.1720770597457886,
0.6230019330978394,
-0.03635632246732712,
1.1969029903411865,
0.30311134457588196,
1.5698384046554565,
1.8895200490951538,
0.6178191900253296,
0.349891722202301,
1.1043258905410767,
-0.09636026620864868,
-0.5203521251678467,
1.8134161233901978,
-0.6050187349319458,
0.45164281129837036,
1.069442868232727,
-0.006477300077676773,
-1.0132627487182617,
-0.7743847370147705,
-1.4021474123001099,
-0.7004097700119019,
1.5025542974472046,
0.17714384198188782,
-0.8174828290939331,
0.1854192614555359,
1.490992546081543,
0.06250471621751785,
-0.24332094192504883,
0.8872437477111816,
0.3018961548805237,
-0.8294508457183838,
-0.0591265968978405,
-0.875985860824585,
0.5321283340454102,
-0.16495847702026367,
-0.48357465863227844,
0.12773486971855164,
0.5300616025924683,
1.2362158298492432,
0.027142789214849472,
0.18921872973442078,
1.278447151184082,
-1.0897785425186157,
1.4986246824264526,
-0.750428318977356,
0.4139089286327362,
-2.4509479999542236,
1.5248475074768066,
-0.7695908546447754,
1.92388117313385,
-2.5961270332336426,
0.7083594799041748,
-0.5224472284317017,
-0.3433719277381897,
0.30937910079956055,
-0.37230759859085083,
0.0699029490351677,
-0.27495458722114563,
-1.0147628784179688,
0.022867757827043533,
-0.5651727914810181,
0.49134236574172974,
1.0566178560256958,
1.3050494194030762,
-1.3200801610946655,
0.15612615644931793,
-1.8060067892074585,
-0.20444846153259277,
-0.9300204515457153,
0.3953072428703308,
-2.1801304817199707,
-0.2420356273651123,
-2.0008046627044678,
-2.2017712593078613,
-1.009516716003418,
-0.6732405424118042,
1.1025806665420532,
0.23321115970611572,
-0.6112425327301025,
1.2896291017532349,
-0.3751263916492462,
-1.5640366077423096,
0.9281893968582153,
-2.029634475708008
] |
https://github.com/huggingface/datasets/issues/3400 | Improve Wikipedia loading script | Thanks! See https://public.paws.wmcloud.org/User:Isaac_(WMF)/HuggingFace%20Wikipedia%20Processing.ipynb for more implementation details / some data around the overhead induced by adding the extra preprocessing steps (stripping link prefixes and magic words) | As reported by @geohci, the "wikipedia" processing/loading script could be improved by some additional small suggested processing functions:
- _extract_content(filepath):
- Replace .startswith("#redirect") with more structured approach: if elem.find(f"./{namespace}redirect") is None: continue
- _parse_and_clean_wikicode(raw_content, parser):
- Remove rm_template from cleaning -- this is redundant with .strip_code() from mwparserformhell
- Build a language-specific list of namespace prefixes to filter out per below get_namespace_prefixes
- Optional: strip prefixes like categories -- e.g., Category:Towns in Tianjin becomes Towns in Tianjin
- Optional: strip magic words
| 1,065 | 26 | Improve Wikipedia loading script
As reported by @geohci, the "wikipedia" processing/loading script could be improved by some additional small suggested processing functions:
- _extract_content(filepath):
- Replace .startswith("#redirect") with more structured approach: if elem.find(f"./{namespace}redirect") is None: continue
- _parse_and_clean_wikicode(raw_content, parser):
- Remove rm_template from cleaning -- this is redundant with .strip_code() from mwparserformhell
- Build a language-specific list of namespace prefixes to filter out per below get_namespace_prefixes
- Optional: strip prefixes like categories -- e.g., Category:Towns in Tianjin becomes Towns in Tianjin
- Optional: strip magic words
Thanks! See https://public.paws.wmcloud.org/User:Isaac_(WMF)/HuggingFace%20Wikipedia%20Processing.ipynb for more implementation details / some data around the overhead induced by adding the extra preprocessing steps (stripping link prefixes and magic words) | [
-1.305009365081787,
-0.8287347555160522,
-0.7146078944206238,
1.5386320352554321,
-0.1869306117296219,
-1.2832417488098145,
0.04337471351027489,
-1.016286015510559,
1.5559215545654297,
-0.8442456722259521,
0.42382264137268066,
-1.5405226945877075,
0.07191278040409088,
-0.5292319655418396,
-0.7291150093078613,
-0.824421226978302,
-0.3918684124946594,
-0.8569632172584534,
1.0578569173812866,
2.5443193912506104,
1.2974382638931274,
-1.3864408731460571,
2.737379789352417,
0.6526585221290588,
-0.30379441380500793,
-0.9738816618919373,
0.5029704570770264,
0.01799677684903145,
-1.3265889883041382,
-0.5046964287757874,
-0.9404119253158569,
-0.04593909531831741,
-0.47675958275794983,
-0.4324641525745392,
0.021547064185142517,
0.36914220452308655,
-0.13885416090488434,
-0.4041956067085266,
-0.5273178815841675,
-0.8272066712379456,
0.529826283454895,
-0.28409484028816223,
0.9324023723602295,
-0.36238688230514526,
1.8342151641845703,
-0.6837549805641174,
0.39553970098495483,
0.6525512337684631,
1.3696962594985962,
0.2153608351945877,
-0.12624025344848633,
0.3547552525997162,
0.34877851605415344,
0.025352109223604202,
0.4595055878162384,
1.1157960891723633,
0.6280028223991394,
0.4476243555545807,
0.7226459383964539,
-2.1737515926361084,
1.374463438987732,
-1.0820029973983765,
0.24644023180007935,
1.3801840543746948,
-1.0635656118392944,
0.3858829438686371,
-1.7382843494415283,
-0.09338246285915375,
0.5501028299331665,
-2.2229092121124268,
0.30702653527259827,
-1.2252802848815918,
-0.5543215870857239,
0.9661891460418701,
0.3270757496356964,
-1.221164584159851,
0.009286832995712757,
-0.5330089330673218,
0.9566363096237183,
0.37777939438819885,
1.0639703273773193,
-1.6699113845825195,
-0.08932995796203613,
-0.37327390909194946,
0.12823037803173065,
-1.3320326805114746,
-1.5385642051696777,
0.5540027022361755,
0.6659206748008728,
0.5524055361747742,
-0.025766585022211075,
0.9750205278396606,
-1.014833927154541,
0.9540074467658997,
-0.9677693843841553,
-1.5060769319534302,
-1.513405203819275,
-2.400322914123535,
-2.185434341430664,
0.7531288862228394,
-0.49691370129585266,
-0.5540444254875183,
2.1081011295318604,
-1.015233039855957,
-1.732447862625122,
1.2033286094665527,
0.19002309441566467,
0.08189024776220322,
2.346727132797241,
0.1585749238729477,
-0.8360344171524048,
0.4858300983905792,
-0.7651082873344421,
0.8191460371017456,
-0.44531524181365967,
1.412569522857666,
0.4705219268798828,
-1.008334994316101,
1.6134673357009888,
-0.43000102043151855,
0.4734070301055908,
-0.5746551156044006,
-0.5673155188560486,
-0.7576749920845032,
0.3283504247665405,
1.913219928741455,
-0.20695948600769043,
1.5447512865066528,
-0.3807719945907593,
-1.5206563472747803,
-1.549997329711914,
0.832133948802948,
0.5049285292625427,
-0.8885982036590576,
0.1554354876279831,
-0.4704305827617645,
0.03046249970793724,
-0.042391009628772736,
1.0941818952560425,
1.3446614742279053,
0.6845042109489441,
-0.3893115222454071,
-0.9271861910820007,
0.1551835834980011,
-0.07742421329021454,
-0.6792987585067749,
-1.7821507453918457,
-0.3137243688106537,
0.09133219718933105,
0.7447303533554077,
-1.1877562999725342,
1.8345671892166138,
0.9938046932220459,
2.0079164505004883,
0.9271069169044495,
-0.26858198642730713,
1.4758645296096802,
0.032849691808223724,
1.802507996559143,
-0.5007043480873108,
0.6551632285118103,
-0.4361708164215088,
-1.2063583135604858,
0.8395644426345825,
-0.35968801379203796,
-2.09040904045105,
-0.7567349076271057,
-0.7965936064720154,
-0.18050774931907654,
-0.8754907846450806,
1.0009411573410034,
-0.30446451902389526,
-1.3725941181182861,
0.28074806928634644,
-0.735047459602356,
0.10680419206619263,
-1.2142889499664307,
0.2912292778491974,
0.6369509100914001,
-0.5855048298835754,
0.021090183407068253,
-0.21643714606761932,
-1.266953468322754,
-0.5156844854354858,
0.3625975549221039,
1.9320963621139526,
-0.7317172884941101,
1.0303617715835571,
1.0623372793197632,
-0.538887083530426,
0.11328782141208649,
0.2665329575538635,
-0.37828683853149414,
0.9380859732627869,
-1.0567983388900757,
-0.43126657605171204,
1.2450717687606812,
-0.23926633596420288,
-0.4750373959541321,
1.5317598581314087,
0.6674345135688782,
-0.9273115396499634,
-0.23729123175144196,
-0.0703824907541275,
-0.8526492118835449,
-0.04790963977575302,
-1.6369315385818481,
-0.1527254283428192,
0.3016709089279175,
-1.4341124296188354,
-0.44539108872413635,
-0.058151114732027054,
1.4135226011276245,
-0.12042810767889023,
1.4339041709899902,
-0.42487674951553345,
-0.2123596966266632,
-0.372600793838501,
-0.365088552236557,
0.17040516436100006,
-0.08202158659696579,
-0.5556575655937195,
0.27000078558921814,
-0.8890678882598877,
0.2588692605495453,
1.4886394739151,
0.3789801299571991,
0.14325347542762756,
0.48382368683815,
1.0941475629806519,
0.3120082914829254,
0.020148783922195435,
-0.860352635383606,
-1.6178457736968994,
2.0539207458496094,
-1.5072755813598633,
2.0718677043914795,
0.8864466547966003,
0.03590885549783707,
-1.776131510734558,
-1.8413105010986328,
1.169253945350647,
1.1436430215835571,
2.2876029014587402,
0.4943501651287079,
0.2567427456378937,
-0.8493831753730774,
-0.6152876615524292,
0.4191172420978546,
-1.0854674577713013,
-0.7513889074325562,
0.08425339311361313,
2.369053840637207,
1.6803066730499268,
-0.392292857170105,
-0.07757839560508728,
-0.9269921183586121,
1.4142295122146606,
-0.26972779631614685,
0.17145399749279022,
1.967500925064087,
-0.25349223613739014,
-1.153550148010254,
1.2799848318099976,
-2.3700430393218994,
0.3063005208969116,
2.0593883991241455,
0.3834119141101837,
0.05611515790224075,
-1.3726319074630737,
-0.6915689706802368,
-0.2517504096031189,
-0.40691816806793213,
-1.093973994255066,
0.6096450686454773,
-0.3510190546512604,
-0.9391933083534241,
-1.388005018234253,
0.03732512518763542,
-1.1940040588378906,
-1.766430139541626,
0.5085633397102356,
1.739814281463623,
2.133882522583008,
-0.6595349311828613,
1.5147804021835327,
-0.3377833068370819,
0.03963543474674225,
1.2339892387390137,
1.2466332912445068,
3.098132610321045,
1.9034274816513062,
-1.2078313827514648,
0.5968900918960571,
-0.1485852152109146,
-0.45474180579185486,
1.1512243747711182,
-1.1865160465240479,
1.2581472396850586,
-0.18656735122203827,
-1.115114688873291,
-1.2494847774505615,
0.9663234353065491,
0.329141229391098,
-0.00807658489793539,
-0.5151689052581787,
1.2123411893844604,
0.15357597172260284,
1.2544289827346802,
0.6310978531837463,
-0.23725907504558563,
0.522641122341156,
-0.4602760672569275,
-0.564677894115448,
1.5227631330490112,
0.20152661204338074,
-1.5180045366287231,
-2.3279924392700195,
-0.20758868753910065,
-0.740632176399231,
-0.032934945076704025,
-0.6394617557525635,
-1.0315272808074951,
1.6603044271469116,
0.29294267296791077,
-1.2431252002716064,
-0.26361769437789917,
-0.4084588885307312,
-0.5136357545852661,
2.7366230487823486,
-1.4009151458740234,
-0.24584424495697021,
-0.9182398915290833,
-0.633105993270874,
1.651397466659546,
-1.328927755355835,
-0.29579371213912964,
-1.032897710800171,
-0.5200697779655457,
-1.2156710624694824,
-0.5349781513214111,
-0.02545551210641861,
-0.9892053604125977,
0.665454089641571,
0.09410341084003448,
-1.1056936979293823,
-0.37737801671028137,
-0.8414328694343567,
0.8735464215278625,
-0.07999157160520554,
0.24981984496116638,
1.8548606634140015,
0.32489433884620667,
-0.3753274381160736,
0.7720983624458313,
1.214510440826416,
0.6458919048309326,
-0.5870669484138489,
0.1211138516664505,
-0.5202525854110718,
0.3943513035774231,
-1.298519492149353,
0.39101189374923706,
-2.9099833965301514,
0.6702797412872314,
0.017655983567237854,
-0.08824267983436584,
-0.17962531745433807,
-1.3901019096374512,
1.134443759918213,
2.5112531185150146,
-1.1579689979553223,
0.4351780414581299,
0.26630470156669617,
1.1288586854934692,
-1.6362500190734863,
0.35276421904563904,
-0.404193252325058,
2.2299439907073975,
0.1629953533411026,
1.297209620475769,
-0.5269525647163391,
-2.2591073513031006,
0.7077810168266296,
-1.2640080451965332,
-1.0701476335525513,
0.587536096572876,
-0.9312337040901184,
0.15858663618564606,
-1.4433773756027222,
-0.2670014798641205,
-0.9148730635643005,
-1.1825169324874878,
0.6495383381843567,
0.16268524527549744,
0.3618564009666443,
-0.5329657793045044,
0.25672677159309387,
-2.1793951988220215,
-1.4153794050216675,
-0.12510620057582855,
-1.026867151260376,
0.4268684685230255,
-0.4089682698249817,
0.6683287620544434,
-0.13689081370830536,
0.06270423531532288,
0.32401493191719055,
1.508317232131958,
3.364586114883423,
0.1572728306055069,
0.3249436616897583,
-0.2442675232887268,
-0.9426739811897278,
1.4953711032867432,
0.9422423839569092,
-0.13418522477149963,
-0.5778941512107849,
-0.9974453449249268,
1.3058427572250366,
1.982378363609314,
0.9184881448745728,
-0.029573366045951843,
-0.8510779142379761,
-0.7106146216392517,
-0.07765260338783264,
0.12664960324764252,
0.5689598321914673,
0.9239566922187805,
0.0698336511850357,
0.10445670038461685,
1.4779088497161865,
1.1658059358596802,
-0.4258340299129486,
0.33970338106155396,
-0.9052109122276306,
-0.4324829578399658,
0.4897077977657318,
0.2922857999801636,
-0.07705164700746536,
0.43943047523498535,
-0.9410550594329834,
-0.3209586441516876,
-0.2747502624988556,
-0.9509723782539368,
-0.6440199017524719,
-0.4970453679561615,
-0.4255788028240204,
1.594164490699768,
0.18611367046833038,
-0.49216678738594055,
-0.035584498196840286,
-0.7601186037063599,
-0.1522756665945053,
-1.1217975616455078,
0.22249870002269745,
-0.0874258503317833,
0.0006877873092889786,
-0.19583235681056976,
1.7868000268936157,
-0.9011921286582947,
-2.1788556575775146,
0.2680426239967346,
0.2199828326702118,
-0.3534434735774994,
0.17621368169784546,
1.625802993774414,
0.5314807295799255,
1.380066156387329,
1.3017903566360474,
0.8678163886070251,
-0.5918650031089783,
-1.314171552658081,
0.7570781707763672,
0.9921033382415771,
-1.4779576063156128,
0.9144314527511597,
-0.14080992341041565,
-0.4730561077594757,
0.6366918087005615,
1.3257725238800049,
0.5570467114448547,
-1.9648550748825073,
0.8607325553894043,
-0.9418302774429321,
0.9252269268035889,
0.7620065808296204,
0.656756579875946,
0.24676302075386047,
0.8745953440666199,
-1.2980895042419434,
-1.0375666618347168,
-0.6799101233482361,
-0.7806106209754944,
1.935234546661377,
-0.3838714361190796,
0.49326130747795105,
-0.20009247958660126,
-1.1994056701660156,
-0.06620685011148453,
0.654399037361145,
0.18147826194763184,
-0.36552873253822327,
0.8244564533233643,
-0.756388783454895,
-1.0874639749526978,
-1.3791587352752686,
-0.4470728933811188,
-0.9297307729721069,
-0.9093917608261108,
1.0331194400787354,
0.7438316345214844,
0.3462636470794678,
1.9672905206680298,
0.5823390483856201,
0.2011140137910843,
-2.5721688270568848,
0.9155487418174744,
0.26952603459358215,
0.042400211095809937,
0.9654940962791443,
0.14444540441036224,
1.085690975189209,
0.0015018898993730545,
0.511978805065155,
-2.428682327270508,
2.1998846530914307,
-0.1821907013654709,
0.7736638188362122,
0.04014478251338005,
-0.1414346843957901,
1.1592791080474854,
0.6925028562545776,
0.5734850168228149,
-1.1939871311187744,
0.7627728581428528,
-0.5990573167800903,
1.1782755851745605,
0.8505169749259949,
-0.8110073208808899,
-0.044782306998968124,
1.3705168962478638,
0.4426576495170593,
-0.5995349287986755,
-0.9462005496025085,
-0.8239623308181763,
0.8855690956115723,
1.7222871780395508,
0.021777018904685974,
0.07555007189512253,
0.7476500272750854,
0.623396098613739,
-1.1995011568069458,
0.05101827532052994,
-0.7623665928840637,
-0.8424428105354309,
1.6577686071395874,
2.0924551486968994,
-0.08846055716276169,
-0.14504696428775787,
-0.6356772184371948,
-1.3894590139389038,
0.8187378644943237,
-0.1793455183506012,
0.13985684514045715,
0.5173994302749634,
-0.5984929203987122,
1.1342430114746094,
0.7848246693611145,
0.9863280057907104,
0.08214662224054337,
0.3352912664413452,
0.34688690304756165,
-0.22707638144493103,
-1.2317091226577759,
-0.3148917555809021,
-1.123589038848877,
-2.6060781478881836,
0.44455015659332275,
-0.30072176456451416,
-1.4247729778289795,
0.08866209536790848,
-1.043734073638916,
0.8485553860664368,
-0.6169504523277283,
-1.1153138875961304,
-1.4307609796524048,
0.16904515027999878,
-0.1367570012807846,
0.9537431001663208,
-1.592624545097351,
-0.19194410741329193,
1.2428845167160034,
0.8150370121002197,
-0.5987161993980408,
1.0045546293258667,
0.2053852677345276,
1.0498614311218262,
0.777694821357727,
-0.3950498700141907,
0.5318962335586548,
0.23554030060768127,
-1.2797054052352905,
0.51958167552948,
1.2478899955749512,
0.16196097433567047,
1.4955381155014038,
-0.4067862033843994,
0.09025890380144119,
0.4464097023010254,
-0.6273975968360901,
-0.5731444954872131,
-0.5577538013458252,
0.7505600452423096,
0.04648454859852791,
-0.9187365770339966,
-0.040991928428411484,
-0.09197431057691574,
-0.32775455713272095,
0.22337687015533447,
-1.5225317478179932,
-0.15679873526096344,
-0.4041147232055664,
-0.4295397102832794,
-1.3432159423828125,
-0.16394397616386414,
1.3646965026855469,
-0.761628270149231,
-0.05324871838092804,
0.4081938862800598,
0.39517930150032043,
0.6609005331993103,
0.7861995697021484,
-0.6276431083679199,
-0.4277600646018982,
-0.23600098490715027,
-0.36633938550949097,
0.3407011926174164,
1.21519136428833,
-0.024650149047374725,
-0.9092822670936584,
0.6625916957855225,
-0.2784639894962311,
0.09375406056642532,
1.9892960786819458,
0.06535922735929489,
-0.7343453764915466,
0.4103602468967438,
-0.6672561764717102,
1.9930601119995117,
1.5047619342803955,
1.2326360940933228,
-0.2365386188030243,
-0.9617819786071777,
0.7006494998931885,
-0.30949151515960693,
-0.2828000485897064,
0.7654978036880493,
0.48622065782546997,
-0.23334304988384247,
-1.3462698459625244,
0.7074829936027527,
1.1802538633346558,
-0.9228308796882629,
-0.7248745560646057,
0.1031404584646225,
-0.8247438073158264,
1.108554482460022,
0.5655653476715088,
0.47480508685112,
0.379049152135849,
1.7283746004104614,
0.6996602416038513,
-0.5636685490608215,
0.3941819369792938,
0.5746726393699646,
-0.11972478032112122,
-2.0560505390167236,
-1.0440354347229004,
0.3612017035484314,
-0.5463717579841614,
-1.4677151441574097,
1.2835693359375,
-1.0854299068450928,
-0.9822662472724915,
0.5941063761711121,
0.07506568729877472,
1.4108444452285767,
0.3018577992916107,
1.7046188116073608,
2.0250062942504883,
0.8876687288284302,
0.41523998975753784,
1.2473572492599487,
-0.0475560761988163,
-0.4099697768688202,
1.811319351196289,
-0.3278999626636505,
0.5277528762817383,
1.1643215417861938,
-0.4365249276161194,
-1.1309788227081299,
-0.8165363669395447,
-1.1809858083724976,
-0.7106744050979614,
1.106124997138977,
0.1979023665189743,
-1.162826418876648,
0.16907638311386108,
1.7238553762435913,
0.21346688270568848,
-0.2895861268043518,
0.5005207657814026,
0.3947348892688751,
-0.7411043643951416,
-0.08541242778301239,
-1.0585025548934937,
0.5108588337898254,
-0.22201044857501984,
-0.481887549161911,
0.22858768701553345,
0.48011142015457153,
1.2929614782333374,
-0.09079280495643616,
0.0745839923620224,
1.0976462364196777,
-1.558845043182373,
1.4163013696670532,
-0.7280069589614868,
0.2715294063091278,
-2.3428544998168945,
1.3354023694992065,
-0.8233442902565002,
1.995615005493164,
-2.6759071350097656,
0.4162348210811615,
-0.6187026500701904,
-0.5147748589515686,
0.31972169876098633,
-0.3234448730945587,
0.07558801770210266,
-0.13556262850761414,
-0.9755520224571228,
-0.04640346020460129,
-0.6408663988113403,
0.5725263357162476,
1.2936956882476807,
1.2777336835861206,
-1.0480751991271973,
-0.27360156178474426,
-1.618384599685669,
-0.19329819083213806,
-0.697612464427948,
0.2363271862268448,
-1.9807542562484741,
-0.11003031581640244,
-1.999097466468811,
-2.2486495971679688,
-1.3316733837127686,
-0.8794100880622864,
1.1344598531723022,
0.15024618804454803,
-0.8364608883857727,
1.0577982664108276,
-0.2992376387119293,
-1.7394208908081055,
1.1301071643829346,
-2.0910773277282715
] |
https://github.com/huggingface/datasets/issues/3398 | Add URL field to Wikimedia dataset instances: wikipedia,... | @geohci, I think the field "url" does not appear in the Wikimedia dumps. Therefore I guess we should generate it, using the "title" field and making some transformation of it (replacing spaces with underscores) and prepending the domain (created using the language)? | As reported by @geohci, in order to host pre-processed data in the Hub, we should add the full URL to data instances (new field "url"), so that we conform to proper attribution from license requirement. See, e.g.: https://fair-trec.github.io/docs/Fair_Ranking_2021_Participant_Instructions.pdf#subsection.3.2
This should be done for all pre-processed datasets under "wikimedia" org in the Hub: https://huggingface.co/wikimedia
| 1,067 | 42 | Add URL field to Wikimedia dataset instances: wikipedia,...
As reported by @geohci, in order to host pre-processed data in the Hub, we should add the full URL to data instances (new field "url"), so that we conform to proper attribution from license requirement. See, e.g.: https://fair-trec.github.io/docs/Fair_Ranking_2021_Participant_Instructions.pdf#subsection.3.2
This should be done for all pre-processed datasets under "wikimedia" org in the Hub: https://huggingface.co/wikimedia
@geohci, I think the field "url" does not appear in the Wikimedia dumps. Therefore I guess we should generate it, using the "title" field and making some transformation of it (replacing spaces with underscores) and prepending the domain (created using the language)? | [
-1.3136438131332397,
-0.8310726881027222,
-0.806472897529602,
1.429193377494812,
-0.1333705633878708,
-1.1837260723114014,
0.13661134243011475,
-0.9589544534683228,
1.5748687982559204,
-0.90196293592453,
0.3491527736186981,
-1.63801908493042,
0.021340422332286835,
-0.5289098620414734,
-0.7273486256599426,
-0.8765034675598145,
-0.40907004475593567,
-0.7465104460716248,
0.9918357729911804,
2.562479257583618,
1.1871644258499146,
-1.343878984451294,
2.725191831588745,
0.6987185478210449,
-0.1273457258939743,
-1.0020126104354858,
0.552014172077179,
0.0378187820315361,
-1.2750227451324463,
-0.45537349581718445,
-1.089353322982788,
0.027047913521528244,
-0.4862256646156311,
-0.43171796202659607,
0.1481235921382904,
0.2856023609638214,
-0.2846449017524719,
-0.34966427087783813,
-0.668120801448822,
-0.8061510920524597,
0.4203239679336548,
-0.4526579678058624,
1.0112022161483765,
-0.41628989577293396,
1.799999713897705,
-0.5621535778045654,
0.3785466253757477,
0.7700536847114563,
1.1902700662612915,
0.15023772418498993,
-0.02033066377043724,
0.2728331983089447,
0.4618871510028839,
0.10416246205568314,
0.3802288770675659,
1.1206961870193481,
0.5492094159126282,
0.4437851011753082,
0.6776050925254822,
-2.157525062561035,
1.3661653995513916,
-1.1278457641601562,
0.23753872513771057,
1.4011502265930176,
-1.0103894472122192,
0.3752996325492859,
-1.786598801612854,
-0.13723358511924744,
0.512776792049408,
-2.3910152912139893,
0.1976536512374878,
-1.327847957611084,
-0.5664085745811462,
0.925769567489624,
0.3237834870815277,
-1.2333124876022339,
0.06751678884029388,
-0.493789941072464,
0.9041574597358704,
0.4864419102668762,
1.1141968965530396,
-1.6790590286254883,
-0.09612610191106796,
-0.3593173325061798,
-0.011015383526682854,
-1.3785099983215332,
-1.473611831665039,
0.6773474216461182,
0.5147236585617065,
0.5155654549598694,
-0.06300035119056702,
0.977950930595398,
-1.0009677410125732,
0.8997920155525208,
-0.8506125211715698,
-1.6204744577407837,
-1.3876529932022095,
-2.367051839828491,
-2.2023556232452393,
0.813413679599762,
-0.5226549506187439,
-0.5175261497497559,
2.0670056343078613,
-1.075797200202942,
-1.7397743463516235,
1.1521556377410889,
0.1428140103816986,
0.01979093626141548,
2.372657537460327,
0.26322248578071594,
-0.7200888991355896,
0.4232613742351532,
-0.6730110049247742,
0.822272539138794,
-0.35618263483047485,
1.440903902053833,
0.5035319328308105,
-0.971225917339325,
1.5465753078460693,
-0.35682737827301025,
0.4653559625148773,
-0.5347023010253906,
-0.5444547533988953,
-0.8623871803283691,
0.2602708637714386,
1.8349195718765259,
-0.28234198689460754,
1.5700807571411133,
-0.29458847641944885,
-1.497215986251831,
-1.5575672388076782,
0.8686452507972717,
0.4855908453464508,
-0.7753736972808838,
0.026095472276210785,
-0.36155635118484497,
0.023841891437768936,
-0.05814175307750702,
1.220567226409912,
1.2908493280410767,
0.7123839259147644,
-0.23811016976833344,
-0.8810197114944458,
0.243723526597023,
-0.08826520293951035,
-0.6899623274803162,
-1.8551230430603027,
-0.3835269808769226,
0.18882744014263153,
0.6514461636543274,
-1.1635783910751343,
1.663381576538086,
0.981896162033081,
1.8865835666656494,
1.0310927629470825,
-0.3145747184753418,
1.3719255924224854,
0.008608722127974033,
1.8375091552734375,
-0.42465919256210327,
0.5872198343276978,
-0.3696669042110443,
-1.1630488634109497,
0.94147127866745,
-0.33961960673332214,
-2.0674469470977783,
-0.8238711357116699,
-0.9264198541641235,
-0.2657088339328766,
-0.7260106801986694,
1.0737922191619873,
-0.3419671952724457,
-1.2399276494979858,
0.28448668122291565,
-0.5876925587654114,
0.06708847731351852,
-1.187447428703308,
0.2474096566438675,
0.7136414051055908,
-0.7146937847137451,
-0.004988734610378742,
-0.2012293040752411,
-1.3223868608474731,
-0.5325325131416321,
0.27608051896095276,
1.8310459852218628,
-0.666532039642334,
0.9291316270828247,
0.9785332679748535,
-0.708520233631134,
0.017807528376579285,
0.2610122859477997,
-0.37104275822639465,
0.8340295553207397,
-0.9188616275787354,
-0.3204895555973053,
1.222001552581787,
-0.3528035283088684,
-0.6033755540847778,
1.487233281135559,
0.6572690606117249,
-0.9479976892471313,
-0.3520989418029785,
-0.1628154069185257,
-0.8526702523231506,
0.1053582951426506,
-1.574862003326416,
-0.2453070878982544,
0.21012091636657715,
-1.4940036535263062,
-0.49867045879364014,
-0.24050508439540863,
1.3483575582504272,
-0.11070188134908676,
1.4002376794815063,
-0.34053149819374084,
-0.25823184847831726,
-0.40657365322113037,
-0.5701019167900085,
0.18560989201068878,
-0.11577137559652328,
-0.5227382779121399,
0.40010160207748413,
-0.9344019889831543,
0.22129765152931213,
1.4678641557693481,
0.3693925440311432,
0.047627098858356476,
0.6281368732452393,
0.9711154103279114,
0.4306544065475464,
-0.1280771642923355,
-0.907479465007782,
-1.622983694076538,
2.1350698471069336,
-1.5018255710601807,
1.9858366250991821,
0.7013841271400452,
-0.05146687850356102,
-1.819985270500183,
-1.7830979824066162,
1.3087210655212402,
1.1102155447006226,
2.2886123657226562,
0.5813717246055603,
0.38949087262153625,
-0.74532151222229,
-0.6726823449134827,
0.4192248582839966,
-1.1418455839157104,
-0.7457961440086365,
0.09352964907884598,
2.3626887798309326,
1.7194561958312988,
-0.5362164974212646,
-0.01843201369047165,
-1.0157314538955688,
1.1544520854949951,
-0.05890204384922981,
0.12776795029640198,
1.975079894065857,
-0.3180115818977356,
-1.0806100368499756,
1.2582409381866455,
-2.2794110774993896,
0.24377085268497467,
2.0372750759124756,
0.3577582836151123,
0.0638088658452034,
-1.4456310272216797,
-0.605260968208313,
-0.2784389555454254,
-0.35683321952819824,
-1.2021006345748901,
0.7328595519065857,
-0.2692336440086365,
-0.9215548634529114,
-1.4159646034240723,
0.12564551830291748,
-1.184273600578308,
-1.6579316854476929,
0.3931112587451935,
1.8503422737121582,
2.1129214763641357,
-0.6433201432228088,
1.3576703071594238,
-0.31677260994911194,
0.09577805548906326,
1.2200231552124023,
1.2487177848815918,
3.1633026599884033,
2.0313875675201416,
-1.197646141052246,
0.7384629249572754,
-0.09032869338989258,
-0.40188491344451904,
1.1018073558807373,
-0.989800214767456,
1.300228476524353,
-0.11459745466709137,
-1.1316239833831787,
-1.2222744226455688,
1.0023205280303955,
0.43783333897590637,
-0.002189232502132654,
-0.5908018946647644,
1.3138165473937988,
0.09569646418094635,
1.3553913831710815,
0.49884501099586487,
-0.3316132426261902,
0.4987483322620392,
-0.3919238746166229,
-0.4624740481376648,
1.640466570854187,
0.30127599835395813,
-1.6552023887634277,
-2.3491058349609375,
-0.23781825602054596,
-0.7866186499595642,
-0.04450790584087372,
-0.524808943271637,
-0.9644309878349304,
1.7087771892547607,
0.3767681419849396,
-1.2161005735397339,
-0.2727113962173462,
-0.3641360402107239,
-0.6245871186256409,
2.719670295715332,
-1.389545202255249,
-0.2028615027666092,
-0.9724728465080261,
-0.6577881574630737,
1.6272848844528198,
-1.3707904815673828,
-0.12291491776704788,
-0.9590660333633423,
-0.5743465423583984,
-1.3419502973556519,
-0.611314594745636,
-0.015412833541631699,
-0.9770570993423462,
0.7471909523010254,
0.07589097321033478,
-1.060131311416626,
-0.24684327840805054,
-0.8748493194580078,
0.8477984070777893,
-0.03848422318696976,
0.21167713403701782,
2.01989483833313,
0.32059282064437866,
-0.344919353723526,
0.6483470797538757,
1.0830886363983154,
0.6529013514518738,
-0.5891920328140259,
0.16369332373142242,
-0.6298890113830566,
0.26564034819602966,
-1.2932850122451782,
0.33772024512290955,
-2.876908540725708,
0.7389608025550842,
-0.10902613401412964,
-0.10884034633636475,
-0.0627310574054718,
-1.1851568222045898,
1.137892246246338,
2.584975481033325,
-1.209604024887085,
0.4289919435977936,
0.32927414774894714,
1.105682373046875,
-1.491937279701233,
0.34406307339668274,
-0.375680536031723,
2.152348279953003,
0.1977064311504364,
1.0450034141540527,
-0.6083575487136841,
-2.1517319679260254,
0.7411010265350342,
-1.199493646621704,
-1.100210189819336,
0.7008996605873108,
-0.7062351703643799,
0.025055624544620514,
-1.36624276638031,
-0.1350630819797516,
-0.8770641684532166,
-1.2555124759674072,
0.7097460627555847,
0.20510877668857574,
0.5006159543991089,
-0.6312103867530823,
0.28866323828697205,
-2.239952564239502,
-1.4028222560882568,
-0.24232755601406097,
-0.973228394985199,
0.48469841480255127,
-0.24951256811618805,
0.6915802955627441,
-0.13237521052360535,
0.09353835880756378,
0.33710765838623047,
1.4073604345321655,
3.503936529159546,
0.07107763737440109,
0.40517425537109375,
-0.14359870553016663,
-0.9567436575889587,
1.529937982559204,
0.9978181719779968,
-0.030826393514871597,
-0.6467018127441406,
-1.0454742908477783,
1.203183889389038,
2.069669246673584,
0.9141766428947449,
0.1323377937078476,
-0.8657701015472412,
-0.7188546657562256,
-0.051206521689891815,
0.1066422313451767,
0.5635324120521545,
0.9701951146125793,
-0.06016429886221886,
0.08517743647098541,
1.5857961177825928,
1.17939031124115,
-0.3572915494441986,
0.25168314576148987,
-0.8306758999824524,
-0.3675551116466522,
0.5239717364311218,
0.3964068591594696,
-0.07155445218086243,
0.45436710119247437,
-0.9194818139076233,
-0.27991771697998047,
-0.31176602840423584,
-1.04169762134552,
-0.6498128771781921,
-0.3362388014793396,
-0.4215848743915558,
1.6846846342086792,
0.1448683887720108,
-0.4713432192802429,
0.004801612347364426,
-0.8291415572166443,
-0.2271980196237564,
-1.0982606410980225,
0.2841988801956177,
-0.017890185117721558,
-0.03212849423289299,
-0.0451546385884285,
1.7204551696777344,
-0.9216713905334473,
-2.248037576675415,
0.23746778070926666,
0.21576663851737976,
-0.4006938636302948,
0.20603352785110474,
1.5806972980499268,
0.47451233863830566,
1.4514902830123901,
1.2580182552337646,
0.9763861298561096,
-0.5670909881591797,
-1.3690003156661987,
0.7043245434761047,
0.985695481300354,
-1.6100492477416992,
0.822907567024231,
-0.1256093531847,
-0.5114960074424744,
0.7978561520576477,
1.1839351654052734,
0.44417616724967957,
-1.984619140625,
0.8091326355934143,
-0.857785701751709,
0.7605047225952148,
0.5916748046875,
0.6932934522628784,
0.2064739614725113,
0.8424077033996582,
-1.1534266471862793,
-1.0608946084976196,
-0.7580114603042603,
-0.6460927128791809,
1.9549529552459717,
-0.23263677954673767,
0.48511484265327454,
-0.20414143800735474,
-1.2658997774124146,
-0.05698368698358536,
0.658089816570282,
0.27778246998786926,
-0.30636951327323914,
0.7500160932540894,
-0.8345504403114319,
-1.2269196510314941,
-1.447177767753601,
-0.4127948582172394,
-0.9667380452156067,
-0.995206892490387,
1.088384985923767,
0.6843028664588928,
0.35271674394607544,
1.940347671508789,
0.48062488436698914,
0.2778015732765198,
-2.6661391258239746,
0.9306923151016235,
0.31873050332069397,
0.05712788552045822,
0.9999338984489441,
0.24673406779766083,
1.2049918174743652,
-0.10291780531406403,
0.5900388956069946,
-2.324138641357422,
2.2874183654785156,
-0.298064649105072,
0.7188346982002258,
0.12592138350009918,
-0.06602311134338379,
1.0211007595062256,
0.6097273826599121,
0.692694902420044,
-1.1469042301177979,
0.7297184467315674,
-0.6384087204933167,
1.191265344619751,
1.0693418979644775,
-0.7899096608161926,
0.005782091990113258,
1.341766357421875,
0.5790235996246338,
-0.4417873024940491,
-0.8773869872093201,
-0.9313402771949768,
0.933876633644104,
1.735656976699829,
-0.15612785518169403,
0.03523080796003342,
0.825212299823761,
0.5180688500404358,
-1.3224166631698608,
0.11706601828336716,
-0.724063515663147,
-0.7809270024299622,
1.4861608743667603,
2.060317277908325,
-0.034545283764600754,
-0.21823522448539734,
-0.7496252655982971,
-1.3746908903121948,
0.7303348779678345,
0.04285798221826553,
0.1415976881980896,
0.6100772023200989,
-0.5767331123352051,
0.9697021842002869,
0.7990989685058594,
1.0404895544052124,
0.1491512954235077,
0.3775136470794678,
0.4139331579208374,
-0.2439461052417755,
-1.1170676946640015,
-0.3695412278175354,
-1.114316701889038,
-2.6183972358703613,
0.3960970640182495,
-0.3257247805595398,
-1.3977787494659424,
-0.0015267101116478443,
-1.0090097188949585,
0.7963328957557678,
-0.6544873118400574,
-1.0908210277557373,
-1.4631928205490112,
0.18111087381839752,
-0.15906205773353577,
0.9454089403152466,
-1.6313625574111938,
-0.2293022722005844,
1.3737460374832153,
0.8826636075973511,
-0.5969135165214539,
1.1449989080429077,
0.23590505123138428,
1.0521107912063599,
0.8152543902397156,
-0.48595741391181946,
0.5282914042472839,
0.1844475120306015,
-1.400036334991455,
0.5288051962852478,
1.2568587064743042,
0.21215857565402985,
1.3597044944763184,
-0.6423351168632507,
0.04692896455526352,
0.4373942017555237,
-0.5996840000152588,
-0.4581381678581238,
-0.5076401829719543,
0.7773130536079407,
0.05246094986796379,
-1.0167090892791748,
-0.023573409765958786,
-0.1923258751630783,
-0.1602736860513687,
0.15593145787715912,
-1.4705901145935059,
-0.25202134251594543,
-0.3404545485973358,
-0.47319483757019043,
-1.3790946006774902,
-0.15199042856693268,
1.335652470588684,
-0.7902704477310181,
-0.0038948683068156242,
0.36975032091140747,
0.39982497692108154,
0.5678629875183105,
0.6961954832077026,
-0.7524617314338684,
-0.38336899876594543,
-0.30817803740501404,
-0.33308905363082886,
0.4250684976577759,
1.2920249700546265,
-0.1320282369852066,
-1.0795915126800537,
0.6943075656890869,
-0.2780537009239197,
0.15075087547302246,
2.0789284706115723,
0.01501647662371397,
-0.7628970742225647,
0.271202027797699,
-0.6397649645805359,
1.9800667762756348,
1.499441385269165,
1.2547411918640137,
-0.13881102204322815,
-0.791163444519043,
0.7194873690605164,
-0.2390873283147812,
-0.29421812295913696,
0.7719964981079102,
0.4919203817844391,
-0.22831444442272186,
-1.4100579023361206,
0.5591561794281006,
1.3038647174835205,
-0.9159625768661499,
-0.7619349956512451,
0.059895701706409454,
-0.8021403551101685,
1.0106993913650513,
0.7771403789520264,
0.4966457784175873,
0.2656436860561371,
1.7002036571502686,
0.7185564637184143,
-0.6277461051940918,
0.4177916347980499,
0.5359604358673096,
-0.08236565440893173,
-2.0779154300689697,
-1.0393658876419067,
0.3542604446411133,
-0.43145880103111267,
-1.5345733165740967,
1.4626197814941406,
-1.1773420572280884,
-0.8854363560676575,
0.5554735660552979,
0.13837794959545135,
1.4340105056762695,
0.31365957856178284,
1.6110429763793945,
2.0185585021972656,
0.8310237526893616,
0.3483925759792328,
1.365157127380371,
-0.054723236709833145,
-0.42708802223205566,
1.7761180400848389,
-0.3923110365867615,
0.45328137278556824,
1.1369953155517578,
-0.4631621837615967,
-0.9970898628234863,
-0.7956836819648743,
-1.1417295932769775,
-0.5792993307113647,
1.1364426612854004,
0.1033421978354454,
-1.1361699104309082,
0.17890937626361847,
1.514202356338501,
0.21809019148349762,
-0.2663743793964386,
0.5087472200393677,
0.467416375875473,
-0.6572012901306152,
-0.19430722296237946,
-0.9623156785964966,
0.6292611360549927,
-0.19678324460983276,
-0.352216511964798,
0.3592289686203003,
0.3377215266227722,
1.2498178482055664,
-0.033860042691230774,
0.13420304656028748,
1.1885895729064941,
-1.3988022804260254,
1.5138440132141113,
-0.5588427186012268,
0.1872616410255432,
-2.340944290161133,
1.4078220129013062,
-0.7769958972930908,
1.9259793758392334,
-2.6387085914611816,
0.33174023032188416,
-0.609363317489624,
-0.4210685193538666,
0.27682793140411377,
-0.38744792342185974,
0.10765936970710754,
-0.22135666012763977,
-0.9961519837379456,
-0.176934152841568,
-0.7428480982780457,
0.6009979844093323,
1.2169430255889893,
1.273358941078186,
-1.0318721532821655,
-0.37474924325942993,
-1.6861683130264282,
-0.18313206732273102,
-0.8049774169921875,
0.29019400477409363,
-2.075744152069092,
-0.20779335498809814,
-1.9151661396026611,
-2.378371000289917,
-1.4084887504577637,
-0.8669124841690063,
1.2080005407333374,
0.2307838797569275,
-0.9362788200378418,
1.2119112014770508,
-0.2419482171535492,
-1.7609343528747559,
1.097281813621521,
-2.130873680114746
] |
https://github.com/huggingface/datasets/issues/3398 | Add URL field to Wikimedia dataset instances: wikipedia,... | Indeed:
> To re-distribute text on Wikipedia in any form, provide credit to the authors either by including a) a [hyperlink](https://en.wikipedia.org/wiki/Hyperlink) (where possible) or [URL](https://en.wikipedia.org/wiki/URL) to the page or pages you are re-using, b) a hyperlink (where possible) or URL to an alternative, stable online copy which is freely accessible, which conforms with the license, and which provides credit to the authors in a manner equivalent to the credit given on this website, or c) a list of all authors. (Any list of authors may be filtered to exclude very small or irrelevant contributions.) This applies to text developed by the Wikipedia community. Text from external sources may attach additional attribution requirements to the work, which should be indicated on an article's face or on its talk page. For example, a page may have a banner or other notation indicating that some or all of its content was originally published somewhere else. Where such notations are visible in the page itself, they should generally be preserved by re-users.
source: https://en.wikipedia.org/wiki/Wikipedia:Copyrights
I guess it's fine to add the URL field - it can be constructed easily from the title page IIRC. | As reported by @geohci, in order to host pre-processed data in the Hub, we should add the full URL to data instances (new field "url"), so that we conform to proper attribution from license requirement. See, e.g.: https://fair-trec.github.io/docs/Fair_Ranking_2021_Participant_Instructions.pdf#subsection.3.2
This should be done for all pre-processed datasets under "wikimedia" org in the Hub: https://huggingface.co/wikimedia
| 1,067 | 190 | Add URL field to Wikimedia dataset instances: wikipedia,...
As reported by @geohci, in order to host pre-processed data in the Hub, we should add the full URL to data instances (new field "url"), so that we conform to proper attribution from license requirement. See, e.g.: https://fair-trec.github.io/docs/Fair_Ranking_2021_Participant_Instructions.pdf#subsection.3.2
This should be done for all pre-processed datasets under "wikimedia" org in the Hub: https://huggingface.co/wikimedia
Indeed:
> To re-distribute text on Wikipedia in any form, provide credit to the authors either by including a) a [hyperlink](https://en.wikipedia.org/wiki/Hyperlink) (where possible) or [URL](https://en.wikipedia.org/wiki/URL) to the page or pages you are re-using, b) a hyperlink (where possible) or URL to an alternative, stable online copy which is freely accessible, which conforms with the license, and which provides credit to the authors in a manner equivalent to the credit given on this website, or c) a list of all authors. (Any list of authors may be filtered to exclude very small or irrelevant contributions.) This applies to text developed by the Wikipedia community. Text from external sources may attach additional attribution requirements to the work, which should be indicated on an article's face or on its talk page. For example, a page may have a banner or other notation indicating that some or all of its content was originally published somewhere else. Where such notations are visible in the page itself, they should generally be preserved by re-users.
source: https://en.wikipedia.org/wiki/Wikipedia:Copyrights
I guess it's fine to add the URL field - it can be constructed easily from the title page IIRC. | [
-1.1880437135696411,
-0.9143691062927246,
-0.8244947791099548,
1.4353452920913696,
-0.146108940243721,
-1.1626520156860352,
0.13052166998386383,
-1.0055687427520752,
1.590610384941101,
-0.8259543776512146,
0.32826071977615356,
-1.6662967205047607,
0.07159136980772018,
-0.5339328646659851,
-0.7318885922431946,
-0.8538108468055725,
-0.40856316685676575,
-0.8022525906562805,
0.977211594581604,
2.581672430038452,
1.2251769304275513,
-1.4301214218139648,
2.6569652557373047,
0.7296096086502075,
-0.19886529445648193,
-1.0231401920318604,
0.4678218364715576,
0.013200930319726467,
-1.28397798538208,
-0.487342894077301,
-0.9578315019607544,
0.0076103368774056435,
-0.5967767834663391,
-0.4800032675266266,
0.12575800716876984,
0.34942394495010376,
-0.18848374485969543,
-0.3814181685447693,
-0.6600406765937805,
-0.7361686825752258,
0.5078648924827576,
-0.4191395342350006,
0.9890626072883606,
-0.2655201554298401,
1.760842204093933,
-0.6033803820610046,
0.4508481025695801,
0.7384446263313293,
1.3295848369598389,
0.1729453057050705,
-0.039323486387729645,
0.2772071659564972,
0.41444507241249084,
-0.01264905370771885,
0.4139723479747772,
1.1491724252700806,
0.6535666584968567,
0.5031659603118896,
0.7375897765159607,
-2.204129934310913,
1.3735699653625488,
-1.1099610328674316,
0.3475418984889984,
1.3817545175552368,
-0.9587504267692566,
0.36827412247657776,
-1.8562207221984863,
-0.1313294917345047,
0.5263464450836182,
-2.355966329574585,
0.15202192962169647,
-1.2969857454299927,
-0.5269219279289246,
0.9743285775184631,
0.2526807188987732,
-1.294026494026184,
0.18232207000255585,
-0.5077448487281799,
0.9006751775741577,
0.5103186964988708,
1.083492636680603,
-1.6728227138519287,
-0.03922249749302864,
-0.27100107073783875,
0.12334928661584854,
-1.2832311391830444,
-1.5302218198776245,
0.6626637578010559,
0.6055196523666382,
0.43803033232688904,
-0.13448888063430786,
0.9904095530509949,
-0.9806846380233765,
0.8249325156211853,
-0.95697420835495,
-1.6833980083465576,
-1.4341142177581787,
-2.273693799972534,
-2.2359426021575928,
0.7865065336227417,
-0.5178239345550537,
-0.5028527975082397,
2.0594801902770996,
-1.027780294418335,
-1.7768337726593018,
1.1647000312805176,
0.24895595014095306,
0.020131539553403854,
2.4241223335266113,
0.16542237997055054,
-0.7753227353096008,
0.49942079186439514,
-0.7357306480407715,
0.8946781754493713,
-0.4157724678516388,
1.410169243812561,
0.4261923134326935,
-1.0336532592773438,
1.6377874612808228,
-0.329227477312088,
0.47221970558166504,
-0.653755784034729,
-0.5780271291732788,
-0.7633486390113831,
0.34499314427375793,
1.8162202835083008,
-0.2928590178489685,
1.5425413846969604,
-0.3288470506668091,
-1.4774153232574463,
-1.5561004877090454,
0.8671598434448242,
0.52623450756073,
-0.8724194169044495,
0.09552086889743805,
-0.33146658539772034,
0.09320686012506485,
-0.05353985354304314,
1.1831121444702148,
1.3005104064941406,
0.6644865274429321,
-0.3068039119243622,
-0.9155826568603516,
0.17557843029499054,
-0.18642698228359222,
-0.6734695434570312,
-1.8267385959625244,
-0.4551630914211273,
0.17359329760074615,
0.6246498227119446,
-1.2283939123153687,
1.749922275543213,
0.9178006052970886,
1.9458167552947998,
1.023686408996582,
-0.4148893356323242,
1.4419559240341187,
0.0669635608792305,
1.8160611391067505,
-0.4278188943862915,
0.6165234446525574,
-0.46767792105674744,
-1.1755090951919556,
0.8841312527656555,
-0.32541489601135254,
-2.056790351867676,
-0.7585067749023438,
-0.8593388795852661,
-0.2679859399795532,
-0.7201717495918274,
0.9847186803817749,
-0.22866253554821014,
-1.2553296089172363,
0.2952323257923126,
-0.6076433658599854,
0.11528269946575165,
-1.2194559574127197,
0.2627696990966797,
0.7140499353408813,
-0.647199273109436,
0.07700204849243164,
-0.24431471526622772,
-1.3639867305755615,
-0.5378527045249939,
0.32032832503318787,
1.7835347652435303,
-0.643977165222168,
0.8763430118560791,
0.9817831516265869,
-0.6127637624740601,
0.030051887035369873,
0.32045674324035645,
-0.2893775701522827,
0.905400812625885,
-0.9160829782485962,
-0.39049312472343445,
1.1552623510360718,
-0.2616868019104004,
-0.5822762250900269,
1.4772601127624512,
0.6695852279663086,
-0.9290806651115417,
-0.32649821043014526,
-0.15020906925201416,
-0.8897695541381836,
-0.0032282602041959763,
-1.5646181106567383,
-0.13287203013896942,
0.2769169807434082,
-1.6030464172363281,
-0.4067853093147278,
-0.2177124172449112,
1.328322410583496,
-0.13455910980701447,
1.483796238899231,
-0.3441881239414215,
-0.23531413078308105,
-0.40352344512939453,
-0.4395405650138855,
0.14791397750377655,
-0.20129378139972687,
-0.6006450653076172,
0.37486109137535095,
-0.9238566160202026,
0.3717365562915802,
1.4875884056091309,
0.36518752574920654,
0.044790174812078476,
0.5061081647872925,
1.0482723712921143,
0.40193384885787964,
-0.03861667960882187,
-0.838143527507782,
-1.5060832500457764,
2.1137516498565674,
-1.492228627204895,
1.9688910245895386,
0.8477270007133484,
-0.009389320388436317,
-1.8192603588104248,
-1.7871443033218384,
1.3599966764450073,
1.1084723472595215,
2.3280510902404785,
0.6268610954284668,
0.4655388295650482,
-0.8172127604484558,
-0.6305147409439087,
0.3469318747520447,
-1.0475369691848755,
-0.792639434337616,
0.06232514977455139,
2.3524320125579834,
1.7481085062026978,
-0.46498361229896545,
-0.07155066728591919,
-1.0468147993087769,
1.36812424659729,
-0.13367053866386414,
0.14351490139961243,
1.970804214477539,
-0.24536755681037903,
-1.0519872903823853,
1.3466237783432007,
-2.3276829719543457,
0.21757589280605316,
2.0522875785827637,
0.31612518429756165,
0.09433642774820328,
-1.3690376281738281,
-0.6045149564743042,
-0.30311843752861023,
-0.4274400770664215,
-1.1714091300964355,
0.6295202970504761,
-0.2157519906759262,
-0.9178560972213745,
-1.501725435256958,
0.051413316279649734,
-1.194852590560913,
-1.6790963411331177,
0.32477352023124695,
1.843061089515686,
2.062103509902954,
-0.6581111550331116,
1.4478380680084229,
-0.3372756540775299,
0.04905278608202934,
1.2365165948867798,
1.2207516431808472,
3.1098520755767822,
1.9818885326385498,
-1.208910584449768,
0.6365951895713806,
-0.14478132128715515,
-0.5025327205657959,
1.0173518657684326,
-1.0630525350570679,
1.2390453815460205,
-0.19331857562065125,
-1.2008697986602783,
-1.2302111387252808,
1.0062153339385986,
0.3854764401912689,
0.09081397950649261,
-0.6522631049156189,
1.253502607345581,
0.143942728638649,
1.3113995790481567,
0.5897678136825562,
-0.30305567383766174,
0.49339351058006287,
-0.4353153109550476,
-0.566510021686554,
1.648711085319519,
0.22564035654067993,
-1.5590784549713135,
-2.329969644546509,
-0.2273549884557724,
-0.8248858451843262,
0.0009154351428151131,
-0.5893347859382629,
-0.9620748162269592,
1.6960073709487915,
0.3990366458892822,
-1.285801887512207,
-0.27409645915031433,
-0.37059351801872253,
-0.6242563128471375,
2.701202630996704,
-1.4122518301010132,
-0.26502853631973267,
-0.9679504036903381,
-0.5805615186691284,
1.6051679849624634,
-1.2586325407028198,
-0.10588400810956955,
-0.9962840676307678,
-0.6016464829444885,
-1.2744723558425903,
-0.5546689033508301,
-0.0918748751282692,
-0.9097437262535095,
0.7263964414596558,
0.1270011067390442,
-1.090391993522644,
-0.29946064949035645,
-0.8157923221588135,
0.8478757739067078,
-0.05793438479304314,
0.17997168004512787,
1.974640965461731,
0.34442049264907837,
-0.3829851746559143,
0.6979279518127441,
1.1682088375091553,
0.6214900016784668,
-0.5852495431900024,
0.11609239876270294,
-0.5958950519561768,
0.3622036874294281,
-1.3202210664749146,
0.29766741394996643,
-2.7910258769989014,
0.7361875176429749,
-0.0495692640542984,
-0.16065819561481476,
-0.039513103663921356,
-1.2612709999084473,
1.1261942386627197,
2.590470552444458,
-1.2105865478515625,
0.42394110560417175,
0.3682730197906494,
1.12284255027771,
-1.5020660161972046,
0.3436993360519409,
-0.3883611857891083,
2.1751880645751953,
0.14973300695419312,
1.150081753730774,
-0.5837987661361694,
-2.2726659774780273,
0.618471622467041,
-1.221179485321045,
-1.0748175382614136,
0.7401069402694702,
-0.73285311460495,
0.014619714580476284,
-1.43950355052948,
-0.13172133266925812,
-0.839695394039154,
-1.2151650190353394,
0.751747190952301,
0.12803010642528534,
0.48726406693458557,
-0.6036840677261353,
0.3044336140155792,
-2.2103021144866943,
-1.45388662815094,
-0.25001874566078186,
-0.9808990359306335,
0.49246206879615784,
-0.37288275361061096,
0.7579106688499451,
-0.10170528292655945,
0.052486494183540344,
0.29537224769592285,
1.404740333557129,
3.3851795196533203,
0.1936970055103302,
0.42218607664108276,
-0.23203451931476593,
-0.9479646682739258,
1.4345881938934326,
0.9974083304405212,
-0.1442641317844391,
-0.5769882798194885,
-0.9956536293029785,
1.248457670211792,
2.0346453189849854,
0.9521410465240479,
0.13387654721736908,
-0.8631157875061035,
-0.7561631202697754,
-0.06981751322746277,
0.1608433723449707,
0.4904507100582123,
0.9429023861885071,
0.011993537656962872,
0.1495186686515808,
1.512006402015686,
1.1985894441604614,
-0.3230711817741394,
0.41023334860801697,
-0.8456345200538635,
-0.41738033294677734,
0.44713568687438965,
0.3845241367816925,
-0.01960018277168274,
0.4877701699733734,
-0.97134929895401,
-0.2723025381565094,
-0.3487216532230377,
-0.9663450717926025,
-0.6999669671058655,
-0.38333025574684143,
-0.4057426452636719,
1.7132948637008667,
0.13851329684257507,
-0.4385465681552887,
0.06465139985084534,
-0.7187681794166565,
-0.16536280512809753,
-1.1100887060165405,
0.33088961243629456,
-0.03236744552850723,
-0.039909496903419495,
-0.10808875411748886,
1.7315841913223267,
-0.8923112154006958,
-2.1819870471954346,
0.1991848200559616,
0.2555232048034668,
-0.4045431911945343,
0.2117280513048172,
1.6450449228286743,
0.48859262466430664,
1.4739636182785034,
1.3325847387313843,
0.930408239364624,
-0.6151186227798462,
-1.3222681283950806,
0.709149956703186,
0.9710234999656677,
-1.4719250202178955,
0.8231489658355713,
-0.03907616809010506,
-0.5092380046844482,
0.713611364364624,
1.1771429777145386,
0.3833455741405487,
-2.0832300186157227,
0.8690719604492188,
-0.9172588586807251,
0.8156949877738953,
0.599253237247467,
0.6938744187355042,
0.2452012449502945,
0.7423297762870789,
-1.2961499691009521,
-1.0679340362548828,
-0.755415678024292,
-0.6149578094482422,
1.9873994588851929,
-0.28556710481643677,
0.5471521019935608,
-0.2090655267238617,
-1.3520426750183105,
-0.15342015027999878,
0.6344821453094482,
0.40429070591926575,
-0.4425397515296936,
0.8089015483856201,
-0.6461877226829529,
-1.1713460683822632,
-1.3791154623031616,
-0.5121557712554932,
-0.9700300097465515,
-0.9041327834129333,
1.0737924575805664,
0.749313235282898,
0.3202422261238098,
1.8982720375061035,
0.5115737318992615,
0.23579029738903046,
-2.6610777378082275,
0.9378573894500732,
0.3758132755756378,
-0.05350245162844658,
0.9987308382987976,
0.3156564235687256,
1.057624101638794,
-0.05069516971707344,
0.570217490196228,
-2.346792221069336,
2.255831241607666,
-0.2049793154001236,
0.8074249625205994,
0.06640928983688354,
-0.0638401061296463,
1.0727505683898926,
0.589734673500061,
0.6419404745101929,
-1.1037914752960205,
0.6537806391716003,
-0.5613094568252563,
1.2343177795410156,
0.8951753377914429,
-0.7551755905151367,
-0.011356482282280922,
1.3527154922485352,
0.493429571390152,
-0.5350564122200012,
-0.9434303641319275,
-0.8633630275726318,
0.9950655102729797,
1.7709556818008423,
-0.121538445353508,
0.1635177582502365,
0.8199888467788696,
0.5603184103965759,
-1.350192666053772,
0.12873660027980804,
-0.7068300843238831,
-0.8071314096450806,
1.5091602802276611,
2.051705837249756,
-0.12110041081905365,
-0.15953987836837769,
-0.7229487299919128,
-1.427499771118164,
0.7619579434394836,
-0.03670664504170418,
0.1331167221069336,
0.6181361675262451,
-0.5998501181602478,
1.0090864896774292,
0.7980533838272095,
0.9696675539016724,
0.14846093952655792,
0.2881886065006256,
0.2871708273887634,
-0.34358006715774536,
-1.1351953744888306,
-0.2850857973098755,
-1.1732844114303589,
-2.541914224624634,
0.44161948561668396,
-0.20938459038734436,
-1.397723913192749,
0.0033389469608664513,
-0.9961243271827698,
0.8281699419021606,
-0.652508556842804,
-1.1182525157928467,
-1.552722454071045,
0.2225077599287033,
-0.1467614471912384,
0.961969256401062,
-1.6343071460723877,
-0.18677359819412231,
1.2049387693405151,
0.9101324081420898,
-0.5954136252403259,
1.0600708723068237,
0.2685033679008484,
1.0010788440704346,
0.8628186583518982,
-0.3972105383872986,
0.5115307569503784,
0.18066808581352234,
-1.3406606912612915,
0.45236217975616455,
1.2263132333755493,
0.2514224648475647,
1.32236909866333,
-0.676365852355957,
-0.00484154187142849,
0.39529064297676086,
-0.45604440569877625,
-0.37820136547088623,
-0.49532660841941833,
0.7579673528671265,
0.09799551218748093,
-1.0042511224746704,
-0.03795933723449707,
-0.10430684685707092,
-0.16525115072727203,
0.19375500082969666,
-1.4783293008804321,
-0.1941816508769989,
-0.3668716549873352,
-0.47601181268692017,
-1.297160029411316,
-0.13432183861732483,
1.3424406051635742,
-0.7831631898880005,
-0.09148948639631271,
0.4575912356376648,
0.4021930992603302,
0.6368292570114136,
0.7304720878601074,
-0.6827152967453003,
-0.45336857438087463,
-0.21174004673957825,
-0.353376567363739,
0.3924264907836914,
1.348063588142395,
-0.09366986900568008,
-0.9582208395004272,
0.7278786301612854,
-0.34564152359962463,
0.11605114489793777,
2.060948133468628,
0.04415198415517807,
-0.7946731448173523,
0.324898362159729,
-0.6363372802734375,
1.9021486043930054,
1.67368483543396,
1.2387453317642212,
-0.12923985719680786,
-0.9035200476646423,
0.6955803632736206,
-0.291496217250824,
-0.3213651776313782,
0.8655918836593628,
0.3435823917388916,
-0.2457548826932907,
-1.4676357507705688,
0.5292232036590576,
1.2719625234603882,
-0.9301179647445679,
-0.7944401502609253,
0.08432997763156891,
-0.7958604693412781,
1.0842046737670898,
0.7192724347114563,
0.4157431423664093,
0.2233062982559204,
1.6680299043655396,
0.824774980545044,
-0.571537971496582,
0.5456395745277405,
0.5071069002151489,
-0.12935462594032288,
-2.074930429458618,
-1.117275595664978,
0.2937239110469818,
-0.388161838054657,
-1.5551965236663818,
1.343043327331543,
-1.1875592470169067,
-0.9052256345748901,
0.567984938621521,
0.06606541574001312,
1.4355268478393555,
0.2841052711009979,
1.6231917142868042,
2.106689929962158,
0.8341125249862671,
0.3449818193912506,
1.273208498954773,
-0.1068255752325058,
-0.39838486909866333,
1.7791478633880615,
-0.42257627844810486,
0.4917614161968231,
1.1375954151153564,
-0.4012356996536255,
-1.031105399131775,
-0.7700494527816772,
-1.2634780406951904,
-0.6755329966545105,
1.1529043912887573,
0.12202358990907669,
-1.0676504373550415,
0.25244101881980896,
1.6171280145645142,
0.14057856798171997,
-0.3201945722103119,
0.5408021211624146,
0.5390470027923584,
-0.7391632199287415,
-0.1448461264371872,
-0.8847975730895996,
0.5442664623260498,
-0.18516495823860168,
-0.34641510248184204,
0.4120216965675354,
0.37311744689941406,
1.2453045845031738,
0.013955754227936268,
0.0752558782696724,
1.0939140319824219,
-1.472470760345459,
1.4579992294311523,
-0.5981258153915405,
0.23210841417312622,
-2.327686309814453,
1.4329687356948853,
-0.7411641478538513,
1.965106725692749,
-2.6553711891174316,
0.32820358872413635,
-0.6622975468635559,
-0.5377485156059265,
0.25300586223602295,
-0.3820522129535675,
0.14421942830085754,
-0.19450032711029053,
-0.9916545152664185,
-0.15601186454296112,
-0.6686196327209473,
0.512816846370697,
1.1283369064331055,
1.320620059967041,
-1.0572577714920044,
-0.37086424231529236,
-1.694862723350525,
-0.1540105789899826,
-0.7239595055580139,
0.2976006269454956,
-1.9972954988479614,
-0.16862384974956512,
-1.988081455230713,
-2.3075432777404785,
-1.4141671657562256,
-0.8665000200271606,
1.1392874717712402,
0.13701175153255463,
-0.9673617482185364,
1.1749353408813477,
-0.2916552722454071,
-1.79275381565094,
1.0186034440994263,
-2.1974849700927734
] |
https://github.com/huggingface/datasets/issues/3398 | Add URL field to Wikimedia dataset instances: wikipedia,... | yep, sorry forgot that that wasn't already in the dumps. specifically `f"https://{language}.wikipedia.org/wiki/{title.replace(' ', '_')}` should do it | As reported by @geohci, in order to host pre-processed data in the Hub, we should add the full URL to data instances (new field "url"), so that we conform to proper attribution from license requirement. See, e.g.: https://fair-trec.github.io/docs/Fair_Ranking_2021_Participant_Instructions.pdf#subsection.3.2
This should be done for all pre-processed datasets under "wikimedia" org in the Hub: https://huggingface.co/wikimedia
| 1,067 | 17 | Add URL field to Wikimedia dataset instances: wikipedia,...
As reported by @geohci, in order to host pre-processed data in the Hub, we should add the full URL to data instances (new field "url"), so that we conform to proper attribution from license requirement. See, e.g.: https://fair-trec.github.io/docs/Fair_Ranking_2021_Participant_Instructions.pdf#subsection.3.2
This should be done for all pre-processed datasets under "wikimedia" org in the Hub: https://huggingface.co/wikimedia
yep, sorry forgot that that wasn't already in the dumps. specifically `f"https://{language}.wikipedia.org/wiki/{title.replace(' ', '_')}` should do it | [
-1.2494560480117798,
-0.8374381065368652,
-0.8077529668807983,
1.4966650009155273,
-0.1908780038356781,
-1.1714539527893066,
0.11599814891815186,
-0.8960404992103577,
1.526371955871582,
-0.8352571725845337,
0.36601677536964417,
-1.6360453367233276,
-0.016636759042739868,
-0.5712076425552368,
-0.7198013663291931,
-0.8403638601303101,
-0.3700616955757141,
-0.7486494183540344,
0.9586912989616394,
2.572604179382324,
1.176221251487732,
-1.3455805778503418,
2.7359955310821533,
0.723568856716156,
-0.12266767024993896,
-1.0595004558563232,
0.5367424488067627,
0.09102995693683624,
-1.2631818056106567,
-0.4468265175819397,
-1.0370852947235107,
0.022256020456552505,
-0.4963162839412689,
-0.43889057636260986,
0.15240347385406494,
0.39988911151885986,
-0.22290830314159393,
-0.36761605739593506,
-0.6625587344169617,
-0.7473998665809631,
0.40054234862327576,
-0.4896714687347412,
0.9955325722694397,
-0.37574926018714905,
1.7428065538406372,
-0.49662840366363525,
0.3575730323791504,
0.7372949719429016,
1.2169585227966309,
0.07524846494197845,
0.03935028240084648,
0.260146826505661,
0.48893409967422485,
0.10873037576675415,
0.4176627993583679,
1.123538613319397,
0.574295699596405,
0.41997426748275757,
0.6551141142845154,
-2.2070534229278564,
1.3261133432388306,
-1.133188009262085,
0.19097444415092468,
1.4142723083496094,
-1.024403691291809,
0.40949490666389465,
-1.7377604246139526,
-0.11322112381458282,
0.504835844039917,
-2.350710391998291,
0.19310277700424194,
-1.301788568496704,
-0.5198402404785156,
0.9408916234970093,
0.31595900654792786,
-1.2793385982513428,
0.09646950662136078,
-0.49017542600631714,
0.8976947069168091,
0.4820040166378021,
1.0751800537109375,
-1.6573888063430786,
-0.007913735695183277,
-0.31988564133644104,
-0.06113408878445625,
-1.3708611726760864,
-1.4565348625183105,
0.6531367301940918,
0.5616399645805359,
0.5607672929763794,
-0.1172429770231247,
0.9524499177932739,
-1.0550793409347534,
0.8414856195449829,
-0.9059940576553345,
-1.6499574184417725,
-1.3991636037826538,
-2.407680034637451,
-2.2633275985717773,
0.832316517829895,
-0.4731464087963104,
-0.48659512400627136,
1.9999973773956299,
-0.962875247001648,
-1.7954952716827393,
1.1695514917373657,
0.20025202631950378,
0.050541527569293976,
2.4313933849334717,
0.23682741820812225,
-0.7279917597770691,
0.3864932954311371,
-0.7211304903030396,
0.8516800999641418,
-0.39189887046813965,
1.488298773765564,
0.5109987854957581,
-0.912657618522644,
1.594200611114502,
-0.3629894554615021,
0.4766625761985779,
-0.5287964344024658,
-0.5243803262710571,
-0.8133028149604797,
0.23501895368099213,
1.8356010913848877,
-0.2853916585445404,
1.5262796878814697,
-0.3517901599407196,
-1.4826024770736694,
-1.5517535209655762,
0.8801805377006531,
0.4688645899295807,
-0.838104784488678,
0.034580159932374954,
-0.4266064167022705,
0.08728648722171783,
-0.15492798388004303,
1.2377763986587524,
1.2454068660736084,
0.7385784387588501,
-0.2788746953010559,
-0.8973857760429382,
0.2644943296909332,
-0.1232641339302063,
-0.6727007031440735,
-1.9160306453704834,
-0.36784499883651733,
0.20552316308021545,
0.6486175060272217,
-1.197803020477295,
1.6422151327133179,
0.9695864915847778,
1.9219861030578613,
0.9798803329467773,
-0.3218967914581299,
1.36818265914917,
-0.006665865890681744,
1.8960816860198975,
-0.5058600306510925,
0.5393624901771545,
-0.418864369392395,
-1.1836475133895874,
0.9456355571746826,
-0.3394426107406616,
-2.0347228050231934,
-0.8079178333282471,
-0.9634391069412231,
-0.2692216634750366,
-0.7690074443817139,
1.0084879398345947,
-0.3155912458896637,
-1.276502013206482,
0.24884043633937836,
-0.6182731986045837,
0.1044415533542633,
-1.142117977142334,
0.2085368037223816,
0.7735639810562134,
-0.6454524397850037,
0.03627052158117294,
-0.21283331513404846,
-1.3179627656936646,
-0.547949492931366,
0.3694005012512207,
1.838016390800476,
-0.6975483894348145,
0.8643667101860046,
0.9516657590866089,
-0.6802204847335815,
0.052664339542388916,
0.21016283333301544,
-0.36397749185562134,
0.7521508932113647,
-0.9580074548721313,
-0.39174777269363403,
1.235167384147644,
-0.3577505350112915,
-0.671880304813385,
1.4698865413665771,
0.7225474715232849,
-0.9703947305679321,
-0.36922594904899597,
-0.15545590221881866,
-0.8343867659568787,
0.04600709304213524,
-1.6075762510299683,
-0.20511136949062347,
0.2550024092197418,
-1.4918171167373657,
-0.4538601338863373,
-0.20662862062454224,
1.3935441970825195,
-0.1152079701423645,
1.3518918752670288,
-0.22588834166526794,
-0.22584855556488037,
-0.43829071521759033,
-0.5818243026733398,
0.21825745701789856,
-0.13208529353141785,
-0.4954349994659424,
0.36084064841270447,
-0.9996734857559204,
0.3657747507095337,
1.4754538536071777,
0.32002773880958557,
0.06986482441425323,
0.6037371158599854,
0.9998568892478943,
0.46734896302223206,
-0.05451493337750435,
-0.8893641233444214,
-1.5922986268997192,
2.1119065284729004,
-1.4858187437057495,
1.957599401473999,
0.6208873987197876,
-0.04403495788574219,
-1.8133898973464966,
-1.8443279266357422,
1.331292748451233,
1.0828473567962646,
2.2700188159942627,
0.6101792454719543,
0.39037561416625977,
-0.7671611309051514,
-0.695590078830719,
0.33153706789016724,
-1.1185741424560547,
-0.7309479117393494,
0.12464284896850586,
2.3714582920074463,
1.759772539138794,
-0.5363935232162476,
-0.028388801962137222,
-1.0620356798171997,
1.1881334781646729,
-0.06354156136512756,
0.20274299383163452,
2.0709381103515625,
-0.3016507625579834,
-1.0173076391220093,
1.2800583839416504,
-2.3717992305755615,
0.2880583107471466,
2.06147837638855,
0.37132763862609863,
0.0795871764421463,
-1.440011978149414,
-0.6219164729118347,
-0.24981452524662018,
-0.36858776211738586,
-1.2060779333114624,
0.7215522527694702,
-0.252363383769989,
-0.9841465353965759,
-1.4719278812408447,
0.08849526941776276,
-1.1553789377212524,
-1.6737092733383179,
0.3981678783893585,
1.8543732166290283,
2.0620570182800293,
-0.6786917448043823,
1.3841400146484375,
-0.284137099981308,
0.06423605978488922,
1.3125168085098267,
1.2540903091430664,
3.081124782562256,
2.102792263031006,
-1.1373519897460938,
0.7646053433418274,
-0.1256277859210968,
-0.40851613879203796,
1.107506513595581,
-1.021812915802002,
1.187833309173584,
-0.14122340083122253,
-1.1290440559387207,
-1.2302221059799194,
1.0361615419387817,
0.4432644844055176,
0.004461322911083698,
-0.5836127996444702,
1.309125542640686,
0.12978167831897736,
1.376102328300476,
0.534570038318634,
-0.2996009886264801,
0.510312020778656,
-0.40361514687538147,
-0.4626230299472809,
1.5937122106552124,
0.30740833282470703,
-1.6987663507461548,
-2.334702253341675,
-0.2664847671985626,
-0.8226820230484009,
-0.12572842836380005,
-0.4807772934436798,
-1.007483959197998,
1.653863787651062,
0.3682961165904999,
-1.2116060256958008,
-0.21194398403167725,
-0.3378925919532776,
-0.5708752274513245,
2.775393486022949,
-1.358125925064087,
-0.24736842513084412,
-0.9554774165153503,
-0.5961410403251648,
1.677819848060608,
-1.2975050210952759,
-0.135780930519104,
-0.9924760460853577,
-0.5550684332847595,
-1.3698420524597168,
-0.5867369771003723,
0.0026770075783133507,
-0.8705080151557922,
0.7348206639289856,
0.09541602432727814,
-1.0518842935562134,
-0.30901089310646057,
-0.8634751439094543,
0.8710575103759766,
-0.06304772198200226,
0.2295709252357483,
2.0246946811676025,
0.36045485734939575,
-0.322714239358902,
0.6776898503303528,
1.1089833974838257,
0.6444594860076904,
-0.6177470088005066,
0.17004738748073578,
-0.5650019645690918,
0.26003459095954895,
-1.3332284688949585,
0.25864776968955994,
-2.8875842094421387,
0.6772324442863464,
-0.10663875937461853,
-0.152702197432518,
-0.08492033183574677,
-1.282064437866211,
1.1865355968475342,
2.5379416942596436,
-1.2505699396133423,
0.4531638026237488,
0.3344286382198334,
1.1338820457458496,
-1.4361649751663208,
0.3311385214328766,
-0.37993568181991577,
2.1514596939086914,
0.1682419776916504,
1.1111723184585571,
-0.5772914886474609,
-2.1424882411956787,
0.7230963706970215,
-1.2585861682891846,
-1.0416595935821533,
0.6769033074378967,
-0.7717413902282715,
0.11397261917591095,
-1.4576952457427979,
-0.11200807988643646,
-0.8649096488952637,
-1.2990038394927979,
0.7348054051399231,
0.17515288293361664,
0.42481863498687744,
-0.6419894695281982,
0.3768915832042694,
-2.186711311340332,
-1.397273063659668,
-0.2198927104473114,
-0.9930013418197632,
0.5169175863265991,
-0.2956705391407013,
0.6806923747062683,
-0.11823330819606781,
0.0640929639339447,
0.32491856813430786,
1.3969106674194336,
3.4958205223083496,
0.07680274546146393,
0.3630017638206482,
-0.12384292483329773,
-0.986002504825592,
1.516040563583374,
1.0106947422027588,
-0.016999386250972748,
-0.5528048276901245,
-1.082635521888733,
1.2328391075134277,
2.0972378253936768,
0.9787148237228394,
0.09839077293872833,
-0.8965638279914856,
-0.7599692940711975,
-0.018049800768494606,
0.11313636600971222,
0.5176503658294678,
0.938603401184082,
-0.07928641140460968,
0.03250456973910332,
1.5123703479766846,
1.180388331413269,
-0.3168654441833496,
0.29508137702941895,
-0.9239230155944824,
-0.3428088128566742,
0.5127890110015869,
0.34647661447525024,
-0.05514514446258545,
0.493307888507843,
-0.9418745040893555,
-0.27591395378112793,
-0.2911599278450012,
-0.9826735854148865,
-0.6664765477180481,
-0.37472009658813477,
-0.4344281852245331,
1.671880841255188,
0.1906193345785141,
-0.4878045320510864,
0.0008785761892795563,
-0.7230426073074341,
-0.1769627034664154,
-1.0651531219482422,
0.271759957075119,
-0.09104612469673157,
-0.039322420954704285,
-0.09455837309360504,
1.7354764938354492,
-0.9363383054733276,
-2.2230875492095947,
0.1955193132162094,
0.30723127722740173,
-0.43390393257141113,
0.2569190263748169,
1.6068432331085205,
0.4848586320877075,
1.427865743637085,
1.2919000387191772,
1.0398240089416504,
-0.5634794235229492,
-1.3883180618286133,
0.6934434175491333,
0.9588233232498169,
-1.5830581188201904,
0.8311998248100281,
-0.16108925640583038,
-0.4416317343711853,
0.7686057090759277,
1.1919735670089722,
0.4161946177482605,
-2.000998020172119,
0.7627447843551636,
-0.8867149353027344,
0.8098697066307068,
0.6438125371932983,
0.7164301872253418,
0.22461260855197906,
0.8029632568359375,
-1.1829285621643066,
-1.0447343587875366,
-0.8258054256439209,
-0.6479819416999817,
1.978954792022705,
-0.25612130761146545,
0.5410802960395813,
-0.15268844366073608,
-1.3146017789840698,
-0.11680833995342255,
0.6637675166130066,
0.2752039134502411,
-0.3696603775024414,
0.7830695509910583,
-0.7780711054801941,
-1.1796679496765137,
-1.384968876838684,
-0.5032579898834229,
-0.9744412899017334,
-1.0037020444869995,
1.109750509262085,
0.665106475353241,
0.40938901901245117,
1.9273487329483032,
0.4700678288936615,
0.278317391872406,
-2.710502862930298,
0.9677022099494934,
0.3314191699028015,
0.11091499030590057,
0.9312528967857361,
0.24497176706790924,
1.2153154611587524,
-0.1576686054468155,
0.623472273349762,
-2.31699800491333,
2.260101318359375,
-0.2552455961704254,
0.7017974257469177,
0.1352626532316208,
-0.04162197932600975,
0.9854868054389954,
0.5606416463851929,
0.6973631978034973,
-1.1860435009002686,
0.7395617365837097,
-0.5859584808349609,
1.1958844661712646,
1.044001817703247,
-0.795301616191864,
-0.02216300740838051,
1.345982313156128,
0.5464199185371399,
-0.43063580989837646,
-0.8665052056312561,
-0.8602465391159058,
0.9185890555381775,
1.683474063873291,
-0.1930156946182251,
0.023073207587003708,
0.8327346444129944,
0.46978524327278137,
-1.3253710269927979,
0.07686486840248108,
-0.7302481532096863,
-0.6618528366088867,
1.54255211353302,
2.0163769721984863,
-0.09323514997959137,
-0.16210776567459106,
-0.7644954323768616,
-1.3614352941513062,
0.6282205581665039,
0.012208092957735062,
0.054417017847299576,
0.6464032530784607,
-0.5473239421844482,
0.9822656512260437,
0.6614107489585876,
1.0020736455917358,
0.023042798042297363,
0.4113715887069702,
0.3822002708911896,
-0.3263853192329407,
-1.1553939580917358,
-0.4329501688480377,
-1.1316065788269043,
-2.666785955429077,
0.3949391841888428,
-0.3514302372932434,
-1.3821592330932617,
-0.05910061299800873,
-1.0633928775787354,
0.898780345916748,
-0.6438738107681274,
-1.0900564193725586,
-1.413245677947998,
0.21464242041110992,
-0.16790859401226044,
0.9332826733589172,
-1.676910400390625,
-0.19525574147701263,
1.369350552558899,
0.8753198981285095,
-0.661378800868988,
1.1537930965423584,
0.27939191460609436,
1.1412965059280396,
0.7124114036560059,
-0.41891828179359436,
0.4898872375488281,
0.15426357090473175,
-1.3654115200042725,
0.564817488193512,
1.2140122652053833,
0.2148633599281311,
1.311598777770996,
-0.6008851528167725,
0.0727967768907547,
0.46473315358161926,
-0.6715956926345825,
-0.4370521605014801,
-0.41923367977142334,
0.7966195344924927,
0.09847573935985565,
-1.0400577783584595,
-0.04082862660288811,
-0.15757188200950623,
-0.13080058991909027,
0.12825465202331543,
-1.4658427238464355,
-0.28425613045692444,
-0.3083292841911316,
-0.4375123977661133,
-1.2976295948028564,
-0.11353503167629242,
1.2921870946884155,
-0.750781774520874,
-0.08245773613452911,
0.44948992133140564,
0.28747618198394775,
0.5800775289535522,
0.6789209842681885,
-0.7330166101455688,
-0.39129969477653503,
-0.32573023438453674,
-0.3119790554046631,
0.43990010023117065,
1.3539190292358398,
-0.0765678733587265,
-1.0666927099227905,
0.7447365522384644,
-0.3118225932121277,
0.1482475847005844,
2.0261361598968506,
-0.05114368721842766,
-0.8376168012619019,
0.2925565838813782,
-0.6149661540985107,
1.962831974029541,
1.515148401260376,
1.270236849784851,
-0.14439955353736877,
-0.7843627333641052,
0.7081414461135864,
-0.24280396103858948,
-0.29550185799598694,
0.735003650188446,
0.48501941561698914,
-0.2372213453054428,
-1.3583872318267822,
0.546265184879303,
1.3155181407928467,
-0.9154919981956482,
-0.7873536944389343,
0.15623372793197632,
-0.8207868933677673,
1.071850061416626,
0.7453064918518066,
0.4844440519809723,
0.30504119396209717,
1.6558910608291626,
0.745293140411377,
-0.5719842314720154,
0.5084304213523865,
0.5228111147880554,
-0.12487137317657471,
-2.0636541843414307,
-0.993608832359314,
0.3532003164291382,
-0.47529616951942444,
-1.5550379753112793,
1.3692501783370972,
-1.168252944946289,
-0.8632066249847412,
0.5405970215797424,
0.20033837854862213,
1.4458024501800537,
0.3561551570892334,
1.5911462306976318,
1.997720718383789,
0.8284472823143005,
0.359466016292572,
1.3837119340896606,
-0.03171934932470322,
-0.49774330854415894,
1.761397123336792,
-0.3782201111316681,
0.4535820186138153,
1.1122665405273438,
-0.38371431827545166,
-0.9941869974136353,
-0.8099788427352905,
-1.1565489768981934,
-0.5612554550170898,
1.1424161195755005,
0.1507531702518463,
-1.2264190912246704,
0.17674344778060913,
1.5242558717727661,
0.19857831299304962,
-0.31332582235336304,
0.5396361947059631,
0.5029160380363464,
-0.6929038763046265,
-0.15213988721370697,
-0.9064635634422302,
0.6295070052146912,
-0.2045852392911911,
-0.28072842955589294,
0.36791351437568665,
0.36099156737327576,
1.2159924507141113,
-0.010416358709335327,
0.17768779397010803,
1.0992941856384277,
-1.413947343826294,
1.5395199060440063,
-0.5156725645065308,
0.17619097232818604,
-2.347973108291626,
1.3619608879089355,
-0.7944931983947754,
1.928731083869934,
-2.641045331954956,
0.34815600514411926,
-0.6167395114898682,
-0.410462886095047,
0.25648245215415955,
-0.4122384786605835,
0.05610313639044762,
-0.19282867014408112,
-1.0186973810195923,
-0.10929198563098907,
-0.7652862668037415,
0.603440523147583,
1.2433167695999146,
1.2996364831924438,
-1.0513614416122437,
-0.38444948196411133,
-1.7326765060424805,
-0.16582408547401428,
-0.8421538472175598,
0.36152127385139465,
-2.065518379211426,
-0.21214412152767181,
-1.8924951553344727,
-2.3027048110961914,
-1.4017561674118042,
-0.8464831113815308,
1.1615861654281616,
0.17069365084171295,
-0.9130189418792725,
1.1647380590438843,
-0.16241340339183807,
-1.7743462324142456,
1.0645084381103516,
-2.123243570327759
] |
https://github.com/huggingface/datasets/issues/3398 | Add URL field to Wikimedia dataset instances: wikipedia,... | Thanks @geohci.
I had already been looking for information about the conversion from title to URL and I found that apart from replacing blanks with underscores, some other special character must also be percent-encoded (e.g. `"` to `%22`): https://meta.wikimedia.org/wiki/Help:URL
Therefore, I have finally used `urllib.parse.quote` function. This additionally percent-encodes non-ASCII characters, but Wikimedia docs say these are equivalent:
> For the other characters either the code or the character can be used in internal and external links, they are equivalent. The system does a conversion when needed.
> [[%C3%80_propos_de_M%C3%A9ta]]
> is rendered as [À_propos_de_Méta](https://meta.wikimedia.org/wiki/%C3%80_propos_de_M%C3%A9ta), almost like [À propos de Méta](https://meta.wikimedia.org/wiki/%C3%80_propos_de_M%C3%A9ta), which leads to this page on Meta with in the address bar the URL
> [http://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta](https://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta)
> while [http://meta.wikipedia.org/wiki/À_propos_de_Méta](https://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta) leads to the same. | As reported by @geohci, in order to host pre-processed data in the Hub, we should add the full URL to data instances (new field "url"), so that we conform to proper attribution from license requirement. See, e.g.: https://fair-trec.github.io/docs/Fair_Ranking_2021_Participant_Instructions.pdf#subsection.3.2
This should be done for all pre-processed datasets under "wikimedia" org in the Hub: https://huggingface.co/wikimedia
| 1,067 | 123 | Add URL field to Wikimedia dataset instances: wikipedia,...
As reported by @geohci, in order to host pre-processed data in the Hub, we should add the full URL to data instances (new field "url"), so that we conform to proper attribution from license requirement. See, e.g.: https://fair-trec.github.io/docs/Fair_Ranking_2021_Participant_Instructions.pdf#subsection.3.2
This should be done for all pre-processed datasets under "wikimedia" org in the Hub: https://huggingface.co/wikimedia
Thanks @geohci.
I had already been looking for information about the conversion from title to URL and I found that apart from replacing blanks with underscores, some other special character must also be percent-encoded (e.g. `"` to `%22`): https://meta.wikimedia.org/wiki/Help:URL
Therefore, I have finally used `urllib.parse.quote` function. This additionally percent-encodes non-ASCII characters, but Wikimedia docs say these are equivalent:
> For the other characters either the code or the character can be used in internal and external links, they are equivalent. The system does a conversion when needed.
> [[%C3%80_propos_de_M%C3%A9ta]]
> is rendered as [À_propos_de_Méta](https://meta.wikimedia.org/wiki/%C3%80_propos_de_M%C3%A9ta), almost like [À propos de Méta](https://meta.wikimedia.org/wiki/%C3%80_propos_de_M%C3%A9ta), which leads to this page on Meta with in the address bar the URL
> [http://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta](https://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta)
> while [http://meta.wikipedia.org/wiki/À_propos_de_Méta](https://meta.wikipedia.org/wiki/%C3%80_propos_de_M%C3%A9ta) leads to the same. | [
-1.2302671670913696,
-0.8090731501579285,
-0.7102525234222412,
1.4059405326843262,
-0.07407902181148529,
-1.264127254486084,
0.12133617699146271,
-0.9896529316902161,
1.542135238647461,
-0.7964422702789307,
0.3365820646286011,
-1.609000325202942,
0.026146169751882553,
-0.5263487696647644,
-0.7280024886131287,
-0.9036412239074707,
-0.33575910329818726,
-0.8678209781646729,
0.9783673882484436,
2.585869789123535,
1.1847124099731445,
-1.3808995485305786,
2.710122585296631,
0.6230867505073547,
-0.22423776984214783,
-1.0432236194610596,
0.4740452766418457,
-0.0009981673210859299,
-1.3437376022338867,
-0.4923185706138611,
-0.9895573258399963,
0.04387710615992546,
-0.5225179195404053,
-0.3757397532463074,
0.09382157027721405,
0.34220537543296814,
-0.21206891536712646,
-0.3544313907623291,
-0.5696156620979309,
-0.7605903148651123,
0.5002924799919128,
-0.41185152530670166,
0.9821221232414246,
-0.2699373960494995,
1.7436275482177734,
-0.6542688608169556,
0.40008655190467834,
0.7214873433113098,
1.2018200159072876,
0.1172039657831192,
0.033445555716753006,
0.22301779687404633,
0.4165874123573303,
0.02041650004684925,
0.47053268551826477,
1.1303917169570923,
0.7381742596626282,
0.4540877640247345,
0.7418577671051025,
-2.1695597171783447,
1.3399326801300049,
-0.9819095730781555,
0.28948497772216797,
1.2992117404937744,
-0.9157372117042542,
0.39790505170822144,
-1.794821858406067,
-0.053081922233104706,
0.6134657859802246,
-2.3261818885803223,
0.2408299297094345,
-1.426892638206482,
-0.5053383708000183,
0.9448135495185852,
0.24866436421871185,
-1.1986095905303955,
0.21278509497642517,
-0.5788961052894592,
1.0470024347305298,
0.5011867880821228,
0.9939455986022949,
-1.6793460845947266,
-0.01318555511534214,
-0.2222609966993332,
0.10284090042114258,
-1.3102339506149292,
-1.562886357307434,
0.6552637219429016,
0.6414098143577576,
0.61961430311203,
-0.05082244426012039,
0.962178111076355,
-1.0223089456558228,
0.8806248903274536,
-0.9347761273384094,
-1.6065174341201782,
-1.4225448369979858,
-2.2858078479766846,
-2.2662742137908936,
0.7775002717971802,
-0.47531986236572266,
-0.5262742638587952,
2.106992483139038,
-1.0197696685791016,
-1.7317951917648315,
1.1642794609069824,
0.14510871469974518,
0.07635259628295898,
2.310194969177246,
0.24407915771007538,
-0.8206585049629211,
0.5008277297019958,
-0.6864656805992126,
0.8865585327148438,
-0.31565651297569275,
1.3392430543899536,
0.43026503920555115,
-0.973257303237915,
1.6270123720169067,
-0.4364144504070282,
0.49274390935897827,
-0.6581563949584961,
-0.6156007647514343,
-0.8237542510032654,
0.241343691945076,
1.8545472621917725,
-0.3586311638355255,
1.542965054512024,
-0.3296962380409241,
-1.5101878643035889,
-1.5380901098251343,
0.8425617218017578,
0.43370190262794495,
-0.8987733125686646,
0.008776448667049408,
-0.42434120178222656,
0.038840461522340775,
-0.05052000284194946,
1.121047019958496,
1.2990162372589111,
0.7117017507553101,
-0.32824498414993286,
-0.9250093698501587,
0.16892386972904205,
-0.13285084068775177,
-0.7403022050857544,
-1.8595548868179321,
-0.36629214882850647,
0.19992120563983917,
0.6969625949859619,
-1.2646512985229492,
1.7664082050323486,
0.8807880878448486,
2.0366404056549072,
1.0215953588485718,
-0.5308338403701782,
1.4592201709747314,
0.018673323094844818,
1.840370774269104,
-0.5026103258132935,
0.622845470905304,
-0.2977584898471832,
-1.166865587234497,
0.8167775273323059,
-0.34031617641448975,
-2.053340196609497,
-0.7401949167251587,
-0.7535690069198608,
-0.1774272918701172,
-0.7848658561706543,
0.8923019766807556,
-0.22951053082942963,
-1.3895379304885864,
0.2710001766681671,
-0.6598684787750244,
0.11967578530311584,
-1.1685255765914917,
0.1947300285100937,
0.7629140615463257,
-0.6555817127227783,
0.07182468473911285,
-0.1787915825843811,
-1.4034528732299805,
-0.5518243312835693,
0.314520001411438,
1.8314181566238403,
-0.6496379375457764,
0.8603773713111877,
1.0025420188903809,
-0.6166693568229675,
0.03814166411757469,
0.22358636558055878,
-0.318053662776947,
0.8567748665809631,
-1.0872441530227661,
-0.3803708553314209,
1.1717233657836914,
-0.2749912738800049,
-0.5529043674468994,
1.4676204919815063,
0.7269336581230164,
-1.0425790548324585,
-0.3521823585033417,
-0.13493101298809052,
-0.8269112706184387,
0.0376785472035408,
-1.5560063123703003,
-0.17066486179828644,
0.39858564734458923,
-1.4676213264465332,
-0.3703124225139618,
-0.2496223896741867,
1.321873664855957,
-0.13416418433189392,
1.4564827680587769,
-0.33840590715408325,
-0.18422400951385498,
-0.4368464946746826,
-0.49117311835289,
0.1157829761505127,
-0.1891717165708542,
-0.5776947736740112,
0.25817209482192993,
-0.8659631609916687,
0.33610132336616516,
1.5516256093978882,
0.2593705952167511,
0.11187878251075745,
0.41139018535614014,
1.1004283428192139,
0.42591288685798645,
-0.08300672471523285,
-0.856974184513092,
-1.5410460233688354,
2.0928547382354736,
-1.4324759244918823,
1.9928793907165527,
0.8173035979270935,
-0.029173171147704124,
-1.815294861793518,
-1.8385932445526123,
1.2190800905227661,
1.0981464385986328,
2.3396975994110107,
0.5283865332603455,
0.3835679590702057,
-0.752215564250946,
-0.626301109790802,
0.29518651962280273,
-1.0186781883239746,
-0.7674053311347961,
0.16427306830883026,
2.437894821166992,
1.7644439935684204,
-0.3721833825111389,
-0.14962778985500336,
-0.9500507116317749,
1.3547612428665161,
-0.16931895911693573,
0.14474596083164215,
2.014449119567871,
-0.1655796766281128,
-1.1055225133895874,
1.3707449436187744,
-2.336494207382202,
0.2676239013671875,
2.1051716804504395,
0.2757733464241028,
0.05117043852806091,
-1.3963353633880615,
-0.6446473002433777,
-0.36881688237190247,
-0.41308724880218506,
-1.1725178956985474,
0.5891302824020386,
-0.36032357811927795,
-0.9164144992828369,
-1.4986484050750732,
0.08585263788700104,
-1.1519083976745605,
-1.7050470113754272,
0.3115590214729309,
1.8478220701217651,
2.041346311569214,
-0.7244682312011719,
1.4513449668884277,
-0.3634530007839203,
0.03139190375804901,
1.2424781322479248,
1.2777246236801147,
3.137716054916382,
1.9344812631607056,
-1.1476504802703857,
0.6741332411766052,
-0.24267993867397308,
-0.3786560595035553,
0.9484596848487854,
-1.1032668352127075,
1.1901708841323853,
-0.1868613213300705,
-1.303066611289978,
-1.237411379814148,
1.0403106212615967,
0.44225549697875977,
0.0121091827750206,
-0.5961427092552185,
1.3380697965621948,
0.14087742567062378,
1.418893575668335,
0.6325679421424866,
-0.35673943161964417,
0.4862445294857025,
-0.3659486472606659,
-0.5722333192825317,
1.5971355438232422,
0.2686590254306793,
-1.6281027793884277,
-2.324993848800659,
-0.28850841522216797,
-0.8160123825073242,
-0.07766985893249512,
-0.550115704536438,
-1.1243411302566528,
1.7345322370529175,
0.42413604259490967,
-1.305546522140503,
-0.33144068717956543,
-0.2862145006656647,
-0.5095251202583313,
2.746739625930786,
-1.395397663116455,
-0.22960618138313293,
-0.9457747340202332,
-0.537116289138794,
1.6247894763946533,
-1.2777680158615112,
-0.26189327239990234,
-0.9699293971061707,
-0.5957258343696594,
-1.2489396333694458,
-0.5018664002418518,
0.057188455015420914,
-0.9124300479888916,
0.7088821530342102,
0.1309066116809845,
-1.097160816192627,
-0.29309430718421936,
-0.8772755265235901,
0.8871850371360779,
-0.02183706685900688,
0.1924768090248108,
1.9494179487228394,
0.3398204445838928,
-0.3582915961742401,
0.7043352127075195,
1.1790659427642822,
0.641582190990448,
-0.6952297687530518,
0.06694839894771576,
-0.6343725919723511,
0.27941229939460754,
-1.3348506689071655,
0.36390456557273865,
-2.9011266231536865,
0.755109965801239,
-0.05073876678943634,
-0.06003452464938164,
-0.03946080803871155,
-1.3166362047195435,
1.0803319215774536,
2.6013262271881104,
-1.1299865245819092,
0.43238043785095215,
0.4342106282711029,
1.1584352254867554,
-1.5487728118896484,
0.3226810693740845,
-0.3427327871322632,
2.1006152629852295,
0.16057440638542175,
1.2838650941848755,
-0.4827490448951721,
-2.285353660583496,
0.6122092604637146,
-1.1551305055618286,
-1.0835919380187988,
0.7228936553001404,
-0.7686038017272949,
0.029041394591331482,
-1.4249409437179565,
-0.22653144598007202,
-0.8912468552589417,
-1.242118000984192,
0.7393380403518677,
0.14542928338050842,
0.4727172553539276,
-0.602091908454895,
0.2656025290489197,
-2.186649799346924,
-1.3614627122879028,
-0.12541139125823975,
-1.014947533607483,
0.5175041556358337,
-0.33773931860923767,
0.6645197868347168,
-0.05584198608994484,
0.03968958929181099,
0.2663317918777466,
1.5034979581832886,
3.4238228797912598,
0.15406443178653717,
0.34312447905540466,
-0.17986002564430237,
-0.9317924976348877,
1.3437260389328003,
0.9394946098327637,
-0.10945692658424377,
-0.5759641528129578,
-1.0102834701538086,
1.2535598278045654,
2.079353094100952,
0.9486867189407349,
0.13996760547161102,
-0.8941784501075745,
-0.7415676116943359,
-0.08102196455001831,
0.2513056993484497,
0.5446475148200989,
1.0063621997833252,
0.040031127631664276,
0.07909579575061798,
1.5378726720809937,
1.1832183599472046,
-0.36562609672546387,
0.39854153990745544,
-0.9203159213066101,
-0.41448262333869934,
0.42462968826293945,
0.26315751671791077,
0.0294976606965065,
0.46965253353118896,
-1.0676943063735962,
-0.2528558671474457,
-0.3935715854167938,
-0.9579401612281799,
-0.6989957690238953,
-0.3606494665145874,
-0.29718324542045593,
1.5750634670257568,
0.07881897687911987,
-0.44708868861198425,
0.12636369466781616,
-0.64548259973526,
-0.2542933225631714,
-1.0352628231048584,
0.28332167863845825,
-0.08016270399093628,
-0.08201509714126587,
-0.1495072841644287,
1.6582040786743164,
-0.8351014256477356,
-2.0797646045684814,
0.17437860369682312,
0.20066186785697937,
-0.384220689535141,
0.2707764804363251,
1.6663850545883179,
0.47795891761779785,
1.5111844539642334,
1.2681543827056885,
0.9669027924537659,
-0.6557483673095703,
-1.3159576654434204,
0.7005600929260254,
1.0249487161636353,
-1.426482915878296,
0.8195099234580994,
-0.19208379089832306,
-0.5399877429008484,
0.7163466215133667,
1.2688802480697632,
0.4262773394584656,
-2.1558945178985596,
0.8331447243690491,
-0.9384002685546875,
0.7589219212532043,
0.7258081436157227,
0.7479101419448853,
0.19435305893421173,
0.8155654072761536,
-1.2886533737182617,
-1.0428858995437622,
-0.6449622511863708,
-0.6757382154464722,
1.8906822204589844,
-0.3027632236480713,
0.5602550506591797,
-0.13531461358070374,
-1.2921357154846191,
-0.09600670635700226,
0.6989637017250061,
0.40757206082344055,
-0.5048370957374573,
0.7903319597244263,
-0.8095884919166565,
-1.0642582178115845,
-1.2956629991531372,
-0.5091167092323303,
-0.9568624496459961,
-0.9866240620613098,
0.9944008588790894,
0.7156521677970886,
0.34408921003341675,
1.8894951343536377,
0.5249313116073608,
0.29194387793540955,
-2.7328827381134033,
0.9511312246322632,
0.2824890613555908,
-0.018186338245868683,
0.9837148785591125,
0.28331294655799866,
1.133621335029602,
0.023228727281093597,
0.5602200627326965,
-2.382350444793701,
2.235008478164673,
-0.24395409226417542,
0.6820117235183716,
0.007322192192077637,
-0.17683956027030945,
1.0750715732574463,
0.6403167843818665,
0.6374579071998596,
-1.127488136291504,
0.7527331113815308,
-0.5546795129776001,
1.1886521577835083,
0.9329008460044861,
-0.7825384140014648,
-0.029236355796456337,
1.317535161972046,
0.5381875038146973,
-0.5650803446769714,
-0.9729727506637573,
-0.8963993191719055,
0.8765133023262024,
1.7452205419540405,
-0.12338767945766449,
0.0694962590932846,
0.8063934445381165,
0.5977178812026978,
-1.3274476528167725,
0.0821036696434021,
-0.6806370615959167,
-0.8318564295768738,
1.495140790939331,
2.0359551906585693,
-0.10953512787818909,
-0.21760998666286469,
-0.731378436088562,
-1.323825478553772,
0.7448263764381409,
-0.12196823954582214,
0.07508452236652374,
0.5457087159156799,
-0.7322325706481934,
1.0149484872817993,
0.6785395741462708,
0.9692767262458801,
0.13073737919330597,
0.3638596832752228,
0.3615773916244507,
-0.3589198887348175,
-1.1820679903030396,
-0.36328595876693726,
-1.1842191219329834,
-2.5408737659454346,
0.3930247128009796,
-0.2767455577850342,
-1.4720875024795532,
0.019536614418029785,
-1.041731595993042,
0.8575192093849182,
-0.7206818461418152,
-1.1799650192260742,
-1.4548542499542236,
0.3726189434528351,
-0.1601756364107132,
0.9692606329917908,
-1.5838556289672852,
-0.16171905398368835,
1.2580746412277222,
0.9212110042572021,
-0.5860180854797363,
1.0502408742904663,
0.2288905829191208,
1.0470892190933228,
0.8173614740371704,
-0.3462623655796051,
0.48406359553337097,
0.17155927419662476,
-1.3045237064361572,
0.4370456337928772,
1.239664077758789,
0.19862860441207886,
1.4201898574829102,
-0.6048833727836609,
0.000019449740648269653,
0.40572136640548706,
-0.491118848323822,
-0.4021780490875244,
-0.5231226086616516,
0.7196882367134094,
0.05762820318341255,
-0.9558082818984985,
-0.05643981322646141,
-0.17022988200187683,
-0.24507549405097961,
0.21817287802696228,
-1.4821363687515259,
-0.30111318826675415,
-0.37078773975372314,
-0.4314565658569336,
-1.3058120012283325,
-0.06645769625902176,
1.279650330543518,
-0.674728274345398,
-0.12571050226688385,
0.38263368606567383,
0.4745924472808838,
0.6213301420211792,
0.756832480430603,
-0.7098891735076904,
-0.4553167223930359,
-0.3079929053783417,
-0.2889668345451355,
0.31574854254722595,
1.3212227821350098,
-0.1236419528722763,
-1.0305466651916504,
0.7569124698638916,
-0.4240940809249878,
0.0741952508687973,
2.0315301418304443,
0.18508480489253998,
-0.7514339685440063,
0.31730741262435913,
-0.6777546405792236,
1.9340219497680664,
1.6600818634033203,
1.2334975004196167,
-0.1321144551038742,
-0.7878679037094116,
0.7842581272125244,
-0.353164404630661,
-0.2688300907611847,
0.9002150893211365,
0.4881590008735657,
-0.1771875023841858,
-1.386716365814209,
0.6335379481315613,
1.286605715751648,
-0.8746073842048645,
-0.7058495283126831,
0.15144969522953033,
-0.790317177772522,
1.182013750076294,
0.7747340202331543,
0.495741605758667,
0.2407161146402359,
1.6418657302856445,
0.7750734686851501,
-0.5073444247245789,
0.6139719486236572,
0.538080632686615,
-0.23146295547485352,
-2.015705108642578,
-1.06841242313385,
0.24868814647197723,
-0.3794933557510376,
-1.6267046928405762,
1.4106333255767822,
-1.152371883392334,
-0.9645286202430725,
0.5658188462257385,
0.08661578595638275,
1.3539901971817017,
0.3590562045574188,
1.6339452266693115,
2.1307621002197266,
0.8129616379737854,
0.343703955411911,
1.3095320463180542,
-0.08234910666942596,
-0.4322359263896942,
1.7884581089019775,
-0.4141567647457123,
0.5477402806282043,
1.0685254335403442,
-0.4038602411746979,
-0.9473601579666138,
-0.839549720287323,
-1.213769555091858,
-0.6136448979377747,
1.0358545780181885,
0.11603228747844696,
-1.1426992416381836,
0.2746292054653168,
1.586300015449524,
0.10523031651973724,
-0.35411325097084045,
0.6283963322639465,
0.43478789925575256,
-0.6623022556304932,
-0.2063828855752945,
-0.9548286199569702,
0.6146230697631836,
-0.20037181675434113,
-0.27681365609169006,
0.3890188932418823,
0.4017122685909271,
1.235140323638916,
0.06309600174427032,
0.07816116511821747,
1.1394022703170776,
-1.4593415260314941,
1.4757448434829712,
-0.5627730488777161,
0.31131821870803833,
-2.3796753883361816,
1.3309193849563599,
-0.7276356816291809,
1.953901767730713,
-2.6143133640289307,
0.3742229640483856,
-0.555711030960083,
-0.5102580785751343,
0.25912296772003174,
-0.3408135771751404,
0.1911349594593048,
-0.1927582323551178,
-0.9955105185508728,
-0.11088484525680542,
-0.7067773938179016,
0.6166762709617615,
1.1180784702301025,
1.3049039840698242,
-1.0711451768875122,
-0.24880088865756989,
-1.7091339826583862,
-0.13006049394607544,
-0.8519293665885925,
0.28489524126052856,
-2.0270190238952637,
-0.1933051496744156,
-1.9443156719207764,
-2.366407632827759,
-1.4015495777130127,
-0.8458592295646667,
1.0099341869354248,
0.26593267917633057,
-0.9358857274055481,
1.2495450973510742,
-0.3013523817062378,
-1.7582857608795166,
1.0098974704742432,
-2.11185884475708
] |
https://github.com/huggingface/datasets/issues/3396 | Install Audio dependencies to support audio decoding | https://huggingface.co/datasets/projecte-aina/parlament_parla -> works (but we still have to show an audio player)
https://huggingface.co/datasets/openslr -> another issue: `Message: [Errno 2] No such file or directory: '/home/hf/datasets-preview-backend/zip:/asr_javanese/data/00/00004fe6aa.flac'` | ## Dataset viewer issue for '*openslr*', '*projecte-aina/parlament_parla*'
**Link:** *https://huggingface.co/datasets/openslr*
**Link:** *https://huggingface.co/datasets/projecte-aina/parlament_parla*
Error:
```
Status code: 400
Exception: ImportError
Message: To support decoding audio files, please install 'librosa'.
```
Am I the one who added this dataset ? Yes-No
- openslr: No
- projecte-aina/parlament_parla: Yes
| 1,068 | 25 | Install Audio dependencies to support audio decoding
## Dataset viewer issue for '*openslr*', '*projecte-aina/parlament_parla*'
**Link:** *https://huggingface.co/datasets/openslr*
**Link:** *https://huggingface.co/datasets/projecte-aina/parlament_parla*
Error:
```
Status code: 400
Exception: ImportError
Message: To support decoding audio files, please install 'librosa'.
```
Am I the one who added this dataset ? Yes-No
- openslr: No
- projecte-aina/parlament_parla: Yes
https://huggingface.co/datasets/projecte-aina/parlament_parla -> works (but we still have to show an audio player)
https://huggingface.co/datasets/openslr -> another issue: `Message: [Errno 2] No such file or directory: '/home/hf/datasets-preview-backend/zip:/asr_javanese/data/00/00004fe6aa.flac'` | [
-1.1435470581054688,
-0.9162284135818481,
-0.818263828754425,
1.5033550262451172,
-0.15514077246189117,
-1.3206208944320679,
0.12230062484741211,
-0.9581067562103271,
1.5195813179016113,
-0.548104465007782,
0.26046958565711975,
-1.6926952600479126,
-0.13740424811840057,
-0.719848096370697,
-0.7501488924026489,
-0.8176116943359375,
-0.4005275070667267,
-0.8732728958129883,
0.9353082180023193,
2.4663453102111816,
1.2589890956878662,
-1.4120738506317139,
2.7221813201904297,
0.6810750365257263,
-0.22679956257343292,
-1.0223150253295898,
0.44526782631874084,
0.05659238249063492,
-1.1593577861785889,
-0.47196680307388306,
-0.8284059762954712,
-0.08934777230024338,
-0.5591247081756592,
-0.5123372077941895,
0.22273150086402893,
0.45543140172958374,
-0.07854493707418442,
-0.24034269154071808,
-0.5164594650268555,
-0.7251627445220947,
0.5275207757949829,
-0.37646108865737915,
0.8642070889472961,
-0.42574837803840637,
1.8460404872894287,
-0.6256946325302124,
0.31664735078811646,
0.6497368812561035,
1.435380220413208,
0.21792888641357422,
-0.0717349722981453,
0.3415256440639496,
0.393964558839798,
-0.009034928865730762,
0.3945959210395813,
1.2031391859054565,
0.5747219920158386,
0.4601634740829468,
0.7421602606773376,
-2.186427354812622,
1.1905163526535034,
-0.8356638550758362,
0.31484341621398926,
1.4811447858810425,
-0.8800796270370483,
0.35550373792648315,
-1.908488154411316,
0.025654861703515053,
0.5766342878341675,
-2.3468475341796875,
0.15910188853740692,
-1.28641939163208,
-0.6404476165771484,
0.9725664258003235,
0.24067726731300354,
-1.2858902215957642,
0.23633891344070435,
-0.4634205996990204,
1.0186387300491333,
0.4543555974960327,
1.1088922023773193,
-1.7997080087661743,
0.003026070073246956,
-0.18790516257286072,
0.011715544387698174,
-1.2468154430389404,
-1.5290313959121704,
0.51678466796875,
0.5172118544578552,
0.7132186889648438,
-0.09758473187685013,
0.8193665742874146,
-0.9149199724197388,
0.9499676823616028,
-1.0533281564712524,
-1.614479660987854,
-1.4505927562713623,
-2.293334484100342,
-2.2975046634674072,
0.8505146503448486,
-0.44271013140678406,
-0.29269373416900635,
1.7808668613433838,
-0.8770231604576111,
-1.8052781820297241,
1.141038179397583,
0.40045613050460815,
0.10310181975364685,
2.2189908027648926,
0.3093818128108978,
-0.7941548228263855,
0.36880970001220703,
-0.782471239566803,
0.8290157914161682,
-0.3947303295135498,
1.4339557886123657,
0.5348316431045532,
-0.9339421987533569,
1.6196285486221313,
-0.6030912399291992,
0.4706500172615051,
-0.715053141117096,
-0.5382951498031616,
-0.786628782749176,
0.4348374009132385,
1.8786736726760864,
-0.3800005316734314,
1.5392512083053589,
-0.37449806928634644,
-1.6255931854248047,
-1.4158786535263062,
0.7676481008529663,
0.49899157881736755,
-0.8952601552009583,
0.021882956847548485,
-0.4188706576824188,
0.11382165551185608,
-0.12265162169933319,
1.1081109046936035,
1.0527065992355347,
0.6285785436630249,
-0.38028159737586975,
-0.816647469997406,
0.2480470836162567,
0.008948694914579391,
-0.68939608335495,
-1.8908038139343262,
-0.38666999340057373,
0.33073189854621887,
0.5844334959983826,
-1.3693780899047852,
1.6910102367401123,
0.7726150155067444,
2.057196855545044,
0.8760038018226624,
-0.3446543514728546,
1.4841078519821167,
-0.034560538828372955,
1.9003665447235107,
-0.6804011464118958,
0.634889543056488,
-0.27009040117263794,
-1.0768699645996094,
0.8517787456512451,
-0.38193002343177795,
-2.0800716876983643,
-0.7972443103790283,
-0.9394533038139343,
-0.19352148473262787,
-0.798349142074585,
0.9163134694099426,
-0.2488531470298767,
-1.3808993101119995,
0.09834352880716324,
-0.7050536274909973,
0.19129791855812073,
-1.338750958442688,
0.14774975180625916,
0.7984057068824768,
-0.6075009107589722,
-0.06868179142475128,
-0.2765069603919983,
-1.3534575700759888,
-0.6127868294715881,
0.2561345398426056,
2.016819477081299,
-0.6424179077148438,
0.991051435470581,
0.8535148501396179,
-0.6982182264328003,
0.19642373919487,
0.30398130416870117,
-0.3024791181087494,
0.8356131315231323,
-1.163358211517334,
-0.3757241368293762,
1.050354242324829,
-0.03494609147310257,
-0.5537298917770386,
1.5223299264907837,
0.9561670422554016,
-1.0416370630264282,
-0.24696408212184906,
-0.29379019141197205,
-0.8050224184989929,
0.016493283212184906,
-1.5678530931472778,
-0.1934366375207901,
0.11096474528312683,
-1.3808737993240356,
-0.5255110859870911,
-0.22379285097122192,
1.3726328611373901,
-0.10475935786962509,
1.293044924736023,
-0.37784501910209656,
-0.28363701701164246,
-0.37225794792175293,
-0.531733512878418,
0.23290587961673737,
-0.2810024917125702,
-0.7552230954170227,
0.29942333698272705,
-0.8494192361831665,
0.24287089705467224,
1.41947340965271,
0.37859058380126953,
0.05101519823074341,
0.5990455150604248,
1.0953288078308105,
0.2868958115577698,
0.03191302716732025,
-0.885004460811615,
-1.5526247024536133,
2.049407958984375,
-1.4852402210235596,
1.8923616409301758,
0.7847732305526733,
0.01731717772781849,
-1.7025545835494995,
-1.763155460357666,
1.3614875078201294,
1.2060046195983887,
2.4123194217681885,
0.6200226545333862,
0.4207410514354706,
-0.9073123931884766,
-0.6914467215538025,
0.30382296442985535,
-0.9713762998580933,
-0.6747711896896362,
0.08446268737316132,
2.365370035171509,
1.8646215200424194,
-0.7161577939987183,
-0.35663604736328125,
-0.9050896763801575,
1.2909265756607056,
-0.22749948501586914,
0.2816852927207947,
2.084893226623535,
-0.2536796033382416,
-0.9569550156593323,
1.2697786092758179,
-2.4048120975494385,
0.22005362808704376,
2.1132614612579346,
0.33683520555496216,
0.21947744488716125,
-1.3972880840301514,
-0.7258312106132507,
-0.2172076404094696,
-0.41223853826522827,
-1.222096562385559,
0.4924645721912384,
-0.30017200112342834,
-0.986457109451294,
-1.4706165790557861,
0.11130818724632263,
-1.0954644680023193,
-1.6931383609771729,
0.4951353371143341,
1.8887643814086914,
2.0003268718719482,
-0.740829586982727,
1.4392389059066772,
-0.32584112882614136,
0.14665080606937408,
1.3142354488372803,
1.3092741966247559,
3.1096925735473633,
1.8319035768508911,
-1.1739234924316406,
0.7372660636901855,
-0.254909873008728,
-0.4641442894935608,
1.1312695741653442,
-1.0376783609390259,
1.0054758787155151,
-0.30937659740448,
-1.267433524131775,
-1.217470645904541,
1.0115978717803955,
0.5840519666671753,
-0.006603864021599293,
-0.6031860113143921,
1.21701979637146,
-0.00101374089717865,
1.2970283031463623,
0.6470393538475037,
-0.4464259743690491,
0.482780784368515,
-0.3759729266166687,
-0.48381540179252625,
1.5394244194030762,
0.1995621770620346,
-1.521019458770752,
-2.4399797916412354,
-0.17299003899097443,
-0.9382925629615784,
-0.15632817149162292,
-0.6118224859237671,
-1.1093202829360962,
1.609250783920288,
0.541799783706665,
-1.2742124795913696,
-0.2928968667984009,
-0.39354807138442993,
-0.5016498565673828,
2.632399559020996,
-1.4874258041381836,
-0.23647049069404602,
-0.9584089517593384,
-0.3445645868778229,
1.7776520252227783,
-1.0985405445098877,
-0.15516537427902222,
-1.1009234189987183,
-0.670139491558075,
-1.351440668106079,
-0.47111639380455017,
-0.02563607692718506,
-0.8415910005569458,
0.8748199343681335,
-0.034731000661849976,
-1.0172890424728394,
-0.26402509212493896,
-0.9722262620925903,
0.8963077068328857,
-0.1748163402080536,
0.18517042696475983,
2.002427577972412,
0.4486454725265503,
-0.3692918121814728,
0.6552650928497314,
1.2416189908981323,
0.612298309803009,
-0.688406765460968,
0.21650561690330505,
-0.4875442683696747,
0.23524492979049683,
-1.4862804412841797,
0.25623035430908203,
-2.939321994781494,
0.6880874633789062,
0.012221405282616615,
-0.0836762934923172,
-0.03075983002781868,
-1.334043025970459,
1.1880520582199097,
2.4930994510650635,
-1.185532569885254,
0.3814958930015564,
0.40086227655410767,
1.1814945936203003,
-1.629997968673706,
0.2933390140533447,
-0.40143775939941406,
2.0666871070861816,
0.02112019993364811,
1.1686317920684814,
-0.5717054009437561,
-2.0819385051727295,
0.6057753562927246,
-1.2940596342086792,
-0.984203577041626,
0.5661656260490417,
-0.7912063002586365,
0.23488764464855194,
-1.6564840078353882,
-0.12291469424962997,
-0.9607816338539124,
-1.318471074104309,
0.8392637372016907,
0.10858099162578583,
0.3398992121219635,
-0.5523444414138794,
0.35438671708106995,
-2.0596654415130615,
-1.442206621170044,
-0.20998193323612213,
-0.8541620969772339,
0.5475075244903564,
-0.26478612422943115,
0.7215039134025574,
-0.07105731219053268,
0.1422242522239685,
0.21107853949069977,
1.3485195636749268,
3.4643216133117676,
0.2222713679075241,
0.3047427237033844,
-0.10943527519702911,
-0.891516923904419,
1.3828972578048706,
1.0692205429077148,
0.030818717554211617,
-0.5802231431007385,
-0.9418824911117554,
1.4162001609802246,
2.0838465690612793,
1.1928508281707764,
0.1369934231042862,
-0.8741350769996643,
-0.7245649695396423,
0.09366215020418167,
0.25315871834754944,
0.5485431551933289,
0.8451472520828247,
0.0007792012766003609,
0.05002840608358383,
1.3656951189041138,
1.1564339399337769,
-0.3196616470813751,
0.4751910865306854,
-0.9678095579147339,
-0.4048694968223572,
0.48293498158454895,
0.3542945683002472,
0.11568830907344818,
0.418551504611969,
-1.0032790899276733,
-0.25210219621658325,
-0.16090869903564453,
-1.0261646509170532,
-0.6976767778396606,
-0.5905633568763733,
-0.44029319286346436,
1.5445879697799683,
0.04354749619960785,
-0.39532461762428284,
-0.02139732614159584,
-0.7205275297164917,
-0.17504869401454926,
-1.1598628759384155,
0.16695991158485413,
-0.10330017656087875,
0.058662593364715576,
-0.2432345151901245,
1.6794549226760864,
-0.8885471224784851,
-2.1593990325927734,
0.14500968158245087,
0.4633259177207947,
-0.606123685836792,
0.06215085834264755,
1.7043530941009521,
0.553601861000061,
1.2943612337112427,
1.3281335830688477,
0.9966316223144531,
-0.5153144001960754,
-1.2009555101394653,
0.5738505721092224,
1.0084534883499146,
-1.4076780080795288,
0.8692545890808105,
-0.12789349257946014,
-0.5168094038963318,
0.7283418774604797,
1.4447427988052368,
0.39340612292289734,
-1.8801292181015015,
0.7756450176239014,
-0.7798660397529602,
0.9289463758468628,
0.6706676483154297,
0.8424919247627258,
0.4013279974460602,
0.8672426342964172,
-1.4012013673782349,
-1.11503005027771,
-0.8308861255645752,
-0.49521341919898987,
1.9493048191070557,
-0.10126114636659622,
0.5035048723220825,
-0.2668289244174957,
-1.1523665189743042,
-0.04845782369375229,
0.8214176297187805,
0.47495409846305847,
-0.32261255383491516,
0.7943552136421204,
-0.6442477703094482,
-0.8800297379493713,
-1.3186582326889038,
-0.4268147647380829,
-0.8336533904075623,
-0.9184457659721375,
0.9713853001594543,
0.9121735095977783,
0.49169573187828064,
1.9358092546463013,
0.6457378268241882,
0.14252236485481262,
-2.631042957305908,
0.8234925270080566,
0.19389216601848602,
-0.019360017031431198,
1.0077000856399536,
0.2724432051181793,
1.265405297279358,
0.02701299451291561,
0.49952253699302673,
-2.325355291366577,
2.0678279399871826,
-0.17035523056983948,
0.6099413633346558,
-0.01867767423391342,
-0.11693505197763443,
1.2162965536117554,
0.5621995329856873,
0.4943383038043976,
-1.1038330793380737,
0.7532858848571777,
-0.5541357398033142,
1.0601526498794556,
0.9438802003860474,
-0.7902498841285706,
0.04173356294631958,
1.3253058195114136,
0.4786025285720825,
-0.40478774905204773,
-1.009273648262024,
-0.7102459073066711,
0.962710440158844,
1.6169604063034058,
-0.044298894703388214,
-0.05794438719749451,
0.9469979405403137,
0.6797846555709839,
-1.216568946838379,
0.0781925693154335,
-0.663411021232605,
-0.6161676645278931,
1.8080956935882568,
1.9972474575042725,
-0.08678640425205231,
-0.17044830322265625,
-0.7490255236625671,
-1.2512773275375366,
0.7659269571304321,
-0.06546633690595627,
0.0694708600640297,
0.7521318197250366,
-0.6992107033729553,
1.2254620790481567,
0.6569893956184387,
0.8287568688392639,
-0.07307662814855576,
0.4465508759021759,
0.43173545598983765,
-0.32762962579727173,
-1.2039860486984253,
-0.5307797193527222,
-1.2887344360351562,
-2.469296455383301,
0.5837733745574951,
-0.2403031885623932,
-1.3540078401565552,
-0.028049355372786522,
-1.1185269355773926,
0.9822009801864624,
-0.733331561088562,
-1.0954595804214478,
-1.4497536420822144,
0.32384759187698364,
-0.10590999573469162,
0.8587251901626587,
-1.6425856351852417,
-0.05704588443040848,
1.227332592010498,
0.7282094359397888,
-0.5712010860443115,
0.8674249649047852,
0.19470945000648499,
1.0203148126602173,
0.7672256827354431,
-0.33099013566970825,
0.4426227807998657,
0.15914702415466309,
-1.4148424863815308,
0.5294089913368225,
1.2005716562271118,
0.17796839773654938,
1.3536964654922485,
-0.4619251787662506,
0.15428531169891357,
0.420584112405777,
-0.5220080018043518,
-0.5275765657424927,
-0.5931153893470764,
0.7234237194061279,
0.15556731820106506,
-1.0919008255004883,
0.014644628390669823,
-0.040427446365356445,
-0.17298144102096558,
0.24672159552574158,
-1.496940016746521,
-0.2870250940322876,
-0.3928053081035614,
-0.4097513258457184,
-1.3227909803390503,
-0.03576023876667023,
1.287848949432373,
-0.6751579642295837,
-0.19597312808036804,
0.6711074709892273,
0.4312540888786316,
0.5877115726470947,
0.5164732933044434,
-0.6600406169891357,
-0.36759671568870544,
-0.3442767858505249,
-0.3596641719341278,
0.14459581673145294,
1.2114149332046509,
-0.1540972888469696,
-1.076490879058838,
0.6691898703575134,
-0.5160730481147766,
0.07151152938604355,
1.9893070459365845,
-0.047470659017562866,
-0.8115317821502686,
0.38825199007987976,
-0.7275011539459229,
1.8209587335586548,
1.5965782403945923,
1.258891224861145,
-0.1072891429066658,
-0.8596352934837341,
0.48120689392089844,
-0.23401060700416565,
-0.4194693863391876,
0.8695186376571655,
0.521693229675293,
-0.15462751686573029,
-1.4736119508743286,
0.4674694240093231,
1.3860441446304321,
-0.9991100430488586,
-0.8507731556892395,
0.17660322785377502,
-0.8949935436248779,
1.0655442476272583,
0.6095277667045593,
0.4153212606906891,
0.22919167578220367,
1.6545521020889282,
0.5450987219810486,
-0.4513431191444397,
0.39294278621673584,
0.4820864498615265,
-0.1577739268541336,
-2.0537078380584717,
-1.1551905870437622,
0.288480281829834,
-0.3302943706512451,
-1.602354645729065,
1.2570035457611084,
-1.124198317527771,
-0.8930874466896057,
0.5459088087081909,
0.19923827052116394,
1.423643946647644,
0.35553932189941406,
1.793365478515625,
2.0198423862457275,
0.8155102133750916,
0.2973156273365021,
1.3403093814849854,
0.033197276294231415,
-0.42569130659103394,
1.8455147743225098,
-0.3554816246032715,
0.7371801733970642,
1.0074760913848877,
-0.44676274061203003,
-1.2074880599975586,
-0.7278460264205933,
-1.2008531093597412,
-0.6491760015487671,
1.2048887014389038,
0.2679194509983063,
-1.1844820976257324,
0.19002610445022583,
1.6434077024459839,
0.07964824885129929,
-0.3155977129936218,
0.5736206769943237,
0.3460454046726227,
-0.8265146613121033,
0.01979471929371357,
-1.0191315412521362,
0.4154897928237915,
-0.08931725472211838,
-0.26666754484176636,
0.17709234356880188,
0.661318838596344,
1.2852380275726318,
-0.04980701208114624,
0.1144128292798996,
1.2108548879623413,
-1.3462504148483276,
1.5457420349121094,
-0.6495031714439392,
0.32552003860473633,
-2.4519572257995605,
1.4321069717407227,
-0.7960845828056335,
1.8487118482589722,
-2.6276679039001465,
0.3844508230686188,
-0.46086743474006653,
-0.46230849623680115,
0.3045739233493805,
-0.28178757429122925,
0.17018674314022064,
-0.07662059366703033,
-1.116767406463623,
0.08367808163166046,
-0.8016365170478821,
0.514647901058197,
1.351591944694519,
1.5119520425796509,
-1.1375219821929932,
-0.2305017113685608,
-1.8693063259124756,
-0.12441610544919968,
-0.705241858959198,
0.37355470657348633,
-2.0048696994781494,
0.023172838613390923,
-1.9083080291748047,
-2.227260112762451,
-1.6040277481079102,
-0.8611018657684326,
1.016334891319275,
0.21484486758708954,
-0.9909476637840271,
0.9339975714683533,
-0.39308828115463257,
-1.6120573282241821,
1.0204439163208008,
-2.1968657970428467
] |
https://github.com/huggingface/datasets/issues/3396 | Install Audio dependencies to support audio decoding | But https://huggingface.co/datasets/openslr/viewer does not work
<img width="678" alt="Capture d’écran 2022-04-12 à 13 59 46" src="https://user-images.githubusercontent.com/1676121/162958013-e31ef2ae-f886-47b7-9f27-664ed3d4b5a1.png">
Same issue as #4126:
```
Status code: 400
Exception: TypeError
Message: __init__() got an unexpected keyword argument 'audio_column'
``` | ## Dataset viewer issue for '*openslr*', '*projecte-aina/parlament_parla*'
**Link:** *https://huggingface.co/datasets/openslr*
**Link:** *https://huggingface.co/datasets/projecte-aina/parlament_parla*
Error:
```
Status code: 400
Exception: ImportError
Message: To support decoding audio files, please install 'librosa'.
```
Am I the one who added this dataset ? Yes-No
- openslr: No
- projecte-aina/parlament_parla: Yes
| 1,068 | 34 | Install Audio dependencies to support audio decoding
## Dataset viewer issue for '*openslr*', '*projecte-aina/parlament_parla*'
**Link:** *https://huggingface.co/datasets/openslr*
**Link:** *https://huggingface.co/datasets/projecte-aina/parlament_parla*
Error:
```
Status code: 400
Exception: ImportError
Message: To support decoding audio files, please install 'librosa'.
```
Am I the one who added this dataset ? Yes-No
- openslr: No
- projecte-aina/parlament_parla: Yes
But https://huggingface.co/datasets/openslr/viewer does not work
<img width="678" alt="Capture d’écran 2022-04-12 à 13 59 46" src="https://user-images.githubusercontent.com/1676121/162958013-e31ef2ae-f886-47b7-9f27-664ed3d4b5a1.png">
Same issue as #4126:
```
Status code: 400
Exception: TypeError
Message: __init__() got an unexpected keyword argument 'audio_column'
``` | [
-1.1589876413345337,
-0.8868131041526794,
-0.7456104159355164,
1.471373438835144,
-0.15121003985404968,
-1.2945398092269897,
0.1587996929883957,
-0.960082471370697,
1.5873557329177856,
-0.6203265190124512,
0.3774391710758209,
-1.663333773612976,
-0.10222668945789337,
-0.6644283533096313,
-0.7485479712486267,
-0.7673161625862122,
-0.45353710651397705,
-0.8445865511894226,
1.000105381011963,
2.4471328258514404,
1.2954062223434448,
-1.5306756496429443,
2.6891744136810303,
0.6683674454689026,
-0.26133260130882263,
-1.0113604068756104,
0.3742544949054718,
0.0563378669321537,
-1.2200777530670166,
-0.4644791781902313,
-0.849635660648346,
-0.09771645069122314,
-0.5680521130561829,
-0.526288628578186,
0.1393006145954132,
0.4790860712528229,
-0.1344342976808548,
-0.4123941659927368,
-0.5004096031188965,
-0.7825347185134888,
0.4753129482269287,
-0.4151656925678253,
0.8574042916297913,
-0.4231797754764557,
1.8416662216186523,
-0.671859085559845,
0.38849130272865295,
0.6704809665679932,
1.4326993227005005,
0.2255774289369583,
-0.0657801479101181,
0.319566011428833,
0.38653066754341125,
-0.05332659184932709,
0.4632645547389984,
1.2000198364257812,
0.6903210878372192,
0.46961355209350586,
0.7396582961082458,
-2.1931228637695312,
1.2263940572738647,
-0.8866653442382812,
0.2747148871421814,
1.4834758043289185,
-0.9890536665916443,
0.3484779894351959,
-1.9555370807647705,
0.04893100634217262,
0.5419439077377319,
-2.3469014167785645,
0.26804420351982117,
-1.2754971981048584,
-0.6440536379814148,
1.035746693611145,
0.2575043737888336,
-1.3011558055877686,
0.12727315723896027,
-0.42423108220100403,
0.9888742566108704,
0.4273589253425598,
1.0795437097549438,
-1.7558341026306152,
-0.0456189289689064,
-0.237851083278656,
0.09387661516666412,
-1.2603684663772583,
-1.5249086618423462,
0.5311007499694824,
0.5096822381019592,
0.6549279689788818,
-0.1109297126531601,
0.8832882046699524,
-1.0230077505111694,
0.9474852681159973,
-1.0846335887908936,
-1.6308013200759888,
-1.4429404735565186,
-2.267969846725464,
-2.2983829975128174,
0.8349428772926331,
-0.4072446823120117,
-0.3780743181705475,
1.9206048250198364,
-0.879463791847229,
-1.7407536506652832,
1.1063021421432495,
0.3871085047721863,
0.07090777158737183,
2.305692195892334,
0.28507620096206665,
-0.8461897969245911,
0.394769549369812,
-0.8592450618743896,
0.8168409466743469,
-0.46706801652908325,
1.4123674631118774,
0.5004515647888184,
-0.9704351425170898,
1.6193046569824219,
-0.490612268447876,
0.542214572429657,
-0.7521187663078308,
-0.5670303106307983,
-0.7574151754379272,
0.3390622138977051,
1.912290096282959,
-0.298860102891922,
1.5070230960845947,
-0.33977073431015015,
-1.645798921585083,
-1.4519538879394531,
0.8168377876281738,
0.5090450644493103,
-0.8739611506462097,
0.1244739443063736,
-0.42353591322898865,
0.11864745616912842,
-0.13375331461429596,
1.0507316589355469,
1.1380949020385742,
0.6839069128036499,
-0.38126933574676514,
-0.82598477602005,
0.18300577998161316,
0.01964900642633438,
-0.6875762343406677,
-1.7920724153518677,
-0.39015018939971924,
0.22061678767204285,
0.5566823482513428,
-1.3354042768478394,
1.752063274383545,
0.8138877749443054,
1.9869110584259033,
0.8955221772193909,
-0.4034125506877899,
1.5513429641723633,
-0.014734352007508278,
1.9128057956695557,
-0.6153765320777893,
0.68009352684021,
-0.2611367702484131,
-1.1123919486999512,
0.8543124198913574,
-0.3594275414943695,
-2.1273069381713867,
-0.7514504194259644,
-0.8395214676856995,
-0.18180851638317108,
-0.7726858258247375,
0.9238268733024597,
-0.2023787796497345,
-1.406821370124817,
0.16316501796245575,
-0.6872225403785706,
0.1895616203546524,
-1.3434417247772217,
0.27234095335006714,
0.7988469004631042,
-0.5816449522972107,
0.01966000534594059,
-0.2796722650527954,
-1.273585319519043,
-0.5609304308891296,
0.30051639676094055,
1.9750871658325195,
-0.6789244413375854,
0.9264339804649353,
0.9125725626945496,
-0.6572633981704712,
0.14593689143657684,
0.32443881034851074,
-0.2900424301624298,
0.9006351828575134,
-1.1771390438079834,
-0.37031352519989014,
1.04940927028656,
-0.1329234540462494,
-0.511644721031189,
1.4848142862319946,
0.8658390045166016,
-0.9941809773445129,
-0.22523133456707,
-0.2535135746002197,
-0.8105167150497437,
0.01615351065993309,
-1.5491236448287964,
-0.14465346932411194,
0.23426881432533264,
-1.3939133882522583,
-0.4885174036026001,
-0.2282225340604782,
1.3546444177627563,
-0.19918692111968994,
1.330588936805725,
-0.32244184613227844,
-0.22404539585113525,
-0.36227619647979736,
-0.42170149087905884,
0.1850804090499878,
-0.2528257966041565,
-0.7144961953163147,
0.24375823140144348,
-0.7715204358100891,
0.28602975606918335,
1.3978687524795532,
0.3863449990749359,
0.0033325720578432083,
0.5041802525520325,
1.1352176666259766,
0.318623423576355,
0.009005261585116386,
-0.8320872187614441,
-1.5119794607162476,
2.023937940597534,
-1.5159811973571777,
1.95414137840271,
0.8097697496414185,
0.004655892960727215,
-1.6681294441223145,
-1.8279294967651367,
1.3831884860992432,
1.2069690227508545,
2.4155635833740234,
0.6355491280555725,
0.4345855712890625,
-0.9257427453994751,
-0.6871616840362549,
0.3156789243221283,
-0.9991987943649292,
-0.6802268624305725,
0.12643149495124817,
2.3580868244171143,
1.7599732875823975,
-0.6046748161315918,
-0.31971144676208496,
-0.9429492950439453,
1.3471554517745972,
-0.2029605656862259,
0.27666401863098145,
2.0541932582855225,
-0.2553384602069855,
-0.986757218837738,
1.2577977180480957,
-2.4184088706970215,
0.24404141306877136,
2.0627036094665527,
0.3478800654411316,
0.19584046304225922,
-1.3545348644256592,
-0.6830828189849854,
-0.25048741698265076,
-0.4390074908733368,
-1.1718125343322754,
0.44320282340049744,
-0.24769030511379242,
-0.8907898664474487,
-1.4913157224655151,
0.15200017392635345,
-1.133386254310608,
-1.6621289253234863,
0.4045942425727844,
1.8776284456253052,
1.9598251581192017,
-0.7711944580078125,
1.424339771270752,
-0.3152014911174774,
0.09944647550582886,
1.2882879972457886,
1.289092779159546,
3.1034181118011475,
1.8209240436553955,
-1.1946007013320923,
0.7324182987213135,
-0.21584542095661163,
-0.47742387652397156,
1.0909982919692993,
-1.0865442752838135,
1.0935200452804565,
-0.2185937762260437,
-1.2056313753128052,
-1.2346725463867188,
0.9133791923522949,
0.5851823687553406,
0.04673738405108452,
-0.5949437022209167,
1.2011990547180176,
0.05983651801943779,
1.3809912204742432,
0.6151211261749268,
-0.3170347213745117,
0.5060356259346008,
-0.3655129671096802,
-0.44626083970069885,
1.5616393089294434,
0.18811596930027008,
-1.4956843852996826,
-2.3972556591033936,
-0.1858806014060974,
-0.9445800185203552,
-0.052130889147520065,
-0.6692009568214417,
-1.0884963274002075,
1.6519931554794312,
0.4649309813976288,
-1.2405345439910889,
-0.2859916388988495,
-0.3539585471153259,
-0.5167703628540039,
2.668041229248047,
-1.4389127492904663,
-0.22318416833877563,
-0.9583508968353271,
-0.42760562896728516,
1.7426960468292236,
-1.1211045980453491,
-0.19723674654960632,
-1.06349515914917,
-0.5906015634536743,
-1.3124561309814453,
-0.5386263728141785,
-0.04462714493274689,
-0.8468692898750305,
0.877627432346344,
0.11364583671092987,
-1.1287035942077637,
-0.33342963457107544,
-0.9563462138175964,
0.8333635330200195,
-0.12799768149852753,
0.21159785985946655,
1.9492595195770264,
0.44622382521629333,
-0.3435020446777344,
0.7355163097381592,
1.2081124782562256,
0.6046215891838074,
-0.6102409362792969,
0.2409754991531372,
-0.5243604779243469,
0.30162593722343445,
-1.3990592956542969,
0.2413223385810852,
-2.889242172241211,
0.6647228598594666,
-0.0006003100425004959,
-0.10961689054965973,
-0.0821874737739563,
-1.388389229774475,
1.160696029663086,
2.5059335231781006,
-1.1460131406784058,
0.47443723678588867,
0.3780592381954193,
1.1767851114273071,
-1.6742111444473267,
0.23050512373447418,
-0.3977954089641571,
2.1797287464141846,
0.10096628963947296,
1.2260664701461792,
-0.5317471027374268,
-2.2295401096343994,
0.5269532799720764,
-1.2646050453186035,
-1.083565592765808,
0.6279555559158325,
-0.8531344532966614,
0.1384417861700058,
-1.5959603786468506,
-0.2239198386669159,
-0.9146416783332825,
-1.2736064195632935,
0.77883380651474,
0.11893436312675476,
0.374839186668396,
-0.5932523608207703,
0.38635432720184326,
-2.1345860958099365,
-1.388107180595398,
-0.23011086881160736,
-0.8464434146881104,
0.5395547747612,
-0.30140286684036255,
0.6963586807250977,
-0.056725695729255676,
0.11343696713447571,
0.24179911613464355,
1.4598538875579834,
3.3555686473846436,
0.22926096618175507,
0.3243260979652405,
-0.1495661586523056,
-0.8857948780059814,
1.4724994897842407,
0.9739046692848206,
0.0368729829788208,
-0.5776482820510864,
-1.0008645057678223,
1.3641369342803955,
2.024141311645508,
1.1124330759048462,
0.03985922783613205,
-0.7861921191215515,
-0.748304009437561,
-0.045784514397382736,
0.20917876064777374,
0.47824403643608093,
0.8959985375404358,
0.0503135621547699,
0.06614658236503601,
1.377593994140625,
1.1973382234573364,
-0.3866073489189148,
0.4673908054828644,
-0.9516890048980713,
-0.44411495327949524,
0.4790620505809784,
0.3345584273338318,
0.0848156213760376,
0.3912506699562073,
-1.033524513244629,
-0.22884486615657806,
-0.23087579011917114,
-0.973885178565979,
-0.7234624028205872,
-0.5421512722969055,
-0.3901188373565674,
1.5997347831726074,
0.056848686188459396,
-0.44521650671958923,
-0.007299130316823721,
-0.7368266582489014,
-0.08961045742034912,
-1.1527369022369385,
0.21479342877864838,
-0.11047516763210297,
0.0039223721250891685,
-0.1904105246067047,
1.7169030904769897,
-0.865639328956604,
-2.1232383251190186,
0.16639454662799835,
0.3956339359283447,
-0.5592477321624756,
0.10148793458938599,
1.7186700105667114,
0.5121716260910034,
1.3510440587997437,
1.3590636253356934,
1.0065127611160278,
-0.5517849922180176,
-1.24346125125885,
0.6233918070793152,
0.9990281462669373,
-1.3645678758621216,
0.7931818962097168,
-0.01982482522726059,
-0.4859272241592407,
0.6506128311157227,
1.4108777046203613,
0.45167773962020874,
-1.9479320049285889,
0.7653597593307495,
-0.8346158266067505,
0.916847288608551,
0.7042645812034607,
0.7592648267745972,
0.3538900911808014,
0.9090251922607422,
-1.357957363128662,
-1.0767112970352173,
-0.7683289051055908,
-0.6001311540603638,
1.917090892791748,
-0.23716071248054504,
0.5030235052108765,
-0.21838882565498352,
-1.2087786197662354,
-0.06228215619921684,
0.7967694997787476,
0.4453156292438507,
-0.3247571289539337,
0.7947781085968018,
-0.6354825496673584,
-0.9342663288116455,
-1.3024080991744995,
-0.42187294363975525,
-0.9048272967338562,
-0.9321309924125671,
0.9622918367385864,
0.8584909439086914,
0.4419669806957245,
1.9256057739257812,
0.6796104907989502,
0.17668475210666656,
-2.635715961456299,
0.8115434050559998,
0.28339797258377075,
-0.01769961416721344,
1.0034935474395752,
0.2878212034702301,
1.1690974235534668,
-0.022223223000764847,
0.4948486387729645,
-2.3924736976623535,
2.170588254928589,
-0.17372114956378937,
0.6522279977798462,
-0.012126341462135315,
-0.09851545095443726,
1.1630808115005493,
0.5382369756698608,
0.44630110263824463,
-1.1223242282867432,
0.7272789478302002,
-0.5817339420318604,
1.119122862815857,
0.8466039896011353,
-0.7924143075942993,
0.015669625252485275,
1.2591667175292969,
0.4190756380558014,
-0.47767946124076843,
-1.0342531204223633,
-0.7848295569419861,
0.9187465310096741,
1.6774380207061768,
-0.05556284263730049,
-0.046122048050165176,
0.9046947956085205,
0.6836963295936584,
-1.2364699840545654,
0.07128788530826569,
-0.6633562445640564,
-0.7249581813812256,
1.7834969758987427,
2.044461250305176,
-0.084061399102211,
-0.25456586480140686,
-0.6939171552658081,
-1.3006714582443237,
0.8083599209785461,
0.005636603571474552,
0.0871778279542923,
0.6832332611083984,
-0.7131364941596985,
1.1305789947509766,
0.6971944570541382,
0.8850304484367371,
-0.0029157260432839394,
0.33881738781929016,
0.41925644874572754,
-0.31646841764450073,
-1.220503330230713,
-0.37141087651252747,
-1.2695658206939697,
-2.562415838241577,
0.5195828676223755,
-0.23491720855236053,
-1.383763313293457,
0.015542643144726753,
-1.109465479850769,
0.9495810270309448,
-0.6873011589050293,
-1.1814279556274414,
-1.4738733768463135,
0.2791053056716919,
-0.074013352394104,
0.8607689738273621,
-1.5970253944396973,
-0.11140848696231842,
1.235181212425232,
0.8021568059921265,
-0.6070753931999207,
0.855526864528656,
0.19958195090293884,
1.056843876838684,
0.8256266117095947,
-0.3319891095161438,
0.4741860628128052,
0.14655867218971252,
-1.4313830137252808,
0.5162227153778076,
1.260290503501892,
0.160940483212471,
1.471752405166626,
-0.501278817653656,
0.0874640941619873,
0.4294060170650482,
-0.48840266466140747,
-0.5441449880599976,
-0.6139782667160034,
0.6849633455276489,
0.11053623259067535,
-1.135500431060791,
0.03298703581094742,
-0.04262964054942131,
-0.12984278798103333,
0.22645680606365204,
-1.4887551069259644,
-0.23476293683052063,
-0.3782714903354645,
-0.4989977777004242,
-1.2813628911972046,
-0.0523616299033165,
1.284188151359558,
-0.6388956308364868,
-0.2136509269475937,
0.6032750010490417,
0.3906724452972412,
0.5620458722114563,
0.5480306148529053,
-0.6839869618415833,
-0.4000905454158783,
-0.2589918076992035,
-0.3840566575527191,
0.2248634248971939,
1.2230145931243896,
-0.1075270026922226,
-1.081037163734436,
0.6315382719039917,
-0.4094853401184082,
0.146810844540596,
1.9584347009658813,
0.017561595886945724,
-0.8219210505485535,
0.35132402181625366,
-0.7360689640045166,
1.836376428604126,
1.6201527118682861,
1.2811565399169922,
-0.12143073976039886,
-0.9131763577461243,
0.576751172542572,
-0.3556137681007385,
-0.43907904624938965,
0.8534446358680725,
0.5035989284515381,
-0.1838822364807129,
-1.4514151811599731,
0.5547553300857544,
1.3659065961837769,
-0.95036780834198,
-0.8900925517082214,
0.22343340516090393,
-0.8351243734359741,
1.1181352138519287,
0.628838837146759,
0.4379512369632721,
0.26184535026550293,
1.6803498268127441,
0.658414900302887,
-0.3890390992164612,
0.49261870980262756,
0.4932542145252228,
-0.2135666459798813,
-2.02294659614563,
-1.1968777179718018,
0.30184319615364075,
-0.42883506417274475,
-1.5602054595947266,
1.3670775890350342,
-1.1224929094314575,
-0.9139757752418518,
0.5502946972846985,
0.17752797901630402,
1.404303789138794,
0.3577274680137634,
1.7087125778198242,
2.017666816711426,
0.825366199016571,
0.3371022343635559,
1.252367377281189,
-0.028912222012877464,
-0.4630056619644165,
1.8424698114395142,
-0.42322516441345215,
0.6186797618865967,
1.0582587718963623,
-0.4176308810710907,
-1.227505087852478,
-0.7799842357635498,
-1.234363317489624,
-0.7180064916610718,
1.1683478355407715,
0.25366872549057007,
-1.1937249898910522,
0.2151791900396347,
1.6665456295013428,
0.04482502117753029,
-0.33710503578186035,
0.5606660842895508,
0.33501845598220825,
-0.8239100575447083,
0.005678723566234112,
-0.9910176396369934,
0.41173872351646423,
-0.11249272525310516,
-0.3180355131626129,
0.17437300086021423,
0.6278533935546875,
1.301578164100647,
0.03806157782673836,
0.10866577923297882,
1.1813328266143799,
-1.3583543300628662,
1.4921677112579346,
-0.7077838778495789,
0.3124559223651886,
-2.362123489379883,
1.42250394821167,
-0.8142039775848389,
1.9246456623077393,
-2.6105735301971436,
0.3850644826889038,
-0.474821001291275,
-0.4536587595939636,
0.27064141631126404,
-0.33842918276786804,
0.20211952924728394,
-0.07493634521961212,
-1.1402159929275513,
-0.01243562437593937,
-0.7737171649932861,
0.5565655827522278,
1.1896830797195435,
1.4496772289276123,
-1.100730061531067,
-0.23087157309055328,
-1.7701319456100464,
-0.12795650959014893,
-0.6909749507904053,
0.34165555238723755,
-1.9748889207839966,
0.0015862071886658669,
-1.9715203046798706,
-2.217308521270752,
-1.4793035984039307,
-0.8455990552902222,
1.0709290504455566,
0.18413279950618744,
-0.9045734405517578,
1.0049734115600586,
-0.32440292835235596,
-1.6746994256973267,
1.095927119255066,
-2.1771199703216553
] |
https://github.com/huggingface/datasets/issues/3394 | Preserve all feature types when saving a dataset on the Hub with `push_to_hub` | According to this [comment in the forum](https://discuss.huggingface.co/t/save-datasetdict-to-huggingface-hub/12075/8?u=lhoestq), using `push_to_hub` on a dataset with `ClassLabel` can also make the feature simply disappear when it's reloaded ! | Currently, if one of the dataset features is of type `ClassLabel`, saving the dataset with `push_to_hub` and reloading the dataset with `load_dataset` will return the feature of type `Value`. To fix this, we should do something similar to `save_to_disk` (which correctly preserves the types) and not only push the parquet files in `push_to_hub`, but also the dataset `info` (stored in a JSON file). | 1,069 | 25 | Preserve all feature types when saving a dataset on the Hub with `push_to_hub`
Currently, if one of the dataset features is of type `ClassLabel`, saving the dataset with `push_to_hub` and reloading the dataset with `load_dataset` will return the feature of type `Value`. To fix this, we should do something similar to `save_to_disk` (which correctly preserves the types) and not only push the parquet files in `push_to_hub`, but also the dataset `info` (stored in a JSON file).
According to this [comment in the forum](https://discuss.huggingface.co/t/save-datasetdict-to-huggingface-hub/12075/8?u=lhoestq), using `push_to_hub` on a dataset with `ClassLabel` can also make the feature simply disappear when it's reloaded ! | [
-1.0697612762451172,
-0.8442460298538208,
-0.870124101638794,
1.5707567930221558,
-0.15623800456523895,
-1.3308610916137695,
0.24099430441856384,
-1.1146265268325806,
1.7303082942962646,
-0.8899334073066711,
0.4320400655269623,
-1.718320608139038,
0.056585315614938736,
-0.7691459655761719,
-0.7856390476226807,
-0.9244053959846497,
-0.4495951235294342,
-0.671932578086853,
0.8660314083099365,
2.433983087539673,
1.2542386054992676,
-1.2576712369918823,
2.6323678493499756,
0.6576405167579651,
-0.22296294569969177,
-0.9756523966789246,
0.48877912759780884,
0.05847981199622154,
-1.12053644657135,
-0.4433729946613312,
-0.8808548450469971,
-0.16768737137317657,
-0.6898097991943359,
-0.6698974370956421,
0.07313013821840286,
0.5454584360122681,
-0.32585659623146057,
-0.3161514699459076,
-0.5308607220649719,
-0.8800398707389832,
0.539638876914978,
-0.3772742450237274,
0.9711845517158508,
-0.4708189368247986,
1.8569936752319336,
-0.6087493896484375,
0.3445521891117096,
0.816022515296936,
1.4913127422332764,
0.13752995431423187,
-0.13466061651706696,
0.3014601171016693,
0.2884570360183716,
0.025127902626991272,
0.41590258479118347,
1.1423063278198242,
0.46805328130722046,
0.731448233127594,
0.7137634754180908,
-2.333980083465576,
1.3502756357192993,
-1.1176071166992188,
0.2831488251686096,
1.3812083005905151,
-0.9531863331794739,
0.2006143480539322,
-1.7934281826019287,
-0.02618519961833954,
0.5292821526527405,
-2.3685648441314697,
0.2111728936433792,
-1.2525479793548584,
-0.5419747829437256,
0.9352243542671204,
0.37295711040496826,
-1.2761505842208862,
0.11136949807405472,
-0.3293627202510834,
1.0510388612747192,
0.5795815587043762,
1.0917105674743652,
-1.7190862894058228,
0.1008884385228157,
-0.29164645075798035,
0.12504202127456665,
-1.4201266765594482,
-1.4749646186828613,
0.6018131971359253,
0.5895212292671204,
0.5196837186813354,
-0.10310249775648117,
1.0416791439056396,
-0.875816285610199,
0.7409557700157166,
-1.0214308500289917,
-1.6705669164657593,
-1.3770945072174072,
-2.1189627647399902,
-2.2939178943634033,
0.6345678567886353,
-0.5231835842132568,
-0.5611017346382141,
2.0490574836730957,
-0.9702941179275513,
-1.8365657329559326,
1.1887586116790771,
0.2716881334781647,
0.027728822082281113,
2.3553597927093506,
0.15654398500919342,
-0.5845229029655457,
0.4279768168926239,
-0.6827694773674011,
0.8550992608070374,
-0.3961573839187622,
1.2786099910736084,
0.4738721251487732,
-1.2351202964782715,
1.6315611600875854,
-0.37664109468460083,
0.5954621434211731,
-0.6893923282623291,
-0.558339536190033,
-0.8783552646636963,
0.32749971747398376,
1.8616833686828613,
-0.2933971583843231,
1.5112907886505127,
-0.3764692544937134,
-1.4718557596206665,
-1.549417495727539,
1.0409811735153198,
0.535429835319519,
-0.7953276038169861,
0.08022920042276382,
-0.3843892812728882,
0.10043194144964218,
-0.1339719146490097,
1.240429162979126,
1.1267417669296265,
0.7349170446395874,
-0.37387096881866455,
-0.702520489692688,
0.18362848460674286,
0.030481386929750443,
-0.6943718194961548,
-1.8313645124435425,
-0.32348859310150146,
0.20365163683891296,
0.6058427095413208,
-1.0216799974441528,
1.8209834098815918,
0.8753107786178589,
1.9810705184936523,
0.9535235166549683,
-0.2256278544664383,
1.4211102724075317,
-0.018016673624515533,
1.8706201314926147,
-0.4516338109970093,
0.6627353429794312,
-0.4990980327129364,
-1.130597472190857,
0.960779070854187,
-0.3451012074947357,
-2.0019776821136475,
-0.7961239218711853,
-0.8484352827072144,
-0.20600229501724243,
-0.720225989818573,
1.0423294305801392,
-0.35977262258529663,
-1.3287169933319092,
0.1484045535326004,
-0.5136326551437378,
0.09470225870609283,
-1.2243739366531372,
0.3509438633918762,
0.727497398853302,
-0.7347601652145386,
0.058145616203546524,
-0.29348641633987427,
-1.2588697671890259,
-0.59934002161026,
0.3281354308128357,
1.8855211734771729,
-0.7236306071281433,
0.918209969997406,
0.9563288688659668,
-0.7715948820114136,
-0.0654592514038086,
0.28310155868530273,
-0.27470776438713074,
0.8123716115951538,
-0.9366178512573242,
-0.43410882353782654,
1.2196089029312134,
-0.24559272825717926,
-0.8335314393043518,
1.5405795574188232,
0.7156026363372803,
-0.9092865586280823,
-0.06286811828613281,
-0.3868737518787384,
-0.8155183792114258,
0.034714262932538986,
-1.4981014728546143,
-0.04025210440158844,
0.426405131816864,
-1.4693613052368164,
-0.3920530378818512,
-0.16735006868839264,
1.3075034618377686,
-0.19575561583042145,
1.3517545461654663,
-0.2226184904575348,
-0.357177197933197,
-0.3860081434249878,
-0.4163324236869812,
0.08951492607593536,
-0.10166899114847183,
-0.7259993553161621,
0.19802789390087128,
-0.655838131904602,
0.4071509838104248,
1.367945671081543,
0.20576880872249603,
0.08493606001138687,
0.5255630612373352,
1.167449712753296,
0.25370723009109497,
-0.002496667206287384,
-0.9839804172515869,
-1.5394327640533447,
1.928664207458496,
-1.5284188985824585,
1.9336750507354736,
0.7354675531387329,
-0.004031888209283352,
-1.810752272605896,
-1.737043857574463,
1.4637624025344849,
1.1620852947235107,
2.2525198459625244,
0.6515173316001892,
0.29783838987350464,
-0.843477725982666,
-0.6126450300216675,
0.3493625223636627,
-1.0551462173461914,
-0.6378116011619568,
0.12795935571193695,
2.2941858768463135,
1.7700133323669434,
-0.5161296129226685,
-0.16929234564304352,
-1.0504119396209717,
1.3468563556671143,
-0.18250542879104614,
0.23302863538265228,
2.068617582321167,
-0.43108394742012024,
-1.0653769969940186,
1.2627352476119995,
-2.288975238800049,
0.06481437385082245,
2.001883029937744,
0.19569045305252075,
0.11765113472938538,
-1.3341065645217896,
-0.634710431098938,
-0.2268495112657547,
-0.4570141136646271,
-1.400355577468872,
0.5294035077095032,
-0.25997063517570496,
-0.7320603728294373,
-1.332763433456421,
0.26795369386672974,
-1.1192305088043213,
-1.6032170057296753,
0.33787405490875244,
1.988242268562317,
2.033404588699341,
-0.5844460725784302,
1.6528704166412354,
-0.40252768993377686,
0.20086975395679474,
1.2834656238555908,
1.2662606239318848,
3.085285186767578,
1.9274876117706299,
-1.3060919046401978,
0.6163345575332642,
-0.12649855017662048,
-0.5627604722976685,
1.2945983409881592,
-1.024522304534912,
1.3042428493499756,
-0.16407060623168945,
-1.1550697088241577,
-1.4033262729644775,
0.9725171327590942,
0.46582740545272827,
0.15925610065460205,
-0.5651499032974243,
1.153354525566101,
0.1182900220155716,
1.2238560914993286,
0.5766909122467041,
-0.4560723304748535,
0.6077150106430054,
-0.452057421207428,
-0.588439404964447,
1.6817952394485474,
0.17632196843624115,
-1.4160373210906982,
-2.346665382385254,
-0.16152894496917725,
-0.7636811137199402,
0.08619815111160278,
-0.6056244373321533,
-0.9146887063980103,
1.711545705795288,
0.346924364566803,
-1.3452293872833252,
-0.2539137005805969,
-0.36103102564811707,
-0.6201328635215759,
2.657200574874878,
-1.3302239179611206,
-0.27525636553764343,
-0.940096914768219,
-0.6643508076667786,
1.718342661857605,
-1.2256683111190796,
-0.1866736114025116,
-0.9889554381370544,
-0.46956586837768555,
-1.3807600736618042,
-0.5028649568557739,
-0.012648645788431168,
-0.9755536317825317,
0.9159756302833557,
0.1124376505613327,
-1.2582746744155884,
-0.3829020857810974,
-0.7363634705543518,
0.906205952167511,
-0.26816612482070923,
0.25355178117752075,
1.9361907243728638,
0.415335088968277,
-0.382759690284729,
0.721695601940155,
1.1118086576461792,
0.6134487390518188,
-0.6278140544891357,
0.29054978489875793,
-0.5880353450775146,
0.26724645495414734,
-1.2312465906143188,
0.3374229967594147,
-2.9206788539886475,
0.6361266374588013,
-0.1006649062037468,
-0.08569519966840744,
-0.015621134079992771,
-1.3666207790374756,
0.958463728427887,
2.6162452697753906,
-1.2324777841567993,
0.30998364090919495,
0.27091705799102783,
1.2123843431472778,
-1.5908012390136719,
0.266663134098053,
-0.4835619628429413,
2.094897747039795,
0.14603064954280853,
1.1953107118606567,
-0.4891100823879242,
-2.167264938354492,
0.5434340238571167,
-1.2836869955062866,
-1.2835928201675415,
0.9274542331695557,
-0.7078162431716919,
-0.002803053706884384,
-1.4377150535583496,
-0.19002017378807068,
-0.9302750825881958,
-1.2282909154891968,
0.8970727920532227,
0.19162346422672272,
0.5652276873588562,
-0.6764476299285889,
0.3062678277492523,
-2.160464286804199,
-1.3649042844772339,
-0.24395054578781128,
-0.8519713282585144,
0.4461326003074646,
-0.25582993030548096,
0.639623761177063,
-0.1653154045343399,
0.15564662218093872,
0.3812703788280487,
1.573265790939331,
3.3955869674682617,
0.1777215451002121,
0.3872074782848358,
-0.24711789190769196,
-0.8326613903045654,
1.5195229053497314,
1.034895658493042,
0.038400836288928986,
-0.4555834233760834,
-0.9873287677764893,
1.164096474647522,
1.926809310913086,
1.004672646522522,
0.09502594918012619,
-0.8753602504730225,
-0.6353686451911926,
-0.1010492667555809,
0.12320972979068756,
0.4459276795387268,
0.794002890586853,
0.12921233475208282,
0.1738499402999878,
1.305431842803955,
1.239267110824585,
-0.42257264256477356,
0.4446212649345398,
-0.8333423733711243,
-0.36991244554519653,
0.5026698708534241,
0.387021541595459,
-0.10594676434993744,
0.29207345843315125,
-0.9009520411491394,
-0.25270459055900574,
-0.48023951053619385,
-0.959801197052002,
-0.656407356262207,
-0.5161091685295105,
-0.4603763520717621,
1.6573842763900757,
-0.002532665617763996,
-0.49632588028907776,
-0.04288046434521675,
-0.7294639945030212,
-0.21407131850719452,
-1.121024250984192,
0.31136953830718994,
-0.18653427064418793,
-0.21036161482334137,
-0.1159292459487915,
1.6933704614639282,
-1.0585283041000366,
-2.109569787979126,
0.23774655163288116,
0.199186772108078,
-0.500362753868103,
0.25275111198425293,
1.5395240783691406,
0.47494229674339294,
1.4155409336090088,
1.4934499263763428,
0.9544899463653564,
-0.6675565242767334,
-1.3298522233963013,
0.6683142781257629,
0.9103200435638428,
-1.4721248149871826,
0.8318409323692322,
0.060028817504644394,
-0.5127251744270325,
0.7765693664550781,
1.1497199535369873,
0.450300395488739,
-2.0127029418945312,
0.7239052057266235,
-0.9077672958374023,
0.7643837332725525,
0.7565947771072388,
0.6712244153022766,
0.34805625677108765,
0.9001376032829285,
-1.0900259017944336,
-1.2750755548477173,
-0.74772047996521,
-0.6961367726325989,
1.8709214925765991,
-0.28326186537742615,
0.590848445892334,
-0.18306852877140045,
-1.3312252759933472,
-0.11370398104190826,
0.7495378851890564,
0.47751832008361816,
-0.4527169167995453,
0.7591659426689148,
-0.6372525691986084,
-0.9716612100601196,
-1.4044502973556519,
-0.48233723640441895,
-1.1392110586166382,
-0.9786025285720825,
1.0890206098556519,
0.8468285202980042,
0.23521803319454193,
1.827818512916565,
0.658717155456543,
0.2809132933616638,
-2.5414609909057617,
0.8432909250259399,
0.33546727895736694,
-0.011261459439992905,
0.8487139940261841,
0.45989927649497986,
1.1105211973190308,
-0.03807483986020088,
0.5651187300682068,
-2.3815298080444336,
2.334749937057495,
-0.20311786234378815,
0.600432813167572,
-0.03731176629662514,
-0.25487712025642395,
1.0749895572662354,
0.467710942029953,
0.48537904024124146,
-1.0444577932357788,
0.6860470771789551,
-0.5809640884399414,
1.2009642124176025,
0.9322643876075745,
-0.8812894821166992,
-0.10099053382873535,
1.5337374210357666,
0.5839311480522156,
-0.5712364912033081,
-0.813967764377594,
-0.9168074727058411,
0.8533964157104492,
1.6587454080581665,
-0.06075743958353996,
-0.027718178927898407,
0.8876195549964905,
0.5884113907814026,
-1.2079579830169678,
0.16554169356822968,
-0.720389723777771,
-0.8166923522949219,
1.6468242406845093,
1.916039228439331,
-0.18744122982025146,
-0.05637792497873306,
-0.9373605251312256,
-1.1373013257980347,
0.8272737860679626,
0.04306713491678238,
-0.058398887515068054,
0.5986455678939819,
-0.6866298913955688,
1.1244032382965088,
0.9918208718299866,
0.9762910604476929,
0.1868188977241516,
0.4500165581703186,
0.40491983294487,
-0.41472646594047546,
-1.1151328086853027,
-0.2976952791213989,
-1.1456412076950073,
-2.584710121154785,
0.49195438623428345,
-0.40597283840179443,
-1.357677936553955,
-0.026589754968881607,
-1.122383952140808,
0.8546050190925598,
-0.6337100267410278,
-1.111995816230774,
-1.533825397491455,
0.20952586829662323,
-0.029609594494104385,
0.8438072800636292,
-1.553005576133728,
0.023905262351036072,
1.1752873659133911,
0.7945742011070251,
-0.791503369808197,
0.9629738330841064,
0.2285117506980896,
0.9938163161277771,
0.8589370846748352,
-0.47948357462882996,
0.5750733017921448,
0.038414787501096725,
-1.310795783996582,
0.5026804804801941,
1.0673481225967407,
0.19530993700027466,
1.4535784721374512,
-0.40594297647476196,
-0.06337931007146835,
0.320415198802948,
-0.5320342779159546,
-0.4602873623371124,
-0.5998964309692383,
0.7128287553787231,
0.07631519436836243,
-0.8554918169975281,
0.22439438104629517,
0.0060237860307097435,
-0.38960954546928406,
0.17540648579597473,
-1.5077505111694336,
-0.11191573739051819,
-0.39884522557258606,
-0.6113428473472595,
-1.2557141780853271,
0.026924822479486465,
1.3497904539108276,
-0.5622794032096863,
-0.2144751101732254,
0.5191459059715271,
0.44512495398521423,
0.440141886472702,
0.6673272252082825,
-0.7260303497314453,
-0.2940827012062073,
-0.38992971181869507,
-0.31747743487358093,
0.39077940583229065,
1.346886157989502,
-0.24601905047893524,
-0.9456894993782043,
0.6941757202148438,
-0.3373917043209076,
-0.009707581251859665,
1.961344599723816,
0.057628314942121506,
-0.804711103439331,
0.31027811765670776,
-0.6475359201431274,
1.929159164428711,
1.8187135457992554,
1.3117586374282837,
-0.07762753963470459,
-0.9088695645332336,
0.6215754747390747,
-0.34463223814964294,
-0.32100778818130493,
0.9742472767829895,
0.4097212553024292,
-0.13419026136398315,
-1.3669188022613525,
0.714305579662323,
1.3026084899902344,
-0.7180693745613098,
-0.8667333126068115,
0.1254887878894806,
-0.7562699913978577,
1.006978154182434,
0.6938876509666443,
0.4293544888496399,
0.29757991433143616,
1.4817243814468384,
0.7006872296333313,
-0.3933287262916565,
0.5472305417060852,
0.4472070336341858,
-0.11719391494989395,
-2.1217024326324463,
-1.2111737728118896,
0.4282394051551819,
-0.5072869062423706,
-1.6067241430282593,
1.3339401483535767,
-1.1670799255371094,
-0.936683714389801,
0.5434150695800781,
0.07042808830738068,
1.5188758373260498,
0.27615389227867126,
1.5338104963302612,
2.0359060764312744,
0.8852283954620361,
0.44859763979911804,
1.480661392211914,
-0.14004318416118622,
-0.44464462995529175,
1.8548853397369385,
-0.5037219524383545,
0.43508902192115784,
1.2015514373779297,
-0.2679640054702759,
-1.0544483661651611,
-0.7906251549720764,
-1.2887152433395386,
-0.6755263209342957,
1.120392918586731,
0.1185513287782669,
-1.1680999994277954,
0.25390011072158813,
1.4858821630477905,
0.144403874874115,
-0.24623316526412964,
0.6273943185806274,
0.3888150155544281,
-0.8334844708442688,
0.005487426184117794,
-0.8821638822555542,
0.5316842794418335,
-0.22302713990211487,
-0.28019842505455017,
0.45080873370170593,
0.39495018124580383,
1.2569547891616821,
-0.09598563611507416,
0.16331689059734344,
1.1188607215881348,
-1.423214316368103,
1.3233164548873901,
-0.6520451307296753,
0.23776090145111084,
-2.461467742919922,
1.4235680103302002,
-0.6844392418861389,
1.891498327255249,
-2.7115588188171387,
0.3732275068759918,
-0.6283313035964966,
-0.43020737171173096,
0.3579021394252777,
-0.2983499765396118,
0.11381033807992935,
-0.16422900557518005,
-1.135401725769043,
-0.014644445851445198,
-0.7427144646644592,
0.5150001049041748,
1.1452980041503906,
1.3402540683746338,
-1.1589423418045044,
-0.34707173705101013,
-1.7460179328918457,
-0.19198891520500183,
-0.605437159538269,
0.31041383743286133,
-2.080369234085083,
-0.18473432958126068,
-1.9617667198181152,
-2.4380698204040527,
-1.298715591430664,
-0.7231261730194092,
1.1178895235061646,
0.165720134973526,
-0.7982969284057617,
1.2303494215011597,
-0.31208404898643494,
-1.780319333076477,
1.0477439165115356,
-2.110455274581909
] |
https://github.com/huggingface/datasets/issues/3394 | Preserve all feature types when saving a dataset on the Hub with `push_to_hub` | Maybe we can also fix https://github.com/huggingface/datasets/issues/3035 while working on this because, as pointed out in my initial post, `save_to_disk` also saves the `dataset_info.json` file. | Currently, if one of the dataset features is of type `ClassLabel`, saving the dataset with `push_to_hub` and reloading the dataset with `load_dataset` will return the feature of type `Value`. To fix this, we should do something similar to `save_to_disk` (which correctly preserves the types) and not only push the parquet files in `push_to_hub`, but also the dataset `info` (stored in a JSON file). | 1,069 | 24 | Preserve all feature types when saving a dataset on the Hub with `push_to_hub`
Currently, if one of the dataset features is of type `ClassLabel`, saving the dataset with `push_to_hub` and reloading the dataset with `load_dataset` will return the feature of type `Value`. To fix this, we should do something similar to `save_to_disk` (which correctly preserves the types) and not only push the parquet files in `push_to_hub`, but also the dataset `info` (stored in a JSON file).
Maybe we can also fix https://github.com/huggingface/datasets/issues/3035 while working on this because, as pointed out in my initial post, `save_to_disk` also saves the `dataset_info.json` file. | [
-1.0412607192993164,
-0.8797265291213989,
-0.8677384257316589,
1.58249032497406,
-0.17842558026313782,
-1.3910983800888062,
0.2599060833454132,
-1.134965419769287,
1.7697908878326416,
-0.9041287899017334,
0.39003893733024597,
-1.708344578742981,
0.07325423508882523,
-0.7482873797416687,
-0.7687649726867676,
-0.983424723148346,
-0.42459020018577576,
-0.7073372006416321,
0.8347650766372681,
2.3698208332061768,
1.2199387550354004,
-1.2195955514907837,
2.620224714279175,
0.6283705234527588,
-0.24500703811645508,
-1.019976258277893,
0.5273923873901367,
0.04814521223306656,
-1.0587058067321777,
-0.4725417196750641,
-0.8485724925994873,
-0.12142013758420944,
-0.6327956318855286,
-0.6184048056602478,
0.059807922691106796,
0.5098710656166077,
-0.3419837951660156,
-0.3129115700721741,
-0.46775317192077637,
-0.8726354241371155,
0.534132719039917,
-0.389575719833374,
1.037355899810791,
-0.48417842388153076,
1.8409008979797363,
-0.6108652353286743,
0.3522367775440216,
0.8411107063293457,
1.4818098545074463,
0.14427722990512848,
-0.11459952592849731,
0.23690353333950043,
0.3121616840362549,
0.042042527347803116,
0.4054318964481354,
1.1227941513061523,
0.4981209933757782,
0.763909101486206,
0.7154330015182495,
-2.2866907119750977,
1.3509539365768433,
-1.1520450115203857,
0.2444712519645691,
1.3829634189605713,
-0.8917714953422546,
0.23271505534648895,
-1.7176356315612793,
-0.0744035542011261,
0.502426028251648,
-2.3726563453674316,
0.24000543355941772,
-1.2775511741638184,
-0.5020492076873779,
0.9477558135986328,
0.4035354554653168,
-1.2416107654571533,
0.09318024665117264,
-0.32673853635787964,
1.0097987651824951,
0.6338574886322021,
1.0977615118026733,
-1.6476408243179321,
0.09418593347072601,
-0.24243305623531342,
0.09137976169586182,
-1.419618010520935,
-1.4753955602645874,
0.5421431064605713,
0.5339750647544861,
0.5980965495109558,
-0.14650873839855194,
1.0562208890914917,
-0.9204785823822021,
0.7750528454780579,
-1.0083444118499756,
-1.635804295539856,
-1.3431473970413208,
-2.1044211387634277,
-2.3485829830169678,
0.6939704418182373,
-0.5462225079536438,
-0.5224194526672363,
2.0445759296417236,
-0.928876519203186,
-1.8134722709655762,
1.1395400762557983,
0.2617069482803345,
0.015347003005445004,
2.348939895629883,
0.20939701795578003,
-0.5673470497131348,
0.3498797118663788,
-0.6274799704551697,
0.8811357021331787,
-0.3555603623390198,
1.2630228996276855,
0.4769987165927887,
-1.2198907136917114,
1.63278329372406,
-0.36121055483818054,
0.6065571308135986,
-0.6762658953666687,
-0.5558728575706482,
-0.90791916847229,
0.33813682198524475,
1.7672916650772095,
-0.29357558488845825,
1.4851970672607422,
-0.3876185417175293,
-1.4691746234893799,
-1.5955370664596558,
1.0566128492355347,
0.5104914307594299,
-0.8001260757446289,
0.0843799039721489,
-0.38220566511154175,
0.08699949830770493,
-0.12436654418706894,
1.2565699815750122,
1.1342442035675049,
0.8169829845428467,
-0.4180244505405426,
-0.6462212800979614,
0.2158883959054947,
0.03915964812040329,
-0.7745370268821716,
-1.8844939470291138,
-0.300577849149704,
0.23147331178188324,
0.595626175403595,
-0.9839146733283997,
1.8125419616699219,
0.8826955556869507,
2.002849817276001,
0.9470414519309998,
-0.2809235155582428,
1.3916548490524292,
-0.10456154495477676,
1.8443959951400757,
-0.4775463044643402,
0.6150624752044678,
-0.44245752692222595,
-1.1253700256347656,
0.9475638270378113,
-0.32236620783805847,
-1.989022135734558,
-0.8516491651535034,
-0.8389080166816711,
-0.22780528664588928,
-0.6927374005317688,
1.0383081436157227,
-0.32361719012260437,
-1.362383246421814,
0.08046090602874756,
-0.4868226647377014,
0.07812134921550751,
-1.2224438190460205,
0.29262489080429077,
0.7252615094184875,
-0.7848939895629883,
0.03869985044002533,
-0.24349556863307953,
-1.2475171089172363,
-0.5925790071487427,
0.36063721776008606,
1.8718085289001465,
-0.7913097143173218,
0.929089367389679,
0.9173648953437805,
-0.8378717303276062,
-0.060013264417648315,
0.241106778383255,
-0.32066401839256287,
0.728916585445404,
-0.9308754801750183,
-0.4588618576526642,
1.2234911918640137,
-0.26657429337501526,
-0.8530075550079346,
1.5824605226516724,
0.7128684520721436,
-0.9373682141304016,
-0.042669638991355896,
-0.3919355571269989,
-0.801285982131958,
0.016978692263364792,
-1.4741935729980469,
-0.06251226365566254,
0.48877575993537903,
-1.4532217979431152,
-0.3667137920856476,
-0.18066871166229248,
1.3203847408294678,
-0.23762741684913635,
1.3365130424499512,
-0.25107112526893616,
-0.4172731935977936,
-0.4295106530189514,
-0.4217809736728668,
0.07908456027507782,
-0.08099115639925003,
-0.6682733297348022,
0.17536088824272156,
-0.6455777287483215,
0.4504006803035736,
1.3747034072875977,
0.19407568871974945,
0.01735527440905571,
0.5010553598403931,
1.1944786310195923,
0.27297595143318176,
-0.039026521146297455,
-1.008262038230896,
-1.4735583066940308,
1.9814079999923706,
-1.4683269262313843,
1.9301913976669312,
0.6538654565811157,
-0.03699996694922447,
-1.8179385662078857,
-1.7773059606552124,
1.3920865058898926,
1.1843384504318237,
2.194761276245117,
0.5783306360244751,
0.266537070274353,
-0.8326182961463928,
-0.6164456605911255,
0.30525991320610046,
-1.1154346466064453,
-0.6102545857429504,
0.14597690105438232,
2.2999465465545654,
1.7964595556259155,
-0.502933919429779,
-0.1908521056175232,
-1.1195664405822754,
1.3222124576568604,
-0.17059653997421265,
0.23229366540908813,
2.1198973655700684,
-0.3929712772369385,
-1.0824724435806274,
1.280792474746704,
-2.3022844791412354,
0.062329549342393875,
2.0381243228912354,
0.16850537061691284,
0.14989697933197021,
-1.3778278827667236,
-0.603304922580719,
-0.23340445756912231,
-0.4656926095485687,
-1.3483757972717285,
0.5670444965362549,
-0.26336514949798584,
-0.7377488017082214,
-1.3390244245529175,
0.3027872145175934,
-1.0968151092529297,
-1.637781023979187,
0.3625148832798004,
1.9436672925949097,
2.0626208782196045,
-0.6000795364379883,
1.6121560335159302,
-0.36297258734703064,
0.09285544604063034,
1.3097716569900513,
1.2395130395889282,
3.08577561378479,
1.9257965087890625,
-1.3175418376922607,
0.5823192596435547,
-0.13096465170383453,
-0.5291953682899475,
1.268730878829956,
-1.0357415676116943,
1.304864764213562,
-0.19956213235855103,
-1.1647546291351318,
-1.424391269683838,
0.9906467795372009,
0.44695428013801575,
0.21026186645030975,
-0.5525057315826416,
1.226922869682312,
0.10468762367963791,
1.2896023988723755,
0.616356372833252,
-0.4574599266052246,
0.6063915491104126,
-0.4336613416671753,
-0.5574093461036682,
1.6668486595153809,
0.2420690357685089,
-1.4366275072097778,
-2.3495941162109375,
-0.21748216450214386,
-0.8107558488845825,
0.10118497908115387,
-0.5253351926803589,
-0.8915455937385559,
1.6878708600997925,
0.37203294038772583,
-1.371909737586975,
-0.2741564214229584,
-0.301383376121521,
-0.5956588387489319,
2.73395037651062,
-1.3106389045715332,
-0.2334183156490326,
-0.9247240424156189,
-0.6441030502319336,
1.7726120948791504,
-1.2224284410476685,
-0.2091297060251236,
-1.00175142288208,
-0.4894440174102783,
-1.4604965448379517,
-0.5216633677482605,
0.02719126269221306,
-1.0523381233215332,
0.9506902694702148,
0.07476428151130676,
-1.241640329360962,
-0.3781844675540924,
-0.7372220158576965,
0.9050569534301758,
-0.2788110077381134,
0.28003156185150146,
1.9341319799423218,
0.47454607486724854,
-0.3686636984348297,
0.7567340731620789,
1.069228172302246,
0.6167561411857605,
-0.6421498656272888,
0.2666369676589966,
-0.5842819213867188,
0.2819069027900696,
-1.2765412330627441,
0.2958134114742279,
-2.9529621601104736,
0.6361322402954102,
-0.1482098251581192,
-0.10269521176815033,
-0.04037214070558548,
-1.3867698907852173,
1.024188756942749,
2.6047940254211426,
-1.3109431266784668,
0.3166515529155731,
0.2921208143234253,
1.2198625802993774,
-1.566322922706604,
0.2872089445590973,
-0.43284082412719727,
2.072446823120117,
0.12305350601673126,
1.2593187093734741,
-0.45136067271232605,
-2.1106600761413574,
0.5675605535507202,
-1.2907639741897583,
-1.2710715532302856,
0.9549065828323364,
-0.7449073791503906,
0.013649524189531803,
-1.434890866279602,
-0.2064047008752823,
-0.8308660984039307,
-1.295892357826233,
0.8786005973815918,
0.1788463592529297,
0.5130094885826111,
-0.7007969617843628,
0.3411327004432678,
-2.1301522254943848,
-1.3465309143066406,
-0.2499835193157196,
-0.8951030969619751,
0.4119183421134949,
-0.2833613455295563,
0.6245269179344177,
-0.19751058518886566,
0.14831824600696564,
0.39661675691604614,
1.5912585258483887,
3.422956943511963,
0.23256124556064606,
0.3361060619354248,
-0.26915696263313293,
-0.8348603248596191,
1.4848277568817139,
1.067664623260498,
0.058017831295728683,
-0.4436865746974945,
-0.9405686855316162,
1.192862868309021,
1.9637690782546997,
1.0184332132339478,
0.0681753158569336,
-0.8956212997436523,
-0.6265920400619507,
-0.11623290181159973,
0.16199266910552979,
0.5322690010070801,
0.7984280586242676,
0.09125509858131409,
0.11484211683273315,
1.3073419332504272,
1.211478590965271,
-0.4111970067024231,
0.47068074345588684,
-0.8285818696022034,
-0.36582815647125244,
0.5224013328552246,
0.3489352762699127,
-0.04112304002046585,
0.3721906542778015,
-0.9040684103965759,
-0.26078730821609497,
-0.5062611103057861,
-0.980229914188385,
-0.6685338020324707,
-0.49276086688041687,
-0.4960877001285553,
1.600853681564331,
-0.018936438485980034,
-0.4583461880683899,
-0.015972549095749855,
-0.6920952796936035,
-0.1864144206047058,
-1.0702757835388184,
0.2796902656555176,
-0.18217413127422333,
-0.21918244659900665,
-0.08178327232599258,
1.6924234628677368,
-1.046549916267395,
-2.0203816890716553,
0.3025653660297394,
0.2141347974538803,
-0.481982946395874,
0.2824456989765167,
1.515894889831543,
0.46823927760124207,
1.4669920206069946,
1.4228572845458984,
0.9891859889030457,
-0.6915491223335266,
-1.3190921545028687,
0.7178718447685242,
0.9103032350540161,
-1.4719325304031372,
0.7787085175514221,
0.04526710510253906,
-0.5077787637710571,
0.7955062985420227,
1.1728593111038208,
0.43419957160949707,
-2.094252824783325,
0.684529185295105,
-0.9195908308029175,
0.7660805583000183,
0.8311474323272705,
0.6914241313934326,
0.3696853220462799,
0.8617398142814636,
-1.1152760982513428,
-1.2272789478302002,
-0.7704463005065918,
-0.7216049432754517,
1.891762375831604,
-0.23278094828128815,
0.601342499256134,
-0.06713240593671799,
-1.3401952981948853,
-0.17491669952869415,
0.7457716464996338,
0.4564721882343292,
-0.46753671765327454,
0.7926332354545593,
-0.6434419751167297,
-0.9006123542785645,
-1.4184496402740479,
-0.48555538058280945,
-1.168808937072754,
-1.0112918615341187,
1.1013072729110718,
0.8775547742843628,
0.19723151624202728,
1.8081777095794678,
0.6694126129150391,
0.3575831651687622,
-2.5196173191070557,
0.8956021666526794,
0.31818509101867676,
-0.062487877905368805,
0.8020874261856079,
0.48641282320022583,
1.106234073638916,
0.0196385495364666,
0.5843362212181091,
-2.4451067447662354,
2.3786842823028564,
-0.16993817687034607,
0.5182721018791199,
0.00951154064387083,
-0.3416097164154053,
1.1420236825942993,
0.43337300419807434,
0.46425047516822815,
-1.0973085165023804,
0.6953762769699097,
-0.5477984547615051,
1.2221966981887817,
0.9023154377937317,
-0.8346359133720398,
-0.08940089493989944,
1.5389820337295532,
0.5906567573547363,
-0.5415253043174744,
-0.7905493378639221,
-0.9968045353889465,
0.8311911225318909,
1.6077494621276855,
-0.09199739992618561,
-0.0968741625547409,
0.8749556541442871,
0.6154487133026123,
-1.179118037223816,
0.17724138498306274,
-0.7101607322692871,
-0.8026239275932312,
1.6138193607330322,
1.9212185144424438,
-0.21745149791240692,
-0.04520589858293533,
-0.9750209450721741,
-1.0489044189453125,
0.7652145028114319,
0.05427547171711922,
-0.049533411860466,
0.5729389190673828,
-0.6676419377326965,
1.1155611276626587,
0.9859755635261536,
0.9084110260009766,
0.14848005771636963,
0.5086194276809692,
0.36859259009361267,
-0.4011549949645996,
-1.1407369375228882,
-0.3294265866279602,
-1.1238933801651,
-2.5511865615844727,
0.47778648138046265,
-0.4752236008644104,
-1.3745412826538086,
-0.027276039123535156,
-1.141377329826355,
0.8337078094482422,
-0.6783939599990845,
-1.0938421487808228,
-1.5145165920257568,
0.2702433168888092,
-0.08318008482456207,
0.8912447690963745,
-1.5309882164001465,
0.028469495475292206,
1.204880714416504,
0.7820578217506409,
-0.8092016577720642,
0.9562869668006897,
0.236288383603096,
1.0300686359405518,
0.8045812845230103,
-0.5033361315727234,
0.5539907813072205,
0.01840881258249283,
-1.354893445968628,
0.49354204535484314,
0.9811590909957886,
0.1804163157939911,
1.474718451499939,
-0.4441010057926178,
-0.018178759142756462,
0.34978926181793213,
-0.5925824642181396,
-0.50480055809021,
-0.547086238861084,
0.766273558139801,
0.07488849759101868,
-0.9097036719322205,
0.29022833704948425,
-0.06058071553707123,
-0.4121105670928955,
0.24004578590393066,
-1.5241438150405884,
-0.2506946325302124,
-0.3963886499404907,
-0.5837985277175903,
-1.1652898788452148,
0.08707799762487411,
1.3547990322113037,
-0.48230886459350586,
-0.2724011242389679,
0.5165086388587952,
0.4432130455970764,
0.41380277276039124,
0.6742618083953857,
-0.7450449466705322,
-0.31519657373428345,
-0.4580630958080292,
-0.2757759690284729,
0.4140186309814453,
1.3953797817230225,
-0.18000070750713348,
-0.9591582417488098,
0.7713345885276794,
-0.3690255880355835,
-0.010609582997858524,
1.9720958471298218,
0.0720210149884224,
-0.8170192837715149,
0.35046622157096863,
-0.6745462417602539,
1.9153735637664795,
1.8159242868423462,
1.2986500263214111,
-0.007993939332664013,
-0.9383188486099243,
0.6019366383552551,
-0.3549491763114929,
-0.27896684408187866,
0.9286779165267944,
0.4504539966583252,
-0.11653869599103928,
-1.3409124612808228,
0.7294535040855408,
1.2580547332763672,
-0.733615517616272,
-0.9450362920761108,
0.13275779783725739,
-0.7506210207939148,
1.0225722789764404,
0.7031840085983276,
0.42997607588768005,
0.28747498989105225,
1.4510588645935059,
0.7261068224906921,
-0.3129907548427582,
0.5157049298286438,
0.4224083125591278,
-0.1675868034362793,
-2.0736517906188965,
-1.173529863357544,
0.42564091086387634,
-0.5207260847091675,
-1.6123751401901245,
1.3295537233352661,
-1.1445729732513428,
-0.9323554635047913,
0.5234135985374451,
0.07876654714345932,
1.5092909336090088,
0.3415556848049164,
1.514495611190796,
1.9988090991973877,
0.8993851542472839,
0.38144341111183167,
1.5049054622650146,
-0.13388602435588837,
-0.5369516015052795,
1.8622738122940063,
-0.46055111289024353,
0.34796908497810364,
1.2141462564468384,
-0.28445225954055786,
-1.0158381462097168,
-0.7958303689956665,
-1.2339023351669312,
-0.6675214171409607,
1.1552321910858154,
0.142592191696167,
-1.1795530319213867,
0.25828224420547485,
1.4625529050827026,
0.169976145029068,
-0.25867974758148193,
0.6562719345092773,
0.40759536623954773,
-0.8430495858192444,
0.014264282770454884,
-0.8109606504440308,
0.5350860953330994,
-0.24926693737506866,
-0.2985697090625763,
0.47836029529571533,
0.3580382764339447,
1.254939079284668,
-0.12328101694583893,
0.1799614131450653,
1.0462870597839355,
-1.381180763244629,
1.3977510929107666,
-0.5661722421646118,
0.2517734169960022,
-2.4668326377868652,
1.3773452043533325,
-0.6841892600059509,
1.9124846458435059,
-2.689681053161621,
0.3717043101787567,
-0.6100594401359558,
-0.41095006465911865,
0.3848470449447632,
-0.36268335580825806,
0.14432582259178162,
-0.20763666927814484,
-1.18746018409729,
-0.031224064528942108,
-0.7806821465492249,
0.5362430214881897,
1.1236602067947388,
1.3684991598129272,
-1.2160383462905884,
-0.39864757657051086,
-1.8014148473739624,
-0.1934295892715454,
-0.6136070489883423,
0.365036278963089,
-2.090040445327759,
-0.1491055190563202,
-1.9222217798233032,
-2.3958303928375244,
-1.2775393724441528,
-0.7264324426651001,
1.0883177518844604,
0.1783636212348938,
-0.7996311187744141,
1.2324106693267822,
-0.2613939642906189,
-1.7983421087265015,
1.0310927629470825,
-2.1060264110565186
] |
https://github.com/huggingface/datasets/issues/3392 | Dataset viewer issue for `dansbecker/hackernews_hiring_posts` | This issue was fixed by me calling `all_datasets.push_to_hub("hackernews_hiring_posts")`.
The previous problems were from calling `all_datasets.save_to_disk` and then pushing with `my_repo.git_add` and `my_repo.push_to_hub`.
| ## Dataset viewer issue for `dansbecker/hackernews_hiring_posts`
**Link:** https://huggingface.co/datasets/dansbecker/hackernews_hiring_posts
*short description of the issue*
Dataset preview not showing for uploaded DatasetDict. See https://discuss.huggingface.co/t/dataset-preview-not-showing-for-uploaded-datasetdict/12603
Am I the one who added this dataset ?
No -> @dansbecker | 1,070 | 22 | Dataset viewer issue for `dansbecker/hackernews_hiring_posts`
## Dataset viewer issue for `dansbecker/hackernews_hiring_posts`
**Link:** https://huggingface.co/datasets/dansbecker/hackernews_hiring_posts
*short description of the issue*
Dataset preview not showing for uploaded DatasetDict. See https://discuss.huggingface.co/t/dataset-preview-not-showing-for-uploaded-datasetdict/12603
Am I the one who added this dataset ?
No -> @dansbecker
This issue was fixed by me calling `all_datasets.push_to_hub("hackernews_hiring_posts")`.
The previous problems were from calling `all_datasets.save_to_disk` and then pushing with `my_repo.git_add` and `my_repo.push_to_hub`.
| [
-1.2249729633331299,
-0.928734302520752,
-0.7009603977203369,
1.3735588788986206,
-0.16022466123104095,
-1.4471652507781982,
0.18570169806480408,
-0.9134591221809387,
1.7077414989471436,
-0.7722395658493042,
0.3462895452976227,
-1.6392139196395874,
-0.023862693458795547,
-0.6191558837890625,
-0.721598744392395,
-0.8032744526863098,
-0.3932548463344574,
-0.76609867811203,
0.9076940417289734,
2.447904109954834,
1.2367502450942993,
-1.1780612468719482,
2.6124267578125,
0.6012407541275024,
-0.22489726543426514,
-1.0811028480529785,
0.5411173701286316,
0.096617192029953,
-1.2208787202835083,
-0.42720553278923035,
-0.9334615468978882,
-0.06355830281972885,
-0.5778017044067383,
-0.429045706987381,
0.035132959485054016,
0.5369806289672852,
-0.235166534781456,
-0.3141498267650604,
-0.5269147157669067,
-0.838788628578186,
0.5461395978927612,
-0.3039911091327667,
0.9818238019943237,
-0.45492246747016907,
1.8827005624771118,
-0.651463508605957,
0.4620833098888397,
0.7219519019126892,
1.3418434858322144,
0.0707731544971466,
-0.07439402490854263,
0.12404771149158478,
0.3899689316749573,
0.15399432182312012,
0.3478972315788269,
1.107034683227539,
0.45800501108169556,
0.5853164792060852,
0.5507901906967163,
-2.339113712310791,
1.3578330278396606,
-0.8468596935272217,
0.20671959221363068,
1.4132269620895386,
-1.0368369817733765,
0.2751476764678955,
-1.835914134979248,
-0.08041024208068848,
0.5317990183830261,
-2.249889612197876,
0.1875549554824829,
-1.371079683303833,
-0.589799165725708,
0.9254515767097473,
0.3191647529602051,
-1.2639950513839722,
0.09684794396162033,
-0.44268715381622314,
1.0605988502502441,
0.5518590807914734,
1.0500885248184204,
-1.6337283849716187,
-0.05120937526226044,
-0.2778518795967102,
-0.020248955115675926,
-1.3466675281524658,
-1.528321385383606,
0.6174888014793396,
0.5928632020950317,
0.6569845676422119,
-0.1187872514128685,
0.9749208688735962,
-1.0106024742126465,
0.9121679663658142,
-0.9872430562973022,
-1.695794701576233,
-1.4559376239776611,
-2.3603708744049072,
-2.312223434448242,
0.7730664014816284,
-0.4458882808685303,
-0.4888218641281128,
1.9429528713226318,
-1.0793992280960083,
-1.7601557970046997,
1.1290405988693237,
0.13039016723632812,
0.12581613659858704,
2.2847096920013428,
0.2874346673488617,
-0.6791596412658691,
0.3326961398124695,
-0.7024706602096558,
0.7628793120384216,
-0.32470765709877014,
1.400829553604126,
0.5652815699577332,
-1.109174132347107,
1.6255830526351929,
-0.38403069972991943,
0.5732282400131226,
-0.6762694716453552,
-0.6078478097915649,
-0.8199462294578552,
0.309325635433197,
1.8456240892410278,
-0.27735844254493713,
1.6135209798812866,
-0.2905178368091583,
-1.5068938732147217,
-1.489773154258728,
0.868701159954071,
0.5007021427154541,
-0.8313509821891785,
0.022885603830218315,
-0.48140397667884827,
0.09371652454137802,
-0.05700930953025818,
1.2633371353149414,
1.1814662218093872,
0.7463439106941223,
-0.4216883182525635,
-0.8230938911437988,
0.31853625178337097,
0.052266016602516174,
-0.731642484664917,
-1.8494157791137695,
-0.3610530197620392,
0.33025476336479187,
0.6515721678733826,
-1.0198975801467896,
1.7328791618347168,
0.8422625660896301,
2.059431552886963,
0.9768761992454529,
-0.2487751841545105,
1.302772879600525,
-0.10041389614343643,
1.836757779121399,
-0.4677339792251587,
0.5885274410247803,
-0.291329950094223,
-1.0570838451385498,
0.8235654234886169,
-0.37830954790115356,
-2.0056586265563965,
-0.7499111294746399,
-0.9612452983856201,
-0.17335084080696106,
-0.7862332463264465,
0.9701774716377258,
-0.2827241122722626,
-1.3759056329727173,
0.165118008852005,
-0.677560031414032,
0.0978393629193306,
-1.236741304397583,
0.25199568271636963,
0.7752799391746521,
-0.625747799873352,
-0.10117112100124359,
-0.30737459659576416,
-1.3639100790023804,
-0.5935927629470825,
0.3952571153640747,
1.8068468570709229,
-0.7077297568321228,
1.0337721109390259,
0.8946715593338013,
-0.7482925653457642,
0.10697075724601746,
0.22002075612545013,
-0.335898220539093,
0.7810234427452087,
-1.0791256427764893,
-0.347117155790329,
1.0995122194290161,
-0.3275284767150879,
-0.6768016815185547,
1.5290127992630005,
0.8247416019439697,
-0.9172990918159485,
-0.1920139640569687,
-0.2995271384716034,
-0.7009522318840027,
-0.018402129411697388,
-1.6165049076080322,
-0.1405027210712433,
0.3015047311782837,
-1.4050666093826294,
-0.49658772349357605,
-0.16589860618114471,
1.4609997272491455,
-0.21024619042873383,
1.302931308746338,
-0.23861393332481384,
-0.3287423551082611,
-0.46965134143829346,
-0.39267656207084656,
0.12474702298641205,
-0.08520533889532089,
-0.6147223114967346,
0.24592889845371246,
-0.8782433867454529,
0.35014915466308594,
1.3624619245529175,
0.3435085713863373,
0.06442056596279144,
0.6131064891815186,
1.121864676475525,
0.2534700632095337,
-0.03840048611164093,
-0.9092769622802734,
-1.7079514265060425,
1.957531452178955,
-1.4370543956756592,
1.9896851778030396,
0.6865611672401428,
-0.10973779857158661,
-1.846876859664917,
-1.843825101852417,
1.2924233675003052,
1.0777440071105957,
2.3168461322784424,
0.5845643281936646,
0.35034018754959106,
-0.8680362701416016,
-0.7340858578681946,
0.4359405040740967,
-0.9518232345581055,
-0.5807225704193115,
0.08993741869926453,
2.1561737060546875,
1.7474675178527832,
-0.5837894678115845,
-0.18057659268379211,
-1.0045379400253296,
1.19870126247406,
-0.14797034859657288,
0.2785821259021759,
2.061861753463745,
-0.4645826816558838,
-0.9597768187522888,
1.3171924352645874,
-2.3643946647644043,
0.2682446837425232,
2.1128523349761963,
0.2800658643245697,
0.0660112127661705,
-1.3889641761779785,
-0.5729297995567322,
-0.3255358040332794,
-0.3011726438999176,
-1.2787816524505615,
0.6348767280578613,
-0.33712145686149597,
-0.8884646892547607,
-1.394238829612732,
0.11101987212896347,
-1.061017394065857,
-1.6418031454086304,
0.4470703899860382,
1.9042421579360962,
1.9539754390716553,
-0.5994088649749756,
1.475313663482666,
-0.2692699432373047,
0.15113963186740875,
1.2972286939620972,
1.2425020933151245,
3.1426279544830322,
1.9642407894134521,
-1.1457847356796265,
0.7482439875602722,
-0.15252165496349335,
-0.5685427188873291,
1.260291337966919,
-1.0805836915969849,
1.2006570100784302,
-0.25040358304977417,
-1.1581697463989258,
-1.3145394325256348,
1.0122894048690796,
0.44993528723716736,
0.025620462372899055,
-0.5500622987747192,
1.2849602699279785,
0.10102072358131409,
1.3701906204223633,
0.5609958171844482,
-0.46865320205688477,
0.6446312665939331,
-0.4520527720451355,
-0.5529385805130005,
1.5399181842803955,
0.253238320350647,
-1.5416637659072876,
-2.3319919109344482,
-0.2605167329311371,
-0.8518699407577515,
-0.08019169420003891,
-0.6268502473831177,
-1.0778042078018188,
1.6709619760513306,
0.3913135230541229,
-1.3352798223495483,
-0.21280668675899506,
-0.3524990677833557,
-0.5908603668212891,
2.7076809406280518,
-1.234937310218811,
-0.10029689967632294,
-1.011338233947754,
-0.568345308303833,
1.7772414684295654,
-1.3166282176971436,
-0.2516472339630127,
-1.06887686252594,
-0.6504497528076172,
-1.3222370147705078,
-0.48746389150619507,
0.09644224494695663,
-0.9669082760810852,
0.908105731010437,
-0.12026336789131165,
-1.1683309078216553,
-0.27234548330307007,
-0.8763543367385864,
0.9520882964134216,
-0.16719114780426025,
0.17281344532966614,
1.9363377094268799,
0.41053643822669983,
-0.4333673417568207,
0.6062551736831665,
1.0965802669525146,
0.6496334075927734,
-0.7077219486236572,
0.2546858787536621,
-0.6612321138381958,
0.2915676534175873,
-1.2844828367233276,
0.3524295389652252,
-2.9559667110443115,
0.7555966973304749,
-0.08664899319410324,
-0.10101930052042007,
-0.06933751702308655,
-1.4762376546859741,
1.0320981740951538,
2.4907174110412598,
-1.3668791055679321,
0.41740602254867554,
0.40148264169692993,
1.0334469079971313,
-1.418064832687378,
0.3321780562400818,
-0.5426169633865356,
2.109373092651367,
0.21124885976314545,
1.2950857877731323,
-0.5360353589057922,
-2.0492279529571533,
0.7068603038787842,
-1.2089908123016357,
-1.1261926889419556,
0.761369526386261,
-0.8961971998214722,
0.1859118640422821,
-1.4225685596466064,
-0.14972494542598724,
-1.0717159509658813,
-1.325763463973999,
0.7945341467857361,
0.19719238579273224,
0.5228305459022522,
-0.528365969657898,
0.34824931621551514,
-2.147512197494507,
-1.3594272136688232,
-0.293163001537323,
-1.0118565559387207,
0.5146352648735046,
-0.298694372177124,
0.5428600311279297,
-0.13987506926059723,
0.22468727827072144,
0.3641158938407898,
1.5428893566131592,
3.447458505630493,
0.13062962889671326,
0.2128671258687973,
-0.11248169094324112,
-0.9271252155303955,
1.509427785873413,
1.0522340536117554,
0.14524048566818237,
-0.4846404194831848,
-0.9613138437271118,
1.288827896118164,
1.979764461517334,
1.02897047996521,
0.12072931230068207,
-0.8594953417778015,
-0.6720936894416809,
0.0012539494782686234,
0.19109368324279785,
0.3582404851913452,
0.9191529154777527,
0.23155885934829712,
0.26260411739349365,
1.3167592287063599,
1.1927490234375,
-0.35176169872283936,
0.4204138517379761,
-0.9264777898788452,
-0.35336068272590637,
0.4830092787742615,
0.33519619703292847,
-0.0040029846131801605,
0.39962753653526306,
-1.008387565612793,
-0.22919563949108124,
-0.34014925360679626,
-0.9510108828544617,
-0.6699227094650269,
-0.5080559849739075,
-0.47385936975479126,
1.618996024131775,
0.06360912322998047,
-0.5849800705909729,
-0.05633416771888733,
-0.7293954491615295,
-0.21074409782886505,
-1.0804593563079834,
0.22870837152004242,
-0.12968051433563232,
-0.019458666443824768,
-0.06681479513645172,
1.6904184818267822,
-0.9554843306541443,
-2.1948752403259277,
0.2607710659503937,
0.3045904338359833,
-0.516389787197113,
0.11200065910816193,
1.5460833311080933,
0.4714469015598297,
1.400457501411438,
1.3287782669067383,
1.0541313886642456,
-0.5748779773712158,
-1.250329613685608,
0.6761563420295715,
0.8165616989135742,
-1.4636332988739014,
0.9779379367828369,
-0.044077903032302856,
-0.46089473366737366,
0.7779200077056885,
1.223750114440918,
0.5442948937416077,
-1.9109543561935425,
0.7585227489471436,
-0.9784566164016724,
0.6962617039680481,
0.724707841873169,
0.8937190771102905,
0.30882519483566284,
0.9238606691360474,
-1.131903052330017,
-1.0948950052261353,
-0.6899857521057129,
-0.6528396010398865,
1.894468903541565,
-0.22880640625953674,
0.5598558783531189,
-0.16395382583141327,
-1.2380023002624512,
-0.10618256032466888,
0.8328785300254822,
0.35203856229782104,
-0.4172244369983673,
0.8780468106269836,
-0.6172167658805847,
-0.9471075534820557,
-1.2870965003967285,
-0.36569836735725403,
-0.9170952439308167,
-0.9643760919570923,
1.0318410396575928,
0.8597964644432068,
0.5171899795532227,
1.830457329750061,
0.4903428256511688,
0.3958319127559662,
-2.685673475265503,
0.8179008364677429,
0.191738098859787,
0.15352535247802734,
0.9310352206230164,
0.22217676043510437,
1.2632825374603271,
-0.0691298246383667,
0.5464959144592285,
-2.348809003829956,
2.2035207748413086,
-0.2752944827079773,
0.6070988774299622,
-0.04347789287567139,
-0.10987477749586105,
1.1811058521270752,
0.48591184616088867,
0.5455430746078491,
-1.10957932472229,
1.0200042724609375,
-0.524653971195221,
1.1328102350234985,
0.9078827500343323,
-0.846100926399231,
0.03180705010890961,
1.4622136354446411,
0.6075378060340881,
-0.429132878780365,
-0.9114867448806763,
-0.8963766694068909,
0.8580268025398254,
1.6861119270324707,
-0.024268552660942078,
-0.0898909643292427,
0.847834587097168,
0.6319954991340637,
-1.0890648365020752,
0.12247589230537415,
-0.690204918384552,
-0.644268810749054,
1.6965253353118896,
2.0622808933258057,
-0.0313471257686615,
-0.10852225869894028,
-0.8017114400863647,
-1.1190884113311768,
0.719552755355835,
-0.00004448555409908295,
-0.13616298139095306,
0.6149898767471313,
-0.6731709837913513,
1.1624020338058472,
0.7388626933097839,
0.9751096367835999,
0.03879094123840332,
0.3807224929332733,
0.3659331798553467,
-0.21350163221359253,
-1.2557108402252197,
-0.4045495390892029,
-1.1838290691375732,
-2.597094774246216,
0.5191015601158142,
-0.4102398157119751,
-1.4286894798278809,
0.031449832022190094,
-1.1504677534103394,
0.8956553339958191,
-0.6701996326446533,
-1.1633704900741577,
-1.494421124458313,
0.13209156692028046,
-0.04544512927532196,
0.8899039030075073,
-1.64396333694458,
-0.14495956897735596,
1.244480013847351,
0.7695584297180176,
-0.6989824175834656,
0.9191566109657288,
0.2246258705854416,
0.935155987739563,
0.7474536299705505,
-0.5058664679527283,
0.37100476026535034,
0.08095463365316391,
-1.4445620775222778,
0.5519306659698486,
1.2140122652053833,
0.22819724678993225,
1.391375184059143,
-0.3902451992034912,
0.11301499605178833,
0.5177012085914612,
-0.5823675394058228,
-0.511288583278656,
-0.48681721091270447,
0.7739707827568054,
0.13333027064800262,
-0.9032914042472839,
-0.05124033987522125,
-0.1146743893623352,
-0.20653361082077026,
0.16550081968307495,
-1.567203402519226,
-0.3282312750816345,
-0.30837687849998474,
-0.5540881752967834,
-1.3794105052947998,
-0.06033511459827423,
1.353529691696167,
-0.7536858916282654,
-0.1016930416226387,
0.5263295769691467,
0.3929445147514343,
0.6690197587013245,
0.5587121248245239,
-0.6080632209777832,
-0.2886193096637726,
-0.41324281692504883,
-0.3644905388355255,
0.24634583294391632,
1.255413293838501,
-0.15459972620010376,
-0.9048222899436951,
0.714282214641571,
-0.3612295091152191,
0.05450928211212158,
2.086611032485962,
0.16368833184242249,
-0.7277796268463135,
0.2520190477371216,
-0.6260985136032104,
1.821868658065796,
1.5742720365524292,
1.3610210418701172,
-0.0779367983341217,
-0.8683552145957947,
0.4676018953323364,
-0.26516804099082947,
-0.2686694860458374,
0.8774420619010925,
0.4789977967739105,
-0.16631340980529785,
-1.2390007972717285,
0.780936062335968,
1.2605074644088745,
-0.9574726819992065,
-0.7827405333518982,
0.1294955611228943,
-0.8633788228034973,
1.034121036529541,
0.5549411773681641,
0.5171510577201843,
0.35246413946151733,
1.6523953676223755,
0.5341367721557617,
-0.3838738799095154,
0.38709932565689087,
0.5413987040519714,
-0.21319936215877533,
-2.0482420921325684,
-1.1770167350769043,
0.4482298195362091,
-0.5164781808853149,
-1.5598214864730835,
1.3254940509796143,
-1.2018424272537231,
-0.947679340839386,
0.5258165597915649,
0.23675674200057983,
1.4926453828811646,
0.4191814959049225,
1.7674025297164917,
1.9906184673309326,
0.8486562967300415,
0.4097908139228821,
1.4053902626037598,
0.007386444136500359,
-0.5273183584213257,
1.793745994567871,
-0.4693045914173126,
0.5650028586387634,
1.1758679151535034,
-0.33695459365844727,
-1.1715502738952637,
-0.8240451216697693,
-1.1252168416976929,
-0.565366804599762,
1.2000418901443481,
0.15337979793548584,
-1.1728663444519043,
0.1343812644481659,
1.6004481315612793,
0.14449352025985718,
-0.12654562294483185,
0.5930721163749695,
0.35546213388442993,
-0.6900724768638611,
-0.02819221280515194,
-0.9967414140701294,
0.5881248116493225,
-0.26797956228256226,
-0.3015349805355072,
0.283155620098114,
0.5573902130126953,
1.2618839740753174,
-0.21430306136608124,
0.1189165860414505,
1.2225241661071777,
-1.4115651845932007,
1.384647250175476,
-0.5770649313926697,
0.17989060282707214,
-2.4888176918029785,
1.4244272708892822,
-0.7145759463310242,
1.9391883611679077,
-2.6523869037628174,
0.34292352199554443,
-0.5409761667251587,
-0.49237537384033203,
0.3202453851699829,
-0.29563218355178833,
-0.000873541459441185,
-0.145762637257576,
-0.9760789275169373,
0.03322213888168335,
-0.7896372079849243,
0.5464545488357544,
1.28689444065094,
1.2870477437973022,
-1.1661138534545898,
-0.32553330063819885,
-1.7420380115509033,
-0.20993955433368683,
-0.8189253807067871,
0.40629053115844727,
-2.072587251663208,
-0.07802901417016983,
-2.0102365016937256,
-2.457329273223877,
-1.302590012550354,
-0.8244279623031616,
1.0129809379577637,
0.09818428754806519,
-0.8901774883270264,
1.0634368658065796,
-0.26884573698043823,
-1.7931419610977173,
0.998950719833374,
-2.216487407684326
] |
https://github.com/huggingface/datasets/issues/3389 | Add EDGAR | Datasets are not tracked in this repository anymore. But you can make your own dataset in the huggingface hub | ## Adding a Dataset
- **Name:** EDGAR Database
- **Description:** https://www.sec.gov/edgar/about EDGAR, the Electronic Data Gathering, Analysis, and Retrieval system, is the primary system for companies and others submitting documents under the Securities Act of 1933, the Securities Exchange Act of 1934, the Trust Indenture Act of 1939, and the Investment Company Act of 1940. Containing millions of company and individual filings, EDGAR benefits investors, corporations, and the U.S. economy overall by increasing the efficiency, transparency, and fairness of the securities markets. The system processes about 3,000 filings per day, serves up 3,000 terabytes of data to the public annually, and accommodates 40,000 new filers per year on average. EDGAR® and EDGARLink® are registered trademarks of the SEC.
- **Data:** https://www.sec.gov/os/accessing-edgar-data
- **Motivation:** Enabling and improving FSI (Financial Services Industry) datasets to increase ease of use
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 1,073 | 19 | Add EDGAR
## Adding a Dataset
- **Name:** EDGAR Database
- **Description:** https://www.sec.gov/edgar/about EDGAR, the Electronic Data Gathering, Analysis, and Retrieval system, is the primary system for companies and others submitting documents under the Securities Act of 1933, the Securities Exchange Act of 1934, the Trust Indenture Act of 1939, and the Investment Company Act of 1940. Containing millions of company and individual filings, EDGAR benefits investors, corporations, and the U.S. economy overall by increasing the efficiency, transparency, and fairness of the securities markets. The system processes about 3,000 filings per day, serves up 3,000 terabytes of data to the public annually, and accommodates 40,000 new filers per year on average. EDGAR® and EDGARLink® are registered trademarks of the SEC.
- **Data:** https://www.sec.gov/os/accessing-edgar-data
- **Motivation:** Enabling and improving FSI (Financial Services Industry) datasets to increase ease of use
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Datasets are not tracked in this repository anymore. But you can make your own dataset in the huggingface hub | [
-1.2077478170394897,
-0.9550421237945557,
-0.7735739946365356,
1.2894179821014404,
-0.26846635341644287,
-1.3455421924591064,
0.13042087852954865,
-1.0313329696655273,
1.72036874294281,
-0.8444843888282776,
0.2506256699562073,
-1.6179885864257812,
0.059991441667079926,
-0.5555859208106995,
-0.7563208937644958,
-0.9409946203231812,
-0.43980932235717773,
-0.9300549030303955,
0.9319379925727844,
2.5387344360351562,
1.1387019157409668,
-1.4684373140335083,
2.6792824268341064,
0.6674051284790039,
-0.16366714239120483,
-0.9399758577346802,
0.4916538596153259,
0.10883522778749466,
-1.24301016330719,
-0.4930018186569214,
-0.9498497843742371,
-0.04204230010509491,
-0.5588203072547913,
-0.4113244116306305,
0.021984171122312546,
0.3111271858215332,
-0.20340090990066528,
-0.347623735666275,
-0.4879237115383148,
-0.823209285736084,
0.4876672625541687,
-0.3542310893535614,
0.9027872681617737,
-0.5120285749435425,
1.8079248666763306,
-0.5272039175033569,
0.31047168374061584,
0.6537080407142639,
1.2566684484481812,
0.21665330231189728,
-0.02949335426092148,
0.1090468093752861,
0.41943201422691345,
0.0686517059803009,
0.3664528727531433,
1.2013719081878662,
0.6825265884399414,
0.49344003200531006,
0.6506520509719849,
-2.155191659927368,
1.3736099004745483,
-1.0958527326583862,
0.3592012822628021,
1.4819104671478271,
-1.0040684938430786,
0.36766645312309265,
-1.7882519960403442,
-0.15112556517124176,
0.5306104421615601,
-2.38417649269104,
0.18743522465229034,
-1.260305404663086,
-0.5760231614112854,
0.8856319189071655,
0.26143211126327515,
-1.2730542421340942,
0.2803824245929718,
-0.5851703882217407,
1.079182744026184,
0.5404792428016663,
1.190333366394043,
-1.7838292121887207,
-0.17487119138240814,
-0.1685648411512375,
0.04562828689813614,
-1.3942673206329346,
-1.5519582033157349,
0.5870019197463989,
0.602764904499054,
0.5604295134544373,
-0.1293429285287857,
0.9234060645103455,
-1.0884432792663574,
0.9713119864463806,
-0.9721152186393738,
-1.5232059955596924,
-1.3754397630691528,
-2.3144922256469727,
-2.343557596206665,
0.903226912021637,
-0.41338592767715454,
-0.5006505846977234,
2.004218816757202,
-0.9342314004898071,
-1.6823766231536865,
1.14353609085083,
0.2708965241909027,
0.08747170865535736,
2.4200971126556396,
0.14884421229362488,
-0.7031400799751282,
0.3538460433483124,
-0.7611162662506104,
0.8875587582588196,
-0.44506457448005676,
1.3759018182754517,
0.5470570921897888,
-0.9761544466018677,
1.5430877208709717,
-0.5682669281959534,
0.5037844181060791,
-0.5164768099784851,
-0.6532289385795593,
-0.8490931391716003,
0.4394431412220001,
1.7759734392166138,
-0.30094096064567566,
1.6107146739959717,
-0.30567729473114014,
-1.6036856174468994,
-1.5243453979492188,
0.9534869194030762,
0.47734957933425903,
-0.8233888149261475,
-0.010409031063318253,
-0.3384760618209839,
0.14832189679145813,
-0.09911568462848663,
1.01033616065979,
1.1359096765518188,
0.7008051872253418,
-0.3406887650489807,
-0.8407406210899353,
0.2751423418521881,
-0.2892746329307556,
-0.750164270401001,
-1.745876669883728,
-0.3088572323322296,
0.10175814479589462,
0.6419735550880432,
-1.290547490119934,
1.7147493362426758,
0.841541588306427,
1.9954839944839478,
0.8804507851600647,
-0.3927838206291199,
1.4610241651535034,
0.0014186380431056023,
1.9080597162246704,
-0.6817178130149841,
0.7412205338478088,
-0.3414483070373535,
-1.0715383291244507,
0.9146673679351807,
-0.4449312090873718,
-2.053091526031494,
-0.6680498123168945,
-0.869704008102417,
-0.23932181298732758,
-0.7580797672271729,
0.9919193387031555,
-0.22885729372501373,
-1.423743486404419,
0.17806607484817505,
-0.6513718366622925,
0.15066958963871002,
-1.2713687419891357,
0.2996649146080017,
0.9019850492477417,
-0.6381253600120544,
-0.10829246044158936,
-0.20841851830482483,
-1.3028866052627563,
-0.5159451961517334,
0.3033766448497772,
1.9412330389022827,
-0.6065293550491333,
0.9811320900917053,
0.9226563572883606,
-0.7763323783874512,
0.03039686009287834,
0.3266150653362274,
-0.286673367023468,
0.8061742186546326,
-1.056553602218628,
-0.3967726230621338,
1.163918375968933,
-0.19006061553955078,
-0.48380619287490845,
1.4770609140396118,
0.773733913898468,
-1.0163878202438354,
-0.1484755575656891,
-0.17507362365722656,
-0.8031018376350403,
0.04375520348548889,
-1.5673160552978516,
-0.13516809046268463,
0.2744027078151703,
-1.4476203918457031,
-0.48709386587142944,
-0.2095061093568802,
1.2824236154556274,
-0.2207733541727066,
1.4433465003967285,
-0.2827582061290741,
-0.31772580742836,
-0.4050962030887604,
-0.3584049344062805,
0.1870284527540207,
-0.25043806433677673,
-0.559194803237915,
0.3262485861778259,
-0.8253292441368103,
0.2443787008523941,
1.4794315099716187,
0.41296860575675964,
0.04700285196304321,
0.5341180562973022,
1.0161316394805908,
0.30292627215385437,
-0.12245751917362213,
-0.9345012307167053,
-1.4763563871383667,
2.0684449672698975,
-1.4518159627914429,
1.8864396810531616,
0.7423290610313416,
-0.09922406077384949,
-1.7318565845489502,
-1.8708057403564453,
1.2860304117202759,
1.1517552137374878,
2.4016706943511963,
0.6036213040351868,
0.4050411581993103,
-0.8140150308609009,
-0.7103481292724609,
0.3268517553806305,
-1.0508747100830078,
-0.6734867095947266,
0.1381378322839737,
2.3641345500946045,
1.7867555618286133,
-0.6112378239631653,
-0.11452438682317734,
-1.0497934818267822,
1.3667844533920288,
-0.1834317296743393,
0.2754800319671631,
2.0016067028045654,
-0.47985631227493286,
-1.0909862518310547,
1.2681734561920166,
-2.4181318283081055,
0.11976906657218933,
1.988624930381775,
0.47593313455581665,
0.058880746364593506,
-1.4579906463623047,
-0.6778956651687622,
-0.3233814239501953,
-0.43533626198768616,
-1.227131724357605,
0.4835069179534912,
-0.30311119556427,
-0.8265681266784668,
-1.4581212997436523,
0.050485026091337204,
-1.0873017311096191,
-1.6909949779510498,
0.38418126106262207,
1.8340551853179932,
1.99593985080719,
-0.6364539861679077,
1.4966444969177246,
-0.27570676803588867,
0.03689400851726532,
1.2246705293655396,
1.237733244895935,
3.081127405166626,
1.9417835474014282,
-1.239298939704895,
0.711895227432251,
-0.11797502636909485,
-0.3966539204120636,
0.9841272830963135,
-1.054227352142334,
1.2466795444488525,
-0.1225946769118309,
-1.216126561164856,
-1.1817604303359985,
1.0575757026672363,
0.4667511582374573,
0.08568590879440308,
-0.6066141724586487,
1.2697906494140625,
-0.02191167324781418,
1.343542218208313,
0.6365532279014587,
-0.41939565539360046,
0.4587995111942291,
-0.4773300588130951,
-0.5766690373420715,
1.7604124546051025,
0.21807818114757538,
-1.4721262454986572,
-2.417308807373047,
-0.32136738300323486,
-0.8529007434844971,
-0.022288842126727104,
-0.6380463242530823,
-1.014394760131836,
1.7521151304244995,
0.4243462383747101,
-1.258862853050232,
-0.3383937478065491,
-0.40700966119766235,
-0.6521110534667969,
2.6521644592285156,
-1.476616382598877,
-0.1445864588022232,
-0.9076123237609863,
-0.5199422240257263,
1.5053038597106934,
-1.2854241132736206,
-0.06464380770921707,
-1.1056554317474365,
-0.7704095840454102,
-1.2476872205734253,
-0.5063833594322205,
-0.061353154480457306,
-0.9282894134521484,
0.8684638738632202,
0.07487513870000839,
-1.10817289352417,
-0.2802163064479828,
-0.9063074588775635,
0.7884982824325562,
-0.041061751544475555,
0.2749481201171875,
1.756558895111084,
0.42110469937324524,
-0.39994335174560547,
0.706785261631012,
1.2437310218811035,
0.7731675505638123,
-0.7513943314552307,
0.09617651253938675,
-0.7103545069694519,
0.30599403381347656,
-1.2184596061706543,
0.30390897393226624,
-2.907773494720459,
0.7073684334754944,
-0.1404598206281662,
-0.0720134899020195,
-0.040587883442640305,
-1.2844700813293457,
1.1359533071517944,
2.504640817642212,
-1.1759752035140991,
0.384202778339386,
0.35394591093063354,
1.2065702676773071,
-1.5679686069488525,
0.31912338733673096,
-0.42484965920448303,
2.1316030025482178,
0.19799193739891052,
1.1640782356262207,
-0.5883489847183228,
-2.133357524871826,
0.629583477973938,
-1.2550644874572754,
-1.0615404844284058,
0.6977543234825134,
-0.8067485094070435,
0.2265716940164566,
-1.5204293727874756,
-0.1537523865699768,
-0.8492836952209473,
-1.3040273189544678,
0.7425355911254883,
0.12237074971199036,
0.4688817262649536,
-0.5470499396324158,
0.29721635580062866,
-2.086545705795288,
-1.2828737497329712,
-0.27278417348861694,
-0.9288153052330017,
0.5067568421363831,
-0.33034810423851013,
0.6807997822761536,
-0.07424698024988174,
0.05435723811388016,
0.3155404031276703,
1.3944259881973267,
3.4526472091674805,
0.12509441375732422,
0.43357565999031067,
-0.062049586325883865,
-1.035186767578125,
1.442349910736084,
1.0353772640228271,
0.121822789311409,
-0.5922622084617615,
-0.9548231959342957,
1.3907252550125122,
1.9835522174835205,
1.11897611618042,
0.1554829478263855,
-0.7508882284164429,
-0.6494762301445007,
-0.005746020004153252,
0.29938337206840515,
0.5423350930213928,
0.8529434204101562,
-0.0377025343477726,
0.10643622279167175,
1.4619553089141846,
1.2920567989349365,
-0.35469362139701843,
0.4284520447254181,
-0.8836333155632019,
-0.4522068202495575,
0.48108232021331787,
0.32731279730796814,
0.008380218409001827,
0.5282690525054932,
-1.0551114082336426,
-0.35326266288757324,
-0.2808106541633606,
-0.9892330765724182,
-0.5844622850418091,
-0.5152365565299988,
-0.4541131556034088,
1.7311689853668213,
0.09626452624797821,
-0.4418947994709015,
-0.02670222893357277,
-0.7044803500175476,
-0.12054651975631714,
-1.226691484451294,
0.331012099981308,
-0.044902365654706955,
-0.012701533734798431,
-0.21046043932437897,
1.838630199432373,
-0.7817667722702026,
-2.1790711879730225,
0.2055509090423584,
0.3700842261314392,
-0.4587673246860504,
0.14989787340164185,
1.532596230506897,
0.4446260333061218,
1.478280782699585,
1.342105507850647,
1.010130524635315,
-0.59266597032547,
-1.3292561769485474,
0.7747777104377747,
0.9820914268493652,
-1.3729159832000732,
0.8603852987289429,
-0.06935541331768036,
-0.590032160282135,
0.8205165863037109,
1.3186513185501099,
0.3193729519844055,
-1.9904091358184814,
0.8587833046913147,
-0.8632478713989258,
0.7458603382110596,
0.5728193521499634,
0.7025051712989807,
0.2497064620256424,
0.8462485074996948,
-1.5079561471939087,
-1.1436753273010254,
-0.8391481041908264,
-0.5275081992149353,
1.9217225313186646,
-0.106871597468853,
0.5026436448097229,
-0.22829610109329224,
-1.1773390769958496,
-0.07893719524145126,
0.7023475170135498,
0.476751446723938,
-0.3159768283367157,
0.8725934028625488,
-0.7009949088096619,
-1.0594679117202759,
-1.3305907249450684,
-0.4672592282295227,
-0.9788452982902527,
-0.8601377606391907,
1.1173474788665771,
0.9230785369873047,
0.342322438955307,
1.8952994346618652,
0.5205174684524536,
0.29640430212020874,
-2.5666401386260986,
0.7852156162261963,
0.37877336144447327,
-0.05118303745985031,
0.9514663219451904,
0.20619112253189087,
1.144824504852295,
0.059781692922115326,
0.5073760747909546,
-2.432753086090088,
2.2455825805664062,
-0.21969419717788696,
0.7766122817993164,
0.06396065652370453,
-0.09260030090808868,
1.1782348155975342,
0.6492405533790588,
0.4166638255119324,
-1.1186546087265015,
0.714184582233429,
-0.6290412545204163,
1.2237614393234253,
0.9743537306785583,
-0.6996366381645203,
-0.0025268681347370148,
1.2826467752456665,
0.6025108098983765,
-0.36229854822158813,
-0.9561677575111389,
-0.7706942558288574,
0.8897388577461243,
1.766808032989502,
-0.10395972430706024,
-0.010990651324391365,
0.8276762962341309,
0.7124872803688049,
-1.2700233459472656,
0.10149791091680527,
-0.7185270190238953,
-0.7508981227874756,
1.5523087978363037,
1.957878589630127,
-0.05929029732942581,
-0.1203337013721466,
-0.6544570326805115,
-1.2699750661849976,
0.6413852572441101,
-0.042780801653862,
0.1801888644695282,
0.7297364473342896,
-0.6724672317504883,
1.0501708984375,
0.8677558302879333,
0.9000351428985596,
0.10694535076618195,
0.3753216862678528,
0.3823928236961365,
-0.395687460899353,
-1.0693953037261963,
-0.28435400128364563,
-1.1556041240692139,
-2.6446306705474854,
0.5569968223571777,
-0.3025340139865875,
-1.4741499423980713,
-0.003921470604836941,
-1.015425682067871,
0.9531456232070923,
-0.6350592374801636,
-1.1509206295013428,
-1.554602026939392,
0.2634630501270294,
-0.04329925402998924,
0.9635194540023804,
-1.6102646589279175,
-0.16325083374977112,
1.2202916145324707,
0.7073267698287964,
-0.5328913927078247,
1.015482783317566,
0.18760399520397186,
1.0387588739395142,
0.7025495171546936,
-0.4011038839817047,
0.38799023628234863,
0.1595163345336914,
-1.4429935216903687,
0.47728294134140015,
1.132332444190979,
0.1674761027097702,
1.3802727460861206,
-0.5206997394561768,
0.11283382028341293,
0.4689127802848816,
-0.4693172574043274,
-0.6245575547218323,
-0.5255434513092041,
0.7388141751289368,
-0.008765787817537785,
-1.046750545501709,
0.058964185416698456,
-0.1981201022863388,
-0.3260504901409149,
0.23701544106006622,
-1.349420189857483,
-0.32634222507476807,
-0.5297278165817261,
-0.40662941336631775,
-1.3432762622833252,
0.007041756995022297,
1.3235758543014526,
-0.7346330285072327,
-0.2019234597682953,
0.5353316068649292,
0.5168540477752686,
0.5191768407821655,
0.674171507358551,
-0.5522428750991821,
-0.3826594054698944,
-0.3351356089115143,
-0.36455395817756653,
0.26085999608039856,
1.3202184438705444,
-0.22711864113807678,
-0.984197735786438,
0.7931180000305176,
-0.39940160512924194,
0.06949762254953384,
1.989717960357666,
0.12461096048355103,
-0.7545586824417114,
0.3565748333930969,
-0.7177316546440125,
1.7929295301437378,
1.6605316400527954,
1.3133176565170288,
-0.08932332694530487,
-0.8470693230628967,
0.4554770886898041,
-0.24737033247947693,
-0.3914485275745392,
0.9018009305000305,
0.5642165541648865,
-0.17155864834785461,
-1.5129879713058472,
0.5138237476348877,
1.2728464603424072,
-0.9279789924621582,
-0.7298211455345154,
0.24721978604793549,
-0.7772135138511658,
1.0663005113601685,
0.6117163896560669,
0.49379396438598633,
0.30621182918548584,
1.6113418340682983,
0.733702540397644,
-0.4765034019947052,
0.41910862922668457,
0.5456647276878357,
-0.16495594382286072,
-2.1108391284942627,
-1.1759129762649536,
0.24082504212856293,
-0.4720076024532318,
-1.4756349325180054,
1.3347047567367554,
-1.0846341848373413,
-0.9243687987327576,
0.5173332095146179,
0.16332456469535828,
1.397128939628601,
0.3598516285419464,
1.683573603630066,
2.1023430824279785,
0.8639797568321228,
0.2466094046831131,
1.4463856220245361,
0.015382940880954266,
-0.39708051085472107,
1.8768123388290405,
-0.356101393699646,
0.5379348397254944,
1.0898979902267456,
-0.3777783513069153,
-1.0616295337677002,
-0.6993386149406433,
-1.1335641145706177,
-0.5062355399131775,
1.145350456237793,
0.11749231815338135,
-1.1019620895385742,
0.10246847569942474,
1.5062856674194336,
0.13499204814434052,
-0.25145918130874634,
0.49027687311172485,
0.4449324309825897,
-0.6862967014312744,
-0.05995388701558113,
-1.0648449659347534,
0.4306635558605194,
-0.14722809195518494,
-0.3506878614425659,
0.23965774476528168,
0.6345069408416748,
1.2657755613327026,
-0.055246204137802124,
0.18674835562705994,
1.1730855703353882,
-1.3528451919555664,
1.3977123498916626,
-0.6219233274459839,
0.22962315380573273,
-2.393374443054199,
1.3737200498580933,
-0.7396802306175232,
1.888296127319336,
-2.6354012489318848,
0.32954972982406616,
-0.5306424498558044,
-0.3842658996582031,
0.39349880814552307,
-0.45752543210983276,
0.17450106143951416,
-0.12604284286499023,
-1.0345956087112427,
-0.04940319061279297,
-0.774722695350647,
0.5308487415313721,
1.301517128944397,
1.4681397676467896,
-1.1354175806045532,
-0.35607531666755676,
-1.6767243146896362,
-0.1210135892033577,
-0.7427139282226562,
0.36092665791511536,
-2.0045275688171387,
-0.07280922681093216,
-1.8600184917449951,
-2.2505955696105957,
-1.463280200958252,
-0.9536848664283752,
1.0453429222106934,
0.10781091451644897,
-1.0086934566497803,
1.0951093435287476,
-0.3450145423412323,
-1.6954838037490845,
0.9185289144515991,
-2.242088556289673
] |
https://github.com/huggingface/datasets/issues/3385 | None batched `with_transform`, `set_transform` | Hi ! Thanks for the suggestion :)
It makes sense to me, and it can surely be implemented by wrapping the user's function to make it a batched function. However I'm not a big fan of the inconsistency it would create with `map`: `with_transform` is batched by default while `map` isn't.
Is there something you would like to contribute ? I can give you some pointers if you want | **Is your feature request related to a problem? Please describe.**
A `torch.utils.data.Dataset.__getitem__` operates on a single example.
But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform.
**Describe the solution you'd like**
Have a `batched=True` argument in `Datasets.with_transform`
**Describe alternatives you've considered**
* Convert a non-batched transform function to batched one myself.
* Wrap a 🤗 Dataset with torch Dataset, and add a `__getitem__`. 🙄
* Have `lazy=False` in `Dataset.map`, and returns a `LazyDataset` if `lazy=True`. This way the same `map` interface can be used, and existing code can be updated with one argument change. | 1,074 | 69 | None batched `with_transform`, `set_transform`
**Is your feature request related to a problem? Please describe.**
A `torch.utils.data.Dataset.__getitem__` operates on a single example.
But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform.
**Describe the solution you'd like**
Have a `batched=True` argument in `Datasets.with_transform`
**Describe alternatives you've considered**
* Convert a non-batched transform function to batched one myself.
* Wrap a 🤗 Dataset with torch Dataset, and add a `__getitem__`. 🙄
* Have `lazy=False` in `Dataset.map`, and returns a `LazyDataset` if `lazy=True`. This way the same `map` interface can be used, and existing code can be updated with one argument change.
Hi ! Thanks for the suggestion :)
It makes sense to me, and it can surely be implemented by wrapping the user's function to make it a batched function. However I'm not a big fan of the inconsistency it would create with `map`: `with_transform` is batched by default while `map` isn't.
Is there something you would like to contribute ? I can give you some pointers if you want | [
-1.1033686399459839,
-1.0001338720321655,
-0.669219970703125,
1.4104560613632202,
-0.12484878301620483,
-1.338777780532837,
0.29764583706855774,
-1.1250741481781006,
1.8794485330581665,
-0.9009382128715515,
0.3627007007598877,
-1.6248337030410767,
0.06132473051548004,
-0.5959259867668152,
-0.8676162362098694,
-0.7878777980804443,
-0.3715846538543701,
-0.7396268844604492,
0.9230068325996399,
2.4352095127105713,
1.0358874797821045,
-1.375392198562622,
2.6309375762939453,
0.7180385589599609,
-0.19966208934783936,
-0.9958489537239075,
0.36858639121055603,
-0.03006868064403534,
-1.1514525413513184,
-0.4819570779800415,
-0.8421794176101685,
-0.053475841879844666,
-0.6396262049674988,
-0.6359525918960571,
-0.0049916463904082775,
0.43778103590011597,
-0.28210005164146423,
-0.487649530172348,
-0.475572407245636,
-0.8453300595283508,
0.4723919630050659,
-0.46263059973716736,
1.0128834247589111,
-0.41226547956466675,
1.8535804748535156,
-0.5765812397003174,
0.5159791707992554,
0.7918295860290527,
1.393385648727417,
0.18690712749958038,
-0.0723000317811966,
0.2563857138156891,
0.4251736104488373,
-0.016893763095140457,
0.4654161036014557,
1.1267701387405396,
0.5871840715408325,
0.5658630132675171,
0.6543136239051819,
-2.3330025672912598,
1.4175167083740234,
-1.123396396636963,
0.3762739598751068,
1.2830994129180908,
-0.8446046113967896,
0.2969663143157959,
-1.7568130493164062,
0.015400359407067299,
0.5901762843132019,
-2.3057727813720703,
0.2692784368991852,
-1.3461298942565918,
-0.5286978483200073,
1.000311255455017,
0.27077364921569824,
-1.2770613431930542,
0.1936362385749817,
-0.25004443526268005,
1.0150173902511597,
0.46597427129745483,
0.9461439847946167,
-1.8485100269317627,
-0.12444280833005905,
-0.33865422010421753,
0.1674194484949112,
-1.3226269483566284,
-1.5126038789749146,
0.5490952730178833,
0.6478592753410339,
0.5233086347579956,
-0.17429421842098236,
1.0270965099334717,
-1.1315737962722778,
0.8376556634902954,
-1.0600831508636475,
-1.6877578496932983,
-1.3352398872375488,
-2.1486191749572754,
-2.2975213527679443,
0.7198049426078796,
-0.35988491773605347,
-0.41078290343284607,
1.926639199256897,
-1.0320419073104858,
-1.7219810485839844,
1.2436190843582153,
0.21236176788806915,
-0.019967347383499146,
2.25931715965271,
0.22119221091270447,
-0.6493937373161316,
0.3735504150390625,
-0.8419151902198792,
0.7804664373397827,
-0.5482478141784668,
1.378917932510376,
0.41934362053871155,
-0.9937416911125183,
1.6022074222564697,
-0.49790748953819275,
0.5924957394599915,
-0.730495810508728,
-0.5618730187416077,
-0.8272638916969299,
0.4730158746242523,
1.8222750425338745,
-0.2831076681613922,
1.4772288799285889,
-0.37275123596191406,
-1.5307079553604126,
-1.6086829900741577,
0.9227028489112854,
0.4442873001098633,
-0.7385390996932983,
0.01271899975836277,
-0.3677060306072235,
0.19469697773456573,
-0.1505843997001648,
1.1906805038452148,
1.1779173612594604,
0.8512360453605652,
-0.30558305978775024,
-0.8151847124099731,
0.2769215703010559,
-0.0737912729382515,
-0.7424258589744568,
-1.8092689514160156,
-0.4029639959335327,
0.13930994272232056,
0.5862492322921753,
-1.127664566040039,
1.7543479204177856,
0.8314039707183838,
1.9883439540863037,
0.9317620992660522,
-0.2979932725429535,
1.488395094871521,
0.038872428238391876,
1.974893569946289,
-0.45901575684547424,
0.7020223140716553,
-0.3727912902832031,
-1.0251550674438477,
0.8007498383522034,
-0.36760273575782776,
-2.061415433883667,
-0.6530179381370544,
-0.9014750719070435,
-0.20408415794372559,
-0.8050177693367004,
0.830565333366394,
-0.3040219843387604,
-1.478859305381775,
0.22164970636367798,
-0.6566725969314575,
0.07433856278657913,
-1.152662754058838,
0.3355044722557068,
0.7680217623710632,
-0.5497426390647888,
0.07141668349504471,
-0.19906574487686157,
-1.299792766571045,
-0.5159131288528442,
0.27767622470855713,
1.9769479036331177,
-0.7112472057342529,
0.8502637147903442,
1.0007579326629639,
-0.6606458425521851,
-0.05787026882171631,
0.36765429377555847,
-0.30571165680885315,
0.7254573106765747,
-1.1127625703811646,
-0.3846237361431122,
1.129433274269104,
-0.13896875083446503,
-0.5262362360954285,
1.5326504707336426,
0.7107668519020081,
-1.0016026496887207,
-0.13086368143558502,
-0.2604035437107086,
-0.7182073593139648,
0.09936162829399109,
-1.6351239681243896,
-0.02685784548521042,
0.3919667899608612,
-1.4507893323898315,
-0.4951815605163574,
-0.1439170092344284,
1.230134129524231,
-0.18079496920108795,
1.26888906955719,
-0.37893977761268616,
-0.2667814791202545,
-0.37030065059661865,
-0.43261653184890747,
0.14484097063541412,
-0.26697421073913574,
-0.685496985912323,
0.18627920746803284,
-0.6875544786453247,
0.45671704411506653,
1.4410854578018188,
0.27376145124435425,
-0.0008674114942550659,
0.5244342684745789,
1.1006568670272827,
0.2145644873380661,
0.0444212406873703,
-0.8881237506866455,
-1.5666563510894775,
1.9720104932785034,
-1.4849424362182617,
1.9987883567810059,
0.6825441122055054,
0.0019598323851823807,
-1.768792986869812,
-1.8377861976623535,
1.3064463138580322,
1.1208335161209106,
2.2712318897247314,
0.6211295127868652,
0.3251519799232483,
-0.8476108908653259,
-0.6047455668449402,
0.3214978575706482,
-1.055741310119629,
-0.7100012898445129,
0.17771942913532257,
2.3181326389312744,
1.7701019048690796,
-0.487206369638443,
-0.22672145068645477,
-1.0654549598693848,
1.491241455078125,
-0.17103467881679535,
0.29655978083610535,
2.0183448791503906,
-0.315626323223114,
-1.1319999694824219,
1.2999670505523682,
-2.3424363136291504,
0.17510804533958435,
1.9623417854309082,
0.27011820673942566,
0.12226656824350357,
-1.3603713512420654,
-0.5575674176216125,
-0.32931751012802124,
-0.3171982765197754,
-1.2665667533874512,
0.4352726936340332,
-0.27945467829704285,
-0.7485572099685669,
-1.422896146774292,
0.3076910376548767,
-1.0349119901657104,
-1.6024892330169678,
0.2542022466659546,
1.897033452987671,
1.9378468990325928,
-0.7098029255867004,
1.5993802547454834,
-0.3504813313484192,
0.3091786205768585,
1.2558320760726929,
1.1544376611709595,
3.1288483142852783,
1.8889185190200806,
-1.1805089712142944,
0.6590690016746521,
-0.18877936899662018,
-0.5072417855262756,
1.1208531856536865,
-1.178184151649475,
1.2121307849884033,
-0.20914226770401,
-1.0455684661865234,
-1.2802047729492188,
0.9219761490821838,
0.5304639935493469,
0.08780013769865036,
-0.49663829803466797,
1.2255710363388062,
0.05842345952987671,
1.4554373025894165,
0.5844705700874329,
-0.3437052369117737,
0.6403480172157288,
-0.4248517155647278,
-0.495719313621521,
1.5340290069580078,
0.323332279920578,
-1.2989624738693237,
-2.3571553230285645,
-0.17542685568332672,
-0.8388493061065674,
0.08074910938739777,
-0.5199388265609741,
-0.9412250518798828,
1.6766576766967773,
0.4356316030025482,
-1.2931766510009766,
-0.1969633549451828,
-0.3651420474052429,
-0.6106281280517578,
2.745795965194702,
-1.3827533721923828,
-0.288237988948822,
-0.9762729406356812,
-0.5844288468360901,
1.6217041015625,
-1.3298602104187012,
-0.2591233551502228,
-0.9554380178451538,
-0.5158909559249878,
-1.2047337293624878,
-0.5948394536972046,
-0.05966457724571228,
-0.8522665500640869,
0.9363940954208374,
0.27170082926750183,
-1.148450255393982,
-0.4623238742351532,
-0.9275273680686951,
0.8263689279556274,
-0.14575502276420593,
0.2853931784629822,
1.8016767501831055,
0.36693331599235535,
-0.3104579448699951,
0.7501010298728943,
1.0984420776367188,
0.5887409448623657,
-0.6382767558097839,
0.32545116543769836,
-0.659572422504425,
0.27717334032058716,
-1.2440842390060425,
0.3529141843318939,
-2.8666207790374756,
0.5773086547851562,
-0.01840844564139843,
-0.06495609134435654,
-0.09230566024780273,
-1.4438427686691284,
1.0634297132492065,
2.5668678283691406,
-1.1800997257232666,
0.4928028881549835,
0.22866655886173248,
1.24759042263031,
-1.5681676864624023,
0.29014483094215393,
-0.33370572328567505,
2.1286747455596924,
0.24543717503547668,
1.179352045059204,
-0.4693509638309479,
-2.32169246673584,
0.5784153938293457,
-1.2347592115402222,
-1.2782776355743408,
0.7050911784172058,
-0.8568373322486877,
0.02112206630408764,
-1.413864016532898,
-0.27876242995262146,
-0.9105211496353149,
-1.2582060098648071,
0.7848891019821167,
0.14738935232162476,
0.4926352798938751,
-0.6976610422134399,
0.41930392384529114,
-2.147810459136963,
-1.367992639541626,
-0.2673777937889099,
-0.95194011926651,
0.4810331463813782,
-0.28365010023117065,
0.7189069986343384,
-0.19067886471748352,
0.022161824628710747,
0.4309244751930237,
1.5122230052947998,
3.4358439445495605,
0.2565799057483673,
0.4307437539100647,
-0.20402202010154724,
-0.8627922534942627,
1.285409927368164,
0.9249662756919861,
-0.037075042724609375,
-0.5074782371520996,
-1.0576317310333252,
1.2624999284744263,
1.9540935754776,
0.9327555894851685,
0.030338691547513008,
-0.7300002574920654,
-0.680124044418335,
-0.030301587656140327,
0.1671447455883026,
0.3876507878303528,
0.8484291434288025,
0.25439488887786865,
0.08138776570558548,
1.345582365989685,
1.2318168878555298,
-0.48575225472450256,
0.47962474822998047,
-0.7667596936225891,
-0.4384702742099762,
0.5446893572807312,
0.34730982780456543,
-0.032305486500263214,
0.192511186003685,
-0.9845632910728455,
-0.21369560062885284,
-0.42204809188842773,
-0.945356547832489,
-0.7233425974845886,
-0.5595809817314148,
-0.34896647930145264,
1.7399758100509644,
0.1258390247821808,
-0.4705105721950531,
-0.08985640853643417,
-0.6929426193237305,
-0.020846208557486534,
-1.0690785646438599,
0.292157381772995,
-0.09710527956485748,
-0.12228812277317047,
-0.156603142619133,
1.782485842704773,
-0.8112444281578064,
-1.9060784578323364,
0.2727126479148865,
0.251342236995697,
-0.42783254384994507,
0.22269488871097565,
1.6768407821655273,
0.47012972831726074,
1.5006214380264282,
1.410870909690857,
0.9610201716423035,
-0.6617864370346069,
-1.2984861135482788,
0.5818941593170166,
0.8702182173728943,
-1.4405022859573364,
0.7186955809593201,
0.26579922437667847,
-0.4452653229236603,
0.7317370772361755,
1.290613055229187,
0.4141460061073303,
-2.000603675842285,
0.7167189717292786,
-1.020011305809021,
0.8484008312225342,
0.7774782776832581,
0.7260553240776062,
0.2714756429195404,
0.8831489682197571,
-1.1642180681228638,
-1.161963939666748,
-0.8792259097099304,
-0.6370010375976562,
2.029791831970215,
-0.2696658670902252,
0.6230714321136475,
-0.02624332346022129,
-1.3768761157989502,
-0.11314895749092102,
0.7716186046600342,
0.5425382852554321,
-0.434820294380188,
0.7041012644767761,
-0.6994280219078064,
-1.0266424417495728,
-1.3955812454223633,
-0.4618172347545624,
-1.1639461517333984,
-1.0321478843688965,
0.9625383615493774,
0.9000645279884338,
0.3398153483867645,
1.8727805614471436,
0.7430459856987,
0.31386834383010864,
-2.5718042850494385,
0.7984223365783691,
0.32903915643692017,
-0.1123916506767273,
0.8475902080535889,
0.3940070569515228,
0.9418156147003174,
-0.040077097713947296,
0.5472138524055481,
-2.5058603286743164,
2.2694997787475586,
-0.2803618311882019,
0.7243379950523376,
-0.08131874352693558,
-0.22048789262771606,
1.1881301403045654,
0.5364946126937866,
0.44053781032562256,
-1.1006581783294678,
0.6520252823829651,
-0.6464428305625916,
1.312934160232544,
0.817658543586731,
-0.7976364493370056,
-0.14502578973770142,
1.2962822914123535,
0.42293593287467957,
-0.5621035099029541,
-0.9147655367851257,
-1.119337558746338,
0.8378041386604309,
1.7154169082641602,
-0.19678404927253723,
-0.13180723786354065,
0.8661655187606812,
0.7623535990715027,
-1.195393443107605,
0.11757039278745651,
-0.7695136666297913,
-0.8429251909255981,
1.6401269435882568,
2.0311694145202637,
-0.16339313983917236,
-0.10806745290756226,
-0.7303729057312012,
-1.133185863494873,
0.7624732255935669,
0.06374546885490417,
0.02344338409602642,
0.5586739182472229,
-0.607970654964447,
1.075834035873413,
0.9566799402236938,
0.8685611486434937,
0.20232373476028442,
0.33606353402137756,
0.36120834946632385,
-0.4544428586959839,
-1.1654460430145264,
-0.2769359350204468,
-1.2058566808700562,
-2.632452964782715,
0.5536615252494812,
-0.3084671199321747,
-1.4139641523361206,
-0.023405440151691437,
-0.9593408703804016,
0.9405287504196167,
-0.5867092609405518,
-1.1429946422576904,
-1.4825438261032104,
0.22964659333229065,
0.013872768729925156,
0.9367577433586121,
-1.6046746969223022,
-0.007636144291609526,
1.243428111076355,
0.9242874979972839,
-0.6930973529815674,
0.9756134748458862,
0.29801514744758606,
1.088060736656189,
0.8872469067573547,
-0.4405765235424042,
0.45072412490844727,
0.06881462037563324,
-1.3391613960266113,
0.5488209128379822,
1.1683322191238403,
0.1586892455816269,
1.494753122329712,
-0.573348343372345,
0.1285758763551712,
0.3647245168685913,
-0.5871564149856567,
-0.38695669174194336,
-0.6585819125175476,
0.8323605060577393,
0.02665894292294979,
-0.8245536684989929,
0.15317831933498383,
-0.047371432185173035,
-0.13342639803886414,
0.15947295725345612,
-1.5430995225906372,
-0.22550271451473236,
-0.334072083234787,
-0.5498637557029724,
-1.199126124382019,
-0.1567797213792801,
1.3555659055709839,
-0.6343165636062622,
-0.16587351262569427,
0.5149968862533569,
0.5228240489959717,
0.595458984375,
0.6592512130737305,
-0.6346325874328613,
-0.4110555946826935,
-0.31957969069480896,
-0.3280589282512665,
0.3741101324558258,
1.4465752840042114,
-0.14778022468090057,
-0.9565253853797913,
0.6860572695732117,
-0.4535145163536072,
0.014088224619626999,
1.886447787284851,
0.1378776729106903,
-0.8171808123588562,
0.3090458810329437,
-0.8153660297393799,
1.9364928007125854,
1.819586157798767,
1.2363896369934082,
0.016248458996415138,
-0.9926548004150391,
0.5697590112686157,
-0.39575740694999695,
-0.40874674916267395,
0.9183942675590515,
0.5161357522010803,
-0.2439764440059662,
-1.322736144065857,
0.6567009091377258,
1.2653827667236328,
-0.8694393634796143,
-1.0241590738296509,
0.09622658789157867,
-0.6219320297241211,
1.1614245176315308,
0.6780836582183838,
0.40886610746383667,
0.3527950346469879,
1.7196383476257324,
0.7336832880973816,
-0.42634111642837524,
0.6988810300827026,
0.4339759349822998,
-0.23605240881443024,
-2.196948528289795,
-1.3110151290893555,
0.37083834409713745,
-0.5152302980422974,
-1.5948351621627808,
1.4199951887130737,
-1.043715476989746,
-0.8949192762374878,
0.6110806465148926,
0.14739541709423065,
1.4605863094329834,
0.3865804672241211,
1.567977786064148,
2.1293253898620605,
0.7129079103469849,
0.355068176984787,
1.3970844745635986,
-0.18145281076431274,
-0.5943693518638611,
1.875161051750183,
-0.5680190324783325,
0.46344467997550964,
1.144208312034607,
-0.24316401779651642,
-1.1032335758209229,
-0.8047559857368469,
-1.197318196296692,
-0.726243257522583,
1.146341323852539,
0.06138516217470169,
-1.1650155782699585,
0.26143425703048706,
1.700480341911316,
0.03995203971862793,
-0.3479301631450653,
0.5749426484107971,
0.32456761598587036,
-0.7238361239433289,
-0.051933541893959045,
-0.9728910326957703,
0.4463960826396942,
-0.2365351915359497,
-0.3268480896949768,
0.40096089243888855,
0.5393105149269104,
1.17934250831604,
-0.05580728501081467,
0.04670356214046478,
1.1640199422836304,
-1.4455721378326416,
1.387515902519226,
-0.6331844925880432,
0.31310397386550903,
-2.3721771240234375,
1.3306728601455688,
-0.7760759592056274,
1.9133281707763672,
-2.68013596534729,
0.37866833806037903,
-0.5291450023651123,
-0.48028409481048584,
0.3793039619922638,
-0.30775144696235657,
0.16862709820270538,
-0.17276883125305176,
-1.2568846940994263,
-0.025626562535762787,
-0.794098973274231,
0.5789675712585449,
1.0041961669921875,
1.3783824443817139,
-1.1057102680206299,
-0.28342267870903015,
-1.7317593097686768,
-0.01838989555835724,
-0.6982346177101135,
0.4280547499656677,
-1.9843809604644775,
-0.17873236536979675,
-1.9330790042877197,
-2.196497917175293,
-1.3986327648162842,
-0.7684239745140076,
1.0652897357940674,
0.007738972082734108,
-0.8300878405570984,
1.0336875915527344,
-0.3805338740348816,
-1.9038885831832886,
1.0093162059783936,
-2.1389429569244385
] |
https://github.com/huggingface/datasets/issues/3385 | None batched `with_transform`, `set_transform` | Hi @lhoestq ,
Sorry I missed your reply.
I would love to contribute. But I don't know which solution would be the best for this repo.
> However I'm not a big fan of the inconsistency it would create with map: with_transform is batched by default while map isn't.
I agree. What do you think about the alternative solutions?
> * Convert a non-batched transform function to batched one myself.
This won't be able to use torch loader multi-worker.
> * Wrap a 🤗 Dataset with torch Dataset, and add a __getitem__. 🙄
This is actually pretty simple.
```python
import torch
class LazyMapTorchDataset(torch.utils.data.Dataset):
def __init__(self, ds, fn):
self.ds = ds
self.fn = fn
def __getitem__(self, i):
return self.fn(self.ds[i])
d = [{1:2, 2:3}, {1:3, 2:4}]
ds = LazyMapTorchDataset(d, lambda x:{k:v*2 for k,v in x.items()})
for i in range(2):
print(f'before {d[i]}')
print(f'after {ds[i]}')
```
```
before {1: 2, 2: 3}
after {1: 4, 2: 6}
before {1: 3, 2: 4}
after {1: 6, 2: 8}
```
But this requires converting data to torch tensor myself. And this is really similar to `.map()`, why not just use it? So I have the next solution.
> * Have lazy=False in Dataset.map, and returns a LazyDataset if lazy=True. This way the same map interface can be used, and existing code can be updated with one argument change.
I think I like this solution best. Because `.with_transform` is entangled with `.with_format`, so seems more flexible to modify the `.map` than to modify `.with_transform`.
The usage looks nice, too.
```python
# lazy, one to one, can be parallelized via torch loader, no need to set `num_worker` beforehand.
dataset = dataset.map(fn, lazy=True, batched=False)
# collate_fn
dataloader = Dataloader(dataset.with_format('torch'), collate_fn=collate_fn, num_workers=...)
```
There are some minor decisions like whether a lazy map should be allowed before another map, but I think we can work it out later. The implementation can probably borrow from `IterableDataset`. | **Is your feature request related to a problem? Please describe.**
A `torch.utils.data.Dataset.__getitem__` operates on a single example.
But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform.
**Describe the solution you'd like**
Have a `batched=True` argument in `Datasets.with_transform`
**Describe alternatives you've considered**
* Convert a non-batched transform function to batched one myself.
* Wrap a 🤗 Dataset with torch Dataset, and add a `__getitem__`. 🙄
* Have `lazy=False` in `Dataset.map`, and returns a `LazyDataset` if `lazy=True`. This way the same `map` interface can be used, and existing code can be updated with one argument change. | 1,074 | 315 | None batched `with_transform`, `set_transform`
**Is your feature request related to a problem? Please describe.**
A `torch.utils.data.Dataset.__getitem__` operates on a single example.
But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform.
**Describe the solution you'd like**
Have a `batched=True` argument in `Datasets.with_transform`
**Describe alternatives you've considered**
* Convert a non-batched transform function to batched one myself.
* Wrap a 🤗 Dataset with torch Dataset, and add a `__getitem__`. 🙄
* Have `lazy=False` in `Dataset.map`, and returns a `LazyDataset` if `lazy=True`. This way the same `map` interface can be used, and existing code can be updated with one argument change.
Hi @lhoestq ,
Sorry I missed your reply.
I would love to contribute. But I don't know which solution would be the best for this repo.
> However I'm not a big fan of the inconsistency it would create with map: with_transform is batched by default while map isn't.
I agree. What do you think about the alternative solutions?
> * Convert a non-batched transform function to batched one myself.
This won't be able to use torch loader multi-worker.
> * Wrap a 🤗 Dataset with torch Dataset, and add a __getitem__. 🙄
This is actually pretty simple.
```python
import torch
class LazyMapTorchDataset(torch.utils.data.Dataset):
def __init__(self, ds, fn):
self.ds = ds
self.fn = fn
def __getitem__(self, i):
return self.fn(self.ds[i])
d = [{1:2, 2:3}, {1:3, 2:4}]
ds = LazyMapTorchDataset(d, lambda x:{k:v*2 for k,v in x.items()})
for i in range(2):
print(f'before {d[i]}')
print(f'after {ds[i]}')
```
```
before {1: 2, 2: 3}
after {1: 4, 2: 6}
before {1: 3, 2: 4}
after {1: 6, 2: 8}
```
But this requires converting data to torch tensor myself. And this is really similar to `.map()`, why not just use it? So I have the next solution.
> * Have lazy=False in Dataset.map, and returns a LazyDataset if lazy=True. This way the same map interface can be used, and existing code can be updated with one argument change.
I think I like this solution best. Because `.with_transform` is entangled with `.with_format`, so seems more flexible to modify the `.map` than to modify `.with_transform`.
The usage looks nice, too.
```python
# lazy, one to one, can be parallelized via torch loader, no need to set `num_worker` beforehand.
dataset = dataset.map(fn, lazy=True, batched=False)
# collate_fn
dataloader = Dataloader(dataset.with_format('torch'), collate_fn=collate_fn, num_workers=...)
```
There are some minor decisions like whether a lazy map should be allowed before another map, but I think we can work it out later. The implementation can probably borrow from `IterableDataset`. | [
-1.2224578857421875,
-1.0069317817687988,
-0.6257153153419495,
1.4063854217529297,
-0.2223486453294754,
-1.2463562488555908,
0.2866649031639099,
-1.1265571117401123,
1.7372732162475586,
-0.7795506119728088,
0.3066904544830322,
-1.6124134063720703,
0.0645739734172821,
-0.5863470435142517,
-0.8215232491493225,
-0.8185753226280212,
-0.41059988737106323,
-0.7774686217308044,
1.0031390190124512,
2.461702823638916,
1.0833754539489746,
-1.4118666648864746,
2.665799140930176,
0.739978551864624,
-0.2078782171010971,
-1.0601935386657715,
0.4706442654132843,
-0.014544794335961342,
-1.2374471426010132,
-0.44057613611221313,
-0.921136736869812,
-0.047655947506427765,
-0.6096919178962708,
-0.5358275175094604,
-0.03307170048356056,
0.42200055718421936,
-0.2306784689426422,
-0.4659325182437897,
-0.5129685997962952,
-0.7839424014091492,
0.5087616443634033,
-0.4162150025367737,
0.9745405912399292,
-0.3124299645423889,
1.7333396673202515,
-0.5772208571434021,
0.5550998449325562,
0.7793554663658142,
1.3682098388671875,
0.18913093209266663,
-0.056840844452381134,
0.34287431836128235,
0.4297613203525543,
0.009008978493511677,
0.44453495740890503,
1.1546685695648193,
0.6541880965232849,
0.49614813923835754,
0.6555251479148865,
-2.269707679748535,
1.3396384716033936,
-1.109413981437683,
0.42374473810195923,
1.3350950479507446,
-0.8889118432998657,
0.3999469578266144,
-1.7336667776107788,
-0.020538806915283203,
0.6663938164710999,
-2.23944091796875,
0.2767643630504608,
-1.3611102104187012,
-0.5500726103782654,
1.010520339012146,
0.3551531434059143,
-1.2391612529754639,
0.1872471421957016,
-0.3865305781364441,
0.9988689422607422,
0.4179111421108246,
1.0147844552993774,
-1.753904938697815,
-0.05412055924534798,
-0.31278717517852783,
0.14934973418712616,
-1.271654725074768,
-1.5218602418899536,
0.5900021195411682,
0.6773506999015808,
0.5132744312286377,
-0.1821560561656952,
1.0470938682556152,
-1.1224887371063232,
0.8314043283462524,
-1.0695234537124634,
-1.7054778337478638,
-1.4218050241470337,
-2.2338621616363525,
-2.2728772163391113,
0.7196731567382812,
-0.38250812888145447,
-0.41233962774276733,
2.0062742233276367,
-1.0075469017028809,
-1.6579043865203857,
1.1836272478103638,
0.20547273755073547,
0.045479994267225266,
2.3196933269500732,
0.1901720017194748,
-0.712901771068573,
0.4860323667526245,
-0.9031888246536255,
0.7764939665794373,
-0.41249018907546997,
1.3755100965499878,
0.4122285842895508,
-0.9581738114356995,
1.5688872337341309,
-0.381512314081192,
0.5623682141304016,
-0.6499003767967224,
-0.5617546439170837,
-0.736705482006073,
0.4045379161834717,
1.8573020696640015,
-0.2637120187282562,
1.5056934356689453,
-0.3669707179069519,
-1.5790507793426514,
-1.5476572513580322,
0.8893853425979614,
0.4649355113506317,
-0.7804546356201172,
0.05002588778734207,
-0.4647936522960663,
0.1605975478887558,
-0.11262260377407074,
1.204158902168274,
1.2684811353683472,
0.8057209849357605,
-0.36420679092407227,
-0.8585063219070435,
0.19400137662887573,
-0.10577373951673508,
-0.7677555084228516,
-1.8001734018325806,
-0.3468233346939087,
0.0746406763792038,
0.6338215470314026,
-1.1359256505966187,
1.7468547821044922,
0.8319445848464966,
1.954232096672058,
0.9946081638336182,
-0.3431195616722107,
1.4836368560791016,
0.06442955136299133,
1.873076319694519,
-0.5215559601783752,
0.6809964776039124,
-0.4007468819618225,
-1.0476852655410767,
0.8401740193367004,
-0.3378380537033081,
-2.067317485809326,
-0.6313119530677795,
-0.8170181512832642,
-0.22760169208049774,
-0.8175400495529175,
0.8860672116279602,
-0.30997419357299805,
-1.483315348625183,
0.2849901020526886,
-0.7191125154495239,
0.09739024937152863,
-1.1225943565368652,
0.29698336124420166,
0.765227198600769,
-0.5727362632751465,
0.06843438744544983,
-0.22020448744297028,
-1.284428596496582,
-0.46932196617126465,
0.3392513394355774,
1.8484807014465332,
-0.7302246689796448,
0.8975852131843567,
1.0241860151290894,
-0.6067688465118408,
0.002498963847756386,
0.3400140702724457,
-0.280993789434433,
0.7631981372833252,
-1.0792911052703857,
-0.41170838475227356,
1.1460084915161133,
-0.19663622975349426,
-0.4649284780025482,
1.4908251762390137,
0.645753800868988,
-0.9942129254341125,
-0.2676657438278198,
-0.14145588874816895,
-0.8084908127784729,
0.07886649668216705,
-1.6331571340560913,
-0.07185574620962143,
0.4743802845478058,
-1.5998104810714722,
-0.44773247838020325,
-0.1515994817018509,
1.2852853536605835,
-0.12631049752235413,
1.3508447408676147,
-0.3566386103630066,
-0.14532822370529175,
-0.3738972842693329,
-0.3821675777435303,
0.1892087161540985,
-0.26194554567337036,
-0.6106240749359131,
0.19631190598011017,
-0.7952785491943359,
0.4554789960384369,
1.4242875576019287,
0.252654492855072,
-0.01758064143359661,
0.5047098994255066,
1.0799022912979126,
0.32309573888778687,
-0.01656247116625309,
-0.8535969853401184,
-1.5396702289581299,
1.9739583730697632,
-1.4879004955291748,
1.9550909996032715,
0.7487152218818665,
-0.04932398349046707,
-1.8209636211395264,
-1.8866277933120728,
1.3454382419586182,
1.0852729082107544,
2.302250862121582,
0.5350948572158813,
0.3713448643684387,
-0.8189746141433716,
-0.5978842973709106,
0.3144920766353607,
-1.0667965412139893,
-0.7136170268058777,
0.1737915575504303,
2.4146111011505127,
1.7740775346755981,
-0.5114621520042419,
-0.2368413507938385,
-1.0158545970916748,
1.505933403968811,
-0.15404140949249268,
0.27210500836372375,
2.06714129447937,
-0.2721031904220581,
-1.0778433084487915,
1.3489971160888672,
-2.3618247509002686,
0.19370634853839874,
2.0047669410705566,
0.26390641927719116,
0.1554364562034607,
-1.377666711807251,
-0.5268681049346924,
-0.3025819957256317,
-0.46028926968574524,
-1.2313915491104126,
0.5144553780555725,
-0.23016610741615295,
-0.7950349450111389,
-1.4419755935668945,
0.20766903460025787,
-1.0855562686920166,
-1.6724563837051392,
0.24749571084976196,
1.8735487461090088,
2.0400185585021973,
-0.7828904390335083,
1.578000545501709,
-0.3916949927806854,
0.24835923314094543,
1.2205524444580078,
1.1411818265914917,
3.079754590988159,
1.913540244102478,
-1.200818657875061,
0.643589437007904,
-0.2062385380268097,
-0.4629352390766144,
1.036909580230713,
-1.216484785079956,
1.251977562904358,
-0.18582965433597565,
-1.1154171228408813,
-1.2325772047042847,
1.0246522426605225,
0.495868057012558,
0.04948524013161659,
-0.4751393795013428,
1.1958636045455933,
0.08169405162334442,
1.3840469121932983,
0.546456515789032,
-0.2810162603855133,
0.6499057412147522,
-0.440343976020813,
-0.5135563015937805,
1.5075042247772217,
0.2953912913799286,
-1.3911088705062866,
-2.3116135597229004,
-0.2063833326101303,
-0.8744500279426575,
0.0509348101913929,
-0.5521965622901917,
-0.9471585154533386,
1.6359161138534546,
0.38493141531944275,
-1.2957656383514404,
-0.1776987612247467,
-0.346626341342926,
-0.5505037903785706,
2.694256544113159,
-1.3737634420394897,
-0.240951269865036,
-0.9472224712371826,
-0.6139875650405884,
1.625185251235962,
-1.2808938026428223,
-0.2197411209344864,
-1.0107120275497437,
-0.5724319815635681,
-1.169742465019226,
-0.5666629076004028,
0.01707448437809944,
-0.9341647624969482,
0.821447491645813,
0.16523587703704834,
-1.1028870344161987,
-0.3918888568878174,
-0.8939782381057739,
0.9198670387268066,
-0.09421946108341217,
0.21458138525485992,
1.842577576637268,
0.24217474460601807,
-0.2884689271450043,
0.7650519013404846,
1.1303991079330444,
0.5967793464660645,
-0.6572943329811096,
0.19076985120773315,
-0.650432825088501,
0.354489803314209,
-1.2606308460235596,
0.318081259727478,
-2.8456499576568604,
0.6438078284263611,
0.07139081507921219,
-0.02143070101737976,
-0.09292198717594147,
-1.4472814798355103,
1.1084471940994263,
2.57438588142395,
-1.1656707525253296,
0.5147038698196411,
0.3127387762069702,
1.170957326889038,
-1.5482087135314941,
0.3214080333709717,
-0.4001573324203491,
2.1684939861297607,
0.24496397376060486,
1.1812413930892944,
-0.4336773455142975,
-2.3545773029327393,
0.6315006613731384,
-1.2296278476715088,
-1.2219728231430054,
0.698655366897583,
-0.8979641199111938,
0.09113308787345886,
-1.4777166843414307,
-0.2794671058654785,
-0.9010013341903687,
-1.2070295810699463,
0.6921207308769226,
0.17628274857997894,
0.43275049328804016,
-0.6796594858169556,
0.36206865310668945,
-2.2389700412750244,
-1.3757262229919434,
-0.21236871182918549,
-0.9330458045005798,
0.4780288636684418,
-0.33973228931427,
0.7102074027061462,
-0.16814415156841278,
0.0026442157104611397,
0.3599715828895569,
1.451407551765442,
3.456709861755371,
0.14452877640724182,
0.33043190836906433,
-0.21199791133403778,
-0.8992796540260315,
1.3387302160263062,
0.9038454294204712,
-0.06534534692764282,
-0.6131118535995483,
-1.0885895490646362,
1.2633922100067139,
2.025009870529175,
0.9372144341468811,
0.03053983673453331,
-0.8065139055252075,
-0.6658896803855896,
0.016753394156694412,
0.21001408994197845,
0.4422374367713928,
0.905863881111145,
0.14127787947654724,
0.07434562593698502,
1.4133293628692627,
1.1852965354919434,
-0.42716658115386963,
0.42059075832366943,
-0.8441770672798157,
-0.4555646777153015,
0.4797991216182709,
0.3040667772293091,
-0.0023216642439365387,
0.2940467596054077,
-0.9914664626121521,
-0.22080843150615692,
-0.4044596254825592,
-0.9669753909111023,
-0.7339408993721008,
-0.44793447852134705,
-0.37699779868125916,
1.6635105609893799,
0.16169917583465576,
-0.4693894386291504,
-0.05658061057329178,
-0.6843274831771851,
-0.11515354365110397,
-1.0413867235183716,
0.28082576394081116,
-0.07880061864852905,
-0.09141038358211517,
-0.25117966532707214,
1.7354334592819214,
-0.7905603051185608,
-1.9631624221801758,
0.24719032645225525,
0.26626384258270264,
-0.3593493103981018,
0.22422537207603455,
1.6636748313903809,
0.569857656955719,
1.4522557258605957,
1.360969066619873,
0.9635729789733887,
-0.5997147560119629,
-1.308355450630188,
0.6335882544517517,
0.9362578988075256,
-1.4087660312652588,
0.7160173654556274,
0.09952932596206665,
-0.47623971104621887,
0.6911096572875977,
1.2600619792938232,
0.46005362272262573,
-2.098151445388794,
0.7938440442085266,
-1.0315765142440796,
0.8448076248168945,
0.7677186131477356,
0.6987426280975342,
0.23387381434440613,
0.8658238649368286,
-1.1709680557250977,
-1.0901222229003906,
-0.8388599753379822,
-0.6681268215179443,
2.093233823776245,
-0.33548152446746826,
0.675847053527832,
-0.10768637806177139,
-1.381308674812317,
-0.1273270696401596,
0.7441103458404541,
0.4763534367084503,
-0.4969194829463959,
0.7666937112808228,
-0.7014467120170593,
-1.0560719966888428,
-1.3013406991958618,
-0.4252946376800537,
-1.0899715423583984,
-0.9815170764923096,
0.9985842704772949,
0.8056795597076416,
0.41496968269348145,
1.9188882112503052,
0.6600552201271057,
0.3052245080471039,
-2.625649929046631,
0.8349699378013611,
0.31570541858673096,
-0.09887130558490753,
0.8663588166236877,
0.32752856612205505,
0.9665315747261047,
-0.01318668294698,
0.5615927577018738,
-2.438929557800293,
2.2335402965545654,
-0.1998147815465927,
0.7921045422554016,
-0.01782575063407421,
-0.15570829808712006,
1.1416802406311035,
0.6035363078117371,
0.5198265314102173,
-1.0641483068466187,
0.6728137135505676,
-0.6121843457221985,
1.3206707239151,
0.8175084590911865,
-0.7683757543563843,
-0.13162998855113983,
1.2992057800292969,
0.395750492811203,
-0.5286538600921631,
-0.9324054718017578,
-1.043487310409546,
0.8477246761322021,
1.7281413078308105,
-0.20570868253707886,
-0.07250862568616867,
0.8122854828834534,
0.7389029264450073,
-1.247909665107727,
0.0557670034468174,
-0.8095276355743408,
-0.7620022296905518,
1.6591476202011108,
2.07108473777771,
-0.20440341532230377,
-0.0832788348197937,
-0.6631888747215271,
-1.2652795314788818,
0.7704488039016724,
-0.05048133060336113,
0.08600731939077377,
0.5627249479293823,
-0.5545026063919067,
1.0417481660842896,
0.8848496675491333,
0.9014070630073547,
0.20326218008995056,
0.276868611574173,
0.3173013925552368,
-0.39683860540390015,
-1.153725266456604,
-0.36789369583129883,
-1.096913456916809,
-2.5854694843292236,
0.47817909717559814,
-0.22855538129806519,
-1.4035918712615967,
-0.024508975446224213,
-0.983056902885437,
0.9571787118911743,
-0.6220577359199524,
-1.0632996559143066,
-1.504586100578308,
0.24694889783859253,
0.012613394297659397,
0.9756856560707092,
-1.5974156856536865,
-0.07424316555261612,
1.1634960174560547,
0.8818687796592712,
-0.6862603425979614,
1.0258632898330688,
0.3453657925128937,
1.0608872175216675,
0.8232976794242859,
-0.41143015027046204,
0.5033876299858093,
0.1246647760272026,
-1.325027346611023,
0.537855327129364,
1.1658823490142822,
0.1410682201385498,
1.4924386739730835,
-0.5919511318206787,
0.05031413957476616,
0.4164159595966339,
-0.6553230285644531,
-0.37854552268981934,
-0.5608102083206177,
0.7871931195259094,
0.018740002065896988,
-0.9073478579521179,
-0.014268556609749794,
-0.10033483058214188,
-0.17923353612422943,
0.18924713134765625,
-1.4999445676803589,
-0.20361590385437012,
-0.3841872215270996,
-0.5456346273422241,
-1.247064471244812,
-0.15826816856861115,
1.425523281097412,
-0.703350305557251,
-0.1582321673631668,
0.46599674224853516,
0.4724549353122711,
0.5416322946548462,
0.6789003610610962,
-0.6090402603149414,
-0.4012771248817444,
-0.27165487408638,
-0.29914653301239014,
0.3589920997619629,
1.4226834774017334,
-0.08129391074180603,
-0.9964287281036377,
0.7041795253753662,
-0.4138605296611786,
0.0619758702814579,
1.8876566886901855,
0.09490927308797836,
-0.7975462675094604,
0.3565673232078552,
-0.7291048765182495,
1.910691261291504,
1.7683663368225098,
1.2525831460952759,
-0.10283304005861282,
-0.9533360004425049,
0.5518401861190796,
-0.36425313353538513,
-0.42845281958580017,
0.8623038530349731,
0.4248414635658264,
-0.2795979082584381,
-1.3481228351593018,
0.7419434785842896,
1.2835414409637451,
-0.8978286981582642,
-0.9242653846740723,
0.14879725873470306,
-0.7278122901916504,
1.1872140169143677,
0.6761013269424438,
0.43978843092918396,
0.29098325967788696,
1.6782160997390747,
0.7818827033042908,
-0.4320144057273865,
0.6221732497215271,
0.4601705074310303,
-0.1688138246536255,
-2.2119741439819336,
-1.2430987358093262,
0.34229668974876404,
-0.5335094928741455,
-1.6036603450775146,
1.3837220668792725,
-1.1221195459365845,
-0.9659328460693359,
0.5652445554733276,
0.06781777739524841,
1.3859599828720093,
0.3788916766643524,
1.5610264539718628,
2.1047286987304688,
0.788956880569458,
0.43416041135787964,
1.3767919540405273,
-0.15172290802001953,
-0.5370238423347473,
1.8212711811065674,
-0.4920412600040436,
0.5339778065681458,
1.158147931098938,
-0.30108770728111267,
-1.0619277954101562,
-0.8297383785247803,
-1.1848866939544678,
-0.7503600716590881,
1.1469969749450684,
0.07302510738372803,
-1.163126826286316,
0.31004366278648376,
1.6552680730819702,
0.0601692833006382,
-0.3230113983154297,
0.5732204914093018,
0.3666391670703888,
-0.766242265701294,
-0.08135924488306046,
-0.9305874705314636,
0.4582441747188568,
-0.30909183621406555,
-0.39971333742141724,
0.377020001411438,
0.4840131998062134,
1.2397234439849854,
-0.12283837795257568,
0.05903439596295357,
1.0807831287384033,
-1.5015618801116943,
1.4790737628936768,
-0.616021990776062,
0.3101452887058258,
-2.2789430618286133,
1.282351016998291,
-0.7312412261962891,
1.992109775543213,
-2.7858541011810303,
0.39783868193626404,
-0.5754604339599609,
-0.49133238196372986,
0.26998668909072876,
-0.2882669270038605,
0.14357195794582367,
-0.16135592758655548,
-1.2426460981369019,
-0.006323388312011957,
-0.7638404369354248,
0.5761559009552002,
1.0075715780258179,
1.389984130859375,
-1.1198979616165161,
-0.2575901746749878,
-1.6826177835464478,
-0.10075268894433975,
-0.7629168033599854,
0.31507033109664917,
-1.985155701637268,
-0.15595772862434387,
-1.9320567846298218,
-2.2469141483306885,
-1.3124943971633911,
-0.8296617269515991,
1.0691312551498413,
0.04095172509551048,
-0.8601014018058777,
1.1290820837020874,
-0.37737083435058594,
-1.8733410835266113,
1.0896434783935547,
-2.140355348587036
] |
https://github.com/huggingface/datasets/issues/3385 | None batched `with_transform`, `set_transform` | I like the idea of lazy map. On the other hand we should only have either lazy map or `with_transform` (not both). That's why I'd rather stick with `with_transform` for now (but maybe we can consider it for later major releases like `datasets` v2).
I understand the issue with `with_transform` and `with_format` being exclusive, maybe we can separate them: first transform, them format.
Finally I think what's also going to be important in the end will be the addition of multiprocessing to transforms | **Is your feature request related to a problem? Please describe.**
A `torch.utils.data.Dataset.__getitem__` operates on a single example.
But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform.
**Describe the solution you'd like**
Have a `batched=True` argument in `Datasets.with_transform`
**Describe alternatives you've considered**
* Convert a non-batched transform function to batched one myself.
* Wrap a 🤗 Dataset with torch Dataset, and add a `__getitem__`. 🙄
* Have `lazy=False` in `Dataset.map`, and returns a `LazyDataset` if `lazy=True`. This way the same `map` interface can be used, and existing code can be updated with one argument change. | 1,074 | 83 | None batched `with_transform`, `set_transform`
**Is your feature request related to a problem? Please describe.**
A `torch.utils.data.Dataset.__getitem__` operates on a single example.
But 🤗 `Datasets.with_transform` doesn't seem to allow non-batched transform.
**Describe the solution you'd like**
Have a `batched=True` argument in `Datasets.with_transform`
**Describe alternatives you've considered**
* Convert a non-batched transform function to batched one myself.
* Wrap a 🤗 Dataset with torch Dataset, and add a `__getitem__`. 🙄
* Have `lazy=False` in `Dataset.map`, and returns a `LazyDataset` if `lazy=True`. This way the same `map` interface can be used, and existing code can be updated with one argument change.
I like the idea of lazy map. On the other hand we should only have either lazy map or `with_transform` (not both). That's why I'd rather stick with `with_transform` for now (but maybe we can consider it for later major releases like `datasets` v2).
I understand the issue with `with_transform` and `with_format` being exclusive, maybe we can separate them: first transform, them format.
Finally I think what's also going to be important in the end will be the addition of multiprocessing to transforms | [
-1.1766836643218994,
-0.9721612930297852,
-0.6299198269844055,
1.398621916770935,
-0.1476554423570633,
-1.3093547821044922,
0.33134913444519043,
-1.1492794752120972,
1.8567715883255005,
-0.8886327743530273,
0.377846896648407,
-1.66567862033844,
0.07830364257097244,
-0.5864089131355286,
-0.8852372765541077,
-0.8054920434951782,
-0.37909451127052307,
-0.7195139527320862,
0.9244288802146912,
2.398388624191284,
1.047858715057373,
-1.345562219619751,
2.6256766319274902,
0.683862566947937,
-0.24799798429012299,
-1.013046383857727,
0.4145667254924774,
-0.07648558169603348,
-1.1928645372390747,
-0.4680871367454529,
-0.8392409086227417,
-0.035919323563575745,
-0.6432151198387146,
-0.6296500563621521,
-0.021114440634846687,
0.38251352310180664,
-0.30029940605163574,
-0.467559278011322,
-0.46512866020202637,
-0.8586381077766418,
0.43856096267700195,
-0.4055233895778656,
0.9614948630332947,
-0.4151265621185303,
1.861837387084961,
-0.6119987964630127,
0.544715166091919,
0.8156916499137878,
1.414708137512207,
0.2084701806306839,
-0.10445429384708405,
0.32230842113494873,
0.4541201889514923,
-0.023130692541599274,
0.469687283039093,
1.1367504596710205,
0.5683497786521912,
0.5253808498382568,
0.6644262075424194,
-2.309255838394165,
1.3471225500106812,
-1.1049869060516357,
0.3655799329280853,
1.3430556058883667,
-0.8435218930244446,
0.30344513058662415,
-1.724871039390564,
0.026806196197867393,
0.5736494660377502,
-2.2954225540161133,
0.26556697487831116,
-1.4102129936218262,
-0.513055145740509,
1.012466549873352,
0.30156034231185913,
-1.2410380840301514,
0.17540809512138367,
-0.23769083619117737,
1.0358457565307617,
0.4554681181907654,
0.9917391538619995,
-1.7698910236358643,
-0.10209570825099945,
-0.34654635190963745,
0.16029661893844604,
-1.256909966468811,
-1.4637242555618286,
0.504420280456543,
0.7007448673248291,
0.5152990221977234,
-0.16526782512664795,
1.0629956722259521,
-1.1209193468093872,
0.8300885558128357,
-1.0193424224853516,
-1.6746443510055542,
-1.338536262512207,
-2.1391758918762207,
-2.237700939178467,
0.7614269256591797,
-0.3918525278568268,
-0.46271273493766785,
1.9378933906555176,
-0.9958676099777222,
-1.7470587491989136,
1.2248668670654297,
0.2553647458553314,
-0.05418238043785095,
2.2956156730651855,
0.20550528168678284,
-0.608030378818512,
0.39002159237861633,
-0.8431012630462646,
0.8050933480262756,
-0.47561442852020264,
1.342866063117981,
0.4027252495288849,
-1.035927653312683,
1.5849251747131348,
-0.4586605727672577,
0.5983784198760986,
-0.6846964955329895,
-0.5219189524650574,
-0.8087319731712341,
0.4762245714664459,
1.827687382698059,
-0.2780143618583679,
1.4842252731323242,
-0.3425646126270294,
-1.5285199880599976,
-1.5932360887527466,
0.9532128572463989,
0.4278394281864166,
-0.7208620309829712,
0.038991302251815796,
-0.33560192584991455,
0.17656409740447998,
-0.10267511755228043,
1.2360507249832153,
1.237277626991272,
0.8752513527870178,
-0.3400920033454895,
-0.8083308339118958,
0.26015356183052063,
-0.07368792593479156,
-0.7834647297859192,
-1.791365146636963,
-0.4230121374130249,
0.11748319119215012,
0.5448722839355469,
-1.090972661972046,
1.7855744361877441,
0.8566490411758423,
1.9316046237945557,
1.0010242462158203,
-0.3161594569683075,
1.543179988861084,
0.048479191958904266,
1.9730161428451538,
-0.4049665927886963,
0.6965521574020386,
-0.3527008295059204,
-1.0633295774459839,
0.8341066837310791,
-0.36136382818222046,
-2.0397350788116455,
-0.6504952311515808,
-0.8680086731910706,
-0.21291521191596985,
-0.7944670915603638,
0.8452807664871216,
-0.3284081220626831,
-1.479291319847107,
0.24075128138065338,
-0.6429674625396729,
0.15969015657901764,
-1.1650128364562988,
0.37323883175849915,
0.7875344753265381,
-0.5864969491958618,
0.032736919820308685,
-0.2355404496192932,
-1.2734670639038086,
-0.5353102087974548,
0.31740614771842957,
1.921600103378296,
-0.7499175667762756,
0.8565800189971924,
1.0009645223617554,
-0.7018139362335205,
-0.07905031740665436,
0.34530606865882874,
-0.28448325395584106,
0.7256311774253845,
-1.083179235458374,
-0.40139827132225037,
1.1262493133544922,
-0.16425080597400665,
-0.5362057089805603,
1.5144654512405396,
0.7077353000640869,
-1.0080615282058716,
-0.12289553880691528,
-0.28638723492622375,
-0.736095666885376,
0.06199607253074646,
-1.6042122840881348,
-0.003789117094129324,
0.4248715937137604,
-1.5114150047302246,
-0.5031214356422424,
-0.09957904368638992,
1.2616794109344482,
-0.15139025449752808,
1.2963054180145264,
-0.45658934116363525,
-0.2238779067993164,
-0.37481844425201416,
-0.3717196583747864,
0.1879778355360031,
-0.2524898052215576,
-0.7411909103393555,
0.16913120448589325,
-0.6799136996269226,
0.43634122610092163,
1.4148614406585693,
0.32556411623954773,
-0.03837218135595322,
0.5146903395652771,
1.1340153217315674,
0.22908179461956024,
0.02647392265498638,
-0.8902862071990967,
-1.5583772659301758,
2.0291783809661865,
-1.446915626525879,
1.9371880292892456,
0.651922881603241,
-0.01510962750762701,
-1.7937394380569458,
-1.8482211828231812,
1.3299092054367065,
1.129817247390747,
2.271807909011841,
0.5810043215751648,
0.3662155270576477,
-0.8404507637023926,
-0.6042658090591431,
0.30292657017707825,
-1.0493748188018799,
-0.662764310836792,
0.14909765124320984,
2.304335117340088,
1.779548168182373,
-0.5158184170722961,
-0.20930235087871552,
-1.0901566743850708,
1.4541128873825073,
-0.17911909520626068,
0.25240251421928406,
2.01473331451416,
-0.33182504773139954,
-1.122410774230957,
1.3347505331039429,
-2.3240244388580322,
0.18206249177455902,
1.9923052787780762,
0.19276998937129974,
0.0918913185596466,
-1.3228981494903564,
-0.5360293984413147,
-0.2942444086074829,
-0.3373447358608246,
-1.2552498579025269,
0.4582040309906006,
-0.23826433718204498,
-0.7107033133506775,
-1.3933866024017334,
0.24179045855998993,
-1.029735803604126,
-1.6337716579437256,
0.2771303653717041,
1.9253506660461426,
1.9367297887802124,
-0.7248917818069458,
1.6145414113998413,
-0.328712522983551,
0.29890382289886475,
1.2697229385375977,
1.1858103275299072,
3.1297340393066406,
1.8755499124526978,
-1.2265410423278809,
0.628852128982544,
-0.18944698572158813,
-0.5046933889389038,
1.1352001428604126,
-1.1791249513626099,
1.2808640003204346,
-0.2177562713623047,
-1.1093647480010986,
-1.2914613485336304,
0.9366282820701599,
0.51758873462677,
0.09710146486759186,
-0.4905811548233032,
1.2048265933990479,
0.034064166247844696,
1.451529860496521,
0.5717014670372009,
-0.33302611112594604,
0.6448693871498108,
-0.38053208589553833,
-0.512670636177063,
1.494593620300293,
0.2879307270050049,
-1.310837984085083,
-2.3676528930664062,
-0.19677382707595825,
-0.8343088030815125,
0.08147990703582764,
-0.5486319065093994,
-0.906858503818512,
1.6361486911773682,
0.4723036587238312,
-1.3029025793075562,
-0.2549695372581482,
-0.3417671024799347,
-0.5934315323829651,
2.7886433601379395,
-1.4009530544281006,
-0.2647247314453125,
-0.9610590934753418,
-0.6440463662147522,
1.65121591091156,
-1.3037023544311523,
-0.22074060142040253,
-1.0045936107635498,
-0.5405163764953613,
-1.2128921747207642,
-0.5554982423782349,
-0.06749298423528671,
-0.9244875311851501,
0.9164503812789917,
0.21239528059959412,
-1.149237871170044,
-0.47294771671295166,
-0.957505464553833,
0.8525533676147461,
-0.1590789407491684,
0.26257050037384033,
1.8019559383392334,
0.38761386275291443,
-0.32819393277168274,
0.7360548973083496,
1.1104662418365479,
0.583400309085846,
-0.6003175973892212,
0.3107127845287323,
-0.6828786730766296,
0.3065248131752014,
-1.263857126235962,
0.3161866366863251,
-2.866987466812134,
0.6231792569160461,
-0.06625120341777802,
-0.03039136901497841,
-0.16186879575252533,
-1.4533181190490723,
1.0888224840164185,
2.523402452468872,
-1.1755515336990356,
0.5100677013397217,
0.2627241611480713,
1.2385506629943848,
-1.5396400690078735,
0.30548763275146484,
-0.3562942445278168,
2.169132709503174,
0.21849024295806885,
1.1751065254211426,
-0.41601037979125977,
-2.312183380126953,
0.5896433591842651,
-1.1837685108184814,
-1.2407150268554688,
0.7209241390228271,
-0.8205446004867554,
0.022943532094359398,
-1.390248417854309,
-0.30295267701148987,
-0.855462908744812,
-1.2114559412002563,
0.7471066117286682,
0.16308167576789856,
0.46717092394828796,
-0.7146838307380676,
0.4014081656932831,
-2.198551654815674,
-1.3962551355361938,
-0.2393980324268341,
-0.9147251844406128,
0.48459506034851074,
-0.3210445046424866,
0.7067551612854004,
-0.2003241628408432,
0.012699678540229797,
0.41399890184402466,
1.5544301271438599,
3.4063117504119873,
0.28862789273262024,
0.4161105751991272,
-0.1736975610256195,
-0.8770986795425415,
1.3094706535339355,
0.8991816639900208,
-0.07478546351194382,
-0.5061303377151489,
-1.0778095722198486,
1.233372688293457,
1.9250441789627075,
0.9127861261367798,
0.003743991255760193,
-0.7392287254333496,
-0.6747629046440125,
-0.08193576335906982,
0.13123229146003723,
0.4514719843864441,
0.8297247886657715,
0.2841227948665619,
0.12015394121408463,
1.3095546960830688,
1.2232284545898438,
-0.4996738135814667,
0.5029553771018982,
-0.7450423240661621,
-0.4941803514957428,
0.5372955203056335,
0.35494130849838257,
-0.00503797922283411,
0.2265598624944687,
-0.9990845918655396,
-0.19194844365119934,
-0.4050293266773224,
-0.9351323843002319,
-0.7700100541114807,
-0.5241676568984985,
-0.36928704380989075,
1.6796140670776367,
0.13488887250423431,
-0.4850904643535614,
-0.11641373485326767,
-0.7358813881874084,
-0.03765279799699783,
-1.0623135566711426,
0.3087691068649292,
-0.11658262461423874,
-0.12534332275390625,
-0.15132708847522736,
1.7039446830749512,
-0.7951478362083435,
-1.9208965301513672,
0.26292964816093445,
0.23444734513759613,
-0.4423576891422272,
0.24304331839084625,
1.684819221496582,
0.5107089281082153,
1.519178867340088,
1.4356234073638916,
0.9364951848983765,
-0.6455755233764648,
-1.286328673362732,
0.6094299554824829,
0.8640807271003723,
-1.4416041374206543,
0.6852490305900574,
0.2660294771194458,
-0.47951579093933105,
0.7465993165969849,
1.2483742237091064,
0.41645297408103943,
-2.072775363922119,
0.7901039719581604,
-1.0285700559616089,
0.8203005194664001,
0.8071587085723877,
0.7363091111183167,
0.27392375469207764,
0.9096136689186096,
-1.1662946939468384,
-1.1923266649246216,
-0.8718083500862122,
-0.6767603754997253,
2.0344133377075195,
-0.3090248107910156,
0.6346538662910461,
-0.0450991690158844,
-1.3684507608413696,
-0.11162538826465607,
0.7572016716003418,
0.49084386229515076,
-0.4492318034172058,
0.6893725991249084,
-0.6563785076141357,
-1.0456993579864502,
-1.4004265069961548,
-0.42901885509490967,
-1.153679370880127,
-1.0112508535385132,
0.9187852740287781,
0.9022583961486816,
0.33891138434410095,
1.8627194166183472,
0.7235479950904846,
0.30676230788230896,
-2.574108839035034,
0.8030003905296326,
0.32683631777763367,
-0.14091093838214874,
0.8146925568580627,
0.39723241329193115,
0.9953497648239136,
0.011179450899362564,
0.5387130379676819,
-2.5191750526428223,
2.266599178314209,
-0.2727256119251251,
0.7309959530830383,
-0.07399233430624008,
-0.18761366605758667,
1.2317259311676025,
0.5624104142189026,
0.45395445823669434,
-1.1010043621063232,
0.7029504776000977,
-0.7170789837837219,
1.3309134244918823,
0.8068423867225647,
-0.8112538456916809,
-0.12440189719200134,
1.3831753730773926,
0.42043551802635193,
-0.5402723550796509,
-0.8948265910148621,
-1.119941234588623,
0.8276510834693909,
1.706942081451416,
-0.16872039437294006,
-0.10101401060819626,
0.8161234855651855,
0.7920645475387573,
-1.2661107778549194,
0.12889620661735535,
-0.7702798247337341,
-0.8106747269630432,
1.6642770767211914,
2.0448803901672363,
-0.17148567736148834,
-0.12459270656108856,
-0.7536782622337341,
-1.1835238933563232,
0.7567620873451233,
0.03593357652425766,
0.04867134243249893,
0.5901418924331665,
-0.6457366347312927,
1.0426623821258545,
0.9562010765075684,
0.8673651814460754,
0.24926872551441193,
0.317597359418869,
0.3247596323490143,
-0.3969246447086334,
-1.1693083047866821,
-0.2487366497516632,
-1.206272840499878,
-2.591846466064453,
0.49619778990745544,
-0.33113163709640503,
-1.4662537574768066,
-0.029473833739757538,
-0.9907346367835999,
0.916252076625824,
-0.616934597492218,
-1.1460652351379395,
-1.5326800346374512,
0.24691037833690643,
0.053707294166088104,
0.9349917769432068,
-1.5851185321807861,
-0.03487352281808853,
1.2137820720672607,
0.9155265688896179,
-0.6707993149757385,
0.9959605932235718,
0.33431312441825867,
1.0737665891647339,
0.9313114881515503,
-0.48521676659584045,
0.475334495306015,
0.01315261423587799,
-1.3682950735092163,
0.4918491542339325,
1.186406135559082,
0.13995912671089172,
1.506866693496704,
-0.6039491891860962,
0.09854347258806229,
0.36609190702438354,
-0.6074569225311279,
-0.41664090752601624,
-0.5971232652664185,
0.7976976037025452,
-0.04254850000143051,
-0.8698956370353699,
0.1450616717338562,
-0.062037982046604156,
-0.15585066378116608,
0.19196756184101105,
-1.5355364084243774,
-0.23029211163520813,
-0.3657500445842743,
-0.5968713760375977,
-1.228387475013733,
-0.14243961870670319,
1.3547872304916382,
-0.6241260170936584,
-0.1301148682832718,
0.5216181874275208,
0.45402413606643677,
0.546253502368927,
0.6684116721153259,
-0.6003563404083252,
-0.385456919670105,
-0.3497326672077179,
-0.30187565088272095,
0.4005536139011383,
1.4254695177078247,
-0.16877035796642303,
-0.8759036064147949,
0.6658703684806824,
-0.39090582728385925,
-0.009275630116462708,
1.8897243738174438,
0.14264017343521118,
-0.7903364300727844,
0.342223584651947,
-0.8206393122673035,
1.927777647972107,
1.838763952255249,
1.251060128211975,
0.0011751558631658554,
-1.0635230541229248,
0.5478813648223877,
-0.41285184025764465,
-0.40675967931747437,
0.9034013152122498,
0.4838487207889557,
-0.2034074068069458,
-1.305722951889038,
0.6896978616714478,
1.2463017702102661,
-0.8095765709877014,
-1.0085557699203491,
0.12153128534555435,
-0.6651763319969177,
1.1639492511749268,
0.697080135345459,
0.41535380482673645,
0.303004652261734,
1.6663511991500854,
0.7556495070457458,
-0.40520113706588745,
0.669356107711792,
0.4571620225906372,
-0.21187375485897064,
-2.1772513389587402,
-1.3074806928634644,
0.3820916414260864,
-0.49379676580429077,
-1.6310579776763916,
1.40170156955719,
-1.0387071371078491,
-0.9097480773925781,
0.6212804913520813,
0.14954720437526703,
1.447242259979248,
0.4079870879650116,
1.5829824209213257,
2.1337969303131104,
0.7726132273674011,
0.38660645484924316,
1.3854464292526245,
-0.17775225639343262,
-0.572177529335022,
1.8558297157287598,
-0.5324032306671143,
0.42446672916412354,
1.1617366075515747,
-0.3141077160835266,
-1.0842053890228271,
-0.874128520488739,
-1.205918312072754,
-0.7232442498207092,
1.1220430135726929,
0.08356781303882599,
-1.1735914945602417,
0.27418068051338196,
1.6395291090011597,
0.016591083258390427,
-0.3430929481983185,
0.6159365773200989,
0.3526343107223511,
-0.7403693795204163,
-0.07755028456449509,
-0.9425225853919983,
0.47448205947875977,
-0.22206619381904602,
-0.3525841534137726,
0.4209447503089905,
0.4759466350078583,
1.2218791246414185,
-0.11721102148294449,
0.06974142789840698,
1.1110310554504395,
-1.4684689044952393,
1.396756649017334,
-0.6606165170669556,
0.3071499168872833,
-2.2810122966766357,
1.351021647453308,
-0.7605944871902466,
1.9427566528320312,
-2.6768813133239746,
0.37780824303627014,
-0.563193678855896,
-0.46852830052375793,
0.3509945273399353,
-0.34514665603637695,
0.1446709930896759,
-0.17077545821666718,
-1.2927762269973755,
-0.054567575454711914,
-0.7834960222244263,
0.5682899951934814,
1.0099247694015503,
1.4161312580108643,
-1.1281148195266724,
-0.3247692883014679,
-1.7120935916900635,
-0.03354152292013168,
-0.609734833240509,
0.40818655490875244,
-1.9510674476623535,
-0.19469527900218964,
-1.944646954536438,
-2.2399420738220215,
-1.3561465740203857,
-0.7973289489746094,
1.022546648979187,
0.006981562823057175,
-0.7847636938095093,
1.066078543663025,
-0.3974434435367584,
-1.9103246927261353,
1.0640474557876587,
-2.151630163192749
] |
https://github.com/huggingface/datasets/issues/3381 | Unable to load audio_features from common_voice dataset | Hi ! Feel free to access `batch["audio"]["array"]` and `batch["audio"]["sampling_rate"]` instead
`datasets` 1.16 introduced some changes in `common_voice` and now the `path` field is no longer a path to a local file (but rather the path to the file in the archive it's extracted from) | ## Describe the bug
I am not able to load audio features from common_voice dataset
## Steps to reproduce the bug
```
from datasets import load_dataset
import torchaudio
test_dataset = load_dataset("common_voice", "hi", split="test[:2%]")
resampler = torchaudio.transforms.Resample(48_000, 16_000)
def speech_file_to_array_fn(batch):
speech_array, sampling_rate = torchaudio.load(batch["path"])
batch["speech"] = resampler(speech_array).squeeze().numpy()
return batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
```
## Expected results
This piece of code should return test_dataset after loading audio features.
## Actual results
Reusing dataset common_voice (/home/jovyan/.cache/huggingface/datasets/common_voice/hi/6.1.0/b879a355caa529b11f2249400b61cadd0d9433f334d5c60f8c7216ccedfecfe1)
/opt/conda/lib/python3.7/site-packages/transformers/configuration_utils.py:341: UserWarning: Passing `gradient_checkpointing` to a config initialization is deprecated and will be removed in v5 Transformers. Using `model.gradient_checkpointing_enable()` instead, or if you are using the `Trainer` API, pass `gradient_checkpointing=True` in your `TrainingArguments`.
"Passing `gradient_checkpointing` to a config initialization is deprecated and will be removed in v5 "
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
0%| | 0/3 [00:00<?, ?ex/s]formats: can't open input file `common_voice_hi_23795358.mp3': No such file or directory
0%| | 0/3 [00:00<?, ?ex/s]
Traceback (most recent call last):
File "demo_file.py", line 23, in <module>
test_dataset = test_dataset.map(speech_file_to_array_fn)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2036, in map
desc=desc,
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 518, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 485, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py", line 411, in wrapper
out = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2368, in _map_single
example = apply_function_on_filtered_inputs(example, i, offset=offset)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2277, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1978, in decorated
result = f(decorated_item, *args, **kwargs)
File "demo_file.py", line 19, in speech_file_to_array_fn
speech_array, sampling_rate = torchaudio.load(batch["path"])
File "/opt/conda/lib/python3.7/site-packages/torchaudio/backend/sox_io_backend.py", line 154, in load
filepath, frame_offset, num_frames, normalize, channels_first, format)
RuntimeError: Error loading audio file: failed to open file common_voice_hi_23795358.mp3
## Environment info
- `datasets` version: 1.16.1
- Platform: Linux-4.14.243 with-debian-bullseye-sid
- Python version: 3.7.9
- PyArrow version: 6.0.1
| 1,075 | 44 | Unable to load audio_features from common_voice dataset
## Describe the bug
I am not able to load audio features from common_voice dataset
## Steps to reproduce the bug
```
from datasets import load_dataset
import torchaudio
test_dataset = load_dataset("common_voice", "hi", split="test[:2%]")
resampler = torchaudio.transforms.Resample(48_000, 16_000)
def speech_file_to_array_fn(batch):
speech_array, sampling_rate = torchaudio.load(batch["path"])
batch["speech"] = resampler(speech_array).squeeze().numpy()
return batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
```
## Expected results
This piece of code should return test_dataset after loading audio features.
## Actual results
Reusing dataset common_voice (/home/jovyan/.cache/huggingface/datasets/common_voice/hi/6.1.0/b879a355caa529b11f2249400b61cadd0d9433f334d5c60f8c7216ccedfecfe1)
/opt/conda/lib/python3.7/site-packages/transformers/configuration_utils.py:341: UserWarning: Passing `gradient_checkpointing` to a config initialization is deprecated and will be removed in v5 Transformers. Using `model.gradient_checkpointing_enable()` instead, or if you are using the `Trainer` API, pass `gradient_checkpointing=True` in your `TrainingArguments`.
"Passing `gradient_checkpointing` to a config initialization is deprecated and will be removed in v5 "
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
0%| | 0/3 [00:00<?, ?ex/s]formats: can't open input file `common_voice_hi_23795358.mp3': No such file or directory
0%| | 0/3 [00:00<?, ?ex/s]
Traceback (most recent call last):
File "demo_file.py", line 23, in <module>
test_dataset = test_dataset.map(speech_file_to_array_fn)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2036, in map
desc=desc,
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 518, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 485, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py", line 411, in wrapper
out = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2368, in _map_single
example = apply_function_on_filtered_inputs(example, i, offset=offset)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2277, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1978, in decorated
result = f(decorated_item, *args, **kwargs)
File "demo_file.py", line 19, in speech_file_to_array_fn
speech_array, sampling_rate = torchaudio.load(batch["path"])
File "/opt/conda/lib/python3.7/site-packages/torchaudio/backend/sox_io_backend.py", line 154, in load
filepath, frame_offset, num_frames, normalize, channels_first, format)
RuntimeError: Error loading audio file: failed to open file common_voice_hi_23795358.mp3
## Environment info
- `datasets` version: 1.16.1
- Platform: Linux-4.14.243 with-debian-bullseye-sid
- Python version: 3.7.9
- PyArrow version: 6.0.1
Hi ! Feel free to access `batch["audio"]["array"]` and `batch["audio"]["sampling_rate"]` instead
`datasets` 1.16 introduced some changes in `common_voice` and now the `path` field is no longer a path to a local file (but rather the path to the file in the archive it's extracted from) | [
-1.1859147548675537,
-0.8634949922561646,
-0.7263603806495667,
1.5356708765029907,
-0.11130998283624649,
-1.2320845127105713,
0.19831417500972748,
-1.071601390838623,
1.6258550882339478,
-0.8768484592437744,
0.3272213041782379,
-1.6074296236038208,
0.03251086175441742,
-0.641150176525116,
-0.7096938490867615,
-0.9083090424537659,
-0.39748093485832214,
-0.714603841304779,
1.045656442642212,
2.4446239471435547,
1.2310034036636353,
-1.2961891889572144,
2.746603488922119,
0.7190752029418945,
-0.27553221583366394,
-1.043774962425232,
0.4623328447341919,
0.037347011268138885,
-1.1991750001907349,
-0.48367246985435486,
-0.8682039380073547,
-0.05911552160978317,
-0.6152995228767395,
-0.4927076995372772,
-0.02790576033294201,
0.44409844279289246,
-0.32815155386924744,
-0.4171874225139618,
-0.5919420123100281,
-0.8513126373291016,
0.5132983326911926,
-0.4057903289794922,
0.9546003937721252,
-0.3183692991733551,
1.8265107870101929,
-0.6627359390258789,
0.4049229919910431,
0.7555436491966248,
1.315547227859497,
0.20632225275039673,
0.06325773894786835,
0.33354008197784424,
0.32559627294540405,
-0.06181875616312027,
0.5294340252876282,
1.2139102220535278,
0.6309396624565125,
0.5384126305580139,
0.7058761119842529,
-2.223466157913208,
1.2923191785812378,
-0.9691340327262878,
0.3248729705810547,
1.2806577682495117,
-0.9347133636474609,
0.3161593973636627,
-1.7339602708816528,
-0.0845067948102951,
0.5892744064331055,
-2.251587152481079,
0.35966116189956665,
-1.292768955230713,
-0.5471769571304321,
0.9945701360702515,
0.35551202297210693,
-1.163029670715332,
0.1731780469417572,
-0.45753443241119385,
1.096601128578186,
0.4442090690135956,
0.9857773184776306,
-1.6466323137283325,
-0.06310483068227768,
-0.23471657931804657,
0.0712076798081398,
-1.2694822549819946,
-1.6099337339401245,
0.5245153307914734,
0.5797121524810791,
0.6747962832450867,
-0.09233146905899048,
1.122206211090088,
-1.0097774267196655,
0.817061185836792,
-1.0735516548156738,
-1.6553678512573242,
-1.406443476676941,
-2.2731425762176514,
-2.258028507232666,
0.7383195757865906,
-0.4326076805591583,
-0.547605037689209,
2.035540819168091,
-1.0263359546661377,
-1.7104473114013672,
1.1730856895446777,
0.27624422311782837,
0.01895122043788433,
2.3517143726348877,
0.21298092603683472,
-0.7783550024032593,
0.45490625500679016,
-0.7399447560310364,
0.9048064351081848,
-0.3396270275115967,
1.30875563621521,
0.4374275803565979,
-1.072546124458313,
1.5459266901016235,
-0.3806670010089874,
0.6466193199157715,
-0.6471689939498901,
-0.5453662872314453,
-0.8647364377975464,
0.2646988034248352,
1.850643277168274,
-0.2811567783355713,
1.5785306692123413,
-0.2951216399669647,
-1.570136308670044,
-1.6150758266448975,
0.8728725910186768,
0.4310169219970703,
-0.8164559006690979,
0.05956520140171051,
-0.4173995852470398,
0.15990927815437317,
-0.049231670796871185,
1.187386155128479,
1.3247438669204712,
0.6696047186851501,
-0.38060659170150757,
-0.8078903555870056,
0.14620451629161835,
-0.09877940267324448,
-0.7045294642448425,
-1.771881103515625,
-0.3641889691352844,
0.20522615313529968,
0.5786115527153015,
-1.1580880880355835,
1.7878700494766235,
0.9340863227844238,
1.9132872819900513,
1.0356824398040771,
-0.34105002880096436,
1.4658054113388062,
0.07887310534715652,
1.865234136581421,
-0.4812558889389038,
0.6529442071914673,
-0.34318944811820984,
-1.141926646232605,
0.8635779023170471,
-0.3721426725387573,
-2.0613410472869873,
-0.8675709962844849,
-0.6926885843276978,
-0.17359565198421478,
-0.7483776211738586,
0.8580619692802429,
-0.31997352838516235,
-1.4823558330535889,
0.18296140432357788,
-0.6663739085197449,
0.19426210224628448,
-1.2195161581039429,
0.23780104517936707,
0.6992998123168945,
-0.6523449420928955,
0.08739189803600311,
-0.17558598518371582,
-1.3090715408325195,
-0.4239377975463867,
0.3322280943393707,
1.943001627922058,
-0.6537073850631714,
0.896845281124115,
1.025240421295166,
-0.7097382545471191,
0.06042558699846268,
0.26002052426338196,
-0.2725125849246979,
0.7973398566246033,
-1.1223012208938599,
-0.44295838475227356,
1.219254732131958,
-0.20925527811050415,
-0.6750566959381104,
1.4648853540420532,
0.8400283455848694,
-1.010697364807129,
-0.17726799845695496,
-0.13394644856452942,
-0.8606219291687012,
-0.00476069888100028,
-1.5506688356399536,
-0.15247152745723724,
0.42918339371681213,
-1.4446299076080322,
-0.43287724256515503,
-0.276519238948822,
1.2734702825546265,
-0.2670101225376129,
1.4330588579177856,
-0.37198004126548767,
-0.25931912660598755,
-0.3302389085292816,
-0.49121418595314026,
0.10293219983577728,
-0.18060079216957092,
-0.627587616443634,
0.1524779498577118,
-0.7447469234466553,
0.329165518283844,
1.471887469291687,
0.2775920629501343,
0.11360426247119904,
0.43216970562934875,
1.1554374694824219,
0.3240247964859009,
-0.10645626485347748,
-0.8628554344177246,
-1.4876872301101685,
2.0007619857788086,
-1.4030821323394775,
2.011334180831909,
0.7421625852584839,
-0.02605653926730156,
-1.7765048742294312,
-1.7858113050460815,
1.2960128784179688,
1.1710968017578125,
2.330589532852173,
0.46977585554122925,
0.4282189905643463,
-0.8180606961250305,
-0.7544260025024414,
0.2659265398979187,
-1.06908118724823,
-0.6391855478286743,
0.16667939722537994,
2.3826487064361572,
1.7621862888336182,
-0.4206733703613281,
-0.21860292553901672,
-0.9499346017837524,
1.3935083150863647,
-0.2189529687166214,
0.25607553124427795,
1.98630952835083,
-0.2426072210073471,
-1.0565122365951538,
1.3420878648757935,
-2.379713773727417,
0.18301866948604584,
2.0360782146453857,
0.27650144696235657,
0.05958128720521927,
-1.3593896627426147,
-0.6517804861068726,
-0.3627002537250519,
-0.41463202238082886,
-1.3263787031173706,
0.5336433053016663,
-0.2352408915758133,
-0.7868809103965759,
-1.4101811647415161,
0.14179039001464844,
-1.1012136936187744,
-1.6330056190490723,
0.3440386652946472,
1.9618319272994995,
2.0136115550994873,
-0.7392788529396057,
1.5491479635238647,
-0.3490135967731476,
0.05917763710021973,
1.2459789514541626,
1.3446582555770874,
3.1315646171569824,
1.8945649862289429,
-1.2855685949325562,
0.633459746837616,
-0.2565765380859375,
-0.4669850468635559,
1.103991150856018,
-1.2415274381637573,
1.2611371278762817,
-0.1379126012325287,
-1.215793490409851,
-1.2990590333938599,
0.9805241823196411,
0.4867382347583771,
0.08127884566783905,
-0.5076025128364563,
1.2213995456695557,
0.06446736305952072,
1.3301743268966675,
0.5780928134918213,
-0.32966718077659607,
0.5479409098625183,
-0.40569019317626953,
-0.5667577981948853,
1.597472906112671,
0.16192857921123505,
-1.4786227941513062,
-2.3108723163604736,
-0.2411321997642517,
-0.8898817300796509,
0.0317111536860466,
-0.5721666812896729,
-1.0738022327423096,
1.676193118095398,
0.2955419421195984,
-1.3005199432373047,
-0.3116263747215271,
-0.2705516517162323,
-0.4969257712364197,
2.7260963916778564,
-1.2758358716964722,
-0.1862473040819168,
-0.9814020991325378,
-0.6302266716957092,
1.6770886182785034,
-1.1908262968063354,
-0.23753800988197327,
-1.0365495681762695,
-0.5700072646141052,
-1.2548507452011108,
-0.4613087773323059,
0.03727593272924423,
-0.9767330884933472,
0.8296530246734619,
0.2164086401462555,
-1.2020307779312134,
-0.34024786949157715,
-0.9024250507354736,
0.9849749207496643,
-0.14053265750408173,
0.1673571765422821,
1.8695127964019775,
0.34601107239723206,
-0.38785192370414734,
0.823320209980011,
1.2201703786849976,
0.6540031433105469,
-0.6938497424125671,
0.07950048893690109,
-0.6575254201889038,
0.24248985946178436,
-1.3456069231033325,
0.26847735047340393,
-2.900437116622925,
0.7314907908439636,
-0.09677217155694962,
-0.11630051583051682,
0.014537941664457321,
-1.3355827331542969,
1.0816667079925537,
2.5988757610321045,
-1.1704165935516357,
0.47793418169021606,
0.3196290135383606,
1.1910884380340576,
-1.6015785932540894,
0.30218344926834106,
-0.44821855425834656,
2.0628960132598877,
0.21926189959049225,
1.2945833206176758,
-0.48260873556137085,
-2.2995920181274414,
0.6207444667816162,
-1.2252113819122314,
-1.1695507764816284,
0.8690448999404907,
-0.8888753056526184,
0.18163223564624786,
-1.3555649518966675,
-0.292398601770401,
-0.8648194074630737,
-1.1892104148864746,
0.6756303906440735,
0.16550178825855255,
0.4880027770996094,
-0.5674856901168823,
0.30024659633636475,
-2.259817123413086,
-1.3413591384887695,
-0.20993180572986603,
-0.960607647895813,
0.543364942073822,
-0.424922913312912,
0.6048367023468018,
-0.07938399910926819,
0.0204685740172863,
0.3251260817050934,
1.5962276458740234,
3.365480899810791,
0.19454029202461243,
0.26727113127708435,
-0.1894574910402298,
-0.9217324256896973,
1.3697537183761597,
0.8202663660049438,
-0.08303066343069077,
-0.5707550644874573,
-0.9986057281494141,
1.2223823070526123,
1.9276748895645142,
0.988667368888855,
-0.02227800339460373,
-0.8773719072341919,
-0.7288812398910522,
-0.055945537984371185,
0.20969605445861816,
0.5049574971199036,
0.9034727811813354,
0.07213559001684189,
0.060367777943611145,
1.4237744808197021,
1.1664499044418335,
-0.44301316142082214,
0.33433154225349426,
-0.9194447994232178,
-0.43835321068763733,
0.42357680201530457,
0.27808961272239685,
-0.021906601265072823,
0.40018945932388306,
-1.03806734085083,
-0.2470647543668747,
-0.44414377212524414,
-0.8702590465545654,
-0.7856642603874207,
-0.4120156466960907,
-0.3821520209312439,
1.6417815685272217,
0.06261862814426422,
-0.47065675258636475,
0.00779491662979126,
-0.6618972420692444,
-0.19835405051708221,
-1.116518497467041,
0.2533430755138397,
-0.06636334210634232,
-0.16727839410305023,
-0.1187639907002449,
1.7483564615249634,
-0.9589977264404297,
-2.0619559288024902,
0.1822984665632248,
0.2109745293855667,
-0.2592434883117676,
0.17693868279457092,
1.7065244913101196,
0.4489128589630127,
1.3900249004364014,
1.316117763519287,
0.9134640097618103,
-0.6441475749015808,
-1.2470699548721313,
0.6882920861244202,
0.9578746557235718,
-1.255874514579773,
0.8428025245666504,
-0.1140759289264679,
-0.544471800327301,
0.6858391761779785,
1.2496650218963623,
0.49938464164733887,
-2.018336534500122,
0.8048708438873291,
-0.95905601978302,
0.7934192419052124,
0.7485341429710388,
0.6477474570274353,
0.23910640180110931,
0.8908541202545166,
-1.1961982250213623,
-1.1654444932937622,
-0.7258943915367126,
-0.6804684400558472,
1.9409910440444946,
-0.3527933657169342,
0.5958360433578491,
-0.15066175162792206,
-1.2546745538711548,
-0.08417634665966034,
0.814094066619873,
0.38382279872894287,
-0.48388808965682983,
0.7612056136131287,
-0.6856488585472107,
-0.9597461223602295,
-1.3426403999328613,
-0.4936507046222687,
-1.1194130182266235,
-0.9915170073509216,
1.021124243736267,
0.7838820815086365,
0.3315732181072235,
1.8770110607147217,
0.7672357559204102,
0.3792746067047119,
-2.6063098907470703,
0.8871680498123169,
0.2503114640712738,
-0.08210409432649612,
0.8923262357711792,
0.3488251864910126,
1.0645517110824585,
0.08520223200321198,
0.537375271320343,
-2.4156928062438965,
2.3173370361328125,
-0.24125756323337555,
0.6913537383079529,
-0.07728073745965958,
-0.16289682686328888,
1.1765481233596802,
0.5124937295913696,
0.49625062942504883,
-1.0369986295700073,
0.6928234696388245,
-0.4917296767234802,
1.1579943895339966,
0.8477955460548401,
-0.8654670715332031,
0.04600459337234497,
1.4398629665374756,
0.42477405071258545,
-0.5584197044372559,
-0.9244027733802795,
-0.940620481967926,
0.927176296710968,
1.7075963020324707,
-0.022741366177797318,
-0.04911351948976517,
0.8359518051147461,
0.6146190166473389,
-1.2356024980545044,
0.11012864112854004,
-0.6535202264785767,
-0.7477892637252808,
1.6494219303131104,
2.0186116695404053,
-0.1861695796251297,
-0.15547950565814972,
-0.7404487729072571,
-1.209332823753357,
0.8211643695831299,
-0.04009408876299858,
0.068997822701931,
0.6103560328483582,
-0.6763758063316345,
1.0709298849105835,
0.8182811141014099,
0.9643620848655701,
0.16916072368621826,
0.333154559135437,
0.49092090129852295,
-0.37852734327316284,
-1.1830191612243652,
-0.3249247074127197,
-1.1273401975631714,
-2.5287396907806396,
0.4087510108947754,
-0.17285768687725067,
-1.4738367795944214,
0.05166183412075043,
-1.052188754081726,
0.906709611415863,
-0.6462131142616272,
-1.0838993787765503,
-1.5857734680175781,
0.2563006281852722,
-0.09486467391252518,
0.8852742314338684,
-1.546604871749878,
-0.13023494184017181,
1.2266981601715088,
0.8576081991195679,
-0.6168025135993958,
0.9852995276451111,
0.2041139304637909,
0.9938114881515503,
0.8552405834197998,
-0.47325485944747925,
0.5659419894218445,
-0.011365415528416634,
-1.3844486474990845,
0.4594920575618744,
1.2117040157318115,
0.20035812258720398,
1.4809423685073853,
-0.5222342014312744,
-0.026948049664497375,
0.4042278230190277,
-0.6013517379760742,
-0.5135934352874756,
-0.4731683135032654,
0.6327139139175415,
0.13487839698791504,
-0.9758281111717224,
-0.05363521724939346,
-0.0875050500035286,
-0.33867210149765015,
0.22314222157001495,
-1.4711812734603882,
-0.19076626002788544,
-0.42030271887779236,
-0.5702470541000366,
-1.276140809059143,
-0.006714486517012119,
1.3543386459350586,
-0.7370165586471558,
-0.23680581152439117,
0.4365420341491699,
0.4023929834365845,
0.5263643264770508,
0.6008078455924988,
-0.7612510323524475,
-0.3124736249446869,
-0.3330240547657013,
-0.2614348232746124,
0.354153573513031,
1.3400578498840332,
-0.1159725934267044,
-0.9453761577606201,
0.7396306395530701,
-0.4373621642589569,
0.132905051112175,
1.9593064785003662,
0.08507400006055832,
-0.7335298657417297,
0.30531999468803406,
-0.742445170879364,
1.9386202096939087,
1.7258939743041992,
1.2852814197540283,
-0.06039309501647949,
-0.9147825241088867,
0.6529123187065125,
-0.38431841135025024,
-0.33493444323539734,
0.92901211977005,
0.38193079829216003,
-0.20784057676792145,
-1.4594053030014038,
0.7087854743003845,
1.320772409439087,
-0.8018972873687744,
-0.8289017081260681,
0.1687355637550354,
-0.8163169026374817,
1.1239653825759888,
0.564955472946167,
0.34817859530448914,
0.26853883266448975,
1.5590648651123047,
0.8283831477165222,
-0.37519004940986633,
0.567410945892334,
0.504065215587616,
-0.14951546490192413,
-2.168863534927368,
-1.1184877157211304,
0.35900405049324036,
-0.4634799659252167,
-1.62532639503479,
1.4374659061431885,
-1.111859917640686,
-1.0230283737182617,
0.5673241019248962,
0.06575685739517212,
1.4176816940307617,
0.3563289940357208,
1.5568921566009521,
2.072655200958252,
0.8408692479133606,
0.40862521529197693,
1.2418445348739624,
-0.18696513772010803,
-0.4898645877838135,
1.8660989999771118,
-0.44027408957481384,
0.4454963207244873,
1.0394392013549805,
-0.322958767414093,
-1.0866508483886719,
-0.7538572549819946,
-1.245176911354065,
-0.7286871075630188,
1.165762186050415,
0.12958629429340363,
-1.0708584785461426,
0.23088887333869934,
1.5718761682510376,
0.1465744972229004,
-0.303521990776062,
0.6741891503334045,
0.4675859808921814,
-0.7578627467155457,
-0.09375455975532532,
-0.8809500336647034,
0.5362545251846313,
-0.20330257713794708,
-0.31981533765792847,
0.307647705078125,
0.4535607695579529,
1.3025364875793457,
-0.07652318477630615,
0.06454388052225113,
1.0809565782546997,
-1.481127381324768,
1.49282968044281,
-0.6302434206008911,
0.34738847613334656,
-2.3995673656463623,
1.3547013998031616,
-0.7209928035736084,
1.9084844589233398,
-2.6189723014831543,
0.46454960107803345,
-0.5618752241134644,
-0.48806771636009216,
0.3594677150249481,
-0.37883827090263367,
0.14600692689418793,
-0.14693096280097961,
-1.103429913520813,
-0.014917774125933647,
-0.7156070470809937,
0.615792453289032,
1.1596156358718872,
1.339104175567627,
-1.1500157117843628,
-0.25769108533859253,
-1.663002610206604,
-0.07246415317058563,
-0.7544164061546326,
0.28667134046554565,
-2.0383753776550293,
-0.09284849464893341,
-1.934516191482544,
-2.382581949234009,
-1.2830806970596313,
-0.771360456943512,
1.0698045492172241,
0.2342023104429245,
-0.9025495648384094,
1.2956448793411255,
-0.3785458207130432,
-1.794575572013855,
1.1664233207702637,
-2.1330740451812744
] |
https://github.com/huggingface/datasets/issues/3374 | NonMatchingChecksumError for the CLUE:cluewsc2020, chid, c3 and tnews | Seems like the issue still exists,:
`Downloading and preparing dataset clue/chid (download: 127.15 MiB, generated: 259.71 MiB, post-processed: Unknown size, total: 386.86 MiB) to /mnt/cache/tanhaochen/.cache/huggingface/datasets/clue/chid/1.0.0/e55b490cb7809dcd8db31b9a87119f2e2ec87cdc060da8a9ac070b070ca3e379...
Traceback (most recent call last):
File "/mnt/cache/tanhaochen/PromptCLUE/test_datasets.py", line 3, in <module>
cluewsc2020 = datasets.load_dataset("clue","chid")
File "/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/load.py", line 1667, in load_dataset
builder_instance.download_and_prepare(
File "/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/builder.py", line 593, in download_and_prepare
self._download_and_prepare(
File "/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/builder.py", line 663, in _download_and_prepare
verify_checksums(
File "/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/utils/info_utils.py", line 40, in verify_checksums
raise NonMatchingChecksumError(error_msg + str(bad_urls))
datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://storage.googleapis.com/cluebenchmark/tasks/chid_public.zip']
` | Hi, it seems like there are updates in cluewsc2020, chid, c3 and tnews, since i could not load them due to the checksum error. | 1,076 | 80 | NonMatchingChecksumError for the CLUE:cluewsc2020, chid, c3 and tnews
Hi, it seems like there are updates in cluewsc2020, chid, c3 and tnews, since i could not load them due to the checksum error.
Seems like the issue still exists,:
`Downloading and preparing dataset clue/chid (download: 127.15 MiB, generated: 259.71 MiB, post-processed: Unknown size, total: 386.86 MiB) to /mnt/cache/tanhaochen/.cache/huggingface/datasets/clue/chid/1.0.0/e55b490cb7809dcd8db31b9a87119f2e2ec87cdc060da8a9ac070b070ca3e379...
Traceback (most recent call last):
File "/mnt/cache/tanhaochen/PromptCLUE/test_datasets.py", line 3, in <module>
cluewsc2020 = datasets.load_dataset("clue","chid")
File "/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/load.py", line 1667, in load_dataset
builder_instance.download_and_prepare(
File "/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/builder.py", line 593, in download_and_prepare
self._download_and_prepare(
File "/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/builder.py", line 663, in _download_and_prepare
verify_checksums(
File "/mnt/cache/tanhaochen/dependencies/datasets/src/datasets/utils/info_utils.py", line 40, in verify_checksums
raise NonMatchingChecksumError(error_msg + str(bad_urls))
datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://storage.googleapis.com/cluebenchmark/tasks/chid_public.zip']
` | [
-1.2235634326934814,
-0.9086774587631226,
-0.7522655725479126,
1.3857252597808838,
-0.16455058753490448,
-1.209918737411499,
0.08814302831888199,
-1.0573588609695435,
1.5813430547714233,
-0.7414045333862305,
0.1881244033575058,
-1.6989219188690186,
-0.10675960034132004,
-0.5963570475578308,
-0.6801896691322327,
-0.9006288051605225,
-0.31851738691329956,
-0.9575139284133911,
0.9754912257194519,
2.5476629734039307,
1.2704349756240845,
-1.308960199356079,
2.7938692569732666,
0.6540348529815674,
-0.3387952148914337,
-1.0178629159927368,
0.5808442234992981,
0.04478010907769203,
-1.2041147947311401,
-0.48986300826072693,
-0.9436728954315186,
0.04382823780179024,
-0.5120428204536438,
-0.33091458678245544,
0.062175504863262177,
0.44995155930519104,
-0.25091442465782166,
-0.18186037242412567,
-0.6235861778259277,
-0.7963975071907043,
0.568576991558075,
-0.3772695064544678,
0.9656241536140442,
-0.39197736978530884,
1.7247397899627686,
-0.5813182592391968,
0.3648422956466675,
0.7156980633735657,
1.2764087915420532,
0.1201707199215889,
0.12041390687227249,
0.16337239742279053,
0.2884158194065094,
-0.004529430065304041,
0.5583857893943787,
1.218428134918213,
0.5318809747695923,
0.5479152202606201,
0.6012356877326965,
-2.2132935523986816,
1.3180499076843262,
-0.8849639892578125,
0.27996736764907837,
1.3421151638031006,
-0.8673170804977417,
0.3209007680416107,
-1.8451228141784668,
-0.13793079555034637,
0.6066227555274963,
-2.2596282958984375,
0.30512818694114685,
-1.2644603252410889,
-0.4845345616340637,
0.9012116193771362,
0.304429829120636,
-1.20382821559906,
0.2976435720920563,
-0.5122524499893188,
1.104569911956787,
0.479902058839798,
1.101780652999878,
-1.6756048202514648,
-0.07801290601491928,
-0.17832507193088531,
-0.020592113956809044,
-1.3488948345184326,
-1.6305121183395386,
0.563689649105072,
0.5407594442367554,
0.6860713958740234,
-0.11982239782810211,
1.0263313055038452,
-1.0932259559631348,
0.8305527567863464,
-0.9639033675193787,
-1.632095217704773,
-1.4037449359893799,
-2.407453775405884,
-2.2896041870117188,
0.8269148468971252,
-0.5244652628898621,
-0.5257440209388733,
1.9942147731781006,
-1.029510498046875,
-1.7633217573165894,
1.089570164680481,
0.38383662700653076,
0.06038675457239151,
2.3696253299713135,
0.251360148191452,
-0.7485548257827759,
0.4490460753440857,
-0.6860621571540833,
0.8800985217094421,
-0.20010417699813843,
1.3670445680618286,
0.5770924687385559,
-0.9722287058830261,
1.5475513935089111,
-0.44772571325302124,
0.5785820484161377,
-0.5761817097663879,
-0.5785814523696899,
-0.8769018054008484,
0.2679780125617981,
1.7877240180969238,
-0.36909717321395874,
1.5826693773269653,
-0.22206512093544006,
-1.58536696434021,
-1.5831600427627563,
0.8162144422531128,
0.5657156705856323,
-0.8576868176460266,
-0.015734978020191193,
-0.49885883927345276,
0.20180712640285492,
-0.051962897181510925,
1.1164491176605225,
1.2014148235321045,
0.7400294542312622,
-0.3329285979270935,
-0.8475261926651001,
0.22226956486701965,
-0.11540237814188004,
-0.6858301162719727,
-1.830294132232666,
-0.3261851370334625,
0.20777812600135803,
0.6430395245552063,
-1.1992250680923462,
1.7578258514404297,
0.9900411367416382,
1.9897167682647705,
0.9654278755187988,
-0.33168336749076843,
1.5102463960647583,
-0.04813387617468834,
1.778184413909912,
-0.509975790977478,
0.5768201351165771,
-0.29259541630744934,
-1.1410386562347412,
0.8436233997344971,
-0.3999919891357422,
-2.0674407482147217,
-0.921772301197052,
-0.7562665939331055,
-0.24467946588993073,
-0.7459274530410767,
0.8756954073905945,
-0.30525559186935425,
-1.5056101083755493,
0.06649187207221985,
-0.6157602667808533,
0.11016979068517685,
-1.2190881967544556,
0.17221838235855103,
0.7018142342567444,
-0.6853623390197754,
-0.16504180431365967,
-0.15810620784759521,
-1.2974945306777954,
-0.3977503180503845,
0.23326216638088226,
2.002385139465332,
-0.6126290559768677,
1.002463459968567,
1.015596628189087,
-0.7733099460601807,
0.08842364698648453,
0.2517116963863373,
-0.2960679233074188,
0.8124531507492065,
-0.9965335726737976,
-0.40908169746398926,
1.116695523262024,
-0.1999296098947525,
-0.6875961422920227,
1.4417388439178467,
0.8684800863265991,
-1.1156837940216064,
-0.2746732234954834,
-0.19063164293766022,
-0.7650319933891296,
-0.09168349206447601,
-1.4743363857269287,
-0.20524153113365173,
0.38274654746055603,
-1.3684002161026,
-0.31480953097343445,
-0.22099320590496063,
1.3851152658462524,
-0.21082569658756256,
1.477677345275879,
-0.27529311180114746,
-0.23355603218078613,
-0.26636624336242676,
-0.5581724643707275,
0.17855000495910645,
-0.16523773968219757,
-0.6021188497543335,
0.26388344168663025,
-0.8556337952613831,
0.3105931878089905,
1.4363512992858887,
0.41179609298706055,
0.019460204988718033,
0.49108216166496277,
1.0578376054763794,
0.3695897161960602,
-0.028188422322273254,
-0.8852648138999939,
-1.4715192317962646,
1.9851000308990479,
-1.4186280965805054,
1.8589664697647095,
0.8232361674308777,
-0.1154676228761673,
-1.7959222793579102,
-1.8894649744033813,
1.2751522064208984,
1.1339627504348755,
2.3901760578155518,
0.4734191298484802,
0.3992336392402649,
-0.7430546879768372,
-0.8309755921363831,
0.3678366541862488,
-1.067436695098877,
-0.5869230628013611,
0.09723643958568573,
2.364347219467163,
1.8646320104599,
-0.5902639627456665,
-0.2607514262199402,
-0.8581454157829285,
1.2298967838287354,
-0.22690708935260773,
0.20864860713481903,
2.1477580070495605,
-0.2931079864501953,
-1.0616296529769897,
1.3388744592666626,
-2.3541061878204346,
0.27673009037971497,
2.063305616378784,
0.352294385433197,
0.07381345331668854,
-1.4258928298950195,
-0.6171252727508545,
-0.2985459268093109,
-0.48180362582206726,
-1.2657588720321655,
0.7080903649330139,
-0.288404643535614,
-0.9051365256309509,
-1.4510537385940552,
0.05800267308950424,
-1.193863868713379,
-1.7882741689682007,
0.43495669960975647,
1.9152247905731201,
2.168707847595215,
-0.7487236857414246,
1.3499233722686768,
-0.2845335304737091,
0.03087994083762169,
1.213003158569336,
1.379202127456665,
3.0852837562561035,
1.7598016262054443,
-1.355522632598877,
0.7458599209785461,
-0.1976272016763687,
-0.47500646114349365,
1.1565396785736084,
-1.1219202280044556,
1.145841360092163,
-0.1803685575723648,
-1.2193121910095215,
-1.2295525074005127,
0.9939686059951782,
0.4199833571910858,
0.03432032838463783,
-0.4951898157596588,
1.229032278060913,
0.11217594146728516,
1.3565950393676758,
0.6073147654533386,
-0.4181550443172455,
0.5231595635414124,
-0.3576556444168091,
-0.5977662801742554,
1.6338645219802856,
0.1501021832227707,
-1.4963529109954834,
-2.333639144897461,
-0.30722153186798096,
-0.9016781449317932,
-0.010687509551644325,
-0.5466517806053162,
-1.0610101222991943,
1.5945435762405396,
0.3786175847053528,
-1.3265459537506104,
-0.26807940006256104,
-0.31773877143859863,
-0.5262617468833923,
2.6084275245666504,
-1.2715030908584595,
-0.015422794967889786,
-0.9399087429046631,
-0.5227593779563904,
1.5834975242614746,
-1.1581717729568481,
-0.14744167029857635,
-1.012575387954712,
-0.709025502204895,
-1.402308702468872,
-0.5120536088943481,
0.08406025916337967,
-0.9904552698135376,
0.781160831451416,
0.14996013045310974,
-1.0447901487350464,
-0.2396213561296463,
-0.8463968634605408,
1.058620810508728,
-0.06998781859874725,
0.21517744660377502,
1.7786221504211426,
0.34830302000045776,
-0.4150794744491577,
0.7402137517929077,
1.2293002605438232,
0.6031027436256409,
-0.6980611681938171,
-0.00610653730109334,
-0.7758455872535706,
0.39804425835609436,
-1.3965946435928345,
0.2018526792526245,
-2.9807956218719482,
0.8150613307952881,
-0.16846132278442383,
-0.11640353500843048,
-0.05795539915561676,
-1.2833505868911743,
1.0882622003555298,
2.6097254753112793,
-1.1658484935760498,
0.4926721751689911,
0.45321404933929443,
1.0998538732528687,
-1.519242763519287,
0.20184090733528137,
-0.4862329661846161,
2.0868897438049316,
0.17539769411087036,
1.2915380001068115,
-0.6078699231147766,
-2.120194435119629,
0.6988933682441711,
-1.3398182392120361,
-1.0395410060882568,
0.8067374229431152,
-0.9455135464668274,
0.2935783565044403,
-1.4456039667129517,
-0.15834401547908783,
-0.9834262132644653,
-1.2140576839447021,
0.7124534249305725,
0.11518879979848862,
0.3729119896888733,
-0.5114369988441467,
0.3920787572860718,
-2.161098003387451,
-1.3703739643096924,
-0.2432362139225006,
-0.9947828054428101,
0.5629358291625977,
-0.3339143693447113,
0.600517988204956,
-0.06407301127910614,
0.047697827219963074,
0.38088735938072205,
1.3936618566513062,
3.3785762786865234,
0.08545415103435516,
0.19449125230312347,
-0.10147535055875778,
-1.045943021774292,
1.4838603734970093,
0.9236869215965271,
-0.048499710857868195,
-0.6791570782661438,
-1.056307315826416,
1.3084673881530762,
2.0071451663970947,
1.1982910633087158,
0.06802266091108322,
-0.9508942365646362,
-0.7327333092689514,
0.04283050820231438,
0.24189415574073792,
0.5549428462982178,
0.9587024450302124,
-0.14414484798908234,
0.08849026262760162,
1.42325758934021,
1.1546473503112793,
-0.29269376397132874,
0.328775018453598,
-0.8825366497039795,
-0.4255988597869873,
0.38524535298347473,
0.13324584066867828,
0.09813997149467468,
0.5637328624725342,
-1.0505293607711792,
-0.31494536995887756,
-0.22604088485240936,
-0.8705289959907532,
-0.7580565810203552,
-0.45593389868736267,
-0.4487423002719879,
1.5743627548217773,
0.0887870118021965,
-0.39266249537467957,
0.1024918332695961,
-0.7076830863952637,
-0.2314136028289795,
-1.1570284366607666,
0.15089325606822968,
-0.09311780333518982,
-0.09820862859487534,
-0.16016502678394318,
1.6842575073242188,
-0.9091814756393433,
-2.06441068649292,
0.1962001621723175,
0.3311033546924591,
-0.3195960223674774,
0.16571825742721558,
1.7005057334899902,
0.5164058208465576,
1.3737016916275024,
1.2496939897537231,
0.9682319164276123,
-0.6066795587539673,
-1.2210270166397095,
0.7292693257331848,
0.9464666247367859,
-1.315518856048584,
0.97993403673172,
-0.22736524045467377,
-0.5828014612197876,
0.7379649877548218,
1.4152013063430786,
0.44604727625846863,
-2.0016517639160156,
0.9206701517105103,
-0.9147189259529114,
0.6833425760269165,
0.6115587949752808,
0.8215890526771545,
0.2963011562824249,
0.8472614288330078,
-1.2848474979400635,
-1.114780068397522,
-0.7092503309249878,
-0.5804856419563293,
2.001499652862549,
-0.15432588756084442,
0.5757485032081604,
-0.18883474171161652,
-1.1911325454711914,
-0.17303971946239471,
0.818632960319519,
0.395535945892334,
-0.34022969007492065,
0.8575233221054077,
-0.6489068269729614,
-0.9655493497848511,
-1.3184787034988403,
-0.3599017858505249,
-1.0189118385314941,
-0.8439468741416931,
1.0841717720031738,
0.735773503780365,
0.40260353684425354,
1.9218934774398804,
0.5473673343658447,
0.3824332654476166,
-2.579993724822998,
0.8757455348968506,
0.30390864610671997,
-0.08503852039575577,
0.9048337340354919,
0.2234390825033188,
1.2003916501998901,
0.05971516668796539,
0.6235750913619995,
-2.342715263366699,
2.171428918838501,
-0.20203199982643127,
0.6623594164848328,
0.01101007778197527,
-0.18682734668254852,
1.1223348379135132,
0.5782725811004639,
0.5534058213233948,
-1.1053712368011475,
0.6908801794052124,
-0.5128390789031982,
1.0954476594924927,
1.0082706212997437,
-0.8450088500976562,
0.11900485306978226,
1.3853778839111328,
0.5124476552009583,
-0.3366546332836151,
-0.8743208646774292,
-0.7401787042617798,
1.0247808694839478,
1.7267411947250366,
-0.14896616339683533,
0.004585621878504753,
0.8456034064292908,
0.6696705222129822,
-1.246425747871399,
0.05562189221382141,
-0.6503968834877014,
-0.7120242118835449,
1.69661283493042,
2.049149513244629,
-0.06877164542675018,
-0.23844487965106964,
-0.8290425539016724,
-1.2374600172042847,
0.7833438515663147,
-0.0920996218919754,
0.11769870668649673,
0.6623785495758057,
-0.6748499274253845,
1.1409565210342407,
0.6691548228263855,
0.9674217104911804,
-0.027138065546751022,
0.35525986552238464,
0.43260037899017334,
-0.3111528158187866,
-1.1503766775131226,
-0.41122904419898987,
-1.0883245468139648,
-2.70896053314209,
0.4730217754840851,
-0.3292430639266968,
-1.4530720710754395,
-0.014412175863981247,
-1.0002814531326294,
0.8732544779777527,
-0.6310662627220154,
-1.1219046115875244,
-1.4872888326644897,
0.38719186186790466,
-0.19506865739822388,
0.9642035365104675,
-1.6466914415359497,
-0.19691403210163116,
1.2427773475646973,
0.8353472352027893,
-0.5408964157104492,
0.9628387689590454,
0.21162325143814087,
0.957328736782074,
0.7297091484069824,
-0.48902812600135803,
0.6430620551109314,
0.07310400903224945,
-1.3544981479644775,
0.3769705593585968,
1.2293533086776733,
0.1933280974626541,
1.4011319875717163,
-0.4781719148159027,
0.13825736939907074,
0.48994961380958557,
-0.6412942409515381,
-0.5902299284934998,
-0.3720631003379822,
0.7552188634872437,
0.07321975380182266,
-1.09889817237854,
-0.12181512266397476,
-0.1353844851255417,
-0.3222619891166687,
0.17933808267116547,
-1.3412240743637085,
-0.38157734274864197,
-0.39598333835601807,
-0.4317806363105774,
-1.3635555505752563,
0.0067587075755000114,
1.332490086555481,
-0.7751100063323975,
-0.26161104440689087,
0.3853704631328583,
0.38495463132858276,
0.5963348150253296,
0.5704689621925354,
-0.8082180023193359,
-0.33256322145462036,
-0.3447295129299164,
-0.31950315833091736,
0.26928678154945374,
1.2364983558654785,
-0.030783671885728836,
-1.0038574934005737,
0.6525375247001648,
-0.31870198249816895,
0.1997300386428833,
2.0402991771698,
0.0754787027835846,
-0.6676672101020813,
0.37347039580345154,
-0.6179066896438599,
1.6999688148498535,
1.6376588344573975,
1.2509551048278809,
-0.09858302026987076,
-0.7940450310707092,
0.5474482178688049,
-0.25051915645599365,
-0.2738952040672302,
0.9518827199935913,
0.3957599699497223,
-0.15800660848617554,
-1.549858808517456,
0.6128879189491272,
1.3279412984848022,
-0.8639841675758362,
-0.733076274394989,
0.03027624636888504,
-0.9436469078063965,
1.125028133392334,
0.544475793838501,
0.3056338429450989,
0.2518047094345093,
1.5341376066207886,
0.707027018070221,
-0.45074501633644104,
0.45451149344444275,
0.44517388939857483,
-0.2239575982093811,
-2.199134349822998,
-1.0033879280090332,
0.29942721128463745,
-0.3952609896659851,
-1.522650122642517,
1.3714607954025269,
-1.1030797958374023,
-1.0297746658325195,
0.5550046563148499,
0.11251622438430786,
1.3324363231658936,
0.3950240910053253,
1.6560542583465576,
2.158811569213867,
0.8645703792572021,
0.29535767436027527,
1.276474952697754,
-0.08827270567417145,
-0.45218753814697266,
1.8673055171966553,
-0.3900164067745209,
0.4718846380710602,
1.0073113441467285,
-0.35983654856681824,
-1.0614235401153564,
-0.8062405586242676,
-1.1249374151229858,
-0.6469932198524475,
1.222204566001892,
0.1556980013847351,
-1.0639463663101196,
0.16250891983509064,
1.591018795967102,
0.17137666046619415,
-0.2387220859527588,
0.7320772409439087,
0.4858528673648834,
-0.6991498470306396,
-0.08405724167823792,
-0.8904040455818176,
0.42508259415626526,
-0.1497533619403839,
-0.2949028015136719,
0.17309877276420593,
0.5793973803520203,
1.3368710279464722,
-0.12863484025001526,
0.12297389656305313,
1.1207081079483032,
-1.302798867225647,
1.5060279369354248,
-0.473995566368103,
0.3167865574359894,
-2.4939234256744385,
1.384676218032837,
-0.8426011204719543,
1.9429235458374023,
-2.5167624950408936,
0.45164111256599426,
-0.45794418454170227,
-0.41052916646003723,
0.2626776397228241,
-0.43846431374549866,
0.12683166563510895,
-0.11308661848306656,
-0.967157781124115,
-0.06185349076986313,
-0.714849054813385,
0.6358569860458374,
1.172242522239685,
1.362501621246338,
-1.173586130142212,
-0.30061039328575134,
-1.7571110725402832,
-0.22690869867801666,
-0.8105800151824951,
0.23971495032310486,
-2.0096569061279297,
-0.19891802966594696,
-1.9834990501403809,
-2.2857937812805176,
-1.3931221961975098,
-0.9060900211334229,
1.1327143907546997,
0.22736190259456635,
-0.9508140683174133,
1.1233915090560913,
-0.34711238741874695,
-1.8582724332809448,
1.1378493309020996,
-2.2599523067474365
] |
https://github.com/huggingface/datasets/issues/3369 | [Audio] Allow resampling for audio datasets in streaming mode | This requires implementing `cast_column` for iterable datasets, it could be a very nice addition !
<s>It can also be useful to be able to disable the audio/image decoding for the dataset viewer (see PR https://github.com/huggingface/datasets/pull/3430) cc @severo </s>
EDIT: actually following https://github.com/huggingface/datasets/issues/3145 the dataset viewer might not need it anymore | Many audio datasets like Common Voice always need to be resampled. This can very easily be done in non-streaming mode as follows:
```python
from datasets import load_dataset
ds = load_dataset("common_voice", "ab", split="test")
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
```
However in streaming mode it fails currently:
```python
from datasets import load_dataset
ds = load_dataset("common_voice", "ab", split="test", streaming=True)
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
```
with the following error:
```
AttributeError: 'IterableDataset' object has no attribute 'cast_column'
```
It would be great if we could add such a feature (I'm not 100% sure though how complex this would be) | 1,077 | 50 | [Audio] Allow resampling for audio datasets in streaming mode
Many audio datasets like Common Voice always need to be resampled. This can very easily be done in non-streaming mode as follows:
```python
from datasets import load_dataset
ds = load_dataset("common_voice", "ab", split="test")
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
```
However in streaming mode it fails currently:
```python
from datasets import load_dataset
ds = load_dataset("common_voice", "ab", split="test", streaming=True)
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
```
with the following error:
```
AttributeError: 'IterableDataset' object has no attribute 'cast_column'
```
It would be great if we could add such a feature (I'm not 100% sure though how complex this would be)
This requires implementing `cast_column` for iterable datasets, it could be a very nice addition !
<s>It can also be useful to be able to disable the audio/image decoding for the dataset viewer (see PR https://github.com/huggingface/datasets/pull/3430) cc @severo </s>
EDIT: actually following https://github.com/huggingface/datasets/issues/3145 the dataset viewer might not need it anymore | [
-1.2359542846679688,
-0.8821073174476624,
-0.7264036536216736,
1.501044511795044,
-0.15643198788166046,
-1.20487642288208,
0.15829642117023468,
-1.0484825372695923,
1.6961041688919067,
-0.822332501411438,
0.40703022480010986,
-1.68924081325531,
-0.012030795216560364,
-0.5934769511222839,
-0.8282032012939453,
-0.8584727048873901,
-0.4981759488582611,
-0.6847200393676758,
0.913546621799469,
2.4407458305358887,
1.3062341213226318,
-1.3819924592971802,
2.6505439281463623,
0.6586433053016663,
-0.15443500876426697,
-1.060914397239685,
0.41014233231544495,
-0.014424927532672882,
-1.2082792520523071,
-0.47097718715667725,
-0.8390255570411682,
-0.07138028740882874,
-0.5798853635787964,
-0.49561259150505066,
-0.04771709069609642,
0.4918031096458435,
-0.3823571801185608,
-0.3879897892475128,
-0.568676233291626,
-0.7998418807983398,
0.4743713438510895,
-0.35254305601119995,
0.9875442981719971,
-0.34440186619758606,
1.8039542436599731,
-0.6316056847572327,
0.40503472089767456,
0.6554672718048096,
1.327103614807129,
0.20342585444450378,
0.02661912515759468,
0.2982385456562042,
0.34812572598457336,
0.014891245402395725,
0.6347772479057312,
1.1371982097625732,
0.7098315954208374,
0.5014839768409729,
0.7272573113441467,
-2.201962947845459,
1.190094232559204,
-1.034058690071106,
0.27092111110687256,
1.389242172241211,
-0.8421292901039124,
0.2934729754924774,
-1.7949306964874268,
-0.043266620486974716,
0.5660679340362549,
-2.2274084091186523,
0.28475281596183777,
-1.3789502382278442,
-0.47973912954330444,
1.148266077041626,
0.2935069799423218,
-1.2491540908813477,
0.18482886254787445,
-0.2780821621417999,
1.011059284210205,
0.4692988991737366,
1.078744888305664,
-1.6556103229522705,
0.026227332651615143,
-0.2974599599838257,
0.10456828773021698,
-1.2184919118881226,
-1.5008347034454346,
0.47317615151405334,
0.49867868423461914,
0.6756988167762756,
-0.10563986003398895,
1.0302486419677734,
-0.9907103180885315,
0.8277063369750977,
-1.087290644645691,
-1.5914496183395386,
-1.4640766382217407,
-2.287043333053589,
-2.3138267993927,
0.8286489844322205,
-0.4795285761356354,
-0.504983127117157,
1.9506936073303223,
-0.9859253764152527,
-1.7419439554214478,
1.1709442138671875,
0.33405640721321106,
0.05802036449313164,
2.384244918823242,
0.16664429008960724,
-0.7868357300758362,
0.5063834190368652,
-0.6730693578720093,
0.8295576572418213,
-0.3153437376022339,
1.3754184246063232,
0.5344238877296448,
-1.111880898475647,
1.6381251811981201,
-0.5640908479690552,
0.5504665970802307,
-0.5796695947647095,
-0.6167755722999573,
-0.796178936958313,
0.3161228597164154,
1.7983473539352417,
-0.2589258849620819,
1.5828522443771362,
-0.3208739161491394,
-1.573603868484497,
-1.597210168838501,
0.9071490168571472,
0.39552801847457886,
-0.7904056906700134,
0.027892939746379852,
-0.3393762707710266,
0.14451484382152557,
-0.09684856981039047,
1.2296453714370728,
1.2004387378692627,
0.6685625314712524,
-0.37876173853874207,
-0.784982442855835,
0.22803352773189545,
0.03420472890138626,
-0.7629719972610474,
-1.6726350784301758,
-0.38619542121887207,
0.21052105724811554,
0.571045994758606,
-1.185098648071289,
1.789172887802124,
0.9234026074409485,
1.7545870542526245,
1.0413974523544312,
-0.24988998472690582,
1.5115313529968262,
0.03915853053331375,
1.9150630235671997,
-0.5502681136131287,
0.5818166732788086,
-0.3258362412452698,
-1.1979618072509766,
0.7585610747337341,
-0.32029908895492554,
-2.132612943649292,
-0.8593771457672119,
-0.7843495011329651,
-0.16044731438159943,
-0.7960606217384338,
0.8812992572784424,
-0.3361416459083557,
-1.449109673500061,
0.22209346294403076,
-0.678747296333313,
0.19459867477416992,
-1.2509825229644775,
0.33166173100471497,
0.7481504678726196,
-0.7175304293632507,
0.0032869474962353706,
-0.22157523036003113,
-1.210758090019226,
-0.39553946256637573,
0.27275970578193665,
1.937731146812439,
-0.685258686542511,
0.8263081908226013,
1.0179120302200317,
-0.7437705993652344,
0.03533842787146568,
0.2634980082511902,
-0.24861687421798706,
0.8008703589439392,
-1.0172778367996216,
-0.511056125164032,
1.2345075607299805,
-0.17580433189868927,
-0.6731934547424316,
1.491180419921875,
0.7945148944854736,
-0.9279276728630066,
-0.16445769369602203,
-0.2219250351190567,
-0.7801499962806702,
-0.03909153863787651,
-1.5281332731246948,
-0.06702619045972824,
0.4095752239227295,
-1.444033145904541,
-0.4498143494129181,
-0.16459399461746216,
1.2145498991012573,
-0.35915398597717285,
1.4570562839508057,
-0.350297749042511,
-0.16591045260429382,
-0.3347979187965393,
-0.45262134075164795,
0.07910549640655518,
-0.11488393694162369,
-0.7249162793159485,
0.14157596230506897,
-0.7500943541526794,
0.3794277310371399,
1.4396060705184937,
0.36304596066474915,
0.022942837327718735,
0.4704599380493164,
1.151113510131836,
0.35630273818969727,
-0.018239501863718033,
-0.8461495041847229,
-1.5089625120162964,
1.9820770025253296,
-1.4300495386123657,
1.984311580657959,
0.6903223991394043,
-0.08820030093193054,
-1.669654369354248,
-1.78859281539917,
1.312160849571228,
1.1779756546020508,
2.364185094833374,
0.49463969469070435,
0.34692707657814026,
-0.8631249666213989,
-0.7635088562965393,
0.32098719477653503,
-1.0598992109298706,
-0.7427369952201843,
0.14650419354438782,
2.3827831745147705,
1.8303874731063843,
-0.47844845056533813,
-0.2684950828552246,
-1.0322812795639038,
1.369624376296997,
-0.2678995430469513,
0.22156450152397156,
1.9997587203979492,
-0.28913232684135437,
-1.161234736442566,
1.4188644886016846,
-2.397347927093506,
0.1818617433309555,
2.0527234077453613,
0.3834601938724518,
0.07167200744152069,
-1.3667347431182861,
-0.5884393453598022,
-0.28272196650505066,
-0.42405879497528076,
-1.2938365936279297,
0.4871004819869995,
-0.2581706941127777,
-0.7210793495178223,
-1.291642189025879,
0.18148468434810638,
-1.0871175527572632,
-1.5935403108596802,
0.289646178483963,
1.7894518375396729,
1.9529755115509033,
-0.7296153903007507,
1.5023077726364136,
-0.2767322063446045,
0.1953228861093521,
1.292116641998291,
1.3561805486679077,
3.187006950378418,
1.8970648050308228,
-1.2911101579666138,
0.6808141469955444,
-0.25578123331069946,
-0.5680025815963745,
1.3120931386947632,
-1.2460271120071411,
1.2273507118225098,
-0.1949346959590912,
-1.2384393215179443,
-1.2784473896026611,
0.8974711298942566,
0.5170448422431946,
0.062355976551771164,
-0.5734916925430298,
1.0951045751571655,
0.1196884736418724,
1.3894110918045044,
0.5871501564979553,
-0.38327494263648987,
0.5290219187736511,
-0.4356917440891266,
-0.5170255899429321,
1.5297898054122925,
0.1122519001364708,
-1.43858802318573,
-2.1901445388793945,
-0.14468654990196228,
-0.9382845759391785,
-0.06444860994815826,
-0.5485161542892456,
-0.9851474761962891,
1.6752746105194092,
0.3221491575241089,
-1.3538792133331299,
-0.20159868896007538,
-0.33347073197364807,
-0.4946887195110321,
2.780461072921753,
-1.3168047666549683,
-0.18490862846374512,
-1.0724400281906128,
-0.7185662984848022,
1.7607313394546509,
-1.0732721090316772,
-0.19224770367145538,
-1.0232384204864502,
-0.6664382219314575,
-1.4104912281036377,
-0.5167660117149353,
0.06939591467380524,
-0.9564558267593384,
0.8406084179878235,
0.2509533762931824,
-1.2254486083984375,
-0.45545560121536255,
-0.8820078372955322,
0.9250912666320801,
-0.1686004400253296,
0.24414712190628052,
1.9050108194351196,
0.4098166525363922,
-0.35577210783958435,
0.7335203289985657,
1.2230035066604614,
0.6373550295829773,
-0.5942602157592773,
0.2958008944988251,
-0.6857127547264099,
0.31234845519065857,
-1.4361424446105957,
0.19336342811584473,
-2.837596893310547,
0.6946923136711121,
-0.04810918867588043,
-0.11415968835353851,
-0.052656348794698715,
-1.2978225946426392,
1.0674679279327393,
2.576655626296997,
-1.1831053495407104,
0.5015664100646973,
0.41635817289352417,
1.1281033754348755,
-1.7101774215698242,
0.24348339438438416,
-0.48203372955322266,
2.0922861099243164,
0.15021966397762299,
1.2407307624816895,
-0.5184296369552612,
-2.272876262664795,
0.5883315205574036,
-1.2629258632659912,
-1.1730692386627197,
0.8823808431625366,
-0.893176794052124,
0.21573422849178314,
-1.4468307495117188,
-0.28765958547592163,
-0.9001262784004211,
-1.2204452753067017,
0.8877679705619812,
0.18283934891223907,
0.3778308629989624,
-0.5197861194610596,
0.3736739456653595,
-2.2526662349700928,
-1.345060110092163,
-0.17380814254283905,
-0.9481936097145081,
0.5505609512329102,
-0.36674562096595764,
0.6390156149864197,
-0.133327916264534,
-0.038668081164360046,
0.3955763578414917,
1.5206221342086792,
3.395876884460449,
0.2917577028274536,
0.34467074275016785,
-0.12562613189220428,
-0.9475888609886169,
1.4370946884155273,
0.8886567950248718,
-0.1518380492925644,
-0.47999703884124756,
-1.0587077140808105,
1.2215523719787598,
1.8142966032028198,
0.9925625920295715,
0.050090622156858444,
-0.7925115823745728,
-0.6922168731689453,
-0.06766898185014725,
0.1372479647397995,
0.4414762258529663,
0.9088766574859619,
0.04726798087358475,
0.1250646710395813,
1.3334192037582397,
1.1772760152816772,
-0.3218945860862732,
0.3226950466632843,
-0.8258189558982849,
-0.5113237500190735,
0.5707316994667053,
0.2157338559627533,
-0.0013362723402678967,
0.4508829414844513,
-1.0144126415252686,
-0.22418345510959625,
-0.33462148904800415,
-0.9106854200363159,
-0.7110126614570618,
-0.5139198303222656,
-0.3359294831752777,
1.534550428390503,
0.04167646914720535,
-0.5841065645217896,
0.019834499806165695,
-0.8981000185012817,
-0.24116075038909912,
-1.0344613790512085,
0.21730230748653412,
-0.10918427258729935,
-0.20679070055484772,
-0.1996055692434311,
1.6633538007736206,
-0.9574441909790039,
-2.0990073680877686,
0.183445543050766,
0.3349880278110504,
-0.26720187067985535,
0.16776956617832184,
1.5914983749389648,
0.440576434135437,
1.4069687128067017,
1.304297685623169,
0.9620189070701599,
-0.5292625427246094,
-1.3128516674041748,
0.6983284950256348,
1.0308423042297363,
-1.3229129314422607,
0.8727306127548218,
-0.056057512760162354,
-0.4397621750831604,
0.6446905136108398,
1.1824243068695068,
0.426853209733963,
-1.863341212272644,
0.7289364337921143,
-0.8419150710105896,
0.7528213262557983,
0.6834714412689209,
0.734596312046051,
0.28214287757873535,
0.8962432146072388,
-1.229322075843811,
-1.136366844177246,
-0.6697424054145813,
-0.7117928862571716,
1.9087847471237183,
-0.2468741238117218,
0.6647756099700928,
-0.11570234596729279,
-1.2676140069961548,
-0.10455168038606644,
0.7650994658470154,
0.3852479159832001,
-0.5647506713867188,
0.8771457672119141,
-0.6639785170555115,
-0.914874255657196,
-1.3697298765182495,
-0.3680146336555481,
-1.0273128747940063,
-0.8636918067932129,
0.9515765905380249,
0.8681071400642395,
0.21067778766155243,
1.9012844562530518,
0.7149297595024109,
0.31246545910835266,
-2.6608047485351562,
0.8072711825370789,
0.21242833137512207,
-0.007607318460941315,
0.815173864364624,
0.38957300782203674,
0.9962411522865295,
-0.008221397176384926,
0.5885790586471558,
-2.447047472000122,
2.3288986682891846,
-0.3009563088417053,
0.6961547136306763,
0.009860645048320293,
-0.24480266869068146,
1.1057401895523071,
0.5909465551376343,
0.44495242834091187,
-1.101309061050415,
0.6365551948547363,
-0.5034359097480774,
1.2450292110443115,
0.9534464478492737,
-0.8856014013290405,
0.0017660995945334435,
1.4130475521087646,
0.37788185477256775,
-0.4976244270801544,
-1.0086721181869507,
-0.7794893980026245,
1.0230529308319092,
1.6279057264328003,
0.03646763041615486,
-0.10961408913135529,
0.973804235458374,
0.7405725717544556,
-1.2034837007522583,
0.09443933516740799,
-0.6942450404167175,
-0.7943258881568909,
1.761660099029541,
2.023219108581543,
-0.11479640007019043,
-0.28867313265800476,
-0.7190583348274231,
-1.1513961553573608,
0.8074322938919067,
0.05810121074318886,
0.1774684190750122,
0.747119665145874,
-0.7426561713218689,
1.069536566734314,
0.8813424110412598,
0.8841171860694885,
0.17108653485774994,
0.364413857460022,
0.43722185492515564,
-0.26880553364753723,
-1.2598049640655518,
-0.25077834725379944,
-1.200972557067871,
-2.666910409927368,
0.41280171275138855,
-0.2324126660823822,
-1.323951244354248,
0.08254926651716232,
-1.070678472518921,
0.9488764405250549,
-0.6500144004821777,
-1.2200262546539307,
-1.5250332355499268,
0.24034906923770905,
0.04059842973947525,
0.8849804401397705,
-1.658308506011963,
-0.1359526365995407,
1.1630548238754272,
0.9059823155403137,
-0.6297977566719055,
0.8920073509216309,
0.24774083495140076,
1.0954989194869995,
0.8878017663955688,
-0.4274073541164398,
0.5844240784645081,
-0.03637120500206947,
-1.430890679359436,
0.4005436301231384,
1.1562172174453735,
0.1885775774717331,
1.4808212518692017,
-0.47548699378967285,
0.12528149783611298,
0.41247910261154175,
-0.6563112139701843,
-0.4399409890174866,
-0.6163237690925598,
0.6647579073905945,
0.07715141773223877,
-0.9559624791145325,
-0.00918861199170351,
-0.04656171798706055,
-0.26316267251968384,
0.10915733128786087,
-1.480533242225647,
-0.18656384944915771,
-0.35202255845069885,
-0.5709956884384155,
-1.2562180757522583,
-0.0741812065243721,
1.391181230545044,
-0.846053421497345,
-0.1974797397851944,
0.5302382707595825,
0.2326219081878662,
0.5583980083465576,
0.5560164451599121,
-0.7758427262306213,
-0.3274364769458771,
-0.31404149532318115,
-0.3334518373012543,
0.2721182107925415,
1.3241932392120361,
-0.1122116893529892,
-0.9690510630607605,
0.7270002961158752,
-0.3471246659755707,
0.10747997462749481,
1.8841705322265625,
0.06270885467529297,
-0.7312111258506775,
0.3261491358280182,
-0.7380021214485168,
1.7972383499145508,
1.7471158504486084,
1.309851050376892,
-0.15457738935947418,
-0.894205629825592,
0.6742305159568787,
-0.4768741726875305,
-0.42228421568870544,
0.8344305157661438,
0.3694766163825989,
-0.15499861538410187,
-1.4310256242752075,
0.7307814359664917,
1.2604637145996094,
-0.8580856919288635,
-0.7454847097396851,
0.11935121566057205,
-0.9072195887565613,
1.0032832622528076,
0.5473759770393372,
0.3547287881374359,
0.35966628789901733,
1.6441190242767334,
0.7911086082458496,
-0.3107007145881653,
0.5503934025764465,
0.6449792385101318,
-0.179600790143013,
-2.165581703186035,
-1.1975290775299072,
0.31748586893081665,
-0.5153372287750244,
-1.6136518716812134,
1.3707724809646606,
-1.1373647451400757,
-0.9211535453796387,
0.6258268356323242,
0.08146145939826965,
1.4692915678024292,
0.37160277366638184,
1.5765858888626099,
2.0382843017578125,
0.8227241039276123,
0.3201453387737274,
1.286199927330017,
-0.06580709666013718,
-0.37295693159103394,
1.8673863410949707,
-0.4506908357143402,
0.5121802687644958,
1.0652508735656738,
-0.31304147839546204,
-1.1326810121536255,
-0.8030415177345276,
-1.33738112449646,
-0.7555356025695801,
1.2234270572662354,
0.055328618735075,
-1.070605754852295,
0.27190303802490234,
1.6524393558502197,
0.016103550791740417,
-0.3190191984176636,
0.7122241258621216,
0.3798639476299286,
-0.8333992958068848,
-0.06065762788057327,
-0.8389586806297302,
0.5150288343429565,
-0.14640967547893524,
-0.26813217997550964,
0.18923605978488922,
0.49533313512802124,
1.3608394861221313,
-0.009078721515834332,
0.05036880448460579,
1.1205049753189087,
-1.3853806257247925,
1.457578420639038,
-0.713158130645752,
0.38688012957572937,
-2.378530740737915,
1.4064548015594482,
-0.8099371790885925,
1.8862959146499634,
-2.588426351547241,
0.5468752384185791,
-0.548019528388977,
-0.5068430304527283,
0.31691068410873413,
-0.44460776448249817,
0.12844879925251007,
-0.10541296005249023,
-1.0382558107376099,
-0.011588571593165398,
-0.6662861108779907,
0.6632624268531799,
1.1477558612823486,
1.3992953300476074,
-1.168825626373291,
-0.37504830956459045,
-1.7584381103515625,
-0.1385134905576706,
-0.6677311658859253,
0.31350764632225037,
-2.031752586364746,
-0.13947254419326782,
-1.9451262950897217,
-2.3317649364471436,
-1.252907633781433,
-0.7189193964004517,
1.0962189435958862,
0.17095936834812164,
-0.8861513733863831,
1.2239916324615479,
-0.36962589621543884,
-1.8138254880905151,
1.1162784099578857,
-2.1818439960479736
] |
https://github.com/huggingface/datasets/issues/3369 | [Audio] Allow resampling for audio datasets in streaming mode | Just to clarify a bit. This feature is **always** needed when using the common voice dataset in streaming mode. So I think it's quite important | Many audio datasets like Common Voice always need to be resampled. This can very easily be done in non-streaming mode as follows:
```python
from datasets import load_dataset
ds = load_dataset("common_voice", "ab", split="test")
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
```
However in streaming mode it fails currently:
```python
from datasets import load_dataset
ds = load_dataset("common_voice", "ab", split="test", streaming=True)
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
```
with the following error:
```
AttributeError: 'IterableDataset' object has no attribute 'cast_column'
```
It would be great if we could add such a feature (I'm not 100% sure though how complex this would be) | 1,077 | 25 | [Audio] Allow resampling for audio datasets in streaming mode
Many audio datasets like Common Voice always need to be resampled. This can very easily be done in non-streaming mode as follows:
```python
from datasets import load_dataset
ds = load_dataset("common_voice", "ab", split="test")
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
```
However in streaming mode it fails currently:
```python
from datasets import load_dataset
ds = load_dataset("common_voice", "ab", split="test", streaming=True)
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
```
with the following error:
```
AttributeError: 'IterableDataset' object has no attribute 'cast_column'
```
It would be great if we could add such a feature (I'm not 100% sure though how complex this would be)
Just to clarify a bit. This feature is **always** needed when using the common voice dataset in streaming mode. So I think it's quite important | [
-1.2660454511642456,
-0.9017242193222046,
-0.7059783935546875,
1.4937045574188232,
-0.20470409095287323,
-1.2052913904190063,
0.20663993060588837,
-1.0730652809143066,
1.7331818342208862,
-0.9184597730636597,
0.42213505506515503,
-1.6676812171936035,
0.02191944047808647,
-0.6260905265808105,
-0.839763879776001,
-0.8723419904708862,
-0.464537650346756,
-0.6540271043777466,
0.924952507019043,
2.4459049701690674,
1.3079041242599487,
-1.3119850158691406,
2.6553213596343994,
0.6562912464141846,
-0.11996741592884064,
-1.048408031463623,
0.4216582477092743,
0.011802954599261284,
-1.1835730075836182,
-0.508904755115509,
-0.8537415266036987,
-0.11670272052288055,
-0.5831550359725952,
-0.5259830951690674,
-0.05763038247823715,
0.466657817363739,
-0.412565678358078,
-0.43027713894844055,
-0.5616823434829712,
-0.8249659538269043,
0.490717351436615,
-0.4066700041294098,
1.0079634189605713,
-0.43945011496543884,
1.7911818027496338,
-0.6936060190200806,
0.4110991060733795,
0.6762045621871948,
1.3200453519821167,
0.21259713172912598,
-0.020456910133361816,
0.32485926151275635,
0.3774985074996948,
0.002579711377620697,
0.6346285343170166,
1.0862622261047363,
0.6836065053939819,
0.5213718414306641,
0.7894093990325928,
-2.1998250484466553,
1.197493553161621,
-1.0943392515182495,
0.2574043273925781,
1.3605133295059204,
-0.8612871170043945,
0.2640230357646942,
-1.748623013496399,
-0.08515282720327377,
0.5625520944595337,
-2.2414932250976562,
0.32746827602386475,
-1.4105247259140015,
-0.5479345321655273,
1.1098277568817139,
0.35096004605293274,
-1.2147367000579834,
0.15303681790828705,
-0.24818462133407593,
0.9772933721542358,
0.43997254967689514,
1.0099643468856812,
-1.6592971086502075,
-0.001872781664133072,
-0.31078657507896423,
0.11232658475637436,
-1.2328002452850342,
-1.455146312713623,
0.5295512676239014,
0.4652208983898163,
0.6233834028244019,
-0.12713485956192017,
1.0366677045822144,
-1.039349913597107,
0.8138898611068726,
-1.1289132833480835,
-1.6129196882247925,
-1.4655537605285645,
-2.3095083236694336,
-2.274045467376709,
0.8321846723556519,
-0.4532588720321655,
-0.5631115436553955,
2.000237226486206,
-0.9935258626937866,
-1.7108570337295532,
1.2338179349899292,
0.2171328067779541,
0.053411632776260376,
2.3558261394500732,
0.1624264270067215,
-0.7854828834533691,
0.5060769319534302,
-0.7096695899963379,
0.8506673574447632,
-0.31228744983673096,
1.4145309925079346,
0.5031173229217529,
-1.0813674926757812,
1.6236517429351807,
-0.5300109386444092,
0.5971765518188477,
-0.525540828704834,
-0.6463803052902222,
-0.7671604156494141,
0.35352230072021484,
1.834284782409668,
-0.15622565150260925,
1.5758963823318481,
-0.2867353558540344,
-1.5868233442306519,
-1.6107945442199707,
0.957366943359375,
0.4002598524093628,
-0.7162425518035889,
0.023979712277650833,
-0.2826909124851227,
0.18788638710975647,
-0.12940910458564758,
1.3001350164413452,
1.246151089668274,
0.7359527349472046,
-0.38429445028305054,
-0.7619996070861816,
0.16962894797325134,
0.06012595444917679,
-0.763878345489502,
-1.6907888650894165,
-0.3887895345687866,
0.19026827812194824,
0.5973615646362305,
-1.1370967626571655,
1.7770419120788574,
0.9446917772293091,
1.7424025535583496,
1.034328579902649,
-0.1727924346923828,
1.478968858718872,
0.06372490525245667,
1.887402892112732,
-0.5658711194992065,
0.61956787109375,
-0.3408960998058319,
-1.111129879951477,
0.7856212854385376,
-0.323689341545105,
-2.1062302589416504,
-0.8815793991088867,
-0.8249744176864624,
-0.1634407341480255,
-0.8117117881774902,
0.9409135580062866,
-0.3537403345108032,
-1.3952982425689697,
0.27590009570121765,
-0.7383919954299927,
0.16910794377326965,
-1.1924995183944702,
0.3666175901889801,
0.7038236856460571,
-0.6856625080108643,
0.07844190299510956,
-0.195902481675148,
-1.193243145942688,
-0.37781015038490295,
0.2246289998292923,
1.9452286958694458,
-0.7581619024276733,
0.8161952495574951,
0.9858660697937012,
-0.7623639106750488,
-0.023533934727311134,
0.29362231492996216,
-0.2519921064376831,
0.7419611215591431,
-0.9709979295730591,
-0.48698434233665466,
1.212886095046997,
-0.19844883680343628,
-0.6447210311889648,
1.518754005432129,
0.7791414260864258,
-0.9120043516159058,
-0.08608758449554443,
-0.2821335196495056,
-0.8098175525665283,
-0.018085811287164688,
-1.5365262031555176,
-0.12210629880428314,
0.4478147625923157,
-1.441144585609436,
-0.46879830956459045,
-0.15581898391246796,
1.2009831666946411,
-0.3115832507610321,
1.415708065032959,
-0.3809434175491333,
-0.22229382395744324,
-0.29193761944770813,
-0.4567306935787201,
0.0971335768699646,
-0.06557931005954742,
-0.7414596080780029,
0.12473754584789276,
-0.7153397798538208,
0.3716512620449066,
1.4059454202651978,
0.29794028401374817,
0.019026562571525574,
0.46700891852378845,
1.1424795389175415,
0.35032153129577637,
-0.024179404601454735,
-0.8551357984542847,
-1.4922630786895752,
1.9668008089065552,
-1.4577451944351196,
1.9719377756118774,
0.6612265110015869,
-0.021507879719138145,
-1.6788487434387207,
-1.7708914279937744,
1.298091173171997,
1.2349464893341064,
2.3056697845458984,
0.5025371313095093,
0.30104705691337585,
-0.8547060489654541,
-0.7418510913848877,
0.3003263473510742,
-1.1307013034820557,
-0.6979782581329346,
0.10862239450216293,
2.3506598472595215,
1.8527957201004028,
-0.46975645422935486,
-0.22426040470600128,
-1.0360231399536133,
1.4190553426742554,
-0.2698732018470764,
0.23115696012973785,
1.9902403354644775,
-0.29030126333236694,
-1.145035743713379,
1.3922122716903687,
-2.3495688438415527,
0.11573337018489838,
2.102564573287964,
0.3590959310531616,
0.0910518690943718,
-1.3511043787002563,
-0.6092175245285034,
-0.33652767539024353,
-0.3461315333843231,
-1.3405200242996216,
0.4890996217727661,
-0.26977643370628357,
-0.6856658458709717,
-1.3182737827301025,
0.27286967635154724,
-1.061591625213623,
-1.596312403678894,
0.26309093832969666,
1.8138279914855957,
1.9882820844650269,
-0.695549726486206,
1.5062443017959595,
-0.30070245265960693,
0.20546458661556244,
1.3165425062179565,
1.3104487657546997,
3.1616196632385254,
1.9500340223312378,
-1.2401108741760254,
0.6493563652038574,
-0.2759953737258911,
-0.569551944732666,
1.3097443580627441,
-1.266469955444336,
1.2700003385543823,
-0.1139170229434967,
-1.145017385482788,
-1.2755767107009888,
0.8472030162811279,
0.49595704674720764,
0.02932744100689888,
-0.558835506439209,
1.0938408374786377,
0.04161892458796501,
1.3918291330337524,
0.581632137298584,
-0.3421100676059723,
0.548258900642395,
-0.4731643795967102,
-0.5182176828384399,
1.5457006692886353,
0.1740044504404068,
-1.4316290616989136,
-2.1686089038848877,
-0.12948963046073914,
-0.9043083190917969,
-0.009296135045588017,
-0.47249627113342285,
-0.9749389886856079,
1.6995676755905151,
0.2866761386394501,
-1.3090955018997192,
-0.19710089266300201,
-0.34198224544525146,
-0.5498706102371216,
2.8168017864227295,
-1.306776762008667,
-0.2471085488796234,
-1.1168550252914429,
-0.772228479385376,
1.7811416387557983,
-1.1557543277740479,
-0.20659653842449188,
-1.038985013961792,
-0.5212608575820923,
-1.3917326927185059,
-0.5144989490509033,
0.01709006167948246,
-0.9540889263153076,
0.8991256952285767,
0.2735789716243744,
-1.2396241426467896,
-0.5185185670852661,
-0.8961352109909058,
0.8785063028335571,
-0.13473226130008698,
0.23417219519615173,
1.8974140882492065,
0.2941180467605591,
-0.37162691354751587,
0.7090870141983032,
1.232381820678711,
0.6323397159576416,
-0.581479549407959,
0.294138103723526,
-0.6654888391494751,
0.2807154059410095,
-1.4140335321426392,
0.2713147699832916,
-2.8379180431365967,
0.6476023197174072,
-0.07308409363031387,
-0.16455677151679993,
-0.024767888709902763,
-1.3218345642089844,
1.1008628606796265,
2.536421775817871,
-1.2020002603530884,
0.5072696208953857,
0.32004639506340027,
1.1591466665267944,
-1.6971956491470337,
0.32642289996147156,
-0.4480540156364441,
2.0544612407684326,
0.22156132757663727,
1.2114331722259521,
-0.4939516484737396,
-2.339951515197754,
0.6684554815292358,
-1.2411532402038574,
-1.2469371557235718,
0.7962602376937866,
-0.862052321434021,
0.189420685172081,
-1.4252536296844482,
-0.2993046045303345,
-0.8729555606842041,
-1.1932663917541504,
0.8728355169296265,
0.2323366105556488,
0.36461740732192993,
-0.5129091739654541,
0.35051822662353516,
-2.2584826946258545,
-1.3600581884384155,
-0.21135243773460388,
-0.9023308753967285,
0.5740418434143066,
-0.39351511001586914,
0.6078912019729614,
-0.19785447418689728,
-0.021137114614248276,
0.4139944314956665,
1.5772147178649902,
3.4579312801361084,
0.20931419730186462,
0.37036481499671936,
-0.14665205776691437,
-0.9126636981964111,
1.4724493026733398,
0.8978667259216309,
-0.08749525994062424,
-0.4677041471004486,
-1.0883567333221436,
1.1729432344436646,
1.8038365840911865,
0.8787661790847778,
0.036649592220783234,
-0.7591350078582764,
-0.6574383974075317,
-0.05977160856127739,
0.12118306756019592,
0.46468788385391235,
0.9345887899398804,
0.13972361385822296,
0.06900657713413239,
1.357019305229187,
1.1262348890304565,
-0.3166272044181824,
0.2201872169971466,
-0.8077437877655029,
-0.5184767246246338,
0.601616621017456,
0.24304255843162537,
-0.10537675768136978,
0.3856983482837677,
-0.9745124578475952,
-0.22600173950195312,
-0.312885046005249,
-0.8789896965026855,
-0.7202818393707275,
-0.5214550495147705,
-0.33007562160491943,
1.5812902450561523,
0.04913651570677757,
-0.600948691368103,
-0.02317357435822487,
-0.8700543642044067,
-0.214407280087471,
-1.0607061386108398,
0.20209360122680664,
-0.1071477010846138,
-0.2915700674057007,
-0.18427543342113495,
1.6817617416381836,
-0.9154399633407593,
-2.039740800857544,
0.16984133422374725,
0.30210238695144653,
-0.23439918458461761,
0.1406034231185913,
1.5581080913543701,
0.4599003791809082,
1.4277822971343994,
1.3137106895446777,
0.9399330615997314,
-0.5068772435188293,
-1.3688329458236694,
0.6496214866638184,
0.950548529624939,
-1.353266954421997,
0.8272160291671753,
-0.0017249961383640766,
-0.4253822863101959,
0.6429640054702759,
1.1813310384750366,
0.5074605941772461,
-1.833311676979065,
0.6887905597686768,
-0.8926723003387451,
0.7646627426147461,
0.7510582208633423,
0.6957470178604126,
0.3378044068813324,
0.9457881450653076,
-1.1621530055999756,
-1.1558443307876587,
-0.7306565046310425,
-0.7594146728515625,
1.9204181432724,
-0.3031562864780426,
0.6730740070343018,
-0.18750162422657013,
-1.2636499404907227,
-0.0843895748257637,
0.7647541761398315,
0.3864116072654724,
-0.5275396108627319,
0.7845497131347656,
-0.6816080808639526,
-0.9470218420028687,
-1.4127042293548584,
-0.38258305191993713,
-1.0312752723693848,
-0.9299530982971191,
0.9530050754547119,
0.8889316320419312,
0.18883806467056274,
1.9338334798812866,
0.7872613668441772,
0.30856308341026306,
-2.594675302505493,
0.7880809307098389,
0.1751941591501236,
0.054914504289627075,
0.8332273960113525,
0.4370215833187103,
1.0127671957015991,
-0.011547314003109932,
0.541243314743042,
-2.4731216430664062,
2.3293333053588867,
-0.32729312777519226,
0.6517981290817261,
-0.0017084376886487007,
-0.2197558879852295,
1.1549564599990845,
0.5889776945114136,
0.41663220524787903,
-1.0082265138626099,
0.5983325242996216,
-0.5162854194641113,
1.3216273784637451,
0.9952172040939331,
-0.7890725135803223,
-0.0010067308321595192,
1.4290053844451904,
0.3841214179992676,
-0.5791381597518921,
-0.9774165153503418,
-0.8574252128601074,
0.9440454244613647,
1.5942327976226807,
0.017342453822493553,
-0.15858754515647888,
0.9083020687103271,
0.6927084922790527,
-1.202879786491394,
0.07413425296545029,
-0.6831718683242798,
-0.7920773029327393,
1.761842131614685,
2.0475666522979736,
-0.13080400228500366,
-0.26601773500442505,
-0.7080957889556885,
-1.1604340076446533,
0.8218643665313721,
0.09945932030677795,
0.1291338950395584,
0.7136187553405762,
-0.6775553226470947,
1.0130687952041626,
0.9581897258758545,
0.9028555154800415,
0.2466633915901184,
0.41368845105171204,
0.5157670974731445,
-0.2838968336582184,
-1.2369247674942017,
-0.29604586958885193,
-1.215287446975708,
-2.6840407848358154,
0.4509314298629761,
-0.31896939873695374,
-1.3330585956573486,
0.1043221578001976,
-1.112751841545105,
0.952616810798645,
-0.6409808397293091,
-1.1889405250549316,
-1.589021921157837,
0.16498716175556183,
0.09377530217170715,
0.8908275365829468,
-1.6417452096939087,
-0.1489448994398117,
1.1909085512161255,
0.8812013864517212,
-0.7023605108261108,
0.9334424734115601,
0.21843518316745758,
1.1543551683425903,
0.8728266954421997,
-0.4659264385700226,
0.5773463249206543,
-0.0871557667851448,
-1.4190866947174072,
0.48988908529281616,
1.151936650276184,
0.15916477143764496,
1.4717495441436768,
-0.4576330780982971,
0.11344370245933533,
0.40559324622154236,
-0.6755067110061646,
-0.4344443678855896,
-0.5846227407455444,
0.6879414319992065,
0.12969185411930084,
-0.8749812841415405,
-0.019472405314445496,
-0.025532875210046768,
-0.30261823534965515,
0.10568071901798248,
-1.483461856842041,
-0.17843875288963318,
-0.40044930577278137,
-0.6222765445709229,
-1.2766779661178589,
-0.14305081963539124,
1.4034634828567505,
-0.7778998613357544,
-0.17444689571857452,
0.5333172082901001,
0.2798033654689789,
0.5611402988433838,
0.5531308650970459,
-0.8301944732666016,
-0.33743616938591003,
-0.3230961561203003,
-0.31687432527542114,
0.30120009183883667,
1.3679053783416748,
-0.0806737020611763,
-1.0099923610687256,
0.6862754821777344,
-0.32162928581237793,
0.08866197615861893,
1.885918140411377,
0.024276208132505417,
-0.7383056879043579,
0.28906041383743286,
-0.7668466567993164,
1.8414851427078247,
1.7383382320404053,
1.2526828050613403,
-0.0926872044801712,
-0.8911051750183105,
0.6622430086135864,
-0.4240742325782776,
-0.4488670527935028,
0.7604160308837891,
0.4034407436847687,
-0.15007144212722778,
-1.3805783987045288,
0.7768851518630981,
1.236876368522644,
-0.8504551649093628,
-0.791427493095398,
0.13704495131969452,
-0.8539420366287231,
0.9807299375534058,
0.50810706615448,
0.4024549722671509,
0.40347015857696533,
1.7203741073608398,
0.8077296018600464,
-0.38149094581604004,
0.5463593006134033,
0.6795393228530884,
-0.18177491426467896,
-2.21976375579834,
-1.2014003992080688,
0.3502984046936035,
-0.5520995855331421,
-1.6666409969329834,
1.4529712200164795,
-1.1289045810699463,
-0.8805571794509888,
0.658902645111084,
0.1085679903626442,
1.4805219173431396,
0.3785228431224823,
1.5336090326309204,
1.9807549715042114,
0.8097540140151978,
0.41008588671684265,
1.2991557121276855,
-0.15380924940109253,
-0.41871219873428345,
1.8525508642196655,
-0.4402103126049042,
0.482361376285553,
1.086144208908081,
-0.2799408435821533,
-1.162100911140442,
-0.7789039611816406,
-1.3095179796218872,
-0.7262846231460571,
1.1753464937210083,
0.08260153979063034,
-1.0999565124511719,
0.25384366512298584,
1.6034013032913208,
0.0434117428958416,
-0.3730424642562866,
0.6140776872634888,
0.3616598844528198,
-0.8783618211746216,
-0.050793349742889404,
-0.9555150270462036,
0.5419976711273193,
-0.1744624376296997,
-0.30470460653305054,
0.23038305342197418,
0.49662336707115173,
1.3784300088882446,
-0.025954853743314743,
0.12466765940189362,
1.1015470027923584,
-1.412609577178955,
1.4558340311050415,
-0.6844198703765869,
0.39271581172943115,
-2.266930341720581,
1.3618742227554321,
-0.7999081611633301,
1.9620802402496338,
-2.610276699066162,
0.4915516674518585,
-0.5447766780853271,
-0.45911166071891785,
0.2786581218242645,
-0.4426509439945221,
0.12198446691036224,
-0.06755214929580688,
-1.132807970046997,
0.0877007469534874,
-0.6848212480545044,
0.6751581430435181,
1.1394928693771362,
1.435221791267395,
-1.1794116497039795,
-0.3469148278236389,
-1.73612380027771,
-0.13923068344593048,
-0.69087815284729,
0.2619803249835968,
-2.0564985275268555,
-0.11159643530845642,
-1.89039146900177,
-2.295548915863037,
-1.2132285833358765,
-0.737734317779541,
1.1241443157196045,
0.15927724540233612,
-0.8377410173416138,
1.1906075477600098,
-0.3669922351837158,
-1.8019921779632568,
1.143471598625183,
-2.135132074356079
] |
https://github.com/huggingface/datasets/issues/3365 | Add task tags for multimodal datasets | The Hub pulls these tags from [here](https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts) (allows multimodal tasks) now, so I'm closing this issue. | ## **Is your feature request related to a problem? Please describe.**
Currently, task tags are either exclusively related to text or speech processing:
- https://github.com/huggingface/datasets/blob/master/src/datasets/utils/resources/tasks.json
## **Describe the solution you'd like**
We should also add tasks related to:
- multimodality
- image
- video
CC: @VictorSanh @lewtun @lhoestq @merveenoyan @SBrandeis | 1,078 | 16 | Add task tags for multimodal datasets
## **Is your feature request related to a problem? Please describe.**
Currently, task tags are either exclusively related to text or speech processing:
- https://github.com/huggingface/datasets/blob/master/src/datasets/utils/resources/tasks.json
## **Describe the solution you'd like**
We should also add tasks related to:
- multimodality
- image
- video
CC: @VictorSanh @lewtun @lhoestq @merveenoyan @SBrandeis
The Hub pulls these tags from [here](https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts) (allows multimodal tasks) now, so I'm closing this issue. | [
-1.170346975326538,
-0.9606967568397522,
-0.8132089376449585,
1.5301703214645386,
-0.16972915828227997,
-1.337476372718811,
-0.006089098751544952,
-1.0248371362686157,
1.6082614660263062,
-0.6524973511695862,
0.26247909665107727,
-1.636024832725525,
-0.13055524230003357,
-0.5060902833938599,
-0.7712128162384033,
-0.771247148513794,
-0.4063926637172699,
-0.7780477404594421,
0.9539273381233215,
2.5266473293304443,
1.2511454820632935,
-1.2631888389587402,
2.821033477783203,
0.6279491782188416,
-0.27095848321914673,
-1.0161468982696533,
0.6065499186515808,
0.038640446960926056,
-1.1247164011001587,
-0.4454217851161957,
-0.9621853828430176,
-0.05140030011534691,
-0.48162198066711426,
-0.438740074634552,
0.17330047488212585,
0.4010477662086487,
-0.06092226132750511,
-0.23680445551872253,
-0.627270519733429,
-0.7018606662750244,
0.53562331199646,
-0.29358676075935364,
0.8499951958656311,
-0.35598957538604736,
1.777895212173462,
-0.6953877210617065,
0.3264216482639313,
0.637821614742279,
1.423973798751831,
0.16023339331150055,
0.04451873525977135,
0.3328121602535248,
0.38452866673469543,
0.044871341437101364,
0.47172147035598755,
1.182717204093933,
0.5484750866889954,
0.5443827509880066,
0.5866447687149048,
-2.127889633178711,
1.3710743188858032,
-0.926459550857544,
0.22307439148426056,
1.472842812538147,
-1.0102849006652832,
0.3882450759410858,
-1.786307692527771,
-0.06853478401899338,
0.5195083618164062,
-2.3282687664031982,
0.16712318360805511,
-1.1438487768173218,
-0.6299572587013245,
0.8654364347457886,
0.28558605909347534,
-1.3242013454437256,
0.1476629078388214,
-0.5302466750144958,
1.0464653968811035,
0.4612497389316559,
1.1134856939315796,
-1.6971919536590576,
-0.08195802569389343,
-0.22214125096797943,
-0.07605987787246704,
-1.294711709022522,
-1.5935693979263306,
0.5936700105667114,
0.4951198697090149,
0.7682552933692932,
-0.09373880922794342,
0.7982650399208069,
-0.9399080276489258,
0.9593268036842346,
-0.8379814624786377,
-1.6258039474487305,
-1.430091381072998,
-2.3840208053588867,
-2.1754584312438965,
0.9160833358764648,
-0.4958300292491913,
-0.5064327120780945,
1.9072942733764648,
-0.984862208366394,
-1.842434287071228,
1.080580711364746,
0.37504881620407104,
0.11468921601772308,
2.484306812286377,
0.39409756660461426,
-0.6783595085144043,
0.41104447841644287,
-0.7638524174690247,
0.9085644483566284,
-0.4304009974002838,
1.4651411771774292,
0.5341823101043701,
-0.9125190377235413,
1.6201361417770386,
-0.4491853415966034,
0.5202470421791077,
-0.722778856754303,
-0.5369588732719421,
-0.886400580406189,
0.3507261872291565,
2.005532741546631,
-0.3292003870010376,
1.576517105102539,
-0.4016778767108917,
-1.6493616104125977,
-1.4703370332717896,
0.8146919012069702,
0.6232172250747681,
-0.856514036655426,
0.16176730394363403,
-0.46747082471847534,
0.01604286953806877,
0.03177451714873314,
1.1352672576904297,
1.1544491052627563,
0.6573933362960815,
-0.32785746455192566,
-0.8599530458450317,
0.27182722091674805,
0.01863054186105728,
-0.7001915574073792,
-1.8867555856704712,
-0.2728770673274994,
0.27866843342781067,
0.6710649132728577,
-1.3327950239181519,
1.7329020500183105,
0.9679412841796875,
1.9763708114624023,
0.916955828666687,
-0.31803759932518005,
1.4297953844070435,
-0.07250408083200455,
1.8353511095046997,
-0.5135791897773743,
0.6755698919296265,
-0.338452011346817,
-1.1096842288970947,
0.7990928888320923,
-0.5194803476333618,
-1.995019793510437,
-0.834960401058197,
-1.0259499549865723,
-0.22292935848236084,
-0.8252794742584229,
1.0521858930587769,
-0.35329750180244446,
-1.2722187042236328,
0.08201279491186142,
-0.6968813538551331,
0.16744649410247803,
-1.293925404548645,
0.23720528185367584,
0.7932433485984802,
-0.6753821969032288,
-0.09798943996429443,
-0.1936684399843216,
-1.2807965278625488,
-0.6085650324821472,
0.26718461513519287,
1.9611399173736572,
-0.6650144457817078,
1.0140565633773804,
0.8520419001579285,
-0.724213719367981,
0.07066262513399124,
0.39944523572921753,
-0.312669575214386,
0.8903869986534119,
-1.0667212009429932,
-0.32272568345069885,
1.032158374786377,
-0.20122464001178741,
-0.6474276781082153,
1.472450852394104,
0.8993807435035706,
-0.9972560405731201,
-0.3038332462310791,
-0.2805444598197937,
-0.7869816422462463,
-0.06734777987003326,
-1.5551787614822388,
-0.28758567571640015,
0.14414069056510925,
-1.402845025062561,
-0.5349607467651367,
-0.3362312316894531,
1.3539667129516602,
-0.19886614382266998,
1.2967543601989746,
-0.20008724927902222,
-0.3366130292415619,
-0.45124807953834534,
-0.49497443437576294,
0.14938338100910187,
-0.17991773784160614,
-0.6829733848571777,
0.292316198348999,
-0.8344504237174988,
0.3886781632900238,
1.5857378244400024,
0.4774443507194519,
0.10047249495983124,
0.6504518389701843,
1.0581046342849731,
0.344378262758255,
-0.08482404798269272,
-0.9849295020103455,
-1.616944670677185,
2.022749423980713,
-1.5498980283737183,
1.9438531398773193,
0.8193486332893372,
-0.10254628956317902,
-1.743131399154663,
-1.896384358406067,
1.3581736087799072,
1.308785080909729,
2.38815975189209,
0.6395394206047058,
0.4446071982383728,
-0.8192641139030457,
-0.7500773668289185,
0.15136399865150452,
-1.0989384651184082,
-0.7843722701072693,
0.08690056204795837,
2.3060617446899414,
1.8434113264083862,
-0.6385412812232971,
-0.2525078356266022,
-0.9892309904098511,
1.1930614709854126,
-0.17861446738243103,
0.16016040742397308,
2.0853817462921143,
-0.35217729210853577,
-1.0189762115478516,
1.2113337516784668,
-2.2785913944244385,
0.20245110988616943,
1.958182692527771,
0.32958364486694336,
0.10888779163360596,
-1.498519778251648,
-0.733784019947052,
-0.2845771908760071,
-0.4268510937690735,
-1.23285710811615,
0.5330309867858887,
-0.3162062168121338,
-0.9148935675621033,
-1.552685260772705,
0.00276158656924963,
-1.12126624584198,
-1.7507284879684448,
0.5272198915481567,
1.879114031791687,
2.1262052059173584,
-0.8500362634658813,
1.372382402420044,
-0.2746546268463135,
0.16402465105056763,
1.3114206790924072,
1.2615007162094116,
3.0425212383270264,
1.8435786962509155,
-1.2166951894760132,
0.7704572677612305,
-0.13735461235046387,
-0.5331466197967529,
1.114758849143982,
-0.9165952205657959,
1.1387075185775757,
-0.2029753476381302,
-1.1452112197875977,
-1.2717772722244263,
0.9739447236061096,
0.48487523198127747,
0.0019461624324321747,
-0.585075318813324,
1.1602078676223755,
0.11629050225019455,
1.3126615285873413,
0.5843200087547302,
-0.3992750346660614,
0.5401954650878906,
-0.33948075771331787,
-0.42124930024147034,
1.6577681303024292,
0.10693252831697464,
-1.7158194780349731,
-2.353286027908325,
-0.20165447890758514,
-0.8901576995849609,
-0.12370725721120834,
-0.5777241587638855,
-1.062384009361267,
1.509055495262146,
0.515932559967041,
-1.1794720888137817,
-0.2839486598968506,
-0.3180980384349823,
-0.6150699257850647,
2.613848924636841,
-1.4178866147994995,
-0.19887253642082214,
-0.8761118650436401,
-0.412439227104187,
1.6859439611434937,
-1.1517337560653687,
-0.16212907433509827,
-1.0239710807800293,
-0.6968988180160522,
-1.3947601318359375,
-0.49455684423446655,
0.005513541400432587,
-0.8979454040527344,
0.6647109389305115,
-0.03800761327147484,
-0.9055030345916748,
-0.1949649155139923,
-0.837800145149231,
0.9207128286361694,
-0.13387365639209747,
0.2851810157299042,
1.9348689317703247,
0.4079897999763489,
-0.4056863486766815,
0.7097863554954529,
1.2881699800491333,
0.5994787216186523,
-0.7514494061470032,
0.010650969110429287,
-0.6284701228141785,
0.279864639043808,
-1.3844125270843506,
0.3235372304916382,
-2.966715097427368,
0.6682574152946472,
-0.1390686333179474,
-0.14107613265514374,
0.005467496812343597,
-1.33490788936615,
1.2492915391921997,
2.4938344955444336,
-1.2191530466079712,
0.474351704120636,
0.2911570966243744,
1.2562870979309082,
-1.5869579315185547,
0.28734758496284485,
-0.4054941236972809,
2.11833119392395,
0.1759345680475235,
1.1668540239334106,
-0.6376544237136841,
-2.0634820461273193,
0.6959964632987976,
-1.225926160812378,
-1.0562305450439453,
0.6010414958000183,
-0.8068640828132629,
0.22266563773155212,
-1.4752721786499023,
-0.03601403161883354,
-0.9217935800552368,
-1.315691351890564,
0.7496012449264526,
0.12071587890386581,
0.3581309914588928,
-0.6006945967674255,
0.35074737668037415,
-2.1710305213928223,
-1.3829295635223389,
-0.14571374654769897,
-0.9073561429977417,
0.4989442229270935,
-0.38535723090171814,
0.7020851969718933,
-0.056394148617982864,
0.14676238596439362,
0.2925301194190979,
1.4216368198394775,
3.3009724617004395,
0.13714724779129028,
0.37132343649864197,
-0.06848296523094177,
-0.9074960947036743,
1.5656321048736572,
1.0130481719970703,
-0.05799118056893349,
-0.4793238043785095,
-0.9585180282592773,
1.3843939304351807,
2.015235424041748,
1.1856600046157837,
0.1676458865404129,
-0.8742782473564148,
-0.6842987537384033,
0.05769285932183266,
0.2833373248577118,
0.4879528284072876,
0.9826751947402954,
-0.05363341048359871,
0.06160891428589821,
1.41878080368042,
1.2971141338348389,
-0.5101460814476013,
0.5260715484619141,
-0.9213945865631104,
-0.4242885410785675,
0.32989701628685,
0.22516606748104095,
-0.061009157449007034,
0.4439545273780823,
-1.1201848983764648,
-0.3795296251773834,
-0.19246898591518402,
-0.9226142764091492,
-0.7582979798316956,
-0.42548462748527527,
-0.5120987296104431,
1.605031967163086,
0.04811268672347069,
-0.42756345868110657,
-0.011290040798485279,
-0.8250630497932434,
-0.13715150952339172,
-1.102217435836792,
0.21332021057605743,
-0.11380448192358017,
-0.034353967756032944,
-0.16044984757900238,
1.8491688966751099,
-0.9674059748649597,
-2.1865897178649902,
0.29132336378097534,
0.32227516174316406,
-0.5726602673530579,
0.10064533352851868,
1.654217004776001,
0.5631460547447205,
1.3721684217453003,
1.319533109664917,
1.040127158164978,
-0.5795595049858093,
-1.2445608377456665,
0.6969775557518005,
0.9368470907211304,
-1.3919299840927124,
0.8000506162643433,
-0.17697016894817352,
-0.4724850356578827,
0.6796852946281433,
1.374242901802063,
0.32594209909439087,
-1.8828299045562744,
0.8487483263015747,
-0.761175811290741,
0.8555775284767151,
0.7365186214447021,
0.8376732468605042,
0.3349132537841797,
0.8852877020835876,
-1.2648898363113403,
-1.0836119651794434,
-0.9012030363082886,
-0.6262897849082947,
1.875197172164917,
-0.14892812073230743,
0.4426113963127136,
-0.2117534577846527,
-1.0863478183746338,
-0.08177629858255386,
0.7453104257583618,
0.415404349565506,
-0.24917007982730865,
0.8189482688903809,
-0.6074321866035461,
-1.1237530708312988,
-1.3189724683761597,
-0.4406663179397583,
-0.7931702733039856,
-0.9068183898925781,
1.0469532012939453,
0.8339529037475586,
0.4546705186367035,
1.952921986579895,
0.49723953008651733,
0.2432302087545395,
-2.638373613357544,
0.9260465502738953,
0.22179719805717468,
0.0990949496626854,
0.9185356497764587,
0.22378942370414734,
1.231926441192627,
0.0258726105093956,
0.4331156611442566,
-2.2363126277923584,
2.1609909534454346,
-0.12345393747091293,
0.7068507075309753,
0.0028925687074661255,
-0.10545168817043304,
1.1875666379928589,
0.6064190864562988,
0.5761402249336243,
-1.2327921390533447,
0.67061448097229,
-0.5851039290428162,
1.1311557292938232,
0.9395051002502441,
-0.8601368069648743,
0.10023200511932373,
1.3554564714431763,
0.6046803593635559,
-0.46200472116470337,
-0.9579579830169678,
-0.7427084445953369,
0.932959794998169,
1.7186864614486694,
-0.07607405632734299,
0.06624429672956467,
0.8609606027603149,
0.6065568923950195,
-1.2729823589324951,
0.02863173931837082,
-0.678083062171936,
-0.646801233291626,
1.7191963195800781,
2.0629193782806396,
-0.0010600043460726738,
-0.21353468298912048,
-0.7014420628547668,
-1.302971601486206,
0.770241916179657,
-0.08498857915401459,
0.17757093906402588,
0.7337417006492615,
-0.6288588643074036,
1.1975289583206177,
0.785495936870575,
0.9762871265411377,
-0.07667941600084305,
0.4048515856266022,
0.32188472151756287,
-0.3239624500274658,
-1.1795350313186646,
-0.3817620575428009,
-1.2415775060653687,
-2.5771851539611816,
0.4384002685546875,
-0.4664004445075989,
-1.338171362876892,
0.11879908293485641,
-1.097602128982544,
0.8026002645492554,
-0.6430309414863586,
-0.9420477747917175,
-1.5035722255706787,
0.22617538273334503,
-0.22544515132904053,
0.8650237917900085,
-1.609435796737671,
-0.13402999937534332,
1.3530563116073608,
0.7904869914054871,
-0.5593593716621399,
1.0273714065551758,
0.29440584778785706,
0.9798948764801025,
0.7307612895965576,
-0.38933271169662476,
0.4547981917858124,
0.12819984555244446,
-1.4473285675048828,
0.4566895663738251,
1.216933250427246,
0.2464417666196823,
1.3666585683822632,
-0.5238440036773682,
0.20085763931274414,
0.5654581189155579,
-0.5387132167816162,
-0.5612706542015076,
-0.4226209223270416,
0.6798713803291321,
0.14858531951904297,
-1.0359082221984863,
-0.006670024245977402,
-0.19402968883514404,
-0.2163577675819397,
0.2586740255355835,
-1.5144269466400146,
-0.40313878655433655,
-0.4404616057872772,
-0.4800906479358673,
-1.2637553215026855,
0.022856738418340683,
1.2742999792099,
-0.9151262640953064,
-0.2025555521249771,
0.48019838333129883,
0.3346521258354187,
0.5121715068817139,
0.7305806279182434,
-0.7041444182395935,
-0.2505720555782318,
-0.3136840760707855,
-0.33228781819343567,
0.27555349469184875,
1.100446105003357,
-0.12846866250038147,
-1.029058814048767,
0.5538988709449768,
-0.3069151043891907,
0.17433728277683258,
1.9471580982208252,
-0.08976546674966812,
-0.8077455163002014,
0.26202425360679626,
-0.6343472599983215,
1.9316071271896362,
1.443005919456482,
1.3070664405822754,
-0.16958418488502502,
-0.7640539407730103,
0.5613816976547241,
-0.037872884422540665,
-0.2608725428581238,
0.9012192487716675,
0.5142868757247925,
-0.22668175399303436,
-1.4265193939208984,
0.4398459792137146,
1.3870295286178589,
-0.9028517007827759,
-0.7338542938232422,
0.04077313840389252,
-0.9137069582939148,
1.165479063987732,
0.7030752897262573,
0.3870522081851959,
0.21147580444812775,
1.5821608304977417,
0.6916356086730957,
-0.5284616351127625,
0.36836791038513184,
0.4191276431083679,
-0.10239948332309723,
-2.086127519607544,
-0.9487531781196594,
0.21722431480884552,
-0.4176797568798065,
-1.4799401760101318,
1.2762466669082642,
-1.1229259967803955,
-0.8373844027519226,
0.590675950050354,
0.229140043258667,
1.446401834487915,
0.21863818168640137,
1.736380696296692,
1.9806253910064697,
0.7891234755516052,
0.23040153086185455,
1.3463845252990723,
-0.008170586079359055,
-0.5122566819190979,
1.7967225313186646,
-0.45418688654899597,
0.629240095615387,
1.019944667816162,
-0.4895073473453522,
-1.1932097673416138,
-0.8893565535545349,
-1.0829695463180542,
-0.6467550992965698,
1.1916550397872925,
0.19034352898597717,
-1.1384642124176025,
0.07834848016500473,
1.4874173402786255,
0.24143631756305695,
-0.24323013424873352,
0.5541983246803284,
0.40728580951690674,
-0.6541514992713928,
-0.008640160784125328,
-1.00116765499115,
0.5194094777107239,
-0.058941762894392014,
-0.3611038327217102,
0.2451740950345993,
0.46848931908607483,
1.1658705472946167,
-0.0759354755282402,
0.1660827398300171,
1.268985390663147,
-1.355505108833313,
1.5446451902389526,
-0.6080746054649353,
0.26424968242645264,
-2.491096258163452,
1.5023638010025024,
-0.8378493785858154,
1.8892731666564941,
-2.6214730739593506,
0.25858938694000244,
-0.579647421836853,
-0.43380990624427795,
0.2824547290802002,
-0.40408483147621155,
0.18370826542377472,
-0.128092423081398,
-0.978789210319519,
-0.05068635195493698,
-0.8174249529838562,
0.5313931703567505,
1.2921885251998901,
1.368503451347351,
-0.9826156497001648,
-0.29133594036102295,
-1.78266179561615,
-0.20508824288845062,
-0.8007950186729431,
0.33828824758529663,
-2.087231397628784,
-0.11451582610607147,
-1.8885687589645386,
-2.264382839202881,
-1.371507167816162,
-0.905694305896759,
1.1213852167129517,
0.1775357872247696,
-0.8839614391326904,
1.0864895582199097,
-0.3651654124259949,
-1.648748517036438,
1.0225961208343506,
-2.2405388355255127
] |
https://github.com/huggingface/datasets/issues/3358 | add new field, and get errors | Hi,
could you please post this question on our [Forum](https://discuss.huggingface.co/) as we keep issues for bugs and feature requests? | after adding new field **tokenized_examples["example_id"]**, and get errors below,
I think it is due to changing data to tensor, and **tokenized_examples["example_id"]** is string list
**all fields**
```
***************** train_dataset 1: Dataset({
features: ['attention_mask', 'end_positions', 'example_id', 'input_ids', 'start_positions', 'token_type_ids'],
num_rows: 87714
})
```
**Errors**
```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 705, in convert_to_tensors
tensor = as_tensor(value)
ValueError: too many dimensions 'str'
``` | 1,080 | 19 | add new field, and get errors
after adding new field **tokenized_examples["example_id"]**, and get errors below,
I think it is due to changing data to tensor, and **tokenized_examples["example_id"]** is string list
**all fields**
```
***************** train_dataset 1: Dataset({
features: ['attention_mask', 'end_positions', 'example_id', 'input_ids', 'start_positions', 'token_type_ids'],
num_rows: 87714
})
```
**Errors**
```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 705, in convert_to_tensors
tensor = as_tensor(value)
ValueError: too many dimensions 'str'
```
Hi,
could you please post this question on our [Forum](https://discuss.huggingface.co/) as we keep issues for bugs and feature requests? | [
-1.2188862562179565,
-1.08580482006073,
-0.5873335599899292,
1.509548544883728,
-0.2539823651313782,
-1.2988603115081787,
0.17058372497558594,
-0.9811598062515259,
1.6661549806594849,
-0.6390100121498108,
0.3303676247596741,
-1.6810978651046753,
-0.029090236872434616,
-0.7696167230606079,
-0.8154639601707458,
-0.7323383688926697,
-0.37399330735206604,
-0.8149871230125427,
0.9577664732933044,
2.409512519836426,
1.1661301851272583,
-1.4617040157318115,
2.7876334190368652,
0.6824549436569214,
-0.1905115246772766,
-1.0262858867645264,
0.4394585192203522,
0.03866736590862274,
-1.049499273300171,
-0.5952590703964233,
-0.8732891082763672,
-0.07843048870563507,
-0.4582146108150482,
-0.37248694896698,
0.13222083449363708,
0.4126708507537842,
-0.12982723116874695,
-0.3583281636238098,
-0.5388491749763489,
-0.7182379364967346,
0.44188809394836426,
-0.4965667426586151,
0.8944318294525146,
-0.494296133518219,
1.7508844137191772,
-0.704619824886322,
0.3192059099674225,
0.6385769248008728,
1.4521968364715576,
0.2240608185529709,
-0.046236660331487656,
0.33879902958869934,
0.4318072497844696,
-0.015725255012512207,
0.5139464139938354,
1.1852338314056396,
0.6236777305603027,
0.474006712436676,
0.7678283452987671,
-2.261986017227173,
1.3051669597625732,
-1.151075839996338,
0.31904715299606323,
1.414465308189392,
-0.8950156569480896,
0.44217684864997864,
-1.7964155673980713,
0.004087379202246666,
0.6388106346130371,
-2.4169857501983643,
0.29945915937423706,
-1.30879807472229,
-0.6479342579841614,
0.8381121158599854,
0.30976325273513794,
-1.3441438674926758,
0.1618681699037552,
-0.4566987454891205,
1.0273833274841309,
0.28371360898017883,
0.8620768785476685,
-1.829704999923706,
-0.14119853079319,
-0.09817208349704742,
0.0013714879751205444,
-1.3569867610931396,
-1.5408564805984497,
0.7438374757766724,
0.43940672278404236,
0.6524271368980408,
-0.12585389614105225,
0.948525071144104,
-1.1358333826065063,
0.9758155345916748,
-1.2115558385849,
-1.517501950263977,
-1.4721364974975586,
-2.3040339946746826,
-2.1558220386505127,
0.8864017724990845,
-0.4346622824668884,
-0.505887508392334,
1.7986795902252197,
-0.8317833542823792,
-1.627107858657837,
1.1807469129562378,
0.3538096845149994,
0.1978234201669693,
2.390855550765991,
0.15200108289718628,
-0.6289739012718201,
0.3451705873012543,
-0.8306694626808167,
0.8757845163345337,
-0.4046626389026642,
1.447991967201233,
0.44164934754371643,
-0.9408599734306335,
1.5909137725830078,
-0.40517476201057434,
0.5651588439941406,
-0.5991955995559692,
-0.6263688802719116,
-0.7823209166526794,
0.42776229977607727,
1.924248456954956,
-0.23019075393676758,
1.4628533124923706,
-0.4047888517379761,
-1.5474932193756104,
-1.4723427295684814,
0.960331380367279,
0.4562529921531677,
-0.9027570486068726,
0.01051405631005764,
-0.4808041751384735,
0.31120947003364563,
-0.2640450894832611,
1.2155388593673706,
1.2150739431381226,
0.5967788100242615,
-0.2843112647533417,
-0.766515851020813,
0.17367443442344666,
-0.13839195668697357,
-0.7663242816925049,
-1.8310813903808594,
-0.3998834788799286,
0.24451087415218353,
0.5976500511169434,
-1.2124789953231812,
1.6008068323135376,
0.8466001152992249,
1.9511231184005737,
0.9537081122398376,
-0.27971699833869934,
1.4550615549087524,
0.016879558563232422,
1.8520793914794922,
-0.8097384572029114,
0.659976065158844,
-0.34035995602607727,
-0.9653499722480774,
0.9566612243652344,
-0.4308011829853058,
-2.0625722408294678,
-0.7513318657875061,
-0.8603557348251343,
-0.28051474690437317,
-0.7433947324752808,
0.867439866065979,
-0.35742923617362976,
-1.4137356281280518,
0.1258963644504547,
-0.6872127652168274,
0.29207977652549744,
-1.1218641996383667,
0.3405252695083618,
0.8000310063362122,
-0.5651445388793945,
-0.1342950016260147,
-0.22787287831306458,
-1.2780202627182007,
-0.5877041220664978,
0.3092053234577179,
2.057607889175415,
-0.6470747590065002,
0.9145685434341431,
0.87477046251297,
-0.737199068069458,
0.03303853049874306,
0.24833427369594574,
-0.2970166802406311,
0.7214429378509521,
-1.15712571144104,
-0.5410800576210022,
1.0540249347686768,
-0.2533140480518341,
-0.42653602361679077,
1.526609182357788,
0.8950691223144531,
-1.0448378324508667,
-0.32397523522377014,
-0.3405570387840271,
-0.7864487767219543,
0.057809073477983475,
-1.5263999700546265,
-0.27148282527923584,
0.36318936944007874,
-1.4864591360092163,
-0.5191380381584167,
-0.16722972691059113,
1.2985166311264038,
-0.24737319350242615,
1.2767093181610107,
-0.3163960874080658,
-0.3787132799625397,
-0.20910604298114777,
-0.45366132259368896,
0.250296413898468,
-0.3109658360481262,
-0.6096223592758179,
0.10464711487293243,
-0.783881425857544,
0.41065025329589844,
1.4711025953292847,
0.3944210112094879,
-0.021200863644480705,
0.5094830989837646,
1.0572527647018433,
0.33683672547340393,
0.09423656761646271,
-0.9013707041740417,
-1.4752836227416992,
1.9977668523788452,
-1.5390868186950684,
1.9708261489868164,
0.6897687911987305,
-0.057237640023231506,
-1.5447592735290527,
-1.8483668565750122,
1.3466023206710815,
1.2018771171569824,
2.19207501411438,
0.536858081817627,
0.3545827269554138,
-0.8682187795639038,
-0.6826035976409912,
0.14879515767097473,
-1.0732331275939941,
-0.6120148301124573,
0.040034398436546326,
2.3972971439361572,
1.838579535484314,
-0.6461214423179626,
-0.25343701243400574,
-0.9808292984962463,
1.4759169816970825,
-0.29811325669288635,
0.3329017758369446,
2.072376012802124,
-0.27604806423187256,
-1.1186467409133911,
1.2433940172195435,
-2.406024932861328,
0.18957625329494476,
2.099604368209839,
0.39079809188842773,
0.25386181473731995,
-1.3246512413024902,
-0.5630702972412109,
-0.3810866177082062,
-0.3345727324485779,
-1.2852965593338013,
0.4705801010131836,
-0.2454017847776413,
-0.8253909945487976,
-1.4470150470733643,
0.17758174240589142,
-1.1510087251663208,
-1.5352739095687866,
0.47691670060157776,
1.9640328884124756,
2.086751937866211,
-0.6585979461669922,
1.49891996383667,
-0.2627292573451996,
0.11223559081554413,
1.297132134437561,
1.2989120483398438,
2.9935078620910645,
1.877454400062561,
-1.0644711256027222,
0.564527690410614,
-0.2989985942840576,
-0.43641313910484314,
1.1288055181503296,
-1.0304875373840332,
1.1251451969146729,
-0.06763548403978348,
-1.0647437572479248,
-1.2506756782531738,
0.9679890275001526,
0.5909022092819214,
-0.020535118877887726,
-0.5746539235115051,
1.1528452634811401,
0.0314333513379097,
1.363526701927185,
0.6359838843345642,
-0.3403782546520233,
0.4189338684082031,
-0.47697073221206665,
-0.5156557559967041,
1.6418169736862183,
0.23391897976398468,
-1.5862996578216553,
-2.339479923248291,
-0.1281460076570511,
-0.86332768201828,
0.06257107853889465,
-0.5864407420158386,
-1.1177870035171509,
1.6867542266845703,
0.35308709740638733,
-1.237944483757019,
-0.21516817808151245,
-0.3194650113582611,
-0.5919100046157837,
2.6695244312286377,
-1.3271602392196655,
-0.23927757143974304,
-0.9041780233383179,
-0.550227165222168,
1.7773443460464478,
-1.2505565881729126,
-0.1830299198627472,
-1.0276384353637695,
-0.5553067922592163,
-1.15632164478302,
-0.4314928650856018,
-0.07396426796913147,
-0.9760395288467407,
0.9440011382102966,
0.13980327546596527,
-1.1511479616165161,
-0.4428386688232422,
-0.9480921626091003,
0.8395236134529114,
-0.22593413293361664,
0.14582981169223785,
1.8647886514663696,
0.276467889547348,
-0.3115837275981903,
0.8157839179039001,
1.2503048181533813,
0.6566480994224548,
-0.6073178052902222,
0.1101943850517273,
-0.4297840893268585,
0.3814147412776947,
-1.3636828660964966,
0.3068481981754303,
-2.919957399368286,
0.6485270261764526,
-0.014991892501711845,
-0.11722671985626221,
-0.03880458325147629,
-1.414744257926941,
1.2107573747634888,
2.54801344871521,
-1.223990559577942,
0.4949866533279419,
0.3791491687297821,
1.22577965259552,
-1.7307204008102417,
0.3113643229007721,
-0.31294742226600647,
2.156045913696289,
0.18175466358661652,
1.1663750410079956,
-0.5771344900131226,
-2.2850801944732666,
0.6532728672027588,
-1.1599475145339966,
-1.1609501838684082,
0.3239220678806305,
-0.9153244495391846,
0.34258130192756653,
-1.7108625173568726,
-0.22461633384227753,
-0.9626854062080383,
-1.2068092823028564,
0.720068633556366,
0.09357170760631561,
0.23259691894054413,
-0.6159335374832153,
0.353730708360672,
-2.1089892387390137,
-1.449055790901184,
-0.25935065746307373,
-0.915374755859375,
0.687839686870575,
-0.46220698952674866,
0.6377381682395935,
0.006410593166947365,
0.11860924959182739,
0.20327217876911163,
1.6698527336120605,
3.3875060081481934,
0.14773237705230713,
0.36797040700912476,
-0.10879339277744293,
-0.8277797698974609,
1.3859050273895264,
0.9634690284729004,
0.17370976507663727,
-0.49338003993034363,
-1.0035772323608398,
1.5682247877120972,
2.0217092037200928,
0.9334285259246826,
0.16173489391803741,
-0.7610472440719604,
-0.6046249270439148,
-0.06795883178710938,
0.3251306712627411,
0.5027890801429749,
0.9657408595085144,
0.03406262770295143,
-0.023980244994163513,
1.2680461406707764,
1.1917537450790405,
-0.5053545236587524,
0.30908340215682983,
-0.9594697952270508,
-0.3796258270740509,
0.4228907823562622,
0.2221001237630844,
-0.09814678132534027,
0.43286535143852234,
-0.916812539100647,
-0.2909160852432251,
-0.22552424669265747,
-0.8285554647445679,
-0.687391459941864,
-0.4548783600330353,
-0.548130989074707,
1.6463172435760498,
0.17936182022094727,
-0.5388929843902588,
-0.049425821751356125,
-0.6365323066711426,
-0.014186562038958073,
-1.1707890033721924,
0.13628481328487396,
0.016714930534362793,
-0.09681977331638336,
-0.2930038869380951,
1.7247624397277832,
-0.7243865132331848,
-2.0996158123016357,
0.10899992287158966,
0.433797687292099,
-0.49851781129837036,
0.06620165705680847,
1.6774324178695679,
0.47414013743400574,
1.5268265008926392,
1.3609822988510132,
0.969963550567627,
-0.5055385828018188,
-1.2855502367019653,
0.6160956025123596,
0.9693923592567444,
-1.3695133924484253,
0.8252118825912476,
0.028884537518024445,
-0.43682047724723816,
0.7719132900238037,
1.4601762294769287,
0.4685836136341095,
-1.9747710227966309,
0.8342687487602234,
-1.1020302772521973,
0.9625188708305359,
0.7724394798278809,
0.6688655614852905,
0.4761524796485901,
0.9912613034248352,
-1.2581011056900024,
-1.1144816875457764,
-0.9504737854003906,
-0.6248345971107483,
2.0840725898742676,
-0.3229762613773346,
0.5057256817817688,
-0.19504587352275848,
-1.0953843593597412,
-0.1194935292005539,
0.774434506893158,
0.5563201904296875,
-0.1956620067358017,
0.8113784193992615,
-0.7412348389625549,
-0.9254622459411621,
-1.306852102279663,
-0.4336879849433899,
-0.9093952178955078,
-0.9824938774108887,
0.9939919114112854,
0.9114421606063843,
0.5344038009643555,
1.8895608186721802,
0.6606181859970093,
0.2383062243461609,
-2.4031105041503906,
0.8460391759872437,
0.2959442436695099,
-0.19722525775432587,
0.8807266354560852,
0.33409833908081055,
1.1653517484664917,
0.0768839418888092,
0.47253483533859253,
-2.433966875076294,
2.160675048828125,
-0.0772387683391571,
0.7233083248138428,
-0.020428366959095,
-0.07672697305679321,
1.2671074867248535,
0.5045724511146545,
0.36239004135131836,
-1.0260992050170898,
0.6231272220611572,
-0.5265192985534668,
1.2450919151306152,
0.9137594699859619,
-0.6612103581428528,
-0.010042124427855015,
1.3637646436691284,
0.4455050230026245,
-0.618776798248291,
-1.048455834388733,
-0.7863407731056213,
0.8338450789451599,
1.6375335454940796,
-0.15284091234207153,
-0.16862937808036804,
0.7528575658798218,
0.7279876470565796,
-1.094889521598816,
0.0385192446410656,
-0.6353877782821655,
-0.6791932582855225,
1.6818126440048218,
2.126041889190674,
-0.21622774004936218,
-0.12484459578990936,
-0.5761134028434753,
-1.2506530284881592,
0.6406349539756775,
-0.031024156138300896,
0.02064104750752449,
0.6645966172218323,
-0.5783416628837585,
1.0472888946533203,
0.7741644978523254,
0.9488248825073242,
-0.04482080787420273,
0.4846689701080322,
0.46464547514915466,
-0.44918203353881836,
-1.1306949853897095,
-0.4564818739891052,
-1.346488118171692,
-2.5987017154693604,
0.450435608625412,
-0.29657480120658875,
-1.356807827949524,
0.017250901088118553,
-1.1128754615783691,
1.0313860177993774,
-0.6845200061798096,
-1.2371543645858765,
-1.5573601722717285,
0.21312743425369263,
0.05076037719845772,
0.9702056646347046,
-1.708583950996399,
-0.21955233812332153,
1.1845874786376953,
0.6110697984695435,
-0.629784882068634,
0.8612128496170044,
0.2513698637485504,
1.1137949228286743,
0.6353824734687805,
-0.40526577830314636,
0.5335713624954224,
0.0066008903086185455,
-1.400998830795288,
0.7075423002243042,
1.247448444366455,
0.1465456783771515,
1.3779520988464355,
-0.38269346952438354,
0.13577769696712494,
0.44984760880470276,
-0.7106084227561951,
-0.5509545207023621,
-0.37373727560043335,
0.695572018623352,
0.06556032598018646,
-1.0071324110031128,
-0.07597795128822327,
-0.07777202129364014,
-0.3459043800830841,
0.20333467423915863,
-1.5200817584991455,
-0.33781954646110535,
-0.45107710361480713,
-0.4240710735321045,
-1.292611837387085,
-0.15393035113811493,
1.297723412513733,
-0.5339296460151672,
-0.2838098406791687,
0.6139405965805054,
0.545390248298645,
0.5469558835029602,
0.6503297686576843,
-0.7009164094924927,
-0.32923030853271484,
-0.3309130072593689,
-0.2997824549674988,
0.20197422802448273,
1.255631685256958,
-0.14794643223285675,
-1.0252838134765625,
0.6036998629570007,
-0.40876513719558716,
0.0256735160946846,
1.879054069519043,
-0.08798708021640778,
-0.7632697224617004,
0.36681437492370605,
-0.811508059501648,
1.9228752851486206,
1.5737253427505493,
1.1738479137420654,
-0.11629052460193634,
-0.9232908487319946,
0.5381982922554016,
-0.28937628865242004,
-0.4754231572151184,
0.672787606716156,
0.4450174868106842,
-0.27475932240486145,
-1.470715880393982,
0.6627578139305115,
1.313077688217163,
-0.868415355682373,
-0.9220161437988281,
0.2479606419801712,
-0.7919172644615173,
1.1804481744766235,
0.44051557779312134,
0.4124586284160614,
0.38748595118522644,
1.7389520406723022,
0.7149529457092285,
-0.4485255181789398,
0.3861030638217926,
0.6700810790061951,
-0.2824758291244507,
-2.12671160697937,
-1.3080531358718872,
0.25466984510421753,
-0.5043448805809021,
-1.5541753768920898,
1.3396097421646118,
-1.0102952718734741,
-0.8572074174880981,
0.6147632002830505,
0.2322983592748642,
1.3784594535827637,
0.4576959013938904,
1.6563879251480103,
1.9682116508483887,
0.7471863031387329,
0.42826175689697266,
1.3482131958007812,
-0.022926047444343567,
-0.6005051732063293,
1.9038429260253906,
-0.3539988696575165,
0.5326400995254517,
1.1040321588516235,
-0.29698771238327026,
-1.2836812734603882,
-0.7157215476036072,
-1.1965019702911377,
-0.6719461679458618,
1.1419994831085205,
0.08317522704601288,
-1.1795377731323242,
0.13596852123737335,
1.5456095933914185,
0.182949498295784,
-0.3374367952346802,
0.42317116260528564,
0.352036714553833,
-0.796496570110321,
-0.05061490833759308,
-1.0506569147109985,
0.49846935272216797,
-0.17239785194396973,
-0.2854231297969818,
0.3083016574382782,
0.7120231986045837,
1.2816541194915771,
-0.16952776908874512,
0.19104744493961334,
0.9868767857551575,
-1.525320053100586,
1.4584261178970337,
-0.6449602246284485,
0.31236931681632996,
-2.3989500999450684,
1.3661221265792847,
-0.6801981925964355,
2.0489444732666016,
-2.668562173843384,
0.3365693688392639,
-0.5877556800842285,
-0.3823275864124298,
0.2833661735057831,
-0.27844181656837463,
0.1591765582561493,
0.02968759462237358,
-1.1731079816818237,
0.2064305543899536,
-0.7280268669128418,
0.5905659794807434,
1.2726376056671143,
1.4550272226333618,
-1.1021997928619385,
-0.2190360575914383,
-1.750497579574585,
-0.049596987664699554,
-0.809924304485321,
0.23257501423358917,
-2.051828622817993,
-0.006222975440323353,
-1.843693733215332,
-2.0284130573272705,
-1.413027048110962,
-0.8468924164772034,
0.9923297762870789,
0.10714885592460632,
-0.8339057564735413,
1.2114750146865845,
-0.29255935549736023,
-1.638318419456482,
1.0122796297073364,
-2.1355812549591064
] |
https://github.com/huggingface/datasets/issues/3358 | add new field, and get errors | > Hi,
>
> could you please post this question on our [Forum](https://discuss.huggingface.co/) as we keep issues for bugs and feature requests?
ok. | after adding new field **tokenized_examples["example_id"]**, and get errors below,
I think it is due to changing data to tensor, and **tokenized_examples["example_id"]** is string list
**all fields**
```
***************** train_dataset 1: Dataset({
features: ['attention_mask', 'end_positions', 'example_id', 'input_ids', 'start_positions', 'token_type_ids'],
num_rows: 87714
})
```
**Errors**
```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 705, in convert_to_tensors
tensor = as_tensor(value)
ValueError: too many dimensions 'str'
``` | 1,080 | 23 | add new field, and get errors
after adding new field **tokenized_examples["example_id"]**, and get errors below,
I think it is due to changing data to tensor, and **tokenized_examples["example_id"]** is string list
**all fields**
```
***************** train_dataset 1: Dataset({
features: ['attention_mask', 'end_positions', 'example_id', 'input_ids', 'start_positions', 'token_type_ids'],
num_rows: 87714
})
```
**Errors**
```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 705, in convert_to_tensors
tensor = as_tensor(value)
ValueError: too many dimensions 'str'
```
> Hi,
>
> could you please post this question on our [Forum](https://discuss.huggingface.co/) as we keep issues for bugs and feature requests?
ok. | [
-1.2226227521896362,
-1.0790174007415771,
-0.5886132121086121,
1.5046247243881226,
-0.26661092042922974,
-1.2914067506790161,
0.17329493165016174,
-0.975682258605957,
1.671574592590332,
-0.6398158073425293,
0.31507596373558044,
-1.6953119039535522,
-0.031152639538049698,
-0.7539642453193665,
-0.8233639001846313,
-0.7384466528892517,
-0.37218600511550903,
-0.8326617479324341,
0.9523934125900269,
2.4008915424346924,
1.1714709997177124,
-1.4677748680114746,
2.7728404998779297,
0.669120192527771,
-0.19614391028881073,
-1.0316028594970703,
0.44028282165527344,
0.022346140816807747,
-1.078189492225647,
-0.6024415493011475,
-0.8630586862564087,
-0.0688570961356163,
-0.47708866000175476,
-0.37687960267066956,
0.14434628188610077,
0.4073670208454132,
-0.13237915933132172,
-0.346318781375885,
-0.5211120247840881,
-0.7325809597969055,
0.40996599197387695,
-0.4905683696269989,
0.8838033080101013,
-0.5024662613868713,
1.7504963874816895,
-0.7012441754341125,
0.334868848323822,
0.6317693591117859,
1.4395102262496948,
0.2256132811307907,
-0.03850109130144119,
0.33160898089408875,
0.4343094825744629,
-0.004478637594729662,
0.49694445729255676,
1.1665945053100586,
0.605888307094574,
0.4712899327278137,
0.750752329826355,
-2.280287265777588,
1.2984566688537598,
-1.1333898305892944,
0.32711857557296753,
1.4162261486053467,
-0.8743166923522949,
0.4425871968269348,
-1.8101012706756592,
0.013409798964858055,
0.6467651128768921,
-2.413235664367676,
0.294778436422348,
-1.3263074159622192,
-0.6463456749916077,
0.8182097673416138,
0.3081286549568176,
-1.3513256311416626,
0.1603267341852188,
-0.4525127410888672,
1.0288898944854736,
0.29845741391181946,
0.8700647950172424,
-1.8440769910812378,
-0.13944508135318756,
-0.10419993102550507,
0.017358312383294106,
-1.3462039232254028,
-1.560436725616455,
0.7548055052757263,
0.4529612064361572,
0.6591998934745789,
-0.10697969049215317,
0.9474552869796753,
-1.117965817451477,
0.9773114323616028,
-1.1958239078521729,
-1.520154356956482,
-1.4659974575042725,
-2.288257598876953,
-2.1578869819641113,
0.8744608759880066,
-0.46359139680862427,
-0.5035933256149292,
1.8123667240142822,
-0.8376641273498535,
-1.6393568515777588,
1.1816377639770508,
0.37188977003097534,
0.1818515956401825,
2.4074862003326416,
0.14244115352630615,
-0.620590090751648,
0.3304271399974823,
-0.8371057510375977,
0.8652985095977783,
-0.4028741717338562,
1.4352970123291016,
0.4247388541698456,
-0.9450303912162781,
1.6026726961135864,
-0.40746256709098816,
0.5694806575775146,
-0.6062820553779602,
-0.626714825630188,
-0.7984479665756226,
0.4082946479320526,
1.928598403930664,
-0.23568564653396606,
1.4636890888214111,
-0.4079268276691437,
-1.5387378931045532,
-1.4674025774002075,
0.9582123160362244,
0.4562952220439911,
-0.9330480098724365,
0.02365943230688572,
-0.4957824647426605,
0.30216845870018005,
-0.24957048892974854,
1.1947858333587646,
1.2163134813308716,
0.5997905135154724,
-0.2816878855228424,
-0.7719613313674927,
0.1724671572446823,
-0.1334650218486786,
-0.7592440247535706,
-1.8308817148208618,
-0.38716572523117065,
0.23435427248477936,
0.6180176138877869,
-1.2056695222854614,
1.5877985954284668,
0.8531217575073242,
1.9639599323272705,
0.9597250819206238,
-0.29202744364738464,
1.451933741569519,
0.03094983659684658,
1.8527196645736694,
-0.8080636262893677,
0.6693021059036255,
-0.34872663021087646,
-0.9506114721298218,
0.9651065468788147,
-0.41944465041160583,
-2.0471818447113037,
-0.7413858771324158,
-0.8507200479507446,
-0.2813754677772522,
-0.7407288551330566,
0.8628328442573547,
-0.33465564250946045,
-1.4109429121017456,
0.14525684714317322,
-0.6957058906555176,
0.30302244424819946,
-1.1390060186386108,
0.3456108570098877,
0.7961785197257996,
-0.5642333626747131,
-0.11516551673412323,
-0.23514458537101746,
-1.2974810600280762,
-0.5901212692260742,
0.301563560962677,
2.0486650466918945,
-0.6438708901405334,
0.9200178384780884,
0.8795145750045776,
-0.7283496260643005,
0.023780858144164085,
0.251839816570282,
-0.28244107961654663,
0.7393620014190674,
-1.1570148468017578,
-0.5179824233055115,
1.06039297580719,
-0.25990843772888184,
-0.42408451437950134,
1.5150716304779053,
0.8744035363197327,
-1.0350080728530884,
-0.32699263095855713,
-0.3397562801837921,
-0.7706410884857178,
0.05140465497970581,
-1.54274582862854,
-0.2513400614261627,
0.3606914281845093,
-1.496920108795166,
-0.5206553339958191,
-0.16655905544757843,
1.3099541664123535,
-0.22656917572021484,
1.277956247329712,
-0.3056202232837677,
-0.35919034481048584,
-0.22903354465961456,
-0.44957470893859863,
0.22686949372291565,
-0.32460102438926697,
-0.5938951969146729,
0.10143294185400009,
-0.772241473197937,
0.3992546498775482,
1.4773211479187012,
0.3835007846355438,
-0.03371373564004898,
0.4975647032260895,
1.0436903238296509,
0.33686110377311707,
0.09199544787406921,
-0.8969085216522217,
-1.4860808849334717,
1.9986603260040283,
-1.5549741983413696,
1.9801435470581055,
0.6677820086479187,
-0.0710742250084877,
-1.546679139137268,
-1.878950834274292,
1.3409779071807861,
1.1943237781524658,
2.1996397972106934,
0.5500058531761169,
0.35939323902130127,
-0.8592624068260193,
-0.6824497580528259,
0.13481663167476654,
-1.0662903785705566,
-0.6303688883781433,
0.04871125519275665,
2.401869535446167,
1.8150453567504883,
-0.6666157841682434,
-0.23126061260700226,
-0.96338951587677,
1.4711089134216309,
-0.2974516749382019,
0.33452314138412476,
2.0630288124084473,
-0.28338950872421265,
-1.1226838827133179,
1.27354097366333,
-2.4017603397369385,
0.1963803619146347,
2.0906293392181396,
0.37678688764572144,
0.24843348562717438,
-1.318779706954956,
-0.5555570125579834,
-0.3844763934612274,
-0.339179128408432,
-1.2897017002105713,
0.4592394530773163,
-0.24079115688800812,
-0.8306957483291626,
-1.4477696418762207,
0.1834467351436615,
-1.1475228071212769,
-1.5348938703536987,
0.45369580388069153,
1.9878257513046265,
2.0906565189361572,
-0.6577791571617126,
1.479968547821045,
-0.28810620307922363,
0.103885717689991,
1.2784262895584106,
1.3121464252471924,
2.9806792736053467,
1.8800619840621948,
-1.073744297027588,
0.5712459683418274,
-0.29858776926994324,
-0.43678948283195496,
1.127065658569336,
-1.0361688137054443,
1.1113297939300537,
-0.08889460563659668,
-1.0800795555114746,
-1.253389596939087,
0.9657267332077026,
0.5881475806236267,
-0.020385967567563057,
-0.5603271126747131,
1.173405647277832,
0.032026007771492004,
1.3704802989959717,
0.6336797475814819,
-0.34204065799713135,
0.43589386343955994,
-0.48215845227241516,
-0.5220783948898315,
1.6479536294937134,
0.22933335602283478,
-1.5934988260269165,
-2.3581244945526123,
-0.12726236879825592,
-0.864314615726471,
0.07062919437885284,
-0.5749026536941528,
-1.1313163042068481,
1.6918890476226807,
0.353896826505661,
-1.2286120653152466,
-0.21746844053268433,
-0.3152749538421631,
-0.5956040620803833,
2.6614766120910645,
-1.313773512840271,
-0.23510603606700897,
-0.902413010597229,
-0.5467315316200256,
1.7612204551696777,
-1.245875358581543,
-0.1841534823179245,
-1.0204315185546875,
-0.5582918524742126,
-1.1632955074310303,
-0.4361878037452698,
-0.07035383582115173,
-0.9855778813362122,
0.9395202994346619,
0.15469656884670258,
-1.1552311182022095,
-0.4362991750240326,
-0.9465897083282471,
0.8338522911071777,
-0.21665258705615997,
0.16430142521858215,
1.8808704614639282,
0.278938889503479,
-0.3028391897678375,
0.8158816695213318,
1.2567869424819946,
0.6593718528747559,
-0.6079728603363037,
0.11401409655809402,
-0.43271905183792114,
0.3887914717197418,
-1.3600705862045288,
0.2931284010410309,
-2.9172885417938232,
0.6714264750480652,
-0.019020676612854004,
-0.10487478971481323,
-0.05019775778055191,
-1.4229061603546143,
1.2054364681243896,
2.571164131164551,
-1.206639051437378,
0.5002554059028625,
0.38272157311439514,
1.224143624305725,
-1.7262790203094482,
0.3222642242908478,
-0.32007303833961487,
2.192342758178711,
0.18503744900226593,
1.1695514917373657,
-0.5604338049888611,
-2.2947163581848145,
0.6355141997337341,
-1.1506972312927246,
-1.171473503112793,
0.33898496627807617,
-0.9287747740745544,
0.32243454456329346,
-1.7229676246643066,
-0.21599018573760986,
-0.9703248739242554,
-1.2075519561767578,
0.7263393402099609,
0.08534105122089386,
0.23742197453975677,
-0.6095902919769287,
0.35420089960098267,
-2.1228017807006836,
-1.4357949495315552,
-0.25003495812416077,
-0.9328992962837219,
0.6948296427726746,
-0.44098347425460815,
0.6509472131729126,
0.012105979025363922,
0.12965989112854004,
0.20725546777248383,
1.6527670621871948,
3.3830974102020264,
0.14791004359722137,
0.36203059554100037,
-0.10857980698347092,
-0.8299406170845032,
1.3778804540634155,
0.9651687145233154,
0.16067096590995789,
-0.4796552062034607,
-0.9972215294837952,
1.571919322013855,
2.0212466716766357,
0.9299279451370239,
0.18009406328201294,
-0.7786188721656799,
-0.590884804725647,
-0.06044478714466095,
0.32746249437332153,
0.5109752416610718,
0.9701828956604004,
0.04453060030937195,
0.004872415214776993,
1.2458670139312744,
1.2029333114624023,
-0.4784446060657501,
0.32115715742111206,
-0.9606164693832397,
-0.3889707624912262,
0.4382997453212738,
0.224429652094841,
-0.09309842437505722,
0.43111392855644226,
-0.9033556580543518,
-0.27977997064590454,
-0.21304179728031158,
-0.8260018825531006,
-0.6824495196342468,
-0.44193944334983826,
-0.5303843021392822,
1.6507614850997925,
0.17069052159786224,
-0.543855607509613,
-0.04800788313150406,
-0.640171229839325,
-0.018649812787771225,
-1.1677080392837524,
0.13729703426361084,
0.013643117621541023,
-0.08567312359809875,
-0.2786743640899658,
1.7180685997009277,
-0.7343119978904724,
-2.0978615283966064,
0.09585864096879959,
0.445315420627594,
-0.504100501537323,
0.07760437577962875,
1.7003408670425415,
0.48154357075691223,
1.5538582801818848,
1.357054352760315,
0.9781708717346191,
-0.5120382905006409,
-1.289610743522644,
0.6058529019355774,
0.9603040218353271,
-1.3498108386993408,
0.83213210105896,
0.030662408098578453,
-0.4415428340435028,
0.7502854466438293,
1.4537763595581055,
0.47638651728630066,
-1.9877290725708008,
0.8350282311439514,
-1.0924522876739502,
0.9702785611152649,
0.7574737071990967,
0.6916869878768921,
0.484190434217453,
0.9933114647865295,
-1.2719618082046509,
-1.095487356185913,
-0.9477287530899048,
-0.6140890717506409,
2.058302164077759,
-0.33437326550483704,
0.4923567473888397,
-0.18589980900287628,
-1.1005516052246094,
-0.13146430253982544,
0.7718726396560669,
0.5575046539306641,
-0.19565977156162262,
0.8229125738143921,
-0.7330358624458313,
-0.9361754655838013,
-1.2929468154907227,
-0.41965222358703613,
-0.9074444770812988,
-0.9839399456977844,
0.9917110800743103,
0.9033777117729187,
0.5457219481468201,
1.8763463497161865,
0.6374014616012573,
0.2352808266878128,
-2.4298946857452393,
0.8556676506996155,
0.282089501619339,
-0.21267418563365936,
0.886221706867218,
0.3499414622783661,
1.1613832712173462,
0.07099443674087524,
0.46893978118896484,
-2.428929090499878,
2.1511359214782715,
-0.0882403552532196,
0.7393686771392822,
-0.004958358593285084,
-0.06551050394773483,
1.2389187812805176,
0.5075231194496155,
0.3618698716163635,
-1.0186958312988281,
0.639322817325592,
-0.5383262038230896,
1.2409788370132446,
0.9061005115509033,
-0.6583859920501709,
-0.010527776554226875,
1.35982346534729,
0.4504408836364746,
-0.6173553466796875,
-1.0651843547821045,
-0.7616080045700073,
0.842605471611023,
1.6385467052459717,
-0.16014361381530762,
-0.1629427671432495,
0.7481763958930969,
0.7306455373764038,
-1.1025465726852417,
0.04213414341211319,
-0.6273339986801147,
-0.6743565797805786,
1.6691185235977173,
2.11856746673584,
-0.20027956366539001,
-0.1278218775987625,
-0.5908156633377075,
-1.260596513748169,
0.6471351981163025,
-0.04766784608364105,
0.0373997688293457,
0.6532219052314758,
-0.5741662979125977,
1.04218327999115,
0.7569286227226257,
0.9630066752433777,
-0.06333602219820023,
0.4983757436275482,
0.46895867586135864,
-0.4486713409423828,
-1.1175892353057861,
-0.43817761540412903,
-1.3459665775299072,
-2.5993826389312744,
0.46273675560951233,
-0.31311967968940735,
-1.3618544340133667,
-0.00007733702659606934,
-1.114831805229187,
1.0346981287002563,
-0.6919503211975098,
-1.2301502227783203,
-1.540306568145752,
0.20099614560604095,
0.038812555372714996,
0.9688378572463989,
-1.7049814462661743,
-0.21177172660827637,
1.1706266403198242,
0.6216039657592773,
-0.6422169804573059,
0.8783321380615234,
0.2596670687198639,
1.1147401332855225,
0.6350626945495605,
-0.4055763781070709,
0.5379617214202881,
0.01250346377491951,
-1.3933124542236328,
0.6987528204917908,
1.2577115297317505,
0.15754050016403198,
1.3763068914413452,
-0.3877645432949066,
0.1236521378159523,
0.4479931890964508,
-0.6838231682777405,
-0.5487149953842163,
-0.3756459951400757,
0.6815717220306396,
0.06763514876365662,
-1.0139260292053223,
-0.08313260227441788,
-0.09628649801015854,
-0.3211522102355957,
0.2065831571817398,
-1.516168236732483,
-0.3253885805606842,
-0.46331506967544556,
-0.4166298806667328,
-1.2782881259918213,
-0.1621856391429901,
1.309869408607483,
-0.540647029876709,
-0.2767643332481384,
0.6090874075889587,
0.5294089317321777,
0.5456705689430237,
0.6401712894439697,
-0.6894851326942444,
-0.34307608008384705,
-0.3392680883407593,
-0.3045470714569092,
0.19824068248271942,
1.2509218454360962,
-0.14822310209274292,
-1.0216410160064697,
0.6032640337944031,
-0.4198610186576843,
0.01750890351831913,
1.889700174331665,
-0.0936354547739029,
-0.7676613330841064,
0.35322636365890503,
-0.790673017501831,
1.9172627925872803,
1.5677942037582397,
1.1839128732681274,
-0.1295456737279892,
-0.9313808083534241,
0.548687756061554,
-0.283457487821579,
-0.48437580466270447,
0.6656895279884338,
0.4761026203632355,
-0.26592952013015747,
-1.484435796737671,
0.65128493309021,
1.2968844175338745,
-0.8778427839279175,
-0.9064578413963318,
0.2465110868215561,
-0.7811668515205383,
1.169153094291687,
0.4552738666534424,
0.4136079251766205,
0.39035338163375854,
1.7319105863571167,
0.7032138109207153,
-0.44977936148643494,
0.3983912765979767,
0.663053035736084,
-0.2809182107448578,
-2.11185884475708,
-1.3246697187423706,
0.238993838429451,
-0.5017614364624023,
-1.5398521423339844,
1.3351372480392456,
-1.0071547031402588,
-0.8684725165367126,
0.6027212142944336,
0.24712924659252167,
1.3894357681274414,
0.4555259048938751,
1.6709041595458984,
1.9628928899765015,
0.7574809789657593,
0.41829538345336914,
1.366552472114563,
-0.03220031410455704,
-0.5911229848861694,
1.898795485496521,
-0.3586948812007904,
0.5254807472229004,
1.1260874271392822,
-0.2984163761138916,
-1.2800005674362183,
-0.7316475510597229,
-1.2075045108795166,
-0.6821590065956116,
1.1492557525634766,
0.08156227320432663,
-1.1846225261688232,
0.14271193742752075,
1.5609253644943237,
0.1768629401922226,
-0.3539619445800781,
0.4206530451774597,
0.3489401340484619,
-0.7965095639228821,
-0.045816756784915924,
-1.0479116439819336,
0.49428048729896545,
-0.16874000430107117,
-0.29530763626098633,
0.3056940734386444,
0.6962359547615051,
1.295075535774231,
-0.15176557004451752,
0.18903984129428864,
1.0016220808029175,
-1.5082095861434937,
1.4474797248840332,
-0.6482239961624146,
0.30325910449028015,
-2.3925793170928955,
1.3688212633132935,
-0.6925137639045715,
2.0390725135803223,
-2.6682913303375244,
0.34742677211761475,
-0.5837358236312866,
-0.3600280284881592,
0.2723751664161682,
-0.27458494901657104,
0.15538744628429413,
0.006247775629162788,
-1.1496033668518066,
0.19801966845989227,
-0.7202281355857849,
0.5933369398117065,
1.2505133152008057,
1.4515607357025146,
-1.1120103597640991,
-0.21389512717723846,
-1.7578859329223633,
-0.053660131990909576,
-0.8197541832923889,
0.2313821017742157,
-2.0502848625183105,
-0.0024138791486620903,
-1.8467979431152344,
-2.050630807876587,
-1.4135602712631226,
-0.8368651866912842,
0.9841358065605164,
0.0932999849319458,
-0.8155031800270081,
1.2250030040740967,
-0.271249383687973,
-1.6386008262634277,
1.021620273590088,
-2.126345634460449
] |
https://github.com/huggingface/datasets/issues/3353 | add one field "example_id", but I can't see it in the "comput_loss" function | Hi ! Your function looks fine, I used to map `squad` locally and it indeed added the `example_id` field correctly.
However I think that in the `compute_loss` method only a subset of the fields are available: the model inputs. Since `example_id` is not a model input (it's not passed as a parameter to the model), the data loader doesn't need to return it by default.
However you can disable this behavior by setting `remove_unused_columns` to `False` to your training arguments. In this case in `compute_loss` you will get the full item with all the fields.
Note that since the model doesn't take `example_id` as input, you will have to remove it from the inputs when `model(**inputs)` is called | Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_ | 1,081 | 118 | add one field "example_id", but I can't see it in the "comput_loss" function
Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_
Hi ! Your function looks fine, I used to map `squad` locally and it indeed added the `example_id` field correctly.
However I think that in the `compute_loss` method only a subset of the fields are available: the model inputs. Since `example_id` is not a model input (it's not passed as a parameter to the model), the data loader doesn't need to return it by default.
However you can disable this behavior by setting `remove_unused_columns` to `False` to your training arguments. In this case in `compute_loss` you will get the full item with all the fields.
Note that since the model doesn't take `example_id` as input, you will have to remove it from the inputs when `model(**inputs)` is called | [
-1.1895976066589355,
-1.039095163345337,
-0.6640315055847168,
1.2366902828216553,
-0.4163138270378113,
-1.0222519636154175,
0.35613688826560974,
-1.0311400890350342,
1.5679025650024414,
-0.8252658247947693,
0.17931242287158966,
-1.7496793270111084,
0.07670159637928009,
-0.7909781336784363,
-0.761791467666626,
-0.7969787120819092,
-0.4661526679992676,
-0.9245725870132446,
1.0929173231124878,
2.69830322265625,
1.1135051250457764,
-1.3217302560806274,
2.569017171859741,
0.7278850674629211,
-0.0920877754688263,
-1.0471481084823608,
0.637866735458374,
-0.18390871584415436,
-1.2136942148208618,
-0.5090659856796265,
-1.0535786151885986,
-0.12921710312366486,
-0.6278619170188904,
-0.29026055335998535,
-0.06275304406881332,
0.28912919759750366,
-0.20787301659584045,
-0.01209180150181055,
-0.14447589218616486,
-0.8764022588729858,
0.32618817687034607,
-0.5805924534797668,
1.0742692947387695,
-0.18681840598583221,
1.5897657871246338,
-0.573383092880249,
0.5745514631271362,
0.662045419216156,
1.1734538078308105,
0.20082953572273254,
0.05864816531538963,
0.1351698637008667,
0.46308714151382446,
0.038605764508247375,
0.4449019730091095,
0.9199667572975159,
0.685585081577301,
0.40225595235824585,
0.6912224888801575,
-2.419261932373047,
1.2609796524047852,
-1.1053287982940674,
0.3364589810371399,
1.53970468044281,
-0.7023851275444031,
0.2943371832370758,
-1.776457667350769,
-0.20279459655284882,
0.5645743012428284,
-2.2507381439208984,
0.41838687658309937,
-1.2893177270889282,
-0.5798829793930054,
0.7691457867622375,
0.5314910411834717,
-1.4210795164108276,
0.3341231644153595,
-0.24194569885730743,
0.768769383430481,
0.2342037409543991,
0.8088821172714233,
-2.0295000076293945,
-0.06572546064853668,
-0.372118204832077,
0.23563693463802338,
-1.0491889715194702,
-1.4812320470809937,
0.6817902326583862,
0.3748440742492676,
0.6285898685455322,
-0.23850053548812866,
1.0065534114837646,
-1.2902315855026245,
0.8387157917022705,
-1.4360737800598145,
-1.6713560819625854,
-1.343722939491272,
-2.5118467807769775,
-2.4247584342956543,
0.7252214550971985,
-0.47199559211730957,
-0.5862975120544434,
1.985018253326416,
-0.9373512864112854,
-1.21500825881958,
1.299300193786621,
0.4708799421787262,
-0.20056456327438354,
2.718534231185913,
0.010445372201502323,
-0.42883992195129395,
0.5631175637245178,
-1.2380419969558716,
0.9889167547225952,
-0.28102490305900574,
1.4435807466506958,
0.4333796799182892,
-0.9281153678894043,
1.6508121490478516,
-0.43526172637939453,
0.3065985143184662,
-0.5788653492927551,
-0.34469300508499146,
-0.8581360578536987,
0.2845155894756317,
1.6436034440994263,
-0.09223657101392746,
1.152306079864502,
-0.23069201409816742,
-1.357582926750183,
-1.3302077054977417,
1.1328922510147095,
0.33394038677215576,
-1.0499520301818848,
0.04480056092143059,
-0.28776371479034424,
0.29781776666641235,
-0.08772439509630203,
1.158739686012268,
1.2939478158950806,
0.5962038636207581,
-0.4442080855369568,
-1.0303624868392944,
0.1318967044353485,
-0.5281366109848022,
-1.039331078529358,
-1.7957265377044678,
-0.3787548840045929,
-0.22766901552677155,
0.8079566955566406,
-1.0962685346603394,
1.8232150077819824,
0.9803046584129333,
1.9187325239181519,
0.8831626176834106,
-0.8009540438652039,
1.3360321521759033,
0.18836656212806702,
1.7110918760299683,
-0.9168318510055542,
0.8123793005943298,
-0.7285799384117126,
-1.1481969356536865,
1.372307300567627,
-0.2438577264547348,
-1.778907060623169,
-0.6976925134658813,
-0.6932194828987122,
-0.5682119727134705,
-0.7984493970870972,
1.0301254987716675,
-0.26847773790359497,
-1.5462898015975952,
0.3373371362686157,
-0.6286514401435852,
0.004335484467446804,
-1.3756216764450073,
0.42450013756752014,
0.6949224472045898,
-0.3248215317726135,
-0.05769398435950279,
-0.23792019486427307,
-1.3105649948120117,
-0.48335587978363037,
0.22253097593784332,
1.8404605388641357,
-0.35602372884750366,
1.051095962524414,
0.9296424388885498,
-0.5979870557785034,
-0.33573001623153687,
0.48708465695381165,
-0.2531633675098419,
0.5537673234939575,
-0.7777538895606995,
-0.8665095567703247,
1.0880262851715088,
-0.24477730691432953,
-0.4719252586364746,
1.463572382926941,
0.8246966600418091,
-1.1546690464019775,
-0.22897160053253174,
-0.07162866741418839,
-0.5736765265464783,
0.4072394371032715,
-1.6731926202774048,
-0.13646556437015533,
0.7169399261474609,
-1.6342347860336304,
-0.5326835513114929,
-0.21367789804935455,
1.187949776649475,
-0.19788546860218048,
1.3145592212677002,
-0.2589850425720215,
-0.32047754526138306,
-0.43801262974739075,
-0.3117007911205292,
0.3176586627960205,
-0.07223068922758102,
-0.2532570958137512,
0.3948949873447418,
-0.8057718276977539,
0.5421929955482483,
1.5384974479675293,
0.1510709524154663,
0.1653936505317688,
0.1915493905544281,
0.7292171716690063,
0.5253437757492065,
0.18086226284503937,
-1.0966813564300537,
-1.299959659576416,
2.2239937782287598,
-1.605476975440979,
1.8691622018814087,
0.7682279944419861,
-0.04412313178181648,
-1.591460108757019,
-1.6851727962493896,
1.3557803630828857,
1.0920729637145996,
2.0355186462402344,
0.49688413739204407,
0.33690595626831055,
-0.6926538348197937,
-0.5639828443527222,
0.14642922580242157,
-1.0368473529815674,
-0.7009578347206116,
0.16237351298332214,
2.576002836227417,
1.6863000392913818,
-0.43302562832832336,
-0.08837564289569855,
-1.1402783393859863,
1.5213425159454346,
-0.1985204666852951,
0.42708179354667664,
1.9858262538909912,
-0.6113894581794739,
-1.1351990699768066,
1.2333323955535889,
-2.5358338356018066,
0.06842996180057526,
1.981589913368225,
0.34728315472602844,
0.13851392269134521,
-1.2747389078140259,
-0.6211862564086914,
-0.33924636244773865,
-0.7330419421195984,
-1.3701999187469482,
0.6628771424293518,
-0.22179865837097168,
-0.8691914081573486,
-1.6307919025421143,
0.2750972509384155,
-1.217178225517273,
-1.6818227767944336,
0.2486046850681305,
1.702022671699524,
2.2535417079925537,
-0.6235804557800293,
1.536436676979065,
-0.2863750755786896,
0.20038847625255585,
0.9110482335090637,
1.2159645557403564,
2.7692344188690186,
1.960254430770874,
-0.9519389271736145,
0.5788230299949646,
-0.41769662499427795,
-0.502387523651123,
1.1861021518707275,
-0.946861743927002,
1.2420523166656494,
-0.0805278941988945,
-1.2636125087738037,
-1.1521127223968506,
0.9692273736000061,
0.19942036271095276,
0.17733922600746155,
-0.3886091113090515,
1.0422375202178955,
0.43625137209892273,
1.0932729244232178,
0.7702150940895081,
0.10553213208913803,
0.5377821326255798,
-0.6629857420921326,
-0.5339068174362183,
1.7187066078186035,
0.31956756114959717,
-1.6548815965652466,
-2.4735167026519775,
-0.49333804845809937,
-1.0069384574890137,
0.253007709980011,
-0.5944660902023315,
-1.0095915794372559,
1.7189663648605347,
0.25065627694129944,
-0.9851896166801453,
-0.08195361495018005,
-0.2384142279624939,
-0.39861056208610535,
2.7469990253448486,
-1.1723175048828125,
-0.37860244512557983,
-0.8392878174781799,
-0.7855929136276245,
1.5896369218826294,
-1.1608726978302002,
0.27036619186401367,
-1.0533287525177002,
-0.4088253974914551,
-1.1177390813827515,
-0.1699780523777008,
-0.07819963991641998,
-1.140964150428772,
0.8891134858131409,
0.22632624208927155,
-1.3646681308746338,
-0.4902838170528412,
-1.1231446266174316,
0.6826585531234741,
0.1317124366760254,
0.2470356822013855,
1.73959219455719,
0.2296821027994156,
-0.45275193452835083,
0.9094072580337524,
1.1785720586776733,
0.8427883982658386,
-0.6394293308258057,
0.09540098160505295,
-0.5352826714515686,
0.48648104071617126,
-0.7698959112167358,
0.24542570114135742,
-2.6415908336639404,
0.6325101852416992,
-0.08122167736291885,
-0.25936293601989746,
-0.09120965749025345,
-1.2821581363677979,
1.5078651905059814,
2.276076555252075,
-1.2054611444473267,
0.6177528500556946,
0.14661790430545807,
1.3931140899658203,
-1.2498247623443604,
0.33750760555267334,
-0.49843013286590576,
2.3310420513153076,
0.25339558720588684,
0.9891771078109741,
-0.48364076018333435,
-2.5406105518341064,
0.7236827611923218,
-1.3685665130615234,
-1.0388660430908203,
0.42999252676963806,
-0.8793665170669556,
0.12775206565856934,
-1.4937657117843628,
-0.006426874548196793,
-0.8852235674858093,
-1.2177715301513672,
0.6171974539756775,
0.13086025416851044,
0.6082918643951416,
-0.7391733527183533,
0.32263073325157166,
-2.2444915771484375,
-1.3983354568481445,
-0.32678642868995667,
-0.7280755043029785,
0.5607365369796753,
-0.3695945739746094,
0.7506893277168274,
-0.14270903170108795,
-0.23165960609912872,
0.4807398021221161,
1.576909065246582,
3.520906686782837,
-0.0008408809080719948,
0.5474457740783691,
-0.12223157286643982,
-1.1003692150115967,
1.3609298467636108,
1.0102949142456055,
0.3751102387905121,
-0.552821934223175,
-0.9551666378974915,
1.4061744213104248,
2.033804416656494,
1.0445972681045532,
-0.01042311079800129,
-0.6603420376777649,
-0.369079053401947,
0.002119629643857479,
0.45469945669174194,
0.28431054949760437,
0.9683314561843872,
-0.03626386821269989,
-0.19164322316646576,
1.5324095487594604,
1.0871098041534424,
-0.41498616337776184,
0.3051357567310333,
-0.8403621912002563,
-0.3614751994609833,
0.6376226544380188,
0.11813348531723022,
-0.10272441059350967,
0.7366030216217041,
-1.1465781927108765,
-0.5077088475227356,
-0.1825021356344223,
-0.9383851885795593,
-0.6393535733222961,
-0.29712334275245667,
-0.5922278165817261,
1.7157928943634033,
0.09551943838596344,
-0.3632720410823822,
0.29628226161003113,
-0.6490345597267151,
0.03613013029098511,
-1.1366567611694336,
-0.13767306506633759,
-0.2389119565486908,
-0.07318447530269623,
-0.3443811535835266,
2.0456504821777344,
-0.8185617327690125,
-1.8781156539916992,
0.08112426847219467,
0.35727187991142273,
-0.1400354504585266,
0.4922557771205902,
1.4776262044906616,
0.5464436411857605,
1.7077101469039917,
1.178090214729309,
1.017655611038208,
-0.4170157015323639,
-1.4631611108779907,
0.9281863570213318,
1.0356239080429077,
-1.20289945602417,
1.0823845863342285,
0.05614916607737541,
-0.5225301384925842,
0.7064231634140015,
1.0485800504684448,
0.20773755013942719,
-2.2074954509735107,
0.7594350576400757,
-1.207610011100769,
1.0555541515350342,
0.610558807849884,
0.6474511027336121,
0.33080095052719116,
0.7164154052734375,
-1.349616289138794,
-0.9981144070625305,
-0.6463130712509155,
-0.5116990804672241,
2.158710241317749,
-0.263204425573349,
0.8354421257972717,
-0.27722981572151184,
-1.1003108024597168,
0.0752456858754158,
0.5916508436203003,
0.4710052013397217,
-0.46720510721206665,
0.7826096415519714,
-0.5323362946510315,
-1.276084303855896,
-1.4022051095962524,
-0.5208539962768555,
-1.1583675146102905,
-0.9040546417236328,
1.1670269966125488,
0.6124212145805359,
0.6121336221694946,
1.875520944595337,
0.6659557819366455,
0.1711227148771286,
-2.2756881713867188,
0.9211390018463135,
0.1634315401315689,
-0.2748200595378876,
0.6982920169830322,
0.39581918716430664,
1.2071812152862549,
-0.13805770874023438,
0.7343531250953674,
-2.4411916732788086,
2.3196897506713867,
-0.17722898721694946,
0.8897392749786377,
0.3634805679321289,
0.16271884739398956,
1.0489567518234253,
0.7466050982475281,
0.2924036979675293,
-0.9397538304328918,
0.3544946610927582,
-0.6287315487861633,
1.6739939451217651,
1.111812710762024,
-0.5336187481880188,
0.028996989130973816,
1.2102140188217163,
0.4504881501197815,
-0.25446605682373047,
-1.006352186203003,
-0.8201916813850403,
0.875382125377655,
1.6031852960586548,
-0.4631401002407074,
-0.185306116938591,
0.6375238299369812,
0.7736729383468628,
-1.1465821266174316,
-0.11241079121828079,
-0.6586557626724243,
-0.7450273633003235,
1.4412245750427246,
2.3405160903930664,
-0.43793126940727234,
0.13119441270828247,
-0.6680393815040588,
-1.2112681865692139,
0.7685853242874146,
-0.0902538001537323,
0.09589207172393799,
0.6225268840789795,
-0.29591214656829834,
0.822335958480835,
0.6753244400024414,
0.8445195555686951,
0.5536994338035583,
0.3533068895339966,
0.26179707050323486,
-0.6182870268821716,
-0.7910727262496948,
-0.3006151616573334,
-1.109635591506958,
-2.998492479324341,
0.3038557171821594,
-0.5460681319236755,
-1.505746603012085,
0.030151933431625366,
-1.0591150522232056,
0.926923930644989,
-0.44170132279396057,
-1.0356441736221313,
-1.425034999847412,
0.3226325511932373,
0.15536952018737793,
1.2162562608718872,
-1.9465266466140747,
0.02006065472960472,
1.1968010663986206,
0.5263950824737549,
-0.6754090189933777,
0.981104850769043,
0.4036937654018402,
1.139806866645813,
0.6123124361038208,
-0.3116177022457123,
0.6810207366943359,
0.0393633171916008,
-1.4281851053237915,
0.29917871952056885,
1.3376373052597046,
0.1298145353794098,
1.1567678451538086,
-0.44614461064338684,
0.01846035197377205,
0.38086381554603577,
-0.5472158789634705,
-0.7255591154098511,
-0.22664862871170044,
0.5653764605522156,
0.15604473650455475,
-0.9191997051239014,
0.04193190112709999,
0.041122131049633026,
-0.25682732462882996,
0.2148655503988266,
-1.2496213912963867,
-0.2877045273780823,
-0.6526523232460022,
-0.2724723517894745,
-1.5957430601119995,
-0.39123162627220154,
1.3589668273925781,
-0.49877187609672546,
-0.017033925279974937,
0.42571747303009033,
0.3377355933189392,
0.5255733728408813,
0.6757798790931702,
-0.456460565328598,
-0.8079858422279358,
-0.37148305773735046,
-0.38001370429992676,
0.3648025095462799,
1.3907749652862549,
-0.1763080209493637,
-0.9201278686523438,
0.5839563012123108,
-0.2414925992488861,
0.04287508502602577,
1.7492423057556152,
-0.12219646573066711,
-0.9055643081665039,
0.45015713572502136,
-0.29427990317344666,
1.7997426986694336,
1.4550246000289917,
0.8986635208129883,
-0.3352488875389099,
-0.8556499481201172,
0.6243661642074585,
-0.3671620488166809,
-0.5361656546592712,
0.548538863658905,
-0.027462873607873917,
-0.2274317741394043,
-1.4875686168670654,
0.6112151741981506,
1.3978509902954102,
-0.7281609177589417,
-1.126489281654358,
0.29779067635536194,
-0.7117459177970886,
1.2749669551849365,
0.4650860130786896,
0.5920834541320801,
0.2524968683719635,
1.6979833841323853,
0.8259206414222717,
-0.74793940782547,
0.5637441277503967,
0.4511431157588959,
-0.1875896155834198,
-2.2373275756835938,
-1.3576781749725342,
-0.06610921770334244,
-0.6480274796485901,
-1.393911361694336,
1.157723069190979,
-0.9904859662055969,
-1.0643576383590698,
0.7183244228363037,
0.10240072011947632,
1.1069265604019165,
0.5916813015937805,
1.382063388824463,
2.053924083709717,
0.7651280164718628,
0.6433367133140564,
1.3568512201309204,
-0.3117568790912628,
-0.6666123270988464,
1.757278323173523,
-0.16819503903388977,
0.62722247838974,
1.2265576124191284,
-0.09719564765691757,
-0.8897978663444519,
-0.7437949180603027,
-1.0019721984863281,
-0.5762737989425659,
1.3471812009811401,
-0.062007974833250046,
-1.13438081741333,
0.33382752537727356,
1.4365394115447998,
-0.07417627424001694,
-0.3604384958744049,
0.5492748022079468,
0.4607737362384796,
-0.655978262424469,
-0.012315545231103897,
-0.9403544068336487,
0.3867019712924957,
-0.5102832913398743,
-0.187723308801651,
0.47983717918395996,
0.7075936198234558,
1.3854098320007324,
-0.33404740691185,
0.3641188144683838,
0.754497766494751,
-1.433997631072998,
1.4530216455459595,
-0.6653778553009033,
0.1736760437488556,
-2.104482650756836,
1.0073699951171875,
-0.5716478228569031,
1.8704283237457275,
-2.863718032836914,
0.09473608434200287,
-0.23694629967212677,
-0.7169522047042847,
0.1540021151304245,
-0.3177435100078583,
0.22534647583961487,
-0.22231332957744598,
-1.0113410949707031,
0.22776857018470764,
-0.7242894172668457,
0.11651676893234253,
0.9361175894737244,
1.3971633911132812,
-0.968763530254364,
-0.36237284541130066,
-1.7109289169311523,
0.1255347728729248,
-0.8337401747703552,
0.13466233015060425,
-1.9250900745391846,
-0.15637552738189697,
-1.7998251914978027,
-2.070361375808716,
-1.3731002807617188,
-1.270176649093628,
1.22702956199646,
0.025641780346632004,
-0.6712268590927124,
1.2564916610717773,
-0.12037519365549088,
-1.9349623918533325,
0.9310553669929504,
-2.007655620574951
] |
https://github.com/huggingface/datasets/issues/3353 | add one field "example_id", but I can't see it in the "comput_loss" function | Hi, I have set **args.remove_unused_columns=False** and **training_args.remove_unused_columns=False**, but the field doesn't been contained yet.
```
def main():
argp = HfArgumentParser(TrainingArguments)
# The HfArgumentParser object collects command-line arguments into an object (and provides default values for unspecified arguments).
# In particular, TrainingArguments has several keys that you'll need/want to specify (when you call run.py from the command line):
# --do_train
# When included, this argument tells the script to train a model.
# See docstrings for "--task" and "--dataset" for how the training dataset is selected.
# --do_eval
# When included, this argument tells the script to evaluate the trained/loaded model on the validation split of the selected dataset.
# --per_device_train_batch_size <int, default=8>
# This is the training batch size.
# If you're running on GPU, you should try to make this as large as you can without getting CUDA out-of-memory errors.
# For reference, with --max_length=128 and the default ELECTRA-small model, a batch size of 32 should fit in 4gb of GPU memory.
# --num_train_epochs <float, default=3.0>
# How many passes to do through the training data.
# --output_dir <path>
# Where to put the trained model checkpoint(s) and any eval predictions.
# *This argument is required*.
argp.add_argument('--model', type=str,
default='google/electra-small-discriminator',
help="""This argument specifies the base model to fine-tune.
This should either be a HuggingFace model ID (see https://huggingface.co/models)
or a path to a saved model checkpoint (a folder containing config.json and pytorch_model.bin).""")
argp.add_argument('--task', type=str, choices=['nli', 'qa'], required=True,
help="""This argument specifies which task to train/evaluate on.
Pass "nli" for natural language inference or "qa" for question answering.
By default, "nli" will use the SNLI dataset, and "qa" will use the SQuAD dataset.""")
argp.add_argument('--dataset', type=str, default=None,
help="""This argument overrides the default dataset used for the specified task.""")
argp.add_argument('--max_length', type=int, default=128,
help="""This argument limits the maximum sequence length used during training/evaluation.
Shorter sequence lengths need less memory and computation time, but some examples may end up getting truncated.""")
argp.add_argument('--max_train_samples', type=int, default=None,
help='Limit the number of examples to train on.')
argp.add_argument('--max_eval_samples', type=int, default=None,
help='Limit the number of examples to evaluate on.')
argp.remove_unused_columns = False
training_args, args = argp.parse_args_into_dataclasses()
args.remove_unused_columns=False
training_args.remove_unused_columns=False
```
```
**************** train_dataset: Dataset({
features: ['id', 'title', 'context', 'question', 'answers'],
num_rows: 87599
})
**************** train_dataset_featurized: Dataset({
features: ['attention_mask', 'end_positions', 'input_ids', 'start_positions', 'token_type_ids'],
num_rows: 87714
})
``` | Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_ | 1,081 | 373 | add one field "example_id", but I can't see it in the "comput_loss" function
Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_
Hi, I have set **args.remove_unused_columns=False** and **training_args.remove_unused_columns=False**, but the field doesn't been contained yet.
```
def main():
argp = HfArgumentParser(TrainingArguments)
# The HfArgumentParser object collects command-line arguments into an object (and provides default values for unspecified arguments).
# In particular, TrainingArguments has several keys that you'll need/want to specify (when you call run.py from the command line):
# --do_train
# When included, this argument tells the script to train a model.
# See docstrings for "--task" and "--dataset" for how the training dataset is selected.
# --do_eval
# When included, this argument tells the script to evaluate the trained/loaded model on the validation split of the selected dataset.
# --per_device_train_batch_size <int, default=8>
# This is the training batch size.
# If you're running on GPU, you should try to make this as large as you can without getting CUDA out-of-memory errors.
# For reference, with --max_length=128 and the default ELECTRA-small model, a batch size of 32 should fit in 4gb of GPU memory.
# --num_train_epochs <float, default=3.0>
# How many passes to do through the training data.
# --output_dir <path>
# Where to put the trained model checkpoint(s) and any eval predictions.
# *This argument is required*.
argp.add_argument('--model', type=str,
default='google/electra-small-discriminator',
help="""This argument specifies the base model to fine-tune.
This should either be a HuggingFace model ID (see https://huggingface.co/models)
or a path to a saved model checkpoint (a folder containing config.json and pytorch_model.bin).""")
argp.add_argument('--task', type=str, choices=['nli', 'qa'], required=True,
help="""This argument specifies which task to train/evaluate on.
Pass "nli" for natural language inference or "qa" for question answering.
By default, "nli" will use the SNLI dataset, and "qa" will use the SQuAD dataset.""")
argp.add_argument('--dataset', type=str, default=None,
help="""This argument overrides the default dataset used for the specified task.""")
argp.add_argument('--max_length', type=int, default=128,
help="""This argument limits the maximum sequence length used during training/evaluation.
Shorter sequence lengths need less memory and computation time, but some examples may end up getting truncated.""")
argp.add_argument('--max_train_samples', type=int, default=None,
help='Limit the number of examples to train on.')
argp.add_argument('--max_eval_samples', type=int, default=None,
help='Limit the number of examples to evaluate on.')
argp.remove_unused_columns = False
training_args, args = argp.parse_args_into_dataclasses()
args.remove_unused_columns=False
training_args.remove_unused_columns=False
```
```
**************** train_dataset: Dataset({
features: ['id', 'title', 'context', 'question', 'answers'],
num_rows: 87599
})
**************** train_dataset_featurized: Dataset({
features: ['attention_mask', 'end_positions', 'input_ids', 'start_positions', 'token_type_ids'],
num_rows: 87714
})
``` | [
-1.1895976066589355,
-1.039095163345337,
-0.6640315055847168,
1.2366902828216553,
-0.4163138270378113,
-1.0222519636154175,
0.35613688826560974,
-1.0311400890350342,
1.5679025650024414,
-0.8252658247947693,
0.17931242287158966,
-1.7496793270111084,
0.07670159637928009,
-0.7909781336784363,
-0.761791467666626,
-0.7969787120819092,
-0.4661526679992676,
-0.9245725870132446,
1.0929173231124878,
2.69830322265625,
1.1135051250457764,
-1.3217302560806274,
2.569017171859741,
0.7278850674629211,
-0.0920877754688263,
-1.0471481084823608,
0.637866735458374,
-0.18390871584415436,
-1.2136942148208618,
-0.5090659856796265,
-1.0535786151885986,
-0.12921710312366486,
-0.6278619170188904,
-0.29026055335998535,
-0.06275304406881332,
0.28912919759750366,
-0.20787301659584045,
-0.01209180150181055,
-0.14447589218616486,
-0.8764022588729858,
0.32618817687034607,
-0.5805924534797668,
1.0742692947387695,
-0.18681840598583221,
1.5897657871246338,
-0.573383092880249,
0.5745514631271362,
0.662045419216156,
1.1734538078308105,
0.20082953572273254,
0.05864816531538963,
0.1351698637008667,
0.46308714151382446,
0.038605764508247375,
0.4449019730091095,
0.9199667572975159,
0.685585081577301,
0.40225595235824585,
0.6912224888801575,
-2.419261932373047,
1.2609796524047852,
-1.1053287982940674,
0.3364589810371399,
1.53970468044281,
-0.7023851275444031,
0.2943371832370758,
-1.776457667350769,
-0.20279459655284882,
0.5645743012428284,
-2.2507381439208984,
0.41838687658309937,
-1.2893177270889282,
-0.5798829793930054,
0.7691457867622375,
0.5314910411834717,
-1.4210795164108276,
0.3341231644153595,
-0.24194569885730743,
0.768769383430481,
0.2342037409543991,
0.8088821172714233,
-2.0295000076293945,
-0.06572546064853668,
-0.372118204832077,
0.23563693463802338,
-1.0491889715194702,
-1.4812320470809937,
0.6817902326583862,
0.3748440742492676,
0.6285898685455322,
-0.23850053548812866,
1.0065534114837646,
-1.2902315855026245,
0.8387157917022705,
-1.4360737800598145,
-1.6713560819625854,
-1.343722939491272,
-2.5118467807769775,
-2.4247584342956543,
0.7252214550971985,
-0.47199559211730957,
-0.5862975120544434,
1.985018253326416,
-0.9373512864112854,
-1.21500825881958,
1.299300193786621,
0.4708799421787262,
-0.20056456327438354,
2.718534231185913,
0.010445372201502323,
-0.42883992195129395,
0.5631175637245178,
-1.2380419969558716,
0.9889167547225952,
-0.28102490305900574,
1.4435807466506958,
0.4333796799182892,
-0.9281153678894043,
1.6508121490478516,
-0.43526172637939453,
0.3065985143184662,
-0.5788653492927551,
-0.34469300508499146,
-0.8581360578536987,
0.2845155894756317,
1.6436034440994263,
-0.09223657101392746,
1.152306079864502,
-0.23069201409816742,
-1.357582926750183,
-1.3302077054977417,
1.1328922510147095,
0.33394038677215576,
-1.0499520301818848,
0.04480056092143059,
-0.28776371479034424,
0.29781776666641235,
-0.08772439509630203,
1.158739686012268,
1.2939478158950806,
0.5962038636207581,
-0.4442080855369568,
-1.0303624868392944,
0.1318967044353485,
-0.5281366109848022,
-1.039331078529358,
-1.7957265377044678,
-0.3787548840045929,
-0.22766901552677155,
0.8079566955566406,
-1.0962685346603394,
1.8232150077819824,
0.9803046584129333,
1.9187325239181519,
0.8831626176834106,
-0.8009540438652039,
1.3360321521759033,
0.18836656212806702,
1.7110918760299683,
-0.9168318510055542,
0.8123793005943298,
-0.7285799384117126,
-1.1481969356536865,
1.372307300567627,
-0.2438577264547348,
-1.778907060623169,
-0.6976925134658813,
-0.6932194828987122,
-0.5682119727134705,
-0.7984493970870972,
1.0301254987716675,
-0.26847773790359497,
-1.5462898015975952,
0.3373371362686157,
-0.6286514401435852,
0.004335484467446804,
-1.3756216764450073,
0.42450013756752014,
0.6949224472045898,
-0.3248215317726135,
-0.05769398435950279,
-0.23792019486427307,
-1.3105649948120117,
-0.48335587978363037,
0.22253097593784332,
1.8404605388641357,
-0.35602372884750366,
1.051095962524414,
0.9296424388885498,
-0.5979870557785034,
-0.33573001623153687,
0.48708465695381165,
-0.2531633675098419,
0.5537673234939575,
-0.7777538895606995,
-0.8665095567703247,
1.0880262851715088,
-0.24477730691432953,
-0.4719252586364746,
1.463572382926941,
0.8246966600418091,
-1.1546690464019775,
-0.22897160053253174,
-0.07162866741418839,
-0.5736765265464783,
0.4072394371032715,
-1.6731926202774048,
-0.13646556437015533,
0.7169399261474609,
-1.6342347860336304,
-0.5326835513114929,
-0.21367789804935455,
1.187949776649475,
-0.19788546860218048,
1.3145592212677002,
-0.2589850425720215,
-0.32047754526138306,
-0.43801262974739075,
-0.3117007911205292,
0.3176586627960205,
-0.07223068922758102,
-0.2532570958137512,
0.3948949873447418,
-0.8057718276977539,
0.5421929955482483,
1.5384974479675293,
0.1510709524154663,
0.1653936505317688,
0.1915493905544281,
0.7292171716690063,
0.5253437757492065,
0.18086226284503937,
-1.0966813564300537,
-1.299959659576416,
2.2239937782287598,
-1.605476975440979,
1.8691622018814087,
0.7682279944419861,
-0.04412313178181648,
-1.591460108757019,
-1.6851727962493896,
1.3557803630828857,
1.0920729637145996,
2.0355186462402344,
0.49688413739204407,
0.33690595626831055,
-0.6926538348197937,
-0.5639828443527222,
0.14642922580242157,
-1.0368473529815674,
-0.7009578347206116,
0.16237351298332214,
2.576002836227417,
1.6863000392913818,
-0.43302562832832336,
-0.08837564289569855,
-1.1402783393859863,
1.5213425159454346,
-0.1985204666852951,
0.42708179354667664,
1.9858262538909912,
-0.6113894581794739,
-1.1351990699768066,
1.2333323955535889,
-2.5358338356018066,
0.06842996180057526,
1.981589913368225,
0.34728315472602844,
0.13851392269134521,
-1.2747389078140259,
-0.6211862564086914,
-0.33924636244773865,
-0.7330419421195984,
-1.3701999187469482,
0.6628771424293518,
-0.22179865837097168,
-0.8691914081573486,
-1.6307919025421143,
0.2750972509384155,
-1.217178225517273,
-1.6818227767944336,
0.2486046850681305,
1.702022671699524,
2.2535417079925537,
-0.6235804557800293,
1.536436676979065,
-0.2863750755786896,
0.20038847625255585,
0.9110482335090637,
1.2159645557403564,
2.7692344188690186,
1.960254430770874,
-0.9519389271736145,
0.5788230299949646,
-0.41769662499427795,
-0.502387523651123,
1.1861021518707275,
-0.946861743927002,
1.2420523166656494,
-0.0805278941988945,
-1.2636125087738037,
-1.1521127223968506,
0.9692273736000061,
0.19942036271095276,
0.17733922600746155,
-0.3886091113090515,
1.0422375202178955,
0.43625137209892273,
1.0932729244232178,
0.7702150940895081,
0.10553213208913803,
0.5377821326255798,
-0.6629857420921326,
-0.5339068174362183,
1.7187066078186035,
0.31956756114959717,
-1.6548815965652466,
-2.4735167026519775,
-0.49333804845809937,
-1.0069384574890137,
0.253007709980011,
-0.5944660902023315,
-1.0095915794372559,
1.7189663648605347,
0.25065627694129944,
-0.9851896166801453,
-0.08195361495018005,
-0.2384142279624939,
-0.39861056208610535,
2.7469990253448486,
-1.1723175048828125,
-0.37860244512557983,
-0.8392878174781799,
-0.7855929136276245,
1.5896369218826294,
-1.1608726978302002,
0.27036619186401367,
-1.0533287525177002,
-0.4088253974914551,
-1.1177390813827515,
-0.1699780523777008,
-0.07819963991641998,
-1.140964150428772,
0.8891134858131409,
0.22632624208927155,
-1.3646681308746338,
-0.4902838170528412,
-1.1231446266174316,
0.6826585531234741,
0.1317124366760254,
0.2470356822013855,
1.73959219455719,
0.2296821027994156,
-0.45275193452835083,
0.9094072580337524,
1.1785720586776733,
0.8427883982658386,
-0.6394293308258057,
0.09540098160505295,
-0.5352826714515686,
0.48648104071617126,
-0.7698959112167358,
0.24542570114135742,
-2.6415908336639404,
0.6325101852416992,
-0.08122167736291885,
-0.25936293601989746,
-0.09120965749025345,
-1.2821581363677979,
1.5078651905059814,
2.276076555252075,
-1.2054611444473267,
0.6177528500556946,
0.14661790430545807,
1.3931140899658203,
-1.2498247623443604,
0.33750760555267334,
-0.49843013286590576,
2.3310420513153076,
0.25339558720588684,
0.9891771078109741,
-0.48364076018333435,
-2.5406105518341064,
0.7236827611923218,
-1.3685665130615234,
-1.0388660430908203,
0.42999252676963806,
-0.8793665170669556,
0.12775206565856934,
-1.4937657117843628,
-0.006426874548196793,
-0.8852235674858093,
-1.2177715301513672,
0.6171974539756775,
0.13086025416851044,
0.6082918643951416,
-0.7391733527183533,
0.32263073325157166,
-2.2444915771484375,
-1.3983354568481445,
-0.32678642868995667,
-0.7280755043029785,
0.5607365369796753,
-0.3695945739746094,
0.7506893277168274,
-0.14270903170108795,
-0.23165960609912872,
0.4807398021221161,
1.576909065246582,
3.520906686782837,
-0.0008408809080719948,
0.5474457740783691,
-0.12223157286643982,
-1.1003692150115967,
1.3609298467636108,
1.0102949142456055,
0.3751102387905121,
-0.552821934223175,
-0.9551666378974915,
1.4061744213104248,
2.033804416656494,
1.0445972681045532,
-0.01042311079800129,
-0.6603420376777649,
-0.369079053401947,
0.002119629643857479,
0.45469945669174194,
0.28431054949760437,
0.9683314561843872,
-0.03626386821269989,
-0.19164322316646576,
1.5324095487594604,
1.0871098041534424,
-0.41498616337776184,
0.3051357567310333,
-0.8403621912002563,
-0.3614751994609833,
0.6376226544380188,
0.11813348531723022,
-0.10272441059350967,
0.7366030216217041,
-1.1465781927108765,
-0.5077088475227356,
-0.1825021356344223,
-0.9383851885795593,
-0.6393535733222961,
-0.29712334275245667,
-0.5922278165817261,
1.7157928943634033,
0.09551943838596344,
-0.3632720410823822,
0.29628226161003113,
-0.6490345597267151,
0.03613013029098511,
-1.1366567611694336,
-0.13767306506633759,
-0.2389119565486908,
-0.07318447530269623,
-0.3443811535835266,
2.0456504821777344,
-0.8185617327690125,
-1.8781156539916992,
0.08112426847219467,
0.35727187991142273,
-0.1400354504585266,
0.4922557771205902,
1.4776262044906616,
0.5464436411857605,
1.7077101469039917,
1.178090214729309,
1.017655611038208,
-0.4170157015323639,
-1.4631611108779907,
0.9281863570213318,
1.0356239080429077,
-1.20289945602417,
1.0823845863342285,
0.05614916607737541,
-0.5225301384925842,
0.7064231634140015,
1.0485800504684448,
0.20773755013942719,
-2.2074954509735107,
0.7594350576400757,
-1.207610011100769,
1.0555541515350342,
0.610558807849884,
0.6474511027336121,
0.33080095052719116,
0.7164154052734375,
-1.349616289138794,
-0.9981144070625305,
-0.6463130712509155,
-0.5116990804672241,
2.158710241317749,
-0.263204425573349,
0.8354421257972717,
-0.27722981572151184,
-1.1003108024597168,
0.0752456858754158,
0.5916508436203003,
0.4710052013397217,
-0.46720510721206665,
0.7826096415519714,
-0.5323362946510315,
-1.276084303855896,
-1.4022051095962524,
-0.5208539962768555,
-1.1583675146102905,
-0.9040546417236328,
1.1670269966125488,
0.6124212145805359,
0.6121336221694946,
1.875520944595337,
0.6659557819366455,
0.1711227148771286,
-2.2756881713867188,
0.9211390018463135,
0.1634315401315689,
-0.2748200595378876,
0.6982920169830322,
0.39581918716430664,
1.2071812152862549,
-0.13805770874023438,
0.7343531250953674,
-2.4411916732788086,
2.3196897506713867,
-0.17722898721694946,
0.8897392749786377,
0.3634805679321289,
0.16271884739398956,
1.0489567518234253,
0.7466050982475281,
0.2924036979675293,
-0.9397538304328918,
0.3544946610927582,
-0.6287315487861633,
1.6739939451217651,
1.111812710762024,
-0.5336187481880188,
0.028996989130973816,
1.2102140188217163,
0.4504881501197815,
-0.25446605682373047,
-1.006352186203003,
-0.8201916813850403,
0.875382125377655,
1.6031852960586548,
-0.4631401002407074,
-0.185306116938591,
0.6375238299369812,
0.7736729383468628,
-1.1465821266174316,
-0.11241079121828079,
-0.6586557626724243,
-0.7450273633003235,
1.4412245750427246,
2.3405160903930664,
-0.43793126940727234,
0.13119441270828247,
-0.6680393815040588,
-1.2112681865692139,
0.7685853242874146,
-0.0902538001537323,
0.09589207172393799,
0.6225268840789795,
-0.29591214656829834,
0.822335958480835,
0.6753244400024414,
0.8445195555686951,
0.5536994338035583,
0.3533068895339966,
0.26179707050323486,
-0.6182870268821716,
-0.7910727262496948,
-0.3006151616573334,
-1.109635591506958,
-2.998492479324341,
0.3038557171821594,
-0.5460681319236755,
-1.505746603012085,
0.030151933431625366,
-1.0591150522232056,
0.926923930644989,
-0.44170132279396057,
-1.0356441736221313,
-1.425034999847412,
0.3226325511932373,
0.15536952018737793,
1.2162562608718872,
-1.9465266466140747,
0.02006065472960472,
1.1968010663986206,
0.5263950824737549,
-0.6754090189933777,
0.981104850769043,
0.4036937654018402,
1.139806866645813,
0.6123124361038208,
-0.3116177022457123,
0.6810207366943359,
0.0393633171916008,
-1.4281851053237915,
0.29917871952056885,
1.3376373052597046,
0.1298145353794098,
1.1567678451538086,
-0.44614461064338684,
0.01846035197377205,
0.38086381554603577,
-0.5472158789634705,
-0.7255591154098511,
-0.22664862871170044,
0.5653764605522156,
0.15604473650455475,
-0.9191997051239014,
0.04193190112709999,
0.041122131049633026,
-0.25682732462882996,
0.2148655503988266,
-1.2496213912963867,
-0.2877045273780823,
-0.6526523232460022,
-0.2724723517894745,
-1.5957430601119995,
-0.39123162627220154,
1.3589668273925781,
-0.49877187609672546,
-0.017033925279974937,
0.42571747303009033,
0.3377355933189392,
0.5255733728408813,
0.6757798790931702,
-0.456460565328598,
-0.8079858422279358,
-0.37148305773735046,
-0.38001370429992676,
0.3648025095462799,
1.3907749652862549,
-0.1763080209493637,
-0.9201278686523438,
0.5839563012123108,
-0.2414925992488861,
0.04287508502602577,
1.7492423057556152,
-0.12219646573066711,
-0.9055643081665039,
0.45015713572502136,
-0.29427990317344666,
1.7997426986694336,
1.4550246000289917,
0.8986635208129883,
-0.3352488875389099,
-0.8556499481201172,
0.6243661642074585,
-0.3671620488166809,
-0.5361656546592712,
0.548538863658905,
-0.027462873607873917,
-0.2274317741394043,
-1.4875686168670654,
0.6112151741981506,
1.3978509902954102,
-0.7281609177589417,
-1.126489281654358,
0.29779067635536194,
-0.7117459177970886,
1.2749669551849365,
0.4650860130786896,
0.5920834541320801,
0.2524968683719635,
1.6979833841323853,
0.8259206414222717,
-0.74793940782547,
0.5637441277503967,
0.4511431157588959,
-0.1875896155834198,
-2.2373275756835938,
-1.3576781749725342,
-0.06610921770334244,
-0.6480274796485901,
-1.393911361694336,
1.157723069190979,
-0.9904859662055969,
-1.0643576383590698,
0.7183244228363037,
0.10240072011947632,
1.1069265604019165,
0.5916813015937805,
1.382063388824463,
2.053924083709717,
0.7651280164718628,
0.6433367133140564,
1.3568512201309204,
-0.3117568790912628,
-0.6666123270988464,
1.757278323173523,
-0.16819503903388977,
0.62722247838974,
1.2265576124191284,
-0.09719564765691757,
-0.8897978663444519,
-0.7437949180603027,
-1.0019721984863281,
-0.5762737989425659,
1.3471812009811401,
-0.062007974833250046,
-1.13438081741333,
0.33382752537727356,
1.4365394115447998,
-0.07417627424001694,
-0.3604384958744049,
0.5492748022079468,
0.4607737362384796,
-0.655978262424469,
-0.012315545231103897,
-0.9403544068336487,
0.3867019712924957,
-0.5102832913398743,
-0.187723308801651,
0.47983717918395996,
0.7075936198234558,
1.3854098320007324,
-0.33404740691185,
0.3641188144683838,
0.754497766494751,
-1.433997631072998,
1.4530216455459595,
-0.6653778553009033,
0.1736760437488556,
-2.104482650756836,
1.0073699951171875,
-0.5716478228569031,
1.8704283237457275,
-2.863718032836914,
0.09473608434200287,
-0.23694629967212677,
-0.7169522047042847,
0.1540021151304245,
-0.3177435100078583,
0.22534647583961487,
-0.22231332957744598,
-1.0113410949707031,
0.22776857018470764,
-0.7242894172668457,
0.11651676893234253,
0.9361175894737244,
1.3971633911132812,
-0.968763530254364,
-0.36237284541130066,
-1.7109289169311523,
0.1255347728729248,
-0.8337401747703552,
0.13466233015060425,
-1.9250900745391846,
-0.15637552738189697,
-1.7998251914978027,
-2.070361375808716,
-1.3731002807617188,
-1.270176649093628,
1.22702956199646,
0.025641780346632004,
-0.6712268590927124,
1.2564916610717773,
-0.12037519365549088,
-1.9349623918533325,
0.9310553669929504,
-2.007655620574951
] |
https://github.com/huggingface/datasets/issues/3353 | add one field "example_id", but I can't see it in the "comput_loss" function | Hi, I print the value, all are set to False, but don't work.
```
********************* training_args: TrainingArguments(
_n_gpu=1,
adafactor=False,
adam_beta1=0.9,
adam_beta2=0.999,
adam_epsilon=1e-08,
dataloader_drop_last=False,
dataloader_num_workers=0,
dataloader_pin_memory=True,
ddp_find_unused_parameters=None,
debug=[],
deepspeed=None,
disable_tqdm=False,
do_eval=False,
do_predict=False,
do_train=True,
eval_accumulation_steps=None,
eval_steps=None,
evaluation_strategy=IntervalStrategy.NO,
fp16=False,
fp16_backend=auto,
fp16_full_eval=False,
fp16_opt_level=O1,
gradient_accumulation_steps=1,
greater_is_better=None,
group_by_length=False,
ignore_data_skip=False,
label_names=None,
label_smoothing_factor=0.0,
learning_rate=5e-05,
length_column_name=length,
load_best_model_at_end=False,
local_rank=-1,
log_level=-1,
log_level_replica=-1,
log_on_each_node=True,
logging_dir=./re_trained_model/runs/Dec01_14-15-08_399b9290604c,
logging_first_step=False,
logging_steps=500,
logging_strategy=IntervalStrategy.STEPS,
lr_scheduler_type=SchedulerType.LINEAR,
max_grad_norm=1.0,
max_steps=-1,
metric_for_best_model=None,
mp_parameters=,
no_cuda=False,
num_train_epochs=3.0,
output_dir=./re_trained_model,
overwrite_output_dir=False,
past_index=-1,
per_device_eval_batch_size=8,
per_device_train_batch_size=8,
prediction_loss_only=False,
push_to_hub=False,
push_to_hub_model_id=re_trained_model,
push_to_hub_organization=None,
push_to_hub_token=None,
remove_unused_columns=False,
report_to=['tensorboard'],
resume_from_checkpoint=None,
run_name=./re_trained_model,
save_on_each_node=False,
save_steps=500,
save_strategy=IntervalStrategy.STEPS,
save_total_limit=None,
seed=42,
sharded_ddp=[],
skip_memory_metrics=True,
tpu_metrics_debug=False,
tpu_num_cores=None,
use_legacy_prediction_loop=False,
warmup_ratio=0.0,
warmup_steps=0,
weight_decay=0.0,
)
```
```
********************* args: Namespace(dataset='squad', max_eval_samples=None, max_length=128, max_train_samples=None, model='google/electra-small-discriminator', remove_unused_columns=False, task='qa')
2021-12-01 14:15:10,048 - WARNING - datasets.builder - Reusing dataset squad (/root/.cache/huggingface/datasets/squad/plain_text/1.0.0/d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453)
Some weights of the model checkpoint at google/electra-small-discriminator were not used when initializing ElectraForQuestionAnswering: ['discriminator_predictions.dense_prediction.weight', 'discriminator_predictions.dense_prediction.bias', 'discriminator_predictions.dense.weight', 'discriminator_predictions.dense.bias']
- This IS expected if you are initializing ElectraForQuestionAnswering from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing ElectraForQuestionAnswering from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of ElectraForQuestionAnswering were not initialized from the model checkpoint at google/electra-small-discriminator and are newly initialized: ['qa_outputs.bias', 'qa_outputs.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
Preprocessing data... (this takes a little bit, should only happen once per dataset)
``` | Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_ | 1,081 | 247 | add one field "example_id", but I can't see it in the "comput_loss" function
Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_
Hi, I print the value, all are set to False, but don't work.
```
********************* training_args: TrainingArguments(
_n_gpu=1,
adafactor=False,
adam_beta1=0.9,
adam_beta2=0.999,
adam_epsilon=1e-08,
dataloader_drop_last=False,
dataloader_num_workers=0,
dataloader_pin_memory=True,
ddp_find_unused_parameters=None,
debug=[],
deepspeed=None,
disable_tqdm=False,
do_eval=False,
do_predict=False,
do_train=True,
eval_accumulation_steps=None,
eval_steps=None,
evaluation_strategy=IntervalStrategy.NO,
fp16=False,
fp16_backend=auto,
fp16_full_eval=False,
fp16_opt_level=O1,
gradient_accumulation_steps=1,
greater_is_better=None,
group_by_length=False,
ignore_data_skip=False,
label_names=None,
label_smoothing_factor=0.0,
learning_rate=5e-05,
length_column_name=length,
load_best_model_at_end=False,
local_rank=-1,
log_level=-1,
log_level_replica=-1,
log_on_each_node=True,
logging_dir=./re_trained_model/runs/Dec01_14-15-08_399b9290604c,
logging_first_step=False,
logging_steps=500,
logging_strategy=IntervalStrategy.STEPS,
lr_scheduler_type=SchedulerType.LINEAR,
max_grad_norm=1.0,
max_steps=-1,
metric_for_best_model=None,
mp_parameters=,
no_cuda=False,
num_train_epochs=3.0,
output_dir=./re_trained_model,
overwrite_output_dir=False,
past_index=-1,
per_device_eval_batch_size=8,
per_device_train_batch_size=8,
prediction_loss_only=False,
push_to_hub=False,
push_to_hub_model_id=re_trained_model,
push_to_hub_organization=None,
push_to_hub_token=None,
remove_unused_columns=False,
report_to=['tensorboard'],
resume_from_checkpoint=None,
run_name=./re_trained_model,
save_on_each_node=False,
save_steps=500,
save_strategy=IntervalStrategy.STEPS,
save_total_limit=None,
seed=42,
sharded_ddp=[],
skip_memory_metrics=True,
tpu_metrics_debug=False,
tpu_num_cores=None,
use_legacy_prediction_loop=False,
warmup_ratio=0.0,
warmup_steps=0,
weight_decay=0.0,
)
```
```
********************* args: Namespace(dataset='squad', max_eval_samples=None, max_length=128, max_train_samples=None, model='google/electra-small-discriminator', remove_unused_columns=False, task='qa')
2021-12-01 14:15:10,048 - WARNING - datasets.builder - Reusing dataset squad (/root/.cache/huggingface/datasets/squad/plain_text/1.0.0/d6ec3ceb99ca480ce37cdd35555d6cb2511d223b9150cce08a837ef62ffea453)
Some weights of the model checkpoint at google/electra-small-discriminator were not used when initializing ElectraForQuestionAnswering: ['discriminator_predictions.dense_prediction.weight', 'discriminator_predictions.dense_prediction.bias', 'discriminator_predictions.dense.weight', 'discriminator_predictions.dense.bias']
- This IS expected if you are initializing ElectraForQuestionAnswering from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing ElectraForQuestionAnswering from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of ElectraForQuestionAnswering were not initialized from the model checkpoint at google/electra-small-discriminator and are newly initialized: ['qa_outputs.bias', 'qa_outputs.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
Preprocessing data... (this takes a little bit, should only happen once per dataset)
``` | [
-1.1895976066589355,
-1.039095163345337,
-0.6640315055847168,
1.2366902828216553,
-0.4163138270378113,
-1.0222519636154175,
0.35613688826560974,
-1.0311400890350342,
1.5679025650024414,
-0.8252658247947693,
0.17931242287158966,
-1.7496793270111084,
0.07670159637928009,
-0.7909781336784363,
-0.761791467666626,
-0.7969787120819092,
-0.4661526679992676,
-0.9245725870132446,
1.0929173231124878,
2.69830322265625,
1.1135051250457764,
-1.3217302560806274,
2.569017171859741,
0.7278850674629211,
-0.0920877754688263,
-1.0471481084823608,
0.637866735458374,
-0.18390871584415436,
-1.2136942148208618,
-0.5090659856796265,
-1.0535786151885986,
-0.12921710312366486,
-0.6278619170188904,
-0.29026055335998535,
-0.06275304406881332,
0.28912919759750366,
-0.20787301659584045,
-0.01209180150181055,
-0.14447589218616486,
-0.8764022588729858,
0.32618817687034607,
-0.5805924534797668,
1.0742692947387695,
-0.18681840598583221,
1.5897657871246338,
-0.573383092880249,
0.5745514631271362,
0.662045419216156,
1.1734538078308105,
0.20082953572273254,
0.05864816531538963,
0.1351698637008667,
0.46308714151382446,
0.038605764508247375,
0.4449019730091095,
0.9199667572975159,
0.685585081577301,
0.40225595235824585,
0.6912224888801575,
-2.419261932373047,
1.2609796524047852,
-1.1053287982940674,
0.3364589810371399,
1.53970468044281,
-0.7023851275444031,
0.2943371832370758,
-1.776457667350769,
-0.20279459655284882,
0.5645743012428284,
-2.2507381439208984,
0.41838687658309937,
-1.2893177270889282,
-0.5798829793930054,
0.7691457867622375,
0.5314910411834717,
-1.4210795164108276,
0.3341231644153595,
-0.24194569885730743,
0.768769383430481,
0.2342037409543991,
0.8088821172714233,
-2.0295000076293945,
-0.06572546064853668,
-0.372118204832077,
0.23563693463802338,
-1.0491889715194702,
-1.4812320470809937,
0.6817902326583862,
0.3748440742492676,
0.6285898685455322,
-0.23850053548812866,
1.0065534114837646,
-1.2902315855026245,
0.8387157917022705,
-1.4360737800598145,
-1.6713560819625854,
-1.343722939491272,
-2.5118467807769775,
-2.4247584342956543,
0.7252214550971985,
-0.47199559211730957,
-0.5862975120544434,
1.985018253326416,
-0.9373512864112854,
-1.21500825881958,
1.299300193786621,
0.4708799421787262,
-0.20056456327438354,
2.718534231185913,
0.010445372201502323,
-0.42883992195129395,
0.5631175637245178,
-1.2380419969558716,
0.9889167547225952,
-0.28102490305900574,
1.4435807466506958,
0.4333796799182892,
-0.9281153678894043,
1.6508121490478516,
-0.43526172637939453,
0.3065985143184662,
-0.5788653492927551,
-0.34469300508499146,
-0.8581360578536987,
0.2845155894756317,
1.6436034440994263,
-0.09223657101392746,
1.152306079864502,
-0.23069201409816742,
-1.357582926750183,
-1.3302077054977417,
1.1328922510147095,
0.33394038677215576,
-1.0499520301818848,
0.04480056092143059,
-0.28776371479034424,
0.29781776666641235,
-0.08772439509630203,
1.158739686012268,
1.2939478158950806,
0.5962038636207581,
-0.4442080855369568,
-1.0303624868392944,
0.1318967044353485,
-0.5281366109848022,
-1.039331078529358,
-1.7957265377044678,
-0.3787548840045929,
-0.22766901552677155,
0.8079566955566406,
-1.0962685346603394,
1.8232150077819824,
0.9803046584129333,
1.9187325239181519,
0.8831626176834106,
-0.8009540438652039,
1.3360321521759033,
0.18836656212806702,
1.7110918760299683,
-0.9168318510055542,
0.8123793005943298,
-0.7285799384117126,
-1.1481969356536865,
1.372307300567627,
-0.2438577264547348,
-1.778907060623169,
-0.6976925134658813,
-0.6932194828987122,
-0.5682119727134705,
-0.7984493970870972,
1.0301254987716675,
-0.26847773790359497,
-1.5462898015975952,
0.3373371362686157,
-0.6286514401435852,
0.004335484467446804,
-1.3756216764450073,
0.42450013756752014,
0.6949224472045898,
-0.3248215317726135,
-0.05769398435950279,
-0.23792019486427307,
-1.3105649948120117,
-0.48335587978363037,
0.22253097593784332,
1.8404605388641357,
-0.35602372884750366,
1.051095962524414,
0.9296424388885498,
-0.5979870557785034,
-0.33573001623153687,
0.48708465695381165,
-0.2531633675098419,
0.5537673234939575,
-0.7777538895606995,
-0.8665095567703247,
1.0880262851715088,
-0.24477730691432953,
-0.4719252586364746,
1.463572382926941,
0.8246966600418091,
-1.1546690464019775,
-0.22897160053253174,
-0.07162866741418839,
-0.5736765265464783,
0.4072394371032715,
-1.6731926202774048,
-0.13646556437015533,
0.7169399261474609,
-1.6342347860336304,
-0.5326835513114929,
-0.21367789804935455,
1.187949776649475,
-0.19788546860218048,
1.3145592212677002,
-0.2589850425720215,
-0.32047754526138306,
-0.43801262974739075,
-0.3117007911205292,
0.3176586627960205,
-0.07223068922758102,
-0.2532570958137512,
0.3948949873447418,
-0.8057718276977539,
0.5421929955482483,
1.5384974479675293,
0.1510709524154663,
0.1653936505317688,
0.1915493905544281,
0.7292171716690063,
0.5253437757492065,
0.18086226284503937,
-1.0966813564300537,
-1.299959659576416,
2.2239937782287598,
-1.605476975440979,
1.8691622018814087,
0.7682279944419861,
-0.04412313178181648,
-1.591460108757019,
-1.6851727962493896,
1.3557803630828857,
1.0920729637145996,
2.0355186462402344,
0.49688413739204407,
0.33690595626831055,
-0.6926538348197937,
-0.5639828443527222,
0.14642922580242157,
-1.0368473529815674,
-0.7009578347206116,
0.16237351298332214,
2.576002836227417,
1.6863000392913818,
-0.43302562832832336,
-0.08837564289569855,
-1.1402783393859863,
1.5213425159454346,
-0.1985204666852951,
0.42708179354667664,
1.9858262538909912,
-0.6113894581794739,
-1.1351990699768066,
1.2333323955535889,
-2.5358338356018066,
0.06842996180057526,
1.981589913368225,
0.34728315472602844,
0.13851392269134521,
-1.2747389078140259,
-0.6211862564086914,
-0.33924636244773865,
-0.7330419421195984,
-1.3701999187469482,
0.6628771424293518,
-0.22179865837097168,
-0.8691914081573486,
-1.6307919025421143,
0.2750972509384155,
-1.217178225517273,
-1.6818227767944336,
0.2486046850681305,
1.702022671699524,
2.2535417079925537,
-0.6235804557800293,
1.536436676979065,
-0.2863750755786896,
0.20038847625255585,
0.9110482335090637,
1.2159645557403564,
2.7692344188690186,
1.960254430770874,
-0.9519389271736145,
0.5788230299949646,
-0.41769662499427795,
-0.502387523651123,
1.1861021518707275,
-0.946861743927002,
1.2420523166656494,
-0.0805278941988945,
-1.2636125087738037,
-1.1521127223968506,
0.9692273736000061,
0.19942036271095276,
0.17733922600746155,
-0.3886091113090515,
1.0422375202178955,
0.43625137209892273,
1.0932729244232178,
0.7702150940895081,
0.10553213208913803,
0.5377821326255798,
-0.6629857420921326,
-0.5339068174362183,
1.7187066078186035,
0.31956756114959717,
-1.6548815965652466,
-2.4735167026519775,
-0.49333804845809937,
-1.0069384574890137,
0.253007709980011,
-0.5944660902023315,
-1.0095915794372559,
1.7189663648605347,
0.25065627694129944,
-0.9851896166801453,
-0.08195361495018005,
-0.2384142279624939,
-0.39861056208610535,
2.7469990253448486,
-1.1723175048828125,
-0.37860244512557983,
-0.8392878174781799,
-0.7855929136276245,
1.5896369218826294,
-1.1608726978302002,
0.27036619186401367,
-1.0533287525177002,
-0.4088253974914551,
-1.1177390813827515,
-0.1699780523777008,
-0.07819963991641998,
-1.140964150428772,
0.8891134858131409,
0.22632624208927155,
-1.3646681308746338,
-0.4902838170528412,
-1.1231446266174316,
0.6826585531234741,
0.1317124366760254,
0.2470356822013855,
1.73959219455719,
0.2296821027994156,
-0.45275193452835083,
0.9094072580337524,
1.1785720586776733,
0.8427883982658386,
-0.6394293308258057,
0.09540098160505295,
-0.5352826714515686,
0.48648104071617126,
-0.7698959112167358,
0.24542570114135742,
-2.6415908336639404,
0.6325101852416992,
-0.08122167736291885,
-0.25936293601989746,
-0.09120965749025345,
-1.2821581363677979,
1.5078651905059814,
2.276076555252075,
-1.2054611444473267,
0.6177528500556946,
0.14661790430545807,
1.3931140899658203,
-1.2498247623443604,
0.33750760555267334,
-0.49843013286590576,
2.3310420513153076,
0.25339558720588684,
0.9891771078109741,
-0.48364076018333435,
-2.5406105518341064,
0.7236827611923218,
-1.3685665130615234,
-1.0388660430908203,
0.42999252676963806,
-0.8793665170669556,
0.12775206565856934,
-1.4937657117843628,
-0.006426874548196793,
-0.8852235674858093,
-1.2177715301513672,
0.6171974539756775,
0.13086025416851044,
0.6082918643951416,
-0.7391733527183533,
0.32263073325157166,
-2.2444915771484375,
-1.3983354568481445,
-0.32678642868995667,
-0.7280755043029785,
0.5607365369796753,
-0.3695945739746094,
0.7506893277168274,
-0.14270903170108795,
-0.23165960609912872,
0.4807398021221161,
1.576909065246582,
3.520906686782837,
-0.0008408809080719948,
0.5474457740783691,
-0.12223157286643982,
-1.1003692150115967,
1.3609298467636108,
1.0102949142456055,
0.3751102387905121,
-0.552821934223175,
-0.9551666378974915,
1.4061744213104248,
2.033804416656494,
1.0445972681045532,
-0.01042311079800129,
-0.6603420376777649,
-0.369079053401947,
0.002119629643857479,
0.45469945669174194,
0.28431054949760437,
0.9683314561843872,
-0.03626386821269989,
-0.19164322316646576,
1.5324095487594604,
1.0871098041534424,
-0.41498616337776184,
0.3051357567310333,
-0.8403621912002563,
-0.3614751994609833,
0.6376226544380188,
0.11813348531723022,
-0.10272441059350967,
0.7366030216217041,
-1.1465781927108765,
-0.5077088475227356,
-0.1825021356344223,
-0.9383851885795593,
-0.6393535733222961,
-0.29712334275245667,
-0.5922278165817261,
1.7157928943634033,
0.09551943838596344,
-0.3632720410823822,
0.29628226161003113,
-0.6490345597267151,
0.03613013029098511,
-1.1366567611694336,
-0.13767306506633759,
-0.2389119565486908,
-0.07318447530269623,
-0.3443811535835266,
2.0456504821777344,
-0.8185617327690125,
-1.8781156539916992,
0.08112426847219467,
0.35727187991142273,
-0.1400354504585266,
0.4922557771205902,
1.4776262044906616,
0.5464436411857605,
1.7077101469039917,
1.178090214729309,
1.017655611038208,
-0.4170157015323639,
-1.4631611108779907,
0.9281863570213318,
1.0356239080429077,
-1.20289945602417,
1.0823845863342285,
0.05614916607737541,
-0.5225301384925842,
0.7064231634140015,
1.0485800504684448,
0.20773755013942719,
-2.2074954509735107,
0.7594350576400757,
-1.207610011100769,
1.0555541515350342,
0.610558807849884,
0.6474511027336121,
0.33080095052719116,
0.7164154052734375,
-1.349616289138794,
-0.9981144070625305,
-0.6463130712509155,
-0.5116990804672241,
2.158710241317749,
-0.263204425573349,
0.8354421257972717,
-0.27722981572151184,
-1.1003108024597168,
0.0752456858754158,
0.5916508436203003,
0.4710052013397217,
-0.46720510721206665,
0.7826096415519714,
-0.5323362946510315,
-1.276084303855896,
-1.4022051095962524,
-0.5208539962768555,
-1.1583675146102905,
-0.9040546417236328,
1.1670269966125488,
0.6124212145805359,
0.6121336221694946,
1.875520944595337,
0.6659557819366455,
0.1711227148771286,
-2.2756881713867188,
0.9211390018463135,
0.1634315401315689,
-0.2748200595378876,
0.6982920169830322,
0.39581918716430664,
1.2071812152862549,
-0.13805770874023438,
0.7343531250953674,
-2.4411916732788086,
2.3196897506713867,
-0.17722898721694946,
0.8897392749786377,
0.3634805679321289,
0.16271884739398956,
1.0489567518234253,
0.7466050982475281,
0.2924036979675293,
-0.9397538304328918,
0.3544946610927582,
-0.6287315487861633,
1.6739939451217651,
1.111812710762024,
-0.5336187481880188,
0.028996989130973816,
1.2102140188217163,
0.4504881501197815,
-0.25446605682373047,
-1.006352186203003,
-0.8201916813850403,
0.875382125377655,
1.6031852960586548,
-0.4631401002407074,
-0.185306116938591,
0.6375238299369812,
0.7736729383468628,
-1.1465821266174316,
-0.11241079121828079,
-0.6586557626724243,
-0.7450273633003235,
1.4412245750427246,
2.3405160903930664,
-0.43793126940727234,
0.13119441270828247,
-0.6680393815040588,
-1.2112681865692139,
0.7685853242874146,
-0.0902538001537323,
0.09589207172393799,
0.6225268840789795,
-0.29591214656829834,
0.822335958480835,
0.6753244400024414,
0.8445195555686951,
0.5536994338035583,
0.3533068895339966,
0.26179707050323486,
-0.6182870268821716,
-0.7910727262496948,
-0.3006151616573334,
-1.109635591506958,
-2.998492479324341,
0.3038557171821594,
-0.5460681319236755,
-1.505746603012085,
0.030151933431625366,
-1.0591150522232056,
0.926923930644989,
-0.44170132279396057,
-1.0356441736221313,
-1.425034999847412,
0.3226325511932373,
0.15536952018737793,
1.2162562608718872,
-1.9465266466140747,
0.02006065472960472,
1.1968010663986206,
0.5263950824737549,
-0.6754090189933777,
0.981104850769043,
0.4036937654018402,
1.139806866645813,
0.6123124361038208,
-0.3116177022457123,
0.6810207366943359,
0.0393633171916008,
-1.4281851053237915,
0.29917871952056885,
1.3376373052597046,
0.1298145353794098,
1.1567678451538086,
-0.44614461064338684,
0.01846035197377205,
0.38086381554603577,
-0.5472158789634705,
-0.7255591154098511,
-0.22664862871170044,
0.5653764605522156,
0.15604473650455475,
-0.9191997051239014,
0.04193190112709999,
0.041122131049633026,
-0.25682732462882996,
0.2148655503988266,
-1.2496213912963867,
-0.2877045273780823,
-0.6526523232460022,
-0.2724723517894745,
-1.5957430601119995,
-0.39123162627220154,
1.3589668273925781,
-0.49877187609672546,
-0.017033925279974937,
0.42571747303009033,
0.3377355933189392,
0.5255733728408813,
0.6757798790931702,
-0.456460565328598,
-0.8079858422279358,
-0.37148305773735046,
-0.38001370429992676,
0.3648025095462799,
1.3907749652862549,
-0.1763080209493637,
-0.9201278686523438,
0.5839563012123108,
-0.2414925992488861,
0.04287508502602577,
1.7492423057556152,
-0.12219646573066711,
-0.9055643081665039,
0.45015713572502136,
-0.29427990317344666,
1.7997426986694336,
1.4550246000289917,
0.8986635208129883,
-0.3352488875389099,
-0.8556499481201172,
0.6243661642074585,
-0.3671620488166809,
-0.5361656546592712,
0.548538863658905,
-0.027462873607873917,
-0.2274317741394043,
-1.4875686168670654,
0.6112151741981506,
1.3978509902954102,
-0.7281609177589417,
-1.126489281654358,
0.29779067635536194,
-0.7117459177970886,
1.2749669551849365,
0.4650860130786896,
0.5920834541320801,
0.2524968683719635,
1.6979833841323853,
0.8259206414222717,
-0.74793940782547,
0.5637441277503967,
0.4511431157588959,
-0.1875896155834198,
-2.2373275756835938,
-1.3576781749725342,
-0.06610921770334244,
-0.6480274796485901,
-1.393911361694336,
1.157723069190979,
-0.9904859662055969,
-1.0643576383590698,
0.7183244228363037,
0.10240072011947632,
1.1069265604019165,
0.5916813015937805,
1.382063388824463,
2.053924083709717,
0.7651280164718628,
0.6433367133140564,
1.3568512201309204,
-0.3117568790912628,
-0.6666123270988464,
1.757278323173523,
-0.16819503903388977,
0.62722247838974,
1.2265576124191284,
-0.09719564765691757,
-0.8897978663444519,
-0.7437949180603027,
-1.0019721984863281,
-0.5762737989425659,
1.3471812009811401,
-0.062007974833250046,
-1.13438081741333,
0.33382752537727356,
1.4365394115447998,
-0.07417627424001694,
-0.3604384958744049,
0.5492748022079468,
0.4607737362384796,
-0.655978262424469,
-0.012315545231103897,
-0.9403544068336487,
0.3867019712924957,
-0.5102832913398743,
-0.187723308801651,
0.47983717918395996,
0.7075936198234558,
1.3854098320007324,
-0.33404740691185,
0.3641188144683838,
0.754497766494751,
-1.433997631072998,
1.4530216455459595,
-0.6653778553009033,
0.1736760437488556,
-2.104482650756836,
1.0073699951171875,
-0.5716478228569031,
1.8704283237457275,
-2.863718032836914,
0.09473608434200287,
-0.23694629967212677,
-0.7169522047042847,
0.1540021151304245,
-0.3177435100078583,
0.22534647583961487,
-0.22231332957744598,
-1.0113410949707031,
0.22776857018470764,
-0.7242894172668457,
0.11651676893234253,
0.9361175894737244,
1.3971633911132812,
-0.968763530254364,
-0.36237284541130066,
-1.7109289169311523,
0.1255347728729248,
-0.8337401747703552,
0.13466233015060425,
-1.9250900745391846,
-0.15637552738189697,
-1.7998251914978027,
-2.070361375808716,
-1.3731002807617188,
-1.270176649093628,
1.22702956199646,
0.025641780346632004,
-0.6712268590927124,
1.2564916610717773,
-0.12037519365549088,
-1.9349623918533325,
0.9310553669929504,
-2.007655620574951
] |
https://github.com/huggingface/datasets/issues/3353 | add one field "example_id", but I can't see it in the "comput_loss" function | Hmmm, it might be because the default data collator removes all the fields with `string` type:
https://github.com/huggingface/transformers/blob/4c0dd199c8305903564c2edeae23d294edd4b321/src/transformers/data/data_collator.py#L107-L112
I guess you also need a custom data collator that doesn't remove them. | Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_ | 1,081 | 30 | add one field "example_id", but I can't see it in the "comput_loss" function
Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_
Hmmm, it might be because the default data collator removes all the fields with `string` type:
https://github.com/huggingface/transformers/blob/4c0dd199c8305903564c2edeae23d294edd4b321/src/transformers/data/data_collator.py#L107-L112
I guess you also need a custom data collator that doesn't remove them. | [
-1.1895976066589355,
-1.039095163345337,
-0.6640315055847168,
1.2366902828216553,
-0.4163138270378113,
-1.0222519636154175,
0.35613688826560974,
-1.0311400890350342,
1.5679025650024414,
-0.8252658247947693,
0.17931242287158966,
-1.7496793270111084,
0.07670159637928009,
-0.7909781336784363,
-0.761791467666626,
-0.7969787120819092,
-0.4661526679992676,
-0.9245725870132446,
1.0929173231124878,
2.69830322265625,
1.1135051250457764,
-1.3217302560806274,
2.569017171859741,
0.7278850674629211,
-0.0920877754688263,
-1.0471481084823608,
0.637866735458374,
-0.18390871584415436,
-1.2136942148208618,
-0.5090659856796265,
-1.0535786151885986,
-0.12921710312366486,
-0.6278619170188904,
-0.29026055335998535,
-0.06275304406881332,
0.28912919759750366,
-0.20787301659584045,
-0.01209180150181055,
-0.14447589218616486,
-0.8764022588729858,
0.32618817687034607,
-0.5805924534797668,
1.0742692947387695,
-0.18681840598583221,
1.5897657871246338,
-0.573383092880249,
0.5745514631271362,
0.662045419216156,
1.1734538078308105,
0.20082953572273254,
0.05864816531538963,
0.1351698637008667,
0.46308714151382446,
0.038605764508247375,
0.4449019730091095,
0.9199667572975159,
0.685585081577301,
0.40225595235824585,
0.6912224888801575,
-2.419261932373047,
1.2609796524047852,
-1.1053287982940674,
0.3364589810371399,
1.53970468044281,
-0.7023851275444031,
0.2943371832370758,
-1.776457667350769,
-0.20279459655284882,
0.5645743012428284,
-2.2507381439208984,
0.41838687658309937,
-1.2893177270889282,
-0.5798829793930054,
0.7691457867622375,
0.5314910411834717,
-1.4210795164108276,
0.3341231644153595,
-0.24194569885730743,
0.768769383430481,
0.2342037409543991,
0.8088821172714233,
-2.0295000076293945,
-0.06572546064853668,
-0.372118204832077,
0.23563693463802338,
-1.0491889715194702,
-1.4812320470809937,
0.6817902326583862,
0.3748440742492676,
0.6285898685455322,
-0.23850053548812866,
1.0065534114837646,
-1.2902315855026245,
0.8387157917022705,
-1.4360737800598145,
-1.6713560819625854,
-1.343722939491272,
-2.5118467807769775,
-2.4247584342956543,
0.7252214550971985,
-0.47199559211730957,
-0.5862975120544434,
1.985018253326416,
-0.9373512864112854,
-1.21500825881958,
1.299300193786621,
0.4708799421787262,
-0.20056456327438354,
2.718534231185913,
0.010445372201502323,
-0.42883992195129395,
0.5631175637245178,
-1.2380419969558716,
0.9889167547225952,
-0.28102490305900574,
1.4435807466506958,
0.4333796799182892,
-0.9281153678894043,
1.6508121490478516,
-0.43526172637939453,
0.3065985143184662,
-0.5788653492927551,
-0.34469300508499146,
-0.8581360578536987,
0.2845155894756317,
1.6436034440994263,
-0.09223657101392746,
1.152306079864502,
-0.23069201409816742,
-1.357582926750183,
-1.3302077054977417,
1.1328922510147095,
0.33394038677215576,
-1.0499520301818848,
0.04480056092143059,
-0.28776371479034424,
0.29781776666641235,
-0.08772439509630203,
1.158739686012268,
1.2939478158950806,
0.5962038636207581,
-0.4442080855369568,
-1.0303624868392944,
0.1318967044353485,
-0.5281366109848022,
-1.039331078529358,
-1.7957265377044678,
-0.3787548840045929,
-0.22766901552677155,
0.8079566955566406,
-1.0962685346603394,
1.8232150077819824,
0.9803046584129333,
1.9187325239181519,
0.8831626176834106,
-0.8009540438652039,
1.3360321521759033,
0.18836656212806702,
1.7110918760299683,
-0.9168318510055542,
0.8123793005943298,
-0.7285799384117126,
-1.1481969356536865,
1.372307300567627,
-0.2438577264547348,
-1.778907060623169,
-0.6976925134658813,
-0.6932194828987122,
-0.5682119727134705,
-0.7984493970870972,
1.0301254987716675,
-0.26847773790359497,
-1.5462898015975952,
0.3373371362686157,
-0.6286514401435852,
0.004335484467446804,
-1.3756216764450073,
0.42450013756752014,
0.6949224472045898,
-0.3248215317726135,
-0.05769398435950279,
-0.23792019486427307,
-1.3105649948120117,
-0.48335587978363037,
0.22253097593784332,
1.8404605388641357,
-0.35602372884750366,
1.051095962524414,
0.9296424388885498,
-0.5979870557785034,
-0.33573001623153687,
0.48708465695381165,
-0.2531633675098419,
0.5537673234939575,
-0.7777538895606995,
-0.8665095567703247,
1.0880262851715088,
-0.24477730691432953,
-0.4719252586364746,
1.463572382926941,
0.8246966600418091,
-1.1546690464019775,
-0.22897160053253174,
-0.07162866741418839,
-0.5736765265464783,
0.4072394371032715,
-1.6731926202774048,
-0.13646556437015533,
0.7169399261474609,
-1.6342347860336304,
-0.5326835513114929,
-0.21367789804935455,
1.187949776649475,
-0.19788546860218048,
1.3145592212677002,
-0.2589850425720215,
-0.32047754526138306,
-0.43801262974739075,
-0.3117007911205292,
0.3176586627960205,
-0.07223068922758102,
-0.2532570958137512,
0.3948949873447418,
-0.8057718276977539,
0.5421929955482483,
1.5384974479675293,
0.1510709524154663,
0.1653936505317688,
0.1915493905544281,
0.7292171716690063,
0.5253437757492065,
0.18086226284503937,
-1.0966813564300537,
-1.299959659576416,
2.2239937782287598,
-1.605476975440979,
1.8691622018814087,
0.7682279944419861,
-0.04412313178181648,
-1.591460108757019,
-1.6851727962493896,
1.3557803630828857,
1.0920729637145996,
2.0355186462402344,
0.49688413739204407,
0.33690595626831055,
-0.6926538348197937,
-0.5639828443527222,
0.14642922580242157,
-1.0368473529815674,
-0.7009578347206116,
0.16237351298332214,
2.576002836227417,
1.6863000392913818,
-0.43302562832832336,
-0.08837564289569855,
-1.1402783393859863,
1.5213425159454346,
-0.1985204666852951,
0.42708179354667664,
1.9858262538909912,
-0.6113894581794739,
-1.1351990699768066,
1.2333323955535889,
-2.5358338356018066,
0.06842996180057526,
1.981589913368225,
0.34728315472602844,
0.13851392269134521,
-1.2747389078140259,
-0.6211862564086914,
-0.33924636244773865,
-0.7330419421195984,
-1.3701999187469482,
0.6628771424293518,
-0.22179865837097168,
-0.8691914081573486,
-1.6307919025421143,
0.2750972509384155,
-1.217178225517273,
-1.6818227767944336,
0.2486046850681305,
1.702022671699524,
2.2535417079925537,
-0.6235804557800293,
1.536436676979065,
-0.2863750755786896,
0.20038847625255585,
0.9110482335090637,
1.2159645557403564,
2.7692344188690186,
1.960254430770874,
-0.9519389271736145,
0.5788230299949646,
-0.41769662499427795,
-0.502387523651123,
1.1861021518707275,
-0.946861743927002,
1.2420523166656494,
-0.0805278941988945,
-1.2636125087738037,
-1.1521127223968506,
0.9692273736000061,
0.19942036271095276,
0.17733922600746155,
-0.3886091113090515,
1.0422375202178955,
0.43625137209892273,
1.0932729244232178,
0.7702150940895081,
0.10553213208913803,
0.5377821326255798,
-0.6629857420921326,
-0.5339068174362183,
1.7187066078186035,
0.31956756114959717,
-1.6548815965652466,
-2.4735167026519775,
-0.49333804845809937,
-1.0069384574890137,
0.253007709980011,
-0.5944660902023315,
-1.0095915794372559,
1.7189663648605347,
0.25065627694129944,
-0.9851896166801453,
-0.08195361495018005,
-0.2384142279624939,
-0.39861056208610535,
2.7469990253448486,
-1.1723175048828125,
-0.37860244512557983,
-0.8392878174781799,
-0.7855929136276245,
1.5896369218826294,
-1.1608726978302002,
0.27036619186401367,
-1.0533287525177002,
-0.4088253974914551,
-1.1177390813827515,
-0.1699780523777008,
-0.07819963991641998,
-1.140964150428772,
0.8891134858131409,
0.22632624208927155,
-1.3646681308746338,
-0.4902838170528412,
-1.1231446266174316,
0.6826585531234741,
0.1317124366760254,
0.2470356822013855,
1.73959219455719,
0.2296821027994156,
-0.45275193452835083,
0.9094072580337524,
1.1785720586776733,
0.8427883982658386,
-0.6394293308258057,
0.09540098160505295,
-0.5352826714515686,
0.48648104071617126,
-0.7698959112167358,
0.24542570114135742,
-2.6415908336639404,
0.6325101852416992,
-0.08122167736291885,
-0.25936293601989746,
-0.09120965749025345,
-1.2821581363677979,
1.5078651905059814,
2.276076555252075,
-1.2054611444473267,
0.6177528500556946,
0.14661790430545807,
1.3931140899658203,
-1.2498247623443604,
0.33750760555267334,
-0.49843013286590576,
2.3310420513153076,
0.25339558720588684,
0.9891771078109741,
-0.48364076018333435,
-2.5406105518341064,
0.7236827611923218,
-1.3685665130615234,
-1.0388660430908203,
0.42999252676963806,
-0.8793665170669556,
0.12775206565856934,
-1.4937657117843628,
-0.006426874548196793,
-0.8852235674858093,
-1.2177715301513672,
0.6171974539756775,
0.13086025416851044,
0.6082918643951416,
-0.7391733527183533,
0.32263073325157166,
-2.2444915771484375,
-1.3983354568481445,
-0.32678642868995667,
-0.7280755043029785,
0.5607365369796753,
-0.3695945739746094,
0.7506893277168274,
-0.14270903170108795,
-0.23165960609912872,
0.4807398021221161,
1.576909065246582,
3.520906686782837,
-0.0008408809080719948,
0.5474457740783691,
-0.12223157286643982,
-1.1003692150115967,
1.3609298467636108,
1.0102949142456055,
0.3751102387905121,
-0.552821934223175,
-0.9551666378974915,
1.4061744213104248,
2.033804416656494,
1.0445972681045532,
-0.01042311079800129,
-0.6603420376777649,
-0.369079053401947,
0.002119629643857479,
0.45469945669174194,
0.28431054949760437,
0.9683314561843872,
-0.03626386821269989,
-0.19164322316646576,
1.5324095487594604,
1.0871098041534424,
-0.41498616337776184,
0.3051357567310333,
-0.8403621912002563,
-0.3614751994609833,
0.6376226544380188,
0.11813348531723022,
-0.10272441059350967,
0.7366030216217041,
-1.1465781927108765,
-0.5077088475227356,
-0.1825021356344223,
-0.9383851885795593,
-0.6393535733222961,
-0.29712334275245667,
-0.5922278165817261,
1.7157928943634033,
0.09551943838596344,
-0.3632720410823822,
0.29628226161003113,
-0.6490345597267151,
0.03613013029098511,
-1.1366567611694336,
-0.13767306506633759,
-0.2389119565486908,
-0.07318447530269623,
-0.3443811535835266,
2.0456504821777344,
-0.8185617327690125,
-1.8781156539916992,
0.08112426847219467,
0.35727187991142273,
-0.1400354504585266,
0.4922557771205902,
1.4776262044906616,
0.5464436411857605,
1.7077101469039917,
1.178090214729309,
1.017655611038208,
-0.4170157015323639,
-1.4631611108779907,
0.9281863570213318,
1.0356239080429077,
-1.20289945602417,
1.0823845863342285,
0.05614916607737541,
-0.5225301384925842,
0.7064231634140015,
1.0485800504684448,
0.20773755013942719,
-2.2074954509735107,
0.7594350576400757,
-1.207610011100769,
1.0555541515350342,
0.610558807849884,
0.6474511027336121,
0.33080095052719116,
0.7164154052734375,
-1.349616289138794,
-0.9981144070625305,
-0.6463130712509155,
-0.5116990804672241,
2.158710241317749,
-0.263204425573349,
0.8354421257972717,
-0.27722981572151184,
-1.1003108024597168,
0.0752456858754158,
0.5916508436203003,
0.4710052013397217,
-0.46720510721206665,
0.7826096415519714,
-0.5323362946510315,
-1.276084303855896,
-1.4022051095962524,
-0.5208539962768555,
-1.1583675146102905,
-0.9040546417236328,
1.1670269966125488,
0.6124212145805359,
0.6121336221694946,
1.875520944595337,
0.6659557819366455,
0.1711227148771286,
-2.2756881713867188,
0.9211390018463135,
0.1634315401315689,
-0.2748200595378876,
0.6982920169830322,
0.39581918716430664,
1.2071812152862549,
-0.13805770874023438,
0.7343531250953674,
-2.4411916732788086,
2.3196897506713867,
-0.17722898721694946,
0.8897392749786377,
0.3634805679321289,
0.16271884739398956,
1.0489567518234253,
0.7466050982475281,
0.2924036979675293,
-0.9397538304328918,
0.3544946610927582,
-0.6287315487861633,
1.6739939451217651,
1.111812710762024,
-0.5336187481880188,
0.028996989130973816,
1.2102140188217163,
0.4504881501197815,
-0.25446605682373047,
-1.006352186203003,
-0.8201916813850403,
0.875382125377655,
1.6031852960586548,
-0.4631401002407074,
-0.185306116938591,
0.6375238299369812,
0.7736729383468628,
-1.1465821266174316,
-0.11241079121828079,
-0.6586557626724243,
-0.7450273633003235,
1.4412245750427246,
2.3405160903930664,
-0.43793126940727234,
0.13119441270828247,
-0.6680393815040588,
-1.2112681865692139,
0.7685853242874146,
-0.0902538001537323,
0.09589207172393799,
0.6225268840789795,
-0.29591214656829834,
0.822335958480835,
0.6753244400024414,
0.8445195555686951,
0.5536994338035583,
0.3533068895339966,
0.26179707050323486,
-0.6182870268821716,
-0.7910727262496948,
-0.3006151616573334,
-1.109635591506958,
-2.998492479324341,
0.3038557171821594,
-0.5460681319236755,
-1.505746603012085,
0.030151933431625366,
-1.0591150522232056,
0.926923930644989,
-0.44170132279396057,
-1.0356441736221313,
-1.425034999847412,
0.3226325511932373,
0.15536952018737793,
1.2162562608718872,
-1.9465266466140747,
0.02006065472960472,
1.1968010663986206,
0.5263950824737549,
-0.6754090189933777,
0.981104850769043,
0.4036937654018402,
1.139806866645813,
0.6123124361038208,
-0.3116177022457123,
0.6810207366943359,
0.0393633171916008,
-1.4281851053237915,
0.29917871952056885,
1.3376373052597046,
0.1298145353794098,
1.1567678451538086,
-0.44614461064338684,
0.01846035197377205,
0.38086381554603577,
-0.5472158789634705,
-0.7255591154098511,
-0.22664862871170044,
0.5653764605522156,
0.15604473650455475,
-0.9191997051239014,
0.04193190112709999,
0.041122131049633026,
-0.25682732462882996,
0.2148655503988266,
-1.2496213912963867,
-0.2877045273780823,
-0.6526523232460022,
-0.2724723517894745,
-1.5957430601119995,
-0.39123162627220154,
1.3589668273925781,
-0.49877187609672546,
-0.017033925279974937,
0.42571747303009033,
0.3377355933189392,
0.5255733728408813,
0.6757798790931702,
-0.456460565328598,
-0.8079858422279358,
-0.37148305773735046,
-0.38001370429992676,
0.3648025095462799,
1.3907749652862549,
-0.1763080209493637,
-0.9201278686523438,
0.5839563012123108,
-0.2414925992488861,
0.04287508502602577,
1.7492423057556152,
-0.12219646573066711,
-0.9055643081665039,
0.45015713572502136,
-0.29427990317344666,
1.7997426986694336,
1.4550246000289917,
0.8986635208129883,
-0.3352488875389099,
-0.8556499481201172,
0.6243661642074585,
-0.3671620488166809,
-0.5361656546592712,
0.548538863658905,
-0.027462873607873917,
-0.2274317741394043,
-1.4875686168670654,
0.6112151741981506,
1.3978509902954102,
-0.7281609177589417,
-1.126489281654358,
0.29779067635536194,
-0.7117459177970886,
1.2749669551849365,
0.4650860130786896,
0.5920834541320801,
0.2524968683719635,
1.6979833841323853,
0.8259206414222717,
-0.74793940782547,
0.5637441277503967,
0.4511431157588959,
-0.1875896155834198,
-2.2373275756835938,
-1.3576781749725342,
-0.06610921770334244,
-0.6480274796485901,
-1.393911361694336,
1.157723069190979,
-0.9904859662055969,
-1.0643576383590698,
0.7183244228363037,
0.10240072011947632,
1.1069265604019165,
0.5916813015937805,
1.382063388824463,
2.053924083709717,
0.7651280164718628,
0.6433367133140564,
1.3568512201309204,
-0.3117568790912628,
-0.6666123270988464,
1.757278323173523,
-0.16819503903388977,
0.62722247838974,
1.2265576124191284,
-0.09719564765691757,
-0.8897978663444519,
-0.7437949180603027,
-1.0019721984863281,
-0.5762737989425659,
1.3471812009811401,
-0.062007974833250046,
-1.13438081741333,
0.33382752537727356,
1.4365394115447998,
-0.07417627424001694,
-0.3604384958744049,
0.5492748022079468,
0.4607737362384796,
-0.655978262424469,
-0.012315545231103897,
-0.9403544068336487,
0.3867019712924957,
-0.5102832913398743,
-0.187723308801651,
0.47983717918395996,
0.7075936198234558,
1.3854098320007324,
-0.33404740691185,
0.3641188144683838,
0.754497766494751,
-1.433997631072998,
1.4530216455459595,
-0.6653778553009033,
0.1736760437488556,
-2.104482650756836,
1.0073699951171875,
-0.5716478228569031,
1.8704283237457275,
-2.863718032836914,
0.09473608434200287,
-0.23694629967212677,
-0.7169522047042847,
0.1540021151304245,
-0.3177435100078583,
0.22534647583961487,
-0.22231332957744598,
-1.0113410949707031,
0.22776857018470764,
-0.7242894172668457,
0.11651676893234253,
0.9361175894737244,
1.3971633911132812,
-0.968763530254364,
-0.36237284541130066,
-1.7109289169311523,
0.1255347728729248,
-0.8337401747703552,
0.13466233015060425,
-1.9250900745391846,
-0.15637552738189697,
-1.7998251914978027,
-2.070361375808716,
-1.3731002807617188,
-1.270176649093628,
1.22702956199646,
0.025641780346632004,
-0.6712268590927124,
1.2564916610717773,
-0.12037519365549088,
-1.9349623918533325,
0.9310553669929504,
-2.007655620574951
] |
https://github.com/huggingface/datasets/issues/3353 | add one field "example_id", but I can't see it in the "comput_loss" function | I overwrite **get_train_dataloader**, and remove **_remove_unused_columns**, but it doesn't work.
```
def get_train_dataloader(self) -> DataLoader:
"""
Returns the training :class:`~torch.utils.data.DataLoader`.
Will use no sampler if :obj:`self.train_dataset` does not implement :obj:`__len__`, a random sampler (adapted
to distributed training if necessary) otherwise.
Subclass and override this method if you want to inject some custom behavior.
"""
if self.train_dataset is None:
raise ValueError("Trainer: training requires a train_dataset.")
train_dataset = self.train_dataset
# if is_datasets_available() and isinstance(train_dataset, datasets.Dataset):
# train_dataset = self._remove_unused_columns(train_dataset, description="training")
if isinstance(train_dataset, torch.utils.data.IterableDataset):
if self.args.world_size > 1:
train_dataset = IterableDatasetShard(
train_dataset,
batch_size=self.args.train_batch_size,
drop_last=self.args.dataloader_drop_last,
num_processes=self.args.world_size,
process_index=self.args.process_index,
)
return DataLoader(
train_dataset,
batch_size=self.args.train_batch_size,
collate_fn=self.data_collator,
num_workers=self.args.dataloader_num_workers,
pin_memory=self.args.dataloader_pin_memory,
)
train_sampler = self._get_train_sampler()
return DataLoader(
train_dataset,
batch_size=self.args.train_batch_size,
sampler=train_sampler,
collate_fn=self.data_collator,
drop_last=self.args.dataloader_drop_last,
num_workers=self.args.dataloader_num_workers,
pin_memory=self.args.dataloader_pin_memory,
)
``` | Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_ | 1,081 | 116 | add one field "example_id", but I can't see it in the "comput_loss" function
Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_
I overwrite **get_train_dataloader**, and remove **_remove_unused_columns**, but it doesn't work.
```
def get_train_dataloader(self) -> DataLoader:
"""
Returns the training :class:`~torch.utils.data.DataLoader`.
Will use no sampler if :obj:`self.train_dataset` does not implement :obj:`__len__`, a random sampler (adapted
to distributed training if necessary) otherwise.
Subclass and override this method if you want to inject some custom behavior.
"""
if self.train_dataset is None:
raise ValueError("Trainer: training requires a train_dataset.")
train_dataset = self.train_dataset
# if is_datasets_available() and isinstance(train_dataset, datasets.Dataset):
# train_dataset = self._remove_unused_columns(train_dataset, description="training")
if isinstance(train_dataset, torch.utils.data.IterableDataset):
if self.args.world_size > 1:
train_dataset = IterableDatasetShard(
train_dataset,
batch_size=self.args.train_batch_size,
drop_last=self.args.dataloader_drop_last,
num_processes=self.args.world_size,
process_index=self.args.process_index,
)
return DataLoader(
train_dataset,
batch_size=self.args.train_batch_size,
collate_fn=self.data_collator,
num_workers=self.args.dataloader_num_workers,
pin_memory=self.args.dataloader_pin_memory,
)
train_sampler = self._get_train_sampler()
return DataLoader(
train_dataset,
batch_size=self.args.train_batch_size,
sampler=train_sampler,
collate_fn=self.data_collator,
drop_last=self.args.dataloader_drop_last,
num_workers=self.args.dataloader_num_workers,
pin_memory=self.args.dataloader_pin_memory,
)
``` | [
-1.1895976066589355,
-1.039095163345337,
-0.6640315055847168,
1.2366902828216553,
-0.4163138270378113,
-1.0222519636154175,
0.35613688826560974,
-1.0311400890350342,
1.5679025650024414,
-0.8252658247947693,
0.17931242287158966,
-1.7496793270111084,
0.07670159637928009,
-0.7909781336784363,
-0.761791467666626,
-0.7969787120819092,
-0.4661526679992676,
-0.9245725870132446,
1.0929173231124878,
2.69830322265625,
1.1135051250457764,
-1.3217302560806274,
2.569017171859741,
0.7278850674629211,
-0.0920877754688263,
-1.0471481084823608,
0.637866735458374,
-0.18390871584415436,
-1.2136942148208618,
-0.5090659856796265,
-1.0535786151885986,
-0.12921710312366486,
-0.6278619170188904,
-0.29026055335998535,
-0.06275304406881332,
0.28912919759750366,
-0.20787301659584045,
-0.01209180150181055,
-0.14447589218616486,
-0.8764022588729858,
0.32618817687034607,
-0.5805924534797668,
1.0742692947387695,
-0.18681840598583221,
1.5897657871246338,
-0.573383092880249,
0.5745514631271362,
0.662045419216156,
1.1734538078308105,
0.20082953572273254,
0.05864816531538963,
0.1351698637008667,
0.46308714151382446,
0.038605764508247375,
0.4449019730091095,
0.9199667572975159,
0.685585081577301,
0.40225595235824585,
0.6912224888801575,
-2.419261932373047,
1.2609796524047852,
-1.1053287982940674,
0.3364589810371399,
1.53970468044281,
-0.7023851275444031,
0.2943371832370758,
-1.776457667350769,
-0.20279459655284882,
0.5645743012428284,
-2.2507381439208984,
0.41838687658309937,
-1.2893177270889282,
-0.5798829793930054,
0.7691457867622375,
0.5314910411834717,
-1.4210795164108276,
0.3341231644153595,
-0.24194569885730743,
0.768769383430481,
0.2342037409543991,
0.8088821172714233,
-2.0295000076293945,
-0.06572546064853668,
-0.372118204832077,
0.23563693463802338,
-1.0491889715194702,
-1.4812320470809937,
0.6817902326583862,
0.3748440742492676,
0.6285898685455322,
-0.23850053548812866,
1.0065534114837646,
-1.2902315855026245,
0.8387157917022705,
-1.4360737800598145,
-1.6713560819625854,
-1.343722939491272,
-2.5118467807769775,
-2.4247584342956543,
0.7252214550971985,
-0.47199559211730957,
-0.5862975120544434,
1.985018253326416,
-0.9373512864112854,
-1.21500825881958,
1.299300193786621,
0.4708799421787262,
-0.20056456327438354,
2.718534231185913,
0.010445372201502323,
-0.42883992195129395,
0.5631175637245178,
-1.2380419969558716,
0.9889167547225952,
-0.28102490305900574,
1.4435807466506958,
0.4333796799182892,
-0.9281153678894043,
1.6508121490478516,
-0.43526172637939453,
0.3065985143184662,
-0.5788653492927551,
-0.34469300508499146,
-0.8581360578536987,
0.2845155894756317,
1.6436034440994263,
-0.09223657101392746,
1.152306079864502,
-0.23069201409816742,
-1.357582926750183,
-1.3302077054977417,
1.1328922510147095,
0.33394038677215576,
-1.0499520301818848,
0.04480056092143059,
-0.28776371479034424,
0.29781776666641235,
-0.08772439509630203,
1.158739686012268,
1.2939478158950806,
0.5962038636207581,
-0.4442080855369568,
-1.0303624868392944,
0.1318967044353485,
-0.5281366109848022,
-1.039331078529358,
-1.7957265377044678,
-0.3787548840045929,
-0.22766901552677155,
0.8079566955566406,
-1.0962685346603394,
1.8232150077819824,
0.9803046584129333,
1.9187325239181519,
0.8831626176834106,
-0.8009540438652039,
1.3360321521759033,
0.18836656212806702,
1.7110918760299683,
-0.9168318510055542,
0.8123793005943298,
-0.7285799384117126,
-1.1481969356536865,
1.372307300567627,
-0.2438577264547348,
-1.778907060623169,
-0.6976925134658813,
-0.6932194828987122,
-0.5682119727134705,
-0.7984493970870972,
1.0301254987716675,
-0.26847773790359497,
-1.5462898015975952,
0.3373371362686157,
-0.6286514401435852,
0.004335484467446804,
-1.3756216764450073,
0.42450013756752014,
0.6949224472045898,
-0.3248215317726135,
-0.05769398435950279,
-0.23792019486427307,
-1.3105649948120117,
-0.48335587978363037,
0.22253097593784332,
1.8404605388641357,
-0.35602372884750366,
1.051095962524414,
0.9296424388885498,
-0.5979870557785034,
-0.33573001623153687,
0.48708465695381165,
-0.2531633675098419,
0.5537673234939575,
-0.7777538895606995,
-0.8665095567703247,
1.0880262851715088,
-0.24477730691432953,
-0.4719252586364746,
1.463572382926941,
0.8246966600418091,
-1.1546690464019775,
-0.22897160053253174,
-0.07162866741418839,
-0.5736765265464783,
0.4072394371032715,
-1.6731926202774048,
-0.13646556437015533,
0.7169399261474609,
-1.6342347860336304,
-0.5326835513114929,
-0.21367789804935455,
1.187949776649475,
-0.19788546860218048,
1.3145592212677002,
-0.2589850425720215,
-0.32047754526138306,
-0.43801262974739075,
-0.3117007911205292,
0.3176586627960205,
-0.07223068922758102,
-0.2532570958137512,
0.3948949873447418,
-0.8057718276977539,
0.5421929955482483,
1.5384974479675293,
0.1510709524154663,
0.1653936505317688,
0.1915493905544281,
0.7292171716690063,
0.5253437757492065,
0.18086226284503937,
-1.0966813564300537,
-1.299959659576416,
2.2239937782287598,
-1.605476975440979,
1.8691622018814087,
0.7682279944419861,
-0.04412313178181648,
-1.591460108757019,
-1.6851727962493896,
1.3557803630828857,
1.0920729637145996,
2.0355186462402344,
0.49688413739204407,
0.33690595626831055,
-0.6926538348197937,
-0.5639828443527222,
0.14642922580242157,
-1.0368473529815674,
-0.7009578347206116,
0.16237351298332214,
2.576002836227417,
1.6863000392913818,
-0.43302562832832336,
-0.08837564289569855,
-1.1402783393859863,
1.5213425159454346,
-0.1985204666852951,
0.42708179354667664,
1.9858262538909912,
-0.6113894581794739,
-1.1351990699768066,
1.2333323955535889,
-2.5358338356018066,
0.06842996180057526,
1.981589913368225,
0.34728315472602844,
0.13851392269134521,
-1.2747389078140259,
-0.6211862564086914,
-0.33924636244773865,
-0.7330419421195984,
-1.3701999187469482,
0.6628771424293518,
-0.22179865837097168,
-0.8691914081573486,
-1.6307919025421143,
0.2750972509384155,
-1.217178225517273,
-1.6818227767944336,
0.2486046850681305,
1.702022671699524,
2.2535417079925537,
-0.6235804557800293,
1.536436676979065,
-0.2863750755786896,
0.20038847625255585,
0.9110482335090637,
1.2159645557403564,
2.7692344188690186,
1.960254430770874,
-0.9519389271736145,
0.5788230299949646,
-0.41769662499427795,
-0.502387523651123,
1.1861021518707275,
-0.946861743927002,
1.2420523166656494,
-0.0805278941988945,
-1.2636125087738037,
-1.1521127223968506,
0.9692273736000061,
0.19942036271095276,
0.17733922600746155,
-0.3886091113090515,
1.0422375202178955,
0.43625137209892273,
1.0932729244232178,
0.7702150940895081,
0.10553213208913803,
0.5377821326255798,
-0.6629857420921326,
-0.5339068174362183,
1.7187066078186035,
0.31956756114959717,
-1.6548815965652466,
-2.4735167026519775,
-0.49333804845809937,
-1.0069384574890137,
0.253007709980011,
-0.5944660902023315,
-1.0095915794372559,
1.7189663648605347,
0.25065627694129944,
-0.9851896166801453,
-0.08195361495018005,
-0.2384142279624939,
-0.39861056208610535,
2.7469990253448486,
-1.1723175048828125,
-0.37860244512557983,
-0.8392878174781799,
-0.7855929136276245,
1.5896369218826294,
-1.1608726978302002,
0.27036619186401367,
-1.0533287525177002,
-0.4088253974914551,
-1.1177390813827515,
-0.1699780523777008,
-0.07819963991641998,
-1.140964150428772,
0.8891134858131409,
0.22632624208927155,
-1.3646681308746338,
-0.4902838170528412,
-1.1231446266174316,
0.6826585531234741,
0.1317124366760254,
0.2470356822013855,
1.73959219455719,
0.2296821027994156,
-0.45275193452835083,
0.9094072580337524,
1.1785720586776733,
0.8427883982658386,
-0.6394293308258057,
0.09540098160505295,
-0.5352826714515686,
0.48648104071617126,
-0.7698959112167358,
0.24542570114135742,
-2.6415908336639404,
0.6325101852416992,
-0.08122167736291885,
-0.25936293601989746,
-0.09120965749025345,
-1.2821581363677979,
1.5078651905059814,
2.276076555252075,
-1.2054611444473267,
0.6177528500556946,
0.14661790430545807,
1.3931140899658203,
-1.2498247623443604,
0.33750760555267334,
-0.49843013286590576,
2.3310420513153076,
0.25339558720588684,
0.9891771078109741,
-0.48364076018333435,
-2.5406105518341064,
0.7236827611923218,
-1.3685665130615234,
-1.0388660430908203,
0.42999252676963806,
-0.8793665170669556,
0.12775206565856934,
-1.4937657117843628,
-0.006426874548196793,
-0.8852235674858093,
-1.2177715301513672,
0.6171974539756775,
0.13086025416851044,
0.6082918643951416,
-0.7391733527183533,
0.32263073325157166,
-2.2444915771484375,
-1.3983354568481445,
-0.32678642868995667,
-0.7280755043029785,
0.5607365369796753,
-0.3695945739746094,
0.7506893277168274,
-0.14270903170108795,
-0.23165960609912872,
0.4807398021221161,
1.576909065246582,
3.520906686782837,
-0.0008408809080719948,
0.5474457740783691,
-0.12223157286643982,
-1.1003692150115967,
1.3609298467636108,
1.0102949142456055,
0.3751102387905121,
-0.552821934223175,
-0.9551666378974915,
1.4061744213104248,
2.033804416656494,
1.0445972681045532,
-0.01042311079800129,
-0.6603420376777649,
-0.369079053401947,
0.002119629643857479,
0.45469945669174194,
0.28431054949760437,
0.9683314561843872,
-0.03626386821269989,
-0.19164322316646576,
1.5324095487594604,
1.0871098041534424,
-0.41498616337776184,
0.3051357567310333,
-0.8403621912002563,
-0.3614751994609833,
0.6376226544380188,
0.11813348531723022,
-0.10272441059350967,
0.7366030216217041,
-1.1465781927108765,
-0.5077088475227356,
-0.1825021356344223,
-0.9383851885795593,
-0.6393535733222961,
-0.29712334275245667,
-0.5922278165817261,
1.7157928943634033,
0.09551943838596344,
-0.3632720410823822,
0.29628226161003113,
-0.6490345597267151,
0.03613013029098511,
-1.1366567611694336,
-0.13767306506633759,
-0.2389119565486908,
-0.07318447530269623,
-0.3443811535835266,
2.0456504821777344,
-0.8185617327690125,
-1.8781156539916992,
0.08112426847219467,
0.35727187991142273,
-0.1400354504585266,
0.4922557771205902,
1.4776262044906616,
0.5464436411857605,
1.7077101469039917,
1.178090214729309,
1.017655611038208,
-0.4170157015323639,
-1.4631611108779907,
0.9281863570213318,
1.0356239080429077,
-1.20289945602417,
1.0823845863342285,
0.05614916607737541,
-0.5225301384925842,
0.7064231634140015,
1.0485800504684448,
0.20773755013942719,
-2.2074954509735107,
0.7594350576400757,
-1.207610011100769,
1.0555541515350342,
0.610558807849884,
0.6474511027336121,
0.33080095052719116,
0.7164154052734375,
-1.349616289138794,
-0.9981144070625305,
-0.6463130712509155,
-0.5116990804672241,
2.158710241317749,
-0.263204425573349,
0.8354421257972717,
-0.27722981572151184,
-1.1003108024597168,
0.0752456858754158,
0.5916508436203003,
0.4710052013397217,
-0.46720510721206665,
0.7826096415519714,
-0.5323362946510315,
-1.276084303855896,
-1.4022051095962524,
-0.5208539962768555,
-1.1583675146102905,
-0.9040546417236328,
1.1670269966125488,
0.6124212145805359,
0.6121336221694946,
1.875520944595337,
0.6659557819366455,
0.1711227148771286,
-2.2756881713867188,
0.9211390018463135,
0.1634315401315689,
-0.2748200595378876,
0.6982920169830322,
0.39581918716430664,
1.2071812152862549,
-0.13805770874023438,
0.7343531250953674,
-2.4411916732788086,
2.3196897506713867,
-0.17722898721694946,
0.8897392749786377,
0.3634805679321289,
0.16271884739398956,
1.0489567518234253,
0.7466050982475281,
0.2924036979675293,
-0.9397538304328918,
0.3544946610927582,
-0.6287315487861633,
1.6739939451217651,
1.111812710762024,
-0.5336187481880188,
0.028996989130973816,
1.2102140188217163,
0.4504881501197815,
-0.25446605682373047,
-1.006352186203003,
-0.8201916813850403,
0.875382125377655,
1.6031852960586548,
-0.4631401002407074,
-0.185306116938591,
0.6375238299369812,
0.7736729383468628,
-1.1465821266174316,
-0.11241079121828079,
-0.6586557626724243,
-0.7450273633003235,
1.4412245750427246,
2.3405160903930664,
-0.43793126940727234,
0.13119441270828247,
-0.6680393815040588,
-1.2112681865692139,
0.7685853242874146,
-0.0902538001537323,
0.09589207172393799,
0.6225268840789795,
-0.29591214656829834,
0.822335958480835,
0.6753244400024414,
0.8445195555686951,
0.5536994338035583,
0.3533068895339966,
0.26179707050323486,
-0.6182870268821716,
-0.7910727262496948,
-0.3006151616573334,
-1.109635591506958,
-2.998492479324341,
0.3038557171821594,
-0.5460681319236755,
-1.505746603012085,
0.030151933431625366,
-1.0591150522232056,
0.926923930644989,
-0.44170132279396057,
-1.0356441736221313,
-1.425034999847412,
0.3226325511932373,
0.15536952018737793,
1.2162562608718872,
-1.9465266466140747,
0.02006065472960472,
1.1968010663986206,
0.5263950824737549,
-0.6754090189933777,
0.981104850769043,
0.4036937654018402,
1.139806866645813,
0.6123124361038208,
-0.3116177022457123,
0.6810207366943359,
0.0393633171916008,
-1.4281851053237915,
0.29917871952056885,
1.3376373052597046,
0.1298145353794098,
1.1567678451538086,
-0.44614461064338684,
0.01846035197377205,
0.38086381554603577,
-0.5472158789634705,
-0.7255591154098511,
-0.22664862871170044,
0.5653764605522156,
0.15604473650455475,
-0.9191997051239014,
0.04193190112709999,
0.041122131049633026,
-0.25682732462882996,
0.2148655503988266,
-1.2496213912963867,
-0.2877045273780823,
-0.6526523232460022,
-0.2724723517894745,
-1.5957430601119995,
-0.39123162627220154,
1.3589668273925781,
-0.49877187609672546,
-0.017033925279974937,
0.42571747303009033,
0.3377355933189392,
0.5255733728408813,
0.6757798790931702,
-0.456460565328598,
-0.8079858422279358,
-0.37148305773735046,
-0.38001370429992676,
0.3648025095462799,
1.3907749652862549,
-0.1763080209493637,
-0.9201278686523438,
0.5839563012123108,
-0.2414925992488861,
0.04287508502602577,
1.7492423057556152,
-0.12219646573066711,
-0.9055643081665039,
0.45015713572502136,
-0.29427990317344666,
1.7997426986694336,
1.4550246000289917,
0.8986635208129883,
-0.3352488875389099,
-0.8556499481201172,
0.6243661642074585,
-0.3671620488166809,
-0.5361656546592712,
0.548538863658905,
-0.027462873607873917,
-0.2274317741394043,
-1.4875686168670654,
0.6112151741981506,
1.3978509902954102,
-0.7281609177589417,
-1.126489281654358,
0.29779067635536194,
-0.7117459177970886,
1.2749669551849365,
0.4650860130786896,
0.5920834541320801,
0.2524968683719635,
1.6979833841323853,
0.8259206414222717,
-0.74793940782547,
0.5637441277503967,
0.4511431157588959,
-0.1875896155834198,
-2.2373275756835938,
-1.3576781749725342,
-0.06610921770334244,
-0.6480274796485901,
-1.393911361694336,
1.157723069190979,
-0.9904859662055969,
-1.0643576383590698,
0.7183244228363037,
0.10240072011947632,
1.1069265604019165,
0.5916813015937805,
1.382063388824463,
2.053924083709717,
0.7651280164718628,
0.6433367133140564,
1.3568512201309204,
-0.3117568790912628,
-0.6666123270988464,
1.757278323173523,
-0.16819503903388977,
0.62722247838974,
1.2265576124191284,
-0.09719564765691757,
-0.8897978663444519,
-0.7437949180603027,
-1.0019721984863281,
-0.5762737989425659,
1.3471812009811401,
-0.062007974833250046,
-1.13438081741333,
0.33382752537727356,
1.4365394115447998,
-0.07417627424001694,
-0.3604384958744049,
0.5492748022079468,
0.4607737362384796,
-0.655978262424469,
-0.012315545231103897,
-0.9403544068336487,
0.3867019712924957,
-0.5102832913398743,
-0.187723308801651,
0.47983717918395996,
0.7075936198234558,
1.3854098320007324,
-0.33404740691185,
0.3641188144683838,
0.754497766494751,
-1.433997631072998,
1.4530216455459595,
-0.6653778553009033,
0.1736760437488556,
-2.104482650756836,
1.0073699951171875,
-0.5716478228569031,
1.8704283237457275,
-2.863718032836914,
0.09473608434200287,
-0.23694629967212677,
-0.7169522047042847,
0.1540021151304245,
-0.3177435100078583,
0.22534647583961487,
-0.22231332957744598,
-1.0113410949707031,
0.22776857018470764,
-0.7242894172668457,
0.11651676893234253,
0.9361175894737244,
1.3971633911132812,
-0.968763530254364,
-0.36237284541130066,
-1.7109289169311523,
0.1255347728729248,
-0.8337401747703552,
0.13466233015060425,
-1.9250900745391846,
-0.15637552738189697,
-1.7998251914978027,
-2.070361375808716,
-1.3731002807617188,
-1.270176649093628,
1.22702956199646,
0.025641780346632004,
-0.6712268590927124,
1.2564916610717773,
-0.12037519365549088,
-1.9349623918533325,
0.9310553669929504,
-2.007655620574951
] |
https://github.com/huggingface/datasets/issues/3353 | add one field "example_id", but I can't see it in the "comput_loss" function | Hi, it works now, thank you.
1. **args.remove_unused_columns=False** and **training_args.remove_unused_columns=False**
2. overwrite **get_train_dataloader**, and remove **_remove_unused_columns**
3. add new fields, and can be got in **inputs**. | Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_ | 1,081 | 26 | add one field "example_id", but I can't see it in the "comput_loss" function
Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
```
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/3333#issuecomment-983457161_
Hi, it works now, thank you.
1. **args.remove_unused_columns=False** and **training_args.remove_unused_columns=False**
2. overwrite **get_train_dataloader**, and remove **_remove_unused_columns**
3. add new fields, and can be got in **inputs**. | [
-1.1895976066589355,
-1.039095163345337,
-0.6640315055847168,
1.2366902828216553,
-0.4163138270378113,
-1.0222519636154175,
0.35613688826560974,
-1.0311400890350342,
1.5679025650024414,
-0.8252658247947693,
0.17931242287158966,
-1.7496793270111084,
0.07670159637928009,
-0.7909781336784363,
-0.761791467666626,
-0.7969787120819092,
-0.4661526679992676,
-0.9245725870132446,
1.0929173231124878,
2.69830322265625,
1.1135051250457764,
-1.3217302560806274,
2.569017171859741,
0.7278850674629211,
-0.0920877754688263,
-1.0471481084823608,
0.637866735458374,
-0.18390871584415436,
-1.2136942148208618,
-0.5090659856796265,
-1.0535786151885986,
-0.12921710312366486,
-0.6278619170188904,
-0.29026055335998535,
-0.06275304406881332,
0.28912919759750366,
-0.20787301659584045,
-0.01209180150181055,
-0.14447589218616486,
-0.8764022588729858,
0.32618817687034607,
-0.5805924534797668,
1.0742692947387695,
-0.18681840598583221,
1.5897657871246338,
-0.573383092880249,
0.5745514631271362,
0.662045419216156,
1.1734538078308105,
0.20082953572273254,
0.05864816531538963,
0.1351698637008667,
0.46308714151382446,
0.038605764508247375,
0.4449019730091095,
0.9199667572975159,
0.685585081577301,
0.40225595235824585,
0.6912224888801575,
-2.419261932373047,
1.2609796524047852,
-1.1053287982940674,
0.3364589810371399,
1.53970468044281,
-0.7023851275444031,
0.2943371832370758,
-1.776457667350769,
-0.20279459655284882,
0.5645743012428284,
-2.2507381439208984,
0.41838687658309937,
-1.2893177270889282,
-0.5798829793930054,
0.7691457867622375,
0.5314910411834717,
-1.4210795164108276,
0.3341231644153595,
-0.24194569885730743,
0.768769383430481,
0.2342037409543991,
0.8088821172714233,
-2.0295000076293945,
-0.06572546064853668,
-0.372118204832077,
0.23563693463802338,
-1.0491889715194702,
-1.4812320470809937,
0.6817902326583862,
0.3748440742492676,
0.6285898685455322,
-0.23850053548812866,
1.0065534114837646,
-1.2902315855026245,
0.8387157917022705,
-1.4360737800598145,
-1.6713560819625854,
-1.343722939491272,
-2.5118467807769775,
-2.4247584342956543,
0.7252214550971985,
-0.47199559211730957,
-0.5862975120544434,
1.985018253326416,
-0.9373512864112854,
-1.21500825881958,
1.299300193786621,
0.4708799421787262,
-0.20056456327438354,
2.718534231185913,
0.010445372201502323,
-0.42883992195129395,
0.5631175637245178,
-1.2380419969558716,
0.9889167547225952,
-0.28102490305900574,
1.4435807466506958,
0.4333796799182892,
-0.9281153678894043,
1.6508121490478516,
-0.43526172637939453,
0.3065985143184662,
-0.5788653492927551,
-0.34469300508499146,
-0.8581360578536987,
0.2845155894756317,
1.6436034440994263,
-0.09223657101392746,
1.152306079864502,
-0.23069201409816742,
-1.357582926750183,
-1.3302077054977417,
1.1328922510147095,
0.33394038677215576,
-1.0499520301818848,
0.04480056092143059,
-0.28776371479034424,
0.29781776666641235,
-0.08772439509630203,
1.158739686012268,
1.2939478158950806,
0.5962038636207581,
-0.4442080855369568,
-1.0303624868392944,
0.1318967044353485,
-0.5281366109848022,
-1.039331078529358,
-1.7957265377044678,
-0.3787548840045929,
-0.22766901552677155,
0.8079566955566406,
-1.0962685346603394,
1.8232150077819824,
0.9803046584129333,
1.9187325239181519,
0.8831626176834106,
-0.8009540438652039,
1.3360321521759033,
0.18836656212806702,
1.7110918760299683,
-0.9168318510055542,
0.8123793005943298,
-0.7285799384117126,
-1.1481969356536865,
1.372307300567627,
-0.2438577264547348,
-1.778907060623169,
-0.6976925134658813,
-0.6932194828987122,
-0.5682119727134705,
-0.7984493970870972,
1.0301254987716675,
-0.26847773790359497,
-1.5462898015975952,
0.3373371362686157,
-0.6286514401435852,
0.004335484467446804,
-1.3756216764450073,
0.42450013756752014,
0.6949224472045898,
-0.3248215317726135,
-0.05769398435950279,
-0.23792019486427307,
-1.3105649948120117,
-0.48335587978363037,
0.22253097593784332,
1.8404605388641357,
-0.35602372884750366,
1.051095962524414,
0.9296424388885498,
-0.5979870557785034,
-0.33573001623153687,
0.48708465695381165,
-0.2531633675098419,
0.5537673234939575,
-0.7777538895606995,
-0.8665095567703247,
1.0880262851715088,
-0.24477730691432953,
-0.4719252586364746,
1.463572382926941,
0.8246966600418091,
-1.1546690464019775,
-0.22897160053253174,
-0.07162866741418839,
-0.5736765265464783,
0.4072394371032715,
-1.6731926202774048,
-0.13646556437015533,
0.7169399261474609,
-1.6342347860336304,
-0.5326835513114929,
-0.21367789804935455,
1.187949776649475,
-0.19788546860218048,
1.3145592212677002,
-0.2589850425720215,
-0.32047754526138306,
-0.43801262974739075,
-0.3117007911205292,
0.3176586627960205,
-0.07223068922758102,
-0.2532570958137512,
0.3948949873447418,
-0.8057718276977539,
0.5421929955482483,
1.5384974479675293,
0.1510709524154663,
0.1653936505317688,
0.1915493905544281,
0.7292171716690063,
0.5253437757492065,
0.18086226284503937,
-1.0966813564300537,
-1.299959659576416,
2.2239937782287598,
-1.605476975440979,
1.8691622018814087,
0.7682279944419861,
-0.04412313178181648,
-1.591460108757019,
-1.6851727962493896,
1.3557803630828857,
1.0920729637145996,
2.0355186462402344,
0.49688413739204407,
0.33690595626831055,
-0.6926538348197937,
-0.5639828443527222,
0.14642922580242157,
-1.0368473529815674,
-0.7009578347206116,
0.16237351298332214,
2.576002836227417,
1.6863000392913818,
-0.43302562832832336,
-0.08837564289569855,
-1.1402783393859863,
1.5213425159454346,
-0.1985204666852951,
0.42708179354667664,
1.9858262538909912,
-0.6113894581794739,
-1.1351990699768066,
1.2333323955535889,
-2.5358338356018066,
0.06842996180057526,
1.981589913368225,
0.34728315472602844,
0.13851392269134521,
-1.2747389078140259,
-0.6211862564086914,
-0.33924636244773865,
-0.7330419421195984,
-1.3701999187469482,
0.6628771424293518,
-0.22179865837097168,
-0.8691914081573486,
-1.6307919025421143,
0.2750972509384155,
-1.217178225517273,
-1.6818227767944336,
0.2486046850681305,
1.702022671699524,
2.2535417079925537,
-0.6235804557800293,
1.536436676979065,
-0.2863750755786896,
0.20038847625255585,
0.9110482335090637,
1.2159645557403564,
2.7692344188690186,
1.960254430770874,
-0.9519389271736145,
0.5788230299949646,
-0.41769662499427795,
-0.502387523651123,
1.1861021518707275,
-0.946861743927002,
1.2420523166656494,
-0.0805278941988945,
-1.2636125087738037,
-1.1521127223968506,
0.9692273736000061,
0.19942036271095276,
0.17733922600746155,
-0.3886091113090515,
1.0422375202178955,
0.43625137209892273,
1.0932729244232178,
0.7702150940895081,
0.10553213208913803,
0.5377821326255798,
-0.6629857420921326,
-0.5339068174362183,
1.7187066078186035,
0.31956756114959717,
-1.6548815965652466,
-2.4735167026519775,
-0.49333804845809937,
-1.0069384574890137,
0.253007709980011,
-0.5944660902023315,
-1.0095915794372559,
1.7189663648605347,
0.25065627694129944,
-0.9851896166801453,
-0.08195361495018005,
-0.2384142279624939,
-0.39861056208610535,
2.7469990253448486,
-1.1723175048828125,
-0.37860244512557983,
-0.8392878174781799,
-0.7855929136276245,
1.5896369218826294,
-1.1608726978302002,
0.27036619186401367,
-1.0533287525177002,
-0.4088253974914551,
-1.1177390813827515,
-0.1699780523777008,
-0.07819963991641998,
-1.140964150428772,
0.8891134858131409,
0.22632624208927155,
-1.3646681308746338,
-0.4902838170528412,
-1.1231446266174316,
0.6826585531234741,
0.1317124366760254,
0.2470356822013855,
1.73959219455719,
0.2296821027994156,
-0.45275193452835083,
0.9094072580337524,
1.1785720586776733,
0.8427883982658386,
-0.6394293308258057,
0.09540098160505295,
-0.5352826714515686,
0.48648104071617126,
-0.7698959112167358,
0.24542570114135742,
-2.6415908336639404,
0.6325101852416992,
-0.08122167736291885,
-0.25936293601989746,
-0.09120965749025345,
-1.2821581363677979,
1.5078651905059814,
2.276076555252075,
-1.2054611444473267,
0.6177528500556946,
0.14661790430545807,
1.3931140899658203,
-1.2498247623443604,
0.33750760555267334,
-0.49843013286590576,
2.3310420513153076,
0.25339558720588684,
0.9891771078109741,
-0.48364076018333435,
-2.5406105518341064,
0.7236827611923218,
-1.3685665130615234,
-1.0388660430908203,
0.42999252676963806,
-0.8793665170669556,
0.12775206565856934,
-1.4937657117843628,
-0.006426874548196793,
-0.8852235674858093,
-1.2177715301513672,
0.6171974539756775,
0.13086025416851044,
0.6082918643951416,
-0.7391733527183533,
0.32263073325157166,
-2.2444915771484375,
-1.3983354568481445,
-0.32678642868995667,
-0.7280755043029785,
0.5607365369796753,
-0.3695945739746094,
0.7506893277168274,
-0.14270903170108795,
-0.23165960609912872,
0.4807398021221161,
1.576909065246582,
3.520906686782837,
-0.0008408809080719948,
0.5474457740783691,
-0.12223157286643982,
-1.1003692150115967,
1.3609298467636108,
1.0102949142456055,
0.3751102387905121,
-0.552821934223175,
-0.9551666378974915,
1.4061744213104248,
2.033804416656494,
1.0445972681045532,
-0.01042311079800129,
-0.6603420376777649,
-0.369079053401947,
0.002119629643857479,
0.45469945669174194,
0.28431054949760437,
0.9683314561843872,
-0.03626386821269989,
-0.19164322316646576,
1.5324095487594604,
1.0871098041534424,
-0.41498616337776184,
0.3051357567310333,
-0.8403621912002563,
-0.3614751994609833,
0.6376226544380188,
0.11813348531723022,
-0.10272441059350967,
0.7366030216217041,
-1.1465781927108765,
-0.5077088475227356,
-0.1825021356344223,
-0.9383851885795593,
-0.6393535733222961,
-0.29712334275245667,
-0.5922278165817261,
1.7157928943634033,
0.09551943838596344,
-0.3632720410823822,
0.29628226161003113,
-0.6490345597267151,
0.03613013029098511,
-1.1366567611694336,
-0.13767306506633759,
-0.2389119565486908,
-0.07318447530269623,
-0.3443811535835266,
2.0456504821777344,
-0.8185617327690125,
-1.8781156539916992,
0.08112426847219467,
0.35727187991142273,
-0.1400354504585266,
0.4922557771205902,
1.4776262044906616,
0.5464436411857605,
1.7077101469039917,
1.178090214729309,
1.017655611038208,
-0.4170157015323639,
-1.4631611108779907,
0.9281863570213318,
1.0356239080429077,
-1.20289945602417,
1.0823845863342285,
0.05614916607737541,
-0.5225301384925842,
0.7064231634140015,
1.0485800504684448,
0.20773755013942719,
-2.2074954509735107,
0.7594350576400757,
-1.207610011100769,
1.0555541515350342,
0.610558807849884,
0.6474511027336121,
0.33080095052719116,
0.7164154052734375,
-1.349616289138794,
-0.9981144070625305,
-0.6463130712509155,
-0.5116990804672241,
2.158710241317749,
-0.263204425573349,
0.8354421257972717,
-0.27722981572151184,
-1.1003108024597168,
0.0752456858754158,
0.5916508436203003,
0.4710052013397217,
-0.46720510721206665,
0.7826096415519714,
-0.5323362946510315,
-1.276084303855896,
-1.4022051095962524,
-0.5208539962768555,
-1.1583675146102905,
-0.9040546417236328,
1.1670269966125488,
0.6124212145805359,
0.6121336221694946,
1.875520944595337,
0.6659557819366455,
0.1711227148771286,
-2.2756881713867188,
0.9211390018463135,
0.1634315401315689,
-0.2748200595378876,
0.6982920169830322,
0.39581918716430664,
1.2071812152862549,
-0.13805770874023438,
0.7343531250953674,
-2.4411916732788086,
2.3196897506713867,
-0.17722898721694946,
0.8897392749786377,
0.3634805679321289,
0.16271884739398956,
1.0489567518234253,
0.7466050982475281,
0.2924036979675293,
-0.9397538304328918,
0.3544946610927582,
-0.6287315487861633,
1.6739939451217651,
1.111812710762024,
-0.5336187481880188,
0.028996989130973816,
1.2102140188217163,
0.4504881501197815,
-0.25446605682373047,
-1.006352186203003,
-0.8201916813850403,
0.875382125377655,
1.6031852960586548,
-0.4631401002407074,
-0.185306116938591,
0.6375238299369812,
0.7736729383468628,
-1.1465821266174316,
-0.11241079121828079,
-0.6586557626724243,
-0.7450273633003235,
1.4412245750427246,
2.3405160903930664,
-0.43793126940727234,
0.13119441270828247,
-0.6680393815040588,
-1.2112681865692139,
0.7685853242874146,
-0.0902538001537323,
0.09589207172393799,
0.6225268840789795,
-0.29591214656829834,
0.822335958480835,
0.6753244400024414,
0.8445195555686951,
0.5536994338035583,
0.3533068895339966,
0.26179707050323486,
-0.6182870268821716,
-0.7910727262496948,
-0.3006151616573334,
-1.109635591506958,
-2.998492479324341,
0.3038557171821594,
-0.5460681319236755,
-1.505746603012085,
0.030151933431625366,
-1.0591150522232056,
0.926923930644989,
-0.44170132279396057,
-1.0356441736221313,
-1.425034999847412,
0.3226325511932373,
0.15536952018737793,
1.2162562608718872,
-1.9465266466140747,
0.02006065472960472,
1.1968010663986206,
0.5263950824737549,
-0.6754090189933777,
0.981104850769043,
0.4036937654018402,
1.139806866645813,
0.6123124361038208,
-0.3116177022457123,
0.6810207366943359,
0.0393633171916008,
-1.4281851053237915,
0.29917871952056885,
1.3376373052597046,
0.1298145353794098,
1.1567678451538086,
-0.44614461064338684,
0.01846035197377205,
0.38086381554603577,
-0.5472158789634705,
-0.7255591154098511,
-0.22664862871170044,
0.5653764605522156,
0.15604473650455475,
-0.9191997051239014,
0.04193190112709999,
0.041122131049633026,
-0.25682732462882996,
0.2148655503988266,
-1.2496213912963867,
-0.2877045273780823,
-0.6526523232460022,
-0.2724723517894745,
-1.5957430601119995,
-0.39123162627220154,
1.3589668273925781,
-0.49877187609672546,
-0.017033925279974937,
0.42571747303009033,
0.3377355933189392,
0.5255733728408813,
0.6757798790931702,
-0.456460565328598,
-0.8079858422279358,
-0.37148305773735046,
-0.38001370429992676,
0.3648025095462799,
1.3907749652862549,
-0.1763080209493637,
-0.9201278686523438,
0.5839563012123108,
-0.2414925992488861,
0.04287508502602577,
1.7492423057556152,
-0.12219646573066711,
-0.9055643081665039,
0.45015713572502136,
-0.29427990317344666,
1.7997426986694336,
1.4550246000289917,
0.8986635208129883,
-0.3352488875389099,
-0.8556499481201172,
0.6243661642074585,
-0.3671620488166809,
-0.5361656546592712,
0.548538863658905,
-0.027462873607873917,
-0.2274317741394043,
-1.4875686168670654,
0.6112151741981506,
1.3978509902954102,
-0.7281609177589417,
-1.126489281654358,
0.29779067635536194,
-0.7117459177970886,
1.2749669551849365,
0.4650860130786896,
0.5920834541320801,
0.2524968683719635,
1.6979833841323853,
0.8259206414222717,
-0.74793940782547,
0.5637441277503967,
0.4511431157588959,
-0.1875896155834198,
-2.2373275756835938,
-1.3576781749725342,
-0.06610921770334244,
-0.6480274796485901,
-1.393911361694336,
1.157723069190979,
-0.9904859662055969,
-1.0643576383590698,
0.7183244228363037,
0.10240072011947632,
1.1069265604019165,
0.5916813015937805,
1.382063388824463,
2.053924083709717,
0.7651280164718628,
0.6433367133140564,
1.3568512201309204,
-0.3117568790912628,
-0.6666123270988464,
1.757278323173523,
-0.16819503903388977,
0.62722247838974,
1.2265576124191284,
-0.09719564765691757,
-0.8897978663444519,
-0.7437949180603027,
-1.0019721984863281,
-0.5762737989425659,
1.3471812009811401,
-0.062007974833250046,
-1.13438081741333,
0.33382752537727356,
1.4365394115447998,
-0.07417627424001694,
-0.3604384958744049,
0.5492748022079468,
0.4607737362384796,
-0.655978262424469,
-0.012315545231103897,
-0.9403544068336487,
0.3867019712924957,
-0.5102832913398743,
-0.187723308801651,
0.47983717918395996,
0.7075936198234558,
1.3854098320007324,
-0.33404740691185,
0.3641188144683838,
0.754497766494751,
-1.433997631072998,
1.4530216455459595,
-0.6653778553009033,
0.1736760437488556,
-2.104482650756836,
1.0073699951171875,
-0.5716478228569031,
1.8704283237457275,
-2.863718032836914,
0.09473608434200287,
-0.23694629967212677,
-0.7169522047042847,
0.1540021151304245,
-0.3177435100078583,
0.22534647583961487,
-0.22231332957744598,
-1.0113410949707031,
0.22776857018470764,
-0.7242894172668457,
0.11651676893234253,
0.9361175894737244,
1.3971633911132812,
-0.968763530254364,
-0.36237284541130066,
-1.7109289169311523,
0.1255347728729248,
-0.8337401747703552,
0.13466233015060425,
-1.9250900745391846,
-0.15637552738189697,
-1.7998251914978027,
-2.070361375808716,
-1.3731002807617188,
-1.270176649093628,
1.22702956199646,
0.025641780346632004,
-0.6712268590927124,
1.2564916610717773,
-0.12037519365549088,
-1.9349623918533325,
0.9310553669929504,
-2.007655620574951
] |
https://github.com/huggingface/datasets/issues/3346 | Failed to convert `string` with pyarrow for QED since 1.15.0 | Actually, re-opening this issue cause the error persists
```python
>>> load_dataset("qed")
Downloading and preparing dataset qed/qed (download: 13.43 MiB, generated: 9.70 MiB, post-processed: Unknown size, total: 23.14 MiB) to /home/victor_huggingface_co/.cache/huggingface/datasets/qed/qed/1.0.0/47d8b6f033393aa520a8402d4baf2d6bdc1b2fbde3dc156e595d2ef34caf7d75...
100%|███████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2228.64it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/load.py", line 1669, in load_dataset
use_auth_token=use_auth_token,
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/builder.py", line 594, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/builder.py", line 681, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/builder.py", line 1083, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/arrow_writer.py", line 468, in finalize
self.write_examples_on_file()
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/arrow_writer.py", line 339, in write_examples_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 229, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/arrow_writer.py", line 125, in __arrow_array__
out = pa.array(cast_to_python_objects(self.data, only_1d_for_numpy=True), type=type)
File "pyarrow/array.pxi", line 315, in pyarrow.lib.array
File "pyarrow/array.pxi", line 39, in pyarrow.lib._sequence_to_array
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Could not convert 'in' with type str: tried to convert to boolean
```
Environment (datasets and pyarrow):
```bash
(promptsource) victor_huggingface_co@victor-dev:~/promptsource$ datasets-cli env
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 1.16.1
- Platform: Linux-5.0.0-1020-gcp-x86_64-with-debian-buster-sid
- Python version: 3.7.11
- PyArrow version: 6.0.1
```
```bash
(promptsource) victor_huggingface_co@victor-dev:~/promptsource$ pip show pyarrow
Name: pyarrow
Version: 6.0.1
Summary: Python library for Apache Arrow
Home-page: https://arrow.apache.org/
Author:
Author-email:
License: Apache License, Version 2.0
Location: /home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages
Requires: numpy
Required-by: streamlit, datasets
``` | ## Describe the bug
Loading QED was fine until 1.15.0.
related: bigscience-workshop/promptsource#659, bigscience-workshop/promptsource#670
Not sure where the root cause is, but here are some candidates:
- #3158
- #3120
- #3196
- #2891
## Steps to reproduce the bug
```python
load_dataset("qed")
```
## Expected results
Loading completed.
## Actual results
```shell
ArrowInvalid: Could not convert in with type str: tried to convert to boolean
Traceback:
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/streamlit/script_runner.py", line 354, in _run_script
exec(code, module.__dict__)
File "/Users/s0s0cr3/Documents/GitHub/promptsource/promptsource/app.py", line 260, in <module>
dataset = get_dataset(dataset_key, str(conf_option.name) if conf_option else None)
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/streamlit/caching.py", line 543, in wrapped_func
return get_or_create_cached_value()
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/streamlit/caching.py", line 527, in get_or_create_cached_value
return_value = func(*args, **kwargs)
File "/Users/s0s0cr3/Documents/GitHub/promptsource/promptsource/utils.py", line 49, in get_dataset
builder_instance.download_and_prepare()
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/builder.py", line 607, in download_and_prepare
self._download_and_prepare(
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/builder.py", line 697, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/builder.py", line 1106, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/arrow_writer.py", line 456, in finalize
self.write_examples_on_file()
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/arrow_writer.py", line 325, in write_examples_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/arrow_writer.py", line 121, in __arrow_array__
out = pa.array(cast_to_python_objects(self.data, only_1d_for_numpy=True), type=type)
File "pyarrow/array.pxi", line 305, in pyarrow.lib.array
File "pyarrow/array.pxi", line 39, in pyarrow.lib._sequence_to_array
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.0, 1.16.1
- Platform: macOS 1.15.7 or above
- Python version: 3.7.12 and 3.9
- PyArrow version: 3.0.0, 5.0.0, 6.0.1
| 1,082 | 222 | Failed to convert `string` with pyarrow for QED since 1.15.0
## Describe the bug
Loading QED was fine until 1.15.0.
related: bigscience-workshop/promptsource#659, bigscience-workshop/promptsource#670
Not sure where the root cause is, but here are some candidates:
- #3158
- #3120
- #3196
- #2891
## Steps to reproduce the bug
```python
load_dataset("qed")
```
## Expected results
Loading completed.
## Actual results
```shell
ArrowInvalid: Could not convert in with type str: tried to convert to boolean
Traceback:
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/streamlit/script_runner.py", line 354, in _run_script
exec(code, module.__dict__)
File "/Users/s0s0cr3/Documents/GitHub/promptsource/promptsource/app.py", line 260, in <module>
dataset = get_dataset(dataset_key, str(conf_option.name) if conf_option else None)
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/streamlit/caching.py", line 543, in wrapped_func
return get_or_create_cached_value()
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/streamlit/caching.py", line 527, in get_or_create_cached_value
return_value = func(*args, **kwargs)
File "/Users/s0s0cr3/Documents/GitHub/promptsource/promptsource/utils.py", line 49, in get_dataset
builder_instance.download_and_prepare()
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/builder.py", line 607, in download_and_prepare
self._download_and_prepare(
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/builder.py", line 697, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/builder.py", line 1106, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/arrow_writer.py", line 456, in finalize
self.write_examples_on_file()
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/arrow_writer.py", line 325, in write_examples_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/Users/s0s0cr3/Library/Python/3.9/lib/python/site-packages/datasets/arrow_writer.py", line 121, in __arrow_array__
out = pa.array(cast_to_python_objects(self.data, only_1d_for_numpy=True), type=type)
File "pyarrow/array.pxi", line 305, in pyarrow.lib.array
File "pyarrow/array.pxi", line 39, in pyarrow.lib._sequence_to_array
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.0, 1.16.1
- Platform: macOS 1.15.7 or above
- Python version: 3.7.12 and 3.9
- PyArrow version: 3.0.0, 5.0.0, 6.0.1
Actually, re-opening this issue cause the error persists
```python
>>> load_dataset("qed")
Downloading and preparing dataset qed/qed (download: 13.43 MiB, generated: 9.70 MiB, post-processed: Unknown size, total: 23.14 MiB) to /home/victor_huggingface_co/.cache/huggingface/datasets/qed/qed/1.0.0/47d8b6f033393aa520a8402d4baf2d6bdc1b2fbde3dc156e595d2ef34caf7d75...
100%|███████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 2228.64it/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/load.py", line 1669, in load_dataset
use_auth_token=use_auth_token,
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/builder.py", line 594, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/builder.py", line 681, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/builder.py", line 1083, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/arrow_writer.py", line 468, in finalize
self.write_examples_on_file()
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/arrow_writer.py", line 339, in write_examples_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 229, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages/datasets/arrow_writer.py", line 125, in __arrow_array__
out = pa.array(cast_to_python_objects(self.data, only_1d_for_numpy=True), type=type)
File "pyarrow/array.pxi", line 315, in pyarrow.lib.array
File "pyarrow/array.pxi", line 39, in pyarrow.lib._sequence_to_array
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Could not convert 'in' with type str: tried to convert to boolean
```
Environment (datasets and pyarrow):
```bash
(promptsource) victor_huggingface_co@victor-dev:~/promptsource$ datasets-cli env
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 1.16.1
- Platform: Linux-5.0.0-1020-gcp-x86_64-with-debian-buster-sid
- Python version: 3.7.11
- PyArrow version: 6.0.1
```
```bash
(promptsource) victor_huggingface_co@victor-dev:~/promptsource$ pip show pyarrow
Name: pyarrow
Version: 6.0.1
Summary: Python library for Apache Arrow
Home-page: https://arrow.apache.org/
Author:
Author-email:
License: Apache License, Version 2.0
Location: /home/victor_huggingface_co/miniconda3/envs/promptsource/lib/python3.7/site-packages
Requires: numpy
Required-by: streamlit, datasets
``` | [
-1.177842378616333,
-0.9320763349533081,
-0.708471953868866,
1.4153743982315063,
-0.0921926200389862,
-1.3148870468139648,
0.18043513596057892,
-1.0364757776260376,
1.555343747138977,
-0.6683884263038635,
0.23047442734241486,
-1.6165212392807007,
-0.12606194615364075,
-0.5216675996780396,
-0.6766141057014465,
-0.8429927229881287,
-0.3351125121116638,
-0.9495548009872437,
1.0157885551452637,
2.546482563018799,
1.346548080444336,
-1.3100258111953735,
2.7745206356048584,
0.6651634573936462,
-0.3582650125026703,
-0.9726434350013733,
0.5065082311630249,
-0.02234950289130211,
-1.190629243850708,
-0.49801719188690186,
-0.8526780009269714,
-0.07005894184112549,
-0.5403262376785278,
-0.443764865398407,
0.04137547314167023,
0.5268574357032776,
-0.23904135823249817,
-0.2745859920978546,
-0.661808967590332,
-0.7455623149871826,
0.5044882297515869,
-0.38961032032966614,
0.9574943780899048,
-0.247317373752594,
1.7303720712661743,
-0.6050022840499878,
0.4698072671890259,
0.6924598813056946,
1.2995549440383911,
0.17001527547836304,
0.15307608246803284,
0.2877785861492157,
0.349730521440506,
-0.042169395834207535,
0.6122498512268066,
1.2020894289016724,
0.596879780292511,
0.5723735690116882,
0.6426343321800232,
-2.2376692295074463,
1.2693228721618652,
-0.8848084807395935,
0.23237642645835876,
1.2919247150421143,
-0.7810370922088623,
0.32262906432151794,
-1.7949329614639282,
-0.05151943862438202,
0.5715333819389343,
-2.2928404808044434,
0.2982809543609619,
-1.2395083904266357,
-0.5428801774978638,
0.8582890629768372,
0.34685444831848145,
-1.2570068836212158,
0.10397375375032425,
-0.5437255501747131,
1.0856305360794067,
0.4726557433605194,
1.084689736366272,
-1.5749242305755615,
-0.0674976259469986,
-0.1126289963722229,
0.08958042412996292,
-1.2001694440841675,
-1.7172296047210693,
0.4931318163871765,
0.5527130961418152,
0.7152212858200073,
-0.10765840858221054,
1.0708435773849487,
-1.114556074142456,
0.8360118269920349,
-0.9654459357261658,
-1.6337391138076782,
-1.4501975774765015,
-2.433662176132202,
-2.2578563690185547,
0.7638790011405945,
-0.519267201423645,
-0.526741087436676,
2.0189783573150635,
-0.9785597324371338,
-1.8103797435760498,
1.080220103263855,
0.39540693163871765,
0.022534318268299103,
2.2971835136413574,
0.26359105110168457,
-0.7396177053451538,
0.44555991888046265,
-0.7950255870819092,
0.8035278916358948,
-0.43292638659477234,
1.2367969751358032,
0.4596061706542969,
-1.001287579536438,
1.5830434560775757,
-0.4551098346710205,
0.6869328022003174,
-0.7128200531005859,
-0.44317346811294556,
-0.8439774513244629,
0.25388121604919434,
1.803755760192871,
-0.32512766122817993,
1.5373870134353638,
-0.2829960584640503,
-1.5346978902816772,
-1.5571566820144653,
0.8223223686218262,
0.47355830669403076,
-0.8798511028289795,
0.09157457947731018,
-0.4944792687892914,
0.2525823712348938,
-0.06903323531150818,
1.1142593622207642,
1.241531491279602,
0.708305299282074,
-0.2937498688697815,
-0.8600118160247803,
0.2554011940956116,
-0.1670796275138855,
-0.7166898846626282,
-1.7711461782455444,
-0.3765358030796051,
0.2529383897781372,
0.6049193739891052,
-1.2655186653137207,
1.8168354034423828,
0.8705273866653442,
2.0400075912475586,
0.9401301145553589,
-0.42023980617523193,
1.5190308094024658,
0.001150442287325859,
1.7970870733261108,
-0.5312984585762024,
0.5953450798988342,
-0.34668850898742676,
-1.1685521602630615,
0.8235273361206055,
-0.35344982147216797,
-1.9499890804290771,
-0.8020459413528442,
-0.6960205435752869,
-0.1917984038591385,
-0.7475284337997437,
0.8407396078109741,
-0.3307795524597168,
-1.4438869953155518,
0.03407343477010727,
-0.6488952040672302,
0.15019629895687103,
-1.2531317472457886,
0.20872743427753448,
0.6452146768569946,
-0.7034039497375488,
-0.03458929434418678,
-0.19532234966754913,
-1.2837733030319214,
-0.4500332772731781,
0.3047773540019989,
1.91886305809021,
-0.5901135206222534,
0.955247163772583,
0.9431028366088867,
-0.7679770588874817,
0.1629113256931305,
0.2241314798593521,
-0.318332701921463,
0.8302127122879028,
-1.1402517557144165,
-0.4497665464878082,
1.1821781396865845,
-0.2690548598766327,
-0.7225566506385803,
1.4016468524932861,
0.8109099268913269,
-1.0412883758544922,
-0.2420227974653244,
-0.18649891018867493,
-0.7938955426216125,
0.016693342477083206,
-1.4886399507522583,
-0.21840909123420715,
0.35008689761161804,
-1.466640830039978,
-0.34569051861763,
-0.24812161922454834,
1.360667109489441,
-0.2525058686733246,
1.459995150566101,
-0.31218257546424866,
-0.16213536262512207,
-0.3804666996002197,
-0.4970868229866028,
0.15799638628959656,
-0.18683089315891266,
-0.5869694948196411,
0.12699484825134277,
-0.7555838823318481,
0.27680736780166626,
1.4985543489456177,
0.2947291433811188,
0.09741711616516113,
0.5129111409187317,
1.1490851640701294,
0.3820202648639679,
-0.023329053074121475,
-0.8578662872314453,
-1.4821628332138062,
1.9249684810638428,
-1.415505290031433,
1.9242310523986816,
0.8634669780731201,
-0.09277072548866272,
-1.803090214729309,
-1.8896511793136597,
1.2092883586883545,
1.164975643157959,
2.3644442558288574,
0.4815811514854431,
0.535935640335083,
-0.7888643741607666,
-0.8113514184951782,
0.24393607676029205,
-0.998688817024231,
-0.672299861907959,
0.13949652016162872,
2.3611090183258057,
1.8106931447982788,
-0.5384399890899658,
-0.2704105079174042,
-0.992357611656189,
1.3115818500518799,
-0.1777501404285431,
0.23081956803798676,
2.058255910873413,
-0.25116410851478577,
-0.9918327331542969,
1.3087732791900635,
-2.3764164447784424,
0.3230976462364197,
2.0341527462005615,
0.2755872905254364,
0.17107726633548737,
-1.3459542989730835,
-0.6331340074539185,
-0.28372153639793396,
-0.485781192779541,
-1.2099870443344116,
0.6322080492973328,
-0.24313387274742126,
-0.8973517417907715,
-1.4596620798110962,
0.05001207813620567,
-1.1787919998168945,
-1.7922463417053223,
0.3723275661468506,
1.9569799900054932,
2.0402824878692627,
-0.8178631663322449,
1.3728448152542114,
-0.2728801369667053,
0.003598320297896862,
1.3059812784194946,
1.4001617431640625,
3.076977491378784,
1.84760582447052,
-1.275790810585022,
0.71295166015625,
-0.27371349930763245,
-0.4883549213409424,
1.1368367671966553,
-1.1273397207260132,
1.1099694967269897,
-0.17347438633441925,
-1.1953914165496826,
-1.2437511682510376,
1.011283278465271,
0.5263376235961914,
-0.0034153354354202747,
-0.4511326551437378,
1.2454067468643188,
0.23204806447029114,
1.3443143367767334,
0.6396609544754028,
-0.3734765350818634,
0.6407025456428528,
-0.3050469756126404,
-0.5202745795249939,
1.6720798015594482,
0.17386005818843842,
-1.5067543983459473,
-2.4256696701049805,
-0.21193301677703857,
-0.9671516418457031,
-0.025965385138988495,
-0.6602057218551636,
-1.0627052783966064,
1.6315706968307495,
0.3739396035671234,
-1.181817889213562,
-0.25033658742904663,
-0.2794075012207031,
-0.5082190036773682,
2.680840492248535,
-1.2716851234436035,
-0.13359589874744415,
-0.8971220254898071,
-0.5258457064628601,
1.5696393251419067,
-1.3052339553833008,
-0.21756874024868011,
-1.0081777572631836,
-0.6240604519844055,
-1.2155851125717163,
-0.43876832723617554,
-0.01821141690015793,
-0.9408025145530701,
0.778969943523407,
0.23662824928760529,
-1.1700785160064697,
-0.30675551295280457,
-0.9176285862922668,
1.0271761417388916,
-0.08316390216350555,
0.16471169888973236,
1.7890594005584717,
0.3804822564125061,
-0.3575707674026489,
0.778540313243866,
1.2181333303451538,
0.5679647326469421,
-0.6296902894973755,
0.05075494572520256,
-0.696925163269043,
0.3712609112262726,
-1.3968976736068726,
0.17580845952033997,
-2.961559534072876,
0.7908614277839661,
-0.2786087393760681,
-0.2003815919160843,
-0.11122597754001617,
-1.3702425956726074,
1.0436359643936157,
2.5592432022094727,
-1.1551332473754883,
0.4039419889450073,
0.43065348267555237,
1.1479302644729614,
-1.6264399290084839,
0.2888961732387543,
-0.5000964403152466,
2.0889036655426025,
0.18377642333507538,
1.2597328424453735,
-0.5432456731796265,
-2.2003026008605957,
0.56022709608078,
-1.1667201519012451,
-1.0265060663223267,
0.8416468501091003,
-0.8925536870956421,
0.22194594144821167,
-1.3767353296279907,
-0.14650841057300568,
-0.8541469573974609,
-1.2485765218734741,
0.7039827108383179,
0.05515090376138687,
0.4151320159435272,
-0.5645691752433777,
0.3411927819252014,
-2.168377161026001,
-1.3810158967971802,
-0.25264397263526917,
-0.9442389011383057,
0.5261790752410889,
-0.47932806611061096,
0.6401365399360657,
-0.11970961838960648,
0.08259769529104233,
0.27066799998283386,
1.5057034492492676,
3.438188314437866,
0.15214768052101135,
0.26116594672203064,
-0.20899122953414917,
-1.0692799091339111,
1.4362232685089111,
0.8919819593429565,
-0.13280466198921204,
-0.6041178107261658,
-1.0253387689590454,
1.33127760887146,
2.0145785808563232,
1.1451561450958252,
0.1450670212507248,
-0.9068837761878967,
-0.7365756630897522,
-0.05155537277460098,
0.17896459996700287,
0.4980330467224121,
0.9945922493934631,
-0.06117340549826622,
0.08413239568471909,
1.4256114959716797,
1.1884011030197144,
-0.2930756211280823,
0.407073438167572,
-0.9157386422157288,
-0.37574896216392517,
0.38598328828811646,
0.21129484474658966,
0.037818197160959244,
0.4811413884162903,
-1.0357666015625,
-0.34071478247642517,
-0.3435916602611542,
-0.829345703125,
-0.8313165307044983,
-0.38630160689353943,
-0.4304138720035553,
1.6592243909835815,
0.08253951370716095,
-0.48870882391929626,
0.0977206602692604,
-0.6521313786506653,
-0.09480693936347961,
-1.0976184606552124,
0.16461911797523499,
-0.06500939279794693,
-0.062071170657873154,
-0.07553518563508987,
1.638940453529358,
-0.9638428688049316,
-2.1428914070129395,
0.2425927370786667,
0.3199135661125183,
-0.37439823150634766,
0.18932917714118958,
1.7566713094711304,
0.5224184393882751,
1.3899345397949219,
1.3221031427383423,
0.9626897573471069,
-0.5945279598236084,
-1.238287091255188,
0.7849928140640259,
0.9556286334991455,
-1.356384515762329,
0.8978065848350525,
-0.12230613827705383,
-0.5714551210403442,
0.70660400390625,
1.2794743776321411,
0.3824394643306732,
-2.0727686882019043,
0.9261756539344788,
-0.907407820224762,
0.8124169707298279,
0.7179882526397705,
0.7509090900421143,
0.2664273679256439,
0.8661271333694458,
-1.307654619216919,
-1.1584256887435913,
-0.6254756450653076,
-0.6221153140068054,
1.9590493440628052,
-0.26448526978492737,
0.5739466547966003,
-0.13659219443798065,
-1.2838456630706787,
-0.057200051844120026,
0.7846165895462036,
0.35763055086135864,
-0.4731559753417969,
0.911426842212677,
-0.6011402010917664,
-0.9012227654457092,
-1.2820783853530884,
-0.3728109896183014,
-1.1121716499328613,
-0.9625451564788818,
0.9830194711685181,
0.745040237903595,
0.45659318566322327,
1.9274890422821045,
0.6216617822647095,
0.3756069242954254,
-2.632878065109253,
0.9216775298118591,
0.34503334760665894,
-0.07739458978176117,
0.8777299523353577,
0.25257471203804016,
1.1854336261749268,
-0.0020239362493157387,
0.6182538866996765,
-2.356654644012451,
2.235666275024414,
-0.17566239833831787,
0.5997800230979919,
-0.05120360851287842,
-0.18998627364635468,
1.1480692625045776,
0.5375813841819763,
0.5507493615150452,
-1.1069494485855103,
0.7110621333122253,
-0.5443675518035889,
1.0882519483566284,
0.96066814661026,
-0.898373544216156,
0.05495879799127579,
1.4329158067703247,
0.4960433840751648,
-0.4249395728111267,
-0.915752649307251,
-0.885748028755188,
1.0027532577514648,
1.6807513236999512,
-0.037974268198013306,
0.019847959280014038,
0.8821629881858826,
0.6288480758666992,
-1.266196608543396,
0.0779586136341095,
-0.6857112646102905,
-0.6336299180984497,
1.724307656288147,
2.092378616333008,
-0.14366236329078674,
-0.22783271968364716,
-0.7177026271820068,
-1.3096330165863037,
0.7308198809623718,
-0.13691557943820953,
0.04693843051791191,
0.7224550247192383,
-0.7197636961936951,
1.0961971282958984,
0.57606440782547,
0.9721522331237793,
0.03525786101818085,
0.2439461201429367,
0.3624691069126129,
-0.41409721970558167,
-1.2062186002731323,
-0.3141563832759857,
-1.116683006286621,
-2.5517165660858154,
0.39160048961639404,
-0.18506775796413422,
-1.438682198524475,
0.07322737574577332,
-1.0825737714767456,
0.8385981917381287,
-0.5658052563667297,
-1.1039692163467407,
-1.421444296836853,
0.3139552175998688,
-0.16387727856636047,
0.9269275665283203,
-1.612972617149353,
-0.24081887304782867,
1.220327615737915,
0.8349810838699341,
-0.5491688847541809,
0.9097515940666199,
0.2730425000190735,
1.0216858386993408,
0.824418842792511,
-0.4306607246398926,
0.6207253336906433,
-0.045242324471473694,
-1.3203271627426147,
0.4173160493373871,
1.2560187578201294,
0.24485252797603607,
1.46989905834198,
-0.4255942702293396,
0.14009320735931396,
0.4199305772781372,
-0.592861533164978,
-0.5875017642974854,
-0.37836796045303345,
0.6744290590286255,
0.05954958498477936,
-1.1140414476394653,
-0.12114284932613373,
-0.0990707129240036,
-0.3042668402194977,
0.23723043501377106,
-1.5440396070480347,
-0.23653776943683624,
-0.3877650797367096,
-0.4766639471054077,
-1.3220124244689941,
0.11029230803251266,
1.2751014232635498,
-0.7773589491844177,
-0.2810423672199249,
0.46212348341941833,
0.38179633021354675,
0.5811034440994263,
0.5452305674552917,
-0.7900472283363342,
-0.28425440192222595,
-0.35928815603256226,
-0.34931740164756775,
0.2828347384929657,
1.2120115756988525,
-0.05901026353240013,
-1.0138715505599976,
0.6663767695426941,
-0.41821491718292236,
0.16598942875862122,
1.993577003479004,
-0.021604306995868683,
-0.78215491771698,
0.3515320122241974,
-0.697145402431488,
1.7325519323349,
1.6670587062835693,
1.2578372955322266,
-0.057799603790044785,
-0.7949220538139343,
0.5718319416046143,
-0.33370569348335266,
-0.317943811416626,
0.8908720016479492,
0.33898085355758667,
-0.23232626914978027,
-1.4577062129974365,
0.630644679069519,
1.3194817304611206,
-0.7528700828552246,
-0.8397713303565979,
0.058103375136852264,
-0.9371760487556458,
1.2853245735168457,
0.5095738768577576,
0.293005108833313,
0.23110701143741608,
1.567112684249878,
0.746093213558197,
-0.4332570433616638,
0.516369104385376,
0.5198623538017273,
-0.24721330404281616,
-2.1299009323120117,
-1.0469574928283691,
0.3406004309654236,
-0.47385406494140625,
-1.634636640548706,
1.4025777578353882,
-1.208665132522583,
-1.0623005628585815,
0.5658155679702759,
0.17195239663124084,
1.302349328994751,
0.3935602605342865,
1.6788524389266968,
2.1493570804595947,
0.9032447934150696,
0.38862529397010803,
1.2037488222122192,
-0.12701986730098724,
-0.4064699709415436,
1.8140789270401,
-0.41239798069000244,
0.5121955871582031,
1.0016875267028809,
-0.4086604416370392,
-1.128477692604065,
-0.8481628894805908,
-1.233883261680603,
-0.631005585193634,
1.273047924041748,
0.08481386303901672,
-1.030554175376892,
0.23982717096805573,
1.6166231632232666,
0.11406869441270828,
-0.2666521370410919,
0.7450761198997498,
0.43773365020751953,
-0.7011381983757019,
0.011392981745302677,
-0.7946569323539734,
0.4360561668872833,
-0.040054451674222946,
-0.2998438775539398,
0.30894190073013306,
0.6464545130729675,
1.350954532623291,
-0.09380363672971725,
0.04242879897356033,
1.1314618587493896,
-1.3762470483779907,
1.4907188415527344,
-0.6143487691879272,
0.24936579167842865,
-2.4482150077819824,
1.4078086614608765,
-0.7974683046340942,
1.9751399755477905,
-2.487098455429077,
0.46563440561294556,
-0.5553094744682312,
-0.4652306139469147,
0.3156915009021759,
-0.37999436259269714,
0.11852376908063889,
-0.12440363317728043,
-0.9759114384651184,
-0.07217803597450256,
-0.7855746746063232,
0.552588939666748,
1.2307039499282837,
1.4227783679962158,
-1.0966455936431885,
-0.24516211450099945,
-1.7060121297836304,
-0.07796962559223175,
-0.7795998454093933,
0.31918588280677795,
-1.9970628023147583,
-0.1970907747745514,
-1.995481014251709,
-2.2601747512817383,
-1.3102275133132935,
-0.8192126750946045,
1.026876449584961,
0.22327934205532074,
-0.9352449178695679,
1.2321009635925293,
-0.3892607092857361,
-1.8081191778182983,
1.1434638500213623,
-2.225262403488159
] |
https://github.com/huggingface/datasets/issues/3345 | Failed to download species_800 from Google Drive zip file | Hi,
the dataset is downloaded normally on my machine. Maybe the URL was down at the time of your download. Could you try again? | ## Describe the bug
One can manually download the zip file on Google Drive, but `load_dataset()` cannot.
related: #3248
## Steps to reproduce the bug
```shell
> python
Python 3.7.12 (default, Sep 5 2021, 08:34:29)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
```
```python
>>> from datasets import load_dataset
>>> s800 = load_dataset("species_800")
```
## Expected results
species_800 downloaded.
## Actual results
```shell
Downloading: 5.68kB [00:00, 1.22MB/s]
Downloading: 2.70kB [00:00, 691kB/s]
Downloading and preparing dataset species800/species_800 (download: 17.36 MiB, generated: 3.53 MiB, post-processed: Unknown size, total: 20.89 MiB) to /Users/mike/.cache/huggingface/datasets/species800/species_800/1.0.0/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976...
0%| | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 675, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/Users/mike/.cache/huggingface/modules/datasets_modules/datasets/species_800/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976/species_800.py", line 104, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 197, in download
download_func, url_or_urls, map_tuple=True, num_proc=download_config.num_proc, disable_tqdm=False
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in map_nested
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in <listcomp>
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 143, in _single_map_nested
return function(data_struct)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 217, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 305, in cached_path
use_auth_token=download_config.use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 594, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://drive.google.com/u/0/uc?id=1OletxmPYNkz2ltOr9pyT0b0iBtUWxslh&export=download/
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14,0 1.15.0, 1.16.1
- Platform: macOS Catalina 10.15.7
- Python version: 3.7.12
- PyArrow version: 6.0.1
| 1,083 | 24 | Failed to download species_800 from Google Drive zip file
## Describe the bug
One can manually download the zip file on Google Drive, but `load_dataset()` cannot.
related: #3248
## Steps to reproduce the bug
```shell
> python
Python 3.7.12 (default, Sep 5 2021, 08:34:29)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
```
```python
>>> from datasets import load_dataset
>>> s800 = load_dataset("species_800")
```
## Expected results
species_800 downloaded.
## Actual results
```shell
Downloading: 5.68kB [00:00, 1.22MB/s]
Downloading: 2.70kB [00:00, 691kB/s]
Downloading and preparing dataset species800/species_800 (download: 17.36 MiB, generated: 3.53 MiB, post-processed: Unknown size, total: 20.89 MiB) to /Users/mike/.cache/huggingface/datasets/species800/species_800/1.0.0/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976...
0%| | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 675, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/Users/mike/.cache/huggingface/modules/datasets_modules/datasets/species_800/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976/species_800.py", line 104, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 197, in download
download_func, url_or_urls, map_tuple=True, num_proc=download_config.num_proc, disable_tqdm=False
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in map_nested
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in <listcomp>
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 143, in _single_map_nested
return function(data_struct)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 217, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 305, in cached_path
use_auth_token=download_config.use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 594, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://drive.google.com/u/0/uc?id=1OletxmPYNkz2ltOr9pyT0b0iBtUWxslh&export=download/
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14,0 1.15.0, 1.16.1
- Platform: macOS Catalina 10.15.7
- Python version: 3.7.12
- PyArrow version: 6.0.1
Hi,
the dataset is downloaded normally on my machine. Maybe the URL was down at the time of your download. Could you try again? | [
-1.1738947629928589,
-0.8400794267654419,
-0.7446466684341431,
1.3659334182739258,
-0.12998148798942566,
-1.2028151750564575,
0.17144301533699036,
-1.1227086782455444,
1.6198445558547974,
-0.6709312200546265,
0.2801162600517273,
-1.6959288120269775,
-0.10089429467916489,
-0.5240837335586548,
-0.7106342315673828,
-0.8649917840957642,
-0.3901689648628235,
-0.8000348806381226,
1.02237069606781,
2.5549912452697754,
1.255181908607483,
-1.3347172737121582,
2.7236368656158447,
0.6447956562042236,
-0.32281532883644104,
-0.9853343963623047,
0.5299084186553955,
0.039407286792993546,
-1.3049551248550415,
-0.45391231775283813,
-0.8955382108688354,
-0.07015593349933624,
-0.5764158964157104,
-0.49860328435897827,
0.08947926759719849,
0.43793001770973206,
-0.3225966691970825,
-0.3687177002429962,
-0.5271917581558228,
-0.7567234039306641,
0.48008212447166443,
-0.3616058826446533,
0.9653880596160889,
-0.2920209765434265,
1.7281215190887451,
-0.6490360498428345,
0.44433197379112244,
0.7517894506454468,
1.2687461376190186,
0.1996622085571289,
0.07681085169315338,
0.37500959634780884,
0.3671177327632904,
-0.035118695348501205,
0.5164309740066528,
1.1915949583053589,
0.5491820573806763,
0.45512068271636963,
0.6988980770111084,
-2.1929736137390137,
1.3090020418167114,
-0.914149284362793,
0.19141621887683868,
1.3426826000213623,
-0.827634334564209,
0.3009794056415558,
-1.7696783542633057,
-0.04618433862924576,
0.5489989519119263,
-2.3076183795928955,
0.33239972591400146,
-1.2844898700714111,
-0.5403870344161987,
0.8935636281967163,
0.35914137959480286,
-1.208396315574646,
0.11348061263561249,
-0.5241291522979736,
0.9963675737380981,
0.422536700963974,
1.1350570917129517,
-1.6959165334701538,
-0.10344933718442917,
-0.24425828456878662,
0.11421868950128555,
-1.281479835510254,
-1.5886777639389038,
0.5912753343582153,
0.5632853507995605,
0.6726614236831665,
-0.05838502198457718,
0.9841707944869995,
-1.0470224618911743,
0.8278895616531372,
-1.042384147644043,
-1.6949455738067627,
-1.3945404291152954,
-2.369206666946411,
-2.2654616832733154,
0.7635542154312134,
-0.4757130444049835,
-0.4787810742855072,
1.9808404445648193,
-0.9342362880706787,
-1.731783390045166,
1.066382884979248,
0.3165183365345001,
-0.09269198775291443,
2.3911218643188477,
0.26124444603919983,
-0.7602864503860474,
0.4400670528411865,
-0.7799487113952637,
0.8127362728118896,
-0.3183780610561371,
1.2981172800064087,
0.45478585362434387,
-0.925187349319458,
1.5705254077911377,
-0.43644896149635315,
0.5871676206588745,
-0.673089861869812,
-0.5162396430969238,
-0.7916486263275146,
0.20593160390853882,
1.9407901763916016,
-0.35525959730148315,
1.5089737176895142,
-0.29083383083343506,
-1.583608865737915,
-1.5434049367904663,
0.8501875400543213,
0.5210487842559814,
-0.8612047433853149,
0.18199186027050018,
-0.43568435311317444,
0.16684480011463165,
-0.05909929424524307,
1.1151405572891235,
1.2418980598449707,
0.7767407894134521,
-0.26362350583076477,
-0.920829176902771,
0.20165260136127472,
-0.12440881878137589,
-0.8128899335861206,
-1.7899625301361084,
-0.32457929849624634,
0.1728149801492691,
0.6231842041015625,
-1.2882431745529175,
1.7371746301651,
0.8634727001190186,
1.9801710844039917,
1.0351725816726685,
-0.4369542598724365,
1.504244089126587,
0.03610610216856003,
1.7783292531967163,
-0.47819992899894714,
0.6219515800476074,
-0.4247939884662628,
-1.153853416442871,
0.9050612449645996,
-0.3286186158657074,
-1.986909031867981,
-0.7898885011672974,
-0.7595725059509277,
-0.1990012526512146,
-0.790062427520752,
0.8875912427902222,
-0.2766280770301819,
-1.4842517375946045,
0.18989266455173492,
-0.7238203287124634,
0.09343073517084122,
-1.248504400253296,
0.22696375846862793,
0.6432920694351196,
-0.6434000730514526,
0.04455995187163353,
-0.19295744597911835,
-1.3362641334533691,
-0.43277502059936523,
0.23973889648914337,
1.9301586151123047,
-0.681828498840332,
0.9967650175094604,
1.039608359336853,
-0.6842695474624634,
0.09197545796632767,
0.32848164439201355,
-0.30771857500076294,
0.802979588508606,
-1.1674083471298218,
-0.395738422870636,
1.1579800844192505,
-0.14649654924869537,
-0.6496152877807617,
1.4230880737304688,
0.7831978797912598,
-1.1108696460723877,
-0.279786080121994,
-0.1774778664112091,
-0.8066114187240601,
0.031244579702615738,
-1.5556715726852417,
-0.1564716398715973,
0.40098729729652405,
-1.5094517469406128,
-0.46278202533721924,
-0.20416349172592163,
1.296457290649414,
-0.18782654404640198,
1.4750510454177856,
-0.29762133955955505,
-0.12469325959682465,
-0.4140198826789856,
-0.43131500482559204,
0.08148302137851715,
-0.27279677987098694,
-0.5975532531738281,
0.16309627890586853,
-0.7630198001861572,
0.30706775188446045,
1.500689148902893,
0.24865376949310303,
0.04571843519806862,
0.4613977372646332,
1.1177139282226562,
0.3562888205051422,
-0.011585984379053116,
-0.9140655994415283,
-1.5115604400634766,
2.0127439498901367,
-1.4610555171966553,
1.9603968858718872,
0.8419054746627808,
-0.09923462569713593,
-1.7739495038986206,
-1.9003629684448242,
1.2957078218460083,
1.1837912797927856,
2.3637170791625977,
0.5627477169036865,
0.5087125301361084,
-0.7287404537200928,
-0.6816089153289795,
0.24178537726402283,
-1.0123839378356934,
-0.7366604804992676,
0.22781828045845032,
2.42335844039917,
1.7122886180877686,
-0.5801130533218384,
-0.21830247342586517,
-0.9437546730041504,
1.3774018287658691,
-0.18127895891666412,
0.1910400390625,
2.0403378009796143,
-0.23152977228164673,
-1.0744117498397827,
1.3181806802749634,
-2.296201229095459,
0.21028034389019012,
2.0033247470855713,
0.3036118447780609,
0.13565310835838318,
-1.3478553295135498,
-0.7002149820327759,
-0.34538552165031433,
-0.45282018184661865,
-1.1944236755371094,
0.5716869831085205,
-0.2614443600177765,
-0.8751699924468994,
-1.5035291910171509,
0.08607461303472519,
-1.21125066280365,
-1.7250510454177856,
0.29181766510009766,
1.8943393230438232,
2.0570127964019775,
-0.8351082801818848,
1.4554574489593506,
-0.29966312646865845,
0.048614002764225006,
1.2580535411834717,
1.275991439819336,
3.103405237197876,
1.8709909915924072,
-1.2621508836746216,
0.7478235960006714,
-0.18323026597499847,
-0.4543597996234894,
1.1219388246536255,
-1.1596506834030151,
1.1412460803985596,
-0.15870316326618195,
-1.2016264200210571,
-1.1979072093963623,
0.9873954057693481,
0.4739190638065338,
0.05140483006834984,
-0.48280230164527893,
1.183028221130371,
0.1445605605840683,
1.360007643699646,
0.6096009016036987,
-0.285391241312027,
0.6298201084136963,
-0.37363043427467346,
-0.41792601346969604,
1.6719141006469727,
0.20431974530220032,
-1.4730325937271118,
-2.438044786453247,
-0.2547362446784973,
-0.9140223264694214,
0.0348857082426548,
-0.6124076843261719,
-1.0947980880737305,
1.6509747505187988,
0.4333570599555969,
-1.2135342359542847,
-0.298981249332428,
-0.29573971033096313,
-0.5150913000106812,
2.702392816543579,
-1.3351260423660278,
-0.1290777325630188,
-0.8943396806716919,
-0.5642174482345581,
1.6699270009994507,
-1.1486014127731323,
-0.24331164360046387,
-1.0531258583068848,
-0.5592727661132812,
-1.283968210220337,
-0.5234044790267944,
-0.015467459335923195,
-0.932807207107544,
0.7592899799346924,
0.22205984592437744,
-1.1443357467651367,
-0.2998976409435272,
-0.8979674577713013,
0.9682072401046753,
-0.07013608515262604,
0.18365222215652466,
1.8597863912582397,
0.3725999891757965,
-0.40838319063186646,
0.7067388296127319,
1.2249631881713867,
0.568693995475769,
-0.6724770069122314,
0.027177706360816956,
-0.6864347457885742,
0.28821712732315063,
-1.3886795043945312,
0.23062750697135925,
-2.896275281906128,
0.7154730558395386,
-0.1306591033935547,
-0.10337436199188232,
-0.02519489824771881,
-1.2744231224060059,
1.1905008554458618,
2.614176034927368,
-1.1661065816879272,
0.5166935920715332,
0.342929482460022,
1.1303378343582153,
-1.5478541851043701,
0.24573221802711487,
-0.44606098532676697,
2.1011011600494385,
0.1751539707183838,
1.2648727893829346,
-0.4946068525314331,
-2.3086884021759033,
0.665999174118042,
-1.2500758171081543,
-1.1824876070022583,
0.8356496095657349,
-0.8456517457962036,
0.12134221196174622,
-1.4220737218856812,
-0.15734748542308807,
-0.9412944316864014,
-1.1962860822677612,
0.678250789642334,
0.08576961606740952,
0.46259212493896484,
-0.6205788850784302,
0.3805433511734009,
-2.2621817588806152,
-1.393022894859314,
-0.20585349202156067,
-0.9337630271911621,
0.5207037925720215,
-0.37663882970809937,
0.707317590713501,
-0.11960983276367188,
0.04847263917326927,
0.37932536005973816,
1.4521491527557373,
3.3626046180725098,
0.12328079342842102,
0.21710757911205292,
-0.18295696377754211,
-0.9895163774490356,
1.3837730884552002,
0.977407693862915,
-0.16259723901748657,
-0.6086323261260986,
-1.019734501838684,
1.2521215677261353,
2.0361809730529785,
1.1028320789337158,
0.09372198581695557,
-0.8391640186309814,
-0.7020740509033203,
-0.04542006179690361,
0.2683623731136322,
0.4811549484729767,
0.9485757350921631,
-0.006521323695778847,
0.03926757723093033,
1.4314346313476562,
1.1262825727462769,
-0.3768823742866516,
0.36609697341918945,
-0.8744014501571655,
-0.40175217390060425,
0.5019141435623169,
0.22715209424495697,
0.03666197136044502,
0.4522866904735565,
-1.0442957878112793,
-0.33936190605163574,
-0.30606609582901,
-0.9001036882400513,
-0.7484419345855713,
-0.383472204208374,
-0.3604254126548767,
1.6156126260757446,
0.06034288555383682,
-0.41398754715919495,
0.04338045045733452,
-0.7125557661056519,
-0.10185110569000244,
-1.1410083770751953,
0.2419857382774353,
-0.16995082795619965,
-0.04735632985830307,
-0.08422376960515976,
1.753894567489624,
-0.9601345062255859,
-2.045726776123047,
0.19130735099315643,
0.272337406873703,
-0.37860798835754395,
0.2527734935283661,
1.6892714500427246,
0.620698094367981,
1.4037264585494995,
1.3038413524627686,
0.9814510345458984,
-0.6402057409286499,
-1.2638225555419922,
0.65315842628479,
0.9997390508651733,
-1.3351868391036987,
0.8268349170684814,
-0.07908663153648376,
-0.5091880559921265,
0.6354676485061646,
1.3408398628234863,
0.413166880607605,
-2.0363569259643555,
0.7979103326797485,
-0.8841347694396973,
0.7594982385635376,
0.6773768663406372,
0.7562679052352905,
0.22010907530784607,
0.8005502223968506,
-1.2706689834594727,
-1.0589041709899902,
-0.7248895168304443,
-0.6083577871322632,
1.9260056018829346,
-0.23492540419101715,
0.5228607654571533,
-0.21395274996757507,
-1.2192705869674683,
-0.08142615109682083,
0.7566512823104858,
0.390226811170578,
-0.440597802400589,
0.8530604839324951,
-0.5983929634094238,
-1.1056060791015625,
-1.2753808498382568,
-0.4181499481201172,
-1.015334129333496,
-0.9066036939620972,
1.0107338428497314,
0.7415440082550049,
0.4449918568134308,
1.9495497941970825,
0.6736648082733154,
0.2753225862979889,
-2.6069047451019287,
0.8858209848403931,
0.31927844882011414,
-0.09741488099098206,
0.9504107236862183,
0.3450799286365509,
1.1092277765274048,
-0.03398888558149338,
0.5969655513763428,
-2.356572151184082,
2.255122661590576,
-0.17806120216846466,
0.6696176528930664,
-0.0013078674674034119,
-0.12410452216863632,
1.050072431564331,
0.6038275957107544,
0.5023910999298096,
-1.1267433166503906,
0.6614234447479248,
-0.5912761688232422,
1.188827395439148,
0.9136983156204224,
-0.8348228931427002,
0.062232017517089844,
1.3408700227737427,
0.489316463470459,
-0.397494375705719,
-0.9565438032150269,
-0.8348815441131592,
0.987143874168396,
1.7150901556015015,
-0.10976152867078781,
0.0962752103805542,
0.8514822721481323,
0.6152448654174805,
-1.326574444770813,
0.015972880646586418,
-0.7068972587585449,
-0.7312930822372437,
1.7394129037857056,
2.121746778488159,
-0.12233196198940277,
-0.18542803823947906,
-0.8166929483413696,
-1.286981463432312,
0.8190320730209351,
-0.03893415629863739,
0.13723628222942352,
0.6408352851867676,
-0.6302006244659424,
1.1720741987228394,
0.7035195827484131,
0.9613769054412842,
0.1380704790353775,
0.35305923223495483,
0.35444504022598267,
-0.3461134731769562,
-1.1645969152450562,
-0.3634463846683502,
-1.099835991859436,
-2.597378730773926,
0.49869564175605774,
-0.19763824343681335,
-1.5222296714782715,
0.045727647840976715,
-1.0577614307403564,
0.8466380834579468,
-0.5849936008453369,
-1.0392024517059326,
-1.4650919437408447,
0.29373419284820557,
-0.11377811431884766,
1.0042698383331299,
-1.590901494026184,
-0.13246658444404602,
1.236034870147705,
0.9223995208740234,
-0.5993292331695557,
0.9429547786712646,
0.2879807651042938,
1.0236316919326782,
0.8347576856613159,
-0.38483723998069763,
0.6472629308700562,
0.0718780979514122,
-1.3081680536270142,
0.3931407928466797,
1.2584867477416992,
0.2407832145690918,
1.455260992050171,
-0.4727413058280945,
0.08551684767007828,
0.39327898621559143,
-0.5084969401359558,
-0.519943356513977,
-0.508687436580658,
0.6130237579345703,
0.12265588343143463,
-1.0772223472595215,
-0.1189931258559227,
-0.11107487231492996,
-0.23998041450977325,
0.26833775639533997,
-1.4105453491210938,
-0.23760735988616943,
-0.4127761423587799,
-0.5027597546577454,
-1.262082815170288,
-0.0023644519969820976,
1.2894262075424194,
-0.7976716756820679,
-0.22625423967838287,
0.43340083956718445,
0.3123607039451599,
0.5369623899459839,
0.5881990194320679,
-0.7524048089981079,
-0.39714011549949646,
-0.32979387044906616,
-0.34400445222854614,
0.32423973083496094,
1.2845627069473267,
-0.05944133922457695,
-1.0461084842681885,
0.6549164056777954,
-0.35619714856147766,
0.15231527388095856,
1.9611567258834839,
0.027315661311149597,
-0.7573287487030029,
0.2006385326385498,
-0.6204670667648315,
1.880399227142334,
1.6633710861206055,
1.242438554763794,
-0.17657732963562012,
-0.933517336845398,
0.6000640392303467,
-0.2990342378616333,
-0.34529563784599304,
0.8304020166397095,
0.33151665329933167,
-0.24616026878356934,
-1.4481419324874878,
0.5894495248794556,
1.3450230360031128,
-0.8300509452819824,
-0.8141516447067261,
0.06894568353891373,
-0.8919596672058105,
1.128697156906128,
0.6718618869781494,
0.3432762026786804,
0.2529333531856537,
1.5922514200210571,
0.829002857208252,
-0.5187059640884399,
0.6021381616592407,
0.44850510358810425,
-0.13347932696342468,
-2.141677141189575,
-1.1092106103897095,
0.31407466530799866,
-0.44441911578178406,
-1.6117024421691895,
1.393657922744751,
-1.127720832824707,
-1.049010992050171,
0.5644198656082153,
0.09163670241832733,
1.3211898803710938,
0.34845027327537537,
1.6481932401657104,
2.0660741329193115,
0.9329080581665039,
0.28830602765083313,
1.2262957096099854,
-0.10245738923549652,
-0.5033670663833618,
1.844314694404602,
-0.42347395420074463,
0.5264288187026978,
1.0750101804733276,
-0.3429914712905884,
-1.057981014251709,
-0.846674919128418,
-1.2760977745056152,
-0.7427338361740112,
1.1823451519012451,
0.07865031063556671,
-1.1535345315933228,
0.25445297360420227,
1.6399259567260742,
0.12511993944644928,
-0.2889169454574585,
0.7408243417739868,
0.3854893147945404,
-0.7938259840011597,
-0.02211897075176239,
-0.9153757095336914,
0.5229920148849487,
-0.10544868558645248,
-0.29845666885375977,
0.2360110729932785,
0.5848908424377441,
1.3640087842941284,
-0.02508840337395668,
0.10901685059070587,
1.2145400047302246,
-1.3703436851501465,
1.5061304569244385,
-0.6525756120681763,
0.27089643478393555,
-2.4201290607452393,
1.40261971950531,
-0.7801889181137085,
1.894200086593628,
-2.559480667114258,
0.41691353917121887,
-0.5316585302352905,
-0.48681384325027466,
0.21443334221839905,
-0.3551377058029175,
0.213084876537323,
-0.1575763076543808,
-1.035083532333374,
-0.11878970265388489,
-0.7435466051101685,
0.5504908561706543,
1.0981580018997192,
1.4462512731552124,
-1.0941699743270874,
-0.24009883403778076,
-1.70150625705719,
-0.10979870706796646,
-0.7394427061080933,
0.2418149709701538,
-1.9215644598007202,
-0.163068488240242,
-1.9787952899932861,
-2.3246395587921143,
-1.3676369190216064,
-0.8240112066268921,
1.045637607574463,
0.13557441532611847,
-0.9039483070373535,
1.1869168281555176,
-0.35358530282974243,
-1.7861673831939697,
1.1184195280075073,
-2.1595630645751953
] |
https://github.com/huggingface/datasets/issues/3345 | Failed to download species_800 from Google Drive zip file | > Hi,
>
> the dataset is downloaded normally on my machine. Maybe the URL was down at the time of your download. Could you try again?
I have tried that many times with both load_dataset() and a browser almost simultaneously. The browser always works for me while load_dataset() fails. | ## Describe the bug
One can manually download the zip file on Google Drive, but `load_dataset()` cannot.
related: #3248
## Steps to reproduce the bug
```shell
> python
Python 3.7.12 (default, Sep 5 2021, 08:34:29)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
```
```python
>>> from datasets import load_dataset
>>> s800 = load_dataset("species_800")
```
## Expected results
species_800 downloaded.
## Actual results
```shell
Downloading: 5.68kB [00:00, 1.22MB/s]
Downloading: 2.70kB [00:00, 691kB/s]
Downloading and preparing dataset species800/species_800 (download: 17.36 MiB, generated: 3.53 MiB, post-processed: Unknown size, total: 20.89 MiB) to /Users/mike/.cache/huggingface/datasets/species800/species_800/1.0.0/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976...
0%| | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 675, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/Users/mike/.cache/huggingface/modules/datasets_modules/datasets/species_800/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976/species_800.py", line 104, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 197, in download
download_func, url_or_urls, map_tuple=True, num_proc=download_config.num_proc, disable_tqdm=False
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in map_nested
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in <listcomp>
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 143, in _single_map_nested
return function(data_struct)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 217, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 305, in cached_path
use_auth_token=download_config.use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 594, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://drive.google.com/u/0/uc?id=1OletxmPYNkz2ltOr9pyT0b0iBtUWxslh&export=download/
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14,0 1.15.0, 1.16.1
- Platform: macOS Catalina 10.15.7
- Python version: 3.7.12
- PyArrow version: 6.0.1
| 1,083 | 50 | Failed to download species_800 from Google Drive zip file
## Describe the bug
One can manually download the zip file on Google Drive, but `load_dataset()` cannot.
related: #3248
## Steps to reproduce the bug
```shell
> python
Python 3.7.12 (default, Sep 5 2021, 08:34:29)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
```
```python
>>> from datasets import load_dataset
>>> s800 = load_dataset("species_800")
```
## Expected results
species_800 downloaded.
## Actual results
```shell
Downloading: 5.68kB [00:00, 1.22MB/s]
Downloading: 2.70kB [00:00, 691kB/s]
Downloading and preparing dataset species800/species_800 (download: 17.36 MiB, generated: 3.53 MiB, post-processed: Unknown size, total: 20.89 MiB) to /Users/mike/.cache/huggingface/datasets/species800/species_800/1.0.0/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976...
0%| | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 675, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/Users/mike/.cache/huggingface/modules/datasets_modules/datasets/species_800/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976/species_800.py", line 104, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 197, in download
download_func, url_or_urls, map_tuple=True, num_proc=download_config.num_proc, disable_tqdm=False
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in map_nested
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in <listcomp>
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 143, in _single_map_nested
return function(data_struct)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 217, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 305, in cached_path
use_auth_token=download_config.use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 594, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://drive.google.com/u/0/uc?id=1OletxmPYNkz2ltOr9pyT0b0iBtUWxslh&export=download/
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14,0 1.15.0, 1.16.1
- Platform: macOS Catalina 10.15.7
- Python version: 3.7.12
- PyArrow version: 6.0.1
> Hi,
>
> the dataset is downloaded normally on my machine. Maybe the URL was down at the time of your download. Could you try again?
I have tried that many times with both load_dataset() and a browser almost simultaneously. The browser always works for me while load_dataset() fails. | [
-1.1738947629928589,
-0.8400794267654419,
-0.7446466684341431,
1.3659334182739258,
-0.12998148798942566,
-1.2028151750564575,
0.17144301533699036,
-1.1227086782455444,
1.6198445558547974,
-0.6709312200546265,
0.2801162600517273,
-1.6959288120269775,
-0.10089429467916489,
-0.5240837335586548,
-0.7106342315673828,
-0.8649917840957642,
-0.3901689648628235,
-0.8000348806381226,
1.02237069606781,
2.5549912452697754,
1.255181908607483,
-1.3347172737121582,
2.7236368656158447,
0.6447956562042236,
-0.32281532883644104,
-0.9853343963623047,
0.5299084186553955,
0.039407286792993546,
-1.3049551248550415,
-0.45391231775283813,
-0.8955382108688354,
-0.07015593349933624,
-0.5764158964157104,
-0.49860328435897827,
0.08947926759719849,
0.43793001770973206,
-0.3225966691970825,
-0.3687177002429962,
-0.5271917581558228,
-0.7567234039306641,
0.48008212447166443,
-0.3616058826446533,
0.9653880596160889,
-0.2920209765434265,
1.7281215190887451,
-0.6490360498428345,
0.44433197379112244,
0.7517894506454468,
1.2687461376190186,
0.1996622085571289,
0.07681085169315338,
0.37500959634780884,
0.3671177327632904,
-0.035118695348501205,
0.5164309740066528,
1.1915949583053589,
0.5491820573806763,
0.45512068271636963,
0.6988980770111084,
-2.1929736137390137,
1.3090020418167114,
-0.914149284362793,
0.19141621887683868,
1.3426826000213623,
-0.827634334564209,
0.3009794056415558,
-1.7696783542633057,
-0.04618433862924576,
0.5489989519119263,
-2.3076183795928955,
0.33239972591400146,
-1.2844898700714111,
-0.5403870344161987,
0.8935636281967163,
0.35914137959480286,
-1.208396315574646,
0.11348061263561249,
-0.5241291522979736,
0.9963675737380981,
0.422536700963974,
1.1350570917129517,
-1.6959165334701538,
-0.10344933718442917,
-0.24425828456878662,
0.11421868950128555,
-1.281479835510254,
-1.5886777639389038,
0.5912753343582153,
0.5632853507995605,
0.6726614236831665,
-0.05838502198457718,
0.9841707944869995,
-1.0470224618911743,
0.8278895616531372,
-1.042384147644043,
-1.6949455738067627,
-1.3945404291152954,
-2.369206666946411,
-2.2654616832733154,
0.7635542154312134,
-0.4757130444049835,
-0.4787810742855072,
1.9808404445648193,
-0.9342362880706787,
-1.731783390045166,
1.066382884979248,
0.3165183365345001,
-0.09269198775291443,
2.3911218643188477,
0.26124444603919983,
-0.7602864503860474,
0.4400670528411865,
-0.7799487113952637,
0.8127362728118896,
-0.3183780610561371,
1.2981172800064087,
0.45478585362434387,
-0.925187349319458,
1.5705254077911377,
-0.43644896149635315,
0.5871676206588745,
-0.673089861869812,
-0.5162396430969238,
-0.7916486263275146,
0.20593160390853882,
1.9407901763916016,
-0.35525959730148315,
1.5089737176895142,
-0.29083383083343506,
-1.583608865737915,
-1.5434049367904663,
0.8501875400543213,
0.5210487842559814,
-0.8612047433853149,
0.18199186027050018,
-0.43568435311317444,
0.16684480011463165,
-0.05909929424524307,
1.1151405572891235,
1.2418980598449707,
0.7767407894134521,
-0.26362350583076477,
-0.920829176902771,
0.20165260136127472,
-0.12440881878137589,
-0.8128899335861206,
-1.7899625301361084,
-0.32457929849624634,
0.1728149801492691,
0.6231842041015625,
-1.2882431745529175,
1.7371746301651,
0.8634727001190186,
1.9801710844039917,
1.0351725816726685,
-0.4369542598724365,
1.504244089126587,
0.03610610216856003,
1.7783292531967163,
-0.47819992899894714,
0.6219515800476074,
-0.4247939884662628,
-1.153853416442871,
0.9050612449645996,
-0.3286186158657074,
-1.986909031867981,
-0.7898885011672974,
-0.7595725059509277,
-0.1990012526512146,
-0.790062427520752,
0.8875912427902222,
-0.2766280770301819,
-1.4842517375946045,
0.18989266455173492,
-0.7238203287124634,
0.09343073517084122,
-1.248504400253296,
0.22696375846862793,
0.6432920694351196,
-0.6434000730514526,
0.04455995187163353,
-0.19295744597911835,
-1.3362641334533691,
-0.43277502059936523,
0.23973889648914337,
1.9301586151123047,
-0.681828498840332,
0.9967650175094604,
1.039608359336853,
-0.6842695474624634,
0.09197545796632767,
0.32848164439201355,
-0.30771857500076294,
0.802979588508606,
-1.1674083471298218,
-0.395738422870636,
1.1579800844192505,
-0.14649654924869537,
-0.6496152877807617,
1.4230880737304688,
0.7831978797912598,
-1.1108696460723877,
-0.279786080121994,
-0.1774778664112091,
-0.8066114187240601,
0.031244579702615738,
-1.5556715726852417,
-0.1564716398715973,
0.40098729729652405,
-1.5094517469406128,
-0.46278202533721924,
-0.20416349172592163,
1.296457290649414,
-0.18782654404640198,
1.4750510454177856,
-0.29762133955955505,
-0.12469325959682465,
-0.4140198826789856,
-0.43131500482559204,
0.08148302137851715,
-0.27279677987098694,
-0.5975532531738281,
0.16309627890586853,
-0.7630198001861572,
0.30706775188446045,
1.500689148902893,
0.24865376949310303,
0.04571843519806862,
0.4613977372646332,
1.1177139282226562,
0.3562888205051422,
-0.011585984379053116,
-0.9140655994415283,
-1.5115604400634766,
2.0127439498901367,
-1.4610555171966553,
1.9603968858718872,
0.8419054746627808,
-0.09923462569713593,
-1.7739495038986206,
-1.9003629684448242,
1.2957078218460083,
1.1837912797927856,
2.3637170791625977,
0.5627477169036865,
0.5087125301361084,
-0.7287404537200928,
-0.6816089153289795,
0.24178537726402283,
-1.0123839378356934,
-0.7366604804992676,
0.22781828045845032,
2.42335844039917,
1.7122886180877686,
-0.5801130533218384,
-0.21830247342586517,
-0.9437546730041504,
1.3774018287658691,
-0.18127895891666412,
0.1910400390625,
2.0403378009796143,
-0.23152977228164673,
-1.0744117498397827,
1.3181806802749634,
-2.296201229095459,
0.21028034389019012,
2.0033247470855713,
0.3036118447780609,
0.13565310835838318,
-1.3478553295135498,
-0.7002149820327759,
-0.34538552165031433,
-0.45282018184661865,
-1.1944236755371094,
0.5716869831085205,
-0.2614443600177765,
-0.8751699924468994,
-1.5035291910171509,
0.08607461303472519,
-1.21125066280365,
-1.7250510454177856,
0.29181766510009766,
1.8943393230438232,
2.0570127964019775,
-0.8351082801818848,
1.4554574489593506,
-0.29966312646865845,
0.048614002764225006,
1.2580535411834717,
1.275991439819336,
3.103405237197876,
1.8709909915924072,
-1.2621508836746216,
0.7478235960006714,
-0.18323026597499847,
-0.4543597996234894,
1.1219388246536255,
-1.1596506834030151,
1.1412460803985596,
-0.15870316326618195,
-1.2016264200210571,
-1.1979072093963623,
0.9873954057693481,
0.4739190638065338,
0.05140483006834984,
-0.48280230164527893,
1.183028221130371,
0.1445605605840683,
1.360007643699646,
0.6096009016036987,
-0.285391241312027,
0.6298201084136963,
-0.37363043427467346,
-0.41792601346969604,
1.6719141006469727,
0.20431974530220032,
-1.4730325937271118,
-2.438044786453247,
-0.2547362446784973,
-0.9140223264694214,
0.0348857082426548,
-0.6124076843261719,
-1.0947980880737305,
1.6509747505187988,
0.4333570599555969,
-1.2135342359542847,
-0.298981249332428,
-0.29573971033096313,
-0.5150913000106812,
2.702392816543579,
-1.3351260423660278,
-0.1290777325630188,
-0.8943396806716919,
-0.5642174482345581,
1.6699270009994507,
-1.1486014127731323,
-0.24331164360046387,
-1.0531258583068848,
-0.5592727661132812,
-1.283968210220337,
-0.5234044790267944,
-0.015467459335923195,
-0.932807207107544,
0.7592899799346924,
0.22205984592437744,
-1.1443357467651367,
-0.2998976409435272,
-0.8979674577713013,
0.9682072401046753,
-0.07013608515262604,
0.18365222215652466,
1.8597863912582397,
0.3725999891757965,
-0.40838319063186646,
0.7067388296127319,
1.2249631881713867,
0.568693995475769,
-0.6724770069122314,
0.027177706360816956,
-0.6864347457885742,
0.28821712732315063,
-1.3886795043945312,
0.23062750697135925,
-2.896275281906128,
0.7154730558395386,
-0.1306591033935547,
-0.10337436199188232,
-0.02519489824771881,
-1.2744231224060059,
1.1905008554458618,
2.614176034927368,
-1.1661065816879272,
0.5166935920715332,
0.342929482460022,
1.1303378343582153,
-1.5478541851043701,
0.24573221802711487,
-0.44606098532676697,
2.1011011600494385,
0.1751539707183838,
1.2648727893829346,
-0.4946068525314331,
-2.3086884021759033,
0.665999174118042,
-1.2500758171081543,
-1.1824876070022583,
0.8356496095657349,
-0.8456517457962036,
0.12134221196174622,
-1.4220737218856812,
-0.15734748542308807,
-0.9412944316864014,
-1.1962860822677612,
0.678250789642334,
0.08576961606740952,
0.46259212493896484,
-0.6205788850784302,
0.3805433511734009,
-2.2621817588806152,
-1.393022894859314,
-0.20585349202156067,
-0.9337630271911621,
0.5207037925720215,
-0.37663882970809937,
0.707317590713501,
-0.11960983276367188,
0.04847263917326927,
0.37932536005973816,
1.4521491527557373,
3.3626046180725098,
0.12328079342842102,
0.21710757911205292,
-0.18295696377754211,
-0.9895163774490356,
1.3837730884552002,
0.977407693862915,
-0.16259723901748657,
-0.6086323261260986,
-1.019734501838684,
1.2521215677261353,
2.0361809730529785,
1.1028320789337158,
0.09372198581695557,
-0.8391640186309814,
-0.7020740509033203,
-0.04542006179690361,
0.2683623731136322,
0.4811549484729767,
0.9485757350921631,
-0.006521323695778847,
0.03926757723093033,
1.4314346313476562,
1.1262825727462769,
-0.3768823742866516,
0.36609697341918945,
-0.8744014501571655,
-0.40175217390060425,
0.5019141435623169,
0.22715209424495697,
0.03666197136044502,
0.4522866904735565,
-1.0442957878112793,
-0.33936190605163574,
-0.30606609582901,
-0.9001036882400513,
-0.7484419345855713,
-0.383472204208374,
-0.3604254126548767,
1.6156126260757446,
0.06034288555383682,
-0.41398754715919495,
0.04338045045733452,
-0.7125557661056519,
-0.10185110569000244,
-1.1410083770751953,
0.2419857382774353,
-0.16995082795619965,
-0.04735632985830307,
-0.08422376960515976,
1.753894567489624,
-0.9601345062255859,
-2.045726776123047,
0.19130735099315643,
0.272337406873703,
-0.37860798835754395,
0.2527734935283661,
1.6892714500427246,
0.620698094367981,
1.4037264585494995,
1.3038413524627686,
0.9814510345458984,
-0.6402057409286499,
-1.2638225555419922,
0.65315842628479,
0.9997390508651733,
-1.3351868391036987,
0.8268349170684814,
-0.07908663153648376,
-0.5091880559921265,
0.6354676485061646,
1.3408398628234863,
0.413166880607605,
-2.0363569259643555,
0.7979103326797485,
-0.8841347694396973,
0.7594982385635376,
0.6773768663406372,
0.7562679052352905,
0.22010907530784607,
0.8005502223968506,
-1.2706689834594727,
-1.0589041709899902,
-0.7248895168304443,
-0.6083577871322632,
1.9260056018829346,
-0.23492540419101715,
0.5228607654571533,
-0.21395274996757507,
-1.2192705869674683,
-0.08142615109682083,
0.7566512823104858,
0.390226811170578,
-0.440597802400589,
0.8530604839324951,
-0.5983929634094238,
-1.1056060791015625,
-1.2753808498382568,
-0.4181499481201172,
-1.015334129333496,
-0.9066036939620972,
1.0107338428497314,
0.7415440082550049,
0.4449918568134308,
1.9495497941970825,
0.6736648082733154,
0.2753225862979889,
-2.6069047451019287,
0.8858209848403931,
0.31927844882011414,
-0.09741488099098206,
0.9504107236862183,
0.3450799286365509,
1.1092277765274048,
-0.03398888558149338,
0.5969655513763428,
-2.356572151184082,
2.255122661590576,
-0.17806120216846466,
0.6696176528930664,
-0.0013078674674034119,
-0.12410452216863632,
1.050072431564331,
0.6038275957107544,
0.5023910999298096,
-1.1267433166503906,
0.6614234447479248,
-0.5912761688232422,
1.188827395439148,
0.9136983156204224,
-0.8348228931427002,
0.062232017517089844,
1.3408700227737427,
0.489316463470459,
-0.397494375705719,
-0.9565438032150269,
-0.8348815441131592,
0.987143874168396,
1.7150901556015015,
-0.10976152867078781,
0.0962752103805542,
0.8514822721481323,
0.6152448654174805,
-1.326574444770813,
0.015972880646586418,
-0.7068972587585449,
-0.7312930822372437,
1.7394129037857056,
2.121746778488159,
-0.12233196198940277,
-0.18542803823947906,
-0.8166929483413696,
-1.286981463432312,
0.8190320730209351,
-0.03893415629863739,
0.13723628222942352,
0.6408352851867676,
-0.6302006244659424,
1.1720741987228394,
0.7035195827484131,
0.9613769054412842,
0.1380704790353775,
0.35305923223495483,
0.35444504022598267,
-0.3461134731769562,
-1.1645969152450562,
-0.3634463846683502,
-1.099835991859436,
-2.597378730773926,
0.49869564175605774,
-0.19763824343681335,
-1.5222296714782715,
0.045727647840976715,
-1.0577614307403564,
0.8466380834579468,
-0.5849936008453369,
-1.0392024517059326,
-1.4650919437408447,
0.29373419284820557,
-0.11377811431884766,
1.0042698383331299,
-1.590901494026184,
-0.13246658444404602,
1.236034870147705,
0.9223995208740234,
-0.5993292331695557,
0.9429547786712646,
0.2879807651042938,
1.0236316919326782,
0.8347576856613159,
-0.38483723998069763,
0.6472629308700562,
0.0718780979514122,
-1.3081680536270142,
0.3931407928466797,
1.2584867477416992,
0.2407832145690918,
1.455260992050171,
-0.4727413058280945,
0.08551684767007828,
0.39327898621559143,
-0.5084969401359558,
-0.519943356513977,
-0.508687436580658,
0.6130237579345703,
0.12265588343143463,
-1.0772223472595215,
-0.1189931258559227,
-0.11107487231492996,
-0.23998041450977325,
0.26833775639533997,
-1.4105453491210938,
-0.23760735988616943,
-0.4127761423587799,
-0.5027597546577454,
-1.262082815170288,
-0.0023644519969820976,
1.2894262075424194,
-0.7976716756820679,
-0.22625423967838287,
0.43340083956718445,
0.3123607039451599,
0.5369623899459839,
0.5881990194320679,
-0.7524048089981079,
-0.39714011549949646,
-0.32979387044906616,
-0.34400445222854614,
0.32423973083496094,
1.2845627069473267,
-0.05944133922457695,
-1.0461084842681885,
0.6549164056777954,
-0.35619714856147766,
0.15231527388095856,
1.9611567258834839,
0.027315661311149597,
-0.7573287487030029,
0.2006385326385498,
-0.6204670667648315,
1.880399227142334,
1.6633710861206055,
1.242438554763794,
-0.17657732963562012,
-0.933517336845398,
0.6000640392303467,
-0.2990342378616333,
-0.34529563784599304,
0.8304020166397095,
0.33151665329933167,
-0.24616026878356934,
-1.4481419324874878,
0.5894495248794556,
1.3450230360031128,
-0.8300509452819824,
-0.8141516447067261,
0.06894568353891373,
-0.8919596672058105,
1.128697156906128,
0.6718618869781494,
0.3432762026786804,
0.2529333531856537,
1.5922514200210571,
0.829002857208252,
-0.5187059640884399,
0.6021381616592407,
0.44850510358810425,
-0.13347932696342468,
-2.141677141189575,
-1.1092106103897095,
0.31407466530799866,
-0.44441911578178406,
-1.6117024421691895,
1.393657922744751,
-1.127720832824707,
-1.049010992050171,
0.5644198656082153,
0.09163670241832733,
1.3211898803710938,
0.34845027327537537,
1.6481932401657104,
2.0660741329193115,
0.9329080581665039,
0.28830602765083313,
1.2262957096099854,
-0.10245738923549652,
-0.5033670663833618,
1.844314694404602,
-0.42347395420074463,
0.5264288187026978,
1.0750101804733276,
-0.3429914712905884,
-1.057981014251709,
-0.846674919128418,
-1.2760977745056152,
-0.7427338361740112,
1.1823451519012451,
0.07865031063556671,
-1.1535345315933228,
0.25445297360420227,
1.6399259567260742,
0.12511993944644928,
-0.2889169454574585,
0.7408243417739868,
0.3854893147945404,
-0.7938259840011597,
-0.02211897075176239,
-0.9153757095336914,
0.5229920148849487,
-0.10544868558645248,
-0.29845666885375977,
0.2360110729932785,
0.5848908424377441,
1.3640087842941284,
-0.02508840337395668,
0.10901685059070587,
1.2145400047302246,
-1.3703436851501465,
1.5061304569244385,
-0.6525756120681763,
0.27089643478393555,
-2.4201290607452393,
1.40261971950531,
-0.7801889181137085,
1.894200086593628,
-2.559480667114258,
0.41691353917121887,
-0.5316585302352905,
-0.48681384325027466,
0.21443334221839905,
-0.3551377058029175,
0.213084876537323,
-0.1575763076543808,
-1.035083532333374,
-0.11878970265388489,
-0.7435466051101685,
0.5504908561706543,
1.0981580018997192,
1.4462512731552124,
-1.0941699743270874,
-0.24009883403778076,
-1.70150625705719,
-0.10979870706796646,
-0.7394427061080933,
0.2418149709701538,
-1.9215644598007202,
-0.163068488240242,
-1.9787952899932861,
-2.3246395587921143,
-1.3676369190216064,
-0.8240112066268921,
1.045637607574463,
0.13557441532611847,
-0.9039483070373535,
1.1869168281555176,
-0.35358530282974243,
-1.7861673831939697,
1.1184195280075073,
-2.1595630645751953
] |
https://github.com/huggingface/datasets/issues/3345 | Failed to download species_800 from Google Drive zip file | @mariosasko
> the dataset is downloaded normally on my machine. Maybe the URL was down at the time of your download. Could you try again?
I've tried yet again just a moment ago. This time I realize that, the step `(... post-processed: Unknown size, total: 20.89 MiB) to /Users/mike/.cache/huggingface/datasets/species800/species_800/1.0.0/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976...` and the one after seem unstable. If I want to retry, I will have to delete it (and probably other cache lock files). It **_sometimes_** works.
But I didn't try `download_mode="force_redownload"` yet.
Anyway, I suppose this isn't really a pressing issue for the time being, so I'm going to close this. Thank you.
| ## Describe the bug
One can manually download the zip file on Google Drive, but `load_dataset()` cannot.
related: #3248
## Steps to reproduce the bug
```shell
> python
Python 3.7.12 (default, Sep 5 2021, 08:34:29)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
```
```python
>>> from datasets import load_dataset
>>> s800 = load_dataset("species_800")
```
## Expected results
species_800 downloaded.
## Actual results
```shell
Downloading: 5.68kB [00:00, 1.22MB/s]
Downloading: 2.70kB [00:00, 691kB/s]
Downloading and preparing dataset species800/species_800 (download: 17.36 MiB, generated: 3.53 MiB, post-processed: Unknown size, total: 20.89 MiB) to /Users/mike/.cache/huggingface/datasets/species800/species_800/1.0.0/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976...
0%| | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 675, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/Users/mike/.cache/huggingface/modules/datasets_modules/datasets/species_800/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976/species_800.py", line 104, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 197, in download
download_func, url_or_urls, map_tuple=True, num_proc=download_config.num_proc, disable_tqdm=False
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in map_nested
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in <listcomp>
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 143, in _single_map_nested
return function(data_struct)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 217, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 305, in cached_path
use_auth_token=download_config.use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 594, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://drive.google.com/u/0/uc?id=1OletxmPYNkz2ltOr9pyT0b0iBtUWxslh&export=download/
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14,0 1.15.0, 1.16.1
- Platform: macOS Catalina 10.15.7
- Python version: 3.7.12
- PyArrow version: 6.0.1
| 1,083 | 102 | Failed to download species_800 from Google Drive zip file
## Describe the bug
One can manually download the zip file on Google Drive, but `load_dataset()` cannot.
related: #3248
## Steps to reproduce the bug
```shell
> python
Python 3.7.12 (default, Sep 5 2021, 08:34:29)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
```
```python
>>> from datasets import load_dataset
>>> s800 = load_dataset("species_800")
```
## Expected results
species_800 downloaded.
## Actual results
```shell
Downloading: 5.68kB [00:00, 1.22MB/s]
Downloading: 2.70kB [00:00, 691kB/s]
Downloading and preparing dataset species800/species_800 (download: 17.36 MiB, generated: 3.53 MiB, post-processed: Unknown size, total: 20.89 MiB) to /Users/mike/.cache/huggingface/datasets/species800/species_800/1.0.0/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976...
0%| | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/load.py", line 1632, in load_dataset
use_auth_token=use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 608, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/builder.py", line 675, in _download_and_prepare
split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
File "/Users/mike/.cache/huggingface/modules/datasets_modules/datasets/species_800/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976/species_800.py", line 104, in _split_generators
downloaded_files = dl_manager.download_and_extract(urls_to_download)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 284, in download_and_extract
return self.extract(self.download(url_or_urls))
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 197, in download
download_func, url_or_urls, map_tuple=True, num_proc=download_config.num_proc, disable_tqdm=False
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in map_nested
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 209, in <listcomp>
for obj in utils.tqdm(iterable, disable=disable_tqdm)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py", line 143, in _single_map_nested
return function(data_struct)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/download_manager.py", line 217, in _download
return cached_path(url_or_filename, download_config=download_config)
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 305, in cached_path
use_auth_token=download_config.use_auth_token,
File "/Users/mike/Library/Caches/pypoetry/virtualenvs/promptsource-hsdAcWsQ-py3.7/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 594, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://drive.google.com/u/0/uc?id=1OletxmPYNkz2ltOr9pyT0b0iBtUWxslh&export=download/
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14,0 1.15.0, 1.16.1
- Platform: macOS Catalina 10.15.7
- Python version: 3.7.12
- PyArrow version: 6.0.1
@mariosasko
> the dataset is downloaded normally on my machine. Maybe the URL was down at the time of your download. Could you try again?
I've tried yet again just a moment ago. This time I realize that, the step `(... post-processed: Unknown size, total: 20.89 MiB) to /Users/mike/.cache/huggingface/datasets/species800/species_800/1.0.0/532167f0bb8fbc0d77d6d03c4fd642c8c55527b9c5f2b1da77f3d00b0e559976...` and the one after seem unstable. If I want to retry, I will have to delete it (and probably other cache lock files). It **_sometimes_** works.
But I didn't try `download_mode="force_redownload"` yet.
Anyway, I suppose this isn't really a pressing issue for the time being, so I'm going to close this. Thank you.
| [
-1.1738947629928589,
-0.8400794267654419,
-0.7446466684341431,
1.3659334182739258,
-0.12998148798942566,
-1.2028151750564575,
0.17144301533699036,
-1.1227086782455444,
1.6198445558547974,
-0.6709312200546265,
0.2801162600517273,
-1.6959288120269775,
-0.10089429467916489,
-0.5240837335586548,
-0.7106342315673828,
-0.8649917840957642,
-0.3901689648628235,
-0.8000348806381226,
1.02237069606781,
2.5549912452697754,
1.255181908607483,
-1.3347172737121582,
2.7236368656158447,
0.6447956562042236,
-0.32281532883644104,
-0.9853343963623047,
0.5299084186553955,
0.039407286792993546,
-1.3049551248550415,
-0.45391231775283813,
-0.8955382108688354,
-0.07015593349933624,
-0.5764158964157104,
-0.49860328435897827,
0.08947926759719849,
0.43793001770973206,
-0.3225966691970825,
-0.3687177002429962,
-0.5271917581558228,
-0.7567234039306641,
0.48008212447166443,
-0.3616058826446533,
0.9653880596160889,
-0.2920209765434265,
1.7281215190887451,
-0.6490360498428345,
0.44433197379112244,
0.7517894506454468,
1.2687461376190186,
0.1996622085571289,
0.07681085169315338,
0.37500959634780884,
0.3671177327632904,
-0.035118695348501205,
0.5164309740066528,
1.1915949583053589,
0.5491820573806763,
0.45512068271636963,
0.6988980770111084,
-2.1929736137390137,
1.3090020418167114,
-0.914149284362793,
0.19141621887683868,
1.3426826000213623,
-0.827634334564209,
0.3009794056415558,
-1.7696783542633057,
-0.04618433862924576,
0.5489989519119263,
-2.3076183795928955,
0.33239972591400146,
-1.2844898700714111,
-0.5403870344161987,
0.8935636281967163,
0.35914137959480286,
-1.208396315574646,
0.11348061263561249,
-0.5241291522979736,
0.9963675737380981,
0.422536700963974,
1.1350570917129517,
-1.6959165334701538,
-0.10344933718442917,
-0.24425828456878662,
0.11421868950128555,
-1.281479835510254,
-1.5886777639389038,
0.5912753343582153,
0.5632853507995605,
0.6726614236831665,
-0.05838502198457718,
0.9841707944869995,
-1.0470224618911743,
0.8278895616531372,
-1.042384147644043,
-1.6949455738067627,
-1.3945404291152954,
-2.369206666946411,
-2.2654616832733154,
0.7635542154312134,
-0.4757130444049835,
-0.4787810742855072,
1.9808404445648193,
-0.9342362880706787,
-1.731783390045166,
1.066382884979248,
0.3165183365345001,
-0.09269198775291443,
2.3911218643188477,
0.26124444603919983,
-0.7602864503860474,
0.4400670528411865,
-0.7799487113952637,
0.8127362728118896,
-0.3183780610561371,
1.2981172800064087,
0.45478585362434387,
-0.925187349319458,
1.5705254077911377,
-0.43644896149635315,
0.5871676206588745,
-0.673089861869812,
-0.5162396430969238,
-0.7916486263275146,
0.20593160390853882,
1.9407901763916016,
-0.35525959730148315,
1.5089737176895142,
-0.29083383083343506,
-1.583608865737915,
-1.5434049367904663,
0.8501875400543213,
0.5210487842559814,
-0.8612047433853149,
0.18199186027050018,
-0.43568435311317444,
0.16684480011463165,
-0.05909929424524307,
1.1151405572891235,
1.2418980598449707,
0.7767407894134521,
-0.26362350583076477,
-0.920829176902771,
0.20165260136127472,
-0.12440881878137589,
-0.8128899335861206,
-1.7899625301361084,
-0.32457929849624634,
0.1728149801492691,
0.6231842041015625,
-1.2882431745529175,
1.7371746301651,
0.8634727001190186,
1.9801710844039917,
1.0351725816726685,
-0.4369542598724365,
1.504244089126587,
0.03610610216856003,
1.7783292531967163,
-0.47819992899894714,
0.6219515800476074,
-0.4247939884662628,
-1.153853416442871,
0.9050612449645996,
-0.3286186158657074,
-1.986909031867981,
-0.7898885011672974,
-0.7595725059509277,
-0.1990012526512146,
-0.790062427520752,
0.8875912427902222,
-0.2766280770301819,
-1.4842517375946045,
0.18989266455173492,
-0.7238203287124634,
0.09343073517084122,
-1.248504400253296,
0.22696375846862793,
0.6432920694351196,
-0.6434000730514526,
0.04455995187163353,
-0.19295744597911835,
-1.3362641334533691,
-0.43277502059936523,
0.23973889648914337,
1.9301586151123047,
-0.681828498840332,
0.9967650175094604,
1.039608359336853,
-0.6842695474624634,
0.09197545796632767,
0.32848164439201355,
-0.30771857500076294,
0.802979588508606,
-1.1674083471298218,
-0.395738422870636,
1.1579800844192505,
-0.14649654924869537,
-0.6496152877807617,
1.4230880737304688,
0.7831978797912598,
-1.1108696460723877,
-0.279786080121994,
-0.1774778664112091,
-0.8066114187240601,
0.031244579702615738,
-1.5556715726852417,
-0.1564716398715973,
0.40098729729652405,
-1.5094517469406128,
-0.46278202533721924,
-0.20416349172592163,
1.296457290649414,
-0.18782654404640198,
1.4750510454177856,
-0.29762133955955505,
-0.12469325959682465,
-0.4140198826789856,
-0.43131500482559204,
0.08148302137851715,
-0.27279677987098694,
-0.5975532531738281,
0.16309627890586853,
-0.7630198001861572,
0.30706775188446045,
1.500689148902893,
0.24865376949310303,
0.04571843519806862,
0.4613977372646332,
1.1177139282226562,
0.3562888205051422,
-0.011585984379053116,
-0.9140655994415283,
-1.5115604400634766,
2.0127439498901367,
-1.4610555171966553,
1.9603968858718872,
0.8419054746627808,
-0.09923462569713593,
-1.7739495038986206,
-1.9003629684448242,
1.2957078218460083,
1.1837912797927856,
2.3637170791625977,
0.5627477169036865,
0.5087125301361084,
-0.7287404537200928,
-0.6816089153289795,
0.24178537726402283,
-1.0123839378356934,
-0.7366604804992676,
0.22781828045845032,
2.42335844039917,
1.7122886180877686,
-0.5801130533218384,
-0.21830247342586517,
-0.9437546730041504,
1.3774018287658691,
-0.18127895891666412,
0.1910400390625,
2.0403378009796143,
-0.23152977228164673,
-1.0744117498397827,
1.3181806802749634,
-2.296201229095459,
0.21028034389019012,
2.0033247470855713,
0.3036118447780609,
0.13565310835838318,
-1.3478553295135498,
-0.7002149820327759,
-0.34538552165031433,
-0.45282018184661865,
-1.1944236755371094,
0.5716869831085205,
-0.2614443600177765,
-0.8751699924468994,
-1.5035291910171509,
0.08607461303472519,
-1.21125066280365,
-1.7250510454177856,
0.29181766510009766,
1.8943393230438232,
2.0570127964019775,
-0.8351082801818848,
1.4554574489593506,
-0.29966312646865845,
0.048614002764225006,
1.2580535411834717,
1.275991439819336,
3.103405237197876,
1.8709909915924072,
-1.2621508836746216,
0.7478235960006714,
-0.18323026597499847,
-0.4543597996234894,
1.1219388246536255,
-1.1596506834030151,
1.1412460803985596,
-0.15870316326618195,
-1.2016264200210571,
-1.1979072093963623,
0.9873954057693481,
0.4739190638065338,
0.05140483006834984,
-0.48280230164527893,
1.183028221130371,
0.1445605605840683,
1.360007643699646,
0.6096009016036987,
-0.285391241312027,
0.6298201084136963,
-0.37363043427467346,
-0.41792601346969604,
1.6719141006469727,
0.20431974530220032,
-1.4730325937271118,
-2.438044786453247,
-0.2547362446784973,
-0.9140223264694214,
0.0348857082426548,
-0.6124076843261719,
-1.0947980880737305,
1.6509747505187988,
0.4333570599555969,
-1.2135342359542847,
-0.298981249332428,
-0.29573971033096313,
-0.5150913000106812,
2.702392816543579,
-1.3351260423660278,
-0.1290777325630188,
-0.8943396806716919,
-0.5642174482345581,
1.6699270009994507,
-1.1486014127731323,
-0.24331164360046387,
-1.0531258583068848,
-0.5592727661132812,
-1.283968210220337,
-0.5234044790267944,
-0.015467459335923195,
-0.932807207107544,
0.7592899799346924,
0.22205984592437744,
-1.1443357467651367,
-0.2998976409435272,
-0.8979674577713013,
0.9682072401046753,
-0.07013608515262604,
0.18365222215652466,
1.8597863912582397,
0.3725999891757965,
-0.40838319063186646,
0.7067388296127319,
1.2249631881713867,
0.568693995475769,
-0.6724770069122314,
0.027177706360816956,
-0.6864347457885742,
0.28821712732315063,
-1.3886795043945312,
0.23062750697135925,
-2.896275281906128,
0.7154730558395386,
-0.1306591033935547,
-0.10337436199188232,
-0.02519489824771881,
-1.2744231224060059,
1.1905008554458618,
2.614176034927368,
-1.1661065816879272,
0.5166935920715332,
0.342929482460022,
1.1303378343582153,
-1.5478541851043701,
0.24573221802711487,
-0.44606098532676697,
2.1011011600494385,
0.1751539707183838,
1.2648727893829346,
-0.4946068525314331,
-2.3086884021759033,
0.665999174118042,
-1.2500758171081543,
-1.1824876070022583,
0.8356496095657349,
-0.8456517457962036,
0.12134221196174622,
-1.4220737218856812,
-0.15734748542308807,
-0.9412944316864014,
-1.1962860822677612,
0.678250789642334,
0.08576961606740952,
0.46259212493896484,
-0.6205788850784302,
0.3805433511734009,
-2.2621817588806152,
-1.393022894859314,
-0.20585349202156067,
-0.9337630271911621,
0.5207037925720215,
-0.37663882970809937,
0.707317590713501,
-0.11960983276367188,
0.04847263917326927,
0.37932536005973816,
1.4521491527557373,
3.3626046180725098,
0.12328079342842102,
0.21710757911205292,
-0.18295696377754211,
-0.9895163774490356,
1.3837730884552002,
0.977407693862915,
-0.16259723901748657,
-0.6086323261260986,
-1.019734501838684,
1.2521215677261353,
2.0361809730529785,
1.1028320789337158,
0.09372198581695557,
-0.8391640186309814,
-0.7020740509033203,
-0.04542006179690361,
0.2683623731136322,
0.4811549484729767,
0.9485757350921631,
-0.006521323695778847,
0.03926757723093033,
1.4314346313476562,
1.1262825727462769,
-0.3768823742866516,
0.36609697341918945,
-0.8744014501571655,
-0.40175217390060425,
0.5019141435623169,
0.22715209424495697,
0.03666197136044502,
0.4522866904735565,
-1.0442957878112793,
-0.33936190605163574,
-0.30606609582901,
-0.9001036882400513,
-0.7484419345855713,
-0.383472204208374,
-0.3604254126548767,
1.6156126260757446,
0.06034288555383682,
-0.41398754715919495,
0.04338045045733452,
-0.7125557661056519,
-0.10185110569000244,
-1.1410083770751953,
0.2419857382774353,
-0.16995082795619965,
-0.04735632985830307,
-0.08422376960515976,
1.753894567489624,
-0.9601345062255859,
-2.045726776123047,
0.19130735099315643,
0.272337406873703,
-0.37860798835754395,
0.2527734935283661,
1.6892714500427246,
0.620698094367981,
1.4037264585494995,
1.3038413524627686,
0.9814510345458984,
-0.6402057409286499,
-1.2638225555419922,
0.65315842628479,
0.9997390508651733,
-1.3351868391036987,
0.8268349170684814,
-0.07908663153648376,
-0.5091880559921265,
0.6354676485061646,
1.3408398628234863,
0.413166880607605,
-2.0363569259643555,
0.7979103326797485,
-0.8841347694396973,
0.7594982385635376,
0.6773768663406372,
0.7562679052352905,
0.22010907530784607,
0.8005502223968506,
-1.2706689834594727,
-1.0589041709899902,
-0.7248895168304443,
-0.6083577871322632,
1.9260056018829346,
-0.23492540419101715,
0.5228607654571533,
-0.21395274996757507,
-1.2192705869674683,
-0.08142615109682083,
0.7566512823104858,
0.390226811170578,
-0.440597802400589,
0.8530604839324951,
-0.5983929634094238,
-1.1056060791015625,
-1.2753808498382568,
-0.4181499481201172,
-1.015334129333496,
-0.9066036939620972,
1.0107338428497314,
0.7415440082550049,
0.4449918568134308,
1.9495497941970825,
0.6736648082733154,
0.2753225862979889,
-2.6069047451019287,
0.8858209848403931,
0.31927844882011414,
-0.09741488099098206,
0.9504107236862183,
0.3450799286365509,
1.1092277765274048,
-0.03398888558149338,
0.5969655513763428,
-2.356572151184082,
2.255122661590576,
-0.17806120216846466,
0.6696176528930664,
-0.0013078674674034119,
-0.12410452216863632,
1.050072431564331,
0.6038275957107544,
0.5023910999298096,
-1.1267433166503906,
0.6614234447479248,
-0.5912761688232422,
1.188827395439148,
0.9136983156204224,
-0.8348228931427002,
0.062232017517089844,
1.3408700227737427,
0.489316463470459,
-0.397494375705719,
-0.9565438032150269,
-0.8348815441131592,
0.987143874168396,
1.7150901556015015,
-0.10976152867078781,
0.0962752103805542,
0.8514822721481323,
0.6152448654174805,
-1.326574444770813,
0.015972880646586418,
-0.7068972587585449,
-0.7312930822372437,
1.7394129037857056,
2.121746778488159,
-0.12233196198940277,
-0.18542803823947906,
-0.8166929483413696,
-1.286981463432312,
0.8190320730209351,
-0.03893415629863739,
0.13723628222942352,
0.6408352851867676,
-0.6302006244659424,
1.1720741987228394,
0.7035195827484131,
0.9613769054412842,
0.1380704790353775,
0.35305923223495483,
0.35444504022598267,
-0.3461134731769562,
-1.1645969152450562,
-0.3634463846683502,
-1.099835991859436,
-2.597378730773926,
0.49869564175605774,
-0.19763824343681335,
-1.5222296714782715,
0.045727647840976715,
-1.0577614307403564,
0.8466380834579468,
-0.5849936008453369,
-1.0392024517059326,
-1.4650919437408447,
0.29373419284820557,
-0.11377811431884766,
1.0042698383331299,
-1.590901494026184,
-0.13246658444404602,
1.236034870147705,
0.9223995208740234,
-0.5993292331695557,
0.9429547786712646,
0.2879807651042938,
1.0236316919326782,
0.8347576856613159,
-0.38483723998069763,
0.6472629308700562,
0.0718780979514122,
-1.3081680536270142,
0.3931407928466797,
1.2584867477416992,
0.2407832145690918,
1.455260992050171,
-0.4727413058280945,
0.08551684767007828,
0.39327898621559143,
-0.5084969401359558,
-0.519943356513977,
-0.508687436580658,
0.6130237579345703,
0.12265588343143463,
-1.0772223472595215,
-0.1189931258559227,
-0.11107487231492996,
-0.23998041450977325,
0.26833775639533997,
-1.4105453491210938,
-0.23760735988616943,
-0.4127761423587799,
-0.5027597546577454,
-1.262082815170288,
-0.0023644519969820976,
1.2894262075424194,
-0.7976716756820679,
-0.22625423967838287,
0.43340083956718445,
0.3123607039451599,
0.5369623899459839,
0.5881990194320679,
-0.7524048089981079,
-0.39714011549949646,
-0.32979387044906616,
-0.34400445222854614,
0.32423973083496094,
1.2845627069473267,
-0.05944133922457695,
-1.0461084842681885,
0.6549164056777954,
-0.35619714856147766,
0.15231527388095856,
1.9611567258834839,
0.027315661311149597,
-0.7573287487030029,
0.2006385326385498,
-0.6204670667648315,
1.880399227142334,
1.6633710861206055,
1.242438554763794,
-0.17657732963562012,
-0.933517336845398,
0.6000640392303467,
-0.2990342378616333,
-0.34529563784599304,
0.8304020166397095,
0.33151665329933167,
-0.24616026878356934,
-1.4481419324874878,
0.5894495248794556,
1.3450230360031128,
-0.8300509452819824,
-0.8141516447067261,
0.06894568353891373,
-0.8919596672058105,
1.128697156906128,
0.6718618869781494,
0.3432762026786804,
0.2529333531856537,
1.5922514200210571,
0.829002857208252,
-0.5187059640884399,
0.6021381616592407,
0.44850510358810425,
-0.13347932696342468,
-2.141677141189575,
-1.1092106103897095,
0.31407466530799866,
-0.44441911578178406,
-1.6117024421691895,
1.393657922744751,
-1.127720832824707,
-1.049010992050171,
0.5644198656082153,
0.09163670241832733,
1.3211898803710938,
0.34845027327537537,
1.6481932401657104,
2.0660741329193115,
0.9329080581665039,
0.28830602765083313,
1.2262957096099854,
-0.10245738923549652,
-0.5033670663833618,
1.844314694404602,
-0.42347395420074463,
0.5264288187026978,
1.0750101804733276,
-0.3429914712905884,
-1.057981014251709,
-0.846674919128418,
-1.2760977745056152,
-0.7427338361740112,
1.1823451519012451,
0.07865031063556671,
-1.1535345315933228,
0.25445297360420227,
1.6399259567260742,
0.12511993944644928,
-0.2889169454574585,
0.7408243417739868,
0.3854893147945404,
-0.7938259840011597,
-0.02211897075176239,
-0.9153757095336914,
0.5229920148849487,
-0.10544868558645248,
-0.29845666885375977,
0.2360110729932785,
0.5848908424377441,
1.3640087842941284,
-0.02508840337395668,
0.10901685059070587,
1.2145400047302246,
-1.3703436851501465,
1.5061304569244385,
-0.6525756120681763,
0.27089643478393555,
-2.4201290607452393,
1.40261971950531,
-0.7801889181137085,
1.894200086593628,
-2.559480667114258,
0.41691353917121887,
-0.5316585302352905,
-0.48681384325027466,
0.21443334221839905,
-0.3551377058029175,
0.213084876537323,
-0.1575763076543808,
-1.035083532333374,
-0.11878970265388489,
-0.7435466051101685,
0.5504908561706543,
1.0981580018997192,
1.4462512731552124,
-1.0941699743270874,
-0.24009883403778076,
-1.70150625705719,
-0.10979870706796646,
-0.7394427061080933,
0.2418149709701538,
-1.9215644598007202,
-0.163068488240242,
-1.9787952899932861,
-2.3246395587921143,
-1.3676369190216064,
-0.8240112066268921,
1.045637607574463,
0.13557441532611847,
-0.9039483070373535,
1.1869168281555176,
-0.35358530282974243,
-1.7861673831939697,
1.1184195280075073,
-2.1595630645751953
] |
https://github.com/huggingface/datasets/issues/3341 | Mirror the canonical datasets to the Hugging Face Hub | I created a GitHub project to keep track of what needs to be done:
https://github.com/huggingface/datasets/projects/3
I also store my code in a (private for now) repository at https://github.com/huggingface/mirror_canonical_datasets_on_hub | - [ ] create a repo on https://hf.co/datasets for every canonical dataset
- [ ] on every commit related to a dataset, update the hf.co repo
See https://github.com/huggingface/moon-landing/pull/1562
@SBrandeis: I let you edit this description if needed to precise the intent. | 1,084 | 28 | Mirror the canonical datasets to the Hugging Face Hub
- [ ] create a repo on https://hf.co/datasets for every canonical dataset
- [ ] on every commit related to a dataset, update the hf.co repo
See https://github.com/huggingface/moon-landing/pull/1562
@SBrandeis: I let you edit this description if needed to precise the intent.
I created a GitHub project to keep track of what needs to be done:
https://github.com/huggingface/datasets/projects/3
I also store my code in a (private for now) repository at https://github.com/huggingface/mirror_canonical_datasets_on_hub | [
-1.2234808206558228,
-0.9393758177757263,
-0.9337219595909119,
1.5396134853363037,
-0.07501636445522308,
-1.3104970455169678,
0.06977038830518723,
-1.0454643964767456,
1.5307077169418335,
-0.6371172070503235,
0.2551691234111786,
-1.6707392930984497,
-0.08441343903541565,
-0.5014604926109314,
-0.7872798442840576,
-0.9434849619865417,
-0.3430250287055969,
-0.76760333776474,
1.0004315376281738,
2.4910476207733154,
1.1313062906265259,
-1.4179061651229858,
2.788409948348999,
0.7336106300354004,
-0.17253756523132324,
-1.142876386642456,
0.6529721021652222,
0.12260113656520844,
-1.2086141109466553,
-0.38578104972839355,
-0.9056125283241272,
0.04627528041601181,
-0.5421126484870911,
-0.40714508295059204,
0.10823626071214676,
0.5529434084892273,
-0.09552311152219772,
-0.2671857178211212,
-0.6130465269088745,
-0.661730170249939,
0.46381810307502747,
-0.2578800320625305,
0.8357716202735901,
-0.3691808879375458,
1.789984941482544,
-0.5719208121299744,
0.2706151008605957,
0.627593994140625,
1.370826244354248,
0.16240477561950684,
-0.0021064691245555878,
0.18012091517448425,
0.37981370091438293,
0.042635731399059296,
0.30840784311294556,
1.2938064336776733,
0.5208667516708374,
0.5832160115242004,
0.6701136231422424,
-2.0952494144439697,
1.3795058727264404,
-0.8725840449333191,
0.358364075422287,
1.408715009689331,
-0.9235085844993591,
0.3452180325984955,
-1.7569321393966675,
-0.10278940945863724,
0.5044793486595154,
-2.355790376663208,
0.1989307552576065,
-1.235258936882019,
-0.6457164883613586,
0.9457958936691284,
0.21896547079086304,
-1.247186541557312,
0.27484965324401855,
-0.5864243507385254,
1.0735772848129272,
0.5843986868858337,
1.2276232242584229,
-1.6167782545089722,
0.09445634484291077,
-0.14947102963924408,
0.03348091244697571,
-1.3626484870910645,
-1.5264947414398193,
0.5576842427253723,
0.582182765007019,
0.7800360321998596,
-0.1452917456626892,
0.7744408249855042,
-1.0015981197357178,
0.883042573928833,
-0.7618535161018372,
-1.5463097095489502,
-1.295080542564392,
-2.3388359546661377,
-2.3963747024536133,
0.8724207878112793,
-0.5207129716873169,
-0.4693504571914673,
1.8999621868133545,
-1.0060347318649292,
-1.7929086685180664,
1.0890878438949585,
0.41859790682792664,
0.16370034217834473,
2.453110933303833,
0.2818628251552582,
-0.7381609082221985,
0.5000197291374207,
-0.7588604092597961,
0.9522910118103027,
-0.3834078311920166,
1.4165308475494385,
0.6841370463371277,
-0.9936108589172363,
1.65207839012146,
-0.4312068521976471,
0.5228684544563293,
-0.7526601552963257,
-0.514127254486084,
-0.8514131903648376,
0.3051062822341919,
1.8767518997192383,
-0.379008412361145,
1.6530886888504028,
-0.2671208679676056,
-1.5353275537490845,
-1.5327391624450684,
0.8238498568534851,
0.5845670104026794,
-0.9086843132972717,
0.09967458993196487,
-0.47937852144241333,
-0.039868514984846115,
0.012892823666334152,
1.1055721044540405,
1.2188923358917236,
0.7031306624412537,
-0.33510342240333557,
-0.8385686874389648,
0.20589399337768555,
-0.045102618634700775,
-0.6388040781021118,
-1.8706988096237183,
-0.30144810676574707,
0.36492785811424255,
0.5378320217132568,
-1.2875674962997437,
1.7207268476486206,
0.8828012347221375,
2.0049214363098145,
0.8823626041412354,
-0.3682018518447876,
1.506697177886963,
-0.211037740111351,
1.8575564622879028,
-0.4954608678817749,
0.6452205777168274,
-0.33432313799858093,
-1.1525434255599976,
0.749276876449585,
-0.4418162703514099,
-1.999387264251709,
-0.9282717704772949,
-0.8836472034454346,
-0.1326982080936432,
-0.7435079216957092,
0.9726153016090393,
-0.4115980863571167,
-1.358091115951538,
0.14430168271064758,
-0.6653015613555908,
0.18973638117313385,
-1.2636984586715698,
0.14887692034244537,
0.7945806384086609,
-0.7348455786705017,
-0.15470944344997406,
-0.1500495821237564,
-1.2884626388549805,
-0.5613335967063904,
0.40920010209083557,
1.8848038911819458,
-0.7018659114837646,
1.0024440288543701,
0.9456659555435181,
-0.7450907826423645,
0.17438995838165283,
0.28425902128219604,
-0.3368074297904968,
0.8570986986160278,
-1.0625914335250854,
-0.38904282450675964,
1.1055301427841187,
-0.12019171565771103,
-0.7336722612380981,
1.440016508102417,
0.9520421028137207,
-0.8446706533432007,
-0.3281516134738922,
-0.17813755571842194,
-0.7420165538787842,
-0.11318212002515793,
-1.440416693687439,
-0.138360857963562,
0.15572966635227203,
-1.4464986324310303,
-0.4689711928367615,
-0.28194862604141235,
1.3321062326431274,
-0.33534669876098633,
1.3618426322937012,
-0.19122326374053955,
-0.27129581570625305,
-0.47338443994522095,
-0.5280828475952148,
0.14007151126861572,
-0.2880348861217499,
-0.6252741813659668,
0.260618656873703,
-0.8401789665222168,
0.4266737401485443,
1.479606032371521,
0.44089022278785706,
0.1631590723991394,
0.5439580678939819,
1.1507817506790161,
0.42009633779525757,
-0.11124543845653534,
-0.9227959513664246,
-1.6204631328582764,
1.9868015050888062,
-1.4660308361053467,
1.9683657884597778,
0.8860156536102295,
-0.16659851372241974,
-1.8044899702072144,
-1.8657840490341187,
1.3937839269638062,
1.2872800827026367,
2.4820172786712646,
0.5312129259109497,
0.29964885115623474,
-0.8833855390548706,
-0.7520829439163208,
0.1902216076850891,
-1.018638253211975,
-0.7059197425842285,
0.11519218236207962,
2.290285587310791,
1.8679866790771484,
-0.5634046792984009,
-0.34756845235824585,
-1.1316670179367065,
1.2530161142349243,
-0.14660534262657166,
0.22773706912994385,
1.9964494705200195,
-0.2747921645641327,
-1.0813450813293457,
1.2177311182022095,
-2.321798086166382,
0.10138492286205292,
2.028690814971924,
0.27096155285835266,
0.08705957978963852,
-1.5255870819091797,
-0.6581310629844666,
-0.2968307137489319,
-0.5354928970336914,
-1.2182379961013794,
0.5895079374313354,
-0.2218078374862671,
-0.8961033225059509,
-1.4103145599365234,
0.009977051988244057,
-1.2156553268432617,
-1.7461163997650146,
0.47046685218811035,
1.816390872001648,
2.0628294944763184,
-0.8004691004753113,
1.3921234607696533,
-0.23951321840286255,
0.023435013368725777,
1.2005794048309326,
1.2452003955841064,
3.034470319747925,
1.7481166124343872,
-1.2265021800994873,
0.743756115436554,
-0.1530076265335083,
-0.5459319949150085,
1.1905536651611328,
-0.9584426283836365,
1.2198731899261475,
-0.3038751184940338,
-1.2067078351974487,
-1.339144229888916,
0.9914243221282959,
0.5700781345367432,
0.12007516622543335,
-0.6291813850402832,
1.1727639436721802,
0.05399022251367569,
1.254881739616394,
0.6083849668502808,
-0.4384785592556,
0.5155079960823059,
-0.3467332124710083,
-0.6609209179878235,
1.609148621559143,
0.032123126089572906,
-1.632466435432434,
-2.362595796585083,
-0.23843105137348175,
-0.8345921635627747,
-0.28242775797843933,
-0.6507274508476257,
-1.0634875297546387,
1.6081689596176147,
0.4788944721221924,
-1.2643284797668457,
-0.23970478773117065,
-0.2743465304374695,
-0.5981632471084595,
2.627781391143799,
-1.3124440908432007,
-0.12776713073253632,
-0.8536909818649292,
-0.42252081632614136,
1.6732609272003174,
-1.0812089443206787,
-0.1555342823266983,
-1.0264912843704224,
-0.6488080620765686,
-1.4300304651260376,
-0.5884433388710022,
-0.010318174958229065,
-0.9247685670852661,
0.5892565250396729,
-0.02852225862443447,
-0.9987630248069763,
-0.15026827156543732,
-0.7617179751396179,
1.0561091899871826,
-0.07376250624656677,
0.2412651926279068,
1.9719220399856567,
0.42865806818008423,
-0.30892109870910645,
0.72971510887146,
1.2199755907058716,
0.6058518886566162,
-0.7243426442146301,
0.14412017166614532,
-0.6928985118865967,
0.24194158613681793,
-1.4511544704437256,
0.2046550214290619,
-2.9538462162017822,
0.7269982099533081,
-0.027595581486821175,
-0.20809334516525269,
0.08953052759170532,
-1.3051732778549194,
1.2171485424041748,
2.5900425910949707,
-1.2463802099227905,
0.44677314162254333,
0.3638833463191986,
1.12373948097229,
-1.553758144378662,
0.28071126341819763,
-0.4844619631767273,
2.0500457286834717,
0.13385266065597534,
1.1533788442611694,
-0.5443224906921387,
-1.9772148132324219,
0.49567103385925293,
-1.2396177053451538,
-1.0903400182724,
0.8006731867790222,
-0.9518998861312866,
0.1754883974790573,
-1.4762654304504395,
-0.03253444284200668,
-0.9679701924324036,
-1.3161396980285645,
0.7989240288734436,
0.10672582685947418,
0.4533817768096924,
-0.5988501906394958,
0.42573100328445435,
-2.2016496658325195,
-1.3619664907455444,
-0.15039978921413422,
-1.043623447418213,
0.5387721657752991,
-0.3708612322807312,
0.6055287718772888,
-0.057668767869472504,
0.12049010396003723,
0.3060333728790283,
1.3997917175292969,
3.399120569229126,
0.24446426331996918,
0.3077070713043213,
-0.02449600212275982,
-0.975023627281189,
1.5701130628585815,
1.0830543041229248,
-0.013611040078103542,
-0.5482114553451538,
-0.8540541529655457,
1.3836437463760376,
1.958338737487793,
1.1793526411056519,
0.17868396639823914,
-0.8816813230514526,
-0.6891778111457825,
0.0027462104335427284,
0.17412900924682617,
0.4287497103214264,
0.9902299642562866,
-0.12936407327651978,
0.09401090443134308,
1.4185467958450317,
1.300866961479187,
-0.40398475527763367,
0.5521535873413086,
-0.9936501979827881,
-0.34516289830207825,
0.43386879563331604,
0.2674638330936432,
-0.009327308274805546,
0.6559025645256042,
-1.1534225940704346,
-0.3363369405269623,
-0.3931516706943512,
-0.9966773390769958,
-0.7005257606506348,
-0.44944214820861816,
-0.44497719407081604,
1.5460729598999023,
-0.00966464914381504,
-0.42278218269348145,
0.14781370759010315,
-0.8533031940460205,
-0.21444910764694214,
-1.068745732307434,
0.28248924016952515,
-0.16012795269489288,
0.02621130459010601,
-0.1148567944765091,
1.6699087619781494,
-1.0095949172973633,
-2.266122341156006,
0.21090398728847504,
0.2962746024131775,
-0.44816821813583374,
0.11333894729614258,
1.701302409172058,
0.43394139409065247,
1.371842861175537,
1.234139084815979,
0.9994864463806152,
-0.6116735935211182,
-1.2317683696746826,
0.6693877577781677,
0.93513023853302,
-1.3024793863296509,
0.9972319602966309,
-0.25550681352615356,
-0.5298457145690918,
0.7999919652938843,
1.1903640031814575,
0.32932916283607483,
-1.964390754699707,
0.8130691051483154,
-0.763897716999054,
0.7688391804695129,
0.5465314984321594,
0.7818688154220581,
0.21336692571640015,
0.8453552722930908,
-1.189191222190857,
-1.0775611400604248,
-0.8645525574684143,
-0.6406935453414917,
1.879427194595337,
-0.16803863644599915,
0.535503625869751,
-0.20056432485580444,
-1.1412416696548462,
-0.16517595946788788,
0.7858726978302002,
0.4065597355365753,
-0.41182368993759155,
1.0003265142440796,
-0.6072014570236206,
-0.9800730347633362,
-1.2912726402282715,
-0.3916754722595215,
-0.8251379132270813,
-0.8880593776702881,
1.031852126121521,
0.7996598482131958,
0.3543614149093628,
1.9316835403442383,
0.5519669055938721,
0.2819964289665222,
-2.669049024581909,
0.9147608280181885,
0.34692415595054626,
0.07768800854682922,
0.8889328837394714,
0.3440186083316803,
1.1895283460617065,
-0.07202044874429703,
0.521644115447998,
-2.2485508918762207,
2.115432024002075,
-0.12464643269777298,
0.5263181924819946,
0.03498721867799759,
-0.25625064969062805,
1.1726882457733154,
0.5265012383460999,
0.6502209901809692,
-1.2546969652175903,
0.7122344970703125,
-0.5409345030784607,
1.0585228204727173,
0.9284143447875977,
-0.8588293790817261,
0.025101641193032265,
1.4079443216323853,
0.5929207801818848,
-0.3058042526245117,
-0.9438466429710388,
-0.6665616035461426,
0.9942053556442261,
1.6194267272949219,
-0.02054723910987377,
0.08340442925691605,
0.9245824813842773,
0.5574907064437866,
-1.4382174015045166,
0.006725892424583435,
-0.7635109424591064,
-0.6663056015968323,
1.788488745689392,
2.022691249847412,
-0.03629012405872345,
-0.14481347799301147,
-0.8017983436584473,
-1.2655028104782104,
0.6461911797523499,
-0.08118768036365509,
0.12398768961429596,
0.6928653120994568,
-0.6984668970108032,
1.1636625528335571,
0.7089986801147461,
0.9359356164932251,
-0.08561224490404129,
0.37817493081092834,
0.37124118208885193,
-0.2696126699447632,
-1.2486741542816162,
-0.4468303918838501,
-1.0890344381332397,
-2.466928243637085,
0.3644513189792633,
-0.3493940830230713,
-1.4402666091918945,
0.050859928131103516,
-1.0788326263427734,
0.9065307974815369,
-0.682306706905365,
-0.9230487942695618,
-1.4560377597808838,
0.34929466247558594,
-0.3136086165904999,
0.8686189651489258,
-1.561030626296997,
-0.08496224880218506,
1.2941439151763916,
0.7540789246559143,
-0.6499393582344055,
1.0459030866622925,
0.27667513489723206,
1.066922903060913,
0.7813935279846191,
-0.4642229676246643,
0.4599578380584717,
0.18227103352546692,
-1.4897772073745728,
0.3994351625442505,
1.1124123334884644,
0.25785499811172485,
1.305554986000061,
-0.49444806575775146,
0.0951324999332428,
0.5641369223594666,
-0.5788812041282654,
-0.47105473279953003,
-0.4827319085597992,
0.7276453971862793,
0.022225143387913704,
-1.1063917875289917,
0.09280548244714737,
-0.17337661981582642,
-0.31902360916137695,
0.3381383419036865,
-1.5504382848739624,
-0.455350399017334,
-0.34687578678131104,
-0.48817962408065796,
-1.3018484115600586,
0.2505849599838257,
1.2364808320999146,
-0.8421195149421692,
-0.2378968745470047,
0.5064358115196228,
0.40941059589385986,
0.5298536419868469,
0.670158863067627,
-0.7585956454277039,
-0.24729767441749573,
-0.32438474893569946,
-0.40086042881011963,
0.23182342946529388,
1.1792888641357422,
-0.21269534528255463,
-0.9674793481826782,
0.759022057056427,
-0.385863333940506,
0.09916792064905167,
2.0524115562438965,
0.01357324793934822,
-0.8105741143226624,
0.35658392310142517,
-0.5702971816062927,
1.844555139541626,
1.6547666788101196,
1.4209723472595215,
-0.19791358709335327,
-0.6798787117004395,
0.558185338973999,
-0.095352903008461,
-0.27497148513793945,
0.9211754202842712,
0.5232735872268677,
-0.07833821326494217,
-1.4927247762680054,
0.42824846506118774,
1.3290454149246216,
-0.9794347882270813,
-0.7763694524765015,
0.08008706569671631,
-0.9091755151748657,
1.2299355268478394,
0.7668043375015259,
0.3955247700214386,
0.3315703868865967,
1.522051215171814,
0.6352710723876953,
-0.45107996463775635,
0.4231742024421692,
0.5270277857780457,
-0.12163316458463669,
-2.033142566680908,
-0.9299388527870178,
0.3063107430934906,
-0.31445565819740295,
-1.5248712301254272,
1.1712602376937866,
-1.1635558605194092,
-0.9408316016197205,
0.5450369119644165,
0.08080078661441803,
1.39340078830719,
0.26530128717422485,
1.7279894351959229,
2.0632166862487793,
0.8420133590698242,
0.1907951533794403,
1.3344942331314087,
-0.022036109119653702,
-0.3934827446937561,
1.7697410583496094,
-0.40334972739219666,
0.6592459678649902,
0.9788118004798889,
-0.474362850189209,
-1.0858628749847412,
-0.8471459150314331,
-1.1560685634613037,
-0.5908940434455872,
1.2171326875686646,
0.23867715895175934,
-1.1262961626052856,
0.17664562165737152,
1.5235172510147095,
0.15101206302642822,
-0.20841048657894135,
0.6992620825767517,
0.4230794906616211,
-0.6412816047668457,
-0.042242735624313354,
-0.8474611639976501,
0.536324143409729,
-0.10486217588186264,
-0.281465619802475,
0.3563595414161682,
0.41371676325798035,
1.124686360359192,
-0.04520793259143829,
0.11232598125934601,
1.220070719718933,
-1.3075262308120728,
1.5290087461471558,
-0.5861071348190308,
0.3200540542602539,
-2.433215379714966,
1.4250702857971191,
-0.7501375675201416,
1.8551841974258423,
-2.621870517730713,
0.3846469223499298,
-0.5845523476600647,
-0.5486636757850647,
0.2935907542705536,
-0.4754457473754883,
0.10556229203939438,
-0.18337464332580566,
-0.9331345558166504,
-0.00885726884007454,
-0.8200699090957642,
0.5680294632911682,
1.2219961881637573,
1.2733166217803955,
-1.0009212493896484,
-0.33919841051101685,
-1.7858182191848755,
-0.2660897970199585,
-0.7171794772148132,
0.2993793189525604,
-2.103057384490967,
-0.14753134548664093,
-1.956117033958435,
-2.426619052886963,
-1.4051473140716553,
-0.8384612798690796,
1.0833395719528198,
0.26887214183807373,
-0.8894791007041931,
1.0936049222946167,
-0.4489385187625885,
-1.7548998594284058,
1.049589991569519,
-2.199089288711548
] |
https://github.com/huggingface/datasets/issues/3341 | Mirror the canonical datasets to the Hugging Face Hub | I understand that the datasets are mirrored on the Hub now, right? Might I close @lhoestq @SBrandeis? | - [ ] create a repo on https://hf.co/datasets for every canonical dataset
- [ ] on every commit related to a dataset, update the hf.co repo
See https://github.com/huggingface/moon-landing/pull/1562
@SBrandeis: I let you edit this description if needed to precise the intent. | 1,084 | 17 | Mirror the canonical datasets to the Hugging Face Hub
- [ ] create a repo on https://hf.co/datasets for every canonical dataset
- [ ] on every commit related to a dataset, update the hf.co repo
See https://github.com/huggingface/moon-landing/pull/1562
@SBrandeis: I let you edit this description if needed to precise the intent.
I understand that the datasets are mirrored on the Hub now, right? Might I close @lhoestq @SBrandeis? | [
-1.3025379180908203,
-0.8275228142738342,
-0.9772807955741882,
1.4379774332046509,
-0.21456097066402435,
-1.2096914052963257,
0.10654651373624802,
-1.148727297782898,
1.626605749130249,
-0.7000035047531128,
0.18660935759544373,
-1.6471987962722778,
-0.10530515760183334,
-0.4362747073173523,
-0.7457636594772339,
-0.9438817501068115,
-0.42349112033843994,
-0.7458581328392029,
0.9961791634559631,
2.5043773651123047,
1.09140944480896,
-1.3574309349060059,
2.808793544769287,
0.7708150744438171,
-0.1286976933479309,
-1.0840257406234741,
0.5626829266548157,
0.10400068014860153,
-1.1980711221694946,
-0.3453708589076996,
-1.112388253211975,
-0.02179504930973053,
-0.5575211644172668,
-0.4524326026439667,
0.10870008170604706,
0.40899956226348877,
-0.12133553624153137,
-0.30758485198020935,
-0.5494605898857117,
-0.5821005702018738,
0.4802139103412628,
-0.26045504212379456,
0.8582583665847778,
-0.353585809469223,
1.91400146484375,
-0.5513439774513245,
0.29904434084892273,
0.6915319561958313,
1.2960599660873413,
0.22141598165035248,
-0.04272697865962982,
0.2424163520336151,
0.3997920751571655,
-0.028788212686777115,
0.30792903900146484,
1.2509855031967163,
0.4374983608722687,
0.6212864518165588,
0.7145939469337463,
-2.169537305831909,
1.3614132404327393,
-0.9777485728263855,
0.3971097767353058,
1.5344687700271606,
-1.0501625537872314,
0.3439381718635559,
-1.7550604343414307,
-0.015151487663388252,
0.4808632731437683,
-2.3300058841705322,
0.13449573516845703,
-1.1204380989074707,
-0.6942398548126221,
0.9677476286888123,
0.3363940119743347,
-1.2916483879089355,
0.22504067420959473,
-0.49620354175567627,
1.032630443572998,
0.574799656867981,
1.2943118810653687,
-1.7108120918273926,
0.1583631932735443,
-0.31099167466163635,
0.07873570919036865,
-1.4363279342651367,
-1.4773240089416504,
0.5954234600067139,
0.5267645716667175,
0.6434653401374817,
-0.11379092931747437,
0.7164774537086487,
-0.9192799925804138,
0.8628590106964111,
-0.7610343098640442,
-1.5236259698867798,
-1.3066247701644897,
-2.346219778060913,
-2.307798385620117,
0.8787814378738403,
-0.4967556893825531,
-0.5929944515228271,
1.929201602935791,
-1.0890729427337646,
-1.779516577720642,
1.2116894721984863,
0.41311585903167725,
0.11747825145721436,
2.5216147899627686,
0.34813791513442993,
-0.7167986631393433,
0.5099570751190186,
-0.780105710029602,
0.9322208166122437,
-0.357719749212265,
1.400628685951233,
0.5949878096580505,
-0.9325618743896484,
1.678490400314331,
-0.39959830045700073,
0.5833187103271484,
-0.7433604001998901,
-0.5663231611251831,
-0.8638745546340942,
0.32566675543785095,
1.9200752973556519,
-0.3381156623363495,
1.654436469078064,
-0.31744498014450073,
-1.5204455852508545,
-1.586135745048523,
0.8719514608383179,
0.6393546462059021,
-0.9007282257080078,
0.14804862439632416,
-0.3755778670310974,
-0.05319808050990105,
0.050377584993839264,
1.0926331281661987,
1.3032259941101074,
0.7157490849494934,
-0.2609320282936096,
-0.8689770102500916,
0.1584683358669281,
-0.03617458790540695,
-0.7213098406791687,
-1.7381234169006348,
-0.3094892203807831,
0.14321984350681305,
0.594904363155365,
-1.305067777633667,
1.714664340019226,
0.8773711919784546,
1.9030840396881104,
0.9376641511917114,
-0.3381149172782898,
1.4881701469421387,
-0.11565770208835602,
1.8105770349502563,
-0.47266921401023865,
0.6568156480789185,
-0.4266776442527771,
-1.189758062362671,
0.7242183089256287,
-0.4237814247608185,
-2.0132253170013428,
-0.9436818361282349,
-0.9588558673858643,
-0.1747385561466217,
-0.7162845134735107,
0.9686575531959534,
-0.35749706625938416,
-1.3419299125671387,
0.15829363465309143,
-0.5707328915596008,
0.12357579171657562,
-1.3533445596694946,
0.2859055995941162,
0.7968049049377441,
-0.7031399011611938,
-0.15882830321788788,
-0.14759455621242523,
-1.3051968812942505,
-0.5079997777938843,
0.2950745224952698,
1.823765754699707,
-0.7608286738395691,
0.9910888671875,
0.9183222651481628,
-0.7732045650482178,
0.09040867537260056,
0.3377372622489929,
-0.2639729082584381,
0.9065222144126892,
-1.0328519344329834,
-0.4128156900405884,
1.0747907161712646,
-0.1262182593345642,
-0.6482244729995728,
1.3732918500900269,
0.8384439945220947,
-0.9060734510421753,
-0.2950155436992645,
-0.24973028898239136,
-0.8119947910308838,
-0.14642637968063354,
-1.4082939624786377,
-0.1619606912136078,
0.04892931133508682,
-1.4565356969833374,
-0.5625584125518799,
-0.2776159942150116,
1.3737821578979492,
-0.28803861141204834,
1.3895089626312256,
-0.2228388488292694,
-0.288066565990448,
-0.4499797523021698,
-0.5064846277236938,
0.16896355152130127,
-0.27459806203842163,
-0.5258796215057373,
0.3036920726299286,
-0.8275105953216553,
0.3578799366950989,
1.4685921669006348,
0.4256317615509033,
0.16217085719108582,
0.6353974938392639,
1.0902518033981323,
0.4218456447124481,
-0.09989665448665619,
-0.9629372358322144,
-1.5807278156280518,
1.9139955043792725,
-1.5263921022415161,
1.9635710716247559,
0.8076884746551514,
-0.16464298963546753,
-1.7776638269424438,
-1.9286644458770752,
1.4849388599395752,
1.3853192329406738,
2.3048744201660156,
0.5547985434532166,
0.3445379436016083,
-0.7918336391448975,
-0.7345309257507324,
0.24229168891906738,
-0.9888458251953125,
-0.7163344025611877,
0.13539937138557434,
2.2332305908203125,
1.7033599615097046,
-0.5794178247451782,
-0.2978801429271698,
-1.103703260421753,
1.1894705295562744,
-0.09313058108091354,
0.18656402826309204,
1.900999903678894,
-0.3829319179058075,
-1.158165454864502,
1.1811974048614502,
-2.3198466300964355,
0.0024861106649041176,
2.010343313217163,
0.26412105560302734,
0.09663719683885574,
-1.4935897588729858,
-0.7211901545524597,
-0.12200459092855453,
-0.5924227833747864,
-1.3133699893951416,
0.5917308330535889,
-0.2993484437465668,
-0.8109704852104187,
-1.400808572769165,
-0.02432141825556755,
-1.1578843593597412,
-1.5907564163208008,
0.3287769854068756,
1.8865907192230225,
2.0090036392211914,
-0.8731226921081543,
1.3832824230194092,
-0.18762800097465515,
0.028286296874284744,
1.1815872192382812,
1.17554771900177,
3.009812831878662,
1.8492867946624756,
-1.2204139232635498,
0.7476468682289124,
-0.10369890928268433,
-0.5523080229759216,
1.1820039749145508,
-0.9568962454795837,
1.277730107307434,
-0.15747074782848358,
-1.1899384260177612,
-1.3106738328933716,
0.8502902984619141,
0.5150474905967712,
0.08627282828092575,
-0.5775119662284851,
1.24034583568573,
0.0407094806432724,
1.2562075853347778,
0.5567525625228882,
-0.42479273676872253,
0.5712546110153198,
-0.4646708071231842,
-0.6462360620498657,
1.6149922609329224,
0.0797412246465683,
-1.5078024864196777,
-2.375112771987915,
-0.2084139734506607,
-0.8192163109779358,
-0.2085200846195221,
-0.6483625769615173,
-1.033354640007019,
1.622365951538086,
0.5572397708892822,
-1.1273869276046753,
-0.18770018219947815,
-0.4086376428604126,
-0.5866941213607788,
2.644625663757324,
-1.3994735479354858,
-0.22212928533554077,
-0.7517380118370056,
-0.49359604716300964,
1.636699914932251,
-1.0978933572769165,
-0.07593235373497009,
-1.074808955192566,
-0.5821461081504822,
-1.4168751239776611,
-0.6024320721626282,
0.031846825033426285,
-0.9303193688392639,
0.6383224129676819,
0.0180278979241848,
-1.0504791736602783,
-0.15002749860286713,
-0.7116684913635254,
0.9269677400588989,
-0.019647914916276932,
0.22843755781650543,
2.0036263465881348,
0.3001640737056732,
-0.4204772412776947,
0.6773824691772461,
1.3077716827392578,
0.5918959975242615,
-0.6764563918113708,
0.19344757497310638,
-0.687847912311554,
0.31178972125053406,
-1.3320103883743286,
0.1795412302017212,
-2.920192241668701,
0.6655049324035645,
-0.03372589871287346,
-0.22864079475402832,
0.06654933094978333,
-1.3804649114608765,
1.1238903999328613,
2.586061954498291,
-1.1674240827560425,
0.4597932696342468,
0.334199994802475,
1.2387151718139648,
-1.4779466390609741,
0.25677618384361267,
-0.6360449194908142,
2.0277152061462402,
0.20046381652355194,
1.0603866577148438,
-0.5045563578605652,
-2.019054889678955,
0.44280028343200684,
-1.2320305109024048,
-1.176866054534912,
0.7943509221076965,
-0.8659811615943909,
0.13633215427398682,
-1.4419279098510742,
-0.016486339271068573,
-0.9351677894592285,
-1.2798755168914795,
0.7468811869621277,
0.22487451136112213,
0.6172850728034973,
-0.6594077944755554,
0.40112510323524475,
-2.271322250366211,
-1.3439149856567383,
-0.12652488052845,
-0.9870629906654358,
0.5127745270729065,
-0.32786354422569275,
0.6778298616409302,
-0.18571580946445465,
0.1288253664970398,
0.3512127995491028,
1.357487678527832,
3.417725086212158,
0.19716371595859528,
0.3708208501338959,
-0.12389730662107468,
-0.9468116760253906,
1.662947416305542,
1.2253600358963013,
0.0058050621300935745,
-0.6292938590049744,
-0.9650546312332153,
1.2732025384902954,
1.9172154664993286,
1.1468313932418823,
0.15454308688640594,
-0.8578838109970093,
-0.4985436797142029,
0.02753477171063423,
0.17755940556526184,
0.3259335458278656,
1.0139635801315308,
-0.06691574305295944,
0.11103056371212006,
1.4018163681030273,
1.2610950469970703,
-0.5004746317863464,
0.599607527256012,
-0.9294940233230591,
-0.39848795533180237,
0.45684733986854553,
0.4238887131214142,
-0.026324227452278137,
0.5566948056221008,
-1.0451592206954956,
-0.33782610297203064,
-0.26147380471229553,
-1.0392651557922363,
-0.6724511384963989,
-0.3576747477054596,
-0.4723163843154907,
1.6423701047897339,
0.030214209109544754,
-0.48567530512809753,
0.08918347209692001,
-0.893962562084198,
-0.19213655591011047,
-1.0760928392410278,
0.30933263897895813,
-0.1931878924369812,
0.04207928851246834,
-0.14871490001678467,
1.7647881507873535,
-0.9887669682502747,
-2.2408955097198486,
0.17342397570610046,
0.3467409312725067,
-0.3565969169139862,
0.13690413534641266,
1.6105128526687622,
0.4379609525203705,
1.5092324018478394,
1.3016890287399292,
0.9758923649787903,
-0.6044169664382935,
-1.3284751176834106,
0.6608402132987976,
0.9347121715545654,
-1.373205542564392,
0.9238942265510559,
-0.14640402793884277,
-0.5420016646385193,
0.6353970170021057,
1.1741368770599365,
0.3136218190193176,
-1.9439765214920044,
0.8669211268424988,
-0.8440440893173218,
0.7814372777938843,
0.5298573970794678,
0.8416632413864136,
0.22346408665180206,
0.8707689642906189,
-1.0753211975097656,
-1.1541943550109863,
-0.8991461992263794,
-0.6377852559089661,
1.986631155014038,
-0.23695974051952362,
0.6534315943717957,
-0.35704997181892395,
-1.1072907447814941,
-0.07785981893539429,
0.6738041043281555,
0.3636537492275238,
-0.31977319717407227,
0.8987249135971069,
-0.6436986327171326,
-1.089889407157898,
-1.3750125169754028,
-0.4077577590942383,
-0.9147887229919434,
-0.7896832227706909,
1.0794475078582764,
0.7716873288154602,
0.3323154151439667,
1.931624174118042,
0.49978765845298767,
0.2720740735530853,
-2.667465925216675,
0.940649151802063,
0.3932928442955017,
0.05771200358867645,
0.8073843717575073,
0.3667744994163513,
1.2094690799713135,
-0.07835017144680023,
0.5682775974273682,
-2.261223554611206,
2.1947810649871826,
-0.1521943062543869,
0.6860610842704773,
0.026650983840227127,
-0.1536673605442047,
1.0883418321609497,
0.6699264645576477,
0.5905428528785706,
-1.1709433794021606,
0.6115520000457764,
-0.6240318417549133,
1.1481071710586548,
1.0668178796768188,
-0.7796313762664795,
0.012518364004790783,
1.3571093082427979,
0.6133303642272949,
-0.28743040561676025,
-0.9020320177078247,
-0.6704862713813782,
0.9978993535041809,
1.609139084815979,
-0.08083602786064148,
0.18533480167388916,
0.8816448450088501,
0.5472205281257629,
-1.394523024559021,
0.03578757867217064,
-0.8849392533302307,
-0.8409771919250488,
1.6999337673187256,
2.0774426460266113,
-0.019347522407770157,
-0.02314959093928337,
-0.7305635213851929,
-1.3973368406295776,
0.7096145153045654,
-0.015853386372327805,
0.20271657407283783,
0.6242774724960327,
-0.6216613054275513,
1.2020134925842285,
0.7374886274337769,
0.8872942924499512,
0.062011055648326874,
0.35372060537338257,
0.34583771228790283,
-0.20102764666080475,
-1.1849151849746704,
-0.3047868013381958,
-0.9921337962150574,
-2.49013090133667,
0.40111982822418213,
-0.36430543661117554,
-1.433088779449463,
0.06652044504880905,
-1.0093488693237305,
0.8775049448013306,
-0.615456759929657,
-0.9629178047180176,
-1.55190908908844,
0.2815099358558655,
-0.21455208957195282,
0.8682610988616943,
-1.6018208265304565,
-0.07641476392745972,
1.292688250541687,
0.8242359757423401,
-0.7394130825996399,
1.147424578666687,
0.35272955894470215,
1.0131314992904663,
0.7899543046951294,
-0.4642145037651062,
0.39210426807403564,
0.14054325222969055,
-1.4831080436706543,
0.4967484772205353,
1.1500415802001953,
0.2364848256111145,
1.4046229124069214,
-0.4926304817199707,
0.044091206043958664,
0.6410874128341675,
-0.45704710483551025,
-0.5122807025909424,
-0.594538152217865,
0.6495471596717834,
0.12532080709934235,
-0.9651769399642944,
0.07002057135105133,
-0.08291861414909363,
-0.3264005184173584,
0.2871847450733185,
-1.4362967014312744,
-0.3216056227684021,
-0.4541507065296173,
-0.42278796434402466,
-1.3344324827194214,
0.14429646730422974,
1.1854573488235474,
-0.8378108739852905,
-0.12767328321933746,
0.5107808113098145,
0.468898743391037,
0.49493542313575745,
0.6350149512290955,
-0.7431298494338989,
-0.22258226573467255,
-0.29420045018196106,
-0.46238207817077637,
0.2316088229417801,
1.2394678592681885,
-0.29696542024612427,
-0.9929459095001221,
0.6715906262397766,
-0.25692301988601685,
0.001587490551173687,
1.972429871559143,
0.015151633881032467,
-0.76166170835495,
0.27659162878990173,
-0.5560189485549927,
1.8921211957931519,
1.6104973554611206,
1.4019759893417358,
-0.21148307621479034,
-0.7760591506958008,
0.5512089729309082,
-0.13581115007400513,
-0.31770434975624084,
0.8863928318023682,
0.4632822573184967,
-0.12731163203716278,
-1.5116881132125854,
0.4360836446285248,
1.3697601556777954,
-0.9439899921417236,
-0.6897006034851074,
-0.0063378941267728806,
-0.8115960359573364,
1.1120564937591553,
0.7830713987350464,
0.3729211688041687,
0.29135170578956604,
1.604812741279602,
0.6579037308692932,
-0.569968581199646,
0.5025748610496521,
0.5359299778938293,
-0.012984619475901127,
-2.073312759399414,
-1.007748007774353,
0.3470892608165741,
-0.35542190074920654,
-1.5017995834350586,
1.2722272872924805,
-1.0766245126724243,
-0.9969267845153809,
0.5314149260520935,
0.06169653683900833,
1.3792067766189575,
0.21662145853042603,
1.6967171430587769,
2.0553905963897705,
0.8121801614761353,
0.26581570506095886,
1.3669896125793457,
-0.07573264837265015,
-0.3167301118373871,
1.7669601440429688,
-0.4329898953437805,
0.6027454733848572,
1.0774922370910645,
-0.4109021723270416,
-1.0142287015914917,
-0.8755294680595398,
-1.1938296556472778,
-0.7030450105667114,
1.176985502243042,
0.16456471383571625,
-1.0918433666229248,
0.18781910836696625,
1.5563364028930664,
0.1386163979768753,
-0.3103920817375183,
0.7003907561302185,
0.5406299233436584,
-0.6954311728477478,
-0.048835303634405136,
-0.9408991932868958,
0.5084499716758728,
-0.1720893830060959,
-0.43879929184913635,
0.3670501112937927,
0.4425179660320282,
1.1410894393920898,
-0.09982087463140488,
0.14003555476665497,
1.2352268695831299,
-1.374212622642517,
1.5076886415481567,
-0.6703291535377502,
0.3082803785800934,
-2.4517087936401367,
1.4247770309448242,
-0.6955832242965698,
1.8427839279174805,
-2.666837215423584,
0.3725753724575043,
-0.5366921424865723,
-0.5108224153518677,
0.37776944041252136,
-0.4306591749191284,
0.09740220755338669,
-0.1680055856704712,
-0.9978201389312744,
-0.029701411724090576,
-0.7703087329864502,
0.5286434888839722,
1.0797531604766846,
1.2178122997283936,
-0.9784287214279175,
-0.3545462489128113,
-1.714940071105957,
-0.21454595029354095,
-0.6271931529045105,
0.3190937340259552,
-2.174132823944092,
-0.21063832938671112,
-1.99717378616333,
-2.4669744968414307,
-1.4012799263000488,
-0.8698726892471313,
1.221099853515625,
0.14286397397518158,
-0.9748589992523193,
1.142138957977295,
-0.4063880145549774,
-1.8678988218307495,
1.069932222366333,
-2.156384229660034
] |
https://github.com/huggingface/datasets/issues/3339 | to_tf_dataset fails on TPU | This might be related to https://github.com/tensorflow/tensorflow/issues/38762 , what do you think @Rocketknight1 ?
> Dataset.from_generator is expected to not work with TPUs as it uses py_function underneath which is incompatible with Cloud TPU 2VM setup. If you would like to read from large datasets, maybe try to materialize it on disk and use TFRecordDataest instead. | Using `to_tf_dataset` to create a dataset and then putting it in `model.fit` results in an internal error on TPUs. I've only tried on Colab and Kaggle TPUs, not GCP TPUs.
## Steps to reproduce the bug
I made a colab to show the error. https://colab.research.google.com/drive/12x_PFKzGouFxqD4OuWfnycW_1TaT276z?usp=sharing
## Expected results
dataset from `to_tf_dataset` works in `model.fit`
Right below the first error in the colab I use `tf.data.Dataset.from_tensor_slices` and `model.fit` works just fine. This is the desired outcome.
## Actual results
```
InternalError: 5 root error(s) found.
(0) INTERNAL: {{function_node __inference_train_function_30558}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1638231897.932218653","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":3151,"referenced_errors":[{"created":"@1638231897.932216754","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/lib/transport/error_utils.cc","file_line":161,"grpc_status":14}]}
[[{{node StatefulPartitionedCall}}]]
[[MultiDeviceIteratorGetNextFromShard]]
Executing non-communication op <MultiDeviceIteratorGetNextFromShard> originally returned UnavailableError, and was replaced by InternalError to avoid invoking TF network error handling logic.
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
[[tpu_compile_succeeded_assert/_14023832043698465348/_7/_439]]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
- Tensorflow 2.7.0
- `transformers` 4.12.5
| 1,085 | 55 | to_tf_dataset fails on TPU
Using `to_tf_dataset` to create a dataset and then putting it in `model.fit` results in an internal error on TPUs. I've only tried on Colab and Kaggle TPUs, not GCP TPUs.
## Steps to reproduce the bug
I made a colab to show the error. https://colab.research.google.com/drive/12x_PFKzGouFxqD4OuWfnycW_1TaT276z?usp=sharing
## Expected results
dataset from `to_tf_dataset` works in `model.fit`
Right below the first error in the colab I use `tf.data.Dataset.from_tensor_slices` and `model.fit` works just fine. This is the desired outcome.
## Actual results
```
InternalError: 5 root error(s) found.
(0) INTERNAL: {{function_node __inference_train_function_30558}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1638231897.932218653","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":3151,"referenced_errors":[{"created":"@1638231897.932216754","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/lib/transport/error_utils.cc","file_line":161,"grpc_status":14}]}
[[{{node StatefulPartitionedCall}}]]
[[MultiDeviceIteratorGetNextFromShard]]
Executing non-communication op <MultiDeviceIteratorGetNextFromShard> originally returned UnavailableError, and was replaced by InternalError to avoid invoking TF network error handling logic.
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
[[tpu_compile_succeeded_assert/_14023832043698465348/_7/_439]]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
- Tensorflow 2.7.0
- `transformers` 4.12.5
This might be related to https://github.com/tensorflow/tensorflow/issues/38762 , what do you think @Rocketknight1 ?
> Dataset.from_generator is expected to not work with TPUs as it uses py_function underneath which is incompatible with Cloud TPU 2VM setup. If you would like to read from large datasets, maybe try to materialize it on disk and use TFRecordDataest instead. | [
-1.131717562675476,
-0.8647029995918274,
-0.7913092374801636,
1.4688361883163452,
-0.18822292983531952,
-1.178057074546814,
0.12010521441698074,
-1.1463617086410522,
1.6243765354156494,
-0.7230189442634583,
0.3650436997413635,
-1.5976568460464478,
-0.014607887715101242,
-0.6160143613815308,
-0.6844227313995361,
-0.8723000288009644,
-0.34358495473861694,
-0.7493428587913513,
1.0780318975448608,
2.489741325378418,
1.2951431274414062,
-1.3710788488388062,
2.6952781677246094,
0.706047534942627,
-0.20368537306785583,
-0.9428321719169617,
0.5114513635635376,
0.050391413271427155,
-1.2815905809402466,
-0.4703165888786316,
-0.9018113613128662,
-0.1243654415011406,
-0.5482569336891174,
-0.4533376693725586,
-0.033208027482032776,
0.38707125186920166,
-0.32856157422065735,
-0.38588160276412964,
-0.6851985454559326,
-0.854502260684967,
0.4471565783023834,
-0.3617728650569916,
0.9897469878196716,
-0.3386920690536499,
1.7680976390838623,
-0.612960159778595,
0.4508027136325836,
0.782386064529419,
1.2389838695526123,
0.26857101917266846,
0.1122729554772377,
0.2650202810764313,
0.42771103978157043,
-0.056852422654628754,
0.539306104183197,
1.1307010650634766,
0.5861976742744446,
0.5214131474494934,
0.7567503452301025,
-2.2016706466674805,
1.2278748750686646,
-1.0487732887268066,
0.1832570731639862,
1.3675754070281982,
-0.8319524526596069,
0.3471699655056,
-1.7946778535842896,
-0.054365597665309906,
0.6239640116691589,
-2.249744176864624,
0.3854021430015564,
-1.3326407670974731,
-0.6232007741928101,
0.9499099850654602,
0.35798147320747375,
-1.1408894062042236,
0.17718102037906647,
-0.45804375410079956,
0.9788802266120911,
0.38289517164230347,
1.0698578357696533,
-1.6902134418487549,
-0.1101049855351448,
-0.25042518973350525,
0.07483114302158356,
-1.304215431213379,
-1.5094068050384521,
0.560919463634491,
0.5566526651382446,
0.5296890139579773,
-0.040193334221839905,
1.0332735776901245,
-1.0784722566604614,
0.7803454399108887,
-1.0157816410064697,
-1.658644199371338,
-1.463940143585205,
-2.2435309886932373,
-2.210935592651367,
0.7571578621864319,
-0.46254393458366394,
-0.5080819725990295,
2.0414817333221436,
-0.9183347225189209,
-1.7118488550186157,
1.1440147161483765,
0.3221372067928314,
0.02806415595114231,
2.3826498985290527,
0.20429223775863647,
-0.6922142505645752,
0.48466309905052185,
-0.7813135385513306,
0.78876793384552,
-0.320614755153656,
1.331502914428711,
0.4314808249473572,
-0.9658343195915222,
1.599643349647522,
-0.3965408205986023,
0.633204460144043,
-0.6826959252357483,
-0.5402647852897644,
-0.6781445145606995,
0.28040510416030884,
1.8895198106765747,
-0.311710000038147,
1.5615394115447998,
-0.22979602217674255,
-1.5321787595748901,
-1.5532513856887817,
0.8825275301933289,
0.5019526481628418,
-0.8030576705932617,
-0.0009896215051412582,
-0.3727048337459564,
0.1617528200149536,
-0.18638090789318085,
1.190071940422058,
1.3173112869262695,
0.7418421506881714,
-0.38067513704299927,
-0.7768363356590271,
0.13646931946277618,
-0.05090802162885666,
-0.825438916683197,
-1.772260308265686,
-0.3280247747898102,
0.2346314936876297,
0.5443147420883179,
-1.2879475355148315,
1.769066333770752,
0.846858561038971,
1.9578068256378174,
0.9993435144424438,
-0.43500855565071106,
1.5139610767364502,
0.10468778759241104,
1.8243857622146606,
-0.5188766717910767,
0.6219780445098877,
-0.32544443011283875,
-1.1682400703430176,
0.9214491248130798,
-0.2903043329715729,
-2.0312466621398926,
-0.7633601427078247,
-0.7280378341674805,
-0.15608353912830353,
-0.7081950306892395,
0.9251613616943359,
-0.2593560516834259,
-1.4200938940048218,
0.1615394800901413,
-0.7654159069061279,
0.0801033228635788,
-1.2181622982025146,
0.25177332758903503,
0.6274163722991943,
-0.6197683215141296,
0.10827117413282394,
-0.1528773009777069,
-1.2543857097625732,
-0.472342312335968,
0.33183538913726807,
1.913629174232483,
-0.7010257840156555,
0.893121600151062,
1.076633095741272,
-0.6257652044296265,
0.10152573883533478,
0.30990010499954224,
-0.4529147148132324,
0.8002763390541077,
-1.1049988269805908,
-0.5247326493263245,
1.2174745798110962,
-0.19082273542881012,
-0.6902578473091125,
1.4790726900100708,
0.7379416227340698,
-1.0505539178848267,
-0.28743165731430054,
-0.1881212443113327,
-0.8537497520446777,
0.03878537565469742,
-1.534433126449585,
-0.22831037640571594,
0.3487503230571747,
-1.5456738471984863,
-0.43344640731811523,
-0.24251842498779297,
1.3649659156799316,
-0.28093206882476807,
1.4675579071044922,
-0.37091678380966187,
-0.22978268563747406,
-0.3249152898788452,
-0.4522708058357239,
0.11605262011289597,
-0.24996380507946014,
-0.5874571800231934,
0.18889927864074707,
-0.843238353729248,
0.33207347989082336,
1.4356708526611328,
0.24538661539554596,
0.0890447273850441,
0.40744251012802124,
1.0313878059387207,
0.4045506715774536,
-0.05848304182291031,
-0.9246605038642883,
-1.4355030059814453,
1.9770146608352661,
-1.4089170694351196,
2.0327091217041016,
0.8494765162467957,
-0.012933718040585518,
-1.7959920167922974,
-1.9056671857833862,
1.2599220275878906,
1.1193684339523315,
2.3079476356506348,
0.4959545135498047,
0.429731547832489,
-0.8316335678100586,
-0.636867344379425,
0.31608229875564575,
-1.0721869468688965,
-0.5817837715148926,
0.2571702003479004,
2.3857409954071045,
1.7337274551391602,
-0.4626223146915436,
-0.1818908154964447,
-0.9963647723197937,
1.334985613822937,
-0.22018402814865112,
0.23573742806911469,
2.0859603881835938,
-0.21632933616638184,
-1.0739593505859375,
1.2873079776763916,
-2.304323196411133,
0.19346098601818085,
2.0177860260009766,
0.21645411849021912,
0.15128661692142487,
-1.3765681982040405,
-0.745822012424469,
-0.35095930099487305,
-0.41340169310569763,
-1.1355477571487427,
0.5734625458717346,
-0.22317488491535187,
-0.8532578349113464,
-1.456006407737732,
0.13330933451652527,
-1.1678637266159058,
-1.7206212282180786,
0.25264087319374084,
1.937633991241455,
1.9969366788864136,
-0.8344941139221191,
1.522813320159912,
-0.3296160399913788,
-0.07437348365783691,
1.234044075012207,
1.2773762941360474,
3.1290283203125,
1.8725024461746216,
-1.3019793033599854,
0.6557232737541199,
-0.15711872279644012,
-0.47278526425361633,
1.1232820749282837,
-1.2160645723342896,
1.2846678495407104,
-0.19136075675487518,
-1.1023105382919312,
-1.2266868352890015,
0.9643899202346802,
0.43778201937675476,
0.06443851441144943,
-0.4964213967323303,
1.1181882619857788,
0.16980038583278656,
1.381212830543518,
0.5496368408203125,
-0.33746644854545593,
0.6452274322509766,
-0.3257301151752472,
-0.43476739525794983,
1.5958027839660645,
0.09611989557743073,
-1.4899039268493652,
-2.362787961959839,
-0.23006190359592438,
-0.8365198373794556,
0.061640702188014984,
-0.569468080997467,
-1.093300700187683,
1.7490181922912598,
0.34665894508361816,
-1.2875750064849854,
-0.3224776089191437,
-0.35150346159935,
-0.5269904732704163,
2.764370918273926,
-1.310616135597229,
-0.23982061445713043,
-0.9736866354942322,
-0.6615745425224304,
1.7006205320358276,
-1.165350079536438,
-0.2822141647338867,
-0.950035810470581,
-0.4862516522407532,
-1.2567073106765747,
-0.48939743638038635,
0.04610792547464371,
-0.8976911306381226,
0.8538196086883545,
0.13879308104515076,
-1.1529484987258911,
-0.3594062030315399,
-0.8676052093505859,
0.9567111730575562,
-0.11203561723232269,
0.1953323930501938,
1.9558889865875244,
0.392829954624176,
-0.33712050318717957,
0.7104527354240417,
1.1874231100082397,
0.6406130194664001,
-0.6869975328445435,
0.11938474327325821,
-0.6340521574020386,
0.2791712284088135,
-1.426522135734558,
0.31963029503822327,
-2.8143463134765625,
0.668578565120697,
-0.0695292130112648,
-0.12434034794569016,
0.039769455790519714,
-1.295921802520752,
1.1672391891479492,
2.612346649169922,
-1.2048426866531372,
0.4091685712337494,
0.36623501777648926,
1.077514410018921,
-1.616053581237793,
0.3639385402202606,
-0.30765798687934875,
2.062046766281128,
0.17909201979637146,
1.2105828523635864,
-0.4498029053211212,
-2.2716281414031982,
0.6739795207977295,
-1.2570465803146362,
-1.1780167818069458,
0.7706322073936462,
-0.8705959320068359,
0.16767941415309906,
-1.5247046947479248,
-0.23712188005447388,
-0.9195380806922913,
-1.2308915853500366,
0.627127468585968,
0.12876355648040771,
0.44117456674575806,
-0.5821758508682251,
0.3386222720146179,
-2.204519033432007,
-1.4096647500991821,
-0.2225015014410019,
-0.9423399567604065,
0.5310076475143433,
-0.4277147650718689,
0.7775723934173584,
-0.1698174923658371,
0.02971380017697811,
0.3554072678089142,
1.5159720182418823,
3.4657950401306152,
0.20591965317726135,
0.27608978748321533,
-0.19419759511947632,
-0.9413362145423889,
1.4097591638565063,
0.9403759241104126,
-0.030198054388165474,
-0.594523012638092,
-1.0077166557312012,
1.182342529296875,
2.116110324859619,
1.0138250589370728,
-0.011414501816034317,
-0.8702436089515686,
-0.7085257768630981,
-0.13014085590839386,
0.22811327874660492,
0.44749024510383606,
0.9556846618652344,
0.024605752900242805,
-0.012074816040694714,
1.4740619659423828,
1.2035369873046875,
-0.3541136682033539,
0.224069744348526,
-0.8722010850906372,
-0.42843616008758545,
0.48969754576683044,
0.2678622305393219,
0.05061686038970947,
0.48112964630126953,
-1.0470911264419556,
-0.3032086491584778,
-0.43371978402137756,
-0.9205304980278015,
-0.7130370140075684,
-0.4190717041492462,
-0.39434123039245605,
1.5788241624832153,
0.14679543673992157,
-0.43903976678848267,
-0.012797992676496506,
-0.7213128805160522,
-0.12124684453010559,
-1.1453301906585693,
0.18343985080718994,
-0.14433550834655762,
-0.08672544360160828,
-0.1465926468372345,
1.7117083072662354,
-0.9283517003059387,
-1.981505274772644,
0.16107863187789917,
0.21483390033245087,
-0.3434273898601532,
0.2874309718608856,
1.7056103944778442,
0.5040021538734436,
1.385517954826355,
1.2271697521209717,
0.8842941522598267,
-0.6046175956726074,
-1.2757388353347778,
0.6945596933364868,
1.0500264167785645,
-1.3761634826660156,
0.8306649327278137,
-0.07070417702198029,
-0.49061986804008484,
0.6574781537055969,
1.2736519575119019,
0.5066272020339966,
-2.01491641998291,
0.7404070496559143,
-0.9133810997009277,
0.7923258543014526,
0.6776759624481201,
0.663087785243988,
0.1654878556728363,
0.7932341694831848,
-1.2291688919067383,
-1.0502278804779053,
-0.6650313138961792,
-0.6703174114227295,
1.9566606283187866,
-0.32744526863098145,
0.6083308458328247,
-0.25141772627830505,
-1.2379868030548096,
-0.07632151246070862,
0.7141101360321045,
0.43308025598526,
-0.5022151470184326,
0.7751622200012207,
-0.6353302597999573,
-1.0175236463546753,
-1.2565741539001465,
-0.3542942702770233,
-0.9985986948013306,
-0.9504209756851196,
1.029322862625122,
0.7916992902755737,
0.37227293848991394,
1.9003937244415283,
0.7406520247459412,
0.276746541261673,
-2.5575695037841797,
0.9329408407211304,
0.36724594235420227,
-0.1257798969745636,
0.9538100361824036,
0.29293572902679443,
1.0556049346923828,
0.029761290177702904,
0.5440841913223267,
-2.4207770824432373,
2.2751102447509766,
-0.18495213985443115,
0.6285879015922546,
0.0077185072004795074,
-0.19666741788387299,
1.1075432300567627,
0.6039113998413086,
0.44953668117523193,
-1.081598162651062,
0.6516949534416199,
-0.5068017840385437,
1.1536937952041626,
0.8680299520492554,
-0.8029198050498962,
0.012285197153687477,
1.4040902853012085,
0.5507625937461853,
-0.5306785702705383,
-0.8469443917274475,
-0.870720386505127,
0.9720882177352905,
1.700163722038269,
-0.06905576586723328,
-0.004381274804472923,
0.8736404776573181,
0.6178306937217712,
-1.274603247642517,
0.05287778377532959,
-0.7647950053215027,
-0.7758892178535461,
1.611487627029419,
2.081852912902832,
-0.10845188051462173,
-0.21184594929218292,
-0.7250561118125916,
-1.2967395782470703,
0.8425599336624146,
-0.12256127595901489,
0.20299971103668213,
0.5311600565910339,
-0.6299222707748413,
1.1175594329833984,
0.762169361114502,
1.0071871280670166,
0.2053084671497345,
0.3050834536552429,
0.4225011169910431,
-0.4431617558002472,
-1.151293158531189,
-0.3281426727771759,
-1.072631597518921,
-2.5318400859832764,
0.5100833773612976,
-0.18234717845916748,
-1.4530662298202515,
-0.03576624393463135,
-1.072816252708435,
0.9505538940429688,
-0.6139155626296997,
-0.9968615174293518,
-1.5498631000518799,
0.256197452545166,
-0.112127386033535,
0.9566690325737,
-1.5646789073944092,
-0.26108381152153015,
1.231261968612671,
0.8985692858695984,
-0.6934792399406433,
0.9173710942268372,
0.18186400830745697,
1.0828771591186523,
0.7988361120223999,
-0.3522079288959503,
0.5247225165367126,
0.07231534272432327,
-1.3227885961532593,
0.42666539549827576,
1.2295738458633423,
0.15234863758087158,
1.5197668075561523,
-0.48675620555877686,
0.1011950895190239,
0.3640143871307373,
-0.5458238124847412,
-0.5481631755828857,
-0.5113359093666077,
0.6810267567634583,
0.06669508665800095,
-0.9849242568016052,
-0.07972243428230286,
-0.13074883818626404,
-0.24433141946792603,
0.0884660854935646,
-1.4465190172195435,
-0.17251385748386383,
-0.35841697454452515,
-0.631830632686615,
-1.2415547370910645,
-0.028625382110476494,
1.3655319213867188,
-0.7583630681037903,
-0.1795947402715683,
0.46328210830688477,
0.4029342532157898,
0.553388237953186,
0.5837303400039673,
-0.7629176378250122,
-0.40017569065093994,
-0.2930237352848053,
-0.31229352951049805,
0.35946959257125854,
1.3591759204864502,
-0.0035894084721803665,
-0.9498192667961121,
0.7004989981651306,
-0.42110675573349,
0.12659230828285217,
2.03271484375,
0.061918459832668304,
-0.7795429825782776,
0.33758610486984253,
-0.6739866733551025,
1.9247640371322632,
1.7371467351913452,
1.2460798025131226,
-0.15254054963588715,
-0.8860875368118286,
0.6501352787017822,
-0.38783496618270874,
-0.4364681839942932,
0.8638899326324463,
0.30972471833229065,
-0.22812415659427643,
-1.452567458152771,
0.6650148034095764,
1.2976187467575073,
-0.8755232095718384,
-0.8427450060844421,
0.18803110718727112,
-0.8647794127464294,
1.0329192876815796,
0.5801271200180054,
0.39713993668556213,
0.3760722577571869,
1.5737295150756836,
0.8445245027542114,
-0.5356289744377136,
0.4815932810306549,
0.5603914260864258,
-0.13101141154766083,
-2.0817770957946777,
-1.2197338342666626,
0.3974215090274811,
-0.5245910882949829,
-1.6262861490249634,
1.438867449760437,
-1.1735888719558716,
-1.056138515472412,
0.6177289485931396,
0.08653753995895386,
1.3482111692428589,
0.36052635312080383,
1.5943831205368042,
2.119455575942993,
0.8808115720748901,
0.39171865582466125,
1.257716178894043,
-0.16236244142055511,
-0.5299683809280396,
1.930139183998108,
-0.46575024724006653,
0.5024550557136536,
1.0694862604141235,
-0.3810485601425171,
-1.0788097381591797,
-0.7895596623420715,
-1.2186181545257568,
-0.720230221748352,
1.2685961723327637,
0.06752513349056244,
-1.0859299898147583,
0.21002468466758728,
1.6329066753387451,
0.13174837827682495,
-0.3671930730342865,
0.6549921631813049,
0.37266117334365845,
-0.8548892140388489,
-0.03235728293657303,
-0.8861808180809021,
0.5746762156486511,
-0.11450190842151642,
-0.31207868456840515,
0.36145514249801636,
0.5028524398803711,
1.3840231895446777,
-0.10704347491264343,
0.08117400854825974,
1.0520626306533813,
-1.4647727012634277,
1.640487551689148,
-0.6401640176773071,
0.24921436607837677,
-2.3728039264678955,
1.3008713722229004,
-0.6945499181747437,
1.9477920532226562,
-2.58015513420105,
0.3833455443382263,
-0.5292971730232239,
-0.46327826380729675,
0.22840507328510284,
-0.4025998115539551,
0.1639816164970398,
-0.14620040357112885,
-1.1004165410995483,
-0.05661022663116455,
-0.6983624696731567,
0.6653998494148254,
1.1472747325897217,
1.4141087532043457,
-1.141800880432129,
-0.3181953728199005,
-1.7327134609222412,
-0.16431091725826263,
-0.8039368987083435,
0.2084222286939621,
-1.9858355522155762,
-0.21646007895469666,
-1.8585667610168457,
-2.3500547409057617,
-1.3698841333389282,
-0.8049774765968323,
1.0472471714019775,
0.09483678638935089,
-0.9301208257675171,
1.1975971460342407,
-0.38866427540779114,
-1.8428043127059937,
1.189908504486084,
-2.147153854370117
] |
https://github.com/huggingface/datasets/issues/3339 | to_tf_dataset fails on TPU | Hi @lhoestq @nbroad1881, I think it's very similar, yes. Unfortunately `to_tf_dataset` uses `tf.numpy_function` which can't be compiled - this is a necessary evil to load from the underlying Arrow dataset. We need to update the notebooks/examples to clarify that this won't work, or to identify a workaround. You may be able to get it to work on an actual cloud TPU VM, but those are quite new and we haven't tested it yet. | Using `to_tf_dataset` to create a dataset and then putting it in `model.fit` results in an internal error on TPUs. I've only tried on Colab and Kaggle TPUs, not GCP TPUs.
## Steps to reproduce the bug
I made a colab to show the error. https://colab.research.google.com/drive/12x_PFKzGouFxqD4OuWfnycW_1TaT276z?usp=sharing
## Expected results
dataset from `to_tf_dataset` works in `model.fit`
Right below the first error in the colab I use `tf.data.Dataset.from_tensor_slices` and `model.fit` works just fine. This is the desired outcome.
## Actual results
```
InternalError: 5 root error(s) found.
(0) INTERNAL: {{function_node __inference_train_function_30558}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1638231897.932218653","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":3151,"referenced_errors":[{"created":"@1638231897.932216754","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/lib/transport/error_utils.cc","file_line":161,"grpc_status":14}]}
[[{{node StatefulPartitionedCall}}]]
[[MultiDeviceIteratorGetNextFromShard]]
Executing non-communication op <MultiDeviceIteratorGetNextFromShard> originally returned UnavailableError, and was replaced by InternalError to avoid invoking TF network error handling logic.
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
[[tpu_compile_succeeded_assert/_14023832043698465348/_7/_439]]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
- Tensorflow 2.7.0
- `transformers` 4.12.5
| 1,085 | 73 | to_tf_dataset fails on TPU
Using `to_tf_dataset` to create a dataset and then putting it in `model.fit` results in an internal error on TPUs. I've only tried on Colab and Kaggle TPUs, not GCP TPUs.
## Steps to reproduce the bug
I made a colab to show the error. https://colab.research.google.com/drive/12x_PFKzGouFxqD4OuWfnycW_1TaT276z?usp=sharing
## Expected results
dataset from `to_tf_dataset` works in `model.fit`
Right below the first error in the colab I use `tf.data.Dataset.from_tensor_slices` and `model.fit` works just fine. This is the desired outcome.
## Actual results
```
InternalError: 5 root error(s) found.
(0) INTERNAL: {{function_node __inference_train_function_30558}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1638231897.932218653","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":3151,"referenced_errors":[{"created":"@1638231897.932216754","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/lib/transport/error_utils.cc","file_line":161,"grpc_status":14}]}
[[{{node StatefulPartitionedCall}}]]
[[MultiDeviceIteratorGetNextFromShard]]
Executing non-communication op <MultiDeviceIteratorGetNextFromShard> originally returned UnavailableError, and was replaced by InternalError to avoid invoking TF network error handling logic.
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
[[tpu_compile_succeeded_assert/_14023832043698465348/_7/_439]]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
- Tensorflow 2.7.0
- `transformers` 4.12.5
Hi @lhoestq @nbroad1881, I think it's very similar, yes. Unfortunately `to_tf_dataset` uses `tf.numpy_function` which can't be compiled - this is a necessary evil to load from the underlying Arrow dataset. We need to update the notebooks/examples to clarify that this won't work, or to identify a workaround. You may be able to get it to work on an actual cloud TPU VM, but those are quite new and we haven't tested it yet. | [
-1.131717562675476,
-0.8647029995918274,
-0.7913092374801636,
1.4688361883163452,
-0.18822292983531952,
-1.178057074546814,
0.12010521441698074,
-1.1463617086410522,
1.6243765354156494,
-0.7230189442634583,
0.3650436997413635,
-1.5976568460464478,
-0.014607887715101242,
-0.6160143613815308,
-0.6844227313995361,
-0.8723000288009644,
-0.34358495473861694,
-0.7493428587913513,
1.0780318975448608,
2.489741325378418,
1.2951431274414062,
-1.3710788488388062,
2.6952781677246094,
0.706047534942627,
-0.20368537306785583,
-0.9428321719169617,
0.5114513635635376,
0.050391413271427155,
-1.2815905809402466,
-0.4703165888786316,
-0.9018113613128662,
-0.1243654415011406,
-0.5482569336891174,
-0.4533376693725586,
-0.033208027482032776,
0.38707125186920166,
-0.32856157422065735,
-0.38588160276412964,
-0.6851985454559326,
-0.854502260684967,
0.4471565783023834,
-0.3617728650569916,
0.9897469878196716,
-0.3386920690536499,
1.7680976390838623,
-0.612960159778595,
0.4508027136325836,
0.782386064529419,
1.2389838695526123,
0.26857101917266846,
0.1122729554772377,
0.2650202810764313,
0.42771103978157043,
-0.056852422654628754,
0.539306104183197,
1.1307010650634766,
0.5861976742744446,
0.5214131474494934,
0.7567503452301025,
-2.2016706466674805,
1.2278748750686646,
-1.0487732887268066,
0.1832570731639862,
1.3675754070281982,
-0.8319524526596069,
0.3471699655056,
-1.7946778535842896,
-0.054365597665309906,
0.6239640116691589,
-2.249744176864624,
0.3854021430015564,
-1.3326407670974731,
-0.6232007741928101,
0.9499099850654602,
0.35798147320747375,
-1.1408894062042236,
0.17718102037906647,
-0.45804375410079956,
0.9788802266120911,
0.38289517164230347,
1.0698578357696533,
-1.6902134418487549,
-0.1101049855351448,
-0.25042518973350525,
0.07483114302158356,
-1.304215431213379,
-1.5094068050384521,
0.560919463634491,
0.5566526651382446,
0.5296890139579773,
-0.040193334221839905,
1.0332735776901245,
-1.0784722566604614,
0.7803454399108887,
-1.0157816410064697,
-1.658644199371338,
-1.463940143585205,
-2.2435309886932373,
-2.210935592651367,
0.7571578621864319,
-0.46254393458366394,
-0.5080819725990295,
2.0414817333221436,
-0.9183347225189209,
-1.7118488550186157,
1.1440147161483765,
0.3221372067928314,
0.02806415595114231,
2.3826498985290527,
0.20429223775863647,
-0.6922142505645752,
0.48466309905052185,
-0.7813135385513306,
0.78876793384552,
-0.320614755153656,
1.331502914428711,
0.4314808249473572,
-0.9658343195915222,
1.599643349647522,
-0.3965408205986023,
0.633204460144043,
-0.6826959252357483,
-0.5402647852897644,
-0.6781445145606995,
0.28040510416030884,
1.8895198106765747,
-0.311710000038147,
1.5615394115447998,
-0.22979602217674255,
-1.5321787595748901,
-1.5532513856887817,
0.8825275301933289,
0.5019526481628418,
-0.8030576705932617,
-0.0009896215051412582,
-0.3727048337459564,
0.1617528200149536,
-0.18638090789318085,
1.190071940422058,
1.3173112869262695,
0.7418421506881714,
-0.38067513704299927,
-0.7768363356590271,
0.13646931946277618,
-0.05090802162885666,
-0.825438916683197,
-1.772260308265686,
-0.3280247747898102,
0.2346314936876297,
0.5443147420883179,
-1.2879475355148315,
1.769066333770752,
0.846858561038971,
1.9578068256378174,
0.9993435144424438,
-0.43500855565071106,
1.5139610767364502,
0.10468778759241104,
1.8243857622146606,
-0.5188766717910767,
0.6219780445098877,
-0.32544443011283875,
-1.1682400703430176,
0.9214491248130798,
-0.2903043329715729,
-2.0312466621398926,
-0.7633601427078247,
-0.7280378341674805,
-0.15608353912830353,
-0.7081950306892395,
0.9251613616943359,
-0.2593560516834259,
-1.4200938940048218,
0.1615394800901413,
-0.7654159069061279,
0.0801033228635788,
-1.2181622982025146,
0.25177332758903503,
0.6274163722991943,
-0.6197683215141296,
0.10827117413282394,
-0.1528773009777069,
-1.2543857097625732,
-0.472342312335968,
0.33183538913726807,
1.913629174232483,
-0.7010257840156555,
0.893121600151062,
1.076633095741272,
-0.6257652044296265,
0.10152573883533478,
0.30990010499954224,
-0.4529147148132324,
0.8002763390541077,
-1.1049988269805908,
-0.5247326493263245,
1.2174745798110962,
-0.19082273542881012,
-0.6902578473091125,
1.4790726900100708,
0.7379416227340698,
-1.0505539178848267,
-0.28743165731430054,
-0.1881212443113327,
-0.8537497520446777,
0.03878537565469742,
-1.534433126449585,
-0.22831037640571594,
0.3487503230571747,
-1.5456738471984863,
-0.43344640731811523,
-0.24251842498779297,
1.3649659156799316,
-0.28093206882476807,
1.4675579071044922,
-0.37091678380966187,
-0.22978268563747406,
-0.3249152898788452,
-0.4522708058357239,
0.11605262011289597,
-0.24996380507946014,
-0.5874571800231934,
0.18889927864074707,
-0.843238353729248,
0.33207347989082336,
1.4356708526611328,
0.24538661539554596,
0.0890447273850441,
0.40744251012802124,
1.0313878059387207,
0.4045506715774536,
-0.05848304182291031,
-0.9246605038642883,
-1.4355030059814453,
1.9770146608352661,
-1.4089170694351196,
2.0327091217041016,
0.8494765162467957,
-0.012933718040585518,
-1.7959920167922974,
-1.9056671857833862,
1.2599220275878906,
1.1193684339523315,
2.3079476356506348,
0.4959545135498047,
0.429731547832489,
-0.8316335678100586,
-0.636867344379425,
0.31608229875564575,
-1.0721869468688965,
-0.5817837715148926,
0.2571702003479004,
2.3857409954071045,
1.7337274551391602,
-0.4626223146915436,
-0.1818908154964447,
-0.9963647723197937,
1.334985613822937,
-0.22018402814865112,
0.23573742806911469,
2.0859603881835938,
-0.21632933616638184,
-1.0739593505859375,
1.2873079776763916,
-2.304323196411133,
0.19346098601818085,
2.0177860260009766,
0.21645411849021912,
0.15128661692142487,
-1.3765681982040405,
-0.745822012424469,
-0.35095930099487305,
-0.41340169310569763,
-1.1355477571487427,
0.5734625458717346,
-0.22317488491535187,
-0.8532578349113464,
-1.456006407737732,
0.13330933451652527,
-1.1678637266159058,
-1.7206212282180786,
0.25264087319374084,
1.937633991241455,
1.9969366788864136,
-0.8344941139221191,
1.522813320159912,
-0.3296160399913788,
-0.07437348365783691,
1.234044075012207,
1.2773762941360474,
3.1290283203125,
1.8725024461746216,
-1.3019793033599854,
0.6557232737541199,
-0.15711872279644012,
-0.47278526425361633,
1.1232820749282837,
-1.2160645723342896,
1.2846678495407104,
-0.19136075675487518,
-1.1023105382919312,
-1.2266868352890015,
0.9643899202346802,
0.43778201937675476,
0.06443851441144943,
-0.4964213967323303,
1.1181882619857788,
0.16980038583278656,
1.381212830543518,
0.5496368408203125,
-0.33746644854545593,
0.6452274322509766,
-0.3257301151752472,
-0.43476739525794983,
1.5958027839660645,
0.09611989557743073,
-1.4899039268493652,
-2.362787961959839,
-0.23006190359592438,
-0.8365198373794556,
0.061640702188014984,
-0.569468080997467,
-1.093300700187683,
1.7490181922912598,
0.34665894508361816,
-1.2875750064849854,
-0.3224776089191437,
-0.35150346159935,
-0.5269904732704163,
2.764370918273926,
-1.310616135597229,
-0.23982061445713043,
-0.9736866354942322,
-0.6615745425224304,
1.7006205320358276,
-1.165350079536438,
-0.2822141647338867,
-0.950035810470581,
-0.4862516522407532,
-1.2567073106765747,
-0.48939743638038635,
0.04610792547464371,
-0.8976911306381226,
0.8538196086883545,
0.13879308104515076,
-1.1529484987258911,
-0.3594062030315399,
-0.8676052093505859,
0.9567111730575562,
-0.11203561723232269,
0.1953323930501938,
1.9558889865875244,
0.392829954624176,
-0.33712050318717957,
0.7104527354240417,
1.1874231100082397,
0.6406130194664001,
-0.6869975328445435,
0.11938474327325821,
-0.6340521574020386,
0.2791712284088135,
-1.426522135734558,
0.31963029503822327,
-2.8143463134765625,
0.668578565120697,
-0.0695292130112648,
-0.12434034794569016,
0.039769455790519714,
-1.295921802520752,
1.1672391891479492,
2.612346649169922,
-1.2048426866531372,
0.4091685712337494,
0.36623501777648926,
1.077514410018921,
-1.616053581237793,
0.3639385402202606,
-0.30765798687934875,
2.062046766281128,
0.17909201979637146,
1.2105828523635864,
-0.4498029053211212,
-2.2716281414031982,
0.6739795207977295,
-1.2570465803146362,
-1.1780167818069458,
0.7706322073936462,
-0.8705959320068359,
0.16767941415309906,
-1.5247046947479248,
-0.23712188005447388,
-0.9195380806922913,
-1.2308915853500366,
0.627127468585968,
0.12876355648040771,
0.44117456674575806,
-0.5821758508682251,
0.3386222720146179,
-2.204519033432007,
-1.4096647500991821,
-0.2225015014410019,
-0.9423399567604065,
0.5310076475143433,
-0.4277147650718689,
0.7775723934173584,
-0.1698174923658371,
0.02971380017697811,
0.3554072678089142,
1.5159720182418823,
3.4657950401306152,
0.20591965317726135,
0.27608978748321533,
-0.19419759511947632,
-0.9413362145423889,
1.4097591638565063,
0.9403759241104126,
-0.030198054388165474,
-0.594523012638092,
-1.0077166557312012,
1.182342529296875,
2.116110324859619,
1.0138250589370728,
-0.011414501816034317,
-0.8702436089515686,
-0.7085257768630981,
-0.13014085590839386,
0.22811327874660492,
0.44749024510383606,
0.9556846618652344,
0.024605752900242805,
-0.012074816040694714,
1.4740619659423828,
1.2035369873046875,
-0.3541136682033539,
0.224069744348526,
-0.8722010850906372,
-0.42843616008758545,
0.48969754576683044,
0.2678622305393219,
0.05061686038970947,
0.48112964630126953,
-1.0470911264419556,
-0.3032086491584778,
-0.43371978402137756,
-0.9205304980278015,
-0.7130370140075684,
-0.4190717041492462,
-0.39434123039245605,
1.5788241624832153,
0.14679543673992157,
-0.43903976678848267,
-0.012797992676496506,
-0.7213128805160522,
-0.12124684453010559,
-1.1453301906585693,
0.18343985080718994,
-0.14433550834655762,
-0.08672544360160828,
-0.1465926468372345,
1.7117083072662354,
-0.9283517003059387,
-1.981505274772644,
0.16107863187789917,
0.21483390033245087,
-0.3434273898601532,
0.2874309718608856,
1.7056103944778442,
0.5040021538734436,
1.385517954826355,
1.2271697521209717,
0.8842941522598267,
-0.6046175956726074,
-1.2757388353347778,
0.6945596933364868,
1.0500264167785645,
-1.3761634826660156,
0.8306649327278137,
-0.07070417702198029,
-0.49061986804008484,
0.6574781537055969,
1.2736519575119019,
0.5066272020339966,
-2.01491641998291,
0.7404070496559143,
-0.9133810997009277,
0.7923258543014526,
0.6776759624481201,
0.663087785243988,
0.1654878556728363,
0.7932341694831848,
-1.2291688919067383,
-1.0502278804779053,
-0.6650313138961792,
-0.6703174114227295,
1.9566606283187866,
-0.32744526863098145,
0.6083308458328247,
-0.25141772627830505,
-1.2379868030548096,
-0.07632151246070862,
0.7141101360321045,
0.43308025598526,
-0.5022151470184326,
0.7751622200012207,
-0.6353302597999573,
-1.0175236463546753,
-1.2565741539001465,
-0.3542942702770233,
-0.9985986948013306,
-0.9504209756851196,
1.029322862625122,
0.7916992902755737,
0.37227293848991394,
1.9003937244415283,
0.7406520247459412,
0.276746541261673,
-2.5575695037841797,
0.9329408407211304,
0.36724594235420227,
-0.1257798969745636,
0.9538100361824036,
0.29293572902679443,
1.0556049346923828,
0.029761290177702904,
0.5440841913223267,
-2.4207770824432373,
2.2751102447509766,
-0.18495213985443115,
0.6285879015922546,
0.0077185072004795074,
-0.19666741788387299,
1.1075432300567627,
0.6039113998413086,
0.44953668117523193,
-1.081598162651062,
0.6516949534416199,
-0.5068017840385437,
1.1536937952041626,
0.8680299520492554,
-0.8029198050498962,
0.012285197153687477,
1.4040902853012085,
0.5507625937461853,
-0.5306785702705383,
-0.8469443917274475,
-0.870720386505127,
0.9720882177352905,
1.700163722038269,
-0.06905576586723328,
-0.004381274804472923,
0.8736404776573181,
0.6178306937217712,
-1.274603247642517,
0.05287778377532959,
-0.7647950053215027,
-0.7758892178535461,
1.611487627029419,
2.081852912902832,
-0.10845188051462173,
-0.21184594929218292,
-0.7250561118125916,
-1.2967395782470703,
0.8425599336624146,
-0.12256127595901489,
0.20299971103668213,
0.5311600565910339,
-0.6299222707748413,
1.1175594329833984,
0.762169361114502,
1.0071871280670166,
0.2053084671497345,
0.3050834536552429,
0.4225011169910431,
-0.4431617558002472,
-1.151293158531189,
-0.3281426727771759,
-1.072631597518921,
-2.5318400859832764,
0.5100833773612976,
-0.18234717845916748,
-1.4530662298202515,
-0.03576624393463135,
-1.072816252708435,
0.9505538940429688,
-0.6139155626296997,
-0.9968615174293518,
-1.5498631000518799,
0.256197452545166,
-0.112127386033535,
0.9566690325737,
-1.5646789073944092,
-0.26108381152153015,
1.231261968612671,
0.8985692858695984,
-0.6934792399406433,
0.9173710942268372,
0.18186400830745697,
1.0828771591186523,
0.7988361120223999,
-0.3522079288959503,
0.5247225165367126,
0.07231534272432327,
-1.3227885961532593,
0.42666539549827576,
1.2295738458633423,
0.15234863758087158,
1.5197668075561523,
-0.48675620555877686,
0.1011950895190239,
0.3640143871307373,
-0.5458238124847412,
-0.5481631755828857,
-0.5113359093666077,
0.6810267567634583,
0.06669508665800095,
-0.9849242568016052,
-0.07972243428230286,
-0.13074883818626404,
-0.24433141946792603,
0.0884660854935646,
-1.4465190172195435,
-0.17251385748386383,
-0.35841697454452515,
-0.631830632686615,
-1.2415547370910645,
-0.028625382110476494,
1.3655319213867188,
-0.7583630681037903,
-0.1795947402715683,
0.46328210830688477,
0.4029342532157898,
0.553388237953186,
0.5837303400039673,
-0.7629176378250122,
-0.40017569065093994,
-0.2930237352848053,
-0.31229352951049805,
0.35946959257125854,
1.3591759204864502,
-0.0035894084721803665,
-0.9498192667961121,
0.7004989981651306,
-0.42110675573349,
0.12659230828285217,
2.03271484375,
0.061918459832668304,
-0.7795429825782776,
0.33758610486984253,
-0.6739866733551025,
1.9247640371322632,
1.7371467351913452,
1.2460798025131226,
-0.15254054963588715,
-0.8860875368118286,
0.6501352787017822,
-0.38783496618270874,
-0.4364681839942932,
0.8638899326324463,
0.30972471833229065,
-0.22812415659427643,
-1.452567458152771,
0.6650148034095764,
1.2976187467575073,
-0.8755232095718384,
-0.8427450060844421,
0.18803110718727112,
-0.8647794127464294,
1.0329192876815796,
0.5801271200180054,
0.39713993668556213,
0.3760722577571869,
1.5737295150756836,
0.8445245027542114,
-0.5356289744377136,
0.4815932810306549,
0.5603914260864258,
-0.13101141154766083,
-2.0817770957946777,
-1.2197338342666626,
0.3974215090274811,
-0.5245910882949829,
-1.6262861490249634,
1.438867449760437,
-1.1735888719558716,
-1.056138515472412,
0.6177289485931396,
0.08653753995895386,
1.3482111692428589,
0.36052635312080383,
1.5943831205368042,
2.119455575942993,
0.8808115720748901,
0.39171865582466125,
1.257716178894043,
-0.16236244142055511,
-0.5299683809280396,
1.930139183998108,
-0.46575024724006653,
0.5024550557136536,
1.0694862604141235,
-0.3810485601425171,
-1.0788097381591797,
-0.7895596623420715,
-1.2186181545257568,
-0.720230221748352,
1.2685961723327637,
0.06752513349056244,
-1.0859299898147583,
0.21002468466758728,
1.6329066753387451,
0.13174837827682495,
-0.3671930730342865,
0.6549921631813049,
0.37266117334365845,
-0.8548892140388489,
-0.03235728293657303,
-0.8861808180809021,
0.5746762156486511,
-0.11450190842151642,
-0.31207868456840515,
0.36145514249801636,
0.5028524398803711,
1.3840231895446777,
-0.10704347491264343,
0.08117400854825974,
1.0520626306533813,
-1.4647727012634277,
1.640487551689148,
-0.6401640176773071,
0.24921436607837677,
-2.3728039264678955,
1.3008713722229004,
-0.6945499181747437,
1.9477920532226562,
-2.58015513420105,
0.3833455443382263,
-0.5292971730232239,
-0.46327826380729675,
0.22840507328510284,
-0.4025998115539551,
0.1639816164970398,
-0.14620040357112885,
-1.1004165410995483,
-0.05661022663116455,
-0.6983624696731567,
0.6653998494148254,
1.1472747325897217,
1.4141087532043457,
-1.141800880432129,
-0.3181953728199005,
-1.7327134609222412,
-0.16431091725826263,
-0.8039368987083435,
0.2084222286939621,
-1.9858355522155762,
-0.21646007895469666,
-1.8585667610168457,
-2.3500547409057617,
-1.3698841333389282,
-0.8049774765968323,
1.0472471714019775,
0.09483678638935089,
-0.9301208257675171,
1.1975971460342407,
-0.38866427540779114,
-1.8428043127059937,
1.189908504486084,
-2.147153854370117
] |
https://github.com/huggingface/datasets/issues/3339 | to_tf_dataset fails on TPU | Thank you for the explanation. I didn't realize the nuances of `tf.numpy_function`. In this scenario, would it be better to use `export(format='tfrecord')` ? It's not quite the same, but for very large datasets that don't fit in memory it looks like it is the only option. I haven't used `export` before, but I do recall reading that there are suggestions for how big and how many tfrecords there should be to not bottleneck the TPU. It might be nice if there were a way for the `export` method to split the files up into appropriate chunk sizes depending on the size of the dataset and the number of devices. And if that is too much, it would be nice to be able to specify the number of files that would be created when using `export`. Well... maybe the user should just do the chunking themselves and call `export` a bunch of times. Whatever the case, you have been helpful. Thanks Tensorflow boy ;-) | Using `to_tf_dataset` to create a dataset and then putting it in `model.fit` results in an internal error on TPUs. I've only tried on Colab and Kaggle TPUs, not GCP TPUs.
## Steps to reproduce the bug
I made a colab to show the error. https://colab.research.google.com/drive/12x_PFKzGouFxqD4OuWfnycW_1TaT276z?usp=sharing
## Expected results
dataset from `to_tf_dataset` works in `model.fit`
Right below the first error in the colab I use `tf.data.Dataset.from_tensor_slices` and `model.fit` works just fine. This is the desired outcome.
## Actual results
```
InternalError: 5 root error(s) found.
(0) INTERNAL: {{function_node __inference_train_function_30558}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1638231897.932218653","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":3151,"referenced_errors":[{"created":"@1638231897.932216754","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/lib/transport/error_utils.cc","file_line":161,"grpc_status":14}]}
[[{{node StatefulPartitionedCall}}]]
[[MultiDeviceIteratorGetNextFromShard]]
Executing non-communication op <MultiDeviceIteratorGetNextFromShard> originally returned UnavailableError, and was replaced by InternalError to avoid invoking TF network error handling logic.
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
[[tpu_compile_succeeded_assert/_14023832043698465348/_7/_439]]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
- Tensorflow 2.7.0
- `transformers` 4.12.5
| 1,085 | 163 | to_tf_dataset fails on TPU
Using `to_tf_dataset` to create a dataset and then putting it in `model.fit` results in an internal error on TPUs. I've only tried on Colab and Kaggle TPUs, not GCP TPUs.
## Steps to reproduce the bug
I made a colab to show the error. https://colab.research.google.com/drive/12x_PFKzGouFxqD4OuWfnycW_1TaT276z?usp=sharing
## Expected results
dataset from `to_tf_dataset` works in `model.fit`
Right below the first error in the colab I use `tf.data.Dataset.from_tensor_slices` and `model.fit` works just fine. This is the desired outcome.
## Actual results
```
InternalError: 5 root error(s) found.
(0) INTERNAL: {{function_node __inference_train_function_30558}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1638231897.932218653","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":3151,"referenced_errors":[{"created":"@1638231897.932216754","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/lib/transport/error_utils.cc","file_line":161,"grpc_status":14}]}
[[{{node StatefulPartitionedCall}}]]
[[MultiDeviceIteratorGetNextFromShard]]
Executing non-communication op <MultiDeviceIteratorGetNextFromShard> originally returned UnavailableError, and was replaced by InternalError to avoid invoking TF network error handling logic.
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
[[tpu_compile_succeeded_assert/_14023832043698465348/_7/_439]]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
- Tensorflow 2.7.0
- `transformers` 4.12.5
Thank you for the explanation. I didn't realize the nuances of `tf.numpy_function`. In this scenario, would it be better to use `export(format='tfrecord')` ? It's not quite the same, but for very large datasets that don't fit in memory it looks like it is the only option. I haven't used `export` before, but I do recall reading that there are suggestions for how big and how many tfrecords there should be to not bottleneck the TPU. It might be nice if there were a way for the `export` method to split the files up into appropriate chunk sizes depending on the size of the dataset and the number of devices. And if that is too much, it would be nice to be able to specify the number of files that would be created when using `export`. Well... maybe the user should just do the chunking themselves and call `export` a bunch of times. Whatever the case, you have been helpful. Thanks Tensorflow boy ;-) | [
-1.131717562675476,
-0.8647029995918274,
-0.7913092374801636,
1.4688361883163452,
-0.18822292983531952,
-1.178057074546814,
0.12010521441698074,
-1.1463617086410522,
1.6243765354156494,
-0.7230189442634583,
0.3650436997413635,
-1.5976568460464478,
-0.014607887715101242,
-0.6160143613815308,
-0.6844227313995361,
-0.8723000288009644,
-0.34358495473861694,
-0.7493428587913513,
1.0780318975448608,
2.489741325378418,
1.2951431274414062,
-1.3710788488388062,
2.6952781677246094,
0.706047534942627,
-0.20368537306785583,
-0.9428321719169617,
0.5114513635635376,
0.050391413271427155,
-1.2815905809402466,
-0.4703165888786316,
-0.9018113613128662,
-0.1243654415011406,
-0.5482569336891174,
-0.4533376693725586,
-0.033208027482032776,
0.38707125186920166,
-0.32856157422065735,
-0.38588160276412964,
-0.6851985454559326,
-0.854502260684967,
0.4471565783023834,
-0.3617728650569916,
0.9897469878196716,
-0.3386920690536499,
1.7680976390838623,
-0.612960159778595,
0.4508027136325836,
0.782386064529419,
1.2389838695526123,
0.26857101917266846,
0.1122729554772377,
0.2650202810764313,
0.42771103978157043,
-0.056852422654628754,
0.539306104183197,
1.1307010650634766,
0.5861976742744446,
0.5214131474494934,
0.7567503452301025,
-2.2016706466674805,
1.2278748750686646,
-1.0487732887268066,
0.1832570731639862,
1.3675754070281982,
-0.8319524526596069,
0.3471699655056,
-1.7946778535842896,
-0.054365597665309906,
0.6239640116691589,
-2.249744176864624,
0.3854021430015564,
-1.3326407670974731,
-0.6232007741928101,
0.9499099850654602,
0.35798147320747375,
-1.1408894062042236,
0.17718102037906647,
-0.45804375410079956,
0.9788802266120911,
0.38289517164230347,
1.0698578357696533,
-1.6902134418487549,
-0.1101049855351448,
-0.25042518973350525,
0.07483114302158356,
-1.304215431213379,
-1.5094068050384521,
0.560919463634491,
0.5566526651382446,
0.5296890139579773,
-0.040193334221839905,
1.0332735776901245,
-1.0784722566604614,
0.7803454399108887,
-1.0157816410064697,
-1.658644199371338,
-1.463940143585205,
-2.2435309886932373,
-2.210935592651367,
0.7571578621864319,
-0.46254393458366394,
-0.5080819725990295,
2.0414817333221436,
-0.9183347225189209,
-1.7118488550186157,
1.1440147161483765,
0.3221372067928314,
0.02806415595114231,
2.3826498985290527,
0.20429223775863647,
-0.6922142505645752,
0.48466309905052185,
-0.7813135385513306,
0.78876793384552,
-0.320614755153656,
1.331502914428711,
0.4314808249473572,
-0.9658343195915222,
1.599643349647522,
-0.3965408205986023,
0.633204460144043,
-0.6826959252357483,
-0.5402647852897644,
-0.6781445145606995,
0.28040510416030884,
1.8895198106765747,
-0.311710000038147,
1.5615394115447998,
-0.22979602217674255,
-1.5321787595748901,
-1.5532513856887817,
0.8825275301933289,
0.5019526481628418,
-0.8030576705932617,
-0.0009896215051412582,
-0.3727048337459564,
0.1617528200149536,
-0.18638090789318085,
1.190071940422058,
1.3173112869262695,
0.7418421506881714,
-0.38067513704299927,
-0.7768363356590271,
0.13646931946277618,
-0.05090802162885666,
-0.825438916683197,
-1.772260308265686,
-0.3280247747898102,
0.2346314936876297,
0.5443147420883179,
-1.2879475355148315,
1.769066333770752,
0.846858561038971,
1.9578068256378174,
0.9993435144424438,
-0.43500855565071106,
1.5139610767364502,
0.10468778759241104,
1.8243857622146606,
-0.5188766717910767,
0.6219780445098877,
-0.32544443011283875,
-1.1682400703430176,
0.9214491248130798,
-0.2903043329715729,
-2.0312466621398926,
-0.7633601427078247,
-0.7280378341674805,
-0.15608353912830353,
-0.7081950306892395,
0.9251613616943359,
-0.2593560516834259,
-1.4200938940048218,
0.1615394800901413,
-0.7654159069061279,
0.0801033228635788,
-1.2181622982025146,
0.25177332758903503,
0.6274163722991943,
-0.6197683215141296,
0.10827117413282394,
-0.1528773009777069,
-1.2543857097625732,
-0.472342312335968,
0.33183538913726807,
1.913629174232483,
-0.7010257840156555,
0.893121600151062,
1.076633095741272,
-0.6257652044296265,
0.10152573883533478,
0.30990010499954224,
-0.4529147148132324,
0.8002763390541077,
-1.1049988269805908,
-0.5247326493263245,
1.2174745798110962,
-0.19082273542881012,
-0.6902578473091125,
1.4790726900100708,
0.7379416227340698,
-1.0505539178848267,
-0.28743165731430054,
-0.1881212443113327,
-0.8537497520446777,
0.03878537565469742,
-1.534433126449585,
-0.22831037640571594,
0.3487503230571747,
-1.5456738471984863,
-0.43344640731811523,
-0.24251842498779297,
1.3649659156799316,
-0.28093206882476807,
1.4675579071044922,
-0.37091678380966187,
-0.22978268563747406,
-0.3249152898788452,
-0.4522708058357239,
0.11605262011289597,
-0.24996380507946014,
-0.5874571800231934,
0.18889927864074707,
-0.843238353729248,
0.33207347989082336,
1.4356708526611328,
0.24538661539554596,
0.0890447273850441,
0.40744251012802124,
1.0313878059387207,
0.4045506715774536,
-0.05848304182291031,
-0.9246605038642883,
-1.4355030059814453,
1.9770146608352661,
-1.4089170694351196,
2.0327091217041016,
0.8494765162467957,
-0.012933718040585518,
-1.7959920167922974,
-1.9056671857833862,
1.2599220275878906,
1.1193684339523315,
2.3079476356506348,
0.4959545135498047,
0.429731547832489,
-0.8316335678100586,
-0.636867344379425,
0.31608229875564575,
-1.0721869468688965,
-0.5817837715148926,
0.2571702003479004,
2.3857409954071045,
1.7337274551391602,
-0.4626223146915436,
-0.1818908154964447,
-0.9963647723197937,
1.334985613822937,
-0.22018402814865112,
0.23573742806911469,
2.0859603881835938,
-0.21632933616638184,
-1.0739593505859375,
1.2873079776763916,
-2.304323196411133,
0.19346098601818085,
2.0177860260009766,
0.21645411849021912,
0.15128661692142487,
-1.3765681982040405,
-0.745822012424469,
-0.35095930099487305,
-0.41340169310569763,
-1.1355477571487427,
0.5734625458717346,
-0.22317488491535187,
-0.8532578349113464,
-1.456006407737732,
0.13330933451652527,
-1.1678637266159058,
-1.7206212282180786,
0.25264087319374084,
1.937633991241455,
1.9969366788864136,
-0.8344941139221191,
1.522813320159912,
-0.3296160399913788,
-0.07437348365783691,
1.234044075012207,
1.2773762941360474,
3.1290283203125,
1.8725024461746216,
-1.3019793033599854,
0.6557232737541199,
-0.15711872279644012,
-0.47278526425361633,
1.1232820749282837,
-1.2160645723342896,
1.2846678495407104,
-0.19136075675487518,
-1.1023105382919312,
-1.2266868352890015,
0.9643899202346802,
0.43778201937675476,
0.06443851441144943,
-0.4964213967323303,
1.1181882619857788,
0.16980038583278656,
1.381212830543518,
0.5496368408203125,
-0.33746644854545593,
0.6452274322509766,
-0.3257301151752472,
-0.43476739525794983,
1.5958027839660645,
0.09611989557743073,
-1.4899039268493652,
-2.362787961959839,
-0.23006190359592438,
-0.8365198373794556,
0.061640702188014984,
-0.569468080997467,
-1.093300700187683,
1.7490181922912598,
0.34665894508361816,
-1.2875750064849854,
-0.3224776089191437,
-0.35150346159935,
-0.5269904732704163,
2.764370918273926,
-1.310616135597229,
-0.23982061445713043,
-0.9736866354942322,
-0.6615745425224304,
1.7006205320358276,
-1.165350079536438,
-0.2822141647338867,
-0.950035810470581,
-0.4862516522407532,
-1.2567073106765747,
-0.48939743638038635,
0.04610792547464371,
-0.8976911306381226,
0.8538196086883545,
0.13879308104515076,
-1.1529484987258911,
-0.3594062030315399,
-0.8676052093505859,
0.9567111730575562,
-0.11203561723232269,
0.1953323930501938,
1.9558889865875244,
0.392829954624176,
-0.33712050318717957,
0.7104527354240417,
1.1874231100082397,
0.6406130194664001,
-0.6869975328445435,
0.11938474327325821,
-0.6340521574020386,
0.2791712284088135,
-1.426522135734558,
0.31963029503822327,
-2.8143463134765625,
0.668578565120697,
-0.0695292130112648,
-0.12434034794569016,
0.039769455790519714,
-1.295921802520752,
1.1672391891479492,
2.612346649169922,
-1.2048426866531372,
0.4091685712337494,
0.36623501777648926,
1.077514410018921,
-1.616053581237793,
0.3639385402202606,
-0.30765798687934875,
2.062046766281128,
0.17909201979637146,
1.2105828523635864,
-0.4498029053211212,
-2.2716281414031982,
0.6739795207977295,
-1.2570465803146362,
-1.1780167818069458,
0.7706322073936462,
-0.8705959320068359,
0.16767941415309906,
-1.5247046947479248,
-0.23712188005447388,
-0.9195380806922913,
-1.2308915853500366,
0.627127468585968,
0.12876355648040771,
0.44117456674575806,
-0.5821758508682251,
0.3386222720146179,
-2.204519033432007,
-1.4096647500991821,
-0.2225015014410019,
-0.9423399567604065,
0.5310076475143433,
-0.4277147650718689,
0.7775723934173584,
-0.1698174923658371,
0.02971380017697811,
0.3554072678089142,
1.5159720182418823,
3.4657950401306152,
0.20591965317726135,
0.27608978748321533,
-0.19419759511947632,
-0.9413362145423889,
1.4097591638565063,
0.9403759241104126,
-0.030198054388165474,
-0.594523012638092,
-1.0077166557312012,
1.182342529296875,
2.116110324859619,
1.0138250589370728,
-0.011414501816034317,
-0.8702436089515686,
-0.7085257768630981,
-0.13014085590839386,
0.22811327874660492,
0.44749024510383606,
0.9556846618652344,
0.024605752900242805,
-0.012074816040694714,
1.4740619659423828,
1.2035369873046875,
-0.3541136682033539,
0.224069744348526,
-0.8722010850906372,
-0.42843616008758545,
0.48969754576683044,
0.2678622305393219,
0.05061686038970947,
0.48112964630126953,
-1.0470911264419556,
-0.3032086491584778,
-0.43371978402137756,
-0.9205304980278015,
-0.7130370140075684,
-0.4190717041492462,
-0.39434123039245605,
1.5788241624832153,
0.14679543673992157,
-0.43903976678848267,
-0.012797992676496506,
-0.7213128805160522,
-0.12124684453010559,
-1.1453301906585693,
0.18343985080718994,
-0.14433550834655762,
-0.08672544360160828,
-0.1465926468372345,
1.7117083072662354,
-0.9283517003059387,
-1.981505274772644,
0.16107863187789917,
0.21483390033245087,
-0.3434273898601532,
0.2874309718608856,
1.7056103944778442,
0.5040021538734436,
1.385517954826355,
1.2271697521209717,
0.8842941522598267,
-0.6046175956726074,
-1.2757388353347778,
0.6945596933364868,
1.0500264167785645,
-1.3761634826660156,
0.8306649327278137,
-0.07070417702198029,
-0.49061986804008484,
0.6574781537055969,
1.2736519575119019,
0.5066272020339966,
-2.01491641998291,
0.7404070496559143,
-0.9133810997009277,
0.7923258543014526,
0.6776759624481201,
0.663087785243988,
0.1654878556728363,
0.7932341694831848,
-1.2291688919067383,
-1.0502278804779053,
-0.6650313138961792,
-0.6703174114227295,
1.9566606283187866,
-0.32744526863098145,
0.6083308458328247,
-0.25141772627830505,
-1.2379868030548096,
-0.07632151246070862,
0.7141101360321045,
0.43308025598526,
-0.5022151470184326,
0.7751622200012207,
-0.6353302597999573,
-1.0175236463546753,
-1.2565741539001465,
-0.3542942702770233,
-0.9985986948013306,
-0.9504209756851196,
1.029322862625122,
0.7916992902755737,
0.37227293848991394,
1.9003937244415283,
0.7406520247459412,
0.276746541261673,
-2.5575695037841797,
0.9329408407211304,
0.36724594235420227,
-0.1257798969745636,
0.9538100361824036,
0.29293572902679443,
1.0556049346923828,
0.029761290177702904,
0.5440841913223267,
-2.4207770824432373,
2.2751102447509766,
-0.18495213985443115,
0.6285879015922546,
0.0077185072004795074,
-0.19666741788387299,
1.1075432300567627,
0.6039113998413086,
0.44953668117523193,
-1.081598162651062,
0.6516949534416199,
-0.5068017840385437,
1.1536937952041626,
0.8680299520492554,
-0.8029198050498962,
0.012285197153687477,
1.4040902853012085,
0.5507625937461853,
-0.5306785702705383,
-0.8469443917274475,
-0.870720386505127,
0.9720882177352905,
1.700163722038269,
-0.06905576586723328,
-0.004381274804472923,
0.8736404776573181,
0.6178306937217712,
-1.274603247642517,
0.05287778377532959,
-0.7647950053215027,
-0.7758892178535461,
1.611487627029419,
2.081852912902832,
-0.10845188051462173,
-0.21184594929218292,
-0.7250561118125916,
-1.2967395782470703,
0.8425599336624146,
-0.12256127595901489,
0.20299971103668213,
0.5311600565910339,
-0.6299222707748413,
1.1175594329833984,
0.762169361114502,
1.0071871280670166,
0.2053084671497345,
0.3050834536552429,
0.4225011169910431,
-0.4431617558002472,
-1.151293158531189,
-0.3281426727771759,
-1.072631597518921,
-2.5318400859832764,
0.5100833773612976,
-0.18234717845916748,
-1.4530662298202515,
-0.03576624393463135,
-1.072816252708435,
0.9505538940429688,
-0.6139155626296997,
-0.9968615174293518,
-1.5498631000518799,
0.256197452545166,
-0.112127386033535,
0.9566690325737,
-1.5646789073944092,
-0.26108381152153015,
1.231261968612671,
0.8985692858695984,
-0.6934792399406433,
0.9173710942268372,
0.18186400830745697,
1.0828771591186523,
0.7988361120223999,
-0.3522079288959503,
0.5247225165367126,
0.07231534272432327,
-1.3227885961532593,
0.42666539549827576,
1.2295738458633423,
0.15234863758087158,
1.5197668075561523,
-0.48675620555877686,
0.1011950895190239,
0.3640143871307373,
-0.5458238124847412,
-0.5481631755828857,
-0.5113359093666077,
0.6810267567634583,
0.06669508665800095,
-0.9849242568016052,
-0.07972243428230286,
-0.13074883818626404,
-0.24433141946792603,
0.0884660854935646,
-1.4465190172195435,
-0.17251385748386383,
-0.35841697454452515,
-0.631830632686615,
-1.2415547370910645,
-0.028625382110476494,
1.3655319213867188,
-0.7583630681037903,
-0.1795947402715683,
0.46328210830688477,
0.4029342532157898,
0.553388237953186,
0.5837303400039673,
-0.7629176378250122,
-0.40017569065093994,
-0.2930237352848053,
-0.31229352951049805,
0.35946959257125854,
1.3591759204864502,
-0.0035894084721803665,
-0.9498192667961121,
0.7004989981651306,
-0.42110675573349,
0.12659230828285217,
2.03271484375,
0.061918459832668304,
-0.7795429825782776,
0.33758610486984253,
-0.6739866733551025,
1.9247640371322632,
1.7371467351913452,
1.2460798025131226,
-0.15254054963588715,
-0.8860875368118286,
0.6501352787017822,
-0.38783496618270874,
-0.4364681839942932,
0.8638899326324463,
0.30972471833229065,
-0.22812415659427643,
-1.452567458152771,
0.6650148034095764,
1.2976187467575073,
-0.8755232095718384,
-0.8427450060844421,
0.18803110718727112,
-0.8647794127464294,
1.0329192876815796,
0.5801271200180054,
0.39713993668556213,
0.3760722577571869,
1.5737295150756836,
0.8445245027542114,
-0.5356289744377136,
0.4815932810306549,
0.5603914260864258,
-0.13101141154766083,
-2.0817770957946777,
-1.2197338342666626,
0.3974215090274811,
-0.5245910882949829,
-1.6262861490249634,
1.438867449760437,
-1.1735888719558716,
-1.056138515472412,
0.6177289485931396,
0.08653753995895386,
1.3482111692428589,
0.36052635312080383,
1.5943831205368042,
2.119455575942993,
0.8808115720748901,
0.39171865582466125,
1.257716178894043,
-0.16236244142055511,
-0.5299683809280396,
1.930139183998108,
-0.46575024724006653,
0.5024550557136536,
1.0694862604141235,
-0.3810485601425171,
-1.0788097381591797,
-0.7895596623420715,
-1.2186181545257568,
-0.720230221748352,
1.2685961723327637,
0.06752513349056244,
-1.0859299898147583,
0.21002468466758728,
1.6329066753387451,
0.13174837827682495,
-0.3671930730342865,
0.6549921631813049,
0.37266117334365845,
-0.8548892140388489,
-0.03235728293657303,
-0.8861808180809021,
0.5746762156486511,
-0.11450190842151642,
-0.31207868456840515,
0.36145514249801636,
0.5028524398803711,
1.3840231895446777,
-0.10704347491264343,
0.08117400854825974,
1.0520626306533813,
-1.4647727012634277,
1.640487551689148,
-0.6401640176773071,
0.24921436607837677,
-2.3728039264678955,
1.3008713722229004,
-0.6945499181747437,
1.9477920532226562,
-2.58015513420105,
0.3833455443382263,
-0.5292971730232239,
-0.46327826380729675,
0.22840507328510284,
-0.4025998115539551,
0.1639816164970398,
-0.14620040357112885,
-1.1004165410995483,
-0.05661022663116455,
-0.6983624696731567,
0.6653998494148254,
1.1472747325897217,
1.4141087532043457,
-1.141800880432129,
-0.3181953728199005,
-1.7327134609222412,
-0.16431091725826263,
-0.8039368987083435,
0.2084222286939621,
-1.9858355522155762,
-0.21646007895469666,
-1.8585667610168457,
-2.3500547409057617,
-1.3698841333389282,
-0.8049774765968323,
1.0472471714019775,
0.09483678638935089,
-0.9301208257675171,
1.1975971460342407,
-0.38866427540779114,
-1.8428043127059937,
1.189908504486084,
-2.147153854370117
] |
https://github.com/huggingface/datasets/issues/3339 | to_tf_dataset fails on TPU | Yeah, this is something we really should have a proper guide on. I'll make a note to test some things and make a 'TF TPU best practices' notebook at some point, but in the meantime I think your solution of exporting TFRecords will probably work. | Using `to_tf_dataset` to create a dataset and then putting it in `model.fit` results in an internal error on TPUs. I've only tried on Colab and Kaggle TPUs, not GCP TPUs.
## Steps to reproduce the bug
I made a colab to show the error. https://colab.research.google.com/drive/12x_PFKzGouFxqD4OuWfnycW_1TaT276z?usp=sharing
## Expected results
dataset from `to_tf_dataset` works in `model.fit`
Right below the first error in the colab I use `tf.data.Dataset.from_tensor_slices` and `model.fit` works just fine. This is the desired outcome.
## Actual results
```
InternalError: 5 root error(s) found.
(0) INTERNAL: {{function_node __inference_train_function_30558}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1638231897.932218653","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":3151,"referenced_errors":[{"created":"@1638231897.932216754","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/lib/transport/error_utils.cc","file_line":161,"grpc_status":14}]}
[[{{node StatefulPartitionedCall}}]]
[[MultiDeviceIteratorGetNextFromShard]]
Executing non-communication op <MultiDeviceIteratorGetNextFromShard> originally returned UnavailableError, and was replaced by InternalError to avoid invoking TF network error handling logic.
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
[[tpu_compile_succeeded_assert/_14023832043698465348/_7/_439]]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
- Tensorflow 2.7.0
- `transformers` 4.12.5
| 1,085 | 45 | to_tf_dataset fails on TPU
Using `to_tf_dataset` to create a dataset and then putting it in `model.fit` results in an internal error on TPUs. I've only tried on Colab and Kaggle TPUs, not GCP TPUs.
## Steps to reproduce the bug
I made a colab to show the error. https://colab.research.google.com/drive/12x_PFKzGouFxqD4OuWfnycW_1TaT276z?usp=sharing
## Expected results
dataset from `to_tf_dataset` works in `model.fit`
Right below the first error in the colab I use `tf.data.Dataset.from_tensor_slices` and `model.fit` works just fine. This is the desired outcome.
## Actual results
```
InternalError: 5 root error(s) found.
(0) INTERNAL: {{function_node __inference_train_function_30558}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1638231897.932218653","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":3151,"referenced_errors":[{"created":"@1638231897.932216754","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/lib/transport/error_utils.cc","file_line":161,"grpc_status":14}]}
[[{{node StatefulPartitionedCall}}]]
[[MultiDeviceIteratorGetNextFromShard]]
Executing non-communication op <MultiDeviceIteratorGetNextFromShard> originally returned UnavailableError, and was replaced by InternalError to avoid invoking TF network error handling logic.
[[RemoteCall]]
[[IteratorGetNextAsOptional]]
[[tpu_compile_succeeded_assert/_14023832043698465348/_7/_439]]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.16.1
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.12
- PyArrow version: 3.0.0
- Tensorflow 2.7.0
- `transformers` 4.12.5
Yeah, this is something we really should have a proper guide on. I'll make a note to test some things and make a 'TF TPU best practices' notebook at some point, but in the meantime I think your solution of exporting TFRecords will probably work. | [
-1.131717562675476,
-0.8647029995918274,
-0.7913092374801636,
1.4688361883163452,
-0.18822292983531952,
-1.178057074546814,
0.12010521441698074,
-1.1463617086410522,
1.6243765354156494,
-0.7230189442634583,
0.3650436997413635,
-1.5976568460464478,
-0.014607887715101242,
-0.6160143613815308,
-0.6844227313995361,
-0.8723000288009644,
-0.34358495473861694,
-0.7493428587913513,
1.0780318975448608,
2.489741325378418,
1.2951431274414062,
-1.3710788488388062,
2.6952781677246094,
0.706047534942627,
-0.20368537306785583,
-0.9428321719169617,
0.5114513635635376,
0.050391413271427155,
-1.2815905809402466,
-0.4703165888786316,
-0.9018113613128662,
-0.1243654415011406,
-0.5482569336891174,
-0.4533376693725586,
-0.033208027482032776,
0.38707125186920166,
-0.32856157422065735,
-0.38588160276412964,
-0.6851985454559326,
-0.854502260684967,
0.4471565783023834,
-0.3617728650569916,
0.9897469878196716,
-0.3386920690536499,
1.7680976390838623,
-0.612960159778595,
0.4508027136325836,
0.782386064529419,
1.2389838695526123,
0.26857101917266846,
0.1122729554772377,
0.2650202810764313,
0.42771103978157043,
-0.056852422654628754,
0.539306104183197,
1.1307010650634766,
0.5861976742744446,
0.5214131474494934,
0.7567503452301025,
-2.2016706466674805,
1.2278748750686646,
-1.0487732887268066,
0.1832570731639862,
1.3675754070281982,
-0.8319524526596069,
0.3471699655056,
-1.7946778535842896,
-0.054365597665309906,
0.6239640116691589,
-2.249744176864624,
0.3854021430015564,
-1.3326407670974731,
-0.6232007741928101,
0.9499099850654602,
0.35798147320747375,
-1.1408894062042236,
0.17718102037906647,
-0.45804375410079956,
0.9788802266120911,
0.38289517164230347,
1.0698578357696533,
-1.6902134418487549,
-0.1101049855351448,
-0.25042518973350525,
0.07483114302158356,
-1.304215431213379,
-1.5094068050384521,
0.560919463634491,
0.5566526651382446,
0.5296890139579773,
-0.040193334221839905,
1.0332735776901245,
-1.0784722566604614,
0.7803454399108887,
-1.0157816410064697,
-1.658644199371338,
-1.463940143585205,
-2.2435309886932373,
-2.210935592651367,
0.7571578621864319,
-0.46254393458366394,
-0.5080819725990295,
2.0414817333221436,
-0.9183347225189209,
-1.7118488550186157,
1.1440147161483765,
0.3221372067928314,
0.02806415595114231,
2.3826498985290527,
0.20429223775863647,
-0.6922142505645752,
0.48466309905052185,
-0.7813135385513306,
0.78876793384552,
-0.320614755153656,
1.331502914428711,
0.4314808249473572,
-0.9658343195915222,
1.599643349647522,
-0.3965408205986023,
0.633204460144043,
-0.6826959252357483,
-0.5402647852897644,
-0.6781445145606995,
0.28040510416030884,
1.8895198106765747,
-0.311710000038147,
1.5615394115447998,
-0.22979602217674255,
-1.5321787595748901,
-1.5532513856887817,
0.8825275301933289,
0.5019526481628418,
-0.8030576705932617,
-0.0009896215051412582,
-0.3727048337459564,
0.1617528200149536,
-0.18638090789318085,
1.190071940422058,
1.3173112869262695,
0.7418421506881714,
-0.38067513704299927,
-0.7768363356590271,
0.13646931946277618,
-0.05090802162885666,
-0.825438916683197,
-1.772260308265686,
-0.3280247747898102,
0.2346314936876297,
0.5443147420883179,
-1.2879475355148315,
1.769066333770752,
0.846858561038971,
1.9578068256378174,
0.9993435144424438,
-0.43500855565071106,
1.5139610767364502,
0.10468778759241104,
1.8243857622146606,
-0.5188766717910767,
0.6219780445098877,
-0.32544443011283875,
-1.1682400703430176,
0.9214491248130798,
-0.2903043329715729,
-2.0312466621398926,
-0.7633601427078247,
-0.7280378341674805,
-0.15608353912830353,
-0.7081950306892395,
0.9251613616943359,
-0.2593560516834259,
-1.4200938940048218,
0.1615394800901413,
-0.7654159069061279,
0.0801033228635788,
-1.2181622982025146,
0.25177332758903503,
0.6274163722991943,
-0.6197683215141296,
0.10827117413282394,
-0.1528773009777069,
-1.2543857097625732,
-0.472342312335968,
0.33183538913726807,
1.913629174232483,
-0.7010257840156555,
0.893121600151062,
1.076633095741272,
-0.6257652044296265,
0.10152573883533478,
0.30990010499954224,
-0.4529147148132324,
0.8002763390541077,
-1.1049988269805908,
-0.5247326493263245,
1.2174745798110962,
-0.19082273542881012,
-0.6902578473091125,
1.4790726900100708,
0.7379416227340698,
-1.0505539178848267,
-0.28743165731430054,
-0.1881212443113327,
-0.8537497520446777,
0.03878537565469742,
-1.534433126449585,
-0.22831037640571594,
0.3487503230571747,
-1.5456738471984863,
-0.43344640731811523,
-0.24251842498779297,
1.3649659156799316,
-0.28093206882476807,
1.4675579071044922,
-0.37091678380966187,
-0.22978268563747406,
-0.3249152898788452,
-0.4522708058357239,
0.11605262011289597,
-0.24996380507946014,
-0.5874571800231934,
0.18889927864074707,
-0.843238353729248,
0.33207347989082336,
1.4356708526611328,
0.24538661539554596,
0.0890447273850441,
0.40744251012802124,
1.0313878059387207,
0.4045506715774536,
-0.05848304182291031,
-0.9246605038642883,
-1.4355030059814453,
1.9770146608352661,
-1.4089170694351196,
2.0327091217041016,
0.8494765162467957,
-0.012933718040585518,
-1.7959920167922974,
-1.9056671857833862,
1.2599220275878906,
1.1193684339523315,
2.3079476356506348,
0.4959545135498047,
0.429731547832489,
-0.8316335678100586,
-0.636867344379425,
0.31608229875564575,
-1.0721869468688965,
-0.5817837715148926,
0.2571702003479004,
2.3857409954071045,
1.7337274551391602,
-0.4626223146915436,
-0.1818908154964447,
-0.9963647723197937,
1.334985613822937,
-0.22018402814865112,
0.23573742806911469,
2.0859603881835938,
-0.21632933616638184,
-1.0739593505859375,
1.2873079776763916,
-2.304323196411133,
0.19346098601818085,
2.0177860260009766,
0.21645411849021912,
0.15128661692142487,
-1.3765681982040405,
-0.745822012424469,
-0.35095930099487305,
-0.41340169310569763,
-1.1355477571487427,
0.5734625458717346,
-0.22317488491535187,
-0.8532578349113464,
-1.456006407737732,
0.13330933451652527,
-1.1678637266159058,
-1.7206212282180786,
0.25264087319374084,
1.937633991241455,
1.9969366788864136,
-0.8344941139221191,
1.522813320159912,
-0.3296160399913788,
-0.07437348365783691,
1.234044075012207,
1.2773762941360474,
3.1290283203125,
1.8725024461746216,
-1.3019793033599854,
0.6557232737541199,
-0.15711872279644012,
-0.47278526425361633,
1.1232820749282837,
-1.2160645723342896,
1.2846678495407104,
-0.19136075675487518,
-1.1023105382919312,
-1.2266868352890015,
0.9643899202346802,
0.43778201937675476,
0.06443851441144943,
-0.4964213967323303,
1.1181882619857788,
0.16980038583278656,
1.381212830543518,
0.5496368408203125,
-0.33746644854545593,
0.6452274322509766,
-0.3257301151752472,
-0.43476739525794983,
1.5958027839660645,
0.09611989557743073,
-1.4899039268493652,
-2.362787961959839,
-0.23006190359592438,
-0.8365198373794556,
0.061640702188014984,
-0.569468080997467,
-1.093300700187683,
1.7490181922912598,
0.34665894508361816,
-1.2875750064849854,
-0.3224776089191437,
-0.35150346159935,
-0.5269904732704163,
2.764370918273926,
-1.310616135597229,
-0.23982061445713043,
-0.9736866354942322,
-0.6615745425224304,
1.7006205320358276,
-1.165350079536438,
-0.2822141647338867,
-0.950035810470581,
-0.4862516522407532,
-1.2567073106765747,
-0.48939743638038635,
0.04610792547464371,
-0.8976911306381226,
0.8538196086883545,
0.13879308104515076,
-1.1529484987258911,
-0.3594062030315399,
-0.8676052093505859,
0.9567111730575562,
-0.11203561723232269,
0.1953323930501938,
1.9558889865875244,
0.392829954624176,
-0.33712050318717957,
0.7104527354240417,
1.1874231100082397,
0.6406130194664001,
-0.6869975328445435,
0.11938474327325821,
-0.6340521574020386,
0.2791712284088135,
-1.426522135734558,
0.31963029503822327,
-2.8143463134765625,
0.668578565120697,
-0.0695292130112648,
-0.12434034794569016,
0.039769455790519714,
-1.295921802520752,
1.1672391891479492,
2.612346649169922,
-1.2048426866531372,
0.4091685712337494,
0.36623501777648926,
1.077514410018921,
-1.616053581237793,
0.3639385402202606,
-0.30765798687934875,
2.062046766281128,
0.17909201979637146,
1.2105828523635864,
-0.4498029053211212,
-2.2716281414031982,
0.6739795207977295,
-1.2570465803146362,
-1.1780167818069458,
0.7706322073936462,
-0.8705959320068359,
0.16767941415309906,
-1.5247046947479248,
-0.23712188005447388,
-0.9195380806922913,
-1.2308915853500366,
0.627127468585968,
0.12876355648040771,
0.44117456674575806,
-0.5821758508682251,
0.3386222720146179,
-2.204519033432007,
-1.4096647500991821,
-0.2225015014410019,
-0.9423399567604065,
0.5310076475143433,
-0.4277147650718689,
0.7775723934173584,
-0.1698174923658371,
0.02971380017697811,
0.3554072678089142,
1.5159720182418823,
3.4657950401306152,
0.20591965317726135,
0.27608978748321533,
-0.19419759511947632,
-0.9413362145423889,
1.4097591638565063,
0.9403759241104126,
-0.030198054388165474,
-0.594523012638092,
-1.0077166557312012,
1.182342529296875,
2.116110324859619,
1.0138250589370728,
-0.011414501816034317,
-0.8702436089515686,
-0.7085257768630981,
-0.13014085590839386,
0.22811327874660492,
0.44749024510383606,
0.9556846618652344,
0.024605752900242805,
-0.012074816040694714,
1.4740619659423828,
1.2035369873046875,
-0.3541136682033539,
0.224069744348526,
-0.8722010850906372,
-0.42843616008758545,
0.48969754576683044,
0.2678622305393219,
0.05061686038970947,
0.48112964630126953,
-1.0470911264419556,
-0.3032086491584778,
-0.43371978402137756,
-0.9205304980278015,
-0.7130370140075684,
-0.4190717041492462,
-0.39434123039245605,
1.5788241624832153,
0.14679543673992157,
-0.43903976678848267,
-0.012797992676496506,
-0.7213128805160522,
-0.12124684453010559,
-1.1453301906585693,
0.18343985080718994,
-0.14433550834655762,
-0.08672544360160828,
-0.1465926468372345,
1.7117083072662354,
-0.9283517003059387,
-1.981505274772644,
0.16107863187789917,
0.21483390033245087,
-0.3434273898601532,
0.2874309718608856,
1.7056103944778442,
0.5040021538734436,
1.385517954826355,
1.2271697521209717,
0.8842941522598267,
-0.6046175956726074,
-1.2757388353347778,
0.6945596933364868,
1.0500264167785645,
-1.3761634826660156,
0.8306649327278137,
-0.07070417702198029,
-0.49061986804008484,
0.6574781537055969,
1.2736519575119019,
0.5066272020339966,
-2.01491641998291,
0.7404070496559143,
-0.9133810997009277,
0.7923258543014526,
0.6776759624481201,
0.663087785243988,
0.1654878556728363,
0.7932341694831848,
-1.2291688919067383,
-1.0502278804779053,
-0.6650313138961792,
-0.6703174114227295,
1.9566606283187866,
-0.32744526863098145,
0.6083308458328247,
-0.25141772627830505,
-1.2379868030548096,
-0.07632151246070862,
0.7141101360321045,
0.43308025598526,
-0.5022151470184326,
0.7751622200012207,
-0.6353302597999573,
-1.0175236463546753,
-1.2565741539001465,
-0.3542942702770233,
-0.9985986948013306,
-0.9504209756851196,
1.029322862625122,
0.7916992902755737,
0.37227293848991394,
1.9003937244415283,
0.7406520247459412,
0.276746541261673,
-2.5575695037841797,
0.9329408407211304,
0.36724594235420227,
-0.1257798969745636,
0.9538100361824036,
0.29293572902679443,
1.0556049346923828,
0.029761290177702904,
0.5440841913223267,
-2.4207770824432373,
2.2751102447509766,
-0.18495213985443115,
0.6285879015922546,
0.0077185072004795074,
-0.19666741788387299,
1.1075432300567627,
0.6039113998413086,
0.44953668117523193,
-1.081598162651062,
0.6516949534416199,
-0.5068017840385437,
1.1536937952041626,
0.8680299520492554,
-0.8029198050498962,
0.012285197153687477,
1.4040902853012085,
0.5507625937461853,
-0.5306785702705383,
-0.8469443917274475,
-0.870720386505127,
0.9720882177352905,
1.700163722038269,
-0.06905576586723328,
-0.004381274804472923,
0.8736404776573181,
0.6178306937217712,
-1.274603247642517,
0.05287778377532959,
-0.7647950053215027,
-0.7758892178535461,
1.611487627029419,
2.081852912902832,
-0.10845188051462173,
-0.21184594929218292,
-0.7250561118125916,
-1.2967395782470703,
0.8425599336624146,
-0.12256127595901489,
0.20299971103668213,
0.5311600565910339,
-0.6299222707748413,
1.1175594329833984,
0.762169361114502,
1.0071871280670166,
0.2053084671497345,
0.3050834536552429,
0.4225011169910431,
-0.4431617558002472,
-1.151293158531189,
-0.3281426727771759,
-1.072631597518921,
-2.5318400859832764,
0.5100833773612976,
-0.18234717845916748,
-1.4530662298202515,
-0.03576624393463135,
-1.072816252708435,
0.9505538940429688,
-0.6139155626296997,
-0.9968615174293518,
-1.5498631000518799,
0.256197452545166,
-0.112127386033535,
0.9566690325737,
-1.5646789073944092,
-0.26108381152153015,
1.231261968612671,
0.8985692858695984,
-0.6934792399406433,
0.9173710942268372,
0.18186400830745697,
1.0828771591186523,
0.7988361120223999,
-0.3522079288959503,
0.5247225165367126,
0.07231534272432327,
-1.3227885961532593,
0.42666539549827576,
1.2295738458633423,
0.15234863758087158,
1.5197668075561523,
-0.48675620555877686,
0.1011950895190239,
0.3640143871307373,
-0.5458238124847412,
-0.5481631755828857,
-0.5113359093666077,
0.6810267567634583,
0.06669508665800095,
-0.9849242568016052,
-0.07972243428230286,
-0.13074883818626404,
-0.24433141946792603,
0.0884660854935646,
-1.4465190172195435,
-0.17251385748386383,
-0.35841697454452515,
-0.631830632686615,
-1.2415547370910645,
-0.028625382110476494,
1.3655319213867188,
-0.7583630681037903,
-0.1795947402715683,
0.46328210830688477,
0.4029342532157898,
0.553388237953186,
0.5837303400039673,
-0.7629176378250122,
-0.40017569065093994,
-0.2930237352848053,
-0.31229352951049805,
0.35946959257125854,
1.3591759204864502,
-0.0035894084721803665,
-0.9498192667961121,
0.7004989981651306,
-0.42110675573349,
0.12659230828285217,
2.03271484375,
0.061918459832668304,
-0.7795429825782776,
0.33758610486984253,
-0.6739866733551025,
1.9247640371322632,
1.7371467351913452,
1.2460798025131226,
-0.15254054963588715,
-0.8860875368118286,
0.6501352787017822,
-0.38783496618270874,
-0.4364681839942932,
0.8638899326324463,
0.30972471833229065,
-0.22812415659427643,
-1.452567458152771,
0.6650148034095764,
1.2976187467575073,
-0.8755232095718384,
-0.8427450060844421,
0.18803110718727112,
-0.8647794127464294,
1.0329192876815796,
0.5801271200180054,
0.39713993668556213,
0.3760722577571869,
1.5737295150756836,
0.8445245027542114,
-0.5356289744377136,
0.4815932810306549,
0.5603914260864258,
-0.13101141154766083,
-2.0817770957946777,
-1.2197338342666626,
0.3974215090274811,
-0.5245910882949829,
-1.6262861490249634,
1.438867449760437,
-1.1735888719558716,
-1.056138515472412,
0.6177289485931396,
0.08653753995895386,
1.3482111692428589,
0.36052635312080383,
1.5943831205368042,
2.119455575942993,
0.8808115720748901,
0.39171865582466125,
1.257716178894043,
-0.16236244142055511,
-0.5299683809280396,
1.930139183998108,
-0.46575024724006653,
0.5024550557136536,
1.0694862604141235,
-0.3810485601425171,
-1.0788097381591797,
-0.7895596623420715,
-1.2186181545257568,
-0.720230221748352,
1.2685961723327637,
0.06752513349056244,
-1.0859299898147583,
0.21002468466758728,
1.6329066753387451,
0.13174837827682495,
-0.3671930730342865,
0.6549921631813049,
0.37266117334365845,
-0.8548892140388489,
-0.03235728293657303,
-0.8861808180809021,
0.5746762156486511,
-0.11450190842151642,
-0.31207868456840515,
0.36145514249801636,
0.5028524398803711,
1.3840231895446777,
-0.10704347491264343,
0.08117400854825974,
1.0520626306533813,
-1.4647727012634277,
1.640487551689148,
-0.6401640176773071,
0.24921436607837677,
-2.3728039264678955,
1.3008713722229004,
-0.6945499181747437,
1.9477920532226562,
-2.58015513420105,
0.3833455443382263,
-0.5292971730232239,
-0.46327826380729675,
0.22840507328510284,
-0.4025998115539551,
0.1639816164970398,
-0.14620040357112885,
-1.1004165410995483,
-0.05661022663116455,
-0.6983624696731567,
0.6653998494148254,
1.1472747325897217,
1.4141087532043457,
-1.141800880432129,
-0.3181953728199005,
-1.7327134609222412,
-0.16431091725826263,
-0.8039368987083435,
0.2084222286939621,
-1.9858355522155762,
-0.21646007895469666,
-1.8585667610168457,
-2.3500547409057617,
-1.3698841333389282,
-0.8049774765968323,
1.0472471714019775,
0.09483678638935089,
-0.9301208257675171,
1.1975971460342407,
-0.38866427540779114,
-1.8428043127059937,
1.189908504486084,
-2.147153854370117
] |
https://github.com/huggingface/datasets/issues/3337 | Typing of Dataset.__getitem__ could be improved. | Hi ! Thanks for the suggestion, I didn't know about this decorator.
If you are interesting in contributing, feel free to open a pull request to add the overload methods for each typing combination :) To assign you to this issue, you can comment `#self-assign` in this thread.
`Dataset.__getitem__` is defined right here: https://github.com/huggingface/datasets/blob/e6f1352fe19679de897f3d962e616936a17094f5/src/datasets/arrow_dataset.py#L1840 | ## Describe the bug
The newly added typing for Dataset.__getitem__ is Union[Dict, List]. This makes tools like mypy a bit awkward to use as we need to check the type manually. We could use type overloading to make this easier. [Documentation](https://docs.python.org/3/library/typing.html#typing.overload)
## Steps to reproduce the bug
Let's have a file `test.py`
```python
from typing import List, Dict, Any
from datasets import Dataset
ds = Dataset.from_dict({
'a': [1,2,3],
'b': ["1", "2", "3"]
})
one_colum: List[str] = ds['a']
some_index: Dict[Any, Any] = ds[1]
```
## Expected results
Running `mypy test.py` should not give any error.
## Actual results
```
test.py:10: error: Incompatible types in assignment (expression has type "Union[Dict[Any, Any], List[Any]]", variable has type "List[str]")
test.py:11: error: Incompatible types in assignment (expression has type "Union[Dict[Any, Any], List[Any]]", variable has type "Dict[Any, Any]")
Found 2 errors in 1 file (checked 1 source file)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.1
| 1,086 | 54 | Typing of Dataset.__getitem__ could be improved.
## Describe the bug
The newly added typing for Dataset.__getitem__ is Union[Dict, List]. This makes tools like mypy a bit awkward to use as we need to check the type manually. We could use type overloading to make this easier. [Documentation](https://docs.python.org/3/library/typing.html#typing.overload)
## Steps to reproduce the bug
Let's have a file `test.py`
```python
from typing import List, Dict, Any
from datasets import Dataset
ds = Dataset.from_dict({
'a': [1,2,3],
'b': ["1", "2", "3"]
})
one_colum: List[str] = ds['a']
some_index: Dict[Any, Any] = ds[1]
```
## Expected results
Running `mypy test.py` should not give any error.
## Actual results
```
test.py:10: error: Incompatible types in assignment (expression has type "Union[Dict[Any, Any], List[Any]]", variable has type "List[str]")
test.py:11: error: Incompatible types in assignment (expression has type "Union[Dict[Any, Any], List[Any]]", variable has type "Dict[Any, Any]")
Found 2 errors in 1 file (checked 1 source file)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.13.3
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.1
Hi ! Thanks for the suggestion, I didn't know about this decorator.
If you are interesting in contributing, feel free to open a pull request to add the overload methods for each typing combination :) To assign you to this issue, you can comment `#self-assign` in this thread.
`Dataset.__getitem__` is defined right here: https://github.com/huggingface/datasets/blob/e6f1352fe19679de897f3d962e616936a17094f5/src/datasets/arrow_dataset.py#L1840 | [
-1.1803699731826782,
-0.7773115634918213,
-0.7773503661155701,
1.491865873336792,
-0.17560569941997528,
-1.230209469795227,
0.1488538384437561,
-1.1589012145996094,
1.726990818977356,
-0.7727787494659424,
0.3203287422657013,
-1.6875474452972412,
0.06274601072072983,
-0.6856354475021362,
-0.7855624556541443,
-0.8486647605895996,
-0.40168246626853943,
-0.6424645185470581,
1.0173332691192627,
2.4329586029052734,
1.1681138277053833,
-1.4660152196884155,
2.6164116859436035,
0.7686216831207275,
-0.16607849299907684,
-0.9457686543464661,
0.5695650577545166,
-0.0028756330721080303,
-1.3876264095306396,
-0.3769606649875641,
-0.9854944944381714,
-0.1453036665916443,
-0.6117485165596008,
-0.5081365704536438,
0.006009765900671482,
0.433564156293869,
-0.203617662191391,
-0.4396272301673889,
-0.5880993008613586,
-0.8478099703788757,
0.38634127378463745,
-0.37754184007644653,
0.9446237087249756,
-0.3233312666416168,
1.7508569955825806,
-0.6671237945556641,
0.44628241658210754,
0.7348785400390625,
1.3063081502914429,
0.1856532096862793,
0.03797060623764992,
0.3142579197883606,
0.4432864189147949,
-0.07498235255479813,
0.4838099479675293,
1.12135648727417,
0.7243930101394653,
0.4911515712738037,
0.8094701766967773,
-2.1969597339630127,
1.2640752792358398,
-1.0609567165374756,
0.3130173981189728,
1.3611012697219849,
-0.9409046769142151,
0.3687450587749481,
-1.8054970502853394,
-0.04456418380141258,
0.6375101804733276,
-2.1795554161071777,
0.31150731444358826,
-1.378042221069336,
-0.5633147358894348,
0.9291990995407104,
0.4237782061100006,
-1.2253257036209106,
0.14192485809326172,
-0.4422060251235962,
0.9858730435371399,
0.3749805688858032,
1.0919725894927979,
-1.7438836097717285,
-0.007604298181831837,
-0.3893020451068878,
0.19153165817260742,
-1.2421607971191406,
-1.506556510925293,
0.6393178105354309,
0.665561854839325,
0.4969460368156433,
-0.11544416844844818,
0.8953039646148682,
-1.0887941122055054,
0.8077496290206909,
-1.0709713697433472,
-1.8339200019836426,
-1.3813049793243408,
-2.2613139152526855,
-2.2204015254974365,
0.7545024752616882,
-0.4408160150051117,
-0.4944227635860443,
2.065114736557007,
-0.9416374564170837,
-1.6575309038162231,
1.1078130006790161,
0.26159751415252686,
-0.02539844997227192,
2.460157632827759,
0.1299719512462616,
-0.7686305046081543,
0.45063167810440063,
-0.8089699149131775,
0.7292213439941406,
-0.37698811292648315,
1.2904675006866455,
0.38418808579444885,
-1.0451668500900269,
1.6322216987609863,
-0.36431822180747986,
0.56556236743927,
-0.7127493619918823,
-0.4807077646255493,
-0.609340250492096,
0.277773916721344,
1.8860582113265991,
-0.2652180790901184,
1.4570069313049316,
-0.26450976729393005,
-1.5085220336914062,
-1.565550684928894,
0.8795970678329468,
0.5756746530532837,
-0.7583668828010559,
0.07256752997636795,
-0.35095342993736267,
0.1810743510723114,
-0.1044871136546135,
1.1667869091033936,
1.3553401231765747,
0.6945530772209167,
-0.27452775835990906,
-0.8180966377258301,
0.06997542083263397,
-0.05405983328819275,
-0.8636108040809631,
-1.7819716930389404,
-0.3233305811882019,
0.10149368643760681,
0.6921198964118958,
-1.2404873371124268,
1.8189431428909302,
0.8209086060523987,
1.9321728944778442,
1.0230716466903687,
-0.433927983045578,
1.5662226676940918,
0.06440036743879318,
1.851047396659851,
-0.5657775402069092,
0.6655997037887573,
-0.4190986752510071,
-1.1792203187942505,
0.9403784871101379,
-0.32162949442863464,
-2.03124737739563,
-0.6423954963684082,
-0.8218392729759216,
-0.18615543842315674,
-0.7447788715362549,
0.9142341017723083,
-0.2728722393512726,
-1.3803037405014038,
0.2851716876029968,
-0.7736116647720337,
0.06262395530939102,
-1.2128772735595703,
0.2692427635192871,
0.675976574420929,
-0.564782440662384,
0.13097599148750305,
-0.27997100353240967,
-1.3185269832611084,
-0.4782973825931549,
0.2894376516342163,
1.8188661336898804,
-0.7667691707611084,
0.9099571704864502,
1.0517706871032715,
-0.6444740891456604,
-0.09080561995506287,
0.44639188051223755,
-0.3174329996109009,
0.9014526605606079,
-1.0969576835632324,
-0.6078646779060364,
1.0836738348007202,
-0.11298904567956924,
-0.5716367959976196,
1.50888192653656,
0.683803379535675,
-0.9600517153739929,
-0.2984069585800171,
-0.10931942611932755,
-0.8996151089668274,
0.10848218202590942,
-1.6561046838760376,
-0.09676804393529892,
0.4524344801902771,
-1.5840502977371216,
-0.43118980526924133,
-0.10971645265817642,
1.3153399229049683,
-0.14434456825256348,
1.391685128211975,
-0.2714880108833313,
-0.1824161261320114,
-0.33591750264167786,
-0.39062851667404175,
0.08577598631381989,
-0.2571868300437927,
-0.5471975803375244,
0.19522346556186676,
-0.7406991124153137,
0.306482195854187,
1.400736689567566,
0.2984839677810669,
0.034038495272397995,
0.498305082321167,
1.1086550951004028,
0.36535826325416565,
-0.04770095646381378,
-0.9501371383666992,
-1.5021514892578125,
1.9814269542694092,
-1.4775174856185913,
2.0460212230682373,
0.8177412152290344,
-0.014765003696084023,
-1.8123608827590942,
-1.9039340019226074,
1.4802913665771484,
1.116197109222412,
2.3444936275482178,
0.6039775609970093,
0.3780117630958557,
-0.8322833776473999,
-0.5978769063949585,
0.3298690915107727,
-0.9455534219741821,
-0.7506875991821289,
0.19678016006946564,
2.446490526199341,
1.6691921949386597,
-0.36372771859169006,
-0.21259711682796478,
-1.0524331331253052,
1.442859172821045,
-0.16715207695960999,
0.20359845459461212,
2.0350348949432373,
-0.22722813487052917,
-1.1080092191696167,
1.1903642416000366,
-2.3205971717834473,
0.152589812874794,
1.9975576400756836,
0.24938470125198364,
0.08719699084758759,
-1.3527776002883911,
-0.6376559138298035,
-0.36345982551574707,
-0.441127747297287,
-1.2527512311935425,
0.522603452205658,
-0.22820836305618286,
-0.7746108770370483,
-1.459342122077942,
0.1473587155342102,
-1.187744140625,
-1.6739840507507324,
0.17690782248973846,
1.9085782766342163,
2.042372941970825,
-0.8067717552185059,
1.5359506607055664,
-0.370763897895813,
0.13994231820106506,
1.2276792526245117,
1.2150861024856567,
3.0551137924194336,
1.9845130443572998,
-1.2698776721954346,
0.6340551972389221,
-0.16019059717655182,
-0.43925806879997253,
1.0803492069244385,
-1.1627566814422607,
1.258931279182434,
-0.1625453382730484,
-1.1944401264190674,
-1.1562556028366089,
0.9780320525169373,
0.45233362913131714,
0.03122420236468315,
-0.5031642913818359,
1.238777995109558,
0.04333839192986488,
1.3580801486968994,
0.5977376103401184,
-0.21469815075397491,
0.536716639995575,
-0.36155441403388977,
-0.4638683497905731,
1.6396825313568115,
0.2262948602437973,
-1.405042290687561,
-2.385915756225586,
-0.1949024796485901,
-0.855838418006897,
0.04140543192625046,
-0.7023701071739197,
-1.053349256515503,
1.6978927850723267,
0.28527161478996277,
-1.3001726865768433,
-0.17829954624176025,
-0.3174383342266083,
-0.6128759980201721,
2.7452690601348877,
-1.4287338256835938,
-0.23765717446804047,
-1.0314561128616333,
-0.6141762733459473,
1.6455646753311157,
-1.1245815753936768,
-0.16570022702217102,
-1.0010144710540771,
-0.4894900918006897,
-1.250850796699524,
-0.5331292152404785,
0.001222238875925541,
-0.9423107504844666,
0.7938098907470703,
0.14191453158855438,
-1.3046129941940308,
-0.3446773290634155,
-0.8544754981994629,
0.8646785020828247,
-0.10350526869297028,
0.2824897766113281,
2.0124175548553467,
0.34490981698036194,
-0.31106072664260864,
0.7233946919441223,
1.148789644241333,
0.7376139760017395,
-0.5847430229187012,
0.1892535239458084,
-0.581934928894043,
0.37797921895980835,
-1.2732226848602295,
0.26186636090278625,
-2.802652597427368,
0.6699541807174683,
0.007265373133122921,
-0.023442327976226807,
-0.038286954164505005,
-1.279388427734375,
1.088416337966919,
2.605045795440674,
-1.1506301164627075,
0.4392183721065521,
0.2648005783557892,
1.242780089378357,
-1.5238630771636963,
0.2464483380317688,
-0.45244744420051575,
2.1387383937835693,
0.1217307299375534,
1.173917293548584,
-0.42545634508132935,
-2.338683605194092,
0.5995548367500305,
-1.2693017721176147,
-1.1517682075500488,
0.7642002701759338,
-0.7987902164459229,
0.11522883176803589,
-1.4491811990737915,
-0.18786323070526123,
-0.8594202995300293,
-1.1639626026153564,
0.6477027535438538,
0.08882695436477661,
0.4999287724494934,
-0.6910176873207092,
0.35736533999443054,
-2.187946081161499,
-1.4310379028320312,
-0.1973264068365097,
-0.8829870820045471,
0.5892074704170227,
-0.2847675383090973,
0.7886263728141785,
-0.13856054842472076,
-0.00008053146302700043,
0.2724299728870392,
1.4408339262008667,
3.392127275466919,
0.16603276133537292,
0.3451879322528839,
-0.2660430669784546,
-0.9433038830757141,
1.4213875532150269,
0.9714078307151794,
-0.05355590581893921,
-0.5642869472503662,
-1.0046122074127197,
1.2951090335845947,
1.9838494062423706,
0.9667614102363586,
-0.019891589879989624,
-0.8016605973243713,
-0.7766754031181335,
0.014256739057600498,
0.22046132385730743,
0.36187589168548584,
0.9049603939056396,
0.09328419715166092,
0.038761936128139496,
1.477819561958313,
1.2051998376846313,
-0.4634384214878082,
0.3486969470977783,
-0.8348259329795837,
-0.43471968173980713,
0.555578887462616,
0.29720306396484375,
0.04335113614797592,
0.34067612886428833,
-1.0268886089324951,
-0.33093491196632385,
-0.33762213587760925,
-0.8544432520866394,
-0.7669628858566284,
-0.370472252368927,
-0.4142220616340637,
1.6638466119766235,
0.10984618216753006,
-0.518088161945343,
0.009447901509702206,
-0.7391365170478821,
-0.03926781937479973,
-1.03596031665802,
0.281809002161026,
-0.14482395350933075,
-0.04764650762081146,
-0.11137357354164124,
1.8464003801345825,
-0.9281541109085083,
-1.9431935548782349,
0.19068372249603271,
0.22222700715065002,
-0.2851200997829437,
0.26863810420036316,
1.6944776773452759,
0.6432955265045166,
1.438423752784729,
1.313241720199585,
0.9295713901519775,
-0.6427904367446899,
-1.3648971319198608,
0.5867140889167786,
1.08135187625885,
-1.3952183723449707,
0.7995686531066895,
-0.025673743337392807,
-0.5459117293357849,
0.6329998970031738,
1.3586633205413818,
0.4760265350341797,
-2.0960803031921387,
0.7509276866912842,
-0.9680572152137756,
0.7786076664924622,
0.7108343839645386,
0.6923021674156189,
0.19433028995990753,
0.7310313582420349,
-1.2537842988967896,
-1.0735715627670288,
-0.7311894297599792,
-0.6602628231048584,
1.8997912406921387,
-0.3394843339920044,
0.5469186902046204,
-0.21749915182590485,
-1.3418086767196655,
-0.16574448347091675,
0.6757892966270447,
0.4436541497707367,
-0.46883198618888855,
0.7636309862136841,
-0.6532588601112366,
-1.1333178281784058,
-1.2691493034362793,
-0.5039121508598328,
-0.972146213054657,
-0.9538771510124207,
1.017749309539795,
0.8602498769760132,
0.49883216619491577,
1.858612298965454,
0.6142144799232483,
0.17795804142951965,
-2.5566513538360596,
0.884858250617981,
0.36402055621147156,
-0.1924358308315277,
0.8034341335296631,
0.40492668747901917,
1.0093960762023926,
-0.08600638806819916,
0.5698366761207581,
-2.452793836593628,
2.403473377227783,
-0.2299540936946869,
0.70625901222229,
0.017954237759113312,
-0.09366301447153091,
1.0447981357574463,
0.506381094455719,
0.5466994643211365,
-1.0037904977798462,
0.6016573905944824,
-0.5767319202423096,
1.2694357633590698,
0.8259902000427246,
-0.7136762142181396,
-0.056477658450603485,
1.2969117164611816,
0.48684588074684143,
-0.5358536839485168,
-0.91511070728302,
-0.9208785891532898,
0.9138567447662354,
1.7780369520187378,
-0.047326695173978806,
0.008686729706823826,
0.85588538646698,
0.5626273155212402,
-1.2633761167526245,
0.02103900909423828,
-0.7982917428016663,
-0.7668656706809998,
1.5973180532455444,
2.109652042388916,
-0.2374327927827835,
-0.13522844016551971,
-0.7114542126655579,
-1.288131594657898,
0.7459998726844788,
-0.033249158412218094,
0.10474026948213577,
0.5779650807380676,
-0.5695396661758423,
0.9921149611473083,
0.8823372721672058,
0.9998708367347717,
0.25346285104751587,
0.280225932598114,
0.30281341075897217,
-0.35950767993927,
-1.208497405052185,
-0.2379535734653473,
-0.9831103086471558,
-2.4871342182159424,
0.38965877890586853,
-0.21867960691452026,
-1.394848108291626,
-0.031190916895866394,
-1.0659663677215576,
0.8583115339279175,
-0.525397002696991,
-1.0704292058944702,
-1.5146551132202148,
0.3575209975242615,
-0.05515141412615776,
0.9545560479164124,
-1.6612352132797241,
-0.1233028843998909,
1.1963591575622559,
0.9225543737411499,
-0.7283580899238586,
0.9746034741401672,
0.2865579128265381,
1.141235589981079,
0.9067334532737732,
-0.30138665437698364,
0.4686987102031708,
0.06854785978794098,
-1.3121193647384644,
0.4920837879180908,
1.1943471431732178,
0.08128631114959717,
1.4628965854644775,
-0.5367236733436584,
-0.049743276089429855,
0.36837708950042725,
-0.4021669030189514,
-0.3556538224220276,
-0.633072555065155,
0.6306118369102478,
0.11036935448646545,
-0.9209747910499573,
-0.08269844949245453,
0.025432389229536057,
-0.17601560056209564,
0.20794330537319183,
-1.4566688537597656,
-0.11826210469007492,
-0.36683109402656555,
-0.6226855516433716,
-1.246259331703186,
-0.03995678946375847,
1.3367323875427246,
-0.69219571352005,
-0.2185816764831543,
0.47612202167510986,
0.3279408812522888,
0.5123277902603149,
0.729979932308197,
-0.6460697054862976,
-0.5015725493431091,
-0.15531395375728607,
-0.40510210394859314,
0.3053867518901825,
1.405455231666565,
-0.12229856848716736,
-0.9778506755828857,
0.7069182991981506,
-0.394456148147583,
0.04523807018995285,
1.92841637134552,
0.082237608730793,
-0.8169733881950378,
0.2948758602142334,
-0.6692394614219666,
1.9894660711288452,
1.7769395112991333,
1.220461368560791,
-0.22492752969264984,
-0.9411582946777344,
0.6829343438148499,
-0.3868999183177948,
-0.3824581801891327,
0.8141583204269409,
0.3548000454902649,
-0.26041722297668457,
-1.4228299856185913,
0.6430028676986694,
1.3594526052474976,
-0.8398705720901489,
-0.8350798487663269,
0.17497161030769348,
-0.7740911841392517,
1.0862867832183838,
0.7354738116264343,
0.3817385137081146,
0.33531972765922546,
1.5624059438705444,
0.8284782767295837,
-0.5083145499229431,
0.5028650164604187,
0.5280141830444336,
-0.10429812222719193,
-2.132981300354004,
-1.202760100364685,
0.32034483551979065,
-0.49854233860969543,
-1.6867518424987793,
1.3891289234161377,
-1.201395869255066,
-0.9515765905380249,
0.5810738801956177,
0.05388858914375305,
1.3297916650772095,
0.30270159244537354,
1.5174663066864014,
1.9607188701629639,
0.8046063184738159,
0.42642471194267273,
1.3249539136886597,
-0.1657249629497528,
-0.4722748398780823,
1.77634596824646,
-0.5424540042877197,
0.469789057970047,
1.0851644277572632,
-0.24667371809482574,
-1.112477421760559,
-0.7453699111938477,
-1.1988205909729004,
-0.685325562953949,
1.1969945430755615,
0.049985483288764954,
-1.1825172901153564,
0.2875562310218811,
1.5827897787094116,
-0.0032716384157538414,
-0.3829614818096161,
0.6104407906532288,
0.369272381067276,
-0.800307035446167,
-0.12477126717567444,
-0.8728399872779846,
0.552448570728302,
-0.1466783732175827,
-0.3005523085594177,
0.4110686480998993,
0.41957852244377136,
1.3751946687698364,
0.00513811782002449,
0.11536014080047607,
1.106253981590271,
-1.467750072479248,
1.504679560661316,
-0.6654853224754333,
0.3386824131011963,
-2.3770716190338135,
1.335784673690796,
-0.6559258103370667,
1.947176218032837,
-2.6895363330841064,
0.38366636633872986,
-0.516699492931366,
-0.5015358328819275,
0.19898948073387146,
-0.24029701948165894,
0.14387741684913635,
-0.13102057576179504,
-1.1345789432525635,
-0.07014057040214539,
-0.7282988429069519,
0.5315359234809875,
1.0181143283843994,
1.4018135070800781,
-1.0761884450912476,
-0.19241560995578766,
-1.6783881187438965,
-0.11222996562719345,
-0.6930239796638489,
0.17912015318870544,
-1.9529829025268555,
-0.10399941354990005,
-1.9373047351837158,
-2.390228033065796,
-1.4333488941192627,
-0.8139063119888306,
1.0752962827682495,
0.06683260947465897,
-0.9194343686103821,
1.2144238948822021,
-0.3339407742023468,
-1.9472911357879639,
1.1309741735458374,
-2.143953561782837
] |
https://github.com/huggingface/datasets/issues/3334 | Integrate Polars library | Polars has grown rapidly in popularity over the last year - could you consider integrating the Polars functionality again?
I don't think the "custom" implementation should be a barrier, it still conforms to the Arrow specification | Check potential integration of the Polars library: https://github.com/pola-rs/polars
- Benchmark: https://h2oai.github.io/db-benchmark/
CC: @thomwolf @lewtun
| 1,087 | 36 | Integrate Polars library
Check potential integration of the Polars library: https://github.com/pola-rs/polars
- Benchmark: https://h2oai.github.io/db-benchmark/
CC: @thomwolf @lewtun
Polars has grown rapidly in popularity over the last year - could you consider integrating the Polars functionality again?
I don't think the "custom" implementation should be a barrier, it still conforms to the Arrow specification | [
-1.2392377853393555,
-0.8205507397651672,
-0.8597351908683777,
1.488020896911621,
-0.06807701289653778,
-1.2775708436965942,
0.08797913789749146,
-0.9521725177764893,
1.5974527597427368,
-0.8039279580116272,
0.33160409331321716,
-1.5023808479309082,
-0.1662060171365738,
-0.48083457350730896,
-0.7464417815208435,
-0.7886919975280762,
-0.46817928552627563,
-0.7227960824966431,
1.0817855596542358,
2.510481595993042,
1.2074263095855713,
-1.3956831693649292,
2.868663787841797,
0.7338907122612,
-0.16558216512203217,
-0.9750258326530457,
0.5629603862762451,
0.03229469805955887,
-1.3105549812316895,
-0.432696133852005,
-1.0705808401107788,
0.09246625006198883,
-0.48556965589523315,
-0.37847602367401123,
0.06670594215393066,
0.30363088846206665,
-0.16551703214645386,
-0.4739666283130646,
-0.5246375203132629,
-0.7686628699302673,
0.4047988951206207,
-0.2129875123500824,
0.8633405566215515,
-0.3423253297805786,
1.7993978261947632,
-0.37596526741981506,
0.25449445843696594,
0.6141220331192017,
1.346138834953308,
0.13239863514900208,
0.04929138347506523,
0.26575469970703125,
0.43208080530166626,
-0.046806130558252335,
0.4288877546787262,
1.2202280759811401,
0.5659067630767822,
0.525238573551178,
0.6623157262802124,
-2.0745849609375,
1.432984471321106,
-1.0216352939605713,
0.2746114134788513,
1.5462510585784912,
-1.042810082435608,
0.3686891198158264,
-1.8675434589385986,
0.05272441357374191,
0.4225686192512512,
-2.3513593673706055,
0.256635844707489,
-1.1406253576278687,
-0.5356720089912415,
0.9818918704986572,
0.26240256428718567,
-1.2884966135025024,
0.16386744379997253,
-0.4129544794559479,
0.946776807308197,
0.4478212594985962,
1.284382700920105,
-1.5905234813690186,
0.1756860613822937,
-0.18138720095157623,
-0.0011239182204008102,
-1.2935351133346558,
-1.5418832302093506,
0.5417858958244324,
0.5448493361473083,
0.6079828143119812,
-0.10759502649307251,
0.797410249710083,
-0.8266312479972839,
0.8252530097961426,
-0.6548478603363037,
-1.4939303398132324,
-1.3857178688049316,
-2.3456172943115234,
-2.3297574520111084,
0.8117074370384216,
-0.519896924495697,
-0.3820454180240631,
2.014199733734131,
-1.0723869800567627,
-1.8135184049606323,
1.0597689151763916,
0.3843287229537964,
0.17986880242824554,
2.3987526893615723,
0.3441410958766937,
-0.7219139337539673,
0.3916294574737549,
-0.7449836730957031,
0.9464045763015747,
-0.4141116738319397,
1.4781540632247925,
0.5132400989532471,
-1.065419316291809,
1.658706545829773,
-0.4346849024295807,
0.5293889045715332,
-0.6004371047019958,
-0.6332181692123413,
-0.8046342730522156,
0.33949044346809387,
1.8770086765289307,
-0.3270121216773987,
1.6245334148406982,
-0.4054451584815979,
-1.4779294729232788,
-1.6250258684158325,
0.7136794924736023,
0.7045056223869324,
-0.9096174836158752,
0.2032528817653656,
-0.42003747820854187,
-0.10018095374107361,
0.03987743705511093,
1.068215250968933,
1.309430480003357,
0.674199104309082,
-0.1259874403476715,
-0.8807982802391052,
0.12086904048919678,
0.043740954250097275,
-0.7069695591926575,
-1.7300282716751099,
-0.32368582487106323,
0.1782807856798172,
0.6253483891487122,
-1.2525032758712769,
1.6484769582748413,
0.9185169339179993,
2.0051629543304443,
0.8999914526939392,
-0.34015631675720215,
1.5506322383880615,
-0.12854191660881042,
1.7664510011672974,
-0.48145943880081177,
0.5109919905662537,
-0.3547784090042114,
-1.2317575216293335,
0.8508898615837097,
-0.39321643114089966,
-2.097480297088623,
-0.7660279273986816,
-0.9268690347671509,
-0.16181312501430511,
-0.6219455003738403,
1.0279901027679443,
-0.2775987982749939,
-1.1837093830108643,
0.05797715112566948,
-0.5929619073867798,
0.03294828534126282,
-1.3390036821365356,
0.3124750852584839,
0.7672762870788574,
-0.7552394866943359,
-0.11794319748878479,
-0.17695415019989014,
-1.3150818347930908,
-0.5400035977363586,
0.2745843827724457,
1.8847883939743042,
-0.7403958439826965,
0.9371354579925537,
1.015113115310669,
-0.8475301861763,
0.11889812350273132,
0.2818146049976349,
-0.4395389258861542,
0.8459430932998657,
-1.0636684894561768,
-0.4386364221572876,
1.169734001159668,
-0.16482262313365936,
-0.4859248101711273,
1.2220999002456665,
0.7368490695953369,
-1.052145004272461,
-0.3186230957508087,
-0.1268615871667862,
-0.768343985080719,
-0.04804382473230362,
-1.4591652154922485,
-0.12418331205844879,
0.046699658036231995,
-1.3773952722549438,
-0.6235536336898804,
-0.24850355088710785,
1.4718058109283447,
-0.24886156618595123,
1.4710195064544678,
-0.21970663964748383,
-0.11850319802761078,
-0.5234863758087158,
-0.5344748497009277,
0.21918118000030518,
-0.27264031767845154,
-0.541945219039917,
0.2700100839138031,
-0.8436026573181152,
0.32503220438957214,
1.5529597997665405,
0.4640768766403198,
0.02088398113846779,
0.5816071629524231,
1.010790228843689,
0.41880127787590027,
-0.04189736768603325,
-0.861563503742218,
-1.5529437065124512,
1.9479074478149414,
-1.4413362741470337,
1.9969433546066284,
0.7073137164115906,
-0.09411351382732391,
-1.6861729621887207,
-1.857036828994751,
1.2962380647659302,
1.2556959390640259,
2.276674747467041,
0.6422654390335083,
0.3172990679740906,
-0.8677513599395752,
-0.7505773901939392,
0.43764930963516235,
-0.8554087281227112,
-0.780256986618042,
0.12968921661376953,
2.2565078735351562,
1.6087050437927246,
-0.5994656085968018,
-0.22598926723003387,
-1.0034550428390503,
1.2561252117156982,
-0.17842364311218262,
0.2367846965789795,
1.8524361848831177,
-0.3030129671096802,
-1.2248177528381348,
1.1330188512802124,
-2.372530460357666,
0.323320209980011,
1.9211061000823975,
0.3966202437877655,
0.03321928530931473,
-1.526780128479004,
-0.7152160406112671,
-0.1121639609336853,
-0.5056996941566467,
-1.145226240158081,
0.6680194735527039,
-0.2936556041240692,
-1.0136394500732422,
-1.372985601425171,
0.026998858898878098,
-1.101134181022644,
-1.731052279472351,
0.5174670219421387,
2.004472494125366,
2.0807368755340576,
-0.7135637402534485,
1.4523965120315552,
-0.2254151999950409,
-0.07548290491104126,
1.1455342769622803,
1.26406729221344,
3.2412502765655518,
1.839543104171753,
-1.2182613611221313,
0.7458797097206116,
-0.006805994547903538,
-0.5014370679855347,
1.1777845621109009,
-1.092678427696228,
1.1701111793518066,
-0.21364474296569824,
-1.1069004535675049,
-1.2094876766204834,
0.7484281659126282,
0.46733927726745605,
0.0989261120557785,
-0.5019651651382446,
1.251390814781189,
0.11027184128761292,
1.2663476467132568,
0.6438585519790649,
-0.3714653253555298,
0.4431893825531006,
-0.3234088718891144,
-0.5698721408843994,
1.559521198272705,
0.04719339311122894,
-1.5346908569335938,
-2.2369272708892822,
-0.19267112016677856,
-0.7852779626846313,
-0.14743389189243317,
-0.7095509767532349,
-1.0172065496444702,
1.6192117929458618,
0.6027799844741821,
-1.1533739566802979,
-0.2339485138654709,
-0.5656552910804749,
-0.6597502827644348,
2.5800516605377197,
-1.5096255540847778,
-0.05344962328672409,
-0.9038107991218567,
-0.32880353927612305,
1.659929633140564,
-1.0826774835586548,
-0.19979622960090637,
-0.9997466802597046,
-0.5807812213897705,
-1.4573447704315186,
-0.5876033306121826,
0.007869455963373184,
-0.7928836345672607,
0.72674161195755,
-0.025804290547966957,
-0.9657964706420898,
-0.21415700018405914,
-0.779504656791687,
0.9589083194732666,
-0.13606856763362885,
0.23913291096687317,
2.0626585483551025,
0.4155574440956116,
-0.33572548627853394,
0.7752033472061157,
1.3449773788452148,
0.5867597460746765,
-0.5206493139266968,
0.20441174507141113,
-0.7347502112388611,
0.3725517988204956,
-1.4300329685211182,
0.2383115440607071,
-3.002882480621338,
0.6648852229118347,
0.006941137835383415,
-0.0796917974948883,
-0.06254740059375763,
-1.3775887489318848,
1.1750901937484741,
2.5202183723449707,
-1.2123467922210693,
0.6331813335418701,
0.2822044789791107,
1.14854097366333,
-1.7016377449035645,
0.03153112903237343,
-0.483261376619339,
2.004979133605957,
0.03921274468302727,
1.1243809461593628,
-0.5926089286804199,
-2.0755960941314697,
0.658018171787262,
-1.2494105100631714,
-1.0201088190078735,
0.8397101759910583,
-0.8301833271980286,
0.06051671877503395,
-1.3937866687774658,
-0.133611798286438,
-0.979775607585907,
-1.2359809875488281,
0.7257288694381714,
0.13304416835308075,
0.4818531274795532,
-0.5685409903526306,
0.5017895698547363,
-2.250248432159424,
-1.277091383934021,
-0.27906903624534607,
-0.9487965703010559,
0.5561419129371643,
-0.3287779986858368,
0.645839273929596,
-0.061012350022792816,
0.06793622672557831,
0.38766101002693176,
1.332314372062683,
3.3905603885650635,
0.007017237134277821,
0.3133614957332611,
-0.19175666570663452,
-0.9186868667602539,
1.6172688007354736,
1.075708031654358,
-0.10627825558185577,
-0.7285267114639282,
-0.9956961870193481,
1.3175472021102905,
1.9524096250534058,
1.1435024738311768,
0.21920515596866608,
-1.0957688093185425,
-0.6954472064971924,
0.037689462304115295,
0.1340617686510086,
0.4003436863422394,
1.1099257469177246,
0.012897174805402756,
0.0782977044582367,
1.327024221420288,
1.1871392726898193,
-0.32262176275253296,
0.5162004828453064,
-0.8767971396446228,
-0.4049150347709656,
0.5224515795707703,
0.288141667842865,
-0.11053839325904846,
0.551352858543396,
-0.9239343404769897,
-0.2849034368991852,
-0.2354220598936081,
-1.0088788270950317,
-0.6043946743011475,
-0.3520367741584778,
-0.37918969988822937,
1.6726188659667969,
0.14016425609588623,
-0.6522009968757629,
-0.05500978231430054,
-0.8261692523956299,
-0.16854748129844666,
-1.1232742071151733,
0.1648586243391037,
-0.13422907888889313,
0.0620906688272953,
-0.10264775156974792,
1.5442967414855957,
-0.9779964089393616,
-2.263784170150757,
0.277283251285553,
0.4061117172241211,
-0.4423811435699463,
0.16945414245128632,
1.7571125030517578,
0.4357585310935974,
1.4370086193084717,
1.2464313507080078,
1.0004689693450928,
-0.5287863612174988,
-1.2711018323898315,
0.5996621251106262,
1.0009305477142334,
-1.583534836769104,
0.8698667287826538,
-0.19661396741867065,
-0.4526152014732361,
0.7446656823158264,
1.3293479681015015,
0.3610743284225464,
-1.9688975811004639,
0.9500199556350708,
-0.8277828097343445,
0.9964242577552795,
0.499153196811676,
0.8297900557518005,
0.1811419576406479,
0.9036353230476379,
-1.125213861465454,
-1.1483415365219116,
-0.7095319628715515,
-0.6512246131896973,
1.9567985534667969,
-0.12619490921497345,
0.5203001499176025,
-0.2293788343667984,
-1.1122220754623413,
-0.21116995811462402,
0.6809342503547668,
0.20314787328243256,
-0.18600189685821533,
0.82391357421875,
-0.863598644733429,
-1.0951311588287354,
-1.4709526300430298,
-0.4099152684211731,
-0.9792810678482056,
-0.926888108253479,
1.1689730882644653,
0.7093586325645447,
0.40858033299446106,
1.946187973022461,
0.526146650314331,
0.23369485139846802,
-2.674130916595459,
0.8290262818336487,
0.448657363653183,
0.029093381017446518,
0.9825116991996765,
0.26813173294067383,
1.1556575298309326,
-0.12012583017349243,
0.4871196746826172,
-2.3377859592437744,
2.255540132522583,
-0.1889563351869583,
0.6944432258605957,
0.08083012700080872,
-0.11074423789978027,
1.1315470933914185,
0.539955735206604,
0.7167293429374695,
-1.4481333494186401,
0.7976479530334473,
-0.43611663579940796,
1.075401782989502,
0.9030754566192627,
-0.8467238545417786,
0.1229826956987381,
1.3039977550506592,
0.5257793068885803,
-0.3569676876068115,
-0.8613887429237366,
-0.808761477470398,
1.0360233783721924,
1.6359549760818481,
-0.10702872276306152,
0.21558913588523865,
0.7160189151763916,
0.5802428722381592,
-1.328559398651123,
-0.007402327843010426,
-0.841736912727356,
-0.7479667067527771,
1.6512455940246582,
2.034320116043091,
0.042998526245355606,
-0.19842462241649628,
-0.7604721188545227,
-1.3410754203796387,
0.6514134407043457,
0.08310393989086151,
0.07737129926681519,
0.5408521294593811,
-0.8222634792327881,
1.1275016069412231,
0.7307380437850952,
0.6889762282371521,
-0.11243903636932373,
0.28066155314445496,
0.421003520488739,
-0.19858182966709137,
-1.1662893295288086,
-0.44800204038619995,
-1.101414442062378,
-2.6014461517333984,
0.4124535322189331,
-0.33000263571739197,
-1.477239966392517,
-0.07602487504482269,
-1.0087299346923828,
0.6936497688293457,
-0.6186309456825256,
-1.1026911735534668,
-1.3926432132720947,
0.17911800742149353,
-0.11886174976825714,
0.8258759379386902,
-1.668971061706543,
-0.17405375838279724,
1.3861408233642578,
0.9391576051712036,
-0.7649310231208801,
0.9826998114585876,
0.2913791835308075,
1.0410202741622925,
0.7407225966453552,
-0.39602574706077576,
0.46788641810417175,
0.1623411476612091,
-1.4309786558151245,
0.551498293876648,
1.2789480686187744,
0.17964014410972595,
1.4759550094604492,
-0.5237138271331787,
0.11693352460861206,
0.5024524927139282,
-0.5614986419677734,
-0.7150916457176208,
-0.5648244619369507,
0.7098429203033447,
-0.170158252120018,
-1.0154212713241577,
-0.045245878398418427,
-0.17805048823356628,
-0.08019331097602844,
0.23483461141586304,
-1.4761919975280762,
-0.3197653591632843,
-0.3087420165538788,
-0.24721932411193848,
-1.4044350385665894,
-0.04805683344602585,
1.2815146446228027,
-0.7861658334732056,
-0.06684539467096329,
0.5502194762229919,
0.37161973118782043,
0.3460547626018524,
0.6347966194152832,
-0.7971082925796509,
-0.268366277217865,
-0.16994519531726837,
-0.42283082008361816,
0.2304432988166809,
1.2856050729751587,
-0.2368321269750595,
-0.8946637511253357,
0.5473634004592896,
-0.2998960018157959,
0.11537574231624603,
2.0007526874542236,
-0.057698190212249756,
-0.7676740288734436,
0.3826523721218109,
-0.625089168548584,
1.952359676361084,
1.562642216682434,
1.2933242321014404,
-0.23357324302196503,
-0.8407752513885498,
0.6059209108352661,
-0.3107592463493347,
-0.27865999937057495,
0.8762885332107544,
0.4942869544029236,
-0.3241913914680481,
-1.521256446838379,
0.3600667119026184,
1.2236871719360352,
-1.1258959770202637,
-0.7574349045753479,
-0.06719913333654404,
-0.7794836759567261,
1.0145372152328491,
0.7932230234146118,
0.36070021986961365,
0.3806609809398651,
1.7439700365066528,
0.6013749241828918,
-0.5225029587745667,
0.4535517394542694,
0.5839837789535522,
-0.1481734812259674,
-1.9470406770706177,
-1.0008082389831543,
0.3839421570301056,
-0.321574866771698,
-1.4596819877624512,
1.3582769632339478,
-1.039035677909851,
-1.088575839996338,
0.5398870706558228,
0.131317600607872,
1.4639626741409302,
0.20335789024829865,
1.6726329326629639,
2.0833587646484375,
0.8373579978942871,
0.1843130737543106,
1.350115180015564,
-0.0467166043817997,
-0.3360142111778259,
1.8573552370071411,
-0.47208672761917114,
0.4766062796115875,
1.1205918788909912,
-0.5212846994400024,
-1.1402357816696167,
-0.7902638912200928,
-1.1469067335128784,
-0.6962647438049316,
1.2424471378326416,
0.2093692570924759,
-1.0447115898132324,
0.19187939167022705,
1.5545586347579956,
0.18826298415660858,
-0.23278675973415375,
0.6982640624046326,
0.5722286701202393,
-0.7338393330574036,
-0.08246186375617981,
-1.0645310878753662,
0.565105676651001,
-0.1476708948612213,
-0.5073928236961365,
0.2780032455921173,
0.39434733986854553,
1.1381267309188843,
-0.008944886736571789,
0.04050181061029434,
1.2117758989334106,
-1.422391414642334,
1.5157798528671265,
-0.7772519588470459,
0.37704718112945557,
-2.3995001316070557,
1.5642101764678955,
-0.7696030735969543,
1.9800360202789307,
-2.7375612258911133,
0.42959246039390564,
-0.5276654958724976,
-0.48929503560066223,
0.2690269649028778,
-0.41149386763572693,
0.14482539892196655,
-0.1798972189426422,
-0.9109447002410889,
-0.14324037730693817,
-0.702231228351593,
0.6076134443283081,
1.234476923942566,
1.2742109298706055,
-1.0517984628677368,
-0.33122336864471436,
-1.772469401359558,
-0.16324938833713531,
-0.6060800552368164,
0.4503970742225647,
-1.970723271369934,
-0.2191627472639084,
-1.9981757402420044,
-2.246209144592285,
-1.3605647087097168,
-0.7012055516242981,
1.1949011087417603,
0.1700585037469864,
-0.9028856158256531,
1.1117255687713623,
-0.331018328666687,
-1.792443037033081,
1.0557106733322144,
-2.070160388946533
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Hi ! The message you're getting is not an error. It simply says that your JSON dataset is being prepared to a location in `/root/.cache/huggingface/datasets` | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 25 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
Hi ! The message you're getting is not an error. It simply says that your JSON dataset is being prepared to a location in `/root/.cache/huggingface/datasets` | [
-1.2030609846115112,
-0.904209554195404,
-0.730094850063324,
1.4110026359558105,
-0.1441415548324585,
-1.2272157669067383,
0.04675769433379173,
-1.0200048685073853,
1.6166430711746216,
-0.7146351337432861,
0.32693415880203247,
-1.6813061237335205,
-0.08094199001789093,
-0.5973756909370422,
-0.7346429228782654,
-0.8448674082756042,
-0.4022197425365448,
-0.904854953289032,
0.8992562294006348,
2.5647647380828857,
1.2336286306381226,
-1.2832521200180054,
2.729677200317383,
0.6274065375328064,
-0.28561222553253174,
-0.9911187887191772,
0.5331012606620789,
0.020940935239195824,
-1.179660677909851,
-0.3776915669441223,
-0.9163413047790527,
-0.04271196946501732,
-0.6203646063804626,
-0.5514634251594543,
0.09480632841587067,
0.4385508894920349,
-0.2298738658428192,
-0.22110792994499207,
-0.4304279685020447,
-0.6723789572715759,
0.5756170153617859,
-0.2865411043167114,
0.9098525643348694,
-0.3012637197971344,
1.7755887508392334,
-0.6136780381202698,
0.3873145282268524,
0.7230431437492371,
1.285341501235962,
0.16151532530784607,
0.058690398931503296,
0.2930030822753906,
0.29919931292533875,
0.034410927444696426,
0.498762309551239,
1.189751386642456,
0.5687335133552551,
0.4852764904499054,
0.6675374507904053,
-2.2232704162597656,
1.304486870765686,
-0.8913083076477051,
0.26714056730270386,
1.356029748916626,
-0.9500500559806824,
0.3934483528137207,
-1.859122633934021,
-0.07187101989984512,
0.5729548931121826,
-2.2752609252929688,
0.1571987271308899,
-1.2890177965164185,
-0.5326707363128662,
1.0191916227340698,
0.19518879055976868,
-1.301426649093628,
0.1929141879081726,
-0.489247590303421,
1.0581859350204468,
0.5614113211631775,
1.1913566589355469,
-1.6870564222335815,
-0.028005843982100487,
-0.23557007312774658,
0.17893612384796143,
-1.30503249168396,
-1.590741753578186,
0.5336682796478271,
0.5666914582252502,
0.7540079355239868,
-0.0966087281703949,
0.9684065580368042,
-0.9700977206230164,
0.887847363948822,
-1.0526461601257324,
-1.6715019941329956,
-1.4102277755737305,
-2.349817991256714,
-2.407287120819092,
0.785182535648346,
-0.49742501974105835,
-0.4859255254268646,
2.0122687816619873,
-1.0061966180801392,
-1.8282090425491333,
1.0731600522994995,
0.3706789016723633,
-0.013976316899061203,
2.427452802658081,
0.23131340742111206,
-0.7994207143783569,
0.4284287095069885,
-0.7060284614562988,
0.7940263748168945,
-0.2448749840259552,
1.3335225582122803,
0.654105007648468,
-1.0269968509674072,
1.6179758310317993,
-0.48096412420272827,
0.5202876329421997,
-0.6877442002296448,
-0.529877781867981,
-0.8800768256187439,
0.27155187726020813,
1.9300758838653564,
-0.40844687819480896,
1.578916072845459,
-0.35106009244918823,
-1.6121494770050049,
-1.5130590200424194,
0.8365205526351929,
0.48307815194129944,
-0.8685674667358398,
0.13026157021522522,
-0.47258660197257996,
0.11528923362493515,
-0.004090830218046904,
1.0249154567718506,
1.153417944908142,
0.7374056577682495,
-0.3369466960430145,
-0.8775763511657715,
0.2810516655445099,
-0.04167703911662102,
-0.6595818996429443,
-1.8401845693588257,
-0.35916751623153687,
0.18499255180358887,
0.6391047239303589,
-1.2063003778457642,
1.7184821367263794,
0.8507624268531799,
1.9721068143844604,
0.9694830775260925,
-0.39536550641059875,
1.5714094638824463,
-0.07044325023889542,
1.908407211303711,
-0.5064342617988586,
0.6612488627433777,
-0.36834123730659485,
-1.1993025541305542,
0.7987571954727173,
-0.30545639991760254,
-2.043104410171509,
-0.8000250458717346,
-0.833511233329773,
-0.1573622226715088,
-0.8007742762565613,
0.8874673843383789,
-0.2344779372215271,
-1.4949244260787964,
0.2207106649875641,
-0.6038911938667297,
0.12781628966331482,
-1.368266224861145,
0.2678963541984558,
0.7473644614219666,
-0.6339397430419922,
-0.008311123587191105,
-0.25198855996131897,
-1.2790716886520386,
-0.5064038634300232,
0.25062817335128784,
1.9027258157730103,
-0.6949741244316101,
0.9516273140907288,
1.004080057144165,
-0.7122610211372375,
0.12704822421073914,
0.3325692415237427,
-0.2799226641654968,
0.8052642941474915,
-1.0539520978927612,
-0.39472293853759766,
1.1361891031265259,
-0.13088679313659668,
-0.7136358022689819,
1.4249101877212524,
0.8865743279457092,
-1.0511155128479004,
-0.1897418200969696,
-0.2642859220504761,
-0.7486504316329956,
0.01348034292459488,
-1.5807725191116333,
-0.1322660893201828,
0.22267210483551025,
-1.416878581047058,
-0.42780476808547974,
-0.22869107127189636,
1.3583064079284668,
-0.23474135994911194,
1.4322508573532104,
-0.2930654287338257,
-0.17852690815925598,
-0.3728732168674469,
-0.4407336115837097,
0.24631112813949585,
-0.13715487718582153,
-0.6103726625442505,
0.3060896098613739,
-0.8258360624313354,
0.2667188048362732,
1.442938208580017,
0.4045232832431793,
0.12231206148862839,
0.46307963132858276,
1.0942232608795166,
0.3505510985851288,
-0.05195660889148712,
-0.924942672252655,
-1.5859849452972412,
2.1275551319122314,
-1.4884083271026611,
1.9275282621383667,
0.7268235087394714,
-0.12685033679008484,
-1.736142873764038,
-1.8625926971435547,
1.389255166053772,
1.1749895811080933,
2.3840484619140625,
0.6130489706993103,
0.3797009587287903,
-0.792724609375,
-0.7312134504318237,
0.3808051347732544,
-1.0386381149291992,
-0.7387118339538574,
0.10068044811487198,
2.4175853729248047,
1.7808858156204224,
-0.5471087098121643,
-0.22216665744781494,
-0.921286404132843,
1.2451924085617065,
-0.19468995928764343,
0.2676471471786499,
2.10021710395813,
-0.35955750942230225,
-1.0369220972061157,
1.3192098140716553,
-2.4020252227783203,
0.24406671524047852,
1.9878156185150146,
0.33950769901275635,
0.1266336441040039,
-1.4305073022842407,
-0.6427149772644043,
-0.18876653909683228,
-0.5384665131568909,
-1.2278670072555542,
0.5792895555496216,
-0.30113956332206726,
-0.9215227365493774,
-1.4758602380752563,
0.10159792006015778,
-1.2001855373382568,
-1.7701648473739624,
0.3940907120704651,
1.820588231086731,
2.034435510635376,
-0.7944039702415466,
1.4122647047042847,
-0.2179490327835083,
0.17715567350387573,
1.2796566486358643,
1.3080220222473145,
3.0820131301879883,
1.8350187540054321,
-1.2726588249206543,
0.7493507862091064,
-0.21941009163856506,
-0.5088069438934326,
1.1524677276611328,
-1.1382609605789185,
1.1484614610671997,
-0.3122112452983856,
-1.2328379154205322,
-1.314302921295166,
1.0509111881256104,
0.49495452642440796,
0.07583644241094589,
-0.5535469055175781,
1.254589319229126,
0.18496304750442505,
1.358649730682373,
0.5631555318832397,
-0.37374916672706604,
0.5688303709030151,
-0.38763228058815,
-0.5818160772323608,
1.6406570672988892,
0.15209585428237915,
-1.4711331129074097,
-2.343391180038452,
-0.3216838836669922,
-0.9178106188774109,
-0.06539838016033173,
-0.5380931496620178,
-1.0181925296783447,
1.577014684677124,
0.452296644449234,
-1.235600471496582,
-0.31783992052078247,
-0.286673903465271,
-0.585075855255127,
2.6240406036376953,
-1.3364989757537842,
-0.1408463716506958,
-0.9521775245666504,
-0.4880635440349579,
1.618775486946106,
-1.14717435836792,
-0.15421298146247864,
-1.0930790901184082,
-0.7315551042556763,
-1.3782076835632324,
-0.4851597547531128,
-0.06720124930143356,
-0.9087392091751099,
0.7491447329521179,
0.11499982327222824,
-1.1116764545440674,
-0.2759039103984833,
-0.9425954818725586,
0.9809616804122925,
-0.11896241456270218,
0.26098260283470154,
1.7671507596969604,
0.43028703331947327,
-0.43349507451057434,
0.7315122485160828,
1.1736527681350708,
0.6364006400108337,
-0.6736457347869873,
0.16420838236808777,
-0.7882316708564758,
0.29994985461235046,
-1.3443515300750732,
0.2677746117115021,
-2.9044582843780518,
0.7422885298728943,
-0.1070958822965622,
-0.09083515405654907,
-0.17694765329360962,
-1.3169928789138794,
1.151528239250183,
2.6095590591430664,
-1.130698800086975,
0.5036177039146423,
0.41931191086769104,
1.136981725692749,
-1.6262705326080322,
0.19889071583747864,
-0.5089366436004639,
2.182823419570923,
0.10282798856496811,
1.2587425708770752,
-0.45745816826820374,
-2.209074020385742,
0.645451009273529,
-1.2895922660827637,
-1.0817186832427979,
0.8317989110946655,
-0.9249368906021118,
0.22718116641044617,
-1.387602686882019,
-0.14090695977210999,
-0.9792951345443726,
-1.247554063796997,
0.7767183780670166,
0.14889252185821533,
0.5147284865379333,
-0.5986775755882263,
0.3924616277217865,
-2.111542224884033,
-1.3811049461364746,
-0.17716005444526672,
-0.9770728945732117,
0.43308863043785095,
-0.29990115761756897,
0.6200711727142334,
-0.054167404770851135,
0.0986287072300911,
0.39852410554885864,
1.3624694347381592,
3.323975086212158,
0.17297935485839844,
0.3133604824542999,
-0.052573107182979584,
-1.0123506784439087,
1.4460583925247192,
0.9929718971252441,
-0.1501394510269165,
-0.5518072247505188,
-0.9643892645835876,
1.25274658203125,
2.0254037380218506,
1.1408090591430664,
0.0701654702425003,
-0.8416734337806702,
-0.7536931037902832,
0.10719586163759232,
0.2119850218296051,
0.518371045589447,
0.9074264764785767,
-0.042168229818344116,
0.13355010747909546,
1.3650659322738647,
1.2012335062026978,
-0.35248830914497375,
0.42970508337020874,
-0.9151760339736938,
-0.4165457785129547,
0.472051739692688,
0.20864036679267883,
0.06504589319229126,
0.5082491040229797,
-1.0917494297027588,
-0.23384487628936768,
-0.2263801097869873,
-0.9348141551017761,
-0.78795325756073,
-0.46109381318092346,
-0.40861088037490845,
1.6415588855743408,
-0.0395229309797287,
-0.46046116948127747,
0.03261149302124977,
-0.7949787378311157,
-0.16040962934494019,
-1.0549936294555664,
0.1928952932357788,
-0.1549719274044037,
-0.06753888726234436,
-0.1757945418357849,
1.743346929550171,
-1.0489928722381592,
-2.1333940029144287,
0.26066461205482483,
0.3358909487724304,
-0.4024098515510559,
0.15547379851341248,
1.657270908355713,
0.5110141038894653,
1.3861316442489624,
1.3118882179260254,
1.0420383214950562,
-0.6265884041786194,
-1.1698561906814575,
0.7299273610115051,
0.9321125745773315,
-1.3269269466400146,
0.8984999656677246,
-0.11745081096887589,
-0.46922487020492554,
0.6516577005386353,
1.2826355695724487,
0.34148818254470825,
-1.9754482507705688,
0.8359665274620056,
-0.8916617035865784,
0.7358257174491882,
0.6517080068588257,
0.7675403356552124,
0.2030281126499176,
0.8349279761314392,
-1.2780776023864746,
-1.148753046989441,
-0.7116455435752869,
-0.5607583522796631,
1.9248621463775635,
-0.14136648178100586,
0.4747251570224762,
-0.06360684335231781,
-1.196550726890564,
-0.08551003038883209,
0.7246921062469482,
0.36651021242141724,
-0.408160001039505,
0.9066915512084961,
-0.592261791229248,
-1.0383461713790894,
-1.3290014266967773,
-0.4296097457408905,
-1.008073329925537,
-0.8819616436958313,
0.9840171933174133,
0.7671874165534973,
0.36234402656555176,
1.8742164373397827,
0.5611932277679443,
0.2889971137046814,
-2.662837266921997,
0.9019888639450073,
0.2602749168872833,
-0.03478270024061203,
0.9245526790618896,
0.21023857593536377,
1.1769782304763794,
-0.009016938507556915,
0.5711674094200134,
-2.305173397064209,
2.226020336151123,
-0.19833818078041077,
0.6796272397041321,
0.09715650975704193,
-0.2094060182571411,
1.0479426383972168,
0.5138322114944458,
0.616081178188324,
-1.1844991445541382,
0.7313961386680603,
-0.617652177810669,
1.1517589092254639,
0.9906502962112427,
-0.8499206304550171,
0.11345319449901581,
1.2828376293182373,
0.4638898968696594,
-0.42078375816345215,
-0.9449149370193481,
-0.8311118483543396,
0.9926983118057251,
1.7403583526611328,
-0.036376822739839554,
-0.00021184049546718597,
0.9143215417861938,
0.7255444526672363,
-1.3266263008117676,
0.09110579639673233,
-0.6856418251991272,
-0.7016570568084717,
1.7119646072387695,
2.065169095993042,
-0.04833495616912842,
-0.15408864617347717,
-0.8022449612617493,
-1.1589995622634888,
0.8059061169624329,
-0.01514673512428999,
0.132981538772583,
0.7770535945892334,
-0.6938849687576294,
1.177203893661499,
0.6727808117866516,
0.9737333059310913,
0.05917402356863022,
0.38230621814727783,
0.25780099630355835,
-0.2922886908054352,
-1.1434863805770874,
-0.336538702249527,
-1.095606803894043,
-2.6530160903930664,
0.4850272834300995,
-0.32490667700767517,
-1.3518482446670532,
-0.003363220952451229,
-0.9982012510299683,
0.8580293655395508,
-0.5906761884689331,
-1.102461576461792,
-1.400423288345337,
0.3080119788646698,
-0.18227806687355042,
0.8361858129501343,
-1.6463661193847656,
-0.037547752261161804,
1.2729333639144897,
0.8995340466499329,
-0.6133391857147217,
0.9744508862495422,
0.2836444675922394,
0.9528286457061768,
0.7737501263618469,
-0.34179002046585083,
0.5708412528038025,
0.15220999717712402,
-1.3845425844192505,
0.415028840303421,
1.2422460317611694,
0.21648186445236206,
1.4391772747039795,
-0.46177658438682556,
0.07046250998973846,
0.45453980565071106,
-0.5472789406776428,
-0.570774495601654,
-0.5774140954017639,
0.746518075466156,
0.08378977328538895,
-1.02024245262146,
0.06551670283079147,
-0.11441074311733246,
-0.14319586753845215,
0.25294816493988037,
-1.4825440645217896,
-0.2178747057914734,
-0.3993799388408661,
-0.5214198231697083,
-1.2833563089370728,
0.033563531935214996,
1.3011674880981445,
-0.8077874779701233,
-0.20716378092765808,
0.45145004987716675,
0.3433057367801666,
0.578322172164917,
0.6097092032432556,
-0.6804332733154297,
-0.33717986941337585,
-0.35334521532058716,
-0.2855697572231293,
0.2892433702945709,
1.178556203842163,
-0.1497897207736969,
-1.0445390939712524,
0.6951735615730286,
-0.3702539801597595,
0.07729801535606384,
1.9533206224441528,
0.05774366855621338,
-0.7608413100242615,
0.4109742343425751,
-0.685269296169281,
1.7795088291168213,
1.6266223192214966,
1.3506295680999756,
-0.1363760530948639,
-0.9109846353530884,
0.578779935836792,
-0.3388996124267578,
-0.38309547305107117,
0.9864016175270081,
0.39651772379875183,
-0.19738507270812988,
-1.3810677528381348,
0.5305390954017639,
1.3118915557861328,
-0.903801679611206,
-0.7281095385551453,
0.11330113559961319,
-0.8829439878463745,
1.106105923652649,
0.6356083154678345,
0.35307952761650085,
0.2248348593711853,
1.5554746389389038,
0.6596741676330566,
-0.5148718953132629,
0.44133681058883667,
0.4210585355758667,
-0.16767820715904236,
-2.003594398498535,
-1.0499578714370728,
0.2687523365020752,
-0.43926745653152466,
-1.5093684196472168,
1.3516287803649902,
-1.1895413398742676,
-0.9603671431541443,
0.504308819770813,
0.08884617686271667,
1.34066903591156,
0.3377936780452728,
1.7374528646469116,
2.0745489597320557,
0.9245758652687073,
0.2858470678329468,
1.298771858215332,
-0.08266135305166245,
-0.39034298062324524,
1.7939146757125854,
-0.43914392590522766,
0.5665642619132996,
1.0114015340805054,
-0.3902609944343567,
-1.0519847869873047,
-0.8826767206192017,
-1.1704249382019043,
-0.5623885989189148,
1.1932569742202759,
0.1419224739074707,
-1.1577873229980469,
0.23495951294898987,
1.5859044790267944,
0.04761800915002823,
-0.19985347986221313,
0.6732461452484131,
0.4259735941886902,
-0.7181535959243774,
-0.024795185774564743,
-0.9385361671447754,
0.4719606637954712,
-0.1911843717098236,
-0.28825345635414124,
0.2180054485797882,
0.5727869272232056,
1.2461152076721191,
-0.018071461468935013,
0.13352441787719727,
1.298818826675415,
-1.3314470052719116,
1.4313678741455078,
-0.6839905977249146,
0.3200146555900574,
-2.447073221206665,
1.3852487802505493,
-0.8528047204017639,
1.837048888206482,
-2.5574889183044434,
0.41933202743530273,
-0.5132465958595276,
-0.41367214918136597,
0.2925107777118683,
-0.38574686646461487,
0.11322280019521713,
-0.14482292532920837,
-0.9976272583007812,
-0.11423923820257187,
-0.800670862197876,
0.5425132513046265,
1.1477088928222656,
1.3671776056289673,
-1.093071699142456,
-0.33561617136001587,
-1.7875133752822876,
-0.2507891356945038,
-0.6562032699584961,
0.36654728651046753,
-1.9915286302566528,
-0.16522374749183655,
-2.0612258911132812,
-2.341474771499634,
-1.414367437362671,
-0.9343171715736389,
1.1008288860321045,
0.15215632319450378,
-0.9332053065299988,
1.0267682075500488,
-0.356315016746521,
-1.7502690553665161,
1.0787348747253418,
-2.143951892852783
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | >
but I want to load local JSON file by command
`python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
**squad-retrain-data/train-v2.0.json** is the local JSON file, how to load it and map it to a special structure? | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 37 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
>
but I want to load local JSON file by command
`python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
**squad-retrain-data/train-v2.0.json** is the local JSON file, how to load it and map it to a special structure? | [
-1.2142521142959595,
-0.9136581420898438,
-0.6981326937675476,
1.4473443031311035,
-0.12461372464895248,
-1.2239969968795776,
0.08450023084878922,
-0.9688572287559509,
1.6357923746109009,
-0.7244822382926941,
0.3365243077278137,
-1.6411387920379639,
-0.04023607820272446,
-0.5704357028007507,
-0.714570939540863,
-0.8152827024459839,
-0.4047495126724243,
-0.8942815661430359,
0.9836679697036743,
2.5008604526519775,
1.2486646175384521,
-1.3125205039978027,
2.7543880939483643,
0.5894268155097961,
-0.32734060287475586,
-0.9595062136650085,
0.46908313035964966,
0.028061293065547943,
-1.2442152500152588,
-0.34998005628585815,
-0.8977406024932861,
-0.03743162006139755,
-0.6208362579345703,
-0.5351643562316895,
0.1430094689130783,
0.45666271448135376,
-0.23159494996070862,
-0.26820945739746094,
-0.4436257481575012,
-0.6543518900871277,
0.5803309082984924,
-0.24169477820396423,
0.8673981428146362,
-0.2875964045524597,
1.7596275806427002,
-0.6268081665039062,
0.41868406534194946,
0.6964319944381714,
1.2635082006454468,
0.15413954854011536,
0.02254052460193634,
0.32657861709594727,
0.2917137145996094,
0.04063941165804863,
0.5288813710212708,
1.1818058490753174,
0.560916006565094,
0.482957124710083,
0.6550434231758118,
-2.223855495452881,
1.3466981649398804,
-0.8729572892189026,
0.2745968699455261,
1.3837615251541138,
-0.9953124523162842,
0.4171217083930969,
-1.8770390748977661,
-0.07057437300682068,
0.5174176096916199,
-2.2855398654937744,
0.14278565347194672,
-1.308549404144287,
-0.5668405294418335,
0.9983522891998291,
0.21541611850261688,
-1.3212534189224243,
0.1552795171737671,
-0.492440402507782,
1.0533168315887451,
0.5091677904129028,
1.1909165382385254,
-1.69862699508667,
-0.06378954648971558,
-0.2325328290462494,
0.21039220690727234,
-1.2558250427246094,
-1.6140055656433105,
0.5907823443412781,
0.5541948676109314,
0.7580829858779907,
-0.10189115256071091,
0.9630100727081299,
-0.9992606043815613,
0.8932502269744873,
-1.0777456760406494,
-1.6687047481536865,
-1.3748786449432373,
-2.3687703609466553,
-2.408099889755249,
0.8026482462882996,
-0.5201646685600281,
-0.4676656723022461,
2.0403218269348145,
-1.0448211431503296,
-1.8118517398834229,
1.0940442085266113,
0.3432464599609375,
-0.03953840583562851,
2.4263176918029785,
0.2382587045431137,
-0.8084572553634644,
0.5057675242424011,
-0.7547037601470947,
0.8049257397651672,
-0.2098710685968399,
1.3055063486099243,
0.6168060302734375,
-1.0443756580352783,
1.5711241960525513,
-0.3902854919433594,
0.5550165772438049,
-0.6658972501754761,
-0.5172838568687439,
-0.8123261332511902,
0.2383611649274826,
1.9808990955352783,
-0.34396594762802124,
1.5316846370697021,
-0.28192466497421265,
-1.5959378480911255,
-1.4727951288223267,
0.8777424097061157,
0.5164448618888855,
-0.859246551990509,
0.16199971735477448,
-0.4757518172264099,
0.1303500235080719,
0.041687093675136566,
1.0390561819076538,
1.1706082820892334,
0.7735944986343384,
-0.34746652841567993,
-0.9093749523162842,
0.23648850619792938,
-0.047829508781433105,
-0.6383113861083984,
-1.8369964361190796,
-0.3591465950012207,
0.13980688154697418,
0.6320417523384094,
-1.207565426826477,
1.6921616792678833,
0.8581833243370056,
2.015024185180664,
0.9501150250434875,
-0.39839625358581543,
1.5773159265518188,
-0.057539504021406174,
1.869859218597412,
-0.4973258376121521,
0.6494918465614319,
-0.38792794942855835,
-1.18921959400177,
0.7889354228973389,
-0.30189454555511475,
-2.0216970443725586,
-0.7542977333068848,
-0.8137495517730713,
-0.17501260340213776,
-0.800279438495636,
0.8798090815544128,
-0.23820751905441284,
-1.5040907859802246,
0.21902088820934296,
-0.5875204205513,
0.12384065985679626,
-1.3806474208831787,
0.2631608247756958,
0.7177191972732544,
-0.6265090703964233,
0.016941411420702934,
-0.31572359800338745,
-1.260306715965271,
-0.5516193509101868,
0.3005307912826538,
1.8564245700836182,
-0.6802171468734741,
1.0182676315307617,
1.0136607885360718,
-0.7296139597892761,
0.09376047551631927,
0.3490749001502991,
-0.2983055114746094,
0.8263744711875916,
-1.0416852235794067,
-0.42601460218429565,
1.1265486478805542,
-0.17416399717330933,
-0.6558796167373657,
1.4061862230300903,
0.8244990706443787,
-1.0556899309158325,
-0.2572924792766571,
-0.24143049120903015,
-0.7923032641410828,
0.0584150105714798,
-1.5774145126342773,
-0.15576735138893127,
0.24593864381313324,
-1.459439992904663,
-0.4241723418235779,
-0.22994308173656464,
1.3568698167800903,
-0.217335045337677,
1.4477771520614624,
-0.27718645334243774,
-0.189382866024971,
-0.35441792011260986,
-0.4724384546279907,
0.21782195568084717,
-0.1026834174990654,
-0.5921003222465515,
0.29240769147872925,
-0.8231024146080017,
0.25990742444992065,
1.4690524339675903,
0.37485623359680176,
0.09804435819387436,
0.44561952352523804,
1.1172207593917847,
0.3985128402709961,
-0.08637110143899918,
-0.9446899890899658,
-1.6059482097625732,
2.1095330715179443,
-1.5491877794265747,
1.9305366277694702,
0.7411926984786987,
-0.12062125653028488,
-1.7132595777511597,
-1.8477001190185547,
1.4118348360061646,
1.167965292930603,
2.3899073600769043,
0.6289889812469482,
0.38140809535980225,
-0.7593181133270264,
-0.7367125749588013,
0.37673914432525635,
-1.0119060277938843,
-0.7709555625915527,
0.10445994883775711,
2.4017837047576904,
1.777455449104309,
-0.5037916898727417,
-0.2146667093038559,
-0.902190089225769,
1.299522042274475,
-0.19153916835784912,
0.25243157148361206,
2.071505069732666,
-0.36882299184799194,
-1.014288306236267,
1.3130128383636475,
-2.365334987640381,
0.24364660680294037,
2.0037829875946045,
0.34619760513305664,
0.08889690041542053,
-1.4065951108932495,
-0.6358484625816345,
-0.1741030514240265,
-0.5196736454963684,
-1.2494573593139648,
0.5686222910881042,
-0.298225998878479,
-0.9277216196060181,
-1.491180658340454,
0.1221630722284317,
-1.1979999542236328,
-1.7626073360443115,
0.38211590051651,
1.8642529249191284,
2.064680337905884,
-0.7694976925849915,
1.3795315027236938,
-0.24653474986553192,
0.17452305555343628,
1.2362861633300781,
1.2728825807571411,
3.0985655784606934,
1.8478527069091797,
-1.2481906414031982,
0.7114402055740356,
-0.23248709738254547,
-0.533253014087677,
1.1515194177627563,
-1.11093270778656,
1.153605341911316,
-0.3109092712402344,
-1.2200126647949219,
-1.3034979104995728,
1.0618423223495483,
0.5025895833969116,
0.06046002358198166,
-0.5394250154495239,
1.2569193840026855,
0.16926291584968567,
1.324203372001648,
0.5355803370475769,
-0.33646416664123535,
0.5981045961380005,
-0.3888741731643677,
-0.5674328804016113,
1.6692346334457397,
0.12388363480567932,
-1.4796175956726074,
-2.361203908920288,
-0.3268144130706787,
-0.9366547465324402,
0.04262014478445053,
-0.5744649171829224,
-1.0101356506347656,
1.5878826379776,
0.47624772787094116,
-1.2237714529037476,
-0.2492518424987793,
-0.27531319856643677,
-0.6035933494567871,
2.628359079360962,
-1.279770016670227,
-0.129108265042305,
-0.9307507872581482,
-0.4970506429672241,
1.5926158428192139,
-1.1411291360855103,
-0.19896633923053741,
-1.0597220659255981,
-0.6624520421028137,
-1.3428806066513062,
-0.45985084772109985,
-0.046478357166051865,
-0.9232993721961975,
0.7559818625450134,
0.024220969527959824,
-1.1462180614471436,
-0.2723902463912964,
-0.9665243029594421,
0.9332201480865479,
-0.14116929471492767,
0.19782760739326477,
1.7039132118225098,
0.381706178188324,
-0.4244673252105713,
0.7780242562294006,
1.1927037239074707,
0.6209213137626648,
-0.6903541684150696,
0.14231646060943604,
-0.7603884935379028,
0.3482707142829895,
-1.2722820043563843,
0.34515833854675293,
-2.907719612121582,
0.7383991479873657,
-0.08665435761213303,
-0.05679864436388016,
-0.1831837296485901,
-1.3473325967788696,
1.1806950569152832,
2.5992889404296875,
-1.1185072660446167,
0.5175523161888123,
0.39746034145355225,
1.1157199144363403,
-1.585721492767334,
0.1805056631565094,
-0.5168780088424683,
2.180651903152466,
0.08349153399467468,
1.2576655149459839,
-0.47696536779403687,
-2.268489122390747,
0.6480516195297241,
-1.2523833513259888,
-1.0711499452590942,
0.7852474451065063,
-0.8710364699363708,
0.2010558694601059,
-1.3403667211532593,
-0.1494014859199524,
-0.9308949708938599,
-1.2309582233428955,
0.6843292117118835,
0.15929941833019257,
0.5409939885139465,
-0.6282137036323547,
0.38298463821411133,
-2.1605052947998047,
-1.4336414337158203,
-0.17488913238048553,
-0.9814466238021851,
0.44524985551834106,
-0.3461223840713501,
0.6353444457054138,
-0.06002354994416237,
0.0946907177567482,
0.3828447461128235,
1.370955467224121,
3.290682792663574,
0.1249159425497055,
0.2783191204071045,
-0.07567363977432251,
-0.987052857875824,
1.484182357788086,
0.9862341284751892,
-0.14698006212711334,
-0.533873438835144,
-0.9961531758308411,
1.2676188945770264,
2.0384459495544434,
1.1405149698257446,
0.060863181948661804,
-0.8690330386161804,
-0.7733602523803711,
0.08884808421134949,
0.21458931267261505,
0.5169267654418945,
0.9251201152801514,
0.042126402258872986,
0.13876554369926453,
1.3365153074264526,
1.1563801765441895,
-0.34596115350723267,
0.47570621967315674,
-0.8630526065826416,
-0.40188533067703247,
0.45965683460235596,
0.2121150642633438,
0.0323835089802742,
0.44641536474227905,
-1.0786364078521729,
-0.254336953163147,
-0.2702370285987854,
-0.9224498271942139,
-0.8003095388412476,
-0.40183019638061523,
-0.44201451539993286,
1.6834911108016968,
-0.04073565453290939,
-0.47099441289901733,
0.049815449863672256,
-0.7793217897415161,
-0.12455868721008301,
-1.071999430656433,
0.2497205287218094,
-0.1814620941877365,
-0.04508137330412865,
-0.17275384068489075,
1.783436894416809,
-1.027735710144043,
-2.1788554191589355,
0.24937473237514496,
0.3329480290412903,
-0.41895216703414917,
0.12136591970920563,
1.6808243989944458,
0.5416253209114075,
1.3909082412719727,
1.329582929611206,
1.0487738847732544,
-0.6377877593040466,
-1.2067945003509521,
0.7318298816680908,
0.9032191634178162,
-1.3290629386901855,
0.8694937229156494,
-0.13340501487255096,
-0.47019636631011963,
0.6564737558364868,
1.2906291484832764,
0.38474637269973755,
-1.9896862506866455,
0.8545747995376587,
-0.9563080072402954,
0.7320021390914917,
0.7084100842475891,
0.7234163880348206,
0.20064063370227814,
0.8059759140014648,
-1.2785029411315918,
-1.1162333488464355,
-0.6775152683258057,
-0.5521331429481506,
1.9092720746994019,
-0.16453175246715546,
0.45384329557418823,
-0.08972614258527756,
-1.1915857791900635,
-0.02084202878177166,
0.69621342420578,
0.4007852077484131,
-0.3611564636230469,
0.8691178560256958,
-0.6010504364967346,
-1.0730438232421875,
-1.3380988836288452,
-0.4343346953392029,
-1.0206667184829712,
-0.8970956206321716,
0.9781665802001953,
0.7473071813583374,
0.42182570695877075,
1.876227617263794,
0.5943989753723145,
0.2685990333557129,
-2.633315086364746,
0.9266930222511292,
0.29553472995758057,
-0.06093400716781616,
0.9195624589920044,
0.22565048933029175,
1.190449595451355,
-0.04397153481841087,
0.5613648891448975,
-2.297980546951294,
2.2663118839263916,
-0.152313694357872,
0.6943532824516296,
0.14463232457637787,
-0.17920441925525665,
1.0380467176437378,
0.5292567014694214,
0.6034032702445984,
-1.204443335533142,
0.7933679223060608,
-0.606501579284668,
1.175984501838684,
0.928169846534729,
-0.8175513744354248,
0.11858506500720978,
1.2696104049682617,
0.45250070095062256,
-0.41909700632095337,
-0.9403103590011597,
-0.8659070730209351,
0.9481564164161682,
1.7375985383987427,
-0.06587840616703033,
0.017836526036262512,
0.8823977708816528,
0.7357981204986572,
-1.3129016160964966,
0.0335266999900341,
-0.6173652410507202,
-0.6882950663566589,
1.6640031337738037,
2.0921103954315186,
-0.03896821290254593,
-0.14547374844551086,
-0.7928653359413147,
-1.2308783531188965,
0.8117691874504089,
0.028122149407863617,
0.12330913543701172,
0.7514330148696899,
-0.6802310347557068,
1.1745189428329468,
0.7085884213447571,
0.9741250872612,
0.06442660093307495,
0.33306366205215454,
0.25519537925720215,
-0.3066273331642151,
-1.174028992652893,
-0.3631061315536499,
-1.0696204900741577,
-2.666889190673828,
0.449518620967865,
-0.3569786548614502,
-1.3550865650177002,
0.007764054462313652,
-1.0003553628921509,
0.8267694711685181,
-0.595970869064331,
-1.103007435798645,
-1.3954992294311523,
0.27810025215148926,
-0.22971603274345398,
0.8511872887611389,
-1.643835186958313,
-0.11147771775722504,
1.2371973991394043,
0.9016432762145996,
-0.6291761994361877,
0.9706663489341736,
0.24697835743427277,
0.86456698179245,
0.7827374339103699,
-0.33593273162841797,
0.5649206042289734,
0.1985756754875183,
-1.3927650451660156,
0.40084654092788696,
1.2713704109191895,
0.23719771206378937,
1.4293296337127686,
-0.46512043476104736,
0.02583758905529976,
0.4647192358970642,
-0.5143773555755615,
-0.5705175995826721,
-0.555992066860199,
0.7417888641357422,
0.01486191526055336,
-1.0504168272018433,
0.09724549949169159,
-0.08854232728481293,
-0.12035562098026276,
0.27846890687942505,
-1.4980963468551636,
-0.21124163269996643,
-0.4240124821662903,
-0.5332155227661133,
-1.3252865076065063,
-0.0028278599493205547,
1.3121691942214966,
-0.8267534971237183,
-0.19223174452781677,
0.4450344443321228,
0.34108519554138184,
0.5587000846862793,
0.6546096801757812,
-0.7110220193862915,
-0.3120683431625366,
-0.3131619691848755,
-0.3175387382507324,
0.33361780643463135,
1.2003448009490967,
-0.10207077115774155,
-1.0443788766860962,
0.6242205500602722,
-0.335912823677063,
0.10948646813631058,
1.976274013519287,
0.05549266189336777,
-0.7711284160614014,
0.43497616052627563,
-0.7095246911048889,
1.7806777954101562,
1.5974692106246948,
1.3729032278060913,
-0.17547588050365448,
-0.9184749722480774,
0.5655587911605835,
-0.32438892126083374,
-0.4004555344581604,
0.9902403354644775,
0.34811389446258545,
-0.22710467875003815,
-1.3649523258209229,
0.5512270331382751,
1.3229386806488037,
-0.9057937264442444,
-0.7873828411102295,
0.11843588948249817,
-0.9023612141609192,
1.134165644645691,
0.6170654296875,
0.35632485151290894,
0.22648856043815613,
1.5736021995544434,
0.6703929305076599,
-0.5203967094421387,
0.4483643174171448,
0.4080437421798706,
-0.1851237416267395,
-2.0150341987609863,
-1.091784119606018,
0.27675575017929077,
-0.4850383400917053,
-1.4928205013275146,
1.3784326314926147,
-1.1847666501998901,
-1.0069243907928467,
0.5363295078277588,
0.0747145265340805,
1.3619375228881836,
0.30333542823791504,
1.7625254392623901,
2.083207845687866,
0.9339444637298584,
0.32686448097229004,
1.2673826217651367,
-0.13648761808872223,
-0.41039443016052246,
1.765647292137146,
-0.47361814975738525,
0.5675371885299683,
1.053435206413269,
-0.40711402893066406,
-1.056546926498413,
-0.8795546293258667,
-1.106080412864685,
-0.610533595085144,
1.1775867938995361,
0.16264936327934265,
-1.1702500581741333,
0.2662848234176636,
1.6090130805969238,
0.10969752818346024,
-0.1715039312839508,
0.6483617424964905,
0.4260905385017395,
-0.7328111529350281,
-0.0467338003218174,
-0.9839111566543579,
0.4981531500816345,
-0.2654883861541748,
-0.345075786113739,
0.1817166805267334,
0.5643988847732544,
1.2213817834854126,
0.005109294317662716,
0.11289326101541519,
1.3067249059677124,
-1.3370298147201538,
1.3797039985656738,
-0.6932929158210754,
0.345989465713501,
-2.4303770065307617,
1.3806231021881104,
-0.8791120648384094,
1.8698537349700928,
-2.5913727283477783,
0.39065712690353394,
-0.49823760986328125,
-0.43681973218917847,
0.2313413918018341,
-0.338742196559906,
0.13030055165290833,
-0.14120760560035706,
-1.0120453834533691,
-0.1472594439983368,
-0.8545305728912354,
0.5552781224250793,
1.1794410943984985,
1.4225159883499146,
-1.0377297401428223,
-0.3190774917602539,
-1.7523247003555298,
-0.20902778208255768,
-0.6061851382255554,
0.33041977882385254,
-1.9407196044921875,
-0.19820524752140045,
-2.030754804611206,
-2.325998544692993,
-1.367483377456665,
-0.9909218549728394,
1.118074893951416,
0.1535039246082306,
-0.8807496428489685,
1.0191596746444702,
-0.35484206676483154,
-1.7674281597137451,
1.0911922454833984,
-2.135467767715454
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | You can load it with `dataset = datasets.load_dataset('json', data_files=args.dataset)` as you said.
Then if you need to apply additional processing to map it to a special structure, you can use rename columns or use `dataset.map`. For more information, you can check the documentation here: https://huggingface.co/docs/datasets/process.html
Also feel free to share your `run.py` code so we can take a look | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 59 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
You can load it with `dataset = datasets.load_dataset('json', data_files=args.dataset)` as you said.
Then if you need to apply additional processing to map it to a special structure, you can use rename columns or use `dataset.map`. For more information, you can check the documentation here: https://huggingface.co/docs/datasets/process.html
Also feel free to share your `run.py` code so we can take a look | [
-1.194284200668335,
-0.9696992635726929,
-0.7197475433349609,
1.4214166402816772,
-0.15256242454051971,
-1.196161150932312,
0.09251124411821365,
-1.044662356376648,
1.665001392364502,
-0.6858835220336914,
0.30619102716445923,
-1.6654080152511597,
-0.05185232311487198,
-0.5619621276855469,
-0.755695641040802,
-0.8398739695549011,
-0.4197315573692322,
-0.9156437516212463,
0.9455928802490234,
2.5440070629119873,
1.2052202224731445,
-1.2896554470062256,
2.720144271850586,
0.6167846322059631,
-0.22926877439022064,
-0.9981673955917358,
0.5197864770889282,
0.012661222368478775,
-1.2286964654922485,
-0.33079344034194946,
-0.9342072010040283,
-0.047833848744630814,
-0.6200150847434998,
-0.5368630886077881,
0.07274620980024338,
0.4508123993873596,
-0.24661509692668915,
-0.28010547161102295,
-0.4694021940231323,
-0.6621182560920715,
0.5590067505836487,
-0.27890461683273315,
0.9178669452667236,
-0.30999916791915894,
1.7812273502349854,
-0.5675527453422546,
0.4544398784637451,
0.7299485802650452,
1.2766166925430298,
0.15127576887607574,
0.07056986540555954,
0.2874187231063843,
0.31709128618240356,
0.03315247222781181,
0.513649046421051,
1.1971280574798584,
0.6044997572898865,
0.497965931892395,
0.6451265215873718,
-2.251781940460205,
1.2957472801208496,
-0.8943787813186646,
0.3112677335739136,
1.3427648544311523,
-0.904686450958252,
0.39940255880355835,
-1.8514227867126465,
-0.08853238821029663,
0.5729641914367676,
-2.2207412719726562,
0.18624326586723328,
-1.3055719137191772,
-0.5524727702140808,
1.022023320198059,
0.24841661751270294,
-1.2852003574371338,
0.20816679298877716,
-0.46763235330581665,
1.0876564979553223,
0.5210608839988708,
1.1945682764053345,
-1.7125880718231201,
0.012780621647834778,
-0.24782392382621765,
0.1631607562303543,
-1.25914466381073,
-1.6082767248153687,
0.5429805517196655,
0.5458614826202393,
0.7342063188552856,
-0.12257441878318787,
0.981656014919281,
-1.0071008205413818,
0.8634324073791504,
-1.0444114208221436,
-1.7115172147750854,
-1.3719865083694458,
-2.3108022212982178,
-2.4283344745635986,
0.7607578039169312,
-0.48642927408218384,
-0.4522382616996765,
2.0457186698913574,
-0.9921997785568237,
-1.8024085760116577,
1.1073416471481323,
0.3381359577178955,
-0.05021024867892265,
2.3901240825653076,
0.2506060004234314,
-0.7714422345161438,
0.44957828521728516,
-0.7305088043212891,
0.8020837306976318,
-0.21339714527130127,
1.363431453704834,
0.6089838743209839,
-1.0181998014450073,
1.590537428855896,
-0.4570704698562622,
0.5450027585029602,
-0.6757751703262329,
-0.5428441166877747,
-0.8462501168251038,
0.2583627700805664,
1.94473397731781,
-0.3938269019126892,
1.5570012331008911,
-0.3912302851676941,
-1.6001321077346802,
-1.5265589952468872,
0.8584719300270081,
0.5121859312057495,
-0.7999236583709717,
0.09177832305431366,
-0.4647088646888733,
0.08950086683034897,
-0.0051780943758785725,
1.075459361076355,
1.1644822359085083,
0.7961100935935974,
-0.3739752173423767,
-0.8849201202392578,
0.23751257359981537,
-0.03109220415353775,
-0.6815422773361206,
-1.8493138551712036,
-0.34462159872055054,
0.16636745631694794,
0.6166549921035767,
-1.2172592878341675,
1.6884807348251343,
0.8398976922035217,
1.9927222728729248,
0.9657206535339355,
-0.38956278562545776,
1.5528901815414429,
-0.03515729680657387,
1.8954565525054932,
-0.5271450281143188,
0.6447420120239258,
-0.37055617570877075,
-1.1903952360153198,
0.8307106494903564,
-0.31777817010879517,
-2.0445945262908936,
-0.7892025113105774,
-0.8414263129234314,
-0.1860605627298355,
-0.8143408298492432,
0.8702893257141113,
-0.24891497194766998,
-1.5051872730255127,
0.2261892557144165,
-0.6222307085990906,
0.11647278070449829,
-1.3018126487731934,
0.26208436489105225,
0.7442721128463745,
-0.6547764539718628,
0.014950085431337357,
-0.26747703552246094,
-1.2863043546676636,
-0.5105516314506531,
0.3016282320022583,
1.8735651969909668,
-0.6937892436981201,
0.9451749324798584,
1.0475177764892578,
-0.7448537349700928,
0.05695105344057083,
0.3001977205276489,
-0.2894550561904907,
0.803199052810669,
-1.059808611869812,
-0.4379737973213196,
1.141709327697754,
-0.1322447955608368,
-0.7057099342346191,
1.425085186958313,
0.798061192035675,
-1.0361138582229614,
-0.22367341816425323,
-0.20975323021411896,
-0.7565261721611023,
0.017875857651233673,
-1.5813961029052734,
-0.14501789212226868,
0.2968006730079651,
-1.4707000255584717,
-0.44779258966445923,
-0.24048703908920288,
1.3299199342727661,
-0.25199806690216064,
1.4235049486160278,
-0.26396894454956055,
-0.16392439603805542,
-0.35771650075912476,
-0.43347853422164917,
0.22479979693889618,
-0.13934220373630524,
-0.59993577003479,
0.2631257176399231,
-0.8509296774864197,
0.3064696192741394,
1.4718499183654785,
0.3638498783111572,
0.08574001491069794,
0.4373571276664734,
1.0830684900283813,
0.4040679931640625,
-0.04598328843712807,
-0.9291576147079468,
-1.6050339937210083,
2.0677947998046875,
-1.4851869344711304,
1.9391095638275146,
0.7295894622802734,
-0.11701329797506332,
-1.8109105825424194,
-1.8594070672988892,
1.3420664072036743,
1.1494709253311157,
2.3828344345092773,
0.6110847592353821,
0.3644754886627197,
-0.7535762190818787,
-0.7163956761360168,
0.37282395362854004,
-1.0129384994506836,
-0.7433239221572876,
0.15985313057899475,
2.409522533416748,
1.7588573694229126,
-0.5168986320495605,
-0.2256896197795868,
-0.9549793601036072,
1.260123610496521,
-0.17130841314792633,
0.2547908425331116,
2.11527681350708,
-0.3413272500038147,
-1.042885184288025,
1.3295046091079712,
-2.3783764839172363,
0.23736359179019928,
1.9809297323226929,
0.33556419610977173,
0.12189321219921112,
-1.4384856224060059,
-0.627936065196991,
-0.18633081018924713,
-0.5256261825561523,
-1.2153419256210327,
0.6060042381286621,
-0.27991724014282227,
-0.9159963726997375,
-1.4977705478668213,
0.0885516107082367,
-1.179679274559021,
-1.7465673685073853,
0.3433699607849121,
1.8683055639266968,
2.0351076126098633,
-0.7992060780525208,
1.4396346807479858,
-0.2547978162765503,
0.17275705933570862,
1.2660647630691528,
1.2837759256362915,
3.0740604400634766,
1.8504796028137207,
-1.2937335968017578,
0.7419577836990356,
-0.1895485520362854,
-0.5125876665115356,
1.1838639974594116,
-1.1051722764968872,
1.1953938007354736,
-0.29989713430404663,
-1.1906732320785522,
-1.28164541721344,
1.0841742753982544,
0.5171597599983215,
0.07976497709751129,
-0.5200020670890808,
1.253011703491211,
0.17311447858810425,
1.316106915473938,
0.5788736343383789,
-0.3934383988380432,
0.6299148201942444,
-0.3666347861289978,
-0.5590408444404602,
1.6099627017974854,
0.15288428962230682,
-1.4319626092910767,
-2.3405144214630127,
-0.3259430527687073,
-0.9080013632774353,
-0.032966770231723785,
-0.5327485203742981,
-1.0264261960983276,
1.5636924505233765,
0.44799792766571045,
-1.2782105207443237,
-0.2644510269165039,
-0.2765997648239136,
-0.5753757357597351,
2.6251306533813477,
-1.304243803024292,
-0.12927716970443726,
-0.9615052938461304,
-0.5184942483901978,
1.6149013042449951,
-1.1572809219360352,
-0.20258116722106934,
-1.0633293390274048,
-0.7137975096702576,
-1.3672853708267212,
-0.5022715330123901,
0.014181148260831833,
-0.9255765080451965,
0.7771616578102112,
0.11438536643981934,
-1.1138648986816406,
-0.27044034004211426,
-0.9168967008590698,
0.9684874415397644,
-0.1671287715435028,
0.2686598300933838,
1.819838523864746,
0.4212615489959717,
-0.43666404485702515,
0.7282507419586182,
1.143255591392517,
0.6232468485832214,
-0.6825251579284668,
0.1821705549955368,
-0.8062964081764221,
0.2941606044769287,
-1.333794116973877,
0.25457924604415894,
-2.8795039653778076,
0.6976156830787659,
-0.09856747090816498,
-0.06967104971408844,
-0.11148463934659958,
-1.31478750705719,
1.1301811933517456,
2.600029706954956,
-1.1705859899520874,
0.5221313834190369,
0.4019744396209717,
1.0928845405578613,
-1.5740264654159546,
0.21425871551036835,
-0.4486192464828491,
2.146488904953003,
0.1145191565155983,
1.249495506286621,
-0.4953579902648926,
-2.2099313735961914,
0.6420195698738098,
-1.2876702547073364,
-1.1300861835479736,
0.8099774122238159,
-0.9034202694892883,
0.2123642861843109,
-1.3775789737701416,
-0.18528856337070465,
-0.9675378799438477,
-1.2688806056976318,
0.7069690823554993,
0.1354391872882843,
0.48343461751937866,
-0.6100665330886841,
0.4166299104690552,
-2.1103484630584717,
-1.3853213787078857,
-0.187983900308609,
-0.9785727262496948,
0.44726765155792236,
-0.287314236164093,
0.6281581521034241,
-0.08107725530862808,
0.06598789989948273,
0.3944409489631653,
1.3441262245178223,
3.3478076457977295,
0.20854072272777557,
0.2570491433143616,
-0.051395878195762634,
-1.0394206047058105,
1.4425468444824219,
1.0341414213180542,
-0.15020780265331268,
-0.532046377658844,
-0.9965021014213562,
1.2395451068878174,
2.0449376106262207,
1.1205568313598633,
0.06340696662664413,
-0.8464607000350952,
-0.7972530126571655,
0.1159275621175766,
0.19322125613689423,
0.4852352738380432,
0.9211735129356384,
0.02861139178276062,
0.16334283351898193,
1.3571557998657227,
1.1883769035339355,
-0.3566506505012512,
0.4444882869720459,
-0.8875247240066528,
-0.4390159249305725,
0.4484185576438904,
0.21706053614616394,
0.044638168066740036,
0.4675576686859131,
-1.0912160873413086,
-0.2621855139732361,
-0.3237267732620239,
-0.9521828889846802,
-0.7727543711662292,
-0.4175361394882202,
-0.39280253648757935,
1.5951896905899048,
0.02504943311214447,
-0.4536375403404236,
0.012086596339941025,
-0.7763754725456238,
-0.13937342166900635,
-1.0610476732254028,
0.250601589679718,
-0.179353266954422,
-0.0673215389251709,
-0.17528627812862396,
1.7927401065826416,
-0.9939514398574829,
-2.09743595123291,
0.24768640100955963,
0.29579025506973267,
-0.41197556257247925,
0.1986948847770691,
1.6663904190063477,
0.5493579506874084,
1.4031095504760742,
1.288254737854004,
1.0200903415679932,
-0.6012444496154785,
-1.2109166383743286,
0.7401547431945801,
0.9286975264549255,
-1.35224187374115,
0.8749777674674988,
-0.09132107347249985,
-0.4720756411552429,
0.6971642971038818,
1.2996902465820312,
0.37933993339538574,
-1.9876118898391724,
0.8128618597984314,
-0.9017288684844971,
0.7488448023796082,
0.6959566473960876,
0.8014208674430847,
0.18595176935195923,
0.8038995862007141,
-1.2781356573104858,
-1.1336350440979004,
-0.7060907483100891,
-0.5870948433876038,
1.918418288230896,
-0.14628002047538757,
0.528346598148346,
-0.10458989441394806,
-1.2519991397857666,
-0.09109164774417877,
0.7265792489051819,
0.3853316903114319,
-0.4609150290489197,
0.8960723280906677,
-0.5677005648612976,
-1.056125521659851,
-1.331059217453003,
-0.4437175393104553,
-1.0287024974822998,
-0.8831486105918884,
0.9630683064460754,
0.7597804665565491,
0.39236563444137573,
1.863284945487976,
0.5649875998497009,
0.29331493377685547,
-2.6852970123291016,
0.9219101071357727,
0.2794913053512573,
-0.07595416158437729,
0.9231324791908264,
0.25402259826660156,
1.148073434829712,
-0.04331449791789055,
0.5894246101379395,
-2.3304710388183594,
2.259058713912964,
-0.16505490243434906,
0.6639595031738281,
0.07341182976961136,
-0.20317770540714264,
1.0669927597045898,
0.5203982591629028,
0.6133013963699341,
-1.1679953336715698,
0.7367870807647705,
-0.5935031175613403,
1.1648017168045044,
0.9507611989974976,
-0.8597341179847717,
0.02805352956056595,
1.3221571445465088,
0.47378504276275635,
-0.4048335552215576,
-0.8961086273193359,
-0.8923208713531494,
0.9802480936050415,
1.7260713577270508,
-0.08640658855438232,
0.006002712994813919,
0.9094470739364624,
0.6627439856529236,
-1.3575361967086792,
0.05187823995947838,
-0.7001076340675354,
-0.7010718584060669,
1.6857644319534302,
2.0557241439819336,
-0.0547245554625988,
-0.1807055026292801,
-0.7816778421401978,
-1.1897391080856323,
0.7862058281898499,
-0.016520097851753235,
0.14893855154514313,
0.7390208840370178,
-0.6637226939201355,
1.1355160474777222,
0.7198429703712463,
0.9735553860664368,
0.055537931621074677,
0.3790932893753052,
0.2793315649032593,
-0.31174391508102417,
-1.1605550050735474,
-0.2974053621292114,
-1.0697120428085327,
-2.6209654808044434,
0.47987157106399536,
-0.2886499762535095,
-1.3874773979187012,
-0.015318384394049644,
-0.985591471195221,
0.887031078338623,
-0.5738059878349304,
-1.1117700338363647,
-1.437350869178772,
0.3129881024360657,
-0.18713615834712982,
0.919780969619751,
-1.6363364458084106,
-0.08244875073432922,
1.2384049892425537,
0.9181051850318909,
-0.6422665119171143,
0.9784361720085144,
0.26306432485580444,
0.9378531575202942,
0.7502598762512207,
-0.3399695158004761,
0.5430395603179932,
0.14768537878990173,
-1.350075125694275,
0.3833714723587036,
1.2332618236541748,
0.19746090471744537,
1.4130266904830933,
-0.4527741074562073,
0.030080646276474,
0.4719160795211792,
-0.5484862327575684,
-0.5218745470046997,
-0.49228304624557495,
0.70522540807724,
0.08815675973892212,
-0.9519448280334473,
0.05169186741113663,
-0.07034387439489365,
-0.1518109291791916,
0.22706247866153717,
-1.5099436044692993,
-0.22466328740119934,
-0.4022561311721802,
-0.5591475963592529,
-1.2675766944885254,
0.035105179995298386,
1.3267498016357422,
-0.8045113682746887,
-0.22107896208763123,
0.46576517820358276,
0.33463191986083984,
0.5650725364685059,
0.6394610404968262,
-0.6888039112091064,
-0.3345335125923157,
-0.3369418978691101,
-0.3019331693649292,
0.28235578536987305,
1.265289068222046,
-0.11385942995548248,
-1.055942177772522,
0.7139338850975037,
-0.3963533639907837,
0.08720527589321136,
1.9326883554458618,
0.06801395863294601,
-0.7861064076423645,
0.36986076831817627,
-0.7076448202133179,
1.816935658454895,
1.6706918478012085,
1.3864716291427612,
-0.15347754955291748,
-0.9031174182891846,
0.5598744750022888,
-0.32865267992019653,
-0.3847299814224243,
1.0080541372299194,
0.36865830421447754,
-0.18359746038913727,
-1.3498926162719727,
0.5841928720474243,
1.3262226581573486,
-0.9386139512062073,
-0.7620123028755188,
0.13747598230838776,
-0.8541717529296875,
1.1382932662963867,
0.6268764138221741,
0.35890352725982666,
0.22914230823516846,
1.520689845085144,
0.6674962043762207,
-0.4717220067977905,
0.5174080729484558,
0.4376181960105896,
-0.18453244864940643,
-2.035283088684082,
-1.106889009475708,
0.2826722264289856,
-0.4641842246055603,
-1.5286976099014282,
1.381933331489563,
-1.1590508222579956,
-0.9960191249847412,
0.501387357711792,
0.06164946407079697,
1.379120945930481,
0.3525787591934204,
1.6980997323989868,
2.0862293243408203,
0.9077544808387756,
0.29912132024765015,
1.3158087730407715,
-0.07431517541408539,
-0.425437331199646,
1.8020578622817993,
-0.49509209394454956,
0.5653084516525269,
0.9961100220680237,
-0.3741759657859802,
-1.0171372890472412,
-0.8525081276893616,
-1.1688563823699951,
-0.5837302207946777,
1.1865227222442627,
0.10940886288881302,
-1.1628056764602661,
0.26887309551239014,
1.6294047832489014,
0.07740779221057892,
-0.20980392396450043,
0.6958884596824646,
0.40994763374328613,
-0.7594965696334839,
-0.038912348449230194,
-0.9128953218460083,
0.4586235284805298,
-0.21466279029846191,
-0.29025644063949585,
0.2040218710899353,
0.5504029989242554,
1.238798975944519,
-0.014670031145215034,
0.09678394347429276,
1.2427796125411987,
-1.3373504877090454,
1.4678142070770264,
-0.6343435049057007,
0.32699382305145264,
-2.4786927700042725,
1.3704932928085327,
-0.820631742477417,
1.8466417789459229,
-2.5961272716522217,
0.4174514412879944,
-0.49220508337020874,
-0.43909573554992676,
0.23384065926074982,
-0.3845955729484558,
0.11889225244522095,
-0.1480104774236679,
-1.0382543802261353,
-0.13918161392211914,
-0.8065202236175537,
0.5812211632728577,
1.1324999332427979,
1.393160104751587,
-1.119380235671997,
-0.3107275366783142,
-1.7678719758987427,
-0.22122107446193695,
-0.6582543253898621,
0.37600183486938477,
-1.9827080965042114,
-0.21174173057079315,
-1.9964567422866821,
-2.3314406871795654,
-1.3436707258224487,
-0.9147547483444214,
1.0889853239059448,
0.11013384163379669,
-0.9077152013778687,
1.046010971069336,
-0.3569808602333069,
-1.8159878253936768,
1.051081657409668,
-2.1600992679595947
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | ```
# Dataset selection
if args.dataset.endswith('.json') or args.dataset.endswith('.jsonl'):
dataset_id = None
# Load from local json/jsonl file
dataset = datasets.load_dataset('json', data_files=args.dataset)
# By default, the "json" dataset loader places all examples in the train split,
# so if we want to use a jsonl file for evaluation we need to get the "train" split
# from the loaded dataset
eval_split = 'train'
else:
default_datasets = {'qa': ('squad',), 'nli': ('snli',)}
dataset_id = tuple(args.dataset.split(':')) if args.dataset is not None else \
default_datasets[args.task]
# MNLI has two validation splits (one with matched domains and one with mismatched domains). Most datasets just have one "validation" split
eval_split = 'validation_matched' if dataset_id == ('glue', 'mnli') else 'validation'
# Load the raw data
dataset = datasets.load_dataset(*dataset_id)
```
I want to load JSON squad dataset instead `dataset = datasets.load_dataset('squad')` to retrain the model.
| Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 136 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
```
# Dataset selection
if args.dataset.endswith('.json') or args.dataset.endswith('.jsonl'):
dataset_id = None
# Load from local json/jsonl file
dataset = datasets.load_dataset('json', data_files=args.dataset)
# By default, the "json" dataset loader places all examples in the train split,
# so if we want to use a jsonl file for evaluation we need to get the "train" split
# from the loaded dataset
eval_split = 'train'
else:
default_datasets = {'qa': ('squad',), 'nli': ('snli',)}
dataset_id = tuple(args.dataset.split(':')) if args.dataset is not None else \
default_datasets[args.task]
# MNLI has two validation splits (one with matched domains and one with mismatched domains). Most datasets just have one "validation" split
eval_split = 'validation_matched' if dataset_id == ('glue', 'mnli') else 'validation'
# Load the raw data
dataset = datasets.load_dataset(*dataset_id)
```
I want to load JSON squad dataset instead `dataset = datasets.load_dataset('squad')` to retrain the model.
| [
-1.2329543828964233,
-0.9990028738975525,
-0.7333858609199524,
1.456868052482605,
-0.20202070474624634,
-1.1619631052017212,
0.07510295510292053,
-1.019471287727356,
1.6662757396697998,
-0.7236128449440002,
0.21934567391872406,
-1.674518346786499,
-0.0535946786403656,
-0.6100128889083862,
-0.7000584602355957,
-0.8615676760673523,
-0.4288831055164337,
-0.8698583245277405,
1.0132282972335815,
2.499762773513794,
1.2039711475372314,
-1.3069372177124023,
2.7858614921569824,
0.6576937437057495,
-0.2238411009311676,
-1.0309250354766846,
0.5447536706924438,
-0.012493478134274483,
-1.19866144657135,
-0.38065800070762634,
-0.9549036026000977,
-0.02892269566655159,
-0.5646337270736694,
-0.5321270823478699,
0.09608407318592072,
0.4411492943763733,
-0.2817429006099701,
-0.37798506021499634,
-0.503179669380188,
-0.6287139654159546,
0.4988999366760254,
-0.28336143493652344,
0.8957714438438416,
-0.2927723824977875,
1.777400016784668,
-0.5372668504714966,
0.38758453726768494,
0.7364212274551392,
1.2756248712539673,
0.1710018664598465,
0.08406144380569458,
0.3531240224838257,
0.332441508769989,
0.06484220921993256,
0.5414558053016663,
1.198074221611023,
0.6040043234825134,
0.42932015657424927,
0.6920570135116577,
-2.2646543979644775,
1.2720612287521362,
-0.9422255754470825,
0.32059246301651,
1.3686964511871338,
-0.9210000038146973,
0.4868325889110565,
-1.8287928104400635,
-0.005320294294506311,
0.6114728450775146,
-2.2281460762023926,
0.19987817108631134,
-1.2791733741760254,
-0.502635657787323,
1.0107192993164062,
0.28566306829452515,
-1.210736632347107,
0.21730272471904755,
-0.509864866733551,
1.0799334049224854,
0.5085030794143677,
1.1897858381271362,
-1.6607328653335571,
-0.03185801953077316,
-0.22370445728302002,
0.15279430150985718,
-1.2712161540985107,
-1.6026917695999146,
0.5621491074562073,
0.605293333530426,
0.7751221060752869,
-0.14100968837738037,
1.010790228843689,
-0.9912744164466858,
0.7641171216964722,
-1.065102458000183,
-1.7179312705993652,
-1.3983347415924072,
-2.3084704875946045,
-2.3647806644439697,
0.7634546160697937,
-0.4718618392944336,
-0.5169497728347778,
2.0638318061828613,
-0.9795697331428528,
-1.8396693468093872,
1.1451631784439087,
0.32133743166923523,
-0.0008957171812653542,
2.3991003036499023,
0.24844250082969666,
-0.7485449314117432,
0.47003769874572754,
-0.7175861597061157,
0.77544105052948,
-0.20951472222805023,
1.3524179458618164,
0.5471406579017639,
-0.9640709161758423,
1.6047052145004272,
-0.41230571269989014,
0.5812331438064575,
-0.6521227359771729,
-0.5038149356842041,
-0.8441017866134644,
0.250723659992218,
1.9885457754135132,
-0.3298521041870117,
1.5264253616333008,
-0.4253152906894684,
-1.6317594051361084,
-1.5631465911865234,
0.8843457698822021,
0.4527565836906433,
-0.813109278678894,
0.16497759521007538,
-0.5316124558448792,
0.1126088947057724,
-0.03853348642587662,
1.0802441835403442,
1.2034947872161865,
0.7199963927268982,
-0.36724117398262024,
-0.8930451273918152,
0.24637386202812195,
-0.05588463693857193,
-0.6756726503372192,
-1.862459659576416,
-0.31144168972969055,
0.16138753294944763,
0.6490567922592163,
-1.2083923816680908,
1.6136934757232666,
0.8647825121879578,
1.9564322233200073,
1.0276284217834473,
-0.4093739986419678,
1.5299769639968872,
0.04343732073903084,
1.8469998836517334,
-0.5977727174758911,
0.6243190169334412,
-0.3124721646308899,
-1.1686384677886963,
0.8263760209083557,
-0.32275691628456116,
-2.046025037765503,
-0.7974309325218201,
-0.812462329864502,
-0.21654866635799408,
-0.7849153280258179,
0.8681207299232483,
-0.32252809405326843,
-1.5182253122329712,
0.22884118556976318,
-0.6524964570999146,
0.18504390120506287,
-1.2797826528549194,
0.24672985076904297,
0.716629683971405,
-0.60780930519104,
0.04467804357409477,
-0.2756964862346649,
-1.3077073097229004,
-0.4730831980705261,
0.34660136699676514,
1.8468199968338013,
-0.7523190379142761,
0.9063748121261597,
1.0266929864883423,
-0.7678845524787903,
0.06925909221172333,
0.26011571288108826,
-0.20941567420959473,
0.8040468692779541,
-1.031298279762268,
-0.47942081093788147,
1.1771115064620972,
-0.18435774743556976,
-0.6784419417381287,
1.4172887802124023,
0.8028416037559509,
-1.05510413646698,
-0.24097105860710144,
-0.219843327999115,
-0.8513798713684082,
0.014046922326087952,
-1.5860706567764282,
-0.1887897253036499,
0.33718597888946533,
-1.5151991844177246,
-0.4790687561035156,
-0.30268263816833496,
1.292708396911621,
-0.18450431525707245,
1.431795358657837,
-0.2967482805252075,
-0.17357195913791656,
-0.2755037546157837,
-0.44733425974845886,
0.2706226110458374,
-0.19991904497146606,
-0.5571953654289246,
0.19929338991641998,
-0.8976173400878906,
0.2947045564651489,
1.4595614671707153,
0.40729987621307373,
0.07026158273220062,
0.5306029915809631,
1.0950180292129517,
0.4489418566226959,
-0.06072453036904335,
-0.9054875373840332,
-1.582770586013794,
2.041843891143799,
-1.5055893659591675,
1.88119637966156,
0.6549904942512512,
-0.09226742386817932,
-1.7766302824020386,
-1.8824329376220703,
1.354832649230957,
1.1678553819656372,
2.354069709777832,
0.6012563109397888,
0.3814244568347931,
-0.7950424551963806,
-0.7546305656433105,
0.2612780034542084,
-0.9903389811515808,
-0.7142545580863953,
0.14969925582408905,
2.4511287212371826,
1.8363100290298462,
-0.525822103023529,
-0.20508722960948944,
-0.911203920841217,
1.307322382926941,
-0.23103448748588562,
0.310491681098938,
2.1131999492645264,
-0.323743999004364,
-0.9539461731910706,
1.3303157091140747,
-2.427448034286499,
0.21219684183597565,
1.9576359987258911,
0.2724951505661011,
0.1463945508003235,
-1.4623303413391113,
-0.6692304015159607,
-0.17868027091026306,
-0.4983575642108917,
-1.2567874193191528,
0.591049075126648,
-0.30870503187179565,
-0.8641268014907837,
-1.5008505582809448,
0.12192361056804657,
-1.1450271606445312,
-1.6972460746765137,
0.3081408143043518,
1.9060616493225098,
2.0542144775390625,
-0.811690092086792,
1.4915294647216797,
-0.2460421472787857,
0.21359969675540924,
1.2625610828399658,
1.2404896020889282,
3.0697529315948486,
1.8589648008346558,
-1.2880131006240845,
0.7194031476974487,
-0.15834559500217438,
-0.5166035294532776,
1.1719402074813843,
-1.1723616123199463,
1.1724345684051514,
-0.26983052492141724,
-1.20106041431427,
-1.3045259714126587,
1.057619571685791,
0.5193302035331726,
0.05666206404566765,
-0.5100547075271606,
1.2717546224594116,
0.055788468569517136,
1.3055610656738281,
0.5769698023796082,
-0.44218042492866516,
0.602878749370575,
-0.36436647176742554,
-0.5381875038146973,
1.561735987663269,
0.16035793721675873,
-1.4408372640609741,
-2.253200054168701,
-0.3279777765274048,
-0.8827442526817322,
-0.011119320057332516,
-0.5163974761962891,
-0.9811288118362427,
1.5987567901611328,
0.3812064528465271,
-1.2223668098449707,
-0.28436264395713806,
-0.23106224834918976,
-0.5275682806968689,
2.6347649097442627,
-1.274141550064087,
-0.19367875158786774,
-0.961774468421936,
-0.5487106442451477,
1.652607798576355,
-1.1157149076461792,
-0.22785964608192444,
-1.1221662759780884,
-0.7090149521827698,
-1.3920412063598633,
-0.4737904369831085,
0.022007476538419724,
-0.93601393699646,
0.8700932264328003,
0.12890303134918213,
-1.1087251901626587,
-0.23909339308738708,
-0.9363693594932556,
1.0256565809249878,
-0.20192410051822662,
0.23838162422180176,
1.8567267656326294,
0.3918713331222534,
-0.409197062253952,
0.7708883881568909,
1.131833791732788,
0.6238375306129456,
-0.6968517303466797,
0.1142120361328125,
-0.7720755934715271,
0.26311755180358887,
-1.3571912050247192,
0.273038774728775,
-2.892930269241333,
0.6734395027160645,
-0.07655096054077148,
-0.04318572208285332,
-0.10909700393676758,
-1.3017258644104004,
1.1324502229690552,
2.604036569595337,
-1.1898502111434937,
0.4992130994796753,
0.44799602031707764,
1.2235112190246582,
-1.619019627571106,
0.23874500393867493,
-0.4569472670555115,
2.1576919555664062,
0.13745899498462677,
1.3077579736709595,
-0.4548003077507019,
-2.2593984603881836,
0.6479119658470154,
-1.2892146110534668,
-1.0988589525222778,
0.7347193956375122,
-0.9046902060508728,
0.25112709403038025,
-1.4807766675949097,
-0.2032892405986786,
-0.9297040104866028,
-1.2297296524047852,
0.704808235168457,
0.19635985791683197,
0.40133947134017944,
-0.6038320660591125,
0.396870881319046,
-2.1162428855895996,
-1.4063606262207031,
-0.1486387550830841,
-0.9580045938491821,
0.43941977620124817,
-0.348579078912735,
0.6309951543807983,
-0.09663651883602142,
0.03391127660870552,
0.3345605731010437,
1.3623713254928589,
3.358767032623291,
0.1787499338388443,
0.20981469750404358,
-0.0716257393360138,
-1.013490080833435,
1.4747440814971924,
0.9492087364196777,
-0.15302401781082153,
-0.48078957200050354,
-1.032519817352295,
1.2351034879684448,
2.0315258502960205,
1.097216010093689,
0.025846652686595917,
-0.8169373869895935,
-0.7420146465301514,
0.09760230779647827,
0.203921377658844,
0.5304288268089294,
0.8388073444366455,
-0.01839948073029518,
0.12436245381832123,
1.394456386566162,
1.1435476541519165,
-0.3178587853908539,
0.42307332158088684,
-0.8847559094429016,
-0.4881552755832672,
0.44565680623054504,
0.18648873269557953,
0.013231934979557991,
0.4254363179206848,
-1.0959970951080322,
-0.21377666294574738,
-0.33182814717292786,
-0.8932013511657715,
-0.7175952792167664,
-0.355483740568161,
-0.387334406375885,
1.5524706840515137,
0.08895224332809448,
-0.5231558084487915,
-0.05560576543211937,
-0.7719555497169495,
-0.16329890489578247,
-1.0124516487121582,
0.2507166564464569,
-0.22356337308883667,
-0.13472288846969604,
-0.20726071298122406,
1.7277796268463135,
-0.9946905374526978,
-2.1024394035339355,
0.19484539330005646,
0.3538130223751068,
-0.30056220293045044,
0.1744322031736374,
1.626987338066101,
0.5240123271942139,
1.4206985235214233,
1.3324676752090454,
0.995747447013855,
-0.605963408946991,
-1.2135326862335205,
0.6848980784416199,
0.9275135397911072,
-1.3208692073822021,
0.8558087944984436,
-0.1178341805934906,
-0.547820508480072,
0.6449467539787292,
1.3433538675308228,
0.3986295759677887,
-1.9906426668167114,
0.8561355471611023,
-0.9579963088035583,
0.7139266133308411,
0.725202739238739,
0.8023527264595032,
0.18701480329036713,
0.7775598764419556,
-1.2511413097381592,
-1.186747431755066,
-0.7572431564331055,
-0.588211715221405,
1.9430397748947144,
-0.16796699166297913,
0.512742280960083,
-0.08986048400402069,
-1.2538630962371826,
-0.05264509841799736,
0.6577453017234802,
0.3605317175388336,
-0.473923921585083,
0.8663939237594604,
-0.5981801152229309,
-1.0988833904266357,
-1.3081661462783813,
-0.4378873109817505,
-1.0464367866516113,
-0.9279994368553162,
0.9898084402084351,
0.8039363026618958,
0.36729586124420166,
1.8253804445266724,
0.5741400718688965,
0.28748470544815063,
-2.6389284133911133,
0.9444992542266846,
0.2623828947544098,
-0.05786982923746109,
0.8625420928001404,
0.24781489372253418,
1.1370998620986938,
0.006701381877064705,
0.5795800089836121,
-2.296576738357544,
2.211768627166748,
-0.16284231841564178,
0.6778687238693237,
0.0037391232326626778,
-0.16974297165870667,
1.050462245941162,
0.49875807762145996,
0.6368106603622437,
-1.0916584730148315,
0.742518961429596,
-0.5177925825119019,
1.1787424087524414,
1.0046100616455078,
-0.8202914595603943,
0.04813668504357338,
1.341280221939087,
0.4630230665206909,
-0.519581139087677,
-0.9277177453041077,
-0.9121661186218262,
0.979431688785553,
1.72605299949646,
-0.10175083577632904,
-0.010957784950733185,
0.9016746282577515,
0.6310942769050598,
-1.2983354330062866,
0.04291122034192085,
-0.6651272773742676,
-0.6269535422325134,
1.6963465213775635,
2.0619125366210938,
-0.14174862205982208,
-0.13156740367412567,
-0.746196985244751,
-1.2068099975585938,
0.7453906536102295,
0.018775785341858864,
0.14930443465709686,
0.8183525800704956,
-0.6437121033668518,
1.1048643589019775,
0.6947129964828491,
0.9844621419906616,
0.0404677540063858,
0.38074684143066406,
0.3059375286102295,
-0.318403422832489,
-1.1548868417739868,
-0.29336777329444885,
-1.0341925621032715,
-2.5369129180908203,
0.42627590894699097,
-0.24712085723876953,
-1.3498945236206055,
0.016304293647408485,
-0.9741892218589783,
0.9830181002616882,
-0.6032286882400513,
-1.0698169469833374,
-1.4328014850616455,
0.292011559009552,
-0.15476007759571075,
0.8553153872489929,
-1.6634554862976074,
-0.05318979173898697,
1.2633166313171387,
0.9147928953170776,
-0.6655468940734863,
1.0239875316619873,
0.2887170612812042,
0.9703311324119568,
0.7279795408248901,
-0.28673118352890015,
0.5484758615493774,
0.11352220177650452,
-1.34552800655365,
0.45049968361854553,
1.1950527429580688,
0.21850094199180603,
1.442747712135315,
-0.5065772533416748,
-0.08337771892547607,
0.47054168581962585,
-0.5849730372428894,
-0.46138906478881836,
-0.44261592626571655,
0.6671158671379089,
0.026591945439577103,
-0.9098698496818542,
0.015955811366438866,
-0.06819646060466766,
-0.18142211437225342,
0.23617208003997803,
-1.5107492208480835,
-0.17192649841308594,
-0.42655104398727417,
-0.5607398152351379,
-1.2230132818222046,
0.009370706975460052,
1.3529397249221802,
-0.8101568818092346,
-0.31120747327804565,
0.5004253387451172,
0.3282043933868408,
0.5136075019836426,
0.6549532413482666,
-0.7166327238082886,
-0.2592894732952118,
-0.301591694355011,
-0.3387795388698578,
0.27285298705101013,
1.3119784593582153,
-0.12819205224514008,
-1.062530279159546,
0.6910356879234314,
-0.3848794996738434,
0.04517488181591034,
1.905898094177246,
0.06403373181819916,
-0.803997278213501,
0.34251630306243896,
-0.7555654644966125,
1.850772738456726,
1.6590732336044312,
1.4333086013793945,
-0.17709578573703766,
-0.885866641998291,
0.5555104613304138,
-0.34571129083633423,
-0.3948037624359131,
0.9413016438484192,
0.3884817063808441,
-0.20921652019023895,
-1.3742440938949585,
0.6658738255500793,
1.259290099143982,
-0.9606648087501526,
-0.7179018259048462,
0.16532672941684723,
-0.8622526526451111,
1.1309399604797363,
0.6529901027679443,
0.357252836227417,
0.17731240391731262,
1.5704584121704102,
0.7090016603469849,
-0.5034112930297852,
0.4535731375217438,
0.47856926918029785,
-0.1973685473203659,
-2.040510892868042,
-1.0992515087127686,
0.2825770080089569,
-0.4691588878631592,
-1.5913798809051514,
1.370939016342163,
-1.1611502170562744,
-0.950583279132843,
0.4807519316673279,
0.10435760021209717,
1.3416874408721924,
0.3838697671890259,
1.656108021736145,
2.1012251377105713,
0.9388190507888794,
0.3434011936187744,
1.2839841842651367,
-0.11774899065494537,
-0.4178851842880249,
1.7666778564453125,
-0.39625123143196106,
0.5841325521469116,
1.0507957935333252,
-0.3869220018386841,
-1.0388447046279907,
-0.7975088357925415,
-1.229400396347046,
-0.5520205497741699,
1.1543563604354858,
0.10052584111690521,
-1.1354997158050537,
0.27325987815856934,
1.5570259094238281,
0.12384755909442902,
-0.2739971876144409,
0.7214807271957397,
0.47260403633117676,
-0.7963115572929382,
-0.05640649423003197,
-0.8935883045196533,
0.47635701298713684,
-0.2767917513847351,
-0.28897881507873535,
0.21930477023124695,
0.48626723885536194,
1.3368253707885742,
0.005008607171475887,
0.14006291329860687,
1.2424570322036743,
-1.3098020553588867,
1.448111891746521,
-0.7004552483558655,
0.2722451090812683,
-2.4939796924591064,
1.359922170639038,
-0.8515101075172424,
1.8994232416152954,
-2.6361382007598877,
0.45561477541923523,
-0.5441548228263855,
-0.4116489887237549,
0.24682697653770447,
-0.3869873285293579,
0.06550705432891846,
-0.0763683170080185,
-1.0878322124481201,
-0.04703526571393013,
-0.7414742708206177,
0.5453498363494873,
1.2057727575302124,
1.406502366065979,
-1.1667284965515137,
-0.3159189224243164,
-1.8053334951400757,
-0.26267433166503906,
-0.7554631233215332,
0.3873859941959381,
-1.9823311567306519,
-0.1972336769104004,
-1.9074755907058716,
-2.3764472007751465,
-1.2714563608169556,
-0.9010506272315979,
1.124580979347229,
0.11314694583415985,
-0.9619425535202026,
1.1904962062835693,
-0.3421996235847473,
-1.797274112701416,
1.095757246017456,
-2.1141390800476074
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | If your JSON has the same format as the SQuAD dataset, then you need to pass `field="data"` to `load_dataset`, since the SQuAD format is one big JSON object in which the "data" field contains the list of questions and answers.
```python
dataset = datasets.load_dataset('json', data_files=args.dataset, field="data")
```
Let me know if that helps :)
| Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 54 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
If your JSON has the same format as the SQuAD dataset, then you need to pass `field="data"` to `load_dataset`, since the SQuAD format is one big JSON object in which the "data" field contains the list of questions and answers.
```python
dataset = datasets.load_dataset('json', data_files=args.dataset, field="data")
```
Let me know if that helps :)
| [
-1.1996402740478516,
-0.9248396158218384,
-0.75330650806427,
1.4342197179794312,
-0.14983385801315308,
-1.2039263248443604,
0.12215501815080643,
-1.0387955904006958,
1.6640071868896484,
-0.7513505816459656,
0.2912710905075073,
-1.683327317237854,
-0.03404470533132553,
-0.5877658724784851,
-0.7390156984329224,
-0.8801782131195068,
-0.4193781912326813,
-0.8688681721687317,
0.9539894461631775,
2.495232105255127,
1.2319750785827637,
-1.3022804260253906,
2.707322359085083,
0.6030896306037903,
-0.27699917554855347,
-0.9863812923431396,
0.5039220452308655,
0.02298441156744957,
-1.1818345785140991,
-0.3774072229862213,
-0.9350229501724243,
-0.03839203342795372,
-0.5795391798019409,
-0.5661581754684448,
0.07985883206129074,
0.46726900339126587,
-0.3150586187839508,
-0.32261568307876587,
-0.44872570037841797,
-0.681128740310669,
0.5300140976905823,
-0.2542771100997925,
0.9027063846588135,
-0.30724018812179565,
1.8094377517700195,
-0.5957567095756531,
0.3855656683444977,
0.752082884311676,
1.2414002418518066,
0.1564546823501587,
0.051187049597501755,
0.2821890115737915,
0.30513185262680054,
0.02969195321202278,
0.5228164196014404,
1.2160755395889282,
0.5771026015281677,
0.49840354919433594,
0.6849100589752197,
-2.254549741744995,
1.3188661336898804,
-0.9642423987388611,
0.3030918836593628,
1.3804770708084106,
-0.9596130847930908,
0.383493036031723,
-1.8523825407028198,
-0.05865214020013809,
0.5203895568847656,
-2.2495410442352295,
0.22777780890464783,
-1.3189040422439575,
-0.5458203554153442,
1.0288074016571045,
0.2597101628780365,
-1.244443655014038,
0.20760241150856018,
-0.46044811606407166,
1.075868844985962,
0.526987612247467,
1.1984785795211792,
-1.679518461227417,
-0.03983594849705696,
-0.2683984637260437,
0.14879411458969116,
-1.3018946647644043,
-1.5881019830703735,
0.5494706630706787,
0.5475810766220093,
0.7129377126693726,
-0.12191485613584518,
1.0419515371322632,
-0.9929140210151672,
0.8402664661407471,
-1.0751116275787354,
-1.6797691583633423,
-1.3835806846618652,
-2.2902467250823975,
-2.4053592681884766,
0.7798014283180237,
-0.5038986802101135,
-0.5153940320014954,
2.0764336585998535,
-1.012534737586975,
-1.7982959747314453,
1.1106904745101929,
0.3531440496444702,
-0.06406700611114502,
2.4139013290405273,
0.27328792214393616,
-0.7640007734298706,
0.4259938597679138,
-0.7022322416305542,
0.8136598467826843,
-0.20481491088867188,
1.334728717803955,
0.6315475702285767,
-1.0570306777954102,
1.5629254579544067,
-0.3952183127403259,
0.5605782270431519,
-0.6722202897071838,
-0.5415220856666565,
-0.8326240181922913,
0.27089667320251465,
1.9313806295394897,
-0.41749507188796997,
1.5412696599960327,
-0.3575495481491089,
-1.5980072021484375,
-1.5485942363739014,
0.9176968336105347,
0.45771872997283936,
-0.8213863372802734,
0.15295971930027008,
-0.46050775051116943,
0.12006973475217819,
-0.018668800592422485,
1.121153473854065,
1.1854561567306519,
0.7488165497779846,
-0.37258219718933105,
-0.8604656457901001,
0.22115463018417358,
-0.03948702663183212,
-0.6562833189964294,
-1.8030747175216675,
-0.35810863971710205,
0.1793990582227707,
0.5900955200195312,
-1.211371898651123,
1.6780000925064087,
0.8455797433853149,
1.932371735572815,
0.975716233253479,
-0.38404515385627747,
1.529110312461853,
-0.02287409082055092,
1.8931056261062622,
-0.5325067043304443,
0.6225206851959229,
-0.3760538399219513,
-1.2074787616729736,
0.8687309622764587,
-0.28354358673095703,
-2.0328710079193115,
-0.8409572243690491,
-0.8517968058586121,
-0.1821960061788559,
-0.7978441715240479,
0.8862449526786804,
-0.25082626938819885,
-1.5340328216552734,
0.21916092932224274,
-0.5751354098320007,
0.08224726468324661,
-1.3346205949783325,
0.283966064453125,
0.7205764651298523,
-0.65826416015625,
0.017864130437374115,
-0.22500348091125488,
-1.26862633228302,
-0.49808815121650696,
0.28837233781814575,
1.8898675441741943,
-0.710469126701355,
0.9716995358467102,
1.0332324504852295,
-0.7799926400184631,
0.07855129987001419,
0.26388853788375854,
-0.3010643422603607,
0.8121804594993591,
-1.0443087816238403,
-0.43959978222846985,
1.1275428533554077,
-0.1519233137369156,
-0.7240155339241028,
1.438970923423767,
0.7937048077583313,
-1.0301285982131958,
-0.21431997418403625,
-0.2543622553348541,
-0.7843883037567139,
0.03520994260907173,
-1.5246435403823853,
-0.14480134844779968,
0.31474801898002625,
-1.454837679862976,
-0.4623072147369385,
-0.2403905987739563,
1.3251532316207886,
-0.269820898771286,
1.4246866703033447,
-0.2562224566936493,
-0.1939389854669571,
-0.3636072278022766,
-0.43196365237236023,
0.2223484069108963,
-0.11746014654636383,
-0.5960800051689148,
0.26909780502319336,
-0.8397678732872009,
0.2680494785308838,
1.4127792119979858,
0.39637118577957153,
0.06782796233892441,
0.4394091069698334,
1.1167163848876953,
0.396991491317749,
-0.04541527107357979,
-0.9736902117729187,
-1.569395899772644,
2.044858694076538,
-1.509775996208191,
1.919511079788208,
0.6808218955993652,
-0.09567063301801682,
-1.7443219423294067,
-1.87498939037323,
1.4224287271499634,
1.2072054147720337,
2.3695595264434814,
0.5795051455497742,
0.38103488087654114,
-0.758188009262085,
-0.7361415028572083,
0.37837016582489014,
-1.0651555061340332,
-0.6846336722373962,
0.1531769037246704,
2.393357992172241,
1.778673529624939,
-0.5387576818466187,
-0.22592559456825256,
-0.9362709522247314,
1.2594767808914185,
-0.18313457071781158,
0.23776428401470184,
2.093083143234253,
-0.3659699857234955,
-1.008601188659668,
1.2979183197021484,
-2.4029223918914795,
0.1808854639530182,
1.9884697198867798,
0.302878201007843,
0.11827810853719711,
-1.4150971174240112,
-0.6274557113647461,
-0.17268386483192444,
-0.5657498240470886,
-1.2518128156661987,
0.5720575451850891,
-0.2636864483356476,
-0.8633686304092407,
-1.4780194759368896,
0.16064126789569855,
-1.1777498722076416,
-1.703506588935852,
0.343548059463501,
1.8691725730895996,
2.0523698329925537,
-0.8034783005714417,
1.4739611148834229,
-0.27220651507377625,
0.20284394919872284,
1.2469050884246826,
1.2658756971359253,
3.0784060955047607,
1.8563097715377808,
-1.2736923694610596,
0.6930010914802551,
-0.18616050481796265,
-0.541682243347168,
1.2209969758987427,
-1.1403499841690063,
1.2048304080963135,
-0.27385199069976807,
-1.1949762105941772,
-1.3192435503005981,
1.0517654418945312,
0.5056444406509399,
0.08138416707515717,
-0.5508949160575867,
1.2518564462661743,
0.16507969796657562,
1.3382505178451538,
0.5631895661354065,
-0.39675578474998474,
0.6349585652351379,
-0.4212758243083954,
-0.5109381079673767,
1.619989037513733,
0.1551264524459839,
-1.4043724536895752,
-2.3061182498931885,
-0.31671157479286194,
-0.9026919007301331,
0.036660630255937576,
-0.5184744596481323,
-1.0141690969467163,
1.6075891256332397,
0.42382341623306274,
-1.2626116275787354,
-0.27659809589385986,
-0.288205623626709,
-0.5807104110717773,
2.635552406311035,
-1.2720742225646973,
-0.1340714693069458,
-0.9369126558303833,
-0.566024661064148,
1.6361088752746582,
-1.121903419494629,
-0.1608041375875473,
-1.0709702968597412,
-0.6819684505462646,
-1.4042236804962158,
-0.49860987067222595,
0.010009516961872578,
-0.9315651059150696,
0.8249868750572205,
0.10353550314903259,
-1.1440917253494263,
-0.2812070846557617,
-0.9334326386451721,
0.9566991925239563,
-0.1717091202735901,
0.24627915024757385,
1.8083335161209106,
0.42364194989204407,
-0.44962576031684875,
0.730701208114624,
1.1432472467422485,
0.63639235496521,
-0.6674893498420715,
0.20569169521331787,
-0.7864090204238892,
0.2526533007621765,
-1.3239351511001587,
0.2931346297264099,
-2.875796318054199,
0.7018305063247681,
-0.09983305633068085,
-0.0548623763024807,
-0.10687655210494995,
-1.3034371137619019,
1.1359918117523193,
2.5887863636016846,
-1.1785005331039429,
0.47414833307266235,
0.41818320751190186,
1.1473361253738403,
-1.5913746356964111,
0.19635659456253052,
-0.4882708787918091,
2.134768009185791,
0.11891131848096848,
1.2630040645599365,
-0.4554385542869568,
-2.223241090774536,
0.6201208829879761,
-1.3009862899780273,
-1.1394163370132446,
0.8450588583946228,
-0.8656874299049377,
0.2044808715581894,
-1.3913553953170776,
-0.2110358476638794,
-0.9564878344535828,
-1.239850401878357,
0.7682209610939026,
0.15291452407836914,
0.4701747000217438,
-0.6142770648002625,
0.40096136927604675,
-2.1317331790924072,
-1.373098373413086,
-0.18259349465370178,
-0.9321422576904297,
0.42260876297950745,
-0.2965083718299866,
0.6423148512840271,
-0.09877799451351166,
0.09826114028692245,
0.37790051102638245,
1.3783529996871948,
3.339946746826172,
0.17452861368656158,
0.27252209186553955,
-0.0711136981844902,
-1.0060335397720337,
1.5052580833435059,
1.011565923690796,
-0.10351178050041199,
-0.5049611926078796,
-1.0188766717910767,
1.1982828378677368,
2.0092825889587402,
1.1205058097839355,
0.036020055413246155,
-0.8345920443534851,
-0.7540004253387451,
0.06312145292758942,
0.2042873650789261,
0.5138933658599854,
0.8711776733398438,
0.02711266651749611,
0.14733745157718658,
1.3424698114395142,
1.1577249765396118,
-0.35523679852485657,
0.4166592061519623,
-0.8712893128395081,
-0.4605575501918793,
0.47322434186935425,
0.2022046446800232,
0.05491289496421814,
0.43817105889320374,
-1.0670886039733887,
-0.2700003981590271,
-0.32010510563850403,
-0.934284508228302,
-0.7584335207939148,
-0.4247637987136841,
-0.41340604424476624,
1.6134313344955444,
-0.0026344568468630314,
-0.4797905683517456,
-0.002632638905197382,
-0.7988175749778748,
-0.15863032639026642,
-1.0880694389343262,
0.23615877330303192,
-0.175619974732399,
-0.10427401214838028,
-0.17654390633106232,
1.7791694402694702,
-1.0167118310928345,
-2.0827417373657227,
0.24661779403686523,
0.3187600076198578,
-0.3711143732070923,
0.17829175293445587,
1.6325846910476685,
0.5129159688949585,
1.4162588119506836,
1.266953468322754,
1.054054856300354,
-0.6036310195922852,
-1.210494875907898,
0.7226077914237976,
0.944380521774292,
-1.3375871181488037,
0.8454782366752625,
-0.07935167104005814,
-0.4637576937675476,
0.6686969995498657,
1.2556592226028442,
0.3855421841144562,
-2.0003631114959717,
0.8004757761955261,
-0.9066848158836365,
0.7083306312561035,
0.688569962978363,
0.7469174861907959,
0.2018505036830902,
0.8263023495674133,
-1.2402435541152954,
-1.1473339796066284,
-0.6738799214363098,
-0.5706853866577148,
1.9406940937042236,
-0.17937658727169037,
0.5230842232704163,
-0.1021120622754097,
-1.236795425415039,
-0.04977049306035042,
0.7393521666526794,
0.4137091338634491,
-0.44737479090690613,
0.8766754269599915,
-0.5867078304290771,
-0.9977927803993225,
-1.3427408933639526,
-0.4079299569129944,
-1.0845139026641846,
-0.9107091426849365,
1.001980185508728,
0.7734424471855164,
0.3314114212989807,
1.8382784128189087,
0.5976616144180298,
0.33336877822875977,
-2.644599437713623,
0.9108812808990479,
0.27330639958381653,
-0.08620256185531616,
0.8789393305778503,
0.25630003213882446,
1.1614876985549927,
-0.040377695113420486,
0.5728470683097839,
-2.3197455406188965,
2.276548385620117,
-0.17971275746822357,
0.676031768321991,
0.06788163632154465,
-0.2491089552640915,
1.0713086128234863,
0.5154427289962769,
0.6134366989135742,
-1.1639262437820435,
0.7002270221710205,
-0.5927301645278931,
1.166250467300415,
1.007989525794983,
-0.8490663766860962,
0.06881368905305862,
1.3415968418121338,
0.49713295698165894,
-0.42859238386154175,
-0.9084040522575378,
-0.9228687286376953,
0.9818751811981201,
1.7178789377212524,
-0.0767059251666069,
0.0024444423615932465,
0.9415197372436523,
0.7105439305305481,
-1.2992075681686401,
0.09160076081752777,
-0.6807783842086792,
-0.7040868401527405,
1.6778353452682495,
2.0688421726226807,
-0.09857751429080963,
-0.1411016881465912,
-0.8072047829627991,
-1.1592365503311157,
0.8256580233573914,
0.008192784152925014,
0.13848046958446503,
0.7746886610984802,
-0.6820861101150513,
1.127768635749817,
0.7226420044898987,
0.972161591053009,
0.09701047092676163,
0.3794155716896057,
0.28877219557762146,
-0.303163081407547,
-1.1537991762161255,
-0.27439525723457336,
-1.0429223775863647,
-2.6337902545928955,
0.47265633940696716,
-0.29659509658813477,
-1.3169729709625244,
-0.01507905125617981,
-0.9983795285224915,
0.9125874638557434,
-0.5987507700920105,
-1.1319714784622192,
-1.4601936340332031,
0.2658804655075073,
-0.1420622020959854,
0.913444995880127,
-1.6427901983261108,
-0.07495879381895065,
1.2452692985534668,
0.9110170006752014,
-0.658116340637207,
0.9805435538291931,
0.25316283106803894,
0.9299903512001038,
0.7621495127677917,
-0.33417582511901855,
0.5780877470970154,
0.11765780299901962,
-1.4019863605499268,
0.42191946506500244,
1.2191636562347412,
0.20247586071491241,
1.4646475315093994,
-0.4648814797401428,
0.012966948561370373,
0.47100314497947693,
-0.5448328852653503,
-0.5395455360412598,
-0.5433061122894287,
0.6927511692047119,
0.07500999420881271,
-0.9765768647193909,
0.0885903537273407,
-0.05245222896337509,
-0.15330727398395538,
0.24232906103134155,
-1.4847031831741333,
-0.20994193851947784,
-0.4229516088962555,
-0.5727763175964355,
-1.254672646522522,
0.03801516070961952,
1.3277212381362915,
-0.804466962814331,
-0.23435455560684204,
0.4388819932937622,
0.333667516708374,
0.5229613184928894,
0.604574978351593,
-0.683089554309845,
-0.31729987263679504,
-0.3633955717086792,
-0.31096646189689636,
0.31232985854148865,
1.2703355550765991,
-0.150079146027565,
-1.0498255491256714,
0.6864408850669861,
-0.33610600233078003,
0.05181160196661949,
1.9586268663406372,
0.07412078976631165,
-0.7936383485794067,
0.3856946527957916,
-0.6855268478393555,
1.8127092123031616,
1.6653178930282593,
1.4151605367660522,
-0.16511164605617523,
-0.8974639177322388,
0.5662735104560852,
-0.38022953271865845,
-0.411772221326828,
1.004055142402649,
0.34581494331359863,
-0.19088326394557953,
-1.394875168800354,
0.6283219456672668,
1.343969464302063,
-0.9412278532981873,
-0.7680290341377258,
0.15867342054843903,
-0.8688154220581055,
1.0838314294815063,
0.6116060018539429,
0.3691820204257965,
0.2112811803817749,
1.4996795654296875,
0.6863294839859009,
-0.476219117641449,
0.4722989797592163,
0.4613996148109436,
-0.14536090195178986,
-2.025433301925659,
-1.1156294345855713,
0.2795863747596741,
-0.4834025502204895,
-1.5376288890838623,
1.4371304512023926,
-1.1394985914230347,
-0.9978728294372559,
0.5050943493843079,
0.045503925532102585,
1.3789043426513672,
0.3231331706047058,
1.6940525770187378,
2.0995559692382812,
0.8878437280654907,
0.3197532296180725,
1.2869873046875,
-0.09886755049228668,
-0.4152005910873413,
1.7809879779815674,
-0.4775826632976532,
0.4938114285469055,
1.0440776348114014,
-0.34748023748397827,
-1.0351279973983765,
-0.8530027270317078,
-1.2053587436676025,
-0.5830780863761902,
1.1740384101867676,
0.10092417895793915,
-1.1435340642929077,
0.2677188217639923,
1.5903211832046509,
0.08649732172489166,
-0.24919471144676208,
0.7046682238578796,
0.42657989263534546,
-0.7545505166053772,
-0.0245253574103117,
-0.9023796916007996,
0.5169171094894409,
-0.20783717930316925,
-0.2877558767795563,
0.23243065178394318,
0.5045362114906311,
1.293972134590149,
-0.027561809867620468,
0.13882046937942505,
1.2491263151168823,
-1.3163206577301025,
1.4709720611572266,
-0.6549895405769348,
0.3031870424747467,
-2.4735281467437744,
1.383095383644104,
-0.8435007929801941,
1.8539483547210693,
-2.5968213081359863,
0.40856996178627014,
-0.5120972394943237,
-0.424761563539505,
0.27066972851753235,
-0.40305399894714355,
0.09142938256263733,
-0.1476922184228897,
-1.0422970056533813,
-0.09357041120529175,
-0.7887060046195984,
0.601879894733429,
1.1524237394332886,
1.4122899770736694,
-1.1103887557983398,
-0.35913267731666565,
-1.7756991386413574,
-0.1945357471704483,
-0.6465139389038086,
0.3738774061203003,
-1.9942978620529175,
-0.21576307713985443,
-1.9929873943328857,
-2.381258726119995,
-1.3432623147964478,
-0.9211701154708862,
1.0997977256774902,
0.12977385520935059,
-0.9463412165641785,
1.1030218601226807,
-0.34773120284080505,
-1.8112597465515137,
1.1000961065292358,
-2.104762077331543
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Yes, code works. but the format is not as expected.
```
dataset = datasets.load_dataset('json', data_files=args.dataset, field="data")
```
```
python3 run.py --do_train --task qa --dataset squad --output_dir ./re_trained_model/
```
************ train_dataset: Dataset({
features: ['id', 'title', 'context', 'question', 'answers'],
num_rows: 87599
})
```
python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/
```
************ train_dataset: Dataset({
features: ['title', 'paragraphs'],
num_rows: 442
})
I want the JSON to have the same format as before features. https://github.com/huggingface/datasets/blob/master/datasets/squad_v2/squad_v2.py is the script dealing with **squad** but how can I apply it by using JSON? | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 88 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
Yes, code works. but the format is not as expected.
```
dataset = datasets.load_dataset('json', data_files=args.dataset, field="data")
```
```
python3 run.py --do_train --task qa --dataset squad --output_dir ./re_trained_model/
```
************ train_dataset: Dataset({
features: ['id', 'title', 'context', 'question', 'answers'],
num_rows: 87599
})
```
python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/
```
************ train_dataset: Dataset({
features: ['title', 'paragraphs'],
num_rows: 442
})
I want the JSON to have the same format as before features. https://github.com/huggingface/datasets/blob/master/datasets/squad_v2/squad_v2.py is the script dealing with **squad** but how can I apply it by using JSON? | [
-1.2009437084197998,
-0.9584845900535583,
-0.5921947956085205,
1.403635859489441,
-0.18285135924816132,
-1.2779737710952759,
0.13851670920848846,
-0.983607828617096,
1.6786818504333496,
-0.7018358111381531,
0.2642573118209839,
-1.6873770952224731,
-0.05212509632110596,
-0.6473430395126343,
-0.7378197312355042,
-0.7499974966049194,
-0.39889928698539734,
-0.9096688032150269,
0.9905275702476501,
2.4439303874969482,
1.2123163938522339,
-1.3228880167007446,
2.7481772899627686,
0.59978848695755,
-0.26077577471733093,
-0.9485436081886292,
0.4617290496826172,
-0.01453887764364481,
-1.2630863189697266,
-0.36364835500717163,
-0.9096056222915649,
-0.07134546339511871,
-0.6040862202644348,
-0.5602635145187378,
0.12817423045635223,
0.5096991658210754,
-0.2321593165397644,
-0.3595829904079437,
-0.4408924877643585,
-0.6314591765403748,
0.5405029654502869,
-0.2915387749671936,
0.8965276479721069,
-0.3179362118244171,
1.7391290664672852,
-0.6475623250007629,
0.43522021174430847,
0.661323070526123,
1.2835513353347778,
0.17275051772594452,
0.014972827397286892,
0.33605900406837463,
0.3293314576148987,
0.06922534853219986,
0.5414512157440186,
1.2174675464630127,
0.5985425710678101,
0.4937201738357544,
0.7261899709701538,
-2.2904417514801025,
1.2984037399291992,
-0.8779454827308655,
0.31933608651161194,
1.3763574361801147,
-0.9708059430122375,
0.43159180879592896,
-1.9072221517562866,
-0.020674429833889008,
0.519058883190155,
-2.2351834774017334,
0.2091524451971054,
-1.347697377204895,
-0.564773678779602,
0.982276439666748,
0.25923192501068115,
-1.2746250629425049,
0.200492724776268,
-0.45809638500213623,
1.0505715608596802,
0.46692824363708496,
1.1006875038146973,
-1.6955976486206055,
-0.06626240909099579,
-0.20426854491233826,
0.2161906659603119,
-1.2220017910003662,
-1.6295942068099976,
0.6342507004737854,
0.5814239978790283,
0.7559430599212646,
-0.22074607014656067,
0.9873495101928711,
-1.0418734550476074,
0.844711184501648,
-1.142583966255188,
-1.7461888790130615,
-1.357578158378601,
-2.2790138721466064,
-2.3557486534118652,
0.7886877059936523,
-0.4939531087875366,
-0.4392218291759491,
2.037275552749634,
-0.9828232526779175,
-1.7835824489593506,
1.102076768875122,
0.34874582290649414,
-0.009945027530193329,
2.3533027172088623,
0.22914499044418335,
-0.7889741659164429,
0.5124543309211731,
-0.7866252660751343,
0.7409689426422119,
-0.2125345766544342,
1.3369930982589722,
0.5323485732078552,
-1.0066288709640503,
1.5883889198303223,
-0.3824259638786316,
0.5928496718406677,
-0.6737852096557617,
-0.5123558044433594,
-0.7606493234634399,
0.2588707208633423,
1.9964382648468018,
-0.33051782846450806,
1.480836272239685,
-0.3389631509780884,
-1.6197394132614136,
-1.4468117952346802,
0.8843693733215332,
0.5052400231361389,
-0.8649037480354309,
0.12944744527339935,
-0.49884557723999023,
0.17344653606414795,
-0.04525400698184967,
1.0967828035354614,
1.1961984634399414,
0.8096755743026733,
-0.367134690284729,
-0.8688144087791443,
0.20439203083515167,
-0.03924676030874252,
-0.6780735850334167,
-1.8281174898147583,
-0.3587304949760437,
0.18633568286895752,
0.6159909963607788,
-1.142495036125183,
1.7052520513534546,
0.8559495210647583,
2.016939640045166,
0.9403254389762878,
-0.41534724831581116,
1.5379772186279297,
0.027225345373153687,
1.8877357244491577,
-0.5495885610580444,
0.6389651298522949,
-0.4100254774093628,
-1.1478322744369507,
0.8706321120262146,
-0.29206785559654236,
-2.024670362472534,
-0.687965452671051,
-0.8435472846031189,
-0.19092769920825958,
-0.8203655481338501,
0.8663856387138367,
-0.25914648175239563,
-1.5501903295516968,
0.1634010672569275,
-0.6180008053779602,
0.17987072467803955,
-1.3267314434051514,
0.256864458322525,
0.7505740523338318,
-0.6454574465751648,
0.04742126539349556,
-0.31837356090545654,
-1.3208978176116943,
-0.6002052426338196,
0.36617255210876465,
1.8325599431991577,
-0.6791789531707764,
0.9562140703201294,
1.0148426294326782,
-0.7259822487831116,
0.03739813715219498,
0.3182884752750397,
-0.26778295636177063,
0.7558385729789734,
-1.0768399238586426,
-0.45492857694625854,
1.099428415298462,
-0.17426399886608124,
-0.6197035908699036,
1.4126739501953125,
0.8242454528808594,
-1.0575485229492188,
-0.23891706764698029,
-0.25567999482154846,
-0.7857319116592407,
0.04145146906375885,
-1.569587230682373,
-0.15491585433483124,
0.3358628451824188,
-1.472906231880188,
-0.4700447618961334,
-0.2450040578842163,
1.3217028379440308,
-0.1812293976545334,
1.3456374406814575,
-0.24019312858581543,
-0.20964516699314117,
-0.34604865312576294,
-0.45991218090057373,
0.21298053860664368,
-0.16245315968990326,
-0.626518189907074,
0.22485822439193726,
-0.8331593871116638,
0.29091915488243103,
1.4873799085617065,
0.33728086948394775,
0.04367942735552788,
0.498207151889801,
1.1549768447875977,
0.37144869565963745,
-0.041770439594984055,
-0.9452292323112488,
-1.5866711139678955,
2.027440309524536,
-1.570046067237854,
1.8913612365722656,
0.6567060947418213,
-0.07920712232589722,
-1.7400926351547241,
-1.8898756504058838,
1.3796749114990234,
1.151875376701355,
2.396505117416382,
0.6124333143234253,
0.40126141905784607,
-0.7639423608779907,
-0.6937766075134277,
0.35848307609558105,
-0.95276939868927,
-0.7132381200790405,
0.15166492760181427,
2.399918794631958,
1.814106822013855,
-0.5518122911453247,
-0.2325674295425415,
-0.9141539931297302,
1.3280889987945557,
-0.22423772513866425,
0.31752678751945496,
2.073507785797119,
-0.3749774992465973,
-0.9950900673866272,
1.3663204908370972,
-2.3736324310302734,
0.2874557673931122,
2.0273828506469727,
0.28712335228919983,
0.12742643058300018,
-1.3686989545822144,
-0.6104755401611328,
-0.17913112044334412,
-0.5023329257965088,
-1.2884963750839233,
0.5288048386573792,
-0.2895306646823883,
-0.8720042109489441,
-1.4897114038467407,
0.13746137917041779,
-1.1863420009613037,
-1.7295889854431152,
0.3598198890686035,
1.9442451000213623,
2.052734851837158,
-0.748519778251648,
1.416011929512024,
-0.28138861060142517,
0.22694823145866394,
1.257604956626892,
1.2741913795471191,
3.0690970420837402,
1.8605149984359741,
-1.214979648590088,
0.7419031262397766,
-0.24306105077266693,
-0.5164998769760132,
1.150805115699768,
-1.096795678138733,
1.118721604347229,
-0.29178401827812195,
-1.1981234550476074,
-1.2713878154754639,
1.0225262641906738,
0.5275834202766418,
0.050930190831422806,
-0.49901118874549866,
1.1966276168823242,
0.14730921387672424,
1.314914345741272,
0.591709554195404,
-0.4082746207714081,
0.6236137747764587,
-0.3574638366699219,
-0.5348823070526123,
1.6205122470855713,
0.1571791023015976,
-1.4502004384994507,
-2.329293727874756,
-0.3066639304161072,
-0.9681896567344666,
0.032020796090364456,
-0.6017950177192688,
-0.9888572692871094,
1.5698825120925903,
0.4348244071006775,
-1.2015455961227417,
-0.19560812413692474,
-0.2256249189376831,
-0.55586838722229,
2.6354103088378906,
-1.2498196363449097,
-0.19203656911849976,
-0.9308344721794128,
-0.5508183836936951,
1.650676965713501,
-1.1507086753845215,
-0.2164035588502884,
-1.0997674465179443,
-0.5850565433502197,
-1.293423056602478,
-0.4555737376213074,
-0.020791565999388695,
-0.9068917036056519,
0.8858628869056702,
0.0558377169072628,
-1.2044295072555542,
-0.3175526261329651,
-1.012739658355713,
0.9777885675430298,
-0.1948813945055008,
0.1386822760105133,
1.7990858554840088,
0.35699713230133057,
-0.4144161343574524,
0.7714783549308777,
1.167508602142334,
0.6348423361778259,
-0.6517720222473145,
0.17145349085330963,
-0.7047982811927795,
0.35563594102859497,
-1.3325235843658447,
0.30245518684387207,
-2.9041175842285156,
0.7078816890716553,
-0.06877288967370987,
-0.054811395704746246,
-0.17717763781547546,
-1.4191899299621582,
1.1164989471435547,
2.5711007118225098,
-1.1674689054489136,
0.5067653656005859,
0.40145552158355713,
1.18729829788208,
-1.5946881771087646,
0.17150931060314178,
-0.5153501033782959,
2.1393656730651855,
0.07147171348333359,
1.2376984357833862,
-0.47985410690307617,
-2.28623628616333,
0.610767126083374,
-1.2238270044326782,
-1.088660478591919,
0.7004075050354004,
-0.8831250667572021,
0.27205950021743774,
-1.4327234029769897,
-0.1889391392469406,
-0.9608765840530396,
-1.194163203239441,
0.7031607627868652,
0.15387900173664093,
0.43928059935569763,
-0.6532654166221619,
0.38523441553115845,
-2.1065001487731934,
-1.4277021884918213,
-0.2034440040588379,
-0.9138860702514648,
0.5043278932571411,
-0.3452852666378021,
0.6201919913291931,
-0.04775010794401169,
0.05679599568247795,
0.33138445019721985,
1.4594237804412842,
3.280862331390381,
0.11313670873641968,
0.23660987615585327,
-0.11292202025651932,
-0.9922013282775879,
1.4605495929718018,
0.9884141683578491,
-0.07989086955785751,
-0.5258340239524841,
-1.0315173864364624,
1.292527198791504,
2.03505277633667,
1.0931155681610107,
0.03239037096500397,
-0.8311619758605957,
-0.7647271752357483,
0.10257729142904282,
0.20565420389175415,
0.49307990074157715,
0.9297887682914734,
0.11699458956718445,
0.10206089913845062,
1.3417341709136963,
1.097980260848999,
-0.35687312483787537,
0.4549609422683716,
-0.9041498303413391,
-0.4416080713272095,
0.4613271653652191,
0.23960544168949127,
0.0294259674847126,
0.3763725161552429,
-1.1210436820983887,
-0.22793693840503693,
-0.23881401121616364,
-0.8834311366081238,
-0.7761135697364807,
-0.40521693229675293,
-0.44294479489326477,
1.6436506509780884,
-0.01175342220813036,
-0.535698413848877,
0.01259936485439539,
-0.7436355948448181,
-0.08368796855211258,
-1.0490731000900269,
0.2580200433731079,
-0.2021782100200653,
-0.054405588656663895,
-0.2141595184803009,
1.6884887218475342,
-0.9727903008460999,
-2.095158100128174,
0.18111133575439453,
0.3282090723514557,
-0.40296807885169983,
0.12669099867343903,
1.7155870199203491,
0.5840420126914978,
1.4324350357055664,
1.377732276916504,
1.0710710287094116,
-0.5858891606330872,
-1.2479708194732666,
0.7063221335411072,
0.872751772403717,
-1.324275016784668,
0.839165985584259,
-0.06979040056467056,
-0.4985988438129425,
0.6619372367858887,
1.3343123197555542,
0.3787413239479065,
-2.051243782043457,
0.852371335029602,
-1.03322172164917,
0.768978476524353,
0.7864759564399719,
0.7955148220062256,
0.21736040711402893,
0.850852370262146,
-1.2607530355453491,
-1.117247462272644,
-0.7138761281967163,
-0.6063600182533264,
1.9532824754714966,
-0.18665890395641327,
0.4462885558605194,
-0.12570276856422424,
-1.2032021284103394,
-0.025646347552537918,
0.7245079278945923,
0.45398950576782227,
-0.4399465322494507,
0.7888724207878113,
-0.5918999314308167,
-1.0146235227584839,
-1.2626036405563354,
-0.48758193850517273,
-1.0342872142791748,
-0.9421141743659973,
0.9178566932678223,
0.790698230266571,
0.5104246139526367,
1.8787790536880493,
0.6365606784820557,
0.27799278497695923,
-2.6015658378601074,
0.8855779767036438,
0.31041863560676575,
-0.09691564738750458,
0.8722532987594604,
0.2857307195663452,
1.211201548576355,
-0.05332937091588974,
0.6126813292503357,
-2.332007646560669,
2.2335453033447266,
-0.17494311928749084,
0.6684926748275757,
0.07325290143489838,
-0.1438177227973938,
1.1015982627868652,
0.46524354815483093,
0.5513930320739746,
-1.1352920532226562,
0.7479724884033203,
-0.608310878276825,
1.1789870262145996,
0.9019163846969604,
-0.8245578408241272,
0.11951155960559845,
1.2994457483291626,
0.4356287121772766,
-0.5166755318641663,
-0.97972571849823,
-0.904295027256012,
0.9738367199897766,
1.6937116384506226,
-0.11351802200078964,
-0.05035189166665077,
0.9044482707977295,
0.7625613212585449,
-1.2927343845367432,
0.020286202430725098,
-0.6189930438995361,
-0.6225237250328064,
1.680782437324524,
2.079307794570923,
-0.11587744206190109,
-0.09345551580190659,
-0.7643647789955139,
-1.2308223247528076,
0.7770757079124451,
0.060041967779397964,
0.04187161847949028,
0.7827765941619873,
-0.6605247855186462,
1.1349799633026123,
0.6991373896598816,
0.9886821508407593,
0.0773184671998024,
0.38837897777557373,
0.28859496116638184,
-0.36344507336616516,
-1.1820435523986816,
-0.33758601546287537,
-1.066724181175232,
-2.601170301437378,
0.4460016191005707,
-0.272932231426239,
-1.365568995475769,
0.03564068302512169,
-1.0202170610427856,
0.8710609674453735,
-0.6160714626312256,
-1.1775202751159668,
-1.4028687477111816,
0.29531341791152954,
-0.11258235573768616,
0.8498325943946838,
-1.6744039058685303,
-0.09244658797979355,
1.1844618320465088,
0.8728545904159546,
-0.6617608070373535,
0.9216848015785217,
0.2812413275241852,
0.9395683407783508,
0.7962801456451416,
-0.32264336943626404,
0.5307066440582275,
0.11691488325595856,
-1.365402340888977,
0.4256853461265564,
1.2909804582595825,
0.1871616244316101,
1.3842825889587402,
-0.4548955261707306,
0.030520081520080566,
0.46523943543434143,
-0.5504770278930664,
-0.537097156047821,
-0.5420891642570496,
0.6586812734603882,
-0.009039237163960934,
-0.981748104095459,
0.011766537092626095,
-0.01258489303290844,
-0.16491152346134186,
0.3069441616535187,
-1.4912949800491333,
-0.18929356336593628,
-0.38500481843948364,
-0.5593870282173157,
-1.2491235733032227,
-0.033257175236940384,
1.3394668102264404,
-0.7518659234046936,
-0.26062124967575073,
0.5296608805656433,
0.3049987554550171,
0.5417597889900208,
0.6153791546821594,
-0.7351894974708557,
-0.28220924735069275,
-0.2937453091144562,
-0.3638536036014557,
0.2801467776298523,
1.3077281713485718,
-0.10288107395172119,
-1.0555877685546875,
0.6327639818191528,
-0.3691207766532898,
0.06571505218744278,
1.9626158475875854,
0.01934845745563507,
-0.8022136688232422,
0.3983044922351837,
-0.7704651951789856,
1.7969257831573486,
1.6680073738098145,
1.355377197265625,
-0.1491679549217224,
-0.9050188064575195,
0.5412815809249878,
-0.3658173382282257,
-0.4229891896247864,
0.9505383372306824,
0.33233577013015747,
-0.23850998282432556,
-1.3291188478469849,
0.6644688248634338,
1.350233554840088,
-0.8839966654777527,
-0.7924546003341675,
0.19055896997451782,
-0.8403494954109192,
1.223362922668457,
0.6073592305183411,
0.3651468753814697,
0.2475360482931137,
1.5970942974090576,
0.6817396879196167,
-0.4465806484222412,
0.4745989143848419,
0.5114243030548096,
-0.1809248924255371,
-2.057131290435791,
-1.2006239891052246,
0.24674730002880096,
-0.4857485592365265,
-1.5630732774734497,
1.3984456062316895,
-1.1757736206054688,
-0.9983125329017639,
0.5388275384902954,
0.1403941661119461,
1.3688217401504517,
0.4119143784046173,
1.704200267791748,
2.0709660053253174,
0.9111945033073425,
0.4163908362388611,
1.2752478122711182,
-0.12770293653011322,
-0.4349883496761322,
1.7750747203826904,
-0.4861598312854767,
0.5764173269271851,
1.0540281534194946,
-0.3606201410293579,
-1.1550763845443726,
-0.8513485193252563,
-1.2008814811706543,
-0.6186529397964478,
1.1541099548339844,
0.10969863086938858,
-1.2126158475875854,
0.3227914571762085,
1.594435453414917,
0.0614369697868824,
-0.21533451974391937,
0.7182789444923401,
0.37737587094306946,
-0.7713099122047424,
-0.04323264956474304,
-0.9506957530975342,
0.4764006435871124,
-0.28771042823791504,
-0.307511568069458,
0.23642173409461975,
0.6135480403900146,
1.2649239301681519,
0.010326364077627659,
0.10862398147583008,
1.239173173904419,
-1.3666799068450928,
1.3759939670562744,
-0.7594385147094727,
0.35379475355148315,
-2.4358434677124023,
1.3819509744644165,
-0.8571776747703552,
1.909517765045166,
-2.640798330307007,
0.39204683899879456,
-0.47071176767349243,
-0.4631725549697876,
0.19945849478244781,
-0.31732138991355896,
0.07431847602128983,
-0.06092124059796333,
-1.091394305229187,
-0.052112117409706116,
-0.813349187374115,
0.5700753331184387,
1.1947739124298096,
1.4714250564575195,
-1.1090118885040283,
-0.3091234266757965,
-1.7784005403518677,
-0.19443970918655396,
-0.6255208849906921,
0.34311893582344055,
-1.926064133644104,
-0.14287695288658142,
-1.9677330255508423,
-2.312713623046875,
-1.3236591815948486,
-0.9760825634002686,
1.0897560119628906,
0.11546418070793152,
-0.8519715070724487,
1.0874863862991333,
-0.32248345017433167,
-1.7790361642837524,
1.0987863540649414,
-2.1463427543640137
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Ok I see, you have the paragraphs so you just need to process them to extract the questions and answers. I think you can process the SQuAD-like data this way:
```python
def process_squad(articles):
out = {
"title": [],
"context": [],
"question": [],
"id": [],
"answers": [],
}
for title, paragraphs in zip(articles["title"], articles["paragraphs"]):
for paragraph in paragraphs:
for qa in paragraph["qas"]:
out["title"].append(title)
out["context"].append(paragraph["context"])
out["question"].append(qa["question"])
out["id"].append(qa["id"])
out["answers"].append({
"answer_start": [answer["answer_start"] for answer in qa["answers"]],
"text": [answer["text"] for answer in qa["answers"]],
})
return out
dataset = dataset.map(process_squad, batched=True, remove_columns=["paragraphs"])
```
I adapted the code from [squad.py](https://github.com/huggingface/datasets/blob/master/datasets/squad/squad.py). The code takes as input a batch of articles (title + paragraphs) and gets all the questions and answers from the JSON structure.
The output is a dataset with `features: ['answers', 'context', 'id', 'question', 'title']`
Let me know if that helps !
| Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 135 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
Ok I see, you have the paragraphs so you just need to process them to extract the questions and answers. I think you can process the SQuAD-like data this way:
```python
def process_squad(articles):
out = {
"title": [],
"context": [],
"question": [],
"id": [],
"answers": [],
}
for title, paragraphs in zip(articles["title"], articles["paragraphs"]):
for paragraph in paragraphs:
for qa in paragraph["qas"]:
out["title"].append(title)
out["context"].append(paragraph["context"])
out["question"].append(qa["question"])
out["id"].append(qa["id"])
out["answers"].append({
"answer_start": [answer["answer_start"] for answer in qa["answers"]],
"text": [answer["text"] for answer in qa["answers"]],
})
return out
dataset = dataset.map(process_squad, batched=True, remove_columns=["paragraphs"])
```
I adapted the code from [squad.py](https://github.com/huggingface/datasets/blob/master/datasets/squad/squad.py). The code takes as input a batch of articles (title + paragraphs) and gets all the questions and answers from the JSON structure.
The output is a dataset with `features: ['answers', 'context', 'id', 'question', 'title']`
Let me know if that helps !
| [
-1.217337727546692,
-0.8471428155899048,
-0.7755349278450012,
1.4982759952545166,
-0.16505059599876404,
-1.156717300415039,
0.11481107026338577,
-1.1165800094604492,
1.626340389251709,
-0.6838046312332153,
0.39222243428230286,
-1.6347978115081787,
0.0012747645378112793,
-0.6137035489082336,
-0.8051639199256897,
-0.8491140007972717,
-0.4254286289215088,
-0.7759108543395996,
0.9747123718261719,
2.565549373626709,
1.251450777053833,
-1.3472723960876465,
2.760054349899292,
0.6762222647666931,
-0.14401255548000336,
-0.9279164671897888,
0.5893741846084595,
0.046672746539115906,
-1.258828043937683,
-0.35893183946609497,
-1.048465609550476,
-0.09062471985816956,
-0.4950527250766754,
-0.5304920077323914,
0.030342699959874153,
0.4009711742401123,
-0.3123387396335602,
-0.393998384475708,
-0.5820516347885132,
-0.7478505969047546,
0.4817456007003784,
-0.281942218542099,
0.9940325021743774,
-0.27886641025543213,
1.7768373489379883,
-0.6233000755310059,
0.4178670048713684,
0.6468726992607117,
1.2441869974136353,
0.2606505751609802,
0.09211913496255875,
0.33677855134010315,
0.3261788785457611,
-0.03178700804710388,
0.5569474697113037,
1.259344220161438,
0.6550027132034302,
0.46957868337631226,
0.8666433691978455,
-2.1585655212402344,
1.2108999490737915,
-1.0387121438980103,
0.23373597860336304,
1.3274962902069092,
-0.8447675108909607,
0.3737286925315857,
-1.8665155172348022,
-0.047754473984241486,
0.5752967596054077,
-2.2415363788604736,
0.22449536621570587,
-1.3362044095993042,
-0.5775019526481628,
0.9607018828392029,
0.25939837098121643,
-1.2637009620666504,
0.1770857870578766,
-0.48540955781936646,
0.985494077205658,
0.37988772988319397,
1.1851696968078613,
-1.6871869564056396,
0.03255518525838852,
-0.2689756453037262,
0.18692487478256226,
-1.193716287612915,
-1.5237948894500732,
0.5987240076065063,
0.5132328867912292,
0.6405726075172424,
-0.09435324370861053,
1.0427663326263428,
-1.0813357830047607,
0.8779757022857666,
-1.0493385791778564,
-1.6884992122650146,
-1.4225677251815796,
-2.219553232192993,
-2.2653040885925293,
0.8134076595306396,
-0.5388948321342468,
-0.540665328502655,
2.07847261428833,
-0.9590237140655518,
-1.7114859819412231,
1.0795557498931885,
0.36959540843963623,
0.028467217460274696,
2.4973881244659424,
0.20842646062374115,
-0.7733132243156433,
0.5618758797645569,
-0.69663006067276,
0.7842597365379333,
-0.20243018865585327,
1.3480618000030518,
0.4550299644470215,
-0.9731980562210083,
1.644479513168335,
-0.3248894512653351,
0.5744817852973938,
-0.6554325222969055,
-0.5143330097198486,
-0.7312512397766113,
0.2900136411190033,
1.9258049726486206,
-0.3657384514808655,
1.5124465227127075,
-0.28243640065193176,
-1.6257309913635254,
-1.5179141759872437,
0.8446190357208252,
0.5536762475967407,
-0.8272283673286438,
0.06371036916971207,
-0.4204215109348297,
0.09917240589857101,
-0.07849675416946411,
1.184760332107544,
1.2465254068374634,
0.8118175268173218,
-0.30558547377586365,
-0.8631016612052917,
0.1297135055065155,
-0.056830309331417084,
-0.8501195907592773,
-1.6948401927947998,
-0.36021530628204346,
0.19638727605342865,
0.6462373733520508,
-1.3198431730270386,
1.7211840152740479,
0.8704743981361389,
1.9371083974838257,
1.039233684539795,
-0.4316060543060303,
1.5484453439712524,
0.062097884714603424,
1.8211398124694824,
-0.5840691924095154,
0.5431396961212158,
-0.3980618119239807,
-1.2073898315429688,
0.9160111546516418,
-0.3272078335285187,
-2.0278773307800293,
-0.845555305480957,
-0.7650855183601379,
-0.14768141508102417,
-0.7749114632606506,
0.9136356711387634,
-0.3517678678035736,
-1.4519997835159302,
0.23916999995708466,
-0.6715420484542847,
-0.03866267949342728,
-1.2487592697143555,
0.2998770773410797,
0.6592252254486084,
-0.6592310667037964,
0.07000753283500671,
-0.1955767422914505,
-1.3022818565368652,
-0.4571196138858795,
0.22117143869400024,
1.8903855085372925,
-0.7336710691452026,
0.8976143002510071,
1.0775415897369385,
-0.7592101693153381,
0.009701486676931381,
0.310526967048645,
-0.3814942240715027,
0.8221498131752014,
-1.0868406295776367,
-0.5581852793693542,
1.1363706588745117,
-0.047463566064834595,
-0.6202508807182312,
1.3929989337921143,
0.6901206374168396,
-1.019144892692566,
-0.3269558846950531,
-0.10375504940748215,
-0.7836159467697144,
0.04722941666841507,
-1.5356615781784058,
-0.165639728307724,
0.3147919774055481,
-1.5387223958969116,
-0.5044740438461304,
-0.18036510050296783,
1.2489569187164307,
-0.2727057933807373,
1.4298441410064697,
-0.2854725122451782,
-0.18516674637794495,
-0.32089924812316895,
-0.4409051239490509,
0.11950002610683441,
-0.23585087060928345,
-0.660311758518219,
0.2376347780227661,
-0.8223347067832947,
0.3148958086967468,
1.4628934860229492,
0.39591118693351746,
0.05810847133398056,
0.4700382947921753,
1.1106925010681152,
0.4295194149017334,
0.005217753350734711,
-0.9441924095153809,
-1.5386391878128052,
2.047386407852173,
-1.5100537538528442,
1.9604703187942505,
0.745373547077179,
-0.08750530332326889,
-1.7675929069519043,
-1.9601681232452393,
1.3609447479248047,
1.182523488998413,
2.352022409439087,
0.5270267724990845,
0.41493478417396545,
-0.7307782173156738,
-0.6361030340194702,
0.37741538882255554,
-1.0521831512451172,
-0.692476212978363,
0.18006223440170288,
2.415989398956299,
1.7776998281478882,
-0.5210567712783813,
-0.21352745592594147,
-0.9120904207229614,
1.3133376836776733,
-0.19565151631832123,
0.18158486485481262,
2.0171046257019043,
-0.2947423458099365,
-1.0631426572799683,
1.3167301416397095,
-2.2942466735839844,
0.13082899153232574,
1.9499791860580444,
0.34038183093070984,
0.06870044022798538,
-1.3996899127960205,
-0.6374486684799194,
-0.25822335481643677,
-0.5215315222740173,
-1.2249183654785156,
0.5924478769302368,
-0.23984962701797485,
-0.9149911403656006,
-1.427331566810608,
0.05291161686182022,
-1.220823049545288,
-1.6458208560943604,
0.32448601722717285,
1.908791184425354,
2.1010451316833496,
-0.8314722776412964,
1.5037745237350464,
-0.30275166034698486,
0.11001238226890564,
1.1568150520324707,
1.2806975841522217,
3.1288342475891113,
1.8232152462005615,
-1.2372527122497559,
0.6504034996032715,
-0.2223106324672699,
-0.47196164727211,
1.1766736507415771,
-1.1804769039154053,
1.2201594114303589,
-0.17421698570251465,
-1.15897536277771,
-1.1676812171936035,
0.9941451549530029,
0.4218890964984894,
0.04203766584396362,
-0.5060077905654907,
1.1303470134735107,
0.17928683757781982,
1.3277661800384521,
0.6262961030006409,
-0.30539411306381226,
0.5948758125305176,
-0.35200631618499756,
-0.47007033228874207,
1.610264539718628,
0.0681753009557724,
-1.4549047946929932,
-2.3446688652038574,
-0.22508399188518524,
-0.8789687752723694,
0.11900582909584045,
-0.5706478357315063,
-1.078564167022705,
1.7586179971694946,
0.3349834382534027,
-1.291692852973938,
-0.27933016419410706,
-0.36375895142555237,
-0.6113030314445496,
2.722817897796631,
-1.3203139305114746,
-0.19819873571395874,
-0.9728249907493591,
-0.5724398493766785,
1.6138771772384644,
-1.0792549848556519,
-0.1617862433195114,
-0.9542242884635925,
-0.5366647243499756,
-1.3791871070861816,
-0.5676133036613464,
0.08286479115486145,
-0.9602540135383606,
0.7985678911209106,
0.16762375831604004,
-1.1321460008621216,
-0.3254120647907257,
-0.913155198097229,
0.9367802739143372,
-0.17752288281917572,
0.19332006573677063,
1.9761172533035278,
0.4138808846473694,
-0.34309685230255127,
0.7445440888404846,
1.2529103755950928,
0.6946039199829102,
-0.6133106350898743,
0.1268550008535385,
-0.7388954758644104,
0.3425498604774475,
-1.376771092414856,
0.22500580549240112,
-2.7850074768066406,
0.6789217591285706,
-0.06429721415042877,
-0.07384159415960312,
-0.0016237543895840645,
-1.2085682153701782,
1.146914005279541,
2.644906759262085,
-1.1384046077728271,
0.42287662625312805,
0.35056939721107483,
1.113033413887024,
-1.632917046546936,
0.22913631796836853,
-0.48096662759780884,
2.0979554653167725,
0.10497438162565231,
1.1555778980255127,
-0.48523685336112976,
-2.2465243339538574,
0.697723388671875,
-1.3183379173278809,
-1.160627007484436,
0.7960653305053711,
-0.9573810696601868,
0.3274343013763428,
-1.4864416122436523,
-0.2219284623861313,
-0.971293032169342,
-1.1392841339111328,
0.6250524520874023,
0.12661166489124298,
0.39897415041923523,
-0.5560783743858337,
0.40118175745010376,
-2.132338285446167,
-1.4338278770446777,
-0.1573743373155594,
-0.9787046909332275,
0.5192544460296631,
-0.35606908798217773,
0.6981876492500305,
-0.1226344183087349,
-0.022493600845336914,
0.3395688831806183,
1.3922380208969116,
3.353144884109497,
0.2270694375038147,
0.3037279546260834,
-0.178860604763031,
-1.0348716974258423,
1.4681849479675293,
1.0060229301452637,
-0.09727557748556137,
-0.5930618643760681,
-1.0187209844589233,
1.2581801414489746,
2.027465581893921,
1.0457860231399536,
0.05094723403453827,
-0.8638693690299988,
-0.753031313419342,
0.032900914549827576,
0.2216816395521164,
0.4209427237510681,
0.9608314037322998,
-0.01407293975353241,
0.04940617084503174,
1.4338443279266357,
1.1249819993972778,
-0.3639782667160034,
0.34776660799980164,
-0.8394256234169006,
-0.47966673970222473,
0.5336890816688538,
0.23047871887683868,
0.010035889223217964,
0.4829210042953491,
-1.0568594932556152,
-0.3200904428958893,
-0.3521440625190735,
-0.8892218470573425,
-0.6402813792228699,
-0.32514718174934387,
-0.29728808999061584,
1.626757264137268,
0.015017954632639885,
-0.54244065284729,
0.007107239216566086,
-0.8372536301612854,
-0.10645999759435654,
-1.0707229375839233,
0.19652503728866577,
-0.16893059015274048,
-0.08340639621019363,
-0.1518741250038147,
1.7978566884994507,
-0.9535173773765564,
-2.024440288543701,
0.15894147753715515,
0.3065035045146942,
-0.33461615443229675,
0.21718187630176544,
1.6397652626037598,
0.6590242385864258,
1.4348279237747192,
1.256728172302246,
0.9001845717430115,
-0.610678493976593,
-1.2735424041748047,
0.6242495179176331,
1.028916597366333,
-1.3362399339675903,
0.8741783499717712,
-0.14245015382766724,
-0.5015877485275269,
0.581143319606781,
1.3341296911239624,
0.4363940954208374,
-1.952810525894165,
0.790387749671936,
-0.8884300589561462,
0.7789348363876343,
0.6340020895004272,
0.6768712401390076,
0.21058665215969086,
0.7942929267883301,
-1.2366812229156494,
-1.1562098264694214,
-0.7387855052947998,
-0.6090337634086609,
1.964529275894165,
-0.21505548059940338,
0.5680921673774719,
-0.16216838359832764,
-1.2081594467163086,
-0.0828024297952652,
0.6472232341766357,
0.37047111988067627,
-0.4555493891239166,
0.8802406787872314,
-0.6370586156845093,
-1.0377525091171265,
-1.3413406610488892,
-0.3924146592617035,
-0.9930641055107117,
-0.912339448928833,
1.077236533164978,
0.7298585772514343,
0.4193882644176483,
1.9275095462799072,
0.6891334056854248,
0.27096793055534363,
-2.568213939666748,
0.8693503737449646,
0.34804800152778625,
-0.06688292324542999,
0.8848991990089417,
0.34019237756729126,
1.123169183731079,
-0.09759952872991562,
0.5336570739746094,
-2.3206753730773926,
2.250964641571045,
-0.17199170589447021,
0.777685821056366,
0.0549941211938858,
-0.186309352517128,
1.0535143613815308,
0.5213238596916199,
0.5729836225509644,
-1.0994887351989746,
0.5531662106513977,
-0.5508986711502075,
1.2100809812545776,
0.9304162859916687,
-0.760603666305542,
0.07838619500398636,
1.3423272371292114,
0.5319046378135681,
-0.4541715681552887,
-0.9928601980209351,
-0.8019092679023743,
0.9845085144042969,
1.7273246049880981,
-0.029292630031704903,
0.03273247182369232,
0.9184874892234802,
0.6764025688171387,
-1.387242317199707,
-0.048310309648513794,
-0.7264692783355713,
-0.7613679766654968,
1.7280113697052002,
2.1988401412963867,
-0.14362455904483795,
-0.20842282474040985,
-0.7099013328552246,
-1.2710360288619995,
0.8071893453598022,
-0.08644676953554153,
0.2798633277416229,
0.6862502694129944,
-0.7148961424827576,
1.1412692070007324,
0.7518433332443237,
0.9721639752388,
0.16235604882240295,
0.38928887248039246,
0.3310541808605194,
-0.31860488653182983,
-1.1538976430892944,
-0.2442852109670639,
-1.0545225143432617,
-2.5954091548919678,
0.4397833049297333,
-0.23885242640972137,
-1.3791142702102661,
-0.016878962516784668,
-0.9657753705978394,
0.9020696878433228,
-0.541675865650177,
-1.0329818725585938,
-1.4537115097045898,
0.324215292930603,
-0.03857331722974777,
1.007526159286499,
-1.5908470153808594,
-0.2302878350019455,
1.145583152770996,
0.9538587927818298,
-0.6822880506515503,
0.8967849016189575,
0.21456801891326904,
1.0228780508041382,
0.7564018368721008,
-0.343927264213562,
0.48903897404670715,
0.07310255616903305,
-1.337960124015808,
0.37750357389450073,
1.2287616729736328,
0.15718527138233185,
1.5241116285324097,
-0.40732818841934204,
0.03794335573911667,
0.4613616168498993,
-0.5208112597465515,
-0.5045201182365417,
-0.5790175199508667,
0.5719942450523376,
0.07009538263082504,
-0.9598891139030457,
-0.14492174983024597,
-0.048299454152584076,
-0.2779078185558319,
0.2402869611978531,
-1.453721284866333,
-0.1522698700428009,
-0.43665826320648193,
-0.6184260249137878,
-1.2288873195648193,
-0.013808164745569229,
1.2955322265625,
-0.8200589418411255,
-0.1692112237215042,
0.41310566663742065,
0.24074886739253998,
0.5261204838752747,
0.6183100938796997,
-0.7769985198974609,
-0.3811143934726715,
-0.3115706443786621,
-0.3769110143184662,
0.2832350730895996,
1.3133481740951538,
-0.14881213009357452,
-1.016194224357605,
0.6177977323532104,
-0.30661359429359436,
0.04325278848409653,
1.9691369533538818,
0.011063959449529648,
-0.7197737097740173,
0.3538731634616852,
-0.7277799248695374,
1.8302288055419922,
1.6120308637619019,
1.3602817058563232,
-0.19495439529418945,
-0.8803990483283997,
0.6782144904136658,
-0.376383900642395,
-0.46227991580963135,
0.8733806610107422,
0.23595215380191803,
-0.1876148283481598,
-1.5202572345733643,
0.6291489005088806,
1.3496758937835693,
-0.996715247631073,
-0.6861089468002319,
0.1706314980983734,
-0.8817121982574463,
1.0738296508789062,
0.6025296449661255,
0.34889286756515503,
0.38901686668395996,
1.6056820154190063,
0.7819115519523621,
-0.5330187678337097,
0.38630178570747375,
0.6004124283790588,
-0.08128339052200317,
-2.059844493865967,
-1.18229079246521,
0.23142318427562714,
-0.45229625701904297,
-1.5547136068344116,
1.4194930791854858,
-1.1564408540725708,
-1.0054423809051514,
0.5316053032875061,
0.01107785850763321,
1.3041743040084839,
0.3780941963195801,
1.6142709255218506,
2.079496383666992,
0.8560002446174622,
0.3204226493835449,
1.2576428651809692,
-0.09689304232597351,
-0.42852845788002014,
1.818057894706726,
-0.5208408832550049,
0.5686647295951843,
1.02650785446167,
-0.36915358901023865,
-1.110526442527771,
-0.770976722240448,
-1.2778340578079224,
-0.6858240365982056,
1.2009825706481934,
0.039723075926303864,
-1.159152865409851,
0.2654765248298645,
1.6442641019821167,
0.06941832602024078,
-0.3823908865451813,
0.6334887742996216,
0.43646886944770813,
-0.7637692093849182,
-0.08947081118822098,
-0.883964478969574,
0.5493264198303223,
-0.08163777738809586,
-0.3203907907009125,
0.23434554040431976,
0.5075514316558838,
1.3521349430084229,
-0.05046053230762482,
0.1142938956618309,
1.110864520072937,
-1.457582950592041,
1.503786325454712,
-0.7201875448226929,
0.3315940201282501,
-2.4574737548828125,
1.403503656387329,
-0.8325263261795044,
1.9044249057769775,
-2.6101672649383545,
0.43775272369384766,
-0.48059892654418945,
-0.45609861612319946,
0.19937604665756226,
-0.3444187343120575,
0.18823228776454926,
-0.07983210682868958,
-1.0258193016052246,
-0.09244036674499512,
-0.7037883400917053,
0.6043927073478699,
1.1200265884399414,
1.3828952312469482,
-1.1018213033676147,
-0.32756415009498596,
-1.7469464540481567,
-0.16027843952178955,
-0.6415190696716309,
0.16193844377994537,
-1.9472923278808594,
-0.24691660702228546,
-1.8821650743484497,
-2.331125259399414,
-1.4081721305847168,
-0.8628467321395874,
1.0967333316802979,
0.13364377617835999,
-1.004742980003357,
1.1737531423568726,
-0.3704504370689392,
-1.840025782585144,
1.1679209470748901,
-2.1616883277893066
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Yes, this works. But how to get the training output during training the squad by **Trainer**
for example https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/trainer_qa.py
I want the training inputs, labels, outputs for every epoch and step to produce the training dynamic graph | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 37 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
Yes, this works. But how to get the training output during training the squad by **Trainer**
for example https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/trainer_qa.py
I want the training inputs, labels, outputs for every epoch and step to produce the training dynamic graph | [
-1.2281254529953003,
-0.9329556822776794,
-0.7302993535995483,
1.4320099353790283,
-0.11526823043823242,
-1.2457283735275269,
0.08601820468902588,
-1.0106819868087769,
1.566577672958374,
-0.7103707790374756,
0.2966081202030182,
-1.6777119636535645,
-0.06535762548446655,
-0.5716078281402588,
-0.7670295834541321,
-0.8468906879425049,
-0.39545348286628723,
-0.9140031337738037,
0.9661650061607361,
2.5267748832702637,
1.2701728343963623,
-1.291193962097168,
2.7572054862976074,
0.5879305601119995,
-0.29750069975852966,
-1.0381108522415161,
0.5410866141319275,
0.023777402937412262,
-1.2042171955108643,
-0.40493977069854736,
-0.8990957736968994,
-0.027981072664260864,
-0.5960025787353516,
-0.5043193101882935,
0.1265895515680313,
0.44167187809944153,
-0.21530087292194366,
-0.2123938798904419,
-0.45922452211380005,
-0.6799295544624329,
0.5709813833236694,
-0.27505746483802795,
0.8741975426673889,
-0.296871542930603,
1.7460319995880127,
-0.6467742323875427,
0.3851191997528076,
0.7128419876098633,
1.3115137815475464,
0.13402315974235535,
0.05432869493961334,
0.24906840920448303,
0.3132985234260559,
-0.01879173144698143,
0.4816226065158844,
1.1930289268493652,
0.5780146718025208,
0.47919973731040955,
0.6436884999275208,
-2.20281982421875,
1.332114815711975,
-0.9108703136444092,
0.28429532051086426,
1.4000239372253418,
-0.950993537902832,
0.4005761444568634,
-1.887231469154358,
-0.08270452916622162,
0.5118094086647034,
-2.312734603881836,
0.1563693881034851,
-1.2796626091003418,
-0.5552332401275635,
0.9853488802909851,
0.2098691463470459,
-1.320988416671753,
0.2122095823287964,
-0.5059738159179688,
1.0660969018936157,
0.5226927995681763,
1.194851279258728,
-1.6834039688110352,
-0.05871492624282837,
-0.1963542103767395,
0.13286708295345306,
-1.3165256977081299,
-1.6353707313537598,
0.5397538542747498,
0.5379467606544495,
0.7062844634056091,
-0.09133285284042358,
0.9473126530647278,
-0.9649183750152588,
0.893275797367096,
-1.0390902757644653,
-1.6350319385528564,
-1.414090871810913,
-2.3557889461517334,
-2.371032953262329,
0.7976121306419373,
-0.5330172181129456,
-0.5141225457191467,
2.002735137939453,
-1.0239174365997314,
-1.8146580457687378,
1.104006052017212,
0.3256017565727234,
0.01496742945164442,
2.433669090270996,
0.24982979893684387,
-0.7460020780563354,
0.46554669737815857,
-0.7456518411636353,
0.7868430018424988,
-0.27194535732269287,
1.3564447164535522,
0.6439425349235535,
-1.0153859853744507,
1.5945216417312622,
-0.405126690864563,
0.5404170155525208,
-0.7420892715454102,
-0.5392932295799255,
-0.8689181804656982,
0.2847130596637726,
1.9508119821548462,
-0.39802086353302,
1.5696077346801758,
-0.3211114704608917,
-1.5946040153503418,
-1.475014567375183,
0.8794724941253662,
0.5021215677261353,
-0.8773250579833984,
0.14911510050296783,
-0.4835723042488098,
0.1180996373295784,
0.029692653566598892,
0.9968867301940918,
1.1820980310440063,
0.6999205350875854,
-0.34250229597091675,
-0.8626989722251892,
0.25903505086898804,
-0.0625670850276947,
-0.6265957951545715,
-1.8280247449874878,
-0.33399859070777893,
0.19355908036231995,
0.6302512288093567,
-1.244942307472229,
1.7051657438278198,
0.8364669680595398,
2.000911235809326,
0.9607179164886475,
-0.4352152347564697,
1.5522844791412354,
-0.03926043212413788,
1.8875248432159424,
-0.5474728345870972,
0.6545360088348389,
-0.33703359961509705,
-1.1816414594650269,
0.8578811883926392,
-0.3335258662700653,
-2.028059244155884,
-0.8040600419044495,
-0.8543030023574829,
-0.15972189605236053,
-0.7938719987869263,
0.9050560593605042,
-0.2561897337436676,
-1.4782867431640625,
0.20479345321655273,
-0.5911253690719604,
0.14562007784843445,
-1.3657463788986206,
0.2516896426677704,
0.7460614442825317,
-0.6123668551445007,
-0.04250477999448776,
-0.28758442401885986,
-1.2920937538146973,
-0.5175977945327759,
0.289224237203598,
1.9021073579788208,
-0.6593700647354126,
0.9944264888763428,
1.0010461807250977,
-0.7266218662261963,
0.10308873653411865,
0.3384043276309967,
-0.3134283423423767,
0.84444659948349,
-1.039158582687378,
-0.4337993264198303,
1.096377968788147,
-0.15046900510787964,
-0.6800829768180847,
1.4315022230148315,
0.8827135562896729,
-1.0629992485046387,
-0.2383573055267334,
-0.24173401296138763,
-0.7715039253234863,
0.04136333614587784,
-1.5531266927719116,
-0.14839275181293488,
0.23483149707317352,
-1.4614899158477783,
-0.4344291687011719,
-0.2306244969367981,
1.3486679792404175,
-0.28106746077537537,
1.4728533029556274,
-0.277338445186615,
-0.20643796026706696,
-0.39506256580352783,
-0.43943125009536743,
0.23718751966953278,
-0.1562226563692093,
-0.6183716058731079,
0.3142649233341217,
-0.8441361784934998,
0.29924753308296204,
1.4757580757141113,
0.4206485152244568,
0.09925950318574905,
0.452116459608078,
1.0942950248718262,
0.3529132306575775,
-0.06253642588853836,
-0.9593594670295715,
-1.5970500707626343,
2.0730340480804443,
-1.5146491527557373,
1.941152572631836,
0.741178035736084,
-0.10194576531648636,
-1.702759861946106,
-1.8332256078720093,
1.3627018928527832,
1.194364070892334,
2.377528667449951,
0.5505623817443848,
0.37641164660453796,
-0.764284074306488,
-0.7434994578361511,
0.32813841104507446,
-1.0564969778060913,
-0.7128476500511169,
0.10565563291311264,
2.380725622177124,
1.7712757587432861,
-0.5397390723228455,
-0.25226473808288574,
-0.9122397303581238,
1.240965485572815,
-0.1986820548772812,
0.23813840746879578,
2.1001672744750977,
-0.30827879905700684,
-1.0280463695526123,
1.2893484830856323,
-2.361182451248169,
0.25809091329574585,
1.9789021015167236,
0.35656431317329407,
0.1016131117939949,
-1.4356341361999512,
-0.6162012815475464,
-0.22773924469947815,
-0.5464174747467041,
-1.2396947145462036,
0.583208441734314,
-0.28091078996658325,
-0.9302241802215576,
-1.4797650575637817,
0.05938129872083664,
-1.1938104629516602,
-1.768573522567749,
0.3948895335197449,
1.8372565507888794,
2.0764005184173584,
-0.7914682030677795,
1.3959379196166992,
-0.2349892109632492,
0.1496596485376358,
1.267101526260376,
1.2857881784439087,
3.0672836303710938,
1.834916353225708,
-1.2547909021377563,
0.7424325942993164,
-0.21625958383083344,
-0.5352001190185547,
1.163730263710022,
-1.0691885948181152,
1.1607027053833008,
-0.31530842185020447,
-1.2461621761322021,
-1.320029616355896,
1.1033414602279663,
0.4860397279262543,
0.06814659386873245,
-0.5668106079101562,
1.2221105098724365,
0.20023894309997559,
1.3392914533615112,
0.5610684752464294,
-0.35520774126052856,
0.5786378979682922,
-0.3940862715244293,
-0.5942791700363159,
1.689409852027893,
0.1427285075187683,
-1.4934180974960327,
-2.349335193634033,
-0.30780211091041565,
-0.8817282319068909,
-0.0361969992518425,
-0.5922753810882568,
-1.030554175376892,
1.559977412223816,
0.49918651580810547,
-1.2408989667892456,
-0.31987708806991577,
-0.3015899062156677,
-0.6182010769844055,
2.636305570602417,
-1.3404319286346436,
-0.1054849624633789,
-0.9447110891342163,
-0.47423049807548523,
1.6150671243667603,
-1.1618832349777222,
-0.1576792150735855,
-1.0474474430084229,
-0.6983075141906738,
-1.339888095855713,
-0.46888503432273865,
-0.0562530942261219,
-0.9229593276977539,
0.6914942264556885,
0.08484744280576706,
-1.1093976497650146,
-0.2899131178855896,
-0.9241638779640198,
0.9672455787658691,
-0.12401513010263443,
0.2517894506454468,
1.7632713317871094,
0.4126933217048645,
-0.43039003014564514,
0.7610191106796265,
1.1532047986984253,
0.6115385293960571,
-0.6650576591491699,
0.1024828627705574,
-0.7749022841453552,
0.28629767894744873,
-1.320078730583191,
0.2978787124156952,
-2.876037120819092,
0.7279176712036133,
-0.09719455242156982,
-0.0590677373111248,
-0.17411842942237854,
-1.3028448820114136,
1.208064079284668,
2.615522623062134,
-1.1322054862976074,
0.5208272933959961,
0.39453554153442383,
1.1234232187271118,
-1.6252179145812988,
0.2374117523431778,
-0.4811209738254547,
2.1672284603118896,
0.09277709573507309,
1.242149829864502,
-0.494964063167572,
-2.2186508178710938,
0.6372490525245667,
-1.2742806673049927,
-1.067211627960205,
0.7950481176376343,
-0.8488295078277588,
0.21886827051639557,
-1.4018690586090088,
-0.17375145852565765,
-0.954748809337616,
-1.2324105501174927,
0.7557913661003113,
0.09165279567241669,
0.5031440854072571,
-0.6075806617736816,
0.3908657431602478,
-2.124000072479248,
-1.412867784500122,
-0.17251549661159515,
-0.9442811608314514,
0.42973023653030396,
-0.34212392568588257,
0.6101994514465332,
-0.012876883149147034,
0.11641650646924973,
0.3585074245929718,
1.3668289184570312,
3.36008358001709,
0.18437513709068298,
0.31613194942474365,
-0.055220626294612885,
-0.9991433620452881,
1.4675660133361816,
0.9937260150909424,
-0.12358082085847855,
-0.5458800792694092,
-0.9378827214241028,
1.2839726209640503,
1.9908086061477661,
1.1669188737869263,
0.10967672616243362,
-0.8799885511398315,
-0.7663478851318359,
0.05346757918596268,
0.2104986310005188,
0.5065767765045166,
0.9529958367347717,
-0.01944800466299057,
0.14681804180145264,
1.365904450416565,
1.207962155342102,
-0.3846769332885742,
0.4563520550727844,
-0.933918833732605,
-0.38004598021507263,
0.43751260638237,
0.21315240859985352,
0.026976898312568665,
0.5210496783256531,
-1.0645471811294556,
-0.26679563522338867,
-0.24935829639434814,
-0.9351446032524109,
-0.7649425268173218,
-0.42424026131629944,
-0.4205746054649353,
1.6483432054519653,
0.011568310670554638,
-0.45241764187812805,
0.04646008461713791,
-0.7792853116989136,
-0.13317683339118958,
-1.0898629426956177,
0.2056589126586914,
-0.14925672113895416,
-0.06716921180486679,
-0.15596866607666016,
1.7646129131317139,
-1.0159015655517578,
-2.1522409915924072,
0.23610103130340576,
0.34806203842163086,
-0.4416779577732086,
0.12588530778884888,
1.6692525148391724,
0.5046281218528748,
1.410954236984253,
1.2868661880493164,
1.0615636110305786,
-0.6104904413223267,
-1.232759714126587,
0.711602509021759,
0.9346483945846558,
-1.333418607711792,
0.9123601913452148,
-0.13091900944709778,
-0.4354042708873749,
0.6647049784660339,
1.3188683986663818,
0.34851008653640747,
-2.005568027496338,
0.8519466519355774,
-0.883370578289032,
0.7693752646446228,
0.6585018634796143,
0.7945622801780701,
0.2366199791431427,
0.8284940719604492,
-1.3029725551605225,
-1.1220078468322754,
-0.7179426550865173,
-0.5462528467178345,
1.8993581533432007,
-0.1342526376247406,
0.5021155476570129,
-0.1096150279045105,
-1.1854779720306396,
-0.08114807307720184,
0.7268564701080322,
0.3877786695957184,
-0.35678383708000183,
0.9238405823707581,
-0.586151123046875,
-1.0533407926559448,
-1.295287013053894,
-0.4093807637691498,
-0.9933498501777649,
-0.906508207321167,
1.0026825666427612,
0.7453368306159973,
0.3960438370704651,
1.8552665710449219,
0.544316828250885,
0.29057180881500244,
-2.641234874725342,
0.9141813516616821,
0.2866649925708771,
-0.027472276240587234,
0.9064194560050964,
0.2086552232503891,
1.1994951963424683,
-0.012592697516083717,
0.526075541973114,
-2.3062798976898193,
2.229006767272949,
-0.17858882248401642,
0.6967424750328064,
0.09513119608163834,
-0.19796818494796753,
1.1047163009643555,
0.5346500873565674,
0.6208902597427368,
-1.2037156820297241,
0.7639439105987549,
-0.6085075736045837,
1.149101734161377,
0.9756554365158081,
-0.8635185956954956,
0.09574727714061737,
1.3016698360443115,
0.4615115523338318,
-0.4128510653972626,
-0.9480469822883606,
-0.8249130249023438,
0.982489824295044,
1.7366032600402832,
-0.03603396937251091,
0.013149292208254337,
0.8713959455490112,
0.7042549252510071,
-1.3144243955612183,
0.09786005318164825,
-0.6782987713813782,
-0.7158838510513306,
1.7017189264297485,
2.090543508529663,
-0.060954317450523376,
-0.17576144635677338,
-0.7779397368431091,
-1.1794657707214355,
0.7983303070068359,
-0.009324947372078896,
0.15615175664424896,
0.7446924448013306,
-0.6866708993911743,
1.175762414932251,
0.6865439414978027,
0.9942200183868408,
0.025432541966438293,
0.3519262969493866,
0.26235756278038025,
-0.3230981230735779,
-1.145971655845642,
-0.3126300573348999,
-1.1103330850601196,
-2.65643048286438,
0.44922199845314026,
-0.3130306899547577,
-1.3421475887298584,
0.015004952438175678,
-1.0160492658615112,
0.8608192801475525,
-0.5978460907936096,
-1.1255805492401123,
-1.4270330667495728,
0.28511524200439453,
-0.23863407969474792,
0.8524898886680603,
-1.654011845588684,
-0.08796675503253937,
1.2544046640396118,
0.8677235245704651,
-0.5640111565589905,
0.9646986126899719,
0.2548902630805969,
0.9254626631736755,
0.7398037910461426,
-0.3359437584877014,
0.544954240322113,
0.16662698984146118,
-1.3808213472366333,
0.4194006323814392,
1.2587136030197144,
0.2220592349767685,
1.4167243242263794,
-0.45706576108932495,
0.08325308561325073,
0.458384245634079,
-0.5366184711456299,
-0.5764390826225281,
-0.5245372653007507,
0.7343891859054565,
0.06829072535037994,
-1.046583890914917,
0.07411130517721176,
-0.14772269129753113,
-0.1463690847158432,
0.29893776774406433,
-1.5083125829696655,
-0.23476548492908478,
-0.396391361951828,
-0.5206092596054077,
-1.3142683506011963,
0.026937708258628845,
1.305291771888733,
-0.8198261857032776,
-0.21097764372825623,
0.4352879524230957,
0.2966483235359192,
0.5804357528686523,
0.6180011630058289,
-0.6950371861457825,
-0.3207680284976959,
-0.3500823378562927,
-0.29352235794067383,
0.3008902966976166,
1.1323437690734863,
-0.14496111869812012,
-0.9785858392715454,
0.670050323009491,
-0.35362884402275085,
0.10871606320142746,
2.001868963241577,
0.0558539479970932,
-0.7553621530532837,
0.41959068179130554,
-0.6561729907989502,
1.7970912456512451,
1.6226692199707031,
1.3444674015045166,
-0.18555185198783875,
-0.8945999145507812,
0.5455188751220703,
-0.27124130725860596,
-0.3896840214729309,
0.9807941317558289,
0.3818889260292053,
-0.20663757622241974,
-1.4197461605072021,
0.5139659643173218,
1.3328818082809448,
-0.920168936252594,
-0.7498323321342468,
0.09992572665214539,
-0.9111146926879883,
1.138100504875183,
0.6110922694206238,
0.3829582631587982,
0.2404021918773651,
1.5569522380828857,
0.6637888550758362,
-0.5130130052566528,
0.4453136920928955,
0.4196532368659973,
-0.19481590390205383,
-2.0187807083129883,
-1.0510568618774414,
0.25109878182411194,
-0.4291474223136902,
-1.4890202283859253,
1.3659731149673462,
-1.163722038269043,
-0.9845879077911377,
0.5374345183372498,
0.10624220222234726,
1.3760768175125122,
0.2717672288417816,
1.7193706035614014,
2.07794451713562,
0.9239469766616821,
0.270651251077652,
1.2597260475158691,
-0.035233885049819946,
-0.41817015409469604,
1.811724066734314,
-0.4298592805862427,
0.5597885251045227,
1.0452759265899658,
-0.41230419278144836,
-1.0804919004440308,
-0.8640851974487305,
-1.126883864402771,
-0.5616277456283569,
1.2066330909729004,
0.1561906337738037,
-1.129174828529358,
0.23100870847702026,
1.5994024276733398,
0.09466774016618729,
-0.18966519832611084,
0.6648786067962646,
0.4858333170413971,
-0.7081505060195923,
-0.024344593286514282,
-0.9431748390197754,
0.46199849247932434,
-0.16963009536266327,
-0.294743150472641,
0.2297418862581253,
0.5704846382141113,
1.2323448657989502,
-0.027873646467924118,
0.13037993013858795,
1.2656508684158325,
-1.365279197692871,
1.4491807222366333,
-0.6401410102844238,
0.3324984908103943,
-2.4354779720306396,
1.4009649753570557,
-0.8280425071716309,
1.8721059560775757,
-2.5693070888519287,
0.3592669367790222,
-0.5801734924316406,
-0.45301908254623413,
0.24680522084236145,
-0.4346807301044464,
0.09812679886817932,
-0.141328826546669,
-0.9910668730735779,
-0.09746930003166199,
-0.8261318206787109,
0.5551577210426331,
1.1600998640060425,
1.4195454120635986,
-1.072389006614685,
-0.28820085525512695,
-1.7980611324310303,
-0.22747276723384857,
-0.6411830186843872,
0.3409809172153473,
-1.9469205141067505,
-0.17849808931350708,
-2.070634603500366,
-2.277066707611084,
-1.3843073844909668,
-0.9435925483703613,
1.0805139541625977,
0.1733902543783188,
-0.8895517587661743,
1.0494773387908936,
-0.3762533664703369,
-1.732196569442749,
1.1107680797576904,
-2.1541101932525635
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | I think you may need to implement your own Trainer, from the `QuestionAnsweringTrainer` for example.
This way you can have the flexibility of saving all the inputs/output used at each step | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 31 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
I think you may need to implement your own Trainer, from the `QuestionAnsweringTrainer` for example.
This way you can have the flexibility of saving all the inputs/output used at each step | [
-1.2339259386062622,
-0.894706130027771,
-0.7742665410041809,
1.4215309619903564,
-0.1574602723121643,
-1.2344942092895508,
0.07719897478818893,
-1.048039436340332,
1.6105374097824097,
-0.7373068928718567,
0.3368449807167053,
-1.6626698970794678,
-0.02701329067349434,
-0.5828432440757751,
-0.7475292682647705,
-0.8424658179283142,
-0.39577338099479675,
-0.9063537120819092,
0.9136777520179749,
2.5525710582733154,
1.2409523725509644,
-1.2839561700820923,
2.72664475440979,
0.6379595994949341,
-0.28025883436203003,
-0.9999068975448608,
0.5433878898620605,
-0.00020752940326929092,
-1.199073314666748,
-0.4076474905014038,
-0.9267080426216125,
-0.03571397066116333,
-0.598703145980835,
-0.5542353391647339,
0.08838676661252975,
0.449452668428421,
-0.24979740381240845,
-0.2480737864971161,
-0.40100961923599243,
-0.6948672533035278,
0.5856688022613525,
-0.2647643983364105,
0.8924820423126221,
-0.2973860502243042,
1.771043300628662,
-0.6004229784011841,
0.40505698323249817,
0.7361579537391663,
1.2932840585708618,
0.1605076789855957,
0.031401533633470535,
0.2888491749763489,
0.27772051095962524,
0.00978800468146801,
0.46336713433265686,
1.1868059635162354,
0.5850684642791748,
0.5031642913818359,
0.6698247790336609,
-2.2111141681671143,
1.2913333177566528,
-0.9254363775253296,
0.2808658182621002,
1.3678960800170898,
-0.9610220193862915,
0.40362030267715454,
-1.8839890956878662,
-0.08476503938436508,
0.5336026549339294,
-2.2931532859802246,
0.17109286785125732,
-1.2741700410842896,
-0.5219031572341919,
1.017301082611084,
0.20265603065490723,
-1.3268126249313354,
0.185846745967865,
-0.49873843789100647,
1.0558054447174072,
0.5714210867881775,
1.1755574941635132,
-1.6721969842910767,
-0.026590505614876747,
-0.25713464617729187,
0.17789757251739502,
-1.3053336143493652,
-1.597599744796753,
0.5484956502914429,
0.542897641658783,
0.7276583313941956,
-0.09123367816209793,
0.9600381255149841,
-0.9464772939682007,
0.9030994176864624,
-1.053780436515808,
-1.6615428924560547,
-1.412351131439209,
-2.332005262374878,
-2.3842613697052,
0.7952331900596619,
-0.5144752860069275,
-0.5050303936004639,
2.0203583240509033,
-1.037653923034668,
-1.8130381107330322,
1.0967427492141724,
0.3363918960094452,
-0.030837856233119965,
2.440652370452881,
0.2523442208766937,
-0.7712459564208984,
0.4464624524116516,
-0.7160826921463013,
0.7930951714515686,
-0.2410891056060791,
1.3412882089614868,
0.6536623239517212,
-1.0266047716140747,
1.631242275238037,
-0.4449249804019928,
0.5055696964263916,
-0.7001835107803345,
-0.5371906161308289,
-0.8728367686271667,
0.27410295605659485,
1.9440793991088867,
-0.40504923462867737,
1.571593999862671,
-0.34615135192871094,
-1.6037720441818237,
-1.485935926437378,
0.8512166738510132,
0.5045310854911804,
-0.8621634244918823,
0.1889951527118683,
-0.48295995593070984,
0.10412890464067459,
0.00911627896130085,
1.0155211687088013,
1.149419903755188,
0.7431696653366089,
-0.3278833031654358,
-0.8792905211448669,
0.2946217656135559,
-0.03445187211036682,
-0.6766630411148071,
-1.8300325870513916,
-0.36328715085983276,
0.15105244517326355,
0.6572914719581604,
-1.2112480401992798,
1.7000316381454468,
0.8375988602638245,
1.9934886693954468,
0.9746431708335876,
-0.40693798661231995,
1.5712025165557861,
-0.0652850866317749,
1.8917243480682373,
-0.5058827996253967,
0.6729798913002014,
-0.36651918292045593,
-1.1903125047683716,
0.8387547731399536,
-0.30100592970848083,
-2.048370838165283,
-0.795024037361145,
-0.8456176519393921,
-0.1534009575843811,
-0.8179250955581665,
0.9038099646568298,
-0.25798898935317993,
-1.4855290651321411,
0.2478153109550476,
-0.5978162884712219,
0.11278406530618668,
-1.375963807106018,
0.29596900939941406,
0.7264444231987,
-0.6343621611595154,
0.0007959017530083656,
-0.27061495184898376,
-1.2681312561035156,
-0.5193199515342712,
0.26224738359451294,
1.8955044746398926,
-0.6935559511184692,
0.9524942636489868,
0.9954153895378113,
-0.7244265675544739,
0.054798536002635956,
0.33813244104385376,
-0.29153406620025635,
0.8155191540718079,
-1.0447945594787598,
-0.4373243749141693,
1.1522504091262817,
-0.13650229573249817,
-0.6664749383926392,
1.4231841564178467,
0.8626677393913269,
-1.0608069896697998,
-0.21220463514328003,
-0.2554689049720764,
-0.7913451194763184,
0.02767794579267502,
-1.5698834657669067,
-0.13993707299232483,
0.23984384536743164,
-1.4547524452209473,
-0.41996505856513977,
-0.20327293872833252,
1.3459113836288452,
-0.2398906946182251,
1.4680697917938232,
-0.3004229664802551,
-0.19763627648353577,
-0.3706527054309845,
-0.41978272795677185,
0.25287580490112305,
-0.1323232352733612,
-0.6271775364875793,
0.2865884304046631,
-0.838381826877594,
0.2560330033302307,
1.4507129192352295,
0.41756680607795715,
0.09420055150985718,
0.47298911213874817,
1.095934271812439,
0.3570822477340698,
-0.046334777027368546,
-0.9265331029891968,
-1.5705832242965698,
2.112360715866089,
-1.509069800376892,
1.9075474739074707,
0.7252746820449829,
-0.141331285238266,
-1.7578377723693848,
-1.8379995822906494,
1.375361680984497,
1.1958136558532715,
2.338174819946289,
0.6049538850784302,
0.37628304958343506,
-0.7749497890472412,
-0.741300642490387,
0.3700309991836548,
-1.0538151264190674,
-0.7429326772689819,
0.07741954177618027,
2.40014910697937,
1.768324851989746,
-0.5388643145561218,
-0.23645558953285217,
-0.9275044202804565,
1.2307089567184448,
-0.18859276175498962,
0.23544397950172424,
2.081700086593628,
-0.34062162041664124,
-1.0393232107162476,
1.3015121221542358,
-2.383800983428955,
0.24207648634910583,
1.980652093887329,
0.3393605649471283,
0.08949478715658188,
-1.4311190843582153,
-0.631296694278717,
-0.1744903326034546,
-0.5163087844848633,
-1.2227187156677246,
0.5889431238174438,
-0.2880931794643402,
-0.9111371040344238,
-1.479987621307373,
0.08537144958972931,
-1.1927533149719238,
-1.7569700479507446,
0.39394858479499817,
1.8323923349380493,
2.0472464561462402,
-0.7702360153198242,
1.4232592582702637,
-0.24289578199386597,
0.20109260082244873,
1.2878285646438599,
1.2913711071014404,
3.084584951400757,
1.8307640552520752,
-1.282431960105896,
0.7140098810195923,
-0.19801002740859985,
-0.5223930478096008,
1.1585487127304077,
-1.1091455221176147,
1.1630109548568726,
-0.32028651237487793,
-1.228060007095337,
-1.2991071939468384,
1.050100564956665,
0.48061618208885193,
0.09942349046468735,
-0.5487965941429138,
1.242818832397461,
0.1724490523338318,
1.355062484741211,
0.5866257548332214,
-0.3613015413284302,
0.5914855599403381,
-0.39160752296447754,
-0.5733609795570374,
1.6507458686828613,
0.14290174841880798,
-1.4677720069885254,
-2.37376070022583,
-0.31028857827186584,
-0.8952663540840149,
-0.02869044616818428,
-0.568694531917572,
-1.00863516330719,
1.5683510303497314,
0.4509671628475189,
-1.2268937826156616,
-0.31885233521461487,
-0.2981788218021393,
-0.585274875164032,
2.6441690921783447,
-1.3511128425598145,
-0.1403292715549469,
-0.9516978859901428,
-0.4965595006942749,
1.6180952787399292,
-1.1560962200164795,
-0.17090916633605957,
-1.0852465629577637,
-0.7103121876716614,
-1.3823039531707764,
-0.5008166432380676,
-0.06862475723028183,
-0.9258877038955688,
0.7386585474014282,
0.09933935105800629,
-1.1064903736114502,
-0.26390358805656433,
-0.91570645570755,
0.9358265399932861,
-0.14743179082870483,
0.279013067483902,
1.7441550493240356,
0.4138728380203247,
-0.42717230319976807,
0.7529134154319763,
1.1616933345794678,
0.6466345191001892,
-0.6366534233093262,
0.1457376480102539,
-0.7814719676971436,
0.28800976276397705,
-1.3023306131362915,
0.3013611137866974,
-2.8860366344451904,
0.7407358884811401,
-0.11180809140205383,
-0.06813376396894455,
-0.2014317512512207,
-1.328667402267456,
1.1533584594726562,
2.608546018600464,
-1.1317552328109741,
0.49794575572013855,
0.39047470688819885,
1.1254373788833618,
-1.6040303707122803,
0.1982792317867279,
-0.4898918867111206,
2.219874382019043,
0.09832262992858887,
1.3009672164916992,
-0.45052939653396606,
-2.2218267917633057,
0.6699064373970032,
-1.2741806507110596,
-1.1189621686935425,
0.8200697302818298,
-0.8693886995315552,
0.2011776864528656,
-1.387391209602356,
-0.15506139397621155,
-0.9659545421600342,
-1.24092435836792,
0.7870180010795593,
0.15800687670707703,
0.5347557067871094,
-0.598604679107666,
0.3715636432170868,
-2.109314441680908,
-1.4069433212280273,
-0.15128344297409058,
-0.9597465991973877,
0.41792699694633484,
-0.3058103024959564,
0.6249418258666992,
-0.04831964522600174,
0.09342820942401886,
0.3951473832130432,
1.3657288551330566,
3.327023983001709,
0.18709135055541992,
0.32228031754493713,
-0.0767272561788559,
-0.9968181252479553,
1.460553526878357,
0.9725741744041443,
-0.14957913756370544,
-0.5409325361251831,
-0.9366932511329651,
1.2409262657165527,
1.987452507019043,
1.1229692697525024,
0.08460523188114166,
-0.8431017398834229,
-0.7222105860710144,
0.069185771048069,
0.21836420893669128,
0.5019938945770264,
0.907295286655426,
-0.019732804968953133,
0.14179742336273193,
1.368861198425293,
1.1891154050827026,
-0.3822749853134155,
0.4591856598854065,
-0.89180588722229,
-0.4121401607990265,
0.4924528896808624,
0.22922080755233765,
0.027762457728385925,
0.5030308961868286,
-1.072737216949463,
-0.24613678455352783,
-0.23408111929893494,
-0.9345479011535645,
-0.7624749541282654,
-0.4286676347255707,
-0.39535945653915405,
1.6277799606323242,
-0.005295766983181238,
-0.466170996427536,
0.013074921444058418,
-0.809228241443634,
-0.16251081228256226,
-1.0807193517684937,
0.18099939823150635,
-0.17272400856018066,
-0.0640210434794426,
-0.16322699189186096,
1.7684303522109985,
-1.0318840742111206,
-2.1432409286499023,
0.2544705271720886,
0.36204758286476135,
-0.4048023819923401,
0.14899775385856628,
1.6710145473480225,
0.5039548277854919,
1.397408366203308,
1.2979669570922852,
1.037384033203125,
-0.6440839171409607,
-1.173445463180542,
0.736901044845581,
0.9324962496757507,
-1.339125394821167,
0.8695067763328552,
-0.10413808375597,
-0.46093979477882385,
0.6523692607879639,
1.281113862991333,
0.3769294023513794,
-1.9906281232833862,
0.8415918946266174,
-0.8768900036811829,
0.7249827980995178,
0.6686394810676575,
0.7889557480812073,
0.24067428708076477,
0.8223287463188171,
-1.298897624015808,
-1.1400340795516968,
-0.6970353126525879,
-0.5480065941810608,
1.9217346906661987,
-0.14862936735153198,
0.5030810832977295,
-0.0866624265909195,
-1.1958562135696411,
-0.09055189043283463,
0.7137721180915833,
0.3370664417743683,
-0.38890382647514343,
0.9101815223693848,
-0.6161311864852905,
-1.0618289709091187,
-1.3297076225280762,
-0.43805748224258423,
-0.9963302612304688,
-0.8855177164077759,
0.9931134581565857,
0.7635900378227234,
0.34429335594177246,
1.8871409893035889,
0.5581424236297607,
0.2628136873245239,
-2.6596202850341797,
0.8972167372703552,
0.2712806463241577,
-0.03300720453262329,
0.9298969507217407,
0.21182957291603088,
1.1878788471221924,
-0.005964494310319424,
0.5345889329910278,
-2.327500104904175,
2.235823154449463,
-0.19333544373512268,
0.7004433870315552,
0.09649224579334259,
-0.2221105694770813,
1.0741291046142578,
0.5175535678863525,
0.6274263262748718,
-1.1608282327651978,
0.7552151083946228,
-0.626918375492096,
1.1827369928359985,
0.998668372631073,
-0.84969162940979,
0.07607005536556244,
1.3004311323165894,
0.46276021003723145,
-0.40741991996765137,
-0.9350503087043762,
-0.8408714532852173,
0.9845302104949951,
1.7469972372055054,
-0.04264133423566818,
0.019969206303358078,
0.8581418991088867,
0.7246953845024109,
-1.3381003141403198,
0.0830223560333252,
-0.6904347538948059,
-0.7448537945747375,
1.6866087913513184,
2.0672216415405273,
-0.07965625077486038,
-0.16054755449295044,
-0.816615879535675,
-1.1647300720214844,
0.8205932974815369,
0.0032215816900134087,
0.14784643054008484,
0.7439809441566467,
-0.6852022409439087,
1.1621683835983276,
0.7150445580482483,
0.976601779460907,
0.08350052684545517,
0.3879168927669525,
0.2509562075138092,
-0.26677411794662476,
-1.1345773935317993,
-0.3348069190979004,
-1.10810124874115,
-2.672085762023926,
0.5020814538002014,
-0.3458048403263092,
-1.3570573329925537,
-0.0014056218788027763,
-0.9919700622558594,
0.8578734397888184,
-0.603813886642456,
-1.111534833908081,
-1.4144266843795776,
0.29845476150512695,
-0.19721972942352295,
0.8383567929267883,
-1.636649250984192,
-0.037330511957407,
1.2678004503250122,
0.9046255946159363,
-0.6090578436851501,
0.9486720561981201,
0.28567108511924744,
0.9680077433586121,
0.7731726169586182,
-0.3541897237300873,
0.5515714883804321,
0.15981999039649963,
-1.3917735815048218,
0.42058464884757996,
1.2608448266983032,
0.23149707913398743,
1.4549616575241089,
-0.45863214135169983,
0.02986392378807068,
0.4570886492729187,
-0.535165011882782,
-0.591312825679779,
-0.567722737789154,
0.7367571592330933,
0.09866015613079071,
-1.0144813060760498,
0.05678802728652954,
-0.11431829631328583,
-0.1605760157108307,
0.27896371483802795,
-1.5151731967926025,
-0.22073712944984436,
-0.3917485773563385,
-0.5373961925506592,
-1.3052129745483398,
0.012355264276266098,
1.2987829446792603,
-0.7995951175689697,
-0.20481473207473755,
0.4471426010131836,
0.3268783390522003,
0.5830532908439636,
0.6038280725479126,
-0.6913390755653381,
-0.35957613587379456,
-0.353518009185791,
-0.27645424008369446,
0.2974248230457306,
1.1764614582061768,
-0.1469043493270874,
-1.0345711708068848,
0.6698827147483826,
-0.34401947259902954,
0.08413277566432953,
1.9778413772583008,
0.07861943542957306,
-0.7535960078239441,
0.4131190776824951,
-0.6679743528366089,
1.7949297428131104,
1.615017294883728,
1.3582888841629028,
-0.13970595598220825,
-0.9204046130180359,
0.5881749987602234,
-0.3341200351715088,
-0.36595284938812256,
0.9755586385726929,
0.3900463879108429,
-0.1858072578907013,
-1.3927996158599854,
0.5476197004318237,
1.299599051475525,
-0.9462291598320007,
-0.7453255653381348,
0.10867878794670105,
-0.875731885433197,
1.1051580905914307,
0.6371777057647705,
0.37612631916999817,
0.23174846172332764,
1.5764708518981934,
0.6532272100448608,
-0.5208615064620972,
0.4587783217430115,
0.41144347190856934,
-0.16096723079681396,
-2.008181095123291,
-1.0651921033859253,
0.2670549750328064,
-0.42113837599754333,
-1.4952428340911865,
1.3689037561416626,
-1.1788451671600342,
-0.9764487147331238,
0.5145266652107239,
0.10036822408437729,
1.3556022644042969,
0.33195194602012634,
1.7361680269241333,
2.042790651321411,
0.9193487763404846,
0.2753700613975525,
1.2851507663726807,
-0.10524022579193115,
-0.3959602415561676,
1.7911168336868286,
-0.4297145903110504,
0.5572206377983093,
1.0541859865188599,
-0.3754567801952362,
-1.0554319620132446,
-0.8537035584449768,
-1.1447914838790894,
-0.5904465317726135,
1.2062047719955444,
0.15665894746780396,
-1.138715147972107,
0.23671942949295044,
1.620017409324646,
0.037012822926044464,
-0.2109810709953308,
0.6494711637496948,
0.4615083634853363,
-0.7166846990585327,
-0.03619439899921417,
-0.9429405331611633,
0.4566926062107086,
-0.19714897871017456,
-0.3118945360183716,
0.21322691440582275,
0.569989800453186,
1.259774088859558,
-0.020171258598566055,
0.12003133445978165,
1.2707533836364746,
-1.3544704914093018,
1.4137682914733887,
-0.6804324388504028,
0.3090836703777313,
-2.437030792236328,
1.3716175556182861,
-0.8711920380592346,
1.8681329488754272,
-2.5786445140838623,
0.4051121473312378,
-0.526059091091156,
-0.4194479286670685,
0.2786613404750824,
-0.39014896750450134,
0.12192458659410477,
-0.1525222659111023,
-0.9839925169944763,
-0.135034441947937,
-0.8099198937416077,
0.5303140878677368,
1.1597946882247925,
1.3590813875198364,
-1.1016063690185547,
-0.31034284830093384,
-1.7548466920852661,
-0.2385115921497345,
-0.6185493469238281,
0.3330147862434387,
-1.9705411195755005,
-0.17423465847969055,
-2.05836820602417,
-2.3182075023651123,
-1.3712822198867798,
-0.9145645499229431,
1.1197844743728638,
0.1482011079788208,
-0.9304855465888977,
1.015415072441101,
-0.3591017723083496,
-1.7481303215026855,
1.095155119895935,
-2.133035898208618
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | > does there have any function to be overwritten to do this?
ok, I overwrote the compute_loss, thank you. | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 19 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
> does there have any function to be overwritten to do this?
ok, I overwrote the compute_loss, thank you. | [
-1.2056388854980469,
-0.9047682285308838,
-0.7555839419364929,
1.4049392938613892,
-0.16296632587909698,
-1.201367974281311,
0.08696756511926651,
-1.027140736579895,
1.5930191278457642,
-0.7332446575164795,
0.3408106863498688,
-1.6412791013717651,
-0.038089901208877563,
-0.5977276563644409,
-0.7375396490097046,
-0.8605968356132507,
-0.4044684171676636,
-0.9079509377479553,
0.9059275984764099,
2.5446479320526123,
1.245453953742981,
-1.2737890481948853,
2.7322475910186768,
0.6158894896507263,
-0.2870926260948181,
-1.0135483741760254,
0.5318970084190369,
0.0038081957027316093,
-1.2095627784729004,
-0.38987287878990173,
-0.9248620867729187,
-0.05137708783149719,
-0.6067459583282471,
-0.5421121716499329,
0.10698128491640091,
0.44117867946624756,
-0.23113590478897095,
-0.21645234525203705,
-0.4109751582145691,
-0.6805851459503174,
0.5961887240409851,
-0.2883800268173218,
0.89040607213974,
-0.31014230847358704,
1.7951526641845703,
-0.6164311766624451,
0.40204426646232605,
0.746642529964447,
1.2702875137329102,
0.14501450955867767,
0.02141076698899269,
0.28200384974479675,
0.2810722291469574,
0.032871197909116745,
0.47390687465667725,
1.157621145248413,
0.5595194101333618,
0.479793906211853,
0.640399158000946,
-2.214336395263672,
1.2835824489593506,
-0.9151225686073303,
0.2754390239715576,
1.3664281368255615,
-0.9637902975082397,
0.3909482955932617,
-1.8754773139953613,
-0.0897955521941185,
0.5639886856079102,
-2.294318437576294,
0.16150972247123718,
-1.293971061706543,
-0.5491078495979309,
1.0111110210418701,
0.21859398484230042,
-1.3226245641708374,
0.20120342075824738,
-0.5038591623306274,
1.0591586828231812,
0.5544105768203735,
1.1608524322509766,
-1.6714143753051758,
-0.03474998101592064,
-0.2514137625694275,
0.17719577252864838,
-1.3027032613754272,
-1.5714807510375977,
0.5633547902107239,
0.550375759601593,
0.7172284126281738,
-0.06510983407497406,
0.9526684284210205,
-0.9684882760047913,
0.915944516658783,
-1.0578069686889648,
-1.66048002243042,
-1.4047517776489258,
-2.3600502014160156,
-2.3788747787475586,
0.7941127419471741,
-0.4944360554218292,
-0.4958033561706543,
2.0181992053985596,
-1.0589148998260498,
-1.8035067319869995,
1.1217350959777832,
0.31409692764282227,
-0.02345503494143486,
2.421783685684204,
0.2291824221611023,
-0.782955527305603,
0.4399736523628235,
-0.7416041493415833,
0.791955292224884,
-0.2339545339345932,
1.3238383531570435,
0.6484060883522034,
-1.0296350717544556,
1.620519757270813,
-0.45333632826805115,
0.5174458026885986,
-0.6763708591461182,
-0.5499480366706848,
-0.8913209438323975,
0.25505754351615906,
1.9516757726669312,
-0.39757341146469116,
1.5668004751205444,
-0.3409428000450134,
-1.596096158027649,
-1.496706247329712,
0.860347330570221,
0.4961029887199402,
-0.8808238506317139,
0.14771668612957,
-0.49279409646987915,
0.11022120714187622,
-0.0001737019047141075,
1.043331265449524,
1.1669862270355225,
0.7455196380615234,
-0.34118911623954773,
-0.8815681338310242,
0.27493375539779663,
-0.02104322984814644,
-0.6748414635658264,
-1.8454113006591797,
-0.3686620593070984,
0.15955492854118347,
0.6523224711418152,
-1.1852736473083496,
1.7134413719177246,
0.8553770184516907,
1.9618897438049316,
0.9654517769813538,
-0.4123145341873169,
1.5819257497787476,
-0.051294777542352676,
1.8873579502105713,
-0.5261240005493164,
0.6765792369842529,
-0.38926881551742554,
-1.2028417587280273,
0.8378149271011353,
-0.29977476596832275,
-2.0381357669830322,
-0.7894646525382996,
-0.8318902254104614,
-0.1605619341135025,
-0.8146882057189941,
0.9065960645675659,
-0.25841638445854187,
-1.483931541442871,
0.2541906237602234,
-0.610903799533844,
0.10666873306035995,
-1.3816888332366943,
0.2948909103870392,
0.7481043338775635,
-0.6249784827232361,
-0.008355261757969856,
-0.26193132996559143,
-1.262054681777954,
-0.49468156695365906,
0.25355204939842224,
1.896168828010559,
-0.7054708003997803,
0.9456965327262878,
0.9919072985649109,
-0.698352575302124,
0.09531063586473465,
0.35644251108169556,
-0.3015793263912201,
0.808596670627594,
-1.036222219467163,
-0.39552196860313416,
1.1426652669906616,
-0.1365964114665985,
-0.6860595941543579,
1.4166035652160645,
0.8607536554336548,
-1.0396134853363037,
-0.2297557294368744,
-0.2793375849723816,
-0.7671768665313721,
0.04253361001610756,
-1.5845203399658203,
-0.09877780824899673,
0.2700740694999695,
-1.439945101737976,
-0.39985090494155884,
-0.20016317069530487,
1.3475781679153442,
-0.24098733067512512,
1.454362154006958,
-0.3118743896484375,
-0.17866478860378265,
-0.36756572127342224,
-0.44791415333747864,
0.2558682858943939,
-0.13899914920330048,
-0.6041885018348694,
0.2920003831386566,
-0.8307682275772095,
0.2560771107673645,
1.445541501045227,
0.39267808198928833,
0.11639416217803955,
0.4523971974849701,
1.0713527202606201,
0.3459652066230774,
-0.06401069462299347,
-0.9344925284385681,
-1.590584397315979,
2.1342854499816895,
-1.502261757850647,
1.9445937871932983,
0.7391247749328613,
-0.14317122101783752,
-1.7320835590362549,
-1.8623621463775635,
1.363039493560791,
1.1722594499588013,
2.325490713119507,
0.5971254110336304,
0.3867085874080658,
-0.7754716873168945,
-0.7249329090118408,
0.3737100660800934,
-1.063554286956787,
-0.7647384405136108,
0.0816030278801918,
2.410029888153076,
1.7615944147109985,
-0.5487527847290039,
-0.22637316584587097,
-0.9316661357879639,
1.2449958324432373,
-0.1757749766111374,
0.2500099241733551,
2.0976874828338623,
-0.35709840059280396,
-1.0503101348876953,
1.301634430885315,
-2.3868227005004883,
0.24945895373821259,
1.992020606994629,
0.33277690410614014,
0.0967932790517807,
-1.4237602949142456,
-0.6011143326759338,
-0.18587443232536316,
-0.5137861371040344,
-1.2190924882888794,
0.6047379374504089,
-0.2959441542625427,
-0.9378059506416321,
-1.4686436653137207,
0.08768561482429504,
-1.1954078674316406,
-1.7539687156677246,
0.40246662497520447,
1.8163608312606812,
2.0683860778808594,
-0.7827780246734619,
1.411754846572876,
-0.225348562002182,
0.1947823464870453,
1.2606534957885742,
1.3084620237350464,
3.0663421154022217,
1.8303836584091187,
-1.2752021551132202,
0.7161074280738831,
-0.20966805517673492,
-0.5164330005645752,
1.150850534439087,
-1.1171287298202515,
1.1565680503845215,
-0.2969973385334015,
-1.2235548496246338,
-1.303268551826477,
1.0816673040390015,
0.49217814207077026,
0.10579250752925873,
-0.5428981781005859,
1.2815459966659546,
0.1690777987241745,
1.3505229949951172,
0.5823215246200562,
-0.35678336024284363,
0.5779178142547607,
-0.388686865568161,
-0.5758129954338074,
1.6410739421844482,
0.15380163490772247,
-1.483794927597046,
-2.3610124588012695,
-0.31238994002342224,
-0.9061089754104614,
-0.014714211225509644,
-0.5417323708534241,
-1.0215561389923096,
1.5843651294708252,
0.442369669675827,
-1.2509199380874634,
-0.32072481513023376,
-0.26414668560028076,
-0.5938180088996887,
2.6373958587646484,
-1.3343238830566406,
-0.1435389667749405,
-0.9493727087974548,
-0.4902426600456238,
1.6266573667526245,
-1.165539264678955,
-0.1629539281129837,
-1.0700128078460693,
-0.715354859828949,
-1.3639411926269531,
-0.47835177183151245,
-0.05850226804614067,
-0.9420559406280518,
0.7313474416732788,
0.11163640022277832,
-1.138217806816101,
-0.2924515902996063,
-0.9413363933563232,
0.9613791108131409,
-0.13256345689296722,
0.28571605682373047,
1.7334496974945068,
0.4281424283981323,
-0.4331188201904297,
0.7267594933509827,
1.1793808937072754,
0.6488054990768433,
-0.6546791791915894,
0.13887102901935577,
-0.8008391261100769,
0.2916933298110962,
-1.3099521398544312,
0.3199313282966614,
-2.8990437984466553,
0.74937504529953,
-0.11670733988285065,
-0.07813917100429535,
-0.19799205660820007,
-1.3246904611587524,
1.1866825819015503,
2.617603063583374,
-1.1131309270858765,
0.4946889281272888,
0.396994411945343,
1.1212615966796875,
-1.6041674613952637,
0.23902328312397003,
-0.5096341371536255,
2.205576181411743,
0.11600278317928314,
1.2689745426177979,
-0.43570956587791443,
-2.2098710536956787,
0.6651239991188049,
-1.2908759117126465,
-1.1025135517120361,
0.8383756279945374,
-0.8916524648666382,
0.17951586842536926,
-1.4035478830337524,
-0.14622563123703003,
-0.9740608334541321,
-1.2502926588058472,
0.7504666447639465,
0.14865662157535553,
0.5165001153945923,
-0.59083491563797,
0.3718617260456085,
-2.122417449951172,
-1.4013172388076782,
-0.1621028482913971,
-0.9632924795150757,
0.4260842204093933,
-0.29736632108688354,
0.6455762982368469,
-0.0645563155412674,
0.09135331958532333,
0.41235682368278503,
1.377249836921692,
3.3478147983551025,
0.16737022995948792,
0.3200933635234833,
-0.0611264705657959,
-0.98451828956604,
1.476454734802246,
0.9940440058708191,
-0.14514906704425812,
-0.5464892983436584,
-0.9349028468132019,
1.2480374574661255,
2.027740001678467,
1.133768081665039,
0.07086281478404999,
-0.853669285774231,
-0.734709620475769,
0.05559777840971947,
0.21312983334064484,
0.4944383502006531,
0.9177528619766235,
-0.030262455344200134,
0.12953680753707886,
1.343117117881775,
1.2053014039993286,
-0.36144089698791504,
0.45172104239463806,
-0.8988476395606995,
-0.39346209168434143,
0.48915642499923706,
0.20309872925281525,
0.025731537491083145,
0.5025956630706787,
-1.0694204568862915,
-0.24319104850292206,
-0.2280855029821396,
-0.9202358722686768,
-0.7834460139274597,
-0.447748601436615,
-0.418054461479187,
1.6316978931427002,
-0.007524394430220127,
-0.45654332637786865,
0.042927663773298264,
-0.8043864369392395,
-0.17069117724895477,
-1.098237156867981,
0.19442319869995117,
-0.17016923427581787,
-0.06818380951881409,
-0.17198967933654785,
1.7810208797454834,
-1.040386438369751,
-2.133579969406128,
0.27065539360046387,
0.3216753602027893,
-0.41141006350517273,
0.17152370512485504,
1.6563477516174316,
0.5028089880943298,
1.4074387550354004,
1.279393196105957,
1.030967116355896,
-0.630217432975769,
-1.1646071672439575,
0.7520300149917603,
0.9326445460319519,
-1.3820171356201172,
0.8773118853569031,
-0.09224911034107208,
-0.45948922634124756,
0.6761620044708252,
1.2613979578018188,
0.3564159572124481,
-1.9745460748672485,
0.8359127044677734,
-0.9062689542770386,
0.7391252517700195,
0.6609264612197876,
0.7471359968185425,
0.24397321045398712,
0.8277919292449951,
-1.2712370157241821,
-1.1228550672531128,
-0.6930010318756104,
-0.5268494486808777,
1.9007493257522583,
-0.15007244050502777,
0.5002202391624451,
-0.06817934662103653,
-1.1761671304702759,
-0.092756487429142,
0.7289625406265259,
0.3640921711921692,
-0.37435030937194824,
0.9171760678291321,
-0.605759859085083,
-1.0681102275848389,
-1.300067663192749,
-0.43164145946502686,
-1.015533685684204,
-0.9094815850257874,
0.9985310435295105,
0.7467221617698669,
0.36154165863990784,
1.8694584369659424,
0.5534580945968628,
0.285766065120697,
-2.651688814163208,
0.9224154353141785,
0.2563667595386505,
-0.05859338119626045,
0.9261090159416199,
0.191529780626297,
1.2208927869796753,
-0.01372299063950777,
0.5466933846473694,
-2.3278346061706543,
2.2528417110443115,
-0.19303981959819794,
0.6945063471794128,
0.09563778340816498,
-0.19701248407363892,
1.0478330850601196,
0.519514262676239,
0.6060348749160767,
-1.171018362045288,
0.7328135967254639,
-0.619569718837738,
1.1612035036087036,
0.9890849590301514,
-0.8636100888252258,
0.08828334510326385,
1.2753852605819702,
0.47305452823638916,
-0.4258565306663513,
-0.932164192199707,
-0.833376944065094,
0.9683501124382019,
1.7290501594543457,
-0.05027775838971138,
0.0019235853105783463,
0.8855774402618408,
0.704998791217804,
-1.3173727989196777,
0.060826677829027176,
-0.6745409965515137,
-0.7119535207748413,
1.683943271636963,
2.080110788345337,
-0.047495003789663315,
-0.13825471699237823,
-0.8299857974052429,
-1.1852811574935913,
0.8268260359764099,
-0.01737552136182785,
0.1591303050518036,
0.7401173114776611,
-0.6739495992660522,
1.1408768892288208,
0.7050805687904358,
1.0117394924163818,
0.07977701723575592,
0.3718721568584442,
0.2696576416492462,
-0.28638532757759094,
-1.122218370437622,
-0.3557581603527069,
-1.1305779218673706,
-2.6907730102539062,
0.4882984459400177,
-0.3778077960014343,
-1.3332769870758057,
0.010414018295705318,
-0.9974727630615234,
0.8551697134971619,
-0.6008618474006653,
-1.0841577053070068,
-1.406865119934082,
0.3011478781700134,
-0.20439766347408295,
0.8643285632133484,
-1.622381329536438,
-0.04293696582317352,
1.2392953634262085,
0.9033897519111633,
-0.6024031043052673,
0.9693453907966614,
0.2893553078174591,
0.9545814394950867,
0.740582287311554,
-0.33449655771255493,
0.5845428705215454,
0.17436149716377258,
-1.399505615234375,
0.4080904722213745,
1.2723171710968018,
0.2169913500547409,
1.4470876455307007,
-0.43741747736930847,
0.0455617718398571,
0.4671275317668915,
-0.523881196975708,
-0.582155168056488,
-0.5368586182594299,
0.7351282238960266,
0.11493729799985886,
-1.0133458375930786,
0.05669311061501503,
-0.1434834599494934,
-0.15887056291103363,
0.25784093141555786,
-1.495653748512268,
-0.2218342274427414,
-0.4227197766304016,
-0.5455908179283142,
-1.319926142692566,
0.024136487394571304,
1.328433871269226,
-0.7969681620597839,
-0.19672167301177979,
0.427624374628067,
0.3487687110900879,
0.5763696432113647,
0.6369795203208923,
-0.6913963556289673,
-0.35858333110809326,
-0.34780845046043396,
-0.265323668718338,
0.3013472855091095,
1.1788508892059326,
-0.15219184756278992,
-1.0295689105987549,
0.6721206903457642,
-0.3332061171531677,
0.07153892517089844,
1.9702343940734863,
0.09117931127548218,
-0.7749355435371399,
0.40511810779571533,
-0.6626967191696167,
1.8166133165359497,
1.6050752401351929,
1.3450605869293213,
-0.17453686892986298,
-0.8972305059432983,
0.5843981504440308,
-0.33641311526298523,
-0.3563295900821686,
0.9607298374176025,
0.38189244270324707,
-0.18959923088550568,
-1.3888399600982666,
0.557471513748169,
1.3142825365066528,
-0.9389144778251648,
-0.7306212782859802,
0.10371226817369461,
-0.8841016292572021,
1.0957342386245728,
0.6299635767936707,
0.39782142639160156,
0.24721865355968475,
1.5633840560913086,
0.6597649455070496,
-0.5344378352165222,
0.4517834484577179,
0.4287893772125244,
-0.18201953172683716,
-2.0311572551727295,
-1.0497413873672485,
0.2824851870536804,
-0.44667503237724304,
-1.4965465068817139,
1.3644689321517944,
-1.1758134365081787,
-0.9731056690216064,
0.5248411297798157,
0.10744214057922363,
1.3459193706512451,
0.3258838355541229,
1.7223831415176392,
2.0588324069976807,
0.9140217900276184,
0.26871976256370544,
1.3102836608886719,
-0.08847641944885254,
-0.4030553996562958,
1.7703195810317993,
-0.43924427032470703,
0.5462082028388977,
1.059800386428833,
-0.40852195024490356,
-1.0419836044311523,
-0.8787781596183777,
-1.1394144296646118,
-0.5619037747383118,
1.2199262380599976,
0.14678680896759033,
-1.1592706441879272,
0.2426413744688034,
1.6045657396316528,
0.04003255441784859,
-0.21382638812065125,
0.6590011715888977,
0.42412713170051575,
-0.7077844738960266,
-0.024127837270498276,
-0.9388409852981567,
0.47655120491981506,
-0.20560503005981445,
-0.32093697786331177,
0.21185851097106934,
0.5742090940475464,
1.2466837167739868,
-0.027889061719179153,
0.1212599128484726,
1.2940499782562256,
-1.3272714614868164,
1.404038667678833,
-0.662551999092102,
0.3255341649055481,
-2.437439203262329,
1.3616046905517578,
-0.8527602553367615,
1.8449347019195557,
-2.569687843322754,
0.395630419254303,
-0.5021010637283325,
-0.4326164126396179,
0.24948181211948395,
-0.37988850474357605,
0.11221886426210403,
-0.151877760887146,
-0.994109570980072,
-0.1467679888010025,
-0.7994895577430725,
0.5682382583618164,
1.1376447677612305,
1.382468342781067,
-1.0837770700454712,
-0.3062717020511627,
-1.7671235799789429,
-0.2315565049648285,
-0.6367509365081787,
0.31710490584373474,
-1.9853284358978271,
-0.18448619544506073,
-2.091601848602295,
-2.3209822177886963,
-1.4114207029342651,
-0.9360151290893555,
1.1040195226669312,
0.16006284952163696,
-0.889255702495575,
1.0376425981521606,
-0.3359673321247101,
-1.7714953422546387,
1.080465316772461,
-2.1409077644348145
] |
https://github.com/huggingface/datasets/issues/3333 | load JSON files, get the errors | Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
``` | Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_ | 1,088 | 576 | load JSON files, get the errors
Hi, does this bug be fixed? when I load JSON files, I get the same errors by the command
`!python3 run.py --do_train --task qa --dataset squad-retrain-data/train-v2.0.json --output_dir ./re_trained_model/`
change the dateset to load json by refering to https://huggingface.co/docs/datasets/loading.html
`dataset = datasets.load_dataset('json', data_files=args.dataset)`
Errors:
`Downloading and preparing dataset json/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/json/default-c1e124ad488911b8/0.0.0/45636811569ec4a6630521c18235dfbbab83b7ab572e3393c5ba68ccabe98264...
`
_Originally posted by @yanllearnn in https://github.com/huggingface/datasets/issues/730#issuecomment-981095050_
Hi, I add one field **example_id**, but I can't see it in the **comput_loss** function, how can I do this? below is the information of inputs
```
*********************** inputs: {'attention_mask': tensor([[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
...,
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0],
[1, 1, 1, ..., 0, 0, 0]], device='cuda:0'), 'end_positions': tensor([ 25, 97, 93, 44, 25, 112, 109, 134], device='cuda:0'), 'input_ids': tensor([[ 101, 2054, 2390, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2106, ..., 0, 0, 0],
...,
[ 101, 2339, 2001, ..., 0, 0, 0],
[ 101, 2054, 2515, ..., 0, 0, 0],
[ 101, 2054, 2003, ..., 0, 0, 0]], device='cuda:0'), 'start_positions': tensor([ 20, 90, 89, 41, 25, 96, 106, 132], device='cuda:0'), 'token_type_ids': tensor([[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]], device='cuda:0')}
```
```
# This function preprocesses a question answering dataset, tokenizing the question and context text
# and finding the right offsets for the answer spans in the tokenized context (to use as labels).
# Adapted from https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py
def prepare_train_dataset_qa(examples, tokenizer, max_seq_length=None):
questions = [q.lstrip() for q in examples["question"]]
max_seq_length = tokenizer.model_max_length
# tokenize both questions and the corresponding context
# if the context length is longer than max_length, we split it to several
# chunks of max_length
tokenized_examples = tokenizer(
questions,
examples["context"],
truncation="only_second",
max_length=max_seq_length,
stride=min(max_seq_length // 2, 128),
return_overflowing_tokens=True,
return_offsets_mapping=True,
padding="max_length"
)
# Since one example might give us several features if it has a long context,
# we need a map from a feature to its corresponding example.
sample_mapping = tokenized_examples.pop("overflow_to_sample_mapping")
# The offset mappings will give us a map from token to character position
# in the original context. This will help us compute the start_positions
# and end_positions to get the final answer string.
offset_mapping = tokenized_examples.pop("offset_mapping")
tokenized_examples["start_positions"] = []
tokenized_examples["end_positions"] = []
tokenized_examples["example_id"] = []
for i, offsets in enumerate(offset_mapping):
input_ids = tokenized_examples["input_ids"][i]
# We will label features not containing the answer the index of the CLS token.
cls_index = input_ids.index(tokenizer.cls_token_id)
sequence_ids = tokenized_examples.sequence_ids(i)
# from the feature idx to sample idx
sample_index = sample_mapping[i]
# get the answer for a feature
answers = examples["answers"][sample_index]
tokenized_examples["example_id"].append(examples["id"][sample_index])
if len(answers["answer_start"]) == 0:
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Start/end character index of the answer in the text.
start_char = answers["answer_start"][0]
end_char = start_char + len(answers["text"][0])
# Start token index of the current span in the text.
token_start_index = 0
while sequence_ids[token_start_index] != 1:
token_start_index += 1
# End token index of the current span in the text.
token_end_index = len(input_ids) - 1
while sequence_ids[token_end_index] != 1:
token_end_index -= 1
# Detect if the answer is out of the span (in which case this feature is labeled with the CLS index).
if not (offsets[token_start_index][0] <= start_char and
offsets[token_end_index][1] >= end_char):
tokenized_examples["start_positions"].append(cls_index)
tokenized_examples["end_positions"].append(cls_index)
else:
# Otherwise move the token_start_index and token_end_index to the two ends of the answer.
# Note: we could go after the last offset if the answer is the last word (edge case).
while token_start_index < len(offsets) and \
offsets[token_start_index][0] <= start_char:
token_start_index += 1
tokenized_examples["start_positions"].append(
token_start_index - 1)
while offsets[token_end_index][1] >= end_char:
token_end_index -= 1
tokenized_examples["end_positions"].append(token_end_index + 1)
return tokenized_examples
``` | [
-1.2042120695114136,
-1.0079516172409058,
-0.6592478156089783,
1.3080898523330688,
-0.29308438301086426,
-1.1931633949279785,
0.2399505078792572,
-1.0484915971755981,
1.6168293952941895,
-0.6773191094398499,
0.2290097177028656,
-1.6934864521026611,
-0.02853146195411682,
-0.6796741485595703,
-0.8052735328674316,
-0.7610755562782288,
-0.4566154181957245,
-0.9163304567337036,
0.9623464345932007,
2.5691978931427,
1.2005285024642944,
-1.2953524589538574,
2.705929756164551,
0.6538687348365784,
-0.2478702813386917,
-1.0018916130065918,
0.5653246641159058,
-0.025613784790039062,
-1.2161434888839722,
-0.4259415566921234,
-0.9237377643585205,
-0.09048668295145035,
-0.6008179783821106,
-0.4680508077144623,
0.0943334549665451,
0.39943554997444153,
-0.1800745129585266,
-0.1779462993144989,
-0.3467864394187927,
-0.6851107478141785,
0.4891452491283417,
-0.39073407649993896,
0.9523957371711731,
-0.3049062192440033,
1.682306170463562,
-0.6542754769325256,
0.47988611459732056,
0.7312610745429993,
1.252903699874878,
0.14180609583854675,
0.07757851481437683,
0.2801946699619293,
0.43382528424263,
0.0331379771232605,
0.4601415991783142,
1.134732961654663,
0.6338276863098145,
0.4702050983905792,
0.6861903071403503,
-2.26891827583313,
1.3116756677627563,
-0.9621253609657288,
0.3749013841152191,
1.4602289199829102,
-0.8545823693275452,
0.38110119104385376,
-1.8627967834472656,
-0.08600270748138428,
0.5621129274368286,
-2.3341269493103027,
0.23907646536827087,
-1.317255973815918,
-0.6142542958259583,
0.888088583946228,
0.34038400650024414,
-1.3799901008605957,
0.2654128968715668,
-0.45790329575538635,
0.9407978653907776,
0.3933834135532379,
1.052941918373108,
-1.8250524997711182,
-0.12981417775154114,
-0.2455897182226181,
0.16930843889713287,
-1.1838034391403198,
-1.5812361240386963,
0.6553421020507812,
0.4567964971065521,
0.6771794557571411,
-0.23613153398036957,
0.9524254202842712,
-1.1071867942810059,
0.9211101531982422,
-1.2715418338775635,
-1.7010539770126343,
-1.4135104417800903,
-2.4144234657287598,
-2.3375613689422607,
0.8053345680236816,
-0.5067017078399658,
-0.49208566546440125,
1.9657965898513794,
-0.9744329452514648,
-1.5786391496658325,
1.1531870365142822,
0.37879979610443115,
-0.04801037907600403,
2.490499258041382,
0.16696593165397644,
-0.6036829948425293,
0.4795147776603699,
-0.9449949860572815,
0.8919866681098938,
-0.2168952077627182,
1.377030611038208,
0.518709123134613,
-0.9771647453308105,
1.556601881980896,
-0.4437616765499115,
0.4821564853191376,
-0.6521952152252197,
-0.46861565113067627,
-0.8205118179321289,
0.29414090514183044,
1.8496826887130737,
-0.2781580686569214,
1.3956525325775146,
-0.3604910969734192,
-1.575490951538086,
-1.4345288276672363,
0.9517483115196228,
0.4939999282360077,
-0.9172618389129639,
0.06202690675854683,
-0.4196762144565582,
0.17418047785758972,
-0.04773082956671715,
1.1032650470733643,
1.2256211042404175,
0.7222273349761963,
-0.4084199368953705,
-0.929975688457489,
0.1678551286458969,
-0.2109316736459732,
-0.83875572681427,
-1.8613964319229126,
-0.3839307725429535,
0.04788634181022644,
0.6773218512535095,
-1.1991733312606812,
1.7015414237976074,
0.9364483952522278,
1.9806824922561646,
0.9274910688400269,
-0.5497405529022217,
1.4737223386764526,
0.05241056904196739,
1.8250170946121216,
-0.7411688566207886,
0.7457743883132935,
-0.5336114764213562,
-1.1222972869873047,
1.0203789472579956,
-0.33377379179000854,
-1.9812822341918945,
-0.7178497910499573,
-0.8231251835823059,
-0.3437040448188782,
-0.7810601592063904,
0.9369525909423828,
-0.24364447593688965,
-1.4804127216339111,
0.23030933737754822,
-0.6253422498703003,
0.07484530657529831,
-1.3407856225967407,
0.2970575988292694,
0.7580135464668274,
-0.5238861441612244,
-0.0482490211725235,
-0.27995145320892334,
-1.2577687501907349,
-0.5161788463592529,
0.2451552450656891,
1.868236780166626,
-0.6071035861968994,
1.0590137243270874,
0.9212536215782166,
-0.7092642784118652,
-0.05306624993681908,
0.4072831869125366,
-0.28944534063339233,
0.6944108009338379,
-0.9860561490058899,
-0.5775656700134277,
0.9875496625900269,
-0.15899302065372467,
-0.5063707828521729,
1.4482007026672363,
0.8162910342216492,
-1.0925445556640625,
-0.24309569597244263,
-0.17728601396083832,
-0.7233325242996216,
0.1657983362674713,
-1.5790988206863403,
-0.17290669679641724,
0.375265508890152,
-1.5123993158340454,
-0.5211098194122314,
-0.29339727759361267,
1.28262197971344,
-0.18847186863422394,
1.3554763793945312,
-0.212223619222641,
-0.27025723457336426,
-0.4296504855155945,
-0.36619850993156433,
0.2378189116716385,
-0.16435638070106506,
-0.4685845375061035,
0.327237606048584,
-0.8102543950080872,
0.3865044116973877,
1.5184552669525146,
0.3286284804344177,
0.0769953727722168,
0.3823150396347046,
0.9667853116989136,
0.42654749751091003,
0.029571130871772766,
-0.9907642006874084,
-1.4746897220611572,
2.145594358444214,
-1.5934479236602783,
1.8647232055664062,
0.7557722926139832,
-0.08985419571399689,
-1.6666499376296997,
-1.825477123260498,
1.352382779121399,
1.180307149887085,
2.292799949645996,
0.5632550120353699,
0.3395991921424866,
-0.7036359906196594,
-0.6754063963890076,
0.24807557463645935,
-1.0379525423049927,
-0.7068286538124084,
0.09415262192487717,
2.4642441272735596,
1.7713514566421509,
-0.5617724061012268,
-0.19464343786239624,
-1.028516411781311,
1.4105969667434692,
-0.1583031266927719,
0.33359289169311523,
2.0900113582611084,
-0.449152410030365,
-1.069122314453125,
1.2825887203216553,
-2.392235040664673,
0.18744736909866333,
1.9704676866531372,
0.355946809053421,
0.1467513144016266,
-1.3981068134307861,
-0.5649988055229187,
-0.2903893291950226,
-0.5947113037109375,
-1.3149772882461548,
0.639262318611145,
-0.24932095408439636,
-0.9457014799118042,
-1.5633671283721924,
0.15724167227745056,
-1.212241768836975,
-1.7393007278442383,
0.3801082670688629,
1.819887638092041,
2.1324543952941895,
-0.7065470814704895,
1.4274301528930664,
-0.29403749108314514,
0.13953718543052673,
1.149786353111267,
1.2482731342315674,
2.97672963142395,
1.947358250617981,
-1.1103253364562988,
0.680378258228302,
-0.3235304057598114,
-0.4927149713039398,
1.1371324062347412,
-0.9972881078720093,
1.1771782636642456,
-0.18253107368946075,
-1.2024190425872803,
-1.2247942686080933,
1.0479825735092163,
0.4096420407295227,
0.09183084964752197,
-0.48278385400772095,
1.174000859260559,
0.281507283449173,
1.266122817993164,
0.6758177280426025,
-0.1713329553604126,
0.6181401014328003,
-0.48498019576072693,
-0.5278337001800537,
1.682239294052124,
0.259151816368103,
-1.538267970085144,
-2.436455249786377,
-0.35717177391052246,
-0.967409074306488,
0.12022649496793747,
-0.597968339920044,
-0.990959107875824,
1.6292879581451416,
0.43025362491607666,
-1.1536426544189453,
-0.18470914661884308,
-0.263520210981369,
-0.5355127453804016,
2.6413938999176025,
-1.2876858711242676,
-0.2039278745651245,
-0.8867835998535156,
-0.553848147392273,
1.6192457675933838,
-1.1782615184783936,
-0.0319293774664402,
-1.078057050704956,
-0.546943187713623,
-1.2092853784561157,
-0.35675880312919617,
-0.06032506003975868,
-0.9974594116210938,
0.8743159770965576,
0.0890435054898262,
-1.2268034219741821,
-0.34418678283691406,
-1.035491943359375,
0.8304620981216431,
-0.029298920184373856,
0.21410328149795532,
1.7796359062194824,
0.32140812277793884,
-0.4255242347717285,
0.815068781375885,
1.1900852918624878,
0.7108635306358337,
-0.6870616674423218,
0.13044050335884094,
-0.6677671074867249,
0.3600923418998718,
-1.1586180925369263,
0.2942734956741333,
-2.796456813812256,
0.6685264706611633,
-0.10971704870462418,
-0.11891189217567444,
-0.16350072622299194,
-1.372285008430481,
1.3209861516952515,
2.4879026412963867,
-1.1660213470458984,
0.5394722819328308,
0.3123219907283783,
1.2473021745681763,
-1.4901678562164307,
0.25871598720550537,
-0.5099541544914246,
2.245398998260498,
0.17177912592887878,
1.154768943786621,
-0.5139175653457642,
-2.306386709213257,
0.6593198180198669,
-1.2675155401229858,
-1.084202527999878,
0.5643866062164307,
-0.8514420390129089,
0.19390282034873962,
-1.5169330835342407,
-0.12334445118904114,
-0.9278826713562012,
-1.2246150970458984,
0.6869664788246155,
0.14760664105415344,
0.5366430878639221,
-0.705001711845398,
0.36707279086112976,
-2.1563758850097656,
-1.412052869796753,
-0.26443976163864136,
-0.8264585137367249,
0.5020155310630798,
-0.3222181499004364,
0.6756926774978638,
-0.017338870093226433,
-0.032074250280857086,
0.3902338743209839,
1.426326036453247,
3.3866465091705322,
0.04733564332127571,
0.3364075720310211,
-0.11287467181682587,
-1.0042781829833984,
1.41327965259552,
1.0558117628097534,
0.09180133044719696,
-0.5643647313117981,
-0.999657154083252,
1.3286396265029907,
2.0398266315460205,
1.1139063835144043,
0.042545124888420105,
-0.8140028119087219,
-0.631196141242981,
0.050332918763160706,
0.3189048767089844,
0.42400437593460083,
0.9837462306022644,
0.01168044749647379,
0.035905081778764725,
1.4774876832962036,
1.1607517004013062,
-0.39039748907089233,
0.4410989582538605,
-0.89608234167099,
-0.4386563301086426,
0.4715385138988495,
0.22450612485408783,
-0.01411949098110199,
0.5102802515029907,
-1.1427459716796875,
-0.38076069951057434,
-0.18098939955234528,
-0.9428319334983826,
-0.7063990235328674,
-0.379710853099823,
-0.5068236589431763,
1.6756014823913574,
0.02078191563487053,
-0.4013999104499817,
0.10941514372825623,
-0.6745287775993347,
-0.04175903648138046,
-1.1079806089401245,
0.13579684495925903,
-0.16149954497814178,
-0.04358719289302826,
-0.25077494978904724,
1.8533449172973633,
-0.8938789367675781,
-2.023588180541992,
0.19899575412273407,
0.360542356967926,
-0.3774396479129791,
0.2669907808303833,
1.580365777015686,
0.595786988735199,
1.5245250463485718,
1.2751667499542236,
1.0410332679748535,
-0.5045385360717773,
-1.3083237409591675,
0.7521474361419678,
0.9581348896026611,
-1.3053277730941772,
0.8789876699447632,
-0.003265068866312504,
-0.49063533544540405,
0.7415806651115417,
1.2258305549621582,
0.25809958577156067,
-2.147974729537964,
0.8310062885284424,
-1.0165903568267822,
0.8804885149002075,
0.7256578207015991,
0.7537326812744141,
0.29568949341773987,
0.8091593980789185,
-1.3386552333831787,
-1.1092606782913208,
-0.7415758371353149,
-0.5378645658493042,
2.0709288120269775,
-0.21059654653072357,
0.5833913087844849,
-0.22023805975914001,
-1.1251420974731445,
-0.047526825219392776,
0.6665536165237427,
0.4510720372200012,
-0.404334157705307,
0.804215669631958,
-0.5561230182647705,
-1.1237119436264038,
-1.337173581123352,
-0.46258091926574707,
-1.0562111139297485,
-0.9252840876579285,
0.9867115616798401,
0.7722468376159668,
0.5754040479660034,
1.8815581798553467,
0.5889014005661011,
0.26465535163879395,
-2.5178139209747314,
0.9114856719970703,
0.2506019175052643,
-0.17084957659244537,
0.8580620288848877,
0.2979494333267212,
1.215145230293274,
-0.06736869364976883,
0.6497994065284729,
-2.416684865951538,
2.2496390342712402,
-0.14321288466453552,
0.7656501531600952,
0.22141888737678528,
-0.07212415337562561,
1.1308711767196655,
0.6116020083427429,
0.47422173619270325,
-1.0879271030426025,
0.614338219165802,
-0.6152636408805847,
1.3459054231643677,
0.9913826584815979,
-0.6815499663352966,
0.07757120579481125,
1.2553097009658813,
0.5042648315429688,
-0.33663758635520935,
-0.9662660360336304,
-0.8382948637008667,
0.9086797833442688,
1.7076144218444824,
-0.23841187357902527,
-0.0721268281340599,
0.8104352951049805,
0.7499378323554993,
-1.2459715604782104,
0.01941552758216858,
-0.6919252872467041,
-0.6798365712165833,
1.5700963735580444,
2.2114627361297607,
-0.21447379887104034,
-0.01909801736474037,
-0.7280666828155518,
-1.1783932447433472,
0.7702502012252808,
0.009092957712709904,
0.12381980568170547,
0.7093358635902405,
-0.5364139676094055,
1.0749667882919312,
0.683214008808136,
0.9390101432800293,
0.21868416666984558,
0.41648924350738525,
0.2507495582103729,
-0.41690611839294434,
-1.0013056993484497,
-0.34617266058921814,
-1.0915158987045288,
-2.730787515640259,
0.4266011714935303,
-0.39922255277633667,
-1.404399037361145,
0.033490296453237534,
-1.036266803741455,
0.9061374664306641,
-0.5677997469902039,
-1.109674334526062,
-1.5103671550750732,
0.2934337258338928,
-0.03706910461187363,
1.009982705116272,
-1.782157301902771,
-0.024909328669309616,
1.203832983970642,
0.6867422461509705,
-0.5755677819252014,
0.9443817138671875,
0.36995527148246765,
0.9913600087165833,
0.7199671268463135,
-0.3322741985321045,
0.5414968132972717,
0.15616337954998016,
-1.4140043258666992,
0.40071260929107666,
1.307521939277649,
0.21037602424621582,
1.34124755859375,
-0.5034937262535095,
0.10261636972427368,
0.4625721573829651,
-0.5408469438552856,
-0.6184399724006653,
-0.3643362820148468,
0.6645803451538086,
0.12291521579027176,
-1.0542712211608887,
0.011327904649078846,
-0.05716690793633461,
-0.2000390887260437,
0.25939562916755676,
-1.3922587633132935,
-0.26710110902786255,
-0.5509202480316162,
-0.4075307250022888,
-1.4140249490737915,
-0.14108815789222717,
1.3083018064498901,
-0.6760101318359375,
-0.17248421907424927,
0.4916767179965973,
0.3710094392299652,
0.5533128976821899,
0.6616858839988708,
-0.6066286563873291,
-0.5339016914367676,
-0.32622894644737244,
-0.3354967534542084,
0.2622981667518616,
1.2745310068130493,
-0.15087144076824188,
-1.0314750671386719,
0.603675901889801,
-0.36412543058395386,
0.046814847737550735,
1.896185040473938,
-0.03262650594115257,
-0.8038659691810608,
0.43982237577438354,
-0.5667527914047241,
1.8357411623001099,
1.5511674880981445,
1.207829236984253,
-0.1974952071905136,
-0.8754885196685791,
0.5171024203300476,
-0.3008330464363098,
-0.4698190987110138,
0.8108426332473755,
0.2787247896194458,
-0.23409587144851685,
-1.4341216087341309,
0.5424396395683289,
1.4456028938293457,
-0.9177629947662354,
-0.9133095741271973,
0.23156335949897766,
-0.8407996892929077,
1.219689130783081,
0.5871409177780151,
0.4704444110393524,
0.23724626004695892,
1.609798550605774,
0.7002224326133728,
-0.565267026424408,
0.5139807462692261,
0.43865352869033813,
-0.1726936399936676,
-2.156956911087036,
-1.2706501483917236,
0.182359516620636,
-0.5234550833702087,
-1.4528599977493286,
1.3004449605941772,
-1.101934790611267,
-1.0368179082870483,
0.5741084218025208,
0.12323548644781113,
1.265568733215332,
0.4271882474422455,
1.6356134414672852,
2.050097942352295,
0.8669644594192505,
0.45198023319244385,
1.3550201654434204,
-0.12771543860435486,
-0.5560378432273865,
1.807114839553833,
-0.33908697962760925,
0.6313738226890564,
1.0880712270736694,
-0.2714863419532776,
-1.0521914958953857,
-0.8174049854278564,
-1.1017110347747803,
-0.5734735727310181,
1.2622907161712646,
0.07680583000183105,
-1.175611138343811,
0.30364227294921875,
1.5302836894989014,
0.06781534850597382,
-0.29640763998031616,
0.5701026320457458,
0.4387194514274597,
-0.6846351027488708,
-0.025777140632271767,
-1.0006780624389648,
0.423725962638855,
-0.33889898657798767,
-0.2643967270851135,
0.2714498043060303,
0.6940788626670837,
1.2953053712844849,
-0.16196100413799286,
0.1857120245695114,
1.0798648595809937,
-1.429060459136963,
1.452970027923584,
-0.6883832216262817,
0.2742347717285156,
-2.3507609367370605,
1.294793963432312,
-0.7545034885406494,
1.8863624334335327,
-2.7147583961486816,
0.2539284825325012,
-0.4283907115459442,
-0.5315601229667664,
0.22341388463974,
-0.28768396377563477,
0.1990678459405899,
-0.12335113435983658,
-1.1067619323730469,
0.07801570743322372,
-0.818480372428894,
0.4161349833011627,
1.0902440547943115,
1.44149911403656,
-1.0908708572387695,
-0.3113993704319,
-1.753546118736267,
-0.08698435127735138,
-0.7170972228050232,
0.2683459520339966,
-1.953478217124939,
-0.12336333841085434,
-1.8926410675048828,
-2.171668767929077,
-1.3808008432388306,
-1.1215810775756836,
1.0867096185684204,
0.10124888271093369,
-0.8026826977729797,
1.0747394561767578,
-0.2948656380176544,
-1.8229506015777588,
1.027116060256958,
-2.1298909187316895
] |
https://github.com/huggingface/datasets/issues/3331 | AttributeError: 'CommunityDatasetModuleFactoryWithoutScript' object has no attribute 'path' | Hi,
the fix was merged and will be available in the next release of `datasets`.
In the meantime, you can use it by installing `datasets` directly from master as follows:
```
pip install git+https://github.com/huggingface/datasets.git
``` | ## Describe the bug
I add a new question answering dataset to huggingface datasets manually. Here is the link: [luozhouyang/question-answering-datasets](https://huggingface.co/datasets/luozhouyang/question-answering-datasets)
But when I load the dataset, an error raised:
```bash
AttributeError: 'CommunityDatasetModuleFactoryWithoutScript' object has no attribute 'path'
```
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("luozhouyang/question-answering-datasets", data_files=["dureader_robust.train.json"])
```
## Expected results
Load dataset successfully without any error.
## Actual results
```bash
Traceback (most recent call last):
File "/mnt/home/zhouyang.lzy/github/naivenlp/naivenlp/tests/question_answering_tests/dataset_test.py", line 89, in test_load_dataset_with_hf
data_files=["dureader_robust.train.json"],
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 1616, in load_dataset
**config_kwargs,
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 1443, in load_dataset_builder
path, revision=revision, download_config=download_config, download_mode=download_mode, data_files=data_files
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 1157, in dataset_module_factory
raise e1 from None
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 1144, in dataset_module_factory
download_mode=download_mode,
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 798, in get_module
raise FileNotFoundError(f"No data files or dataset script found in {self.path}")
AttributeError: 'CommunityDatasetModuleFactoryWithoutScript' object has no attribute 'path'
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.1
- Platform: linux
- Python version: 3.6.13
- PyArrow version: 6.0.1
| 1,089 | 35 | AttributeError: 'CommunityDatasetModuleFactoryWithoutScript' object has no attribute 'path'
## Describe the bug
I add a new question answering dataset to huggingface datasets manually. Here is the link: [luozhouyang/question-answering-datasets](https://huggingface.co/datasets/luozhouyang/question-answering-datasets)
But when I load the dataset, an error raised:
```bash
AttributeError: 'CommunityDatasetModuleFactoryWithoutScript' object has no attribute 'path'
```
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("luozhouyang/question-answering-datasets", data_files=["dureader_robust.train.json"])
```
## Expected results
Load dataset successfully without any error.
## Actual results
```bash
Traceback (most recent call last):
File "/mnt/home/zhouyang.lzy/github/naivenlp/naivenlp/tests/question_answering_tests/dataset_test.py", line 89, in test_load_dataset_with_hf
data_files=["dureader_robust.train.json"],
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 1616, in load_dataset
**config_kwargs,
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 1443, in load_dataset_builder
path, revision=revision, download_config=download_config, download_mode=download_mode, data_files=data_files
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 1157, in dataset_module_factory
raise e1 from None
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 1144, in dataset_module_factory
download_mode=download_mode,
File "/mnt/home/zhouyang.lzy/.conda/envs/naivenlp/lib/python3.6/site-packages/datasets/load.py", line 798, in get_module
raise FileNotFoundError(f"No data files or dataset script found in {self.path}")
AttributeError: 'CommunityDatasetModuleFactoryWithoutScript' object has no attribute 'path'
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.1
- Platform: linux
- Python version: 3.6.13
- PyArrow version: 6.0.1
Hi,
the fix was merged and will be available in the next release of `datasets`.
In the meantime, you can use it by installing `datasets` directly from master as follows:
```
pip install git+https://github.com/huggingface/datasets.git
``` | [
-1.1494636535644531,
-0.9521229267120361,
-0.7752715349197388,
1.447823405265808,
-0.1280255764722824,
-1.2670170068740845,
0.13637009263038635,
-1.0530868768692017,
1.5852580070495605,
-0.7515807151794434,
0.13623544573783875,
-1.7794644832611084,
-0.10323761403560638,
-0.5619408488273621,
-0.6916874647140503,
-0.9290928840637207,
-0.3235125243663788,
-0.8524187207221985,
1.0452799797058105,
2.4836008548736572,
1.2515469789505005,
-1.2618969678878784,
2.803955078125,
0.6615710258483887,
-0.21162769198417664,
-1.0078457593917847,
0.5562229156494141,
0.003454754129052162,
-1.2123810052871704,
-0.4593181908130646,
-0.9242280125617981,
-0.006334928795695305,
-0.6169474720954895,
-0.4337235391139984,
0.10506610572338104,
0.4591439962387085,
-0.314176082611084,
-0.31174224615097046,
-0.6469064950942993,
-0.7234757542610168,
0.49914810061454773,
-0.3462110459804535,
0.9742690324783325,
-0.38486984372138977,
1.8125836849212646,
-0.6265769004821777,
0.38745948672294617,
0.749972403049469,
1.2721421718597412,
0.22252489626407623,
0.12621891498565674,
0.21882221102714539,
0.3609255850315094,
0.08935666084289551,
0.5443670153617859,
1.1910184621810913,
0.6158612966537476,
0.5200151801109314,
0.6759640574455261,
-2.2358388900756836,
1.3011343479156494,
-0.8949221968650818,
0.3500196933746338,
1.318657398223877,
-0.8866374492645264,
0.3851042091846466,
-1.8234139680862427,
-0.0859823226928711,
0.6529958844184875,
-2.259526252746582,
0.24957464635372162,
-1.3667916059494019,
-0.6308557987213135,
0.9015387892723083,
0.35381725430488586,
-1.1963852643966675,
0.19823068380355835,
-0.47076162695884705,
1.1060233116149902,
0.5379638075828552,
1.130532145500183,
-1.7338589429855347,
-0.03893551230430603,
-0.20990876853466034,
0.10840480029582977,
-1.2488806247711182,
-1.6538200378417969,
0.5855700373649597,
0.6012662053108215,
0.7461470365524292,
-0.18125039339065552,
1.0227936506271362,
-1.0300893783569336,
0.8264610767364502,
-0.9754698872566223,
-1.6501655578613281,
-1.4038716554641724,
-2.33082914352417,
-2.3496880531311035,
0.8082936406135559,
-0.5628172159194946,
-0.423723965883255,
2.016735792160034,
-0.9384464025497437,
-1.799888253211975,
1.065070390701294,
0.33764371275901794,
0.030645661056041718,
2.3478293418884277,
0.24165736138820648,
-0.780427098274231,
0.44077616930007935,
-0.7426049113273621,
0.7570183873176575,
-0.25829944014549255,
1.3505053520202637,
0.5381633043289185,
-0.9849375486373901,
1.547652244567871,
-0.5366872549057007,
0.649721086025238,
-0.6986950039863586,
-0.5236191749572754,
-0.8034638166427612,
0.2176259458065033,
1.9105310440063477,
-0.34795665740966797,
1.5907429456710815,
-0.24875445663928986,
-1.6076041460037231,
-1.5472900867462158,
0.8541264533996582,
0.45153024792671204,
-0.894660234451294,
0.05311998352408409,
-0.4467209279537201,
0.15713772177696228,
-0.032694004476070404,
1.1625760793685913,
1.1626222133636475,
0.7401416301727295,
-0.29817435145378113,
-0.8169314861297607,
0.19409088790416718,
-0.15159040689468384,
-0.6759672164916992,
-1.8296958208084106,
-0.3475243151187897,
0.2033294141292572,
0.614190936088562,
-1.2578803300857544,
1.75485098361969,
0.8751738667488098,
1.9718981981277466,
0.9665989279747009,
-0.3548811376094818,
1.5112379789352417,
-0.008136690594255924,
1.8728203773498535,
-0.5684640407562256,
0.6045168042182922,
-0.425064355134964,
-1.1534368991851807,
0.8106037378311157,
-0.3167289197444916,
-1.9943565130233765,
-0.8098698854446411,
-0.8306347727775574,
-0.17440415918827057,
-0.7273476719856262,
0.8111357092857361,
-0.3137461543083191,
-1.503515601158142,
0.11709243059158325,
-0.6884482502937317,
0.15802331268787384,
-1.280800223350525,
0.1754360944032669,
0.7278737425804138,
-0.7151383757591248,
-0.02990727126598358,
-0.2054762840270996,
-1.337889313697815,
-0.4842786490917206,
0.32742342352867126,
1.997084617614746,
-0.6299390196800232,
0.9660331010818481,
1.024472713470459,
-0.7600247859954834,
0.11439019441604614,
0.2980106770992279,
-0.27152132987976074,
0.7343901991844177,
-1.1112366914749146,
-0.410499632358551,
1.2215992212295532,
-0.20465095341205597,
-0.6958882212638855,
1.4206149578094482,
0.8613890409469604,
-1.092944622039795,
-0.19847925007343292,
-0.19904650747776031,
-0.7687166333198547,
-0.012545576319098473,
-1.482212781906128,
-0.182683065533638,
0.4154365360736847,
-1.3521801233291626,
-0.4954129159450531,
-0.26128876209259033,
1.2703365087509155,
-0.2226160317659378,
1.428490161895752,
-0.33634838461875916,
-0.24086503684520721,
-0.32756665349006653,
-0.47808223962783813,
0.15668530762195587,
-0.2472803145647049,
-0.599587619304657,
0.145677387714386,
-0.8162783980369568,
0.2451058179140091,
1.5239359140396118,
0.3534848093986511,
0.06177150085568428,
0.4585883319377899,
1.1050984859466553,
0.34654223918914795,
-0.02957138977944851,
-0.9405730366706848,
-1.513566255569458,
1.8868036270141602,
-1.4553278684616089,
1.9212437868118286,
0.7034422159194946,
-0.041213154792785645,
-1.815017819404602,
-1.858733892440796,
1.2802319526672363,
1.151625633239746,
2.425302267074585,
0.503720223903656,
0.38509002327919006,
-0.8061379194259644,
-0.7847371697425842,
0.2646598517894745,
-0.9809231758117676,
-0.6505264043807983,
0.21618227660655975,
2.403865337371826,
1.7946127653121948,
-0.600177526473999,
-0.2816137373447418,
-0.9135475754737854,
1.2814563512802124,
-0.3089860677719116,
0.2798733711242676,
2.0564239025115967,
-0.3715134263038635,
-0.9571367502212524,
1.2627445459365845,
-2.295288324356079,
0.2881808578968048,
2.058875799179077,
0.26810863614082336,
0.14481663703918457,
-1.4408103227615356,
-0.6398748159408569,
-0.3265109956264496,
-0.5185266137123108,
-1.2589603662490845,
0.5097185969352722,
-0.2894783318042755,
-0.8618670701980591,
-1.4262666702270508,
0.05085854232311249,
-1.088890552520752,
-1.7476862668991089,
0.21732033789157867,
1.9812830686569214,
2.061075448989868,
-0.7799578309059143,
1.4243239164352417,
-0.2503768503665924,
0.08072099089622498,
1.3006120920181274,
1.3480114936828613,
3.103131055831909,
1.8863067626953125,
-1.2462037801742554,
0.7492785453796387,
-0.19460944831371307,
-0.4857625365257263,
1.1852835416793823,
-1.061769723892212,
1.1350833177566528,
-0.25192761421203613,
-1.2574653625488281,
-1.2255074977874756,
1.100297212600708,
0.4994427263736725,
-0.007297489792108536,
-0.4912218153476715,
1.2252777814865112,
0.0461779423058033,
1.319625973701477,
0.6483840346336365,
-0.45492056012153625,
0.5860133171081543,
-0.29656386375427246,
-0.6270471811294556,
1.6229568719863892,
0.19322988390922546,
-1.4970331192016602,
-2.2889864444732666,
-0.31714338064193726,
-0.9955243468284607,
-0.0753462016582489,
-0.5673976540565491,
-1.0600162744522095,
1.6156688928604126,
0.4629979431629181,
-1.221534252166748,
-0.2108449786901474,
-0.27791303396224976,
-0.5247217416763306,
2.6335339546203613,
-1.2715007066726685,
-0.08431267738342285,
-0.9205021858215332,
-0.5467150211334229,
1.6602518558502197,
-1.171515941619873,
-0.18246768414974213,
-1.088300108909607,
-0.6771798133850098,
-1.3575828075408936,
-0.4608238935470581,
0.05210583284497261,
-0.9620200395584106,
0.8619344234466553,
0.15503577888011932,
-1.1931989192962646,
-0.23725402355194092,
-0.9583761096000671,
1.1239155530929565,
-0.1174665093421936,
0.18857915699481964,
1.8841615915298462,
0.377240389585495,
-0.4778514802455902,
0.7261242270469666,
1.2106508016586304,
0.6378922462463379,
-0.715262234210968,
0.129761204123497,
-0.7598199844360352,
0.28908565640449524,
-1.4557746648788452,
0.12833631038665771,
-2.9595515727996826,
0.7750399112701416,
-0.14651067554950714,
-0.1822892725467682,
-0.002469383180141449,
-1.3250741958618164,
1.0758275985717773,
2.570356607437134,
-1.1784536838531494,
0.4395624101161957,
0.4298208951950073,
1.2115769386291504,
-1.6400387287139893,
0.2266945242881775,
-0.4978509247303009,
2.017120122909546,
0.12330637872219086,
1.2011464834213257,
-0.46749383211135864,
-2.1876378059387207,
0.5964394807815552,
-1.2478011846542358,
-0.9893378615379333,
0.834031343460083,
-0.8978660106658936,
0.2791815996170044,
-1.4665324687957764,
-0.21034887433052063,
-0.9057681560516357,
-1.279701590538025,
0.8100151419639587,
0.09796856343746185,
0.42755720019340515,
-0.5679771900177002,
0.365699827671051,
-2.102353811264038,
-1.3730744123458862,
-0.17225751280784607,
-0.9527803063392639,
0.5430450439453125,
-0.3439722955226898,
0.6288623213768005,
-0.07698988914489746,
0.10427168011665344,
0.40557020902633667,
1.5174893140792847,
3.3698742389678955,
0.16785189509391785,
0.16723982989788055,
-0.06334497779607773,
-1.019234538078308,
1.3950167894363403,
0.9233927726745605,
-0.12481391429901123,
-0.5116183161735535,
-1.0513921976089478,
1.2621642351150513,
1.9877030849456787,
1.1303972005844116,
0.06528253853321075,
-0.8197407126426697,
-0.696825385093689,
0.03163318708539009,
0.2045992910861969,
0.48624148964881897,
0.9128395318984985,
-0.0010098312050104141,
0.11841550469398499,
1.3832287788391113,
1.1624407768249512,
-0.33923566341400146,
0.4293445348739624,
-0.986934244632721,
-0.44464799761772156,
0.5000173449516296,
0.1621961146593094,
0.07214951515197754,
0.3895856738090515,
-1.1319526433944702,
-0.27246975898742676,
-0.39371201395988464,
-0.8872426748275757,
-0.7104760408401489,
-0.4731554687023163,
-0.36620020866394043,
1.576501488685608,
0.09029752016067505,
-0.5439339280128479,
0.09801208972930908,
-0.6779306530952454,
-0.16192127764225006,
-1.1261848211288452,
0.156133770942688,
-0.17373605072498322,
-0.08315552771091461,
-0.14502733945846558,
1.646681547164917,
-0.9567371010780334,
-2.0783491134643555,
0.19739536941051483,
0.30987367033958435,
-0.2724846303462982,
0.1924668699502945,
1.7116507291793823,
0.5497892498970032,
1.356593370437622,
1.2649487257003784,
1.0338655710220337,
-0.5760492086410522,
-1.2106711864471436,
0.6810242533683777,
0.9045119285583496,
-1.227339267730713,
0.9931933283805847,
-0.1768040955066681,
-0.5351306200027466,
0.6795632839202881,
1.3212956190109253,
0.38360506296157837,
-2.0268912315368652,
0.8663377165794373,
-0.9283998012542725,
0.7190788984298706,
0.6759160757064819,
0.814922571182251,
0.2570943832397461,
0.9018617272377014,
-1.2328740358352661,
-1.1578959226608276,
-0.7097179889678955,
-0.5926401615142822,
1.841732144355774,
-0.1630442887544632,
0.5338910818099976,
-0.16156050562858582,
-1.1798304319381714,
-0.0876782089471817,
0.7897564768791199,
0.4431035816669464,
-0.47800278663635254,
0.8862232565879822,
-0.6089019179344177,
-0.9289359450340271,
-1.233856439590454,
-0.42860671877861023,
-1.1167867183685303,
-0.9068296551704407,
0.9975201487541199,
0.78831547498703,
0.5147148966789246,
1.8562724590301514,
0.646498441696167,
0.3292147219181061,
-2.6011016368865967,
0.8849490284919739,
0.22377075254917145,
-0.08843609690666199,
0.842789888381958,
0.3093007802963257,
1.1757375001907349,
-0.03812137991189957,
0.5952657461166382,
-2.2662718296051025,
2.232710361480713,
-0.20402675867080688,
0.5816640853881836,
0.03255288302898407,
-0.19720427691936493,
1.1346039772033691,
0.5348538756370544,
0.47674161195755005,
-1.1078463792800903,
0.6617706418037415,
-0.5006786584854126,
1.0398716926574707,
0.9003087282180786,
-0.9349832534790039,
0.07149896025657654,
1.4028301239013672,
0.5071430802345276,
-0.5029436349868774,
-1.002116322517395,
-0.8783296942710876,
1.0005470514297485,
1.6314947605133057,
-0.05158311501145363,
-0.04182871803641319,
0.9279657006263733,
0.6421461701393127,
-1.205835223197937,
0.14227961003780365,
-0.7272589206695557,
-0.6177215576171875,
1.6978079080581665,
2.010024070739746,
-0.13528791069984436,
-0.16315345466136932,
-0.7167949676513672,
-1.2142338752746582,
0.7378443479537964,
-0.032364603132009506,
0.018308887258172035,
0.7865921854972839,
-0.69428551197052,
1.1018526554107666,
0.6563771963119507,
0.967577338218689,
0.10746103525161743,
0.3576212525367737,
0.362380713224411,
-0.3875611424446106,
-1.224966049194336,
-0.27977946400642395,
-1.0914831161499023,
-2.536236524581909,
0.408473402261734,
-0.21084092557430267,
-1.4594826698303223,
0.03606457635760307,
-1.0626791715621948,
0.9566694498062134,
-0.6651203036308289,
-1.0825430154800415,
-1.4485121965408325,
0.37734442949295044,
-0.11078140139579773,
0.8889407515525818,
-1.6711390018463135,
-0.12879550457000732,
1.229153037071228,
0.8773834109306335,
-0.5916858911514282,
0.9858654737472534,
0.27227482199668884,
0.984927237033844,
0.7875298857688904,
-0.39738816022872925,
0.5557160973548889,
0.0006909742951393127,
-1.3779457807540894,
0.45369818806648254,
1.2131335735321045,
0.26444658637046814,
1.3646512031555176,
-0.46015870571136475,
0.09628525376319885,
0.46434181928634644,
-0.6310166120529175,
-0.5197024941444397,
-0.4099901020526886,
0.661861777305603,
0.027209173887968063,
-1.0300723314285278,
-0.12876848876476288,
-0.07090054452419281,
-0.26376309990882874,
0.26556557416915894,
-1.417832851409912,
-0.2771536111831665,
-0.3075507879257202,
-0.47078147530555725,
-1.3031666278839111,
0.0031613707542419434,
1.3084301948547363,
-0.748875081539154,
-0.27129724621772766,
0.474371075630188,
0.28938794136047363,
0.5615246295928955,
0.5566917657852173,
-0.7389459013938904,
-0.2173606902360916,
-0.3402106761932373,
-0.3344714343547821,
0.2321050614118576,
1.2852048873901367,
-0.15026889741420746,
-0.9657511115074158,
0.7151597738265991,
-0.31265172362327576,
0.2110338658094406,
1.985632061958313,
0.07294224202632904,
-0.7824119329452515,
0.3219415545463562,
-0.7642931342124939,
1.811606764793396,
1.7896393537521362,
1.294469952583313,
-0.11050832271575928,
-0.8005177974700928,
0.475759357213974,
-0.30404484272003174,
-0.37062862515449524,
0.9135594367980957,
0.364343523979187,
-0.24675126373767853,
-1.3628257513046265,
0.7095314860343933,
1.3828012943267822,
-0.8009876012802124,
-0.7983874678611755,
0.15369726717472076,
-0.8962951898574829,
1.1392217874526978,
0.6085445284843445,
0.31895366311073303,
0.21553431451320648,
1.488890528678894,
0.7341604828834534,
-0.4565544128417969,
0.5210294127464294,
0.5142683386802673,
-0.16026082634925842,
-2.161252737045288,
-1.1108778715133667,
0.3176038861274719,
-0.42274656891822815,
-1.590906023979187,
1.395770788192749,
-1.163853406906128,
-1.0067775249481201,
0.6082479953765869,
0.1886349320411682,
1.3415058851242065,
0.36790159344673157,
1.6565555334091187,
2.1155683994293213,
0.8741971850395203,
0.3941074013710022,
1.2474771738052368,
-0.04832456633448601,
-0.4200041592121124,
1.8823703527450562,
-0.4329417645931244,
0.4935847222805023,
0.9578750729560852,
-0.3474598228931427,
-1.1418253183364868,
-0.8326255679130554,
-1.1625388860702515,
-0.6430130004882812,
1.1469942331314087,
0.13305622339248657,
-1.0727312564849854,
0.20384976267814636,
1.6250591278076172,
0.058875132352113724,
-0.302615761756897,
0.7645567655563354,
0.3750050365924835,
-0.7278218269348145,
-0.021350357681512833,
-0.9008589386940002,
0.48893558979034424,
-0.1184130609035492,
-0.26560235023498535,
0.3126258850097656,
0.5500884652137756,
1.3256218433380127,
-0.003189222887158394,
0.1416371911764145,
1.1566886901855469,
-1.347999095916748,
1.526092767715454,
-0.6398254036903381,
0.31276047229766846,
-2.4649720191955566,
1.422802209854126,
-0.7851552367210388,
1.8467307090759277,
-2.5639302730560303,
0.4611625373363495,
-0.527396023273468,
-0.5075696706771851,
0.1994372457265854,
-0.4409886598587036,
0.09283256530761719,
-0.05905658379197121,
-1.0243110656738281,
0.06048436835408211,
-0.7510024309158325,
0.5847182273864746,
1.1893407106399536,
1.4489871263504028,
-1.1806763410568237,
-0.3150169849395752,
-1.7567684650421143,
-0.13197225332260132,
-0.7498204112052917,
0.38129159808158875,
-1.9809328317642212,
-0.18560828268527985,
-1.888770580291748,
-2.3949410915374756,
-1.390547275543213,
-0.8865901827812195,
1.0556658506393433,
0.23452375829219818,
-0.9300218820571899,
1.2308076620101929,
-0.33464398980140686,
-1.829681158065796,
1.1283916234970093,
-2.227095365524292
] |
https://github.com/huggingface/datasets/issues/3329 | Map function: Type error on iter #999 | Hi, thanks for reporting.
It would be really helpful if you could provide the actual code of the `text_numbers_to_int` function so we can reproduce the error. | ## Describe the bug
Using the map function, it throws a type error on iter #999
Here is the code I am calling:
```
dataset = datasets.load_dataset('squad')
dataset['validation'].map(text_numbers_to_int, input_columns=['context'], fn_kwargs={'column': 'context'})
```
text_numbers_to_int returns the input text with numbers replaced in the format {'context': text}
It happens at
`
File "C:\Users\lonek\anaconda3\envs\ai\Lib\site-packages\datasets\arrow_writer.py", line 289, in <listcomp>
[row[0][col] for row in self.current_examples], type=col_type, try_type=col_try_type, col=col
`
The issue is that the list comprehension expects self.current_examples to be type tuple(dict, str), but for some reason 26 out of 1000 of the sefl.current_examples are type tuple(str, str)
Here is an example of what self.current_examples should be
({'context': 'Super Bowl 50 was an...merals 50.'}, '')
Here is an example of what self.current_examples are when it throws the error:
('The Panthers used th... Marriott.', '')
| 1,090 | 26 | Map function: Type error on iter #999
## Describe the bug
Using the map function, it throws a type error on iter #999
Here is the code I am calling:
```
dataset = datasets.load_dataset('squad')
dataset['validation'].map(text_numbers_to_int, input_columns=['context'], fn_kwargs={'column': 'context'})
```
text_numbers_to_int returns the input text with numbers replaced in the format {'context': text}
It happens at
`
File "C:\Users\lonek\anaconda3\envs\ai\Lib\site-packages\datasets\arrow_writer.py", line 289, in <listcomp>
[row[0][col] for row in self.current_examples], type=col_type, try_type=col_try_type, col=col
`
The issue is that the list comprehension expects self.current_examples to be type tuple(dict, str), but for some reason 26 out of 1000 of the sefl.current_examples are type tuple(str, str)
Here is an example of what self.current_examples should be
({'context': 'Super Bowl 50 was an...merals 50.'}, '')
Here is an example of what self.current_examples are when it throws the error:
('The Panthers used th... Marriott.', '')
Hi, thanks for reporting.
It would be really helpful if you could provide the actual code of the `text_numbers_to_int` function so we can reproduce the error. | [
-1.2847568988800049,
-1.0057660341262817,
-0.750236988067627,
1.613171100616455,
-0.17740100622177124,
-1.21491277217865,
0.10913360863924026,
-0.9710617065429688,
1.6739219427108765,
-0.8077467083930969,
0.32657092809677124,
-1.6434239149093628,
0.02895844541490078,
-0.670271635055542,
-0.6891757845878601,
-0.9089391827583313,
-0.39004355669021606,
-0.7993251085281372,
1.1155556440353394,
2.5140621662139893,
1.2470709085464478,
-1.473342776298523,
2.6847593784332275,
0.6771829724311829,
-0.16148972511291504,
-1.0821738243103027,
0.5839211940765381,
-0.11254704743623734,
-1.18988835811615,
-0.5242066979408264,
-0.947547435760498,
-0.012497744522988796,
-0.6540771722793579,
-0.49916958808898926,
-0.04859989136457443,
0.42724746465682983,
-0.28142473101615906,
-0.4017631709575653,
-0.5367146730422974,
-0.8622925281524658,
0.4311623275279999,
-0.46954789757728577,
0.9203068017959595,
-0.29437679052352905,
1.8046542406082153,
-0.4331682026386261,
0.4117312729358673,
0.7152484655380249,
1.4139331579208374,
0.19954156875610352,
0.025719447061419487,
0.3042803406715393,
0.3447185158729553,
-0.0684739276766777,
0.552239716053009,
1.1125850677490234,
0.6596704125404358,
0.43101879954338074,
0.7451573014259338,
-2.330289602279663,
1.3519841432571411,
-1.0998189449310303,
0.2934289574623108,
1.3881886005401611,
-0.8896149396896362,
0.37339499592781067,
-1.7424730062484741,
-0.039202891290187836,
0.6256831884384155,
-2.2303454875946045,
0.25874507427215576,
-1.2750394344329834,
-0.4404238760471344,
0.9675344824790955,
0.3246195316314697,
-1.2679147720336914,
0.17104250192642212,
-0.4082472622394562,
1.0588314533233643,
0.39762282371520996,
1.0068739652633667,
-1.8093725442886353,
0.06573168933391571,
-0.31478947401046753,
0.1592354029417038,
-1.2879961729049683,
-1.5707387924194336,
0.5490084886550903,
0.614288330078125,
0.5709747076034546,
-0.05691111832857132,
1.0211036205291748,
-1.113464593887329,
0.8147791028022766,
-1.0480695962905884,
-1.6692100763320923,
-1.434475064277649,
-2.322972536087036,
-2.284121036529541,
0.6605415940284729,
-0.46165239810943604,
-0.4839767515659332,
2.09379243850708,
-0.9559075236320496,
-1.6649565696716309,
1.2027488946914673,
0.2807298004627228,
0.04253288358449936,
2.476412296295166,
0.13495907187461853,
-0.7754112482070923,
0.44598275423049927,
-0.8126863837242126,
0.7983282804489136,
-0.3124999403953552,
1.3878298997879028,
0.44242995977401733,
-1.0173128843307495,
1.6494141817092896,
-0.3814399838447571,
0.5210351943969727,
-0.623551607131958,
-0.5539403557777405,
-0.6703254580497742,
0.2718912661075592,
1.848997712135315,
-0.26998621225357056,
1.4748395681381226,
-0.3672005832195282,
-1.4656717777252197,
-1.5625312328338623,
0.9812241792678833,
0.3712167739868164,
-0.8805291056632996,
0.10653138905763626,
-0.3439810872077942,
0.19027775526046753,
-0.14673443138599396,
1.2061997652053833,
1.2799545526504517,
0.6263705492019653,
-0.3551446497440338,
-0.9102662205696106,
0.16902706027030945,
-0.09007017314434052,
-0.7138962745666504,
-1.7786065340042114,
-0.38522109389305115,
0.04731634259223938,
0.7364162802696228,
-1.2432539463043213,
1.6934304237365723,
0.9338990449905396,
1.932888150215149,
1.0671846866607666,
-0.39110422134399414,
1.4713550806045532,
0.06514475494623184,
1.7982314825057983,
-0.6425409913063049,
0.6704030632972717,
-0.4397440254688263,
-1.153568983078003,
0.8719942569732666,
-0.24304695427417755,
-1.9281597137451172,
-0.813752293586731,
-0.7711562514305115,
-0.22110332548618317,
-0.7663916945457458,
0.891970694065094,
-0.3657749891281128,
-1.4444128274917603,
0.2513843774795532,
-0.7107766270637512,
0.15696457028388977,
-1.1827906370162964,
0.336088091135025,
0.714302122592926,
-0.5981424450874329,
0.18915997445583344,
-0.2603752911090851,
-1.2835570573806763,
-0.519936740398407,
0.3577355146408081,
1.9391748905181885,
-0.7012526988983154,
0.8111266493797302,
1.0060027837753296,
-0.6490321755409241,
0.007636860013008118,
0.2159980684518814,
-0.25711822509765625,
0.8095647692680359,
-0.9773126840591431,
-0.6755379438400269,
1.1853266954421997,
-0.26089775562286377,
-0.6891651749610901,
1.502629280090332,
0.7046175599098206,
-1.0054126977920532,
-0.22660459578037262,
-0.24783244729042053,
-0.9083762764930725,
0.1424548476934433,
-1.5963647365570068,
-0.21639104187488556,
0.46829819679260254,
-1.6545454263687134,
-0.46613168716430664,
-0.1484041064977646,
1.3627101182937622,
-0.16385239362716675,
1.4399865865707397,
-0.36179378628730774,
-0.15665152668952942,
-0.24875417351722717,
-0.3973558247089386,
0.17621523141860962,
-0.16585595905780792,
-0.6033305525779724,
0.1355256289243698,
-0.8920526504516602,
0.36781132221221924,
1.4321008920669556,
0.3710056245326996,
-0.011375665664672852,
0.393338680267334,
1.1641926765441895,
0.3893818259239197,
0.05673100799322128,
-0.8891884088516235,
-1.4306774139404297,
2.0186965465545654,
-1.4624412059783936,
2.086277484893799,
0.7231509685516357,
-0.04854802042245865,
-1.7007650136947632,
-1.7251026630401611,
1.3175257444381714,
1.155311942100525,
2.1667635440826416,
0.579971432685852,
0.38086551427841187,
-0.8592175841331482,
-0.6035370826721191,
0.3421161472797394,
-1.0373835563659668,
-0.7218427062034607,
0.14596910774707794,
2.385188102722168,
1.7817249298095703,
-0.42812615633010864,
-0.14053559303283691,
-0.9722076654434204,
1.4354692697525024,
-0.21149684488773346,
0.26626354455947876,
1.9715509414672852,
-0.24759386479854584,
-1.087235689163208,
1.2664583921432495,
-2.410513401031494,
0.19982212781906128,
2.0917704105377197,
0.29466092586517334,
0.15608856081962585,
-1.355183720588684,
-0.6645189523696899,
-0.3074442744255066,
-0.33719632029533386,
-1.2906535863876343,
0.5666936039924622,
-0.3042113482952118,
-0.8020561933517456,
-1.4470754861831665,
0.20095767080783844,
-1.1002247333526611,
-1.661482334136963,
0.23294466733932495,
1.935854196548462,
2.071596145629883,
-0.7164187431335449,
1.6395198106765747,
-0.25948482751846313,
0.2042376846075058,
1.1998627185821533,
1.2535816431045532,
2.992568254470825,
1.940915584564209,
-1.189226508140564,
0.562255322933197,
-0.16177459061145782,
-0.45634615421295166,
1.1274250745773315,
-1.1914137601852417,
1.2658183574676514,
-0.13068455457687378,
-1.1629451513290405,
-1.2181663513183594,
1.0126382112503052,
0.5011270642280579,
-0.09551652520895004,
-0.4820019006729126,
1.2970227003097534,
-0.008640174753963947,
1.313682198524475,
0.5286747217178345,
-0.34820833802223206,
0.5011650919914246,
-0.43365538120269775,
-0.607999324798584,
1.5876234769821167,
0.12664654850959778,
-1.4728859663009644,
-2.2403340339660645,
-0.23041251301765442,
-0.6471832394599915,
0.06839846819639206,
-0.6347991824150085,
-1.0148392915725708,
1.6645889282226562,
0.3141076862812042,
-1.2860438823699951,
-0.27251407504081726,
-0.4415667951107025,
-0.5502169728279114,
2.7259669303894043,
-1.3319220542907715,
-0.2333705574274063,
-0.9952608942985535,
-0.6722829937934875,
1.6199569702148438,
-1.2329503297805786,
-0.10713662952184677,
-1.0255626440048218,
-0.5952791571617126,
-1.279640793800354,
-0.5230719447135925,
-0.04334042966365814,
-0.920749306678772,
0.8223021626472473,
0.240629643201828,
-1.224615454673767,
-0.4521785378456116,
-0.8765085339546204,
0.861979603767395,
-0.1521390825510025,
0.24749988317489624,
1.8689839839935303,
0.3768894076347351,
-0.36879101395606995,
0.811976969242096,
1.1586852073669434,
0.6653668284416199,
-0.5645614862442017,
0.1648286134004593,
-0.48034563660621643,
0.4636751115322113,
-1.210792899131775,
0.2598981261253357,
-2.853494167327881,
0.6714410185813904,
-0.004542092327028513,
-0.027079423889517784,
0.041499264538288116,
-1.2658007144927979,
1.1664533615112305,
2.5641777515411377,
-1.2906033992767334,
0.4908057153224945,
0.3709646761417389,
1.1618493795394897,
-1.6790831089019775,
0.3197218179702759,
-0.394416868686676,
2.1582348346710205,
0.1569538116455078,
1.1694955825805664,
-0.5168046951293945,
-2.419950485229492,
0.5390878319740295,
-1.245727300643921,
-1.1771023273468018,
0.7188921570777893,
-0.944480299949646,
0.11452747136354446,
-1.5211374759674072,
-0.2747708559036255,
-0.9631096124649048,
-1.1618651151657104,
0.7556328773498535,
0.23163115978240967,
0.38598260283470154,
-0.6667475700378418,
0.34340643882751465,
-2.162855386734009,
-1.4124778509140015,
-0.19555160403251648,
-0.940643310546875,
0.5540202260017395,
-0.44536101818084717,
0.6481281518936157,
-0.1554015725851059,
0.025313640013337135,
0.27642884850502014,
1.469740629196167,
3.4816243648529053,
0.206983745098114,
0.3370293974876404,
-0.2493867576122284,
-0.9041776061058044,
1.429174780845642,
0.981521725654602,
-0.15989261865615845,
-0.4502032995223999,
-1.0451080799102783,
1.3208616971969604,
2.0178768634796143,
0.8180656433105469,
-0.00031978730112314224,
-0.7788304090499878,
-0.6371867656707764,
-0.09314289689064026,
0.2199038714170456,
0.5133473873138428,
0.8375515341758728,
0.021118590608239174,
0.08188644051551819,
1.4372954368591309,
1.1699293851852417,
-0.44819241762161255,
0.25308722257614136,
-0.8418542146682739,
-0.421003133058548,
0.49114587903022766,
0.21197155117988586,
-0.13325443863868713,
0.39403313398361206,
-0.8645781874656677,
-0.23380810022354126,
-0.3963531255722046,
-0.8539896011352539,
-0.6660958528518677,
-0.3666645586490631,
-0.354722797870636,
1.6161010265350342,
0.21538928151130676,
-0.5871636271476746,
-0.003335520625114441,
-0.7663878202438354,
-0.16740868985652924,
-1.017194390296936,
0.2105187326669693,
-0.1261466145515442,
-0.15179000794887543,
-0.24851685762405396,
1.7994812726974487,
-0.9167936444282532,
-2.1189098358154297,
0.1714751124382019,
0.28376802802085876,
-0.17708276212215424,
0.2919138967990875,
1.6632063388824463,
0.4872233271598816,
1.4405546188354492,
1.3812499046325684,
0.8937095999717712,
-0.6992520689964294,
-1.3607655763626099,
0.6303676962852478,
0.9919357299804688,
-1.4382108449935913,
0.839415967464447,
-0.0395965650677681,
-0.46026766300201416,
0.6715786457061768,
1.3437432050704956,
0.5634923577308655,
-2.0082364082336426,
0.8426728844642639,
-1.0790680646896362,
0.9115286469459534,
0.7570915222167969,
0.7017524838447571,
0.24585804343223572,
0.7815722227096558,
-1.1584032773971558,
-1.16411292552948,
-0.7305719256401062,
-0.7387242317199707,
1.9246214628219604,
-0.3384128510951996,
0.5920990109443665,
-0.019199086353182793,
-1.302805781364441,
-0.16269779205322266,
0.6761178970336914,
0.39338403940200806,
-0.4281030297279358,
0.8825069069862366,
-0.6986554861068726,
-1.1018376350402832,
-1.3490238189697266,
-0.4829288423061371,
-1.0466059446334839,
-1.0710158348083496,
1.0330758094787598,
0.7691464424133301,
0.28217899799346924,
1.8870365619659424,
0.5387933850288391,
0.15730710327625275,
-2.520160675048828,
0.8986483812332153,
0.3833099603652954,
-0.16463805735111237,
0.88514244556427,
0.3985510766506195,
1.014285683631897,
0.0392773300409317,
0.5308322906494141,
-2.348224401473999,
2.2536470890045166,
-0.20112848281860352,
0.789851725101471,
-0.08985055983066559,
-0.11959841847419739,
1.0491737127304077,
0.5457878708839417,
0.5443170070648193,
-1.0175325870513916,
0.6902914047241211,
-0.5322583317756653,
1.2922240495681763,
1.0215094089508057,
-0.7257992625236511,
-0.09433065354824066,
1.3821340799331665,
0.4722464680671692,
-0.6599185466766357,
-0.9391051530838013,
-0.879220187664032,
0.8384904861450195,
1.7140780687332153,
-0.08961670845746994,
-0.07823579758405685,
0.7402074337005615,
0.6358466148376465,
-1.2080658674240112,
0.02463625930249691,
-0.715878963470459,
-0.786162793636322,
1.652035117149353,
2.0624866485595703,
-0.2536560297012329,
-0.20905771851539612,
-0.6236304640769958,
-1.2127312421798706,
0.668726921081543,
-0.06541088968515396,
0.06734764575958252,
0.6713118553161621,
-0.6597259640693665,
0.9991322755813599,
0.8001260161399841,
0.8964770436286926,
0.11821835488080978,
0.32426565885543823,
0.3871355354785919,
-0.324587881565094,
-1.1598904132843018,
-0.23140569031238556,
-1.2074244022369385,
-2.6083366870880127,
0.3670654296875,
-0.1955537050962448,
-1.3703848123550415,
-0.017081446945667267,
-0.9841698408126831,
0.994836688041687,
-0.48008522391319275,
-1.1548008918762207,
-1.4071866273880005,
0.16959033906459808,
0.03881368041038513,
0.8766605257987976,
-1.6914777755737305,
-0.12811435759067535,
1.2851861715316772,
0.9194309711456299,
-0.7261563539505005,
1.0784070491790771,
0.3030964136123657,
1.1117162704467773,
0.754676878452301,
-0.3588142693042755,
0.6202717423439026,
-0.0596284419298172,
-1.3645833730697632,
0.5622158050537109,
1.0940632820129395,
0.092588409781456,
1.487628698348999,
-0.44256335496902466,
-0.05399360507726669,
0.3756997585296631,
-0.5671977996826172,
-0.38351958990097046,
-0.46124446392059326,
0.7177131772041321,
0.04766138643026352,
-0.84521484375,
0.009808091446757317,
-0.13499362766742706,
-0.26659879088401794,
0.12281673401594162,
-1.541924238204956,
-0.19551944732666016,
-0.44389814138412476,
-0.5099663138389587,
-1.3672823905944824,
-0.09112714976072311,
1.4711928367614746,
-0.6969131231307983,
-0.24847283959388733,
0.5186361074447632,
0.4966248571872711,
0.547770082950592,
0.6905536651611328,
-0.6598278880119324,
-0.46032777428627014,
-0.2740369737148285,
-0.320347398519516,
0.3444659411907196,
1.3154109716415405,
-0.14252226054668427,
-1.0245600938796997,
0.7360839247703552,
-0.3603004217147827,
0.04729022830724716,
1.8829166889190674,
0.03312046825885773,
-0.7659837603569031,
0.28080666065216064,
-0.7559764385223389,
1.9224259853363037,
1.656411051750183,
1.2617870569229126,
-0.2606237828731537,
-0.9276217222213745,
0.7587112784385681,
-0.4348391890525818,
-0.3708016872406006,
0.7607592940330505,
0.4299333095550537,
-0.20211827754974365,
-1.381000280380249,
0.6867995858192444,
1.1731600761413574,
-0.781858503818512,
-0.806668221950531,
0.18269695341587067,
-0.7102426290512085,
1.0711441040039062,
0.5854015350341797,
0.36821457743644714,
0.2583884298801422,
1.737860083580017,
0.7674838900566101,
-0.46690720319747925,
0.5191273093223572,
0.5935768485069275,
-0.26684874296188354,
-2.098263740539551,
-1.203368067741394,
0.2726501226425171,
-0.5466116666793823,
-1.6521884202957153,
1.3843073844909668,
-1.126214861869812,
-0.9852790236473083,
0.565230131149292,
0.034516796469688416,
1.3131898641586304,
0.34198522567749023,
1.4876768589019775,
2.0175325870513916,
0.7862933874130249,
0.5117126703262329,
1.3625578880310059,
-0.16638904809951782,
-0.4871825873851776,
1.8573631048202515,
-0.4591832160949707,
0.4234698712825775,
1.1596016883850098,
-0.29333797097206116,
-1.0367122888565063,
-0.7476852536201477,
-1.2613369226455688,
-0.6402224898338318,
1.1413817405700684,
0.07800490409135818,
-1.0945569276809692,
0.2286190390586853,
1.5366216897964478,
0.09965522587299347,
-0.41014304757118225,
0.5513743758201599,
0.44798535108566284,
-0.772626519203186,
-0.051973894238471985,
-0.883385419845581,
0.563206672668457,
-0.26585766673088074,
-0.28260523080825806,
0.3655368685722351,
0.35470840334892273,
1.4163256883621216,
-0.08024013042449951,
0.2206658273935318,
1.1040245294570923,
-1.4003583192825317,
1.410470724105835,
-0.5803036093711853,
0.30276328325271606,
-2.346761465072632,
1.3003360033035278,
-0.6971337199211121,
2.0058846473693848,
-2.6779062747955322,
0.4694466292858124,
-0.625028669834137,
-0.40441977977752686,
0.3264878988265991,
-0.2752014994621277,
0.09904918074607849,
-0.12128555029630661,
-1.0065540075302124,
0.04860677570104599,
-0.572148323059082,
0.5315164923667908,
1.100195050239563,
1.3215124607086182,
-1.0395939350128174,
-0.2364082783460617,
-1.6835486888885498,
-0.12860479950904846,
-0.7419950366020203,
0.3147863447666168,
-2.0838797092437744,
-0.23883351683616638,
-1.9128808975219727,
-2.3313076496124268,
-1.2332061529159546,
-0.6961625814437866,
1.0594396591186523,
0.1513347178697586,
-0.8134849071502686,
1.3545869588851929,
-0.25884827971458435,
-1.7982113361358643,
1.0527547597885132,
-2.057772159576416
] |
https://github.com/huggingface/datasets/issues/3329 | Map function: Type error on iter #999 | ```
def text_numbers_to_int(text, column=""):
"""
Convert text numbers to int.
:param text: text numbers
:return: int
"""
try:
numbers = find_numbers(text)
if not numbers:
return text
result = ""
i, j = 0, 0
while i < len(text):
if j < len(numbers) and i == numbers[j][1]:
n = int(numbers[j][0]) if numbers[j][0] % 1 == 0 else float(numbers[j][0])
result += str(n)
i = numbers[j][2] #end
j += 1
else:
result += text[i]
i += 1
if column:
return{column: result}
else:
return {column: result}
except Exception as e:
print(e)
return {column: result}
``` | ## Describe the bug
Using the map function, it throws a type error on iter #999
Here is the code I am calling:
```
dataset = datasets.load_dataset('squad')
dataset['validation'].map(text_numbers_to_int, input_columns=['context'], fn_kwargs={'column': 'context'})
```
text_numbers_to_int returns the input text with numbers replaced in the format {'context': text}
It happens at
`
File "C:\Users\lonek\anaconda3\envs\ai\Lib\site-packages\datasets\arrow_writer.py", line 289, in <listcomp>
[row[0][col] for row in self.current_examples], type=col_type, try_type=col_try_type, col=col
`
The issue is that the list comprehension expects self.current_examples to be type tuple(dict, str), but for some reason 26 out of 1000 of the sefl.current_examples are type tuple(str, str)
Here is an example of what self.current_examples should be
({'context': 'Super Bowl 50 was an...merals 50.'}, '')
Here is an example of what self.current_examples are when it throws the error:
('The Panthers used th... Marriott.', '')
| 1,090 | 91 | Map function: Type error on iter #999
## Describe the bug
Using the map function, it throws a type error on iter #999
Here is the code I am calling:
```
dataset = datasets.load_dataset('squad')
dataset['validation'].map(text_numbers_to_int, input_columns=['context'], fn_kwargs={'column': 'context'})
```
text_numbers_to_int returns the input text with numbers replaced in the format {'context': text}
It happens at
`
File "C:\Users\lonek\anaconda3\envs\ai\Lib\site-packages\datasets\arrow_writer.py", line 289, in <listcomp>
[row[0][col] for row in self.current_examples], type=col_type, try_type=col_try_type, col=col
`
The issue is that the list comprehension expects self.current_examples to be type tuple(dict, str), but for some reason 26 out of 1000 of the sefl.current_examples are type tuple(str, str)
Here is an example of what self.current_examples should be
({'context': 'Super Bowl 50 was an...merals 50.'}, '')
Here is an example of what self.current_examples are when it throws the error:
('The Panthers used th... Marriott.', '')
```
def text_numbers_to_int(text, column=""):
"""
Convert text numbers to int.
:param text: text numbers
:return: int
"""
try:
numbers = find_numbers(text)
if not numbers:
return text
result = ""
i, j = 0, 0
while i < len(text):
if j < len(numbers) and i == numbers[j][1]:
n = int(numbers[j][0]) if numbers[j][0] % 1 == 0 else float(numbers[j][0])
result += str(n)
i = numbers[j][2] #end
j += 1
else:
result += text[i]
i += 1
if column:
return{column: result}
else:
return {column: result}
except Exception as e:
print(e)
return {column: result}
``` | [
-1.3054699897766113,
-0.9714396595954895,
-0.7887095808982849,
1.630614161491394,
-0.20985323190689087,
-1.1380259990692139,
0.12140676379203796,
-1.0323113203048706,
1.6485674381256104,
-0.758486270904541,
0.39554256200790405,
-1.6209640502929688,
0.023909058421850204,
-0.6168696284294128,
-0.6886455416679382,
-0.8646673560142517,
-0.4101455509662628,
-0.7670431733131409,
1.147743821144104,
2.4818060398101807,
1.3245549201965332,
-1.4844636917114258,
2.721742868423462,
0.7627996206283569,
-0.1610976606607437,
-1.062157154083252,
0.6222972869873047,
-0.07122642546892166,
-1.2037113904953003,
-0.463783323764801,
-0.9778814911842346,
-0.036985740065574646,
-0.6324782371520996,
-0.49956658482551575,
-0.1050352230668068,
0.3893069326877594,
-0.26729118824005127,
-0.4272622764110565,
-0.5548331141471863,
-0.8372615575790405,
0.4545290470123291,
-0.4654444754123688,
0.9147063493728638,
-0.2758044898509979,
1.7531665563583374,
-0.46529635787010193,
0.3319413363933563,
0.7284679412841797,
1.3991109132766724,
0.17385198175907135,
0.052933163940906525,
0.3921920955181122,
0.3926173150539398,
-0.11602617800235748,
0.622315526008606,
1.1995848417282104,
0.6967149972915649,
0.4154385030269623,
0.8640573024749756,
-2.238211154937744,
1.2814868688583374,
-1.081660270690918,
0.32617464661598206,
1.3173818588256836,
-0.8706451058387756,
0.40315887331962585,
-1.7380794286727905,
-0.0642293244600296,
0.6607521772384644,
-2.2164478302001953,
0.3062429130077362,
-1.283649206161499,
-0.5259265899658203,
0.950529932975769,
0.3099570572376251,
-1.277950644493103,
0.12966927886009216,
-0.49930158257484436,
1.0422413349151611,
0.32412606477737427,
1.031755805015564,
-1.7753633260726929,
0.07134454697370529,
-0.3947207033634186,
0.20539778470993042,
-1.2818472385406494,
-1.5673094987869263,
0.576727032661438,
0.6253412365913391,
0.5677279233932495,
-0.1226256862282753,
1.1040244102478027,
-1.178955316543579,
0.8361225724220276,
-1.051915168762207,
-1.7379101514816284,
-1.498558759689331,
-2.2761733531951904,
-2.1505544185638428,
0.6201622486114502,
-0.4687914550304413,
-0.5195844173431396,
2.0653159618377686,
-0.9349706768989563,
-1.646371841430664,
1.1762269735336304,
0.3145520091056824,
0.048482079058885574,
2.468026876449585,
0.12255862355232239,
-0.782624363899231,
0.49479150772094727,
-0.8017330765724182,
0.8215204477310181,
-0.24399589002132416,
1.2976552248001099,
0.38655680418014526,
-0.9398111701011658,
1.6725355386734009,
-0.35516849160194397,
0.5803367495536804,
-0.6511873602867126,
-0.5483590960502625,
-0.6850014328956604,
0.24297191202640533,
1.8940845727920532,
-0.32397863268852234,
1.4253708124160767,
-0.33407294750213623,
-1.4704325199127197,
-1.590527057647705,
0.9461502432823181,
0.41757097840309143,
-0.8454234004020691,
0.12705424427986145,
-0.36789774894714355,
0.1729852706193924,
-0.14304175972938538,
1.1728051900863647,
1.2905844449996948,
0.6287188529968262,
-0.309274286031723,
-0.8972185254096985,
0.12390266358852386,
-0.03208822384476662,
-0.8154548406600952,
-1.8097983598709106,
-0.38477954268455505,
0.03763529285788536,
0.733788251876831,
-1.2052333354949951,
1.6745206117630005,
0.9459475874900818,
1.924824833869934,
1.0973833799362183,
-0.4124162793159485,
1.5214420557022095,
0.057946301996707916,
1.6971218585968018,
-0.6531116962432861,
0.6720657348632812,
-0.4482927918434143,
-1.1757981777191162,
0.8811992406845093,
-0.24496497213840485,
-1.9987797737121582,
-0.8045700192451477,
-0.6359861493110657,
-0.21499671041965485,
-0.7974433898925781,
0.9343688488006592,
-0.39853358268737793,
-1.4689722061157227,
0.21674223244190216,
-0.7348739504814148,
0.10336542874574661,
-1.1537377834320068,
0.30510908365249634,
0.662326991558075,
-0.589297890663147,
0.1962103247642517,
-0.1933692991733551,
-1.2053745985031128,
-0.511146068572998,
0.29931381344795227,
1.909737229347229,
-0.7563494443893433,
0.8257919549942017,
1.0231266021728516,
-0.6857626438140869,
0.018568716943264008,
0.24009324610233307,
-0.2596241533756256,
0.8475264310836792,
-0.9784775376319885,
-0.7034467458724976,
1.164272665977478,
-0.16478842496871948,
-0.6770308017730713,
1.5182554721832275,
0.6894233226776123,
-0.9736836552619934,
-0.2734505832195282,
-0.18812602758407593,
-0.9001919031143188,
0.14225640892982483,
-1.5658665895462036,
-0.23118895292282104,
0.48178336024284363,
-1.6226122379302979,
-0.517909824848175,
-0.192280575633049,
1.296601414680481,
-0.20698609948158264,
1.467711329460144,
-0.33776068687438965,
-0.14660006761550903,
-0.19535107910633087,
-0.32560163736343384,
0.132416233420372,
-0.164409801363945,
-0.636958122253418,
0.1097775250673294,
-0.8791981339454651,
0.37442004680633545,
1.4193952083587646,
0.38080310821533203,
0.022492416203022003,
0.3604329228401184,
1.1898374557495117,
0.42859241366386414,
0.016615793108940125,
-0.9317053556442261,
-1.4131617546081543,
1.974241852760315,
-1.4628998041152954,
2.121112108230591,
0.7888497710227966,
-0.04685044288635254,
-1.7297353744506836,
-1.7803555727005005,
1.3512935638427734,
1.2239094972610474,
2.2106077671051025,
0.5994539260864258,
0.37730562686920166,
-0.8695515990257263,
-0.6454452872276306,
0.32991325855255127,
-1.056384801864624,
-0.7401455640792847,
0.13466224074363708,
2.3845841884613037,
1.8307281732559204,
-0.42062634229660034,
-0.15700316429138184,
-0.9660050272941589,
1.460084080696106,
-0.21190816164016724,
0.23584410548210144,
1.9458506107330322,
-0.22340360283851624,
-1.0451164245605469,
1.2749557495117188,
-2.3920133113861084,
0.149481400847435,
2.0687482357025146,
0.2927188277244568,
0.1945101022720337,
-1.3450291156768799,
-0.6458860039710999,
-0.33756184577941895,
-0.4035682678222656,
-1.2953190803527832,
0.5362656712532043,
-0.3015458285808563,
-0.8449051976203918,
-1.4053012132644653,
0.19666911661624908,
-1.128665804862976,
-1.5903486013412476,
0.23866431415081024,
1.9400383234024048,
2.0583178997039795,
-0.7665724754333496,
1.6694879531860352,
-0.3248152732849121,
0.1773301512002945,
1.1685134172439575,
1.328050136566162,
3.013941526412964,
1.9153462648391724,
-1.212414026260376,
0.5614063739776611,
-0.21187466382980347,
-0.4547180235385895,
1.1310361623764038,
-1.2244513034820557,
1.3098496198654175,
-0.0973321944475174,
-1.169262170791626,
-1.144508957862854,
1.012366771697998,
0.47469761967658997,
-0.08162492513656616,
-0.48861268162727356,
1.2709420919418335,
0.029997069388628006,
1.2635605335235596,
0.5738601088523865,
-0.3073669970035553,
0.5357676148414612,
-0.39121487736701965,
-0.47159886360168457,
1.58086097240448,
0.08828188478946686,
-1.4326677322387695,
-2.2670328617095947,
-0.16681070625782013,
-0.6655858159065247,
0.15676504373550415,
-0.6343957185745239,
-1.1279168128967285,
1.6957921981811523,
0.23444874584674835,
-1.3272972106933594,
-0.25067681074142456,
-0.44677963852882385,
-0.5362408757209778,
2.671379327774048,
-1.3106361627578735,
-0.2680228352546692,
-1.0018892288208008,
-0.6679590940475464,
1.6349533796310425,
-1.1497316360473633,
-0.11869906634092331,
-0.9974220991134644,
-0.5565630793571472,
-1.2961877584457397,
-0.5612139701843262,
0.032075610011816025,
-0.9370526075363159,
0.8228652477264404,
0.23513837158679962,
-1.2675352096557617,
-0.4438571631908417,
-0.8685432076454163,
0.8607529997825623,
-0.19095858931541443,
0.2383831888437271,
1.9315109252929688,
0.30876782536506653,
-0.36894410848617554,
0.8166652321815491,
1.193665623664856,
0.6780489683151245,
-0.58197021484375,
0.21605698764324188,
-0.48792511224746704,
0.47975775599479675,
-1.2437549829483032,
0.240252286195755,
-2.781625747680664,
0.7391369938850403,
0.04739246517419815,
-0.010683169588446617,
0.09436460584402084,
-1.1857821941375732,
1.1415610313415527,
2.548455238342285,
-1.2430884838104248,
0.45055103302001953,
0.29222503304481506,
1.1552702188491821,
-1.6665809154510498,
0.2524133324623108,
-0.3907110393047333,
2.1191747188568115,
0.12787319719791412,
1.2150022983551025,
-0.5019494891166687,
-2.4705870151519775,
0.5805032849311829,
-1.2592524290084839,
-1.1615196466445923,
0.7387024164199829,
-0.9369939565658569,
0.14260068535804749,
-1.5541151762008667,
-0.3371221423149109,
-1.0409497022628784,
-1.0401921272277832,
0.672954797744751,
0.2368215024471283,
0.3846796154975891,
-0.6926465630531311,
0.285231351852417,
-2.1499853134155273,
-1.420756459236145,
-0.14256905019283295,
-0.9430733919143677,
0.5823763012886047,
-0.4861242473125458,
0.6268637776374817,
-0.14082364737987518,
-0.04312055930495262,
0.2791259288787842,
1.442211389541626,
3.4514870643615723,
0.20134860277175903,
0.33584293723106384,
-0.28287065029144287,
-0.8915078043937683,
1.449057936668396,
0.9762732982635498,
-0.11264899373054504,
-0.47695568203926086,
-1.0654228925704956,
1.2985960245132446,
1.9737496376037598,
0.8008988499641418,
-0.06147095933556557,
-0.8021860718727112,
-0.6800490617752075,
-0.14872169494628906,
0.21727962791919708,
0.5045364499092102,
0.8897857069969177,
0.07235485315322876,
0.054067306220531464,
1.4647191762924194,
1.1265310049057007,
-0.48554524779319763,
0.24498362839221954,
-0.8789694905281067,
-0.46176087856292725,
0.48427820205688477,
0.16249485313892365,
-0.08644293248653412,
0.3898800313472748,
-0.9757084250450134,
-0.31788232922554016,
-0.41058626770973206,
-0.8519377112388611,
-0.6693190336227417,
-0.29485592246055603,
-0.315197616815567,
1.5767056941986084,
0.1460224837064743,
-0.5645906925201416,
0.0054293107241392136,
-0.856525182723999,
-0.16068048775196075,
-0.974358856678009,
0.22804562747478485,
-0.1639319211244583,
-0.1344127207994461,
-0.26938092708587646,
1.8259481191635132,
-0.9096672534942627,
-2.1017353534698486,
0.14594151079654694,
0.27213016152381897,
-0.16485413908958435,
0.3298856317996979,
1.6543434858322144,
0.575789749622345,
1.4439138174057007,
1.3321292400360107,
0.8533825278282166,
-0.6695474982261658,
-1.3235816955566406,
0.614066481590271,
1.0572681427001953,
-1.4027299880981445,
0.840787410736084,
-0.046042412519454956,
-0.4774283766746521,
0.6408675312995911,
1.3947926759719849,
0.5710983872413635,
-2.051588773727417,
0.8167596459388733,
-1.072709321975708,
0.9109559059143066,
0.7976282238960266,
0.6386280655860901,
0.28229057788848877,
0.7901440262794495,
-1.1793187856674194,
-1.1231319904327393,
-0.7487814426422119,
-0.7513986825942993,
1.9462487697601318,
-0.3771548867225647,
0.625010073184967,
-0.09032465517520905,
-1.2845590114593506,
-0.14825235307216644,
0.6301819682121277,
0.35584598779678345,
-0.49290627241134644,
0.8856896162033081,
-0.6741651892662048,
-1.0666580200195312,
-1.314849615097046,
-0.4512704908847809,
-1.0285950899124146,
-1.078536033630371,
1.0097051858901978,
0.7509379386901855,
0.24549828469753265,
1.9257758855819702,
0.6255315542221069,
0.12301909923553467,
-2.5248005390167236,
0.919474184513092,
0.3243160843849182,
-0.14444230496883392,
0.9652951955795288,
0.37438276410102844,
0.95354163646698,
0.0620175302028656,
0.5387417078018188,
-2.3453876972198486,
2.2611467838287354,
-0.15035194158554077,
0.7709515690803528,
-0.09946033358573914,
-0.13519129157066345,
1.0577846765518188,
0.5856425166130066,
0.5000138878822327,
-0.9637651443481445,
0.6082077026367188,
-0.5553377866744995,
1.3358763456344604,
0.949351966381073,
-0.6734363436698914,
-0.06208230182528496,
1.345735788345337,
0.4414990544319153,
-0.6246419548988342,
-0.9382957220077515,
-0.8713762164115906,
0.8808173537254333,
1.7250988483428955,
0.0028929999098181725,
-0.04406221583485603,
0.7398009300231934,
0.6563669443130493,
-1.2450867891311646,
0.00091518834233284,
-0.6798770427703857,
-0.7592566609382629,
1.673736810684204,
2.1212425231933594,
-0.3250499665737152,
-0.21959367394447327,
-0.5590716004371643,
-1.2632412910461426,
0.705457866191864,
-0.11571989953517914,
0.15100537240505219,
0.667339026927948,
-0.7043824195861816,
1.0039900541305542,
0.8370279669761658,
0.8632147908210754,
0.14010728895664215,
0.3135024309158325,
0.3798825144767761,
-0.3654780089855194,
-1.1986631155014038,
-0.217112198472023,
-1.184120535850525,
-2.5483765602111816,
0.37776532769203186,
-0.09946505725383759,
-1.314379096031189,
-0.004884110763669014,
-1.0083900690078735,
0.9944785237312317,
-0.4798533022403717,
-1.01651930809021,
-1.4854761362075806,
0.20588882267475128,
0.10268566757440567,
0.9291619658470154,
-1.6308951377868652,
-0.13851311802864075,
1.2548359632492065,
0.9520227313041687,
-0.7523388862609863,
1.0662498474121094,
0.282344251871109,
1.1140820980072021,
0.8088381290435791,
-0.3388447165489197,
0.6008569598197937,
-0.11171375215053558,
-1.3294651508331299,
0.5065988898277283,
1.1463974714279175,
0.1187068521976471,
1.5726394653320312,
-0.419122576713562,
-0.09871680289506912,
0.37293320894241333,
-0.5803318619728088,
-0.38557127118110657,
-0.47638601064682007,
0.6177176237106323,
0.1228356659412384,
-0.9079980850219727,
-0.07630479335784912,
-0.05889225751161575,
-0.30575549602508545,
0.12652210891246796,
-1.4996391534805298,
-0.11270731687545776,
-0.4978174865245819,
-0.5592719316482544,
-1.3346598148345947,
0.015626080334186554,
1.4336488246917725,
-0.6861070990562439,
-0.26288384199142456,
0.4612573981285095,
0.41343754529953003,
0.5317497849464417,
0.6894700527191162,
-0.6794831156730652,
-0.4652666449546814,
-0.20806477963924408,
-0.3144766092300415,
0.32230719923973083,
1.320280909538269,
-0.14029881358146667,
-1.0372258424758911,
0.697211742401123,
-0.4124257564544678,
0.06520343571901321,
1.8954124450683594,
-0.0008919555693864822,
-0.7228789329528809,
0.2831743061542511,
-0.7660586833953857,
1.972954273223877,
1.633152723312378,
1.277730941772461,
-0.28027796745300293,
-0.861967921257019,
0.7691942453384399,
-0.46990257501602173,
-0.4002954661846161,
0.7066572904586792,
0.3218745291233063,
-0.18684470653533936,
-1.4330230951309204,
0.7242474555969238,
1.2698508501052856,
-0.896035373210907,
-0.8002306222915649,
0.18773366510868073,
-0.6730870008468628,
1.071232557296753,
0.6714912056922913,
0.3503739535808563,
0.29424604773521423,
1.674609899520874,
0.8012799620628357,
-0.42589616775512695,
0.48792964220046997,
0.5605584383010864,
-0.17268669605255127,
-2.0949976444244385,
-1.2129284143447876,
0.24420787394046783,
-0.5549474358558655,
-1.6669244766235352,
1.3760024309158325,
-1.158993124961853,
-1.010626196861267,
0.5994170904159546,
-0.03765391558408737,
1.2714020013809204,
0.3798387050628662,
1.4846773147583008,
1.9773533344268799,
0.7529550194740295,
0.463399201631546,
1.2680201530456543,
-0.1678725928068161,
-0.48832228779792786,
1.8841551542282104,
-0.49234163761138916,
0.4584729075431824,
1.067021369934082,
-0.22621554136276245,
-1.0461397171020508,
-0.7466752529144287,
-1.3337287902832031,
-0.6921374201774597,
1.1677913665771484,
0.0111549599096179,
-1.1151431798934937,
0.20628130435943604,
1.5227149724960327,
0.10913567990064621,
-0.4658648371696472,
0.6102503538131714,
0.4707881212234497,
-0.8564671874046326,
-0.05515250936150551,
-0.8603538274765015,
0.6068248748779297,
-0.24741221964359283,
-0.3314478099346161,
0.3592355251312256,
0.3537697494029999,
1.468585729598999,
-0.06007695943117142,
0.14417260885238647,
1.110393762588501,
-1.409088373184204,
1.4539470672607422,
-0.633104145526886,
0.3027876317501068,
-2.4340784549713135,
1.3376247882843018,
-0.7153186798095703,
2.05976939201355,
-2.6609764099121094,
0.4581727087497711,
-0.6205880045890808,
-0.3854140341281891,
0.2706963121891022,
-0.1963919699192047,
0.17968808114528656,
-0.08789796382188797,
-1.0117690563201904,
0.057680606842041016,
-0.5795465707778931,
0.48315951228141785,
1.1136661767959595,
1.3030519485473633,
-1.0662922859191895,
-0.19875597953796387,
-1.744533658027649,
-0.05107391998171806,
-0.7611141800880432,
0.2546197772026062,
-2.0958092212677,
-0.2603376805782318,
-1.8916808366775513,
-2.306718111038208,
-1.2229208946228027,
-0.7203679084777832,
1.0547930002212524,
0.17574188113212585,
-0.8353005051612854,
1.3467663526535034,
-0.3085084855556488,
-1.7520942687988281,
1.0474042892456055,
-2.069674491882324
] |
https://github.com/huggingface/datasets/issues/3329 | Map function: Type error on iter #999 | Maybe this is because of the `return text` line ? I think it should return a dictionary rather than a string | ## Describe the bug
Using the map function, it throws a type error on iter #999
Here is the code I am calling:
```
dataset = datasets.load_dataset('squad')
dataset['validation'].map(text_numbers_to_int, input_columns=['context'], fn_kwargs={'column': 'context'})
```
text_numbers_to_int returns the input text with numbers replaced in the format {'context': text}
It happens at
`
File "C:\Users\lonek\anaconda3\envs\ai\Lib\site-packages\datasets\arrow_writer.py", line 289, in <listcomp>
[row[0][col] for row in self.current_examples], type=col_type, try_type=col_try_type, col=col
`
The issue is that the list comprehension expects self.current_examples to be type tuple(dict, str), but for some reason 26 out of 1000 of the sefl.current_examples are type tuple(str, str)
Here is an example of what self.current_examples should be
({'context': 'Super Bowl 50 was an...merals 50.'}, '')
Here is an example of what self.current_examples are when it throws the error:
('The Panthers used th... Marriott.', '')
| 1,090 | 21 | Map function: Type error on iter #999
## Describe the bug
Using the map function, it throws a type error on iter #999
Here is the code I am calling:
```
dataset = datasets.load_dataset('squad')
dataset['validation'].map(text_numbers_to_int, input_columns=['context'], fn_kwargs={'column': 'context'})
```
text_numbers_to_int returns the input text with numbers replaced in the format {'context': text}
It happens at
`
File "C:\Users\lonek\anaconda3\envs\ai\Lib\site-packages\datasets\arrow_writer.py", line 289, in <listcomp>
[row[0][col] for row in self.current_examples], type=col_type, try_type=col_try_type, col=col
`
The issue is that the list comprehension expects self.current_examples to be type tuple(dict, str), but for some reason 26 out of 1000 of the sefl.current_examples are type tuple(str, str)
Here is an example of what self.current_examples should be
({'context': 'Super Bowl 50 was an...merals 50.'}, '')
Here is an example of what self.current_examples are when it throws the error:
('The Panthers used th... Marriott.', '')
Maybe this is because of the `return text` line ? I think it should return a dictionary rather than a string | [
-1.2840509414672852,
-1.0263257026672363,
-0.7783022522926331,
1.598354697227478,
-0.1732080727815628,
-1.228405475616455,
0.10655525326728821,
-0.9779306054115295,
1.690728783607483,
-0.810442328453064,
0.3328101634979248,
-1.6638476848602295,
0.022920260205864906,
-0.6719851493835449,
-0.7049830555915833,
-0.9057216048240662,
-0.3853878676891327,
-0.8056292533874512,
1.0873801708221436,
2.511023759841919,
1.2556707859039307,
-1.4951424598693848,
2.6722958087921143,
0.7032574415206909,
-0.16193953156471252,
-1.0808961391448975,
0.5786240696907043,
-0.1122506782412529,
-1.1865222454071045,
-0.49645566940307617,
-0.934497058391571,
-0.010862432420253754,
-0.6545862555503845,
-0.5219467282295227,
-0.06577477604150772,
0.41259005665779114,
-0.29930615425109863,
-0.41341283917427063,
-0.5212771892547607,
-0.8845991492271423,
0.4048347771167755,
-0.4559535086154938,
0.9203580617904663,
-0.30634331703186035,
1.8049358129501343,
-0.4328167736530304,
0.386399507522583,
0.7151979207992554,
1.441035270690918,
0.20123960077762604,
0.035745397210121155,
0.3169553577899933,
0.3120318651199341,
-0.07240083068609238,
0.544589638710022,
1.1277408599853516,
0.668746292591095,
0.4249195456504822,
0.7782297730445862,
-2.328237533569336,
1.3488593101501465,
-1.0954920053482056,
0.3091089725494385,
1.3661787509918213,
-0.8847960233688354,
0.3879421651363373,
-1.762514591217041,
-0.031490080058574677,
0.6386290192604065,
-2.22729754447937,
0.24985702335834503,
-1.2579199075698853,
-0.421082079410553,
0.9537058472633362,
0.3256760835647583,
-1.2542150020599365,
0.16650739312171936,
-0.41679221391677856,
1.0470901727676392,
0.4007902443408966,
1.0286660194396973,
-1.800761103630066,
0.062222279608249664,
-0.3294457495212555,
0.17137585580348969,
-1.2984983921051025,
-1.5533218383789062,
0.5552592873573303,
0.6077591180801392,
0.5790008902549744,
-0.03055146336555481,
1.0035611391067505,
-1.0897356271743774,
0.7955235838890076,
-1.040516972541809,
-1.6725122928619385,
-1.4471089839935303,
-2.311121940612793,
-2.2847678661346436,
0.6742441654205322,
-0.4540172815322876,
-0.49103838205337524,
2.0842065811157227,
-0.9241275787353516,
-1.6782684326171875,
1.192661166191101,
0.2628583610057831,
0.04692643880844116,
2.493623733520508,
0.12224294245243073,
-0.8197630047798157,
0.4618266820907593,
-0.7945062518119812,
0.79988694190979,
-0.2863808870315552,
1.3815854787826538,
0.4458063542842865,
-1.0071568489074707,
1.6505790948867798,
-0.40306058526039124,
0.5192914009094238,
-0.623344361782074,
-0.5545773506164551,
-0.6533972024917603,
0.27969780564308167,
1.824713945388794,
-0.2538606524467468,
1.49198317527771,
-0.3724660277366638,
-1.4758862257003784,
-1.5527312755584717,
0.9766788482666016,
0.36555948853492737,
-0.8905576467514038,
0.12554000318050385,
-0.3591950237751007,
0.201078861951828,
-0.13902117311954498,
1.2185724973678589,
1.2671757936477661,
0.6040294766426086,
-0.3369166851043701,
-0.9311997294425964,
0.16742338240146637,
-0.09209352731704712,
-0.7123644351959229,
-1.7887974977493286,
-0.37296709418296814,
0.06980425864458084,
0.7350585460662842,
-1.235249400138855,
1.7034754753112793,
0.9260992407798767,
1.9267085790634155,
1.0547207593917847,
-0.349748432636261,
1.4692741632461548,
0.024921951815485954,
1.7919543981552124,
-0.6071611642837524,
0.6902604699134827,
-0.4417366087436676,
-1.1556389331817627,
0.87434321641922,
-0.25407007336616516,
-1.9610652923583984,
-0.8240396976470947,
-0.7493249773979187,
-0.2112603336572647,
-0.7506227493286133,
0.8926874995231628,
-0.3597753942012787,
-1.4431315660476685,
0.2833365201950073,
-0.7024585008621216,
0.14124758541584015,
-1.1809542179107666,
0.3103500306606293,
0.6905162334442139,
-0.6063161492347717,
0.20094120502471924,
-0.2568714916706085,
-1.2746362686157227,
-0.5249910354614258,
0.32775235176086426,
1.9594287872314453,
-0.7167094349861145,
0.7926255464553833,
1.008510708808899,
-0.6367595195770264,
0.0280842836946249,
0.22224371135234833,
-0.23882895708084106,
0.8071181774139404,
-0.9853110313415527,
-0.6434502601623535,
1.1825580596923828,
-0.22468188405036926,
-0.6936370134353638,
1.4828987121582031,
0.7313544750213623,
-0.9855571985244751,
-0.20403701066970825,
-0.25117674469947815,
-0.9127458333969116,
0.11385541409254074,
-1.5948072671890259,
-0.20093007385730743,
0.42761096358299255,
-1.6433078050613403,
-0.46179571747779846,
-0.15624219179153442,
1.3581286668777466,
-0.14520695805549622,
1.4067668914794922,
-0.387929767370224,
-0.16018220782279968,
-0.23615603148937225,
-0.40748488903045654,
0.16639789938926697,
-0.16524361073970795,
-0.6142629981040955,
0.13566185534000397,
-0.8834568858146667,
0.3756122589111328,
1.4319021701812744,
0.39309829473495483,
-0.011092277243733406,
0.41330426931381226,
1.1601017713546753,
0.37131842970848083,
0.08655761182308197,
-0.8658292293548584,
-1.4048391580581665,
2.0323407649993896,
-1.4794329404830933,
2.0619451999664307,
0.7312995195388794,
-0.05532857030630112,
-1.6876085996627808,
-1.7354800701141357,
1.3427475690841675,
1.1790951490402222,
2.182269334793091,
0.6113239526748657,
0.37931907176971436,
-0.899291455745697,
-0.6047166585922241,
0.3280322253704071,
-1.0333280563354492,
-0.7531810402870178,
0.1220666766166687,
2.3814430236816406,
1.8127999305725098,
-0.4351007342338562,
-0.14194872975349426,
-0.9653688073158264,
1.4345779418945312,
-0.2199675738811493,
0.2452692836523056,
1.9713338613510132,
-0.2616588771343231,
-1.0949668884277344,
1.265246868133545,
-2.4177961349487305,
0.16461506485939026,
2.101086378097534,
0.28659388422966003,
0.18094709515571594,
-1.3567203283309937,
-0.6822270750999451,
-0.2922377288341522,
-0.32310259342193604,
-1.262103796005249,
0.5644861459732056,
-0.3110842704772949,
-0.7893476486206055,
-1.4629111289978027,
0.21578852832317352,
-1.0951769351959229,
-1.6661263704299927,
0.2411939948797226,
1.914892315864563,
2.0890133380889893,
-0.73114013671875,
1.636501431465149,
-0.2714826464653015,
0.21699388325214386,
1.2258896827697754,
1.2732229232788086,
2.992173433303833,
1.9462138414382935,
-1.1857855319976807,
0.5583704113960266,
-0.15906132757663727,
-0.4533839523792267,
1.1195029020309448,
-1.2125805616378784,
1.2403299808502197,
-0.12815697491168976,
-1.1355136632919312,
-1.2102268934249878,
0.9745956063270569,
0.502510130405426,
-0.10374601930379868,
-0.5065499544143677,
1.3148276805877686,
-0.03024454042315483,
1.3038874864578247,
0.5058993101119995,
-0.3352292478084564,
0.47709837555885315,
-0.4352392554283142,
-0.6080043911933899,
1.603703260421753,
0.13233132660388947,
-1.4706438779830933,
-2.238668918609619,
-0.22711940109729767,
-0.6621949076652527,
0.061386801302433014,
-0.6454482674598694,
-1.010063886642456,
1.6808587312698364,
0.30131784081459045,
-1.2722169160842896,
-0.26823821663856506,
-0.4338752329349518,
-0.5334153771400452,
2.7282111644744873,
-1.3281047344207764,
-0.25755080580711365,
-0.9806110858917236,
-0.6589643359184265,
1.6442835330963135,
-1.1934858560562134,
-0.11393284052610397,
-1.0110805034637451,
-0.5983713269233704,
-1.319426417350769,
-0.5132392644882202,
-0.08451797068119049,
-0.9122265577316284,
0.8291025161743164,
0.26063311100006104,
-1.2201728820800781,
-0.4293496012687683,
-0.8730222582817078,
0.853761613368988,
-0.14127874374389648,
0.2526939809322357,
1.881838083267212,
0.36489543318748474,
-0.3501199781894684,
0.8070816397666931,
1.1796607971191406,
0.6700453758239746,
-0.5587769746780396,
0.16005466878414154,
-0.4516870379447937,
0.4811885952949524,
-1.232602834701538,
0.2694667875766754,
-2.8483481407165527,
0.7129408121109009,
-0.02221672423183918,
-0.019734539091587067,
0.04650241881608963,
-1.2485588788986206,
1.1575517654418945,
2.583866596221924,
-1.281281590461731,
0.4769372045993805,
0.3683159351348877,
1.1625382900238037,
-1.6791783571243286,
0.30139750242233276,
-0.40085569024086,
2.1847543716430664,
0.12357155978679657,
1.1988582611083984,
-0.49635711312294006,
-2.417886734008789,
0.5346601009368896,
-1.2573144435882568,
-1.1830350160598755,
0.7166128754615784,
-0.9308626055717468,
0.0967525839805603,
-1.5229320526123047,
-0.2805716097354889,
-0.9786458015441895,
-1.1402016878128052,
0.7904056906700134,
0.22233153879642487,
0.39191457629203796,
-0.686626136302948,
0.3556789755821228,
-2.1809961795806885,
-1.4377576112747192,
-0.22131036221981049,
-0.9420521855354309,
0.546272337436676,
-0.41464588046073914,
0.6443815231323242,
-0.16737258434295654,
0.05210511386394501,
0.2773500084877014,
1.4429811239242554,
3.4699621200561523,
0.1941809356212616,
0.3446753919124603,
-0.2412445992231369,
-0.8848729133605957,
1.433383822441101,
0.9764845967292786,
-0.16308172047138214,
-0.4361158013343811,
-1.0506724119186401,
1.331636905670166,
2.012869119644165,
0.820804238319397,
-0.002862293738871813,
-0.7606448531150818,
-0.5904756188392639,
-0.07391874492168427,
0.21992498636245728,
0.5239687561988831,
0.8205697536468506,
0.023442963138222694,
0.07192641496658325,
1.4508850574493408,
1.1442880630493164,
-0.44647216796875,
0.2682672441005707,
-0.8569230437278748,
-0.42393776774406433,
0.5054249167442322,
0.21092583239078522,
-0.12131410092115402,
0.38180825114250183,
-0.8855817914009094,
-0.2344675362110138,
-0.38936951756477356,
-0.8498657941818237,
-0.6785880327224731,
-0.38403624296188354,
-0.32324379682540894,
1.6120567321777344,
0.2171044498682022,
-0.5907790660858154,
-0.006927430629730225,
-0.7590767741203308,
-0.17202705144882202,
-1.0188381671905518,
0.21471409499645233,
-0.12158884108066559,
-0.13255509734153748,
-0.25447317957878113,
1.7901767492294312,
-0.904222846031189,
-2.1161673069000244,
0.16775034368038177,
0.30609869956970215,
-0.2006843239068985,
0.29547834396362305,
1.6727774143218994,
0.4821930527687073,
1.442474126815796,
1.3928555250167847,
0.9131757020950317,
-0.7115312218666077,
-1.3467586040496826,
0.6060211658477783,
1.0075427293777466,
-1.4283342361450195,
0.8357148766517639,
-0.037950724363327026,
-0.4743764102458954,
0.6670019626617432,
1.3580602407455444,
0.5693759918212891,
-2.0162553787231445,
0.8211166262626648,
-1.0864421129226685,
0.8928956389427185,
0.7367112040519714,
0.7055263519287109,
0.2457335740327835,
0.7798108458518982,
-1.151855707168579,
-1.165910243988037,
-0.7408156394958496,
-0.7562807202339172,
1.904637098312378,
-0.31286582350730896,
0.5989217758178711,
-0.0008867224678397179,
-1.2957173585891724,
-0.1603236049413681,
0.6972695589065552,
0.3811834156513214,
-0.4305732250213623,
0.8979577422142029,
-0.712591290473938,
-1.1120811700820923,
-1.3545118570327759,
-0.4840124845504761,
-1.047096848487854,
-1.0650193691253662,
1.0291757583618164,
0.7775033116340637,
0.27546653151512146,
1.9043861627578735,
0.5713047981262207,
0.14099706709384918,
-2.52282977104187,
0.8819974660873413,
0.36455366015434265,
-0.1372135728597641,
0.8849582672119141,
0.3763510584831238,
0.984369158744812,
0.027487507089972496,
0.5349915623664856,
-2.325108051300049,
2.239600658416748,
-0.18656300008296967,
0.7739098072052002,
-0.08606277406215668,
-0.12382006645202637,
1.0045052766799927,
0.5263347029685974,
0.53375643491745,
-1.005785346031189,
0.6616939902305603,
-0.5282965898513794,
1.2916018962860107,
1.023040533065796,
-0.7309942841529846,
-0.08819003403186798,
1.3580925464630127,
0.4506761431694031,
-0.651399552822113,
-0.9434075355529785,
-0.872366189956665,
0.8595669865608215,
1.7061680555343628,
-0.1025582030415535,
-0.06661439687013626,
0.741324782371521,
0.611198365688324,
-1.206801414489746,
-0.0059968759305775166,
-0.7342110276222229,
-0.785282552242279,
1.6696451902389526,
2.05165958404541,
-0.2667050063610077,
-0.20266401767730713,
-0.644850492477417,
-1.226747751235962,
0.6716605424880981,
-0.06871627271175385,
0.03774511069059372,
0.6939386129379272,
-0.6756277680397034,
0.9972680807113647,
0.8122894763946533,
0.8979718685150146,
0.12176381051540375,
0.32436874508857727,
0.3872043192386627,
-0.310488224029541,
-1.1513794660568237,
-0.23972100019454956,
-1.2256078720092773,
-2.575209379196167,
0.3643985390663147,
-0.1877213567495346,
-1.3813425302505493,
-0.016200557351112366,
-0.9668352007865906,
0.9867719411849976,
-0.4651539921760559,
-1.1326545476913452,
-1.3770183324813843,
0.18192517757415771,
0.0523655042052269,
0.86268550157547,
-1.690032958984375,
-0.09795601665973663,
1.2966856956481934,
0.9414097666740417,
-0.7514235377311707,
1.0892716646194458,
0.310199111700058,
1.1037687063217163,
0.7717245221138,
-0.36944347620010376,
0.6163371205329895,
-0.05370301753282547,
-1.3345223665237427,
0.5836551189422607,
1.0996812582015991,
0.10706180334091187,
1.4803998470306396,
-0.4466647207736969,
-0.07920224219560623,
0.3472418785095215,
-0.5467641949653625,
-0.38329845666885376,
-0.4953576922416687,
0.7207605838775635,
0.07242396473884583,
-0.8574405908584595,
-0.010099759325385094,
-0.13079160451889038,
-0.26525118947029114,
0.1539125144481659,
-1.544339895248413,
-0.19657543301582336,
-0.4377790689468384,
-0.4862578213214874,
-1.3382704257965088,
-0.08053683489561081,
1.4878499507904053,
-0.6776975393295288,
-0.24875037372112274,
0.5399365425109863,
0.510938823223114,
0.5399929285049438,
0.6988028287887573,
-0.6748008728027344,
-0.4689968526363373,
-0.26281121373176575,
-0.3064092695713043,
0.34575873613357544,
1.2977184057235718,
-0.14134055376052856,
-1.0548288822174072,
0.7575473785400391,
-0.3662383258342743,
0.03854866325855255,
1.860041618347168,
0.032400377094745636,
-0.7538305521011353,
0.2820413410663605,
-0.767873227596283,
1.9433735609054565,
1.6658164262771606,
1.2393739223480225,
-0.2658703625202179,
-0.9295594096183777,
0.7689523100852966,
-0.43177157640457153,
-0.38349226117134094,
0.7463695406913757,
0.45099520683288574,
-0.201192706823349,
-1.3914918899536133,
0.676782488822937,
1.1737560033798218,
-0.7890230417251587,
-0.8216299414634705,
0.15200555324554443,
-0.7228537797927856,
1.0680369138717651,
0.6123726963996887,
0.3668312728404999,
0.26169654726982117,
1.755684494972229,
0.7642680406570435,
-0.46313396096229553,
0.4848804473876953,
0.585970401763916,
-0.24848121404647827,
-2.082991123199463,
-1.2026464939117432,
0.25462034344673157,
-0.5288967490196228,
-1.6367734670639038,
1.3575222492218018,
-1.1344449520111084,
-0.9787188768386841,
0.5497520565986633,
0.02487373910844326,
1.3052513599395752,
0.3405430316925049,
1.4761444330215454,
2.02236270904541,
0.7911588549613953,
0.505913257598877,
1.3448047637939453,
-0.19283942878246307,
-0.49112972617149353,
1.84001624584198,
-0.4350302815437317,
0.41936665773391724,
1.135661244392395,
-0.2898891568183899,
-1.0324738025665283,
-0.760705292224884,
-1.2728381156921387,
-0.6430554389953613,
1.123453974723816,
0.07663723826408386,
-1.1324708461761475,
0.2252449244260788,
1.5351777076721191,
0.09731388837099075,
-0.43559250235557556,
0.5313082337379456,
0.45651891827583313,
-0.8167264461517334,
-0.025994092226028442,
-0.9054661989212036,
0.5720356106758118,
-0.2491360455751419,
-0.2826617658138275,
0.34172242879867554,
0.3610876798629761,
1.4224233627319336,
-0.05196184664964676,
0.24202536046504974,
1.1309103965759277,
-1.3831247091293335,
1.4103707075119019,
-0.5807339549064636,
0.3097873032093048,
-2.3663558959960938,
1.2999727725982666,
-0.7144132256507874,
2.0288736820220947,
-2.706416606903076,
0.47850194573402405,
-0.6229740977287292,
-0.3811381757259369,
0.3349432647228241,
-0.27922365069389343,
0.11036840081214905,
-0.10297224670648575,
-1.0052114725112915,
0.05728350579738617,
-0.550087571144104,
0.5034221410751343,
1.0854244232177734,
1.3130402565002441,
-1.0442873239517212,
-0.2387191206216812,
-1.6800791025161743,
-0.13853861391544342,
-0.7319482564926147,
0.29554978013038635,
-2.0873913764953613,
-0.22836193442344666,
-1.9184828996658325,
-2.345625877380371,
-1.2586071491241455,
-0.7075935006141663,
1.0703552961349487,
0.16401644051074982,
-0.8312057256698608,
1.3207151889801025,
-0.27509281039237976,
-1.7975521087646484,
1.0949249267578125,
-2.046487331390381
] |
https://github.com/huggingface/datasets/issues/3317 | Add desc parameter to Dataset filter method | Hi,
`Dataset.map` allows more generic transforms compared to `Dataset.filter`, which purpose is very specific (to filter examples based on a condition). That's why I don't think we need the `desc` parameter there for consistency. #3196 has added descriptions to the `Dataset` methods that call `.map` internally, but not for the `filter` method, so we should do that.
Do you have a description in mind? Maybe `"Filtering the dataset"` or `"Filtering the indices"`? If yes, feel free to open a PR. | **Is your feature request related to a problem? Please describe.**
As I was filtering very large datasets I noticed the filter method doesn't have the desc parameter which is available in the map method. Why don't we add a desc parameter to the filter method both for consistency and it's nice to give some feedback to users during long operations on Datasets?
**Describe the solution you'd like**
Add desc parameter to Dataset filter method
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
| 1,092 | 80 | Add desc parameter to Dataset filter method
**Is your feature request related to a problem? Please describe.**
As I was filtering very large datasets I noticed the filter method doesn't have the desc parameter which is available in the map method. Why don't we add a desc parameter to the filter method both for consistency and it's nice to give some feedback to users during long operations on Datasets?
**Describe the solution you'd like**
Add desc parameter to Dataset filter method
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
Hi,
`Dataset.map` allows more generic transforms compared to `Dataset.filter`, which purpose is very specific (to filter examples based on a condition). That's why I don't think we need the `desc` parameter there for consistency. #3196 has added descriptions to the `Dataset` methods that call `.map` internally, but not for the `filter` method, so we should do that.
Do you have a description in mind? Maybe `"Filtering the dataset"` or `"Filtering the indices"`? If yes, feel free to open a PR. | [
-1.1883291006088257,
-1.0428259372711182,
-0.7805865406990051,
1.3611077070236206,
-0.1948157697916031,
-1.3488914966583252,
0.09270309656858444,
-1.1470414400100708,
1.874088168144226,
-0.7325271368026733,
0.31172510981559753,
-1.7967352867126465,
0.024235917255282402,
-0.6747161149978638,
-0.8453289866447449,
-0.7697104811668396,
-0.46656039357185364,
-0.7553679347038269,
0.7894056439399719,
2.4651377201080322,
1.0276175737380981,
-1.456411361694336,
2.644984483718872,
0.7300223112106323,
-0.15127073228359222,
-0.9484187960624695,
0.4275851845741272,
-0.043256305158138275,
-1.1471431255340576,
-0.5260454416275024,
-1.0090187788009644,
-0.06267519295215607,
-0.5810117721557617,
-0.5572347044944763,
0.05345340073108673,
0.3566618859767914,
-0.309979647397995,
-0.39444419741630554,
-0.5957638025283813,
-0.753913938999176,
0.4384405314922333,
-0.421141654253006,
1.0461452007293701,
-0.48735418915748596,
1.8522484302520752,
-0.5941144227981567,
0.4353239834308624,
0.6854020357131958,
1.436792254447937,
0.19844475388526917,
-0.06386136263608932,
0.3132375180721283,
0.43388232588768005,
-0.0512060821056366,
0.39026084542274475,
1.0844112634658813,
0.5340399742126465,
0.5984366536140442,
0.8187726736068726,
-2.249953269958496,
1.400025486946106,
-1.15596342086792,
0.25748032331466675,
1.3365501165390015,
-0.9026281237602234,
0.38943466544151306,
-1.8180665969848633,
0.010019330307841301,
0.5507633686065674,
-2.325430154800415,
0.19251617789268494,
-1.2826310396194458,
-0.5440398454666138,
0.9318887591362,
0.3089568316936493,
-1.235629916191101,
0.28820326924324036,
-0.4268312156200409,
0.967985212802887,
0.49912571907043457,
1.1104769706726074,
-1.8098775148391724,
-0.1295114904642105,
-0.337950199842453,
0.16773125529289246,
-1.359085202217102,
-1.4499579668045044,
0.7289995551109314,
0.571338951587677,
0.5483792424201965,
-0.05772341042757034,
0.9955129623413086,
-0.9582716822624207,
0.8118060231208801,
-1.0247513055801392,
-1.6679589748382568,
-1.3901461362838745,
-2.1070592403411865,
-2.249924421310425,
0.8675548434257507,
-0.4547767639160156,
-0.4748556911945343,
1.8813581466674805,
-0.9712327718734741,
-1.827890396118164,
1.1297253370285034,
0.24884308874607086,
0.0059933969751000404,
2.318415403366089,
0.11215261369943619,
-0.5730423331260681,
0.37692025303840637,
-0.5967994332313538,
0.874459981918335,
-0.3908767104148865,
1.419268250465393,
0.42889493703842163,
-0.9259670376777649,
1.6076650619506836,
-0.46068769693374634,
0.5933536887168884,
-0.5182921886444092,
-0.6160874366760254,
-0.8042058348655701,
0.527392566204071,
1.8958654403686523,
-0.32223275303840637,
1.5121541023254395,
-0.3930588960647583,
-1.590258002281189,
-1.5859832763671875,
0.962417483329773,
0.484696626663208,
-0.8768852353096008,
0.059928230941295624,
-0.22195543348789215,
0.24381376802921295,
-0.18433599174022675,
1.1688227653503418,
1.163231611251831,
0.7309263944625854,
-0.2924221158027649,
-0.8680060505867004,
0.22506852447986603,
-0.08450563251972198,
-0.7382407784461975,
-1.7970709800720215,
-0.4666428565979004,
0.2858545482158661,
0.6706171631813049,
-1.1951544284820557,
1.6946747303009033,
0.9170921444892883,
1.9154613018035889,
1.0884672403335571,
-0.27344492077827454,
1.3922265768051147,
0.048467427492141724,
1.8849900960922241,
-0.5503894686698914,
0.5559093952178955,
-0.3479779362678528,
-1.0454386472702026,
0.8496634364128113,
-0.4381936490535736,
-2.1186563968658447,
-0.773148775100708,
-0.9396522641181946,
-0.3161115348339081,
-0.7295261025428772,
0.9156010746955872,
-0.26984065771102905,
-1.289831519126892,
0.2579561173915863,
-0.69026780128479,
0.15126577019691467,
-1.127110481262207,
0.35240697860717773,
0.7821213006973267,
-0.6711445450782776,
-0.018659425899386406,
-0.2167115956544876,
-1.3864364624023438,
-0.5142619013786316,
0.18309953808784485,
1.9320741891860962,
-0.6765174269676208,
0.8052736520767212,
0.8654654026031494,
-0.685303270816803,
-0.07137242704629898,
0.4409838020801544,
-0.17262151837348938,
0.7659845948219299,
-1.0602482557296753,
-0.283244252204895,
1.0972851514816284,
-0.1604561060667038,
-0.6170044541358948,
1.5034019947052002,
0.7261255383491516,
-1.029089331626892,
-0.12322720140218735,
-0.3696928024291992,
-0.8146890997886658,
-0.05700451880693436,
-1.5507489442825317,
-0.19530141353607178,
0.2416810840368271,
-1.5104811191558838,
-0.5787928700447083,
-0.15074361860752106,
1.1551392078399658,
-0.08093893527984619,
1.1843396425247192,
-0.4229404628276825,
-0.3525524437427521,
-0.40241187810897827,
-0.43738770484924316,
0.11402294784784317,
-0.2985568046569824,
-0.679816722869873,
0.09432517737150192,
-0.7920775413513184,
0.5097653269767761,
1.4281127452850342,
0.4778040051460266,
-0.024587757885456085,
0.6012803912162781,
1.04717218875885,
0.3169496953487396,
-0.04614797234535217,
-0.9027788043022156,
-1.4168798923492432,
1.997416377067566,
-1.446009874343872,
1.8844072818756104,
0.578913152217865,
-0.050827495753765106,
-1.7540583610534668,
-1.873212218284607,
1.3832738399505615,
1.1650503873825073,
2.227088212966919,
0.586288571357727,
0.3525920808315277,
-0.8649507164955139,
-0.6286565065383911,
0.3689519464969635,
-1.1281481981277466,
-0.7865371108055115,
0.06641659885644913,
2.347365617752075,
1.8637839555740356,
-0.6242634057998657,
-0.2028074413537979,
-1.0392078161239624,
1.432784914970398,
-0.181967094540596,
0.14193643629550934,
2.025158405303955,
-0.3386080861091614,
-1.0525108575820923,
1.3206433057785034,
-2.2690727710723877,
-0.02430710196495056,
1.9472304582595825,
0.2875906229019165,
0.18922270834445953,
-1.3670579195022583,
-0.6377920508384705,
-0.18449285626411438,
-0.29906314611434937,
-1.329490303993225,
0.45560047030448914,
-0.33553749322891235,
-0.6858258247375488,
-1.5458701848983765,
0.29358500242233276,
-1.203040599822998,
-1.4653302431106567,
0.293256014585495,
1.8978101015090942,
1.9741748571395874,
-0.6196641325950623,
1.5207877159118652,
-0.19819283485412598,
0.22080230712890625,
1.3117969036102295,
1.1060421466827393,
3.1566615104675293,
1.960647702217102,
-1.1206486225128174,
0.6670205593109131,
-0.18121857941150665,
-0.4603292644023895,
1.2566442489624023,
-1.112013816833496,
1.2233651876449585,
-0.1532147377729416,
-1.109513521194458,
-1.1172047853469849,
0.8696103096008301,
0.4949309229850769,
0.12026409804821014,
-0.5689114332199097,
1.087019681930542,
0.000787198543548584,
1.3372489213943481,
0.4561278522014618,
-0.49565187096595764,
0.6383572220802307,
-0.48519816994667053,
-0.5168020725250244,
1.6234110593795776,
0.23412808775901794,
-1.4905506372451782,
-2.3085975646972656,
-0.23981963098049164,
-0.8167160749435425,
0.10971278697252274,
-0.4692043662071228,
-0.9130148887634277,
1.7393896579742432,
0.45302286744117737,
-1.4048900604248047,
-0.21588490903377533,
-0.39245378971099854,
-0.6522860527038574,
2.7795042991638184,
-1.4259536266326904,
-0.2813792824745178,
-1.0028715133666992,
-0.6333824396133423,
1.6113184690475464,
-1.2472983598709106,
-0.15387901663780212,
-1.0125268697738647,
-0.5938816666603088,
-1.358338475227356,
-0.5448970198631287,
-0.10868524014949799,
-0.8759844899177551,
0.9659512639045715,
0.1693759709596634,
-1.0920190811157227,
-0.4040561020374298,
-0.8737176060676575,
0.784496009349823,
-0.16092067956924438,
0.23951934278011322,
2.0193612575531006,
0.43941935896873474,
-0.3308234214782715,
0.5675622224807739,
1.1899704933166504,
0.5287663340568542,
-0.6517881751060486,
0.26873379945755005,
-0.6162376999855042,
0.3218003511428833,
-1.3144811391830444,
0.3044240474700928,
-2.849575996398926,
0.6351884603500366,
-0.054313741624355316,
-0.11467168480157852,
0.1344231218099594,
-1.2620662450790405,
1.0506007671356201,
2.6430723667144775,
-1.2467634677886963,
0.3972122371196747,
0.24027110636234283,
1.244733214378357,
-1.5167361497879028,
0.4045512080192566,
-0.42153385281562805,
2.1812140941619873,
0.19456174969673157,
1.0619195699691772,
-0.5837332606315613,
-2.2763445377349854,
0.6505347490310669,
-1.1235476732254028,
-1.405076026916504,
0.6311381459236145,
-0.7648141384124756,
0.01234566792845726,
-1.54203200340271,
-0.16636183857917786,
-0.8794642686843872,
-1.1971956491470337,
0.8479946851730347,
0.16690026223659515,
0.4195377826690674,
-0.6355506181716919,
0.304815411567688,
-2.1495463848114014,
-1.4362127780914307,
-0.29754599928855896,
-0.8637557029724121,
0.5613547563552856,
-0.26083704829216003,
0.7151493430137634,
-0.235723614692688,
0.09186030179262161,
0.29775235056877136,
1.4201303720474243,
3.4560301303863525,
0.24313397705554962,
0.43933820724487305,
-0.18444101512432098,
-0.842890202999115,
1.2984644174575806,
0.9910539984703064,
0.04599755257368088,
-0.5150566101074219,
-1.0622859001159668,
1.2501707077026367,
1.9691112041473389,
0.9141219258308411,
0.10413943231105804,
-0.7381229400634766,
-0.5492458939552307,
-0.06800838559865952,
0.1926843523979187,
0.440181165933609,
0.9342966079711914,
0.13218280673027039,
-0.00042759813368320465,
1.3573040962219238,
1.2753593921661377,
-0.3510706424713135,
0.35206395387649536,
-0.6736748814582825,
-0.4743240177631378,
0.6015346050262451,
0.44462713599205017,
-0.007332189474254847,
0.2517836391925812,
-0.9389088749885559,
-0.18896885216236115,
-0.3810901641845703,
-1.0623033046722412,
-0.6433665156364441,
-0.5179675817489624,
-0.3375609517097473,
1.7140145301818848,
0.1448623687028885,
-0.5435004830360413,
-0.1557709276676178,
-0.846388578414917,
-0.022224456071853638,
-1.0766334533691406,
0.32134318351745605,
-0.13297030329704285,
-0.15112896263599396,
-0.10599420219659805,
1.7604119777679443,
-0.8928939700126648,
-1.9254382848739624,
0.33044013381004333,
0.3097221255302429,
-0.48595815896987915,
0.21051184833049774,
1.5040435791015625,
0.5192587375640869,
1.545065999031067,
1.3978718519210815,
0.9697995185852051,
-0.6526033282279968,
-1.2673951387405396,
0.5573564767837524,
0.8266898989677429,
-1.4134199619293213,
0.7866893410682678,
0.20805035531520844,
-0.5281600952148438,
0.7569437623023987,
1.3116086721420288,
0.42231133580207825,
-1.9151947498321533,
0.7257624864578247,
-0.8380734920501709,
0.7513556480407715,
0.7479796409606934,
0.7115912437438965,
0.30676135420799255,
0.8924751877784729,
-1.2103444337844849,
-1.1878876686096191,
-0.8957634568214417,
-0.6225841641426086,
2.0604348182678223,
-0.15897707641124725,
0.6080009937286377,
-0.12434343248605728,
-1.2767339944839478,
-0.16308313608169556,
0.8319454789161682,
0.5636864900588989,
-0.40386995673179626,
0.7352356314659119,
-0.7120696306228638,
-1.0704154968261719,
-1.4626960754394531,
-0.5177309513092041,
-0.918448805809021,
-0.9301213026046753,
1.0250858068466187,
1.039363980293274,
0.22977876663208008,
1.9325610399246216,
0.655134379863739,
0.22398696839809418,
-2.6077232360839844,
0.803354024887085,
0.34472206234931946,
-0.013530436903238297,
0.9236584901809692,
0.44344794750213623,
0.9307573437690735,
-0.07007177174091339,
0.553882896900177,
-2.2916977405548096,
2.252310276031494,
-0.3273361623287201,
0.6846486926078796,
-0.18086294829845428,
-0.15179793536663055,
1.1651051044464111,
0.5106327533721924,
0.464339941740036,
-1.0895487070083618,
0.5977485775947571,
-0.6248285174369812,
1.2176895141601562,
0.988196849822998,
-0.7207030057907104,
-0.05340059846639633,
1.2789287567138672,
0.5576833486557007,
-0.5008925795555115,
-1.0291438102722168,
-0.9488294720649719,
1.0592783689498901,
1.859092354774475,
-0.15191489458084106,
-0.07507824152708054,
0.9577788710594177,
0.7571935057640076,
-1.3246541023254395,
0.1865161955356598,
-0.7836761474609375,
-0.8164117336273193,
1.5951019525527954,
1.9944943189620972,
-0.01828259788453579,
-0.1773538887500763,
-0.8135637044906616,
-1.1949409246444702,
0.7295175194740295,
0.2004174292087555,
0.10229073464870453,
0.6352750658988953,
-0.5877905488014221,
1.164925456047058,
0.957499086856842,
1.0071513652801514,
0.2006182074546814,
0.5043571591377258,
0.43769386410713196,
-0.34150436520576477,
-1.1902844905853271,
-0.19497250020503998,
-1.1608492136001587,
-2.4852652549743652,
0.5480091571807861,
-0.2858341634273529,
-1.452094554901123,
-0.007791060488671064,
-0.964351236820221,
0.840978741645813,
-0.5315101742744446,
-1.1790227890014648,
-1.5787023305892944,
0.20652401447296143,
0.06280530989170074,
0.991303026676178,
-1.600751280784607,
-0.018813909962773323,
1.1187334060668945,
0.8778156042098999,
-0.6233899593353271,
0.951215922832489,
0.27778616547584534,
1.087133765220642,
0.9023401141166687,
-0.5477865934371948,
0.42292243242263794,
0.025706319138407707,
-1.3860915899276733,
0.4723636507987976,
1.0847617387771606,
0.22659814357757568,
1.3232966661453247,
-0.5440554022789001,
0.14276733994483948,
0.4519524872303009,
-0.5510374903678894,
-0.3361188471317291,
-0.6493960618972778,
0.6969525814056396,
0.113819919526577,
-0.844819188117981,
0.06550079584121704,
-0.03535815328359604,
-0.23154625296592712,
0.20736053586006165,
-1.4252774715423584,
-0.22827081382274628,
-0.42269518971443176,
-0.5569744110107422,
-1.1640952825546265,
-0.17877079546451569,
1.4355416297912598,
-0.6493510603904724,
-0.15509268641471863,
0.6159247756004333,
0.4386683404445648,
0.4983864426612854,
0.6082903742790222,
-0.6689646244049072,
-0.3738696873188019,
-0.32151395082473755,
-0.38146859407424927,
0.28387486934661865,
1.2681180238723755,
-0.20484614372253418,
-1.0285910367965698,
0.6978608965873718,
-0.3116326630115509,
-0.05698513984680176,
1.9270631074905396,
0.02747906930744648,
-0.7693790793418884,
0.2429051548242569,
-0.7518419027328491,
1.8653696775436401,
1.7911204099655151,
1.1514737606048584,
-0.11314329504966736,
-1.0239168405532837,
0.6008708477020264,
-0.24465090036392212,
-0.42837709188461304,
0.9760670065879822,
0.4717232882976532,
-0.16520169377326965,
-1.3921082019805908,
0.6188814043998718,
1.259377360343933,
-0.8732030391693115,
-0.9114611148834229,
0.007447678595781326,
-0.8231787085533142,
1.066969394683838,
0.6216387748718262,
0.41416025161743164,
0.2459494024515152,
1.7600560188293457,
0.6276957988739014,
-0.42747166752815247,
0.5669216513633728,
0.5959389209747314,
-0.1711687296628952,
-2.2564921379089355,
-1.2575368881225586,
0.20652075111865997,
-0.4307907223701477,
-1.6460685729980469,
1.4342809915542603,
-1.1479917764663696,
-0.7728370428085327,
0.5388575792312622,
0.15397006273269653,
1.5353652238845825,
0.2750687301158905,
1.5079671144485474,
2.109633684158325,
0.8269095420837402,
0.34743279218673706,
1.4564330577850342,
-0.08613504469394684,
-0.469561904668808,
1.8968892097473145,
-0.46503129601478577,
0.49968093633651733,
1.1035511493682861,
-0.3475664556026459,
-1.0213611125946045,
-0.7183971405029297,
-1.2074122428894043,
-0.7350221872329712,
1.1253184080123901,
-0.023942183703184128,
-1.141985535621643,
0.2241225391626358,
1.6234053373336792,
0.06755343824625015,
-0.29954713582992554,
0.4031525254249573,
0.3965299725532532,
-0.7836021780967712,
-0.06462723761796951,
-0.9347051978111267,
0.5460551977157593,
-0.20534759759902954,
-0.2629985809326172,
0.39419353008270264,
0.43251335620880127,
1.2251454591751099,
0.022736981511116028,
0.12364499270915985,
1.207188606262207,
-1.4408462047576904,
1.5227174758911133,
-0.5828872919082642,
0.2846531569957733,
-2.4836745262145996,
1.3724499940872192,
-0.7727084159851074,
1.9414681196212769,
-2.6486456394195557,
0.2928406000137329,
-0.6618065237998962,
-0.4525793790817261,
0.3739036023616791,
-0.3023577630519867,
0.13856424391269684,
-0.08343017846345901,
-1.15583336353302,
0.0283126849681139,
-0.6928361654281616,
0.5336030721664429,
1.132849931716919,
1.5014655590057373,
-1.0793859958648682,
-0.2789590358734131,
-1.7983280420303345,
-0.07419051229953766,
-0.72314453125,
0.3836444318294525,
-2.0057504177093506,
-0.09720498323440552,
-1.8676706552505493,
-2.375378370285034,
-1.3666181564331055,
-0.7480401396751404,
1.0505118370056152,
0.08536086976528168,
-0.9316859841346741,
1.0837727785110474,
-0.33247965574264526,
-1.767322301864624,
1.1050223112106323,
-2.159640312194824
] |
https://github.com/huggingface/datasets/issues/3317 | Add desc parameter to Dataset filter method | I'm personally ok with adding the `desc` parameter actually. Let's say you have different filters, it can be nice to differentiate between the different filters when they're running no ? | **Is your feature request related to a problem? Please describe.**
As I was filtering very large datasets I noticed the filter method doesn't have the desc parameter which is available in the map method. Why don't we add a desc parameter to the filter method both for consistency and it's nice to give some feedback to users during long operations on Datasets?
**Describe the solution you'd like**
Add desc parameter to Dataset filter method
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
| 1,092 | 30 | Add desc parameter to Dataset filter method
**Is your feature request related to a problem? Please describe.**
As I was filtering very large datasets I noticed the filter method doesn't have the desc parameter which is available in the map method. Why don't we add a desc parameter to the filter method both for consistency and it's nice to give some feedback to users during long operations on Datasets?
**Describe the solution you'd like**
Add desc parameter to Dataset filter method
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
I'm personally ok with adding the `desc` parameter actually. Let's say you have different filters, it can be nice to differentiate between the different filters when they're running no ? | [
-1.2700294256210327,
-1.132089614868164,
-0.7983266115188599,
1.425378441810608,
-0.22195851802825928,
-1.3529592752456665,
-0.03013545274734497,
-1.1186392307281494,
1.8120816946029663,
-0.6446794271469116,
0.2497151494026184,
-1.8192399740219116,
0.04692975804209709,
-0.5566210150718689,
-0.774105966091156,
-0.7250239849090576,
-0.3841279149055481,
-0.8338435292243958,
0.8826845288276672,
2.387812852859497,
0.9469391107559204,
-1.4741911888122559,
2.7907216548919678,
0.6395756006240845,
-0.13975587487220764,
-1.0168309211730957,
0.46290847659111023,
0.022532429546117783,
-1.1762162446975708,
-0.540291428565979,
-0.9925740957260132,
0.013640145771205425,
-0.5736891031265259,
-0.3383212387561798,
0.09284453839063644,
0.28891003131866455,
-0.12451490014791489,
-0.339283287525177,
-0.6053352952003479,
-0.7299308180809021,
0.45764583349227905,
-0.374442458152771,
0.9433861970901489,
-0.5761801600456238,
1.7789353132247925,
-0.5966770052909851,
0.290039598941803,
0.6873520016670227,
1.5073018074035645,
0.1967136412858963,
-0.06685343384742737,
0.36206933856010437,
0.3898213803768158,
-0.014005576260387897,
0.359123170375824,
1.1197967529296875,
0.5046476721763611,
0.6417532563209534,
0.6961380243301392,
-2.2307119369506836,
1.4730355739593506,
-1.1203688383102417,
0.32384297251701355,
1.331589698791504,
-0.9238746166229248,
0.43333667516708374,
-1.805910587310791,
-0.005295869894325733,
0.5861356258392334,
-2.3518576622009277,
0.21399874985218048,
-1.1831566095352173,
-0.5566256642341614,
0.8839247226715088,
0.25928646326065063,
-1.2630276679992676,
0.23998716473579407,
-0.5826120972633362,
0.9970009326934814,
0.4505477547645569,
1.0148558616638184,
-1.690947413444519,
-0.05928673595190048,
-0.2558142840862274,
0.0810699388384819,
-1.4493061304092407,
-1.4504815340042114,
0.7013217210769653,
0.5221673250198364,
0.6269158124923706,
0.046403221786022186,
0.9837405681610107,
-0.9898131489753723,
0.8711541891098022,
-0.9559320211410522,
-1.5638017654418945,
-1.3341096639633179,
-2.2588067054748535,
-2.1102566719055176,
0.9318594336509705,
-0.4090518653392792,
-0.5469238758087158,
1.9114834070205688,
-0.9957275986671448,
-1.8638720512390137,
1.1870468854904175,
0.22516585886478424,
0.10976295918226242,
2.3908963203430176,
0.09664905071258545,
-0.5768715739250183,
0.39318302273750305,
-0.6097409129142761,
1.015406847000122,
-0.48475974798202515,
1.5074877738952637,
0.39502987265586853,
-0.7977308034896851,
1.6287438869476318,
-0.41695815324783325,
0.5805703997612,
-0.4662720263004303,
-0.73790043592453,
-0.946847140789032,
0.5973071455955505,
1.917850136756897,
-0.29472804069519043,
1.5266214609146118,
-0.38981080055236816,
-1.5478777885437012,
-1.4989566802978516,
0.9596267342567444,
0.5424090623855591,
-0.9495740532875061,
-0.0382845364511013,
-0.23319783806800842,
0.2109752744436264,
-0.09034117311239243,
1.175785779953003,
1.1163817644119263,
0.6600757241249084,
-0.3319253623485565,
-0.995881974697113,
0.20019495487213135,
-0.09379923343658447,
-0.6600521802902222,
-1.8746802806854248,
-0.34632518887519836,
0.23700246214866638,
0.7029228210449219,
-1.3286901712417603,
1.5606995820999146,
1.0167219638824463,
2.0385310649871826,
1.0919877290725708,
-0.26553666591644287,
1.4119986295700073,
0.0029810359701514244,
1.8557718992233276,
-0.5385657548904419,
0.495797336101532,
-0.24198129773139954,
-0.98565274477005,
0.8076878786087036,
-0.46619856357574463,
-2.0710418224334717,
-0.7958057522773743,
-1.0010076761245728,
-0.3542070686817169,
-0.7312318086624146,
0.9919930696487427,
-0.43841204047203064,
-1.2262866497039795,
0.20989525318145752,
-0.6974330544471741,
0.2314807027578354,
-1.1660298109054565,
0.3001289963722229,
0.796505868434906,
-0.6433398723602295,
-0.028004858642816544,
-0.21368534862995148,
-1.4293973445892334,
-0.6364012956619263,
0.2722703516483307,
1.9164562225341797,
-0.6575444936752319,
0.8107859492301941,
0.8680823445320129,
-0.709299623966217,
-0.08111611753702164,
0.37565672397613525,
-0.09499723464250565,
0.803616464138031,
-1.056778907775879,
-0.34148108959198,
0.9870249629020691,
-0.26055026054382324,
-0.6158645749092102,
1.475242018699646,
0.784464418888092,
-1.067473292350769,
-0.2686760127544403,
-0.3808920979499817,
-0.8298234939575195,
-0.09966583549976349,
-1.5257830619812012,
-0.2031230926513672,
0.19129963219165802,
-1.5080081224441528,
-0.5782217383384705,
-0.1581363081932068,
1.1564027070999146,
-0.030872143805027008,
1.1403388977050781,
-0.3879939615726471,
-0.43296360969543457,
-0.41944900155067444,
-0.5401362180709839,
0.15140977501869202,
-0.3222852349281311,
-0.6853715181350708,
0.11089393496513367,
-0.7839401364326477,
0.453760027885437,
1.4918445348739624,
0.5286138653755188,
-0.048577044159173965,
0.7110717296600342,
1.006667971611023,
0.3309776782989502,
-0.02540687844157219,
-0.8710160255432129,
-1.4375866651535034,
1.9743342399597168,
-1.5384851694107056,
1.8534363508224487,
0.6349520087242126,
-0.08500919491052628,
-1.7631946802139282,
-1.854812741279602,
1.3557004928588867,
1.194054365158081,
2.187772035598755,
0.5929557085037231,
0.3311070203781128,
-0.8921109437942505,
-0.7397035360336304,
0.28789445757865906,
-1.1373984813690186,
-0.8117017149925232,
0.012287701480090618,
2.3146982192993164,
1.9144331216812134,
-0.5755754709243774,
-0.14052942395210266,
-0.9824182391166687,
1.4070820808410645,
-0.1269439458847046,
0.21741074323654175,
1.956744909286499,
-0.3706713914871216,
-1.101219892501831,
1.1959248781204224,
-2.2927486896514893,
0.046517543494701385,
1.9772822856903076,
0.41042107343673706,
0.24491974711418152,
-1.4365789890289307,
-0.6086273789405823,
-0.2605392336845398,
-0.24847383797168732,
-1.338197112083435,
0.49455171823501587,
-0.4073614180088043,
-0.6977614164352417,
-1.606130838394165,
0.2901696562767029,
-1.2359315156936646,
-1.4557409286499023,
0.47007840871810913,
1.9662624597549438,
2.1351358890533447,
-0.5304595232009888,
1.504806399345398,
-0.19506727159023285,
0.15243776142597198,
1.1887731552124023,
1.1311432123184204,
3.0246188640594482,
1.932928204536438,
-1.0030748844146729,
0.6126117706298828,
-0.11962450295686722,
-0.5067322254180908,
1.1002846956253052,
-1.0630823373794556,
1.2610704898834229,
-0.15323035418987274,
-1.0463825464248657,
-1.0918331146240234,
0.9088740944862366,
0.5116491317749023,
0.03450654447078705,
-0.5325313210487366,
1.1710819005966187,
-0.006826475262641907,
1.3303474187850952,
0.3976178467273712,
-0.5231481194496155,
0.5288294553756714,
-0.3893716335296631,
-0.5619131326675415,
1.6728285551071167,
0.09057600051164627,
-1.6751512289047241,
-2.3001081943511963,
-0.22562451660633087,
-0.7104467153549194,
0.08802768588066101,
-0.5081567764282227,
-0.9227328300476074,
1.6908549070358276,
0.46672484278678894,
-1.2599011659622192,
-0.23845385015010834,
-0.4461818039417267,
-0.7125911712646484,
2.6752820014953613,
-1.432758092880249,
-0.28754809498786926,
-0.865950882434845,
-0.529833197593689,
1.5919032096862793,
-1.2694424390792847,
-0.25564780831336975,
-0.9729444980621338,
-0.6931915283203125,
-1.2289663553237915,
-0.4701364040374756,
-0.07046636193990707,
-0.9407826066017151,
0.9091582894325256,
0.1362810581922531,
-0.9357481598854065,
-0.3376343250274658,
-0.8944321870803833,
0.7616878151893616,
-0.15167583525180817,
0.2014855295419693,
1.9561508893966675,
0.3137953579425812,
-0.31954288482666016,
0.751128077507019,
1.2099040746688843,
0.5247378945350647,
-0.6502341628074646,
0.1472756415605545,
-0.5429373383522034,
0.3811247646808624,
-1.2719358205795288,
0.3421212136745453,
-3.0158305168151855,
0.6310425996780396,
-0.08361774682998657,
-0.025396309792995453,
0.1476830244064331,
-1.2379601001739502,
1.1521062850952148,
2.588340997695923,
-1.288110613822937,
0.49370306730270386,
0.2572202980518341,
1.2345402240753174,
-1.6156654357910156,
0.4466674029827118,
-0.39236217737197876,
2.128571033477783,
0.17645177245140076,
1.0673128366470337,
-0.700065553188324,
-2.2522149085998535,
0.7050088047981262,
-1.072997808456421,
-1.310160756111145,
0.47597718238830566,
-0.8614891767501831,
0.08111748099327087,
-1.6031038761138916,
-0.1780889630317688,
-0.9456027150154114,
-1.2738127708435059,
0.7822495102882385,
0.2857297956943512,
0.28758007287979126,
-0.611014187335968,
0.15937034785747528,
-2.2040212154388428,
-1.509736180305481,
-0.22957608103752136,
-0.9267675876617432,
0.633672297000885,
-0.44788259267807007,
0.721723735332489,
-0.19509123265743256,
0.14970669150352478,
0.1767803132534027,
1.455763578414917,
3.396749496459961,
0.1759166270494461,
0.48853328824043274,
-0.11875636875629425,
-0.8508449792861938,
1.2888158559799194,
1.1036666631698608,
0.10805998742580414,
-0.5245047807693481,
-1.0326815843582153,
1.363030195236206,
1.9700678586959839,
0.9147210717201233,
0.13363701105117798,
-0.7889232039451599,
-0.47515514492988586,
-0.07622189819812775,
0.3703073263168335,
0.5467179417610168,
0.9679872393608093,
0.03936232998967171,
0.019061610102653503,
1.3610082864761353,
1.28770112991333,
-0.41331174969673157,
0.3700321912765503,
-0.6971624493598938,
-0.4376339614391327,
0.5514578223228455,
0.39902451634407043,
-0.10412319004535675,
0.2540239095687866,
-0.9630376696586609,
-0.20624510943889618,
-0.26476621627807617,
-1.0692259073257446,
-0.5699502229690552,
-0.42122384905815125,
-0.3737136423587799,
1.7084178924560547,
0.2224348485469818,
-0.5891625285148621,
-0.16000334918498993,
-0.7986584901809692,
-0.04100620001554489,
-1.0906721353530884,
0.29061421751976013,
-0.11210941523313522,
-0.10074741393327713,
-0.1759425848722458,
1.788320541381836,
-0.8959028720855713,
-2.0383684635162354,
0.2777855396270752,
0.4083564281463623,
-0.4557303786277771,
0.18787820637226105,
1.5303878784179688,
0.4407540261745453,
1.563480257987976,
1.4398869276046753,
0.931659460067749,
-0.6591687798500061,
-1.3545706272125244,
0.5064468383789062,
0.9040460586547852,
-1.4551646709442139,
0.759362518787384,
0.10277306288480759,
-0.5315647125244141,
0.8078789114952087,
1.379868745803833,
0.43174463510513306,
-1.9714229106903076,
0.8536093831062317,
-0.882355809211731,
0.8307678699493408,
0.8182569742202759,
0.7639312744140625,
0.3709116280078888,
0.9918113946914673,
-1.2269420623779297,
-1.196012020111084,
-1.0283012390136719,
-0.6939698457717896,
2.067369222640991,
-0.22400546073913574,
0.5505933165550232,
-0.11830569803714752,
-1.174311637878418,
-0.15107877552509308,
0.7650701999664307,
0.5598648190498352,
-0.2234068065881729,
0.774763286113739,
-0.7945653200149536,
-1.1614629030227661,
-1.5155872106552124,
-0.47920432686805725,
-0.7734885215759277,
-0.921078085899353,
0.952583909034729,
0.9726447463035583,
0.20443680882453918,
1.988563060760498,
0.6496152877807617,
0.2004004269838333,
-2.6593549251556396,
0.8355212807655334,
0.4413035809993744,
-0.01404515840113163,
0.9313657283782959,
0.4551226496696472,
0.9895265698432922,
0.04088156297802925,
0.43749359250068665,
-2.217877149581909,
2.1962392330169678,
-0.3849204182624817,
0.7667471170425415,
-0.15374115109443665,
-0.11829391866922379,
1.2341548204421997,
0.5394446849822998,
0.5105438828468323,
-1.0673819780349731,
0.6967888474464417,
-0.6313890218734741,
1.2495142221450806,
1.0032048225402832,
-0.5956861972808838,
-0.04824061691761017,
1.2440342903137207,
0.6177890300750732,
-0.5805216431617737,
-1.0422779321670532,
-0.8035386800765991,
1.045831561088562,
1.873043179512024,
-0.12871530652046204,
0.07466118037700653,
0.801010251045227,
0.7115187048912048,
-1.3040757179260254,
0.08979663997888565,
-0.7314551472663879,
-0.8069220781326294,
1.5395058393478394,
2.0264647006988525,
0.026796650141477585,
-0.1348886638879776,
-0.7590736746788025,
-1.2188901901245117,
0.6621559262275696,
0.03526489436626434,
0.1396537572145462,
0.605553925037384,
-0.624701976776123,
1.1053324937820435,
0.8607996106147766,
0.9629599452018738,
0.04030746966600418,
0.46919316053390503,
0.45232486724853516,
-0.2578049302101135,
-1.1874260902404785,
-0.262431263923645,
-1.2095342874526978,
-2.473543405532837,
0.4392642378807068,
-0.3559068739414215,
-1.4456731081008911,
-0.00909916777163744,
-0.9593775272369385,
0.9064923524856567,
-0.4879288673400879,
-1.1908804178237915,
-1.5772262811660767,
0.18724370002746582,
0.025407060980796814,
0.9033898711204529,
-1.6320134401321411,
-0.14013874530792236,
1.1499699354171753,
0.8752152919769287,
-0.6411705017089844,
1.0723114013671875,
0.2855954170227051,
1.1072914600372314,
0.7675261497497559,
-0.6161408424377441,
0.4387584924697876,
0.00995465088635683,
-1.3127087354660034,
0.4958648681640625,
1.0897247791290283,
0.16497918963432312,
1.2531651258468628,
-0.5168364644050598,
0.06682787090539932,
0.47267210483551025,
-0.5757067799568176,
-0.3429136574268341,
-0.5453927516937256,
0.7639444470405579,
-0.03746204078197479,
-0.8368895649909973,
0.14215219020843506,
-0.16214247047901154,
-0.20773741602897644,
0.26448890566825867,
-1.4817404747009277,
-0.4202515184879303,
-0.5518320798873901,
-0.4137101173400879,
-1.2308590412139893,
-0.04688984528183937,
1.4068623781204224,
-0.6121988296508789,
-0.2629629373550415,
0.6510864496231079,
0.5546432137489319,
0.6030075550079346,
0.6887585520744324,
-0.7159435153007507,
-0.3150751292705536,
-0.2726224958896637,
-0.29965266585350037,
0.28033387660980225,
1.181235671043396,
-0.2562931180000305,
-0.9798851013183594,
0.6401196718215942,
-0.32477205991744995,
-0.1001814603805542,
1.9058042764663696,
-0.037310484796762466,
-0.7555416822433472,
0.2819414734840393,
-0.8639194369316101,
1.8550148010253906,
1.55535089969635,
1.0647530555725098,
-0.21481305360794067,
-0.9082865715026855,
0.5907384157180786,
-0.07054916769266129,
-0.42304062843322754,
0.8642153143882751,
0.6629015803337097,
-0.14410586655139923,
-1.4427748918533325,
0.5870444178581238,
1.1485801935195923,
-0.8308828473091125,
-0.8538458943367004,
0.061562612652778625,
-0.7660233378410339,
1.0958788394927979,
0.6312610507011414,
0.4865773022174835,
0.2963298261165619,
1.8530902862548828,
0.6058396100997925,
-0.5817350745201111,
0.5293658971786499,
0.5597007870674133,
-0.23544305562973022,
-2.2144954204559326,
-1.2312307357788086,
0.24334853887557983,
-0.3852599859237671,
-1.5676076412200928,
1.4231656789779663,
-1.0375150442123413,
-0.7168284058570862,
0.5890758633613586,
0.20843519270420074,
1.4676721096038818,
0.2547657787799835,
1.5443228483200073,
2.095438003540039,
0.8418026566505432,
0.4262297451496124,
1.4953774213790894,
-0.1287188082933426,
-0.49477437138557434,
2.001093864440918,
-0.41517093777656555,
0.5012121796607971,
1.1364920139312744,
-0.44444236159324646,
-0.9910300970077515,
-0.6504637002944946,
-1.1183689832687378,
-0.6362708806991577,
1.0346386432647705,
0.056611619889736176,
-1.1988893747329712,
0.15929646790027618,
1.47718346118927,
0.19660747051239014,
-0.23597614467144012,
0.344715416431427,
0.4181266129016876,
-0.7220774292945862,
-0.09745752066373825,
-1.0190224647521973,
0.4487973153591156,
-0.34519457817077637,
-0.2659665048122406,
0.3813326954841614,
0.3828566372394562,
1.165578842163086,
0.024477992206811905,
0.16332727670669556,
1.1853034496307373,
-1.5225207805633545,
1.443871259689331,
-0.6180444955825806,
0.30769869685173035,
-2.4721407890319824,
1.355643391609192,
-0.7237124443054199,
2.0069174766540527,
-2.6675026416778564,
0.3011047840118408,
-0.856385350227356,
-0.38462764024734497,
0.4173911213874817,
-0.17637668550014496,
0.14875657856464386,
-0.08041128516197205,
-1.1548101902008057,
0.17834080755710602,
-0.6871256828308105,
0.5435168147087097,
1.1656746864318848,
1.4640730619430542,
-0.9346320033073425,
-0.23625405132770538,
-1.8042833805084229,
-0.07585589587688446,
-0.8202030062675476,
0.3861316442489624,
-2.1126792430877686,
-0.20505845546722412,
-1.8497289419174194,
-2.2190616130828857,
-1.309634804725647,
-0.7721559405326843,
1.1274513006210327,
0.18172401189804077,
-0.9345086812973022,
1.181776762008667,
-0.3385111391544342,
-1.6033263206481934,
1.0887986421585083,
-2.1766419410705566
] |
https://github.com/huggingface/datasets/issues/3317 | Add desc parameter to Dataset filter method | @mariosasko the use case is filtering of a dataset prior to tokenization and subsequent training. As the dataset is huge it's just a matter of giving a user (model trainer) some feedback on what's going on. Otherwise, feedback is given for all steps in training preparation and not for filtering and the filtering in my use case lasts about 4-5 minutes. And yes, if there are more filtering stages, as @lhoestq pointed out, it would be nice to give some feedback. I thought desc is there already and got confused when I got the script error. | **Is your feature request related to a problem? Please describe.**
As I was filtering very large datasets I noticed the filter method doesn't have the desc parameter which is available in the map method. Why don't we add a desc parameter to the filter method both for consistency and it's nice to give some feedback to users during long operations on Datasets?
**Describe the solution you'd like**
Add desc parameter to Dataset filter method
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
| 1,092 | 96 | Add desc parameter to Dataset filter method
**Is your feature request related to a problem? Please describe.**
As I was filtering very large datasets I noticed the filter method doesn't have the desc parameter which is available in the map method. Why don't we add a desc parameter to the filter method both for consistency and it's nice to give some feedback to users during long operations on Datasets?
**Describe the solution you'd like**
Add desc parameter to Dataset filter method
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
@mariosasko the use case is filtering of a dataset prior to tokenization and subsequent training. As the dataset is huge it's just a matter of giving a user (model trainer) some feedback on what's going on. Otherwise, feedback is given for all steps in training preparation and not for filtering and the filtering in my use case lasts about 4-5 minutes. And yes, if there are more filtering stages, as @lhoestq pointed out, it would be nice to give some feedback. I thought desc is there already and got confused when I got the script error. | [
-1.2803592681884766,
-1.1706352233886719,
-0.77985018491745,
1.3282239437103271,
-0.14945301413536072,
-1.2741364240646362,
0.018008340150117874,
-1.1072256565093994,
1.7650856971740723,
-0.7578254342079163,
0.2508023679256439,
-1.75111985206604,
-0.011135650798678398,
-0.6039983034133911,
-0.7832549810409546,
-0.7784532308578491,
-0.41946977376937866,
-0.8670363426208496,
0.9360029697418213,
2.4998185634613037,
1.0460715293884277,
-1.5100610256195068,
2.740102529525757,
0.661592960357666,
-0.1495766043663025,
-1.005591869354248,
0.4967353940010071,
-0.021005496382713318,
-1.1925536394119263,
-0.4844702184200287,
-0.9788662195205688,
0.030081437900662422,
-0.5946372747421265,
-0.3892812430858612,
0.051018618047237396,
0.265215665102005,
-0.13212302327156067,
-0.3409900963306427,
-0.5377293229103088,
-0.7260053157806396,
0.5328425765037537,
-0.3842170238494873,
1.0366370677947998,
-0.42959246039390564,
1.8526763916015625,
-0.5421527624130249,
0.3436165153980255,
0.6355574727058411,
1.4719154834747314,
0.21004079282283783,
-0.01923072151839733,
0.2785966992378235,
0.3761335611343384,
-0.03731605410575867,
0.3646587133407593,
1.1114250421524048,
0.532232940196991,
0.5543456077575684,
0.7387667894363403,
-2.1893718242645264,
1.4886053800582886,
-1.101640224456787,
0.32601699233055115,
1.3377546072006226,
-0.9142988324165344,
0.43509218096733093,
-1.7624372243881226,
-0.02404184080660343,
0.5742368102073669,
-2.3097965717315674,
0.1355065107345581,
-1.1896820068359375,
-0.5229381322860718,
0.880379319190979,
0.2866550385951996,
-1.2655404806137085,
0.2603842318058014,
-0.5420474410057068,
0.993963360786438,
0.5169140100479126,
1.103934407234192,
-1.8194653987884521,
-0.13181138038635254,
-0.2339884638786316,
0.19264036417007446,
-1.441046118736267,
-1.513675332069397,
0.6214123368263245,
0.5550386905670166,
0.5890060067176819,
0.0014001298695802689,
0.9404444098472595,
-0.9873734712600708,
0.8462578058242798,
-1.033604621887207,
-1.5613174438476562,
-1.3834646940231323,
-2.199768304824829,
-2.2911112308502197,
0.8379942774772644,
-0.44329866766929626,
-0.5653921365737915,
1.9096766710281372,
-1.022312879562378,
-1.7916759252548218,
1.2084282636642456,
0.19008144736289978,
0.08090247958898544,
2.427582263946533,
0.10420002043247223,
-0.6266494989395142,
0.420642614364624,
-0.6659709215164185,
0.9532880187034607,
-0.474202036857605,
1.4570364952087402,
0.4627147316932678,
-0.8792421817779541,
1.5947766304016113,
-0.48278677463531494,
0.5333302021026611,
-0.49858933687210083,
-0.6864912509918213,
-0.879547655582428,
0.5346611142158508,
1.8686025142669678,
-0.24897074699401855,
1.540266513824463,
-0.3987397253513336,
-1.6042604446411133,
-1.5479464530944824,
0.9087075591087341,
0.5102778673171997,
-0.9268531799316406,
0.02317831479012966,
-0.2552528381347656,
0.19466601312160492,
-0.09600633382797241,
1.040786623954773,
1.1629492044448853,
0.6517733931541443,
-0.30378225445747375,
-0.9901947379112244,
0.2330465316772461,
-0.1670074313879013,
-0.639630913734436,
-1.8804587125778198,
-0.3587714731693268,
0.22411634027957916,
0.723846435546875,
-1.274645447731018,
1.6093038320541382,
0.9891989231109619,
1.9933836460113525,
1.0746240615844727,
-0.2580813765525818,
1.351505994796753,
0.0432576909661293,
1.8032251596450806,
-0.5645193457603455,
0.5906015634536743,
-0.3342607617378235,
-1.031510591506958,
0.784529447555542,
-0.5082851648330688,
-2.0291872024536133,
-0.7853567004203796,
-0.9202882647514343,
-0.3283713161945343,
-0.7803773283958435,
1.031886339187622,
-0.31368669867515564,
-1.2894659042358398,
0.3262210786342621,
-0.6779356002807617,
0.24775342643260956,
-1.1429104804992676,
0.3522484600543976,
0.7744253277778625,
-0.6563261151313782,
-0.03574645146727562,
-0.18997745215892792,
-1.352388858795166,
-0.5957568287849426,
0.2704903483390808,
1.9015617370605469,
-0.6958125829696655,
0.8293122053146362,
0.8533222079277039,
-0.6602816581726074,
-0.032024167478084564,
0.35514035820961,
-0.14381922781467438,
0.8256715536117554,
-0.9719952940940857,
-0.27241238951683044,
1.0850768089294434,
-0.2502988576889038,
-0.5586456060409546,
1.4839370250701904,
0.7728964686393738,
-1.0107176303863525,
-0.17656010389328003,
-0.3567363917827606,
-0.7919140458106995,
-0.08476699143648148,
-1.5281535387039185,
-0.20111891627311707,
0.16160865128040314,
-1.5529465675354004,
-0.5223900675773621,
-0.21852368116378784,
1.180822491645813,
-0.08794082701206207,
1.2665516138076782,
-0.42242300510406494,
-0.333293080329895,
-0.37564805150032043,
-0.4648681879043579,
0.20256195962429047,
-0.2422873079776764,
-0.6202702522277832,
0.17119085788726807,
-0.8373931050300598,
0.43499860167503357,
1.4614195823669434,
0.5318862795829773,
0.0013740714639425278,
0.5401135087013245,
0.9656364917755127,
0.3603917062282562,
-0.021212447434663773,
-0.8494240045547485,
-1.4027116298675537,
2.077115774154663,
-1.5014108419418335,
1.886022686958313,
0.7261254787445068,
-0.06154654920101166,
-1.7190088033676147,
-1.835142731666565,
1.3084895610809326,
1.2164808511734009,
2.2613985538482666,
0.5779480934143066,
0.33748820424079895,
-0.8685795068740845,
-0.6505306959152222,
0.34369438886642456,
-1.0950154066085815,
-0.7910928130149841,
0.0036456501111388206,
2.3377511501312256,
1.7913281917572021,
-0.5620169043540955,
-0.11181066930294037,
-0.9693095088005066,
1.4365897178649902,
-0.15236347913742065,
0.17398500442504883,
1.998892068862915,
-0.35781651735305786,
-1.1357454061508179,
1.2883025407791138,
-2.305119037628174,
0.03834797441959381,
1.9514374732971191,
0.3454452455043793,
0.1870259940624237,
-1.4101508855819702,
-0.6627069115638733,
-0.2533838450908661,
-0.3004162609577179,
-1.305991530418396,
0.5112090110778809,
-0.38511261343955994,
-0.7157591581344604,
-1.6269761323928833,
0.24950717389583588,
-1.2042890787124634,
-1.497113823890686,
0.4000053107738495,
1.8603167533874512,
2.0929627418518066,
-0.5831425786018372,
1.5042057037353516,
-0.17157910764217377,
0.19195392727851868,
1.2597264051437378,
1.142470359802246,
3.111764430999756,
1.855175495147705,
-1.096413254737854,
0.6395503282546997,
-0.15944704413414001,
-0.48810750246047974,
1.1345385313034058,
-1.1110883951187134,
1.2522644996643066,
-0.09449034184217453,
-1.1380211114883423,
-1.1310735940933228,
0.9390280246734619,
0.4687613844871521,
0.10424042493104935,
-0.550361692905426,
1.147727608680725,
-0.0012422907166182995,
1.3410639762878418,
0.43732428550720215,
-0.45671284198760986,
0.5484181642532349,
-0.49857789278030396,
-0.610480010509491,
1.6894525289535522,
0.1657295823097229,
-1.5834234952926636,
-2.3146989345550537,
-0.26664817333221436,
-0.7170750498771667,
0.06279469281435013,
-0.47921982407569885,
-0.9470083713531494,
1.6738260984420776,
0.42004305124282837,
-1.3109978437423706,
-0.24730807542800903,
-0.477228581905365,
-0.6793019771575928,
2.6511270999908447,
-1.4590412378311157,
-0.2636966407299042,
-0.9070718288421631,
-0.5708143711090088,
1.554360032081604,
-1.3369812965393066,
-0.17860549688339233,
-0.9667392373085022,
-0.6812489628791809,
-1.3218903541564941,
-0.48075738549232483,
-0.13260574638843536,
-0.9185172915458679,
0.8479337692260742,
0.21226905286312103,
-0.9796309471130371,
-0.3509300947189331,
-0.8746480941772461,
0.7628089785575867,
-0.06759056448936462,
0.3021872341632843,
1.941318154335022,
0.3762119710445404,
-0.37162885069847107,
0.6547730565071106,
1.2063040733337402,
0.5717218518257141,
-0.6777141690254211,
0.11017647385597229,
-0.6434500217437744,
0.3888044059276581,
-1.2841130495071411,
0.3449200391769409,
-2.906367063522339,
0.7071745991706848,
-0.07928048819303513,
-0.14775195717811584,
0.12440871447324753,
-1.2548377513885498,
1.1752127408981323,
2.626490592956543,
-1.2583346366882324,
0.4153837561607361,
0.2679504454135895,
1.2400497198104858,
-1.5670206546783447,
0.42090341448783875,
-0.39458975195884705,
2.1665661334991455,
0.21883638203144073,
1.1185864210128784,
-0.6290268898010254,
-2.368783473968506,
0.6021412014961243,
-1.172590732574463,
-1.2757114171981812,
0.6139730215072632,
-0.8496094942092896,
0.02077336423099041,
-1.5814762115478516,
-0.1485908180475235,
-0.9559099674224854,
-1.1975749731063843,
0.7843427658081055,
0.21933585405349731,
0.39392703771591187,
-0.6285032033920288,
0.31025728583335876,
-2.2256298065185547,
-1.496774435043335,
-0.2571137249469757,
-0.8757132887840271,
0.5278586149215698,
-0.3902936577796936,
0.7172196507453918,
-0.21547989547252655,
0.10082825273275375,
0.3005243241786957,
1.447394609451294,
3.4191458225250244,
0.19825242459774017,
0.5180426836013794,
-0.14244721829891205,
-0.9145437479019165,
1.3678090572357178,
1.0176751613616943,
-0.003350599203258753,
-0.5121731162071228,
-1.0407967567443848,
1.352094054222107,
1.9860856533050537,
0.909205436706543,
0.0785762220621109,
-0.641869068145752,
-0.5039075016975403,
-0.02989618293941021,
0.2717731297016144,
0.5234219431877136,
0.9717761278152466,
0.042818352580070496,
0.044993117451667786,
1.430045247077942,
1.326959252357483,
-0.4380399286746979,
0.36511754989624023,
-0.6926210522651672,
-0.4641304016113281,
0.49638843536376953,
0.3660261631011963,
-0.11146381497383118,
0.3291955590248108,
-0.8958805203437805,
-0.1918213665485382,
-0.30704209208488464,
-1.1033718585968018,
-0.5684496164321899,
-0.4937819242477417,
-0.3725429177284241,
1.7133880853652954,
0.2286902219057083,
-0.5227953791618347,
-0.11192861944437027,
-0.8457227349281311,
-0.06920687109231949,
-1.1108814477920532,
0.28463035821914673,
-0.08462048321962357,
-0.08937167376279831,
-0.12175536155700684,
1.8006643056869507,
-0.9353801012039185,
-1.9823966026306152,
0.2969832420349121,
0.27952954173088074,
-0.44158631563186646,
0.15110068023204803,
1.5700098276138306,
0.4366470277309418,
1.5844526290893555,
1.3890942335128784,
0.9441536664962769,
-0.6141430735588074,
-1.350773811340332,
0.6394516229629517,
0.8552966713905334,
-1.4148813486099243,
0.8758898973464966,
0.07575354725122452,
-0.5451250672340393,
0.774396538734436,
1.316484808921814,
0.45415523648262024,
-1.9157273769378662,
0.8167935013771057,
-0.916530191898346,
0.830077588558197,
0.7549187541007996,
0.7861705422401428,
0.2787708640098572,
0.8971442580223083,
-1.2570220232009888,
-1.1516523361206055,
-0.910572350025177,
-0.6738073825836182,
2.039700984954834,
-0.21447831392288208,
0.5319033861160278,
-0.11635558307170868,
-1.2051128149032593,
-0.1680312156677246,
0.8012343049049377,
0.48625117540359497,
-0.2665616273880005,
0.8010748624801636,
-0.7471847534179688,
-1.1624867916107178,
-1.5236098766326904,
-0.4457867443561554,
-0.8392720818519592,
-0.8933928608894348,
1.0453150272369385,
0.9490672945976257,
0.16071657836437225,
1.919042706489563,
0.6048098802566528,
0.22313733398914337,
-2.6246187686920166,
0.8286236524581909,
0.3790139853954315,
-0.02070372924208641,
0.9981671571731567,
0.31067851185798645,
0.9704750776290894,
0.060461029410362244,
0.4923321604728699,
-2.253960609436035,
2.1630403995513916,
-0.34762081503868103,
0.7840138673782349,
-0.16560795903205872,
-0.10084973275661469,
1.2248963117599487,
0.6031752228736877,
0.5226778388023376,
-1.1471335887908936,
0.6803497076034546,
-0.5878769159317017,
1.187121868133545,
0.9514987468719482,
-0.7231323719024658,
-0.06983665376901627,
1.282008409500122,
0.5036235451698303,
-0.5680590271949768,
-1.027849555015564,
-0.888815701007843,
1.0333600044250488,
1.8169653415679932,
-0.18464069068431854,
0.013491364195942879,
0.8548628687858582,
0.7639152407646179,
-1.32667875289917,
0.08648727834224701,
-0.7874028086662292,
-0.8330421447753906,
1.575057864189148,
2.032820224761963,
0.030489763244986534,
-0.1261172592639923,
-0.7157215476036072,
-1.2362416982650757,
0.7677114605903625,
0.07679036259651184,
0.16729861497879028,
0.6074553728103638,
-0.6429433822631836,
1.103650689125061,
0.9025610685348511,
0.9936295747756958,
0.11332397907972336,
0.3504527807235718,
0.4130112826824188,
-0.27131593227386475,
-1.1018905639648438,
-0.1767212301492691,
-1.2271919250488281,
-2.4359092712402344,
0.47302207350730896,
-0.30289170145988464,
-1.4815806150436401,
0.09347658604383469,
-0.909330427646637,
0.8752524852752686,
-0.5115182399749756,
-1.1402002573013306,
-1.5722335577011108,
0.16534048318862915,
-0.03667239099740982,
0.9104524850845337,
-1.6199183464050293,
-0.06172853708267212,
1.191008448600769,
0.8467485308647156,
-0.5147655010223389,
1.0588175058364868,
0.26665371656417847,
1.0401874780654907,
0.8304911851882935,
-0.525647759437561,
0.4808236360549927,
0.06372785568237305,
-1.307705283164978,
0.4747489392757416,
1.068023443222046,
0.21490080654621124,
1.2997633218765259,
-0.5451177358627319,
0.0878613218665123,
0.43723854422569275,
-0.5580769181251526,
-0.355669766664505,
-0.5410789847373962,
0.6839536428451538,
0.09252823144197464,
-0.8129785656929016,
0.08821259438991547,
-0.14007532596588135,
-0.2421102672815323,
0.21446149051189423,
-1.494217038154602,
-0.32740679383277893,
-0.534429669380188,
-0.44217246770858765,
-1.2893385887145996,
-0.06316445767879486,
1.4832100868225098,
-0.6893035769462585,
-0.21517561376094818,
0.5389344096183777,
0.6244654059410095,
0.5563369393348694,
0.7014457583427429,
-0.6863896250724792,
-0.365494966506958,
-0.28151455521583557,
-0.30928462743759155,
0.244362935423851,
1.145725965499878,
-0.2609521150588989,
-1.013309121131897,
0.6771388053894043,
-0.29235970973968506,
-0.035579659044742584,
1.8968039751052856,
0.010989019647240639,
-0.7125544548034668,
0.2810686230659485,
-0.7960203886032104,
1.8701188564300537,
1.6789875030517578,
1.160489559173584,
-0.1289619356393814,
-0.9865720868110657,
0.6328824758529663,
-0.1591498851776123,
-0.3623660206794739,
0.9585704803466797,
0.5608772039413452,
-0.18529243767261505,
-1.4340381622314453,
0.568617045879364,
1.0924992561340332,
-0.8493577241897583,
-0.8212258815765381,
-0.028239961713552475,
-0.8003753423690796,
1.094427466392517,
0.6435886025428772,
0.4720541834831238,
0.23754243552684784,
1.8463377952575684,
0.6339543461799622,
-0.5709657073020935,
0.4524071514606476,
0.5376008152961731,
-0.22110474109649658,
-2.2117350101470947,
-1.1949586868286133,
0.18330642580986023,
-0.4034348726272583,
-1.5440014600753784,
1.404840111732483,
-1.0794763565063477,
-0.7722060680389404,
0.5594907999038696,
0.09133454412221909,
1.4463999271392822,
0.24678455293178558,
1.564197301864624,
2.134389638900757,
0.8724676370620728,
0.357278972864151,
1.4622478485107422,
-0.10968063026666641,
-0.4495066702365875,
1.9093008041381836,
-0.399791419506073,
0.5227712392807007,
1.1506011486053467,
-0.4217867851257324,
-0.9685634970664978,
-0.6942119598388672,
-1.107316017150879,
-0.6046053767204285,
1.0588802099227905,
0.04942026734352112,
-1.1406457424163818,
0.16195335984230042,
1.552764654159546,
0.17180077731609344,
-0.25777214765548706,
0.379543662071228,
0.4415155351161957,
-0.7207691073417664,
-0.09389910846948624,
-1.030158519744873,
0.47893112897872925,
-0.29249969124794006,
-0.3436337113380432,
0.3743046820163727,
0.3532577455043793,
1.173366904258728,
-0.010559070855379105,
0.19165068864822388,
1.2640661001205444,
-1.480294942855835,
1.4091238975524902,
-0.6639800071716309,
0.25554409623146057,
-2.405731201171875,
1.3508645296096802,
-0.7484319806098938,
2.0667033195495605,
-2.699773073196411,
0.26290008425712585,
-0.794334888458252,
-0.4676640033721924,
0.4168369174003601,
-0.28138694167137146,
0.20577970147132874,
-0.12430552393198013,
-1.0948172807693481,
0.021936392411589622,
-0.6851915121078491,
0.5213972926139832,
1.1197792291641235,
1.4148582220077515,
-1.0198129415512085,
-0.2855483591556549,
-1.748494029045105,
-0.14141657948493958,
-0.7746989130973816,
0.35485023260116577,
-2.063551187515259,
-0.07567311078310013,
-1.9323474168777466,
-2.2632014751434326,
-1.4182506799697876,
-0.7741196751594543,
1.0948045253753662,
0.1434105485677719,
-0.9616132378578186,
1.1544291973114014,
-0.3268193006515503,
-1.660466194152832,
1.1381343603134155,
-2.1801819801330566
] |
https://github.com/huggingface/datasets/issues/3317 | Add desc parameter to Dataset filter method | I don't have a strong opinion on that, so having `desc` as a parameter is also OK. | **Is your feature request related to a problem? Please describe.**
As I was filtering very large datasets I noticed the filter method doesn't have the desc parameter which is available in the map method. Why don't we add a desc parameter to the filter method both for consistency and it's nice to give some feedback to users during long operations on Datasets?
**Describe the solution you'd like**
Add desc parameter to Dataset filter method
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
| 1,092 | 17 | Add desc parameter to Dataset filter method
**Is your feature request related to a problem? Please describe.**
As I was filtering very large datasets I noticed the filter method doesn't have the desc parameter which is available in the map method. Why don't we add a desc parameter to the filter method both for consistency and it's nice to give some feedback to users during long operations on Datasets?
**Describe the solution you'd like**
Add desc parameter to Dataset filter method
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
I don't have a strong opinion on that, so having `desc` as a parameter is also OK. | [
-1.301089882850647,
-1.1670897006988525,
-0.7983540892601013,
1.3658615350723267,
-0.22084157168865204,
-1.3706344366073608,
0.005696655251085758,
-1.1228033304214478,
1.874305248260498,
-0.6325458884239197,
0.24418511986732483,
-1.796769142150879,
-0.04394758120179176,
-0.5941545963287354,
-0.754270613193512,
-0.7495021224021912,
-0.4147767722606659,
-0.8413258194923401,
0.8699126839637756,
2.4167938232421875,
0.9487966895103455,
-1.501328945159912,
2.814592123031616,
0.7071564793586731,
-0.17010295391082764,
-0.9909072518348694,
0.4135138690471649,
0.0038322890177369118,
-1.1582070589065552,
-0.5980998873710632,
-1.0237598419189453,
0.00484482292085886,
-0.5282304286956787,
-0.38196828961372375,
0.07280632108449936,
0.29310330748558044,
-0.0906674712896347,
-0.39495134353637695,
-0.5848752856254578,
-0.6441034078598022,
0.42710402607917786,
-0.36071380972862244,
0.9628742337226868,
-0.6088727116584778,
1.8335742950439453,
-0.6337764859199524,
0.2645740807056427,
0.6616725921630859,
1.5536819696426392,
0.18187803030014038,
-0.08379873633384705,
0.40278902649879456,
0.3817468285560608,
-0.12933491170406342,
0.3484207093715668,
1.1033556461334229,
0.4353600740432739,
0.6690952777862549,
0.7147118449211121,
-2.147233724594116,
1.5234267711639404,
-1.201598882675171,
0.3369658887386322,
1.373914122581482,
-1.0041192770004272,
0.46716246008872986,
-1.7621554136276245,
0.017183862626552582,
0.5985644459724426,
-2.376692533493042,
0.174521341919899,
-1.1363928318023682,
-0.6542354822158813,
0.8648041486740112,
0.2913752794265747,
-1.2865256071090698,
0.26637399196624756,
-0.5471574664115906,
0.9840591549873352,
0.47027209401130676,
1.039568543434143,
-1.7392053604125977,
-0.08490704745054245,
-0.22138711810112,
0.09807943552732468,
-1.4702774286270142,
-1.4277276992797852,
0.7250869870185852,
0.5286641716957092,
0.6330010890960693,
0.011369871906936169,
0.976177990436554,
-0.9669298529624939,
0.8841884732246399,
-0.9790898561477661,
-1.5245676040649414,
-1.3633902072906494,
-2.234670639038086,
-2.1656157970428467,
0.9674164652824402,
-0.4472208321094513,
-0.5765892863273621,
1.8624155521392822,
-0.9153501987457275,
-1.8180458545684814,
1.141082763671875,
0.2777233421802521,
0.08290480077266693,
2.4045767784118652,
0.12599655985832214,
-0.5159652233123779,
0.3991628587245941,
-0.6651748418807983,
1.0513440370559692,
-0.5247971415519714,
1.48759126663208,
0.41333460807800293,
-0.7910823225975037,
1.5899256467819214,
-0.4633273780345917,
0.6082274317741394,
-0.4505653977394104,
-0.7407107949256897,
-0.9916229844093323,
0.6283363103866577,
1.948065996170044,
-0.22487588226795197,
1.501219391822815,
-0.4661257565021515,
-1.6043188571929932,
-1.5309237241744995,
0.9388359189033508,
0.5308591723442078,
-0.9644837975502014,
0.027637213468551636,
-0.22687764465808868,
0.20340120792388916,
-0.08488445729017258,
1.1182419061660767,
1.1138287782669067,
0.6579217314720154,
-0.29196614027023315,
-0.9471970796585083,
0.18989838659763336,
-0.05518098175525665,
-0.7158120274543762,
-1.8516714572906494,
-0.3579128682613373,
0.27066585421562195,
0.6185234189033508,
-1.309842824935913,
1.6044459342956543,
1.0092082023620605,
2.023228168487549,
1.0682789087295532,
-0.24069395661354065,
1.395456075668335,
0.019679639488458633,
1.8315634727478027,
-0.5916905999183655,
0.5378512144088745,
-0.2537247836589813,
-1.0020748376846313,
0.7460115551948547,
-0.5470306873321533,
-2.0696775913238525,
-0.7940477728843689,
-0.9476930499076843,
-0.3482043743133545,
-0.7045901417732239,
1.0024126768112183,
-0.3642916679382324,
-1.2872098684310913,
0.21675588190555573,
-0.7501060366630554,
0.23389871418476105,
-1.1419678926467896,
0.3208027482032776,
0.8079637885093689,
-0.6250734329223633,
-0.05214172974228859,
-0.17393018305301666,
-1.4105994701385498,
-0.5693012475967407,
0.245114266872406,
1.9422063827514648,
-0.6569010019302368,
0.7955619096755981,
0.7956185936927795,
-0.6496461629867554,
-0.07229562103748322,
0.3631749451160431,
-0.04535471275448799,
0.7734959721565247,
-1.0485634803771973,
-0.2695433497428894,
0.9926652908325195,
-0.19577552378177643,
-0.572262167930603,
1.5264263153076172,
0.776907205581665,
-1.043184757232666,
-0.19597771763801575,
-0.4290826916694641,
-0.8487858772277832,
-0.16047896444797516,
-1.5257089138031006,
-0.16015979647636414,
0.16015221178531647,
-1.5152209997177124,
-0.5913043022155762,
-0.16169831156730652,
1.126204490661621,
-0.01979791186749935,
1.0837239027023315,
-0.3860696852207184,
-0.40590059757232666,
-0.46495670080184937,
-0.5363388657569885,
0.17802076041698456,
-0.377439945936203,
-0.6171144247055054,
0.0705799087882042,
-0.7494060397148132,
0.47235292196273804,
1.4977834224700928,
0.5209042429924011,
0.010725188069045544,
0.6708716154098511,
1.0016167163848877,
0.30927395820617676,
-0.09806511551141739,
-0.829541027545929,
-1.3675358295440674,
1.9367799758911133,
-1.4983233213424683,
1.8365412950515747,
0.6766771078109741,
-0.09531830251216888,
-1.707292914390564,
-1.8685873746871948,
1.3232553005218506,
1.2792445421218872,
2.192859411239624,
0.5733494162559509,
0.27130988240242004,
-0.9490469694137573,
-0.7433451414108276,
0.23180165886878967,
-1.1584997177124023,
-0.7715467214584351,
-0.0355839878320694,
2.2942147254943848,
1.932724952697754,
-0.6784132719039917,
-0.16663917899131775,
-1.0073721408843994,
1.4547361135482788,
-0.18161828815937042,
0.21138618886470795,
2.000458002090454,
-0.38089719414711,
-1.0502177476882935,
1.2776023149490356,
-2.318720579147339,
-0.016910534352064133,
1.9558229446411133,
0.3965702950954437,
0.2904738187789917,
-1.4426265954971313,
-0.659103512763977,
-0.2571783661842346,
-0.27377304434776306,
-1.3475652933120728,
0.4615848958492279,
-0.3918013870716095,
-0.7049158811569214,
-1.6356496810913086,
0.2972714304924011,
-1.2259711027145386,
-1.44803786277771,
0.44775375723838806,
1.9129992723464966,
2.0564401149749756,
-0.5582267045974731,
1.448226809501648,
-0.14191575348377228,
0.10191826522350311,
1.2117805480957031,
1.097775936126709,
3.0218069553375244,
1.9071449041366577,
-0.9691542387008667,
0.5986806750297546,
-0.1762085109949112,
-0.47746047377586365,
1.1174808740615845,
-1.0855497121810913,
1.2298979759216309,
-0.06475529074668884,
-1.043395757675171,
-1.1090892553329468,
0.8650107979774475,
0.5576926469802856,
0.08445104956626892,
-0.5443050861358643,
1.1020135879516602,
-0.0163586288690567,
1.3635504245758057,
0.3858157694339752,
-0.5447041392326355,
0.5324742197990417,
-0.39574503898620605,
-0.5475174784660339,
1.6945750713348389,
0.15025770664215088,
-1.6475940942764282,
-2.2490463256835938,
-0.2163454294204712,
-0.746424674987793,
0.08304788917303085,
-0.4946959614753723,
-0.9150969386100769,
1.6825209856033325,
0.501702606678009,
-1.3143932819366455,
-0.21034373342990875,
-0.42274680733680725,
-0.6833064556121826,
2.730302333831787,
-1.4274717569351196,
-0.31708693504333496,
-0.8864761590957642,
-0.45717859268188477,
1.6116474866867065,
-1.2514595985412598,
-0.2123885303735733,
-1.0066381692886353,
-0.6480948328971863,
-1.2392871379852295,
-0.4749664068222046,
-0.11543475836515427,
-0.9365934133529663,
0.9064756631851196,
0.12325730174779892,
-0.9573574662208557,
-0.3279089331626892,
-0.8476448655128479,
0.7977089881896973,
-0.0873369425535202,
0.20754270255565643,
1.9356859922409058,
0.2536570429801941,
-0.34117135405540466,
0.7184164524078369,
1.283015489578247,
0.49798381328582764,
-0.6552894711494446,
0.17496496438980103,
-0.5389183163642883,
0.4404226839542389,
-1.2557295560836792,
0.3493695557117462,
-3.0391757488250732,
0.6412173509597778,
-0.06654350459575653,
-0.1163976639509201,
0.13319534063339233,
-1.244600772857666,
1.2210099697113037,
2.600100040435791,
-1.2820994853973389,
0.47120508551597595,
0.252875417470932,
1.261269450187683,
-1.5728070735931396,
0.4672279953956604,
-0.4021040201187134,
2.1281750202178955,
0.20028281211853027,
1.025836706161499,
-0.6693747639656067,
-2.2885375022888184,
0.6398590803146362,
-1.0730342864990234,
-1.3638862371444702,
0.46232137084007263,
-0.8785375952720642,
0.07084773480892181,
-1.6430351734161377,
-0.15978123247623444,
-0.8989629745483398,
-1.2242351770401,
0.7670055627822876,
0.3148694634437561,
0.29149067401885986,
-0.6577070951461792,
0.19152845442295074,
-2.235442876815796,
-1.4694241285324097,
-0.22204014658927917,
-0.8782081007957458,
0.6196967959403992,
-0.4312441647052765,
0.631645679473877,
-0.12427514791488647,
0.15942123532295227,
0.20476245880126953,
1.450440526008606,
3.3411481380462646,
0.16572988033294678,
0.4896398186683655,
-0.0902644544839859,
-0.8500294089317322,
1.3202544450759888,
1.0997363328933716,
0.11566642671823502,
-0.5508754253387451,
-1.046381950378418,
1.3875185251235962,
2.0137224197387695,
0.9622113704681396,
0.10765429586172104,
-0.7400534152984619,
-0.4833150804042816,
-0.08737558871507645,
0.34513193368911743,
0.4631420075893402,
1.0029205083847046,
0.05659443140029907,
-0.005150471348315477,
1.391304850578308,
1.296074390411377,
-0.409910649061203,
0.40526360273361206,
-0.7123458981513977,
-0.4485144317150116,
0.4944462776184082,
0.4084029495716095,
-0.09699369221925735,
0.28005871176719666,
-0.9512400031089783,
-0.1770385056734085,
-0.22775369882583618,
-1.0391589403152466,
-0.5793379545211792,
-0.38205844163894653,
-0.4094415605068207,
1.7524561882019043,
0.19876278936862946,
-0.5876437425613403,
-0.18257302045822144,
-0.81834477186203,
-0.04604252800345421,
-1.1071691513061523,
0.3308241069316864,
-0.0520748496055603,
-0.05149763077497482,
-0.1568162590265274,
1.796501874923706,
-0.907065749168396,
-2.0055739879608154,
0.272607684135437,
0.39502856135368347,
-0.46739596128463745,
0.16781704127788544,
1.4943116903305054,
0.5005379319190979,
1.5763438940048218,
1.4621351957321167,
0.9786056876182556,
-0.6811724901199341,
-1.3774176836013794,
0.5455155968666077,
0.7914124131202698,
-1.3831192255020142,
0.7697579264640808,
0.13656027615070343,
-0.5266785025596619,
0.7956939935684204,
1.3713867664337158,
0.40973061323165894,
-1.9456084966659546,
0.8443975448608398,
-0.911217451095581,
0.8645626902580261,
0.7726249098777771,
0.7333952188491821,
0.3447323441505432,
0.985709547996521,
-1.2504544258117676,
-1.219355821609497,
-1.0396201610565186,
-0.6947525143623352,
2.1244089603424072,
-0.25704851746559143,
0.6008279323577881,
-0.152932807803154,
-1.1549558639526367,
-0.14443588256835938,
0.8361715078353882,
0.6233111023902893,
-0.237839937210083,
0.818090558052063,
-0.77012699842453,
-1.1732090711593628,
-1.5013612508773804,
-0.4628407657146454,
-0.750586211681366,
-0.8573479056358337,
0.9871501326560974,
1.0380191802978516,
0.188116192817688,
1.9694716930389404,
0.6313728094100952,
0.2691595256328583,
-2.6408607959747314,
0.8322789072990417,
0.37232711911201477,
0.03186752274632454,
0.9060916900634766,
0.460699200630188,
0.936142086982727,
0.06395700573921204,
0.42067572474479675,
-2.1720187664031982,
2.1703696250915527,
-0.3427552580833435,
0.7502845525741577,
-0.1567712277173996,
-0.09493022412061691,
1.2873331308364868,
0.5738911628723145,
0.5359702706336975,
-1.1016322374343872,
0.6227410435676575,
-0.5559593439102173,
1.2417353391647339,
0.9756906628608704,
-0.5583871603012085,
-0.07400999218225479,
1.2254114151000977,
0.6283359527587891,
-0.5663445591926575,
-1.1253001689910889,
-0.8064690232276917,
1.0624264478683472,
1.8590253591537476,
-0.15788516402244568,
0.01439929474145174,
0.8099266886711121,
0.6981743574142456,
-1.295338749885559,
0.07292848825454712,
-0.7659704089164734,
-0.7934306263923645,
1.5583304166793823,
2.0266778469085693,
0.02213127166032791,
-0.11270631104707718,
-0.7520577907562256,
-1.2479840517044067,
0.654248833656311,
0.12097369879484177,
0.16354548931121826,
0.600421130657196,
-0.578158438205719,
1.1666110754013062,
0.8515024781227112,
0.9670246839523315,
0.03658187389373779,
0.49197280406951904,
0.42878246307373047,
-0.27324000000953674,
-1.207034707069397,
-0.2981607913970947,
-1.2006185054779053,
-2.431443691253662,
0.41138172149658203,
-0.35339587926864624,
-1.4686152935028076,
0.04385904222726822,
-1.028462290763855,
0.8869048953056335,
-0.4897085130214691,
-1.1532961130142212,
-1.5710599422454834,
0.1882060319185257,
0.023714914917945862,
0.8967440724372864,
-1.5802457332611084,
-0.07926009595394135,
1.1482678651809692,
0.8147846460342407,
-0.629930317401886,
1.0447638034820557,
0.26205340027809143,
1.069793939590454,
0.8016416430473328,
-0.5941285490989685,
0.43591517210006714,
0.04167881980538368,
-1.380163550376892,
0.5414847731590271,
1.0778331756591797,
0.14319784939289093,
1.246799349784851,
-0.5092634558677673,
0.11629032343626022,
0.49816977977752686,
-0.5779549479484558,
-0.3505652844905853,
-0.5408064723014832,
0.7315205931663513,
0.0527569018304348,
-0.9415390491485596,
0.081543929874897,
-0.10380957275629044,
-0.247802272439003,
0.27545690536499023,
-1.4466091394424438,
-0.43943849205970764,
-0.5346699357032776,
-0.4194548726081848,
-1.1948269605636597,
-0.06221703439950943,
1.4400739669799805,
-0.5903781652450562,
-0.25325000286102295,
0.6519554257392883,
0.5946811437606812,
0.5604439973831177,
0.6917081475257874,
-0.7224539518356323,
-0.28099244832992554,
-0.28158366680145264,
-0.311219185590744,
0.2787071764469147,
1.1728965044021606,
-0.258558064699173,
-1.027578353881836,
0.6127895712852478,
-0.31722819805145264,
-0.06370019912719727,
1.9960503578186035,
-0.015576036646962166,
-0.7651512622833252,
0.2901829481124878,
-0.8578590750694275,
1.8314075469970703,
1.5987836122512817,
1.0747205018997192,
-0.1602950245141983,
-0.9338251948356628,
0.5502340793609619,
-0.11290016025304794,
-0.40246739983558655,
0.8907838463783264,
0.5787045359611511,
-0.1940390020608902,
-1.4135524034500122,
0.5583849549293518,
1.1488206386566162,
-0.8201660513877869,
-0.8627206087112427,
0.002925710752606392,
-0.8342609405517578,
1.122368335723877,
0.630182683467865,
0.46964049339294434,
0.2892715334892273,
1.872674584388733,
0.5971329212188721,
-0.5072533488273621,
0.5061308145523071,
0.5791449546813965,
-0.25543129444122314,
-2.2352449893951416,
-1.2498098611831665,
0.1772298961877823,
-0.41954895853996277,
-1.5597023963928223,
1.4070903062820435,
-1.0669407844543457,
-0.6714691519737244,
0.5406749844551086,
0.19320081174373627,
1.4802777767181396,
0.22664853930473328,
1.5361496210098267,
2.144176959991455,
0.880918562412262,
0.3395969569683075,
1.500759482383728,
-0.1303277164697647,
-0.47906073927879333,
1.9798877239227295,
-0.3737477660179138,
0.49693310260772705,
1.098249077796936,
-0.4317261576652527,
-1.0380768775939941,
-0.6646815538406372,
-1.1155591011047363,
-0.6847252249717712,
1.0288006067276,
0.07477715611457825,
-1.181206226348877,
0.18647925555706024,
1.5025497674942017,
0.18201500177383423,
-0.2244003564119339,
0.30837056040763855,
0.4228588342666626,
-0.7474614977836609,
-0.07957349717617035,
-1.0072245597839355,
0.3875653147697449,
-0.2768336832523346,
-0.3112010359764099,
0.36669450998306274,
0.39199963212013245,
1.1278986930847168,
0.04439527913928032,
0.19320008158683777,
1.211974859237671,
-1.5126525163650513,
1.4669026136398315,
-0.5874540209770203,
0.32963475584983826,
-2.4984500408172607,
1.3954278230667114,
-0.6831810474395752,
1.948508620262146,
-2.719346761703491,
0.3001234531402588,
-0.814732551574707,
-0.404745489358902,
0.41667884588241577,
-0.2359398454427719,
0.16963399946689606,
-0.029957138001918793,
-1.1916621923446655,
0.20816096663475037,
-0.6638666987419128,
0.49580609798431396,
1.0667306184768677,
1.4678235054016113,
-0.9408733248710632,
-0.24722371995449066,
-1.7794326543807983,
-0.05459762364625931,
-0.8724752068519592,
0.3468778729438782,
-2.1388020515441895,
-0.16977456212043762,
-1.821897029876709,
-2.2031099796295166,
-1.3056033849716187,
-0.7746041417121887,
1.1281704902648926,
0.1614854633808136,
-0.9285497069358826,
1.119101881980896,
-0.3412395417690277,
-1.5937600135803223,
1.0953586101531982,
-2.1817708015441895
] |
https://github.com/huggingface/datasets/issues/3313 | TriviaQA License Mismatch | Hi ! You're completely right, this must be mentioned in the dataset card.
If you're interesting in contributing, feel free to open a pull request to mention this in the `trivia_qa` dataset card in the "Licensing Information" section at https://github.com/huggingface/datasets/blob/master/datasets/trivia_qa/README.md | ## Describe the bug
TriviaQA Webpage at http://nlp.cs.washington.edu/triviaqa/ says they do not own the copyright to the data. However, Huggingface datasets at https://huggingface.co/datasets/trivia_qa mentions that the dataset is released under Apache License
Is the License Information on HuggingFace correct? | 1,093 | 40 | TriviaQA License Mismatch
## Describe the bug
TriviaQA Webpage at http://nlp.cs.washington.edu/triviaqa/ says they do not own the copyright to the data. However, Huggingface datasets at https://huggingface.co/datasets/trivia_qa mentions that the dataset is released under Apache License
Is the License Information on HuggingFace correct?
Hi ! You're completely right, this must be mentioned in the dataset card.
If you're interesting in contributing, feel free to open a pull request to mention this in the `trivia_qa` dataset card in the "Licensing Information" section at https://github.com/huggingface/datasets/blob/master/datasets/trivia_qa/README.md | [
-1.1514208316802979,
-0.9640488028526306,
-0.8532671928405762,
1.4133793115615845,
-0.10097143799066544,
-1.4397547245025635,
-0.027161693200469017,
-1.1025848388671875,
1.653473973274231,
-0.7900357246398926,
0.123232901096344,
-1.7497490644454956,
-0.20589938759803772,
-0.5296565890312195,
-0.6445493698120117,
-1.0425539016723633,
-0.36673107743263245,
-0.8781548738479614,
0.9565005898475647,
2.395259141921997,
1.1767412424087524,
-1.1945912837982178,
2.8179240226745605,
0.6059540510177612,
-0.23148490488529205,
-1.063245177268982,
0.6635167598724365,
0.06826551258563995,
-1.1933528184890747,
-0.46999576687812805,
-1.0513200759887695,
0.03872857987880707,
-0.5760356187820435,
-0.4225339889526367,
0.104957215487957,
0.4063364863395691,
-0.2693108320236206,
-0.21646223962306976,
-0.5421469211578369,
-0.7924686074256897,
0.44878676533699036,
-0.3078896701335907,
0.9886780381202698,
-0.4532666802406311,
1.8571172952651978,
-0.5838757157325745,
0.23612761497497559,
0.7933356761932373,
1.3128165006637573,
0.20327797532081604,
0.04210028797388077,
0.1641586273908615,
0.4750581383705139,
-0.009114079177379608,
0.43302783370018005,
1.18588387966156,
0.5057627558708191,
0.5827074646949768,
0.7226805686950684,
-2.2239229679107666,
1.389979600906372,
-0.9903900623321533,
0.21649710834026337,
1.485885500907898,
-0.8805178999900818,
0.38865405321121216,
-1.864881157875061,
-0.06543383002281189,
0.5298222303390503,
-2.335817575454712,
0.11733168363571167,
-1.30226469039917,
-0.6215885877609253,
0.9561957716941833,
0.28493985533714294,
-1.2506855726242065,
0.17664556205272675,
-0.4243549406528473,
1.0489243268966675,
0.7261814475059509,
1.1026071310043335,
-1.6225695610046387,
0.1044081524014473,
-0.19423994421958923,
-0.05244050174951553,
-1.3563045263290405,
-1.5443071126937866,
0.5376178026199341,
0.6817412376403809,
0.6278736591339111,
0.0012339083477854729,
0.9854357838630676,
-0.8936536312103271,
0.8464058041572571,
-0.8153563141822815,
-1.7215707302093506,
-1.3980133533477783,
-2.3168692588806152,
-2.337984323501587,
0.9084029197692871,
-0.6030867695808411,
-0.44577550888061523,
2.0653936862945557,
-1.0605220794677734,
-1.7643719911575317,
1.1647840738296509,
0.3460226058959961,
0.12122580409049988,
2.364077091217041,
0.30751243233680725,
-0.6356315612792969,
0.4325453042984009,
-0.6306130290031433,
0.7443773150444031,
-0.43182164430618286,
1.3957830667495728,
0.5797134637832642,
-0.995965301990509,
1.6267236471176147,
-0.46284985542297363,
0.5010436773300171,
-0.6933224201202393,
-0.6501039266586304,
-0.8756548166275024,
0.4246915578842163,
1.7311683893203735,
-0.40125712752342224,
1.5828937292099,
-0.42649170756340027,
-1.5780837535858154,
-1.596642017364502,
0.8148314356803894,
0.49924910068511963,
-0.8614963293075562,
0.09389999508857727,
-0.331196665763855,
0.043076977133750916,
0.009646808728575706,
1.119022250175476,
1.1906533241271973,
0.6074031591415405,
-0.4217859208583832,
-0.8313484191894531,
0.22475428879261017,
0.04309915006160736,
-0.5924693942070007,
-1.833723783493042,
-0.34248441457748413,
0.3165317177772522,
0.6139997839927673,
-1.2608164548873901,
1.671674370765686,
0.9260111451148987,
2.0057120323181152,
1.0195815563201904,
-0.3346778154373169,
1.4881701469421387,
-0.05582708120346069,
1.839723825454712,
-0.5518103241920471,
0.5850538015365601,
-0.19810642302036285,
-1.1034526824951172,
0.810974657535553,
-0.3405631184577942,
-1.9093225002288818,
-0.8987776041030884,
-1.0666207075119019,
-0.16795071959495544,
-0.6706452369689941,
1.0382839441299438,
-0.3262883126735687,
-1.2845408916473389,
0.06685144454240799,
-0.6124749779701233,
0.005764436908066273,
-1.237705945968628,
0.16603465378284454,
0.7741513252258301,
-0.6511693000793457,
-0.02034013718366623,
-0.22529387474060059,
-1.306861162185669,
-0.45615196228027344,
0.35350048542022705,
2.0000298023223877,
-0.7102537155151367,
0.9442532062530518,
0.9732754230499268,
-0.856861412525177,
0.08755118399858475,
0.3085011839866638,
-0.3674217760562897,
0.7918417453765869,
-0.9900109767913818,
-0.37787798047065735,
1.129118800163269,
-0.17504100501537323,
-0.841660737991333,
1.430536150932312,
0.8842645287513733,
-1.0170716047286987,
-0.19025005400180817,
-0.2946512997150421,
-0.6359710097312927,
-0.04963453859090805,
-1.5655208826065063,
-0.17038503289222717,
0.21512001752853394,
-1.434784173965454,
-0.37849587202072144,
-0.3200532793998718,
1.401135802268982,
-0.2291959971189499,
1.457032322883606,
-0.22645023465156555,
-0.31415075063705444,
-0.593654990196228,
-0.4822208881378174,
0.1584470570087433,
-0.25571104884147644,
-0.6135764122009277,
0.24835260212421417,
-0.9026135206222534,
0.29303091764450073,
1.441853642463684,
0.4162544906139374,
0.07215280830860138,
0.6442225575447083,
1.010420322418213,
0.3093891739845276,
-0.0896061584353447,
-0.9716199636459351,
-1.5170915126800537,
2.0559959411621094,
-1.3810756206512451,
1.8704264163970947,
0.7231595516204834,
-0.07116637378931046,
-1.9370495080947876,
-1.7917656898498535,
1.2866970300674438,
1.2061266899108887,
2.2610535621643066,
0.49685782194137573,
0.39413243532180786,
-0.8897740244865417,
-0.7120439410209656,
0.37381333112716675,
-1.038127064704895,
-0.6354570388793945,
0.06980443000793457,
2.2987756729125977,
1.7854973077774048,
-0.6278403997421265,
-0.3263377249240875,
-0.9487375020980835,
1.184375286102295,
-0.12141701579093933,
0.2542515695095062,
1.967334508895874,
-0.41927751898765564,
-0.9377321004867554,
1.1776022911071777,
-2.4122354984283447,
0.05572327971458435,
2.0591163635253906,
0.27787402272224426,
0.0870429202914238,
-1.5235581398010254,
-0.6299616694450378,
-0.3690706789493561,
-0.5922209024429321,
-1.2821669578552246,
0.6076464056968689,
-0.2562497556209564,
-0.9289921522140503,
-1.4416602849960327,
0.07197757065296173,
-1.1410837173461914,
-1.7990431785583496,
0.3899580240249634,
1.895973563194275,
2.0120787620544434,
-0.8007594347000122,
1.4346657991409302,
-0.11894088238477707,
0.1731937825679779,
1.2772302627563477,
1.3482742309570312,
3.154378652572632,
1.9180318117141724,
-1.1846691370010376,
0.7506508827209473,
-0.054567933082580566,
-0.4930442273616791,
1.2207131385803223,
-1.0238839387893677,
1.1945821046829224,
-0.2643861472606659,
-1.3148292303085327,
-1.2907323837280273,
0.9587010145187378,
0.40628406405448914,
0.08156393468379974,
-0.5714380145072937,
1.2866660356521606,
0.19579759240150452,
1.2885658740997314,
0.5641047358512878,
-0.48590508103370667,
0.6114479303359985,
-0.37605175375938416,
-0.6181699633598328,
1.58122980594635,
0.1933150291442871,
-1.4945409297943115,
-2.236356258392334,
-0.24038206040859222,
-0.7962312698364258,
-0.2203770875930786,
-0.5656114220619202,
-0.9908022284507751,
1.6547017097473145,
0.5203526020050049,
-1.2627896070480347,
-0.3831029534339905,
-0.37301579117774963,
-0.6847971081733704,
2.599247455596924,
-1.4601913690567017,
-0.09019115567207336,
-0.8447532653808594,
-0.476764053106308,
1.770318865776062,
-1.2134424448013306,
-0.0635501816868782,
-0.9520633220672607,
-0.6488201022148132,
-1.4624404907226562,
-0.494249165058136,
-0.057661376893520355,
-0.8609208464622498,
0.7928667664527893,
0.13830125331878662,
-1.0300296545028687,
-0.2169659584760666,
-0.8226746916770935,
1.0065909624099731,
-0.18572653830051422,
0.27335214614868164,
2.0557048320770264,
0.46147578954696655,
-0.37757745385169983,
0.6562722325325012,
1.1298199892044067,
0.5236032605171204,
-0.6441792845726013,
0.17889083921909332,
-0.7129829525947571,
0.2631275951862335,
-1.4303828477859497,
0.11940790712833405,
-2.9781084060668945,
0.5746861696243286,
-0.15466275811195374,
-0.22845888137817383,
-0.005188843701034784,
-1.2113721370697021,
1.1705787181854248,
2.5786116123199463,
-1.2628374099731445,
0.3477892577648163,
0.3771209120750427,
1.2265408039093018,
-1.4807748794555664,
0.4239867031574249,
-0.5125091671943665,
2.023496150970459,
0.12781508266925812,
1.2386283874511719,
-0.5321943759918213,
-1.9433071613311768,
0.610924482345581,
-1.2087271213531494,
-1.082150936126709,
0.7932956218719482,
-0.8735150098800659,
0.20945346355438232,
-1.4906619787216187,
-0.13826070725917816,
-0.8368045091629028,
-1.4005928039550781,
0.9474542737007141,
0.05188971757888794,
0.4452996551990509,
-0.4858286678791046,
0.32262638211250305,
-2.092087507247925,
-1.304368019104004,
-0.23227627575397491,
-0.8879805207252502,
0.46642234921455383,
-0.20149928331375122,
0.6493025422096252,
-0.12699967622756958,
0.13062086701393127,
0.3586537539958954,
1.32137930393219,
3.368589401245117,
0.160074383020401,
0.3176385462284088,
-0.11865222454071045,
-0.9798276424407959,
1.530775785446167,
1.0408474206924438,
-0.09214252233505249,
-0.49293801188468933,
-0.9753984808921814,
1.2726496458053589,
1.9581034183502197,
1.0431894063949585,
0.15737579762935638,
-0.8594344854354858,
-0.7622057795524597,
0.11340080201625824,
0.231225848197937,
0.4684218764305115,
0.9402073621749878,
-0.11945827305316925,
0.07248193770647049,
1.4864966869354248,
1.3180952072143555,
-0.3325216472148895,
0.39896541833877563,
-0.974709689617157,
-0.397696316242218,
0.5115760564804077,
0.2910098135471344,
0.007375746965408325,
0.507267415523529,
-1.0136219263076782,
-0.3643721044063568,
-0.2087019979953766,
-0.9277523756027222,
-0.6203479170799255,
-0.4079873561859131,
-0.4238990843296051,
1.5500725507736206,
0.09790302813053131,
-0.4410601854324341,
0.13229644298553467,
-0.847425639629364,
-0.08829531073570251,
-1.0476737022399902,
0.29135313630104065,
-0.17676617205142975,
-0.1564440131187439,
-0.12378724664449692,
1.7801703214645386,
-1.0873222351074219,
-2.0974769592285156,
0.2772194743156433,
0.3556192219257355,
-0.44297242164611816,
0.2101379930973053,
1.611136555671692,
0.46180763840675354,
1.4467357397079468,
1.2903587818145752,
1.0761170387268066,
-0.6258638501167297,
-1.2326436042785645,
0.659655749797821,
0.903119683265686,
-1.4335252046585083,
0.8797731995582581,
-0.09459779411554337,
-0.5690592527389526,
0.7001373171806335,
1.214005708694458,
0.30372685194015503,
-1.9626082181930542,
0.8508691191673279,
-0.7714369893074036,
0.776435136795044,
0.6483907699584961,
0.9054868221282959,
0.28310689330101013,
1.044838786125183,
-1.23697829246521,
-1.2127573490142822,
-0.7860877513885498,
-0.563006579875946,
1.9634853601455688,
-0.12336239218711853,
0.5336394309997559,
-0.21012714505195618,
-1.2767311334609985,
-0.1290842741727829,
0.7545596957206726,
0.3269493877887726,
-0.3943924307823181,
0.9438454508781433,
-0.6210220456123352,
-1.0790679454803467,
-1.4214571714401245,
-0.3456788957118988,
-0.9697136282920837,
-0.8461390733718872,
1.0049967765808105,
0.8192065358161926,
0.29484108090400696,
1.942702293395996,
0.4371880888938904,
0.37768226861953735,
-2.703719139099121,
0.9328230619430542,
0.18372611701488495,
0.10079751908779144,
0.8728781342506409,
0.3708457946777344,
1.1450297832489014,
-0.08915827423334122,
0.43123915791511536,
-2.2739369869232178,
2.22743821144104,
-0.2648090124130249,
0.5922280550003052,
0.08310107886791229,
-0.1720075160264969,
1.114392638206482,
0.4528741240501404,
0.7286676168441772,
-1.094478964805603,
0.7260372638702393,
-0.5542169809341431,
1.1292502880096436,
1.0960476398468018,
-0.8417935371398926,
0.08904857933521271,
1.4568711519241333,
0.6861015558242798,
-0.4541928470134735,
-0.9112573862075806,
-0.9656369686126709,
0.9853509664535522,
1.6209702491760254,
0.0009268485009670258,
-0.049794651567935944,
0.7882616519927979,
0.6319600343704224,
-1.2984808683395386,
0.17783288657665253,
-0.7939905524253845,
-0.6486572623252869,
1.6200752258300781,
1.9921207427978516,
-0.11827152967453003,
-0.07564079761505127,
-0.6880176663398743,
-1.0965406894683838,
0.6520827412605286,
-0.030248932540416718,
0.1326734572649002,
0.7159571051597595,
-0.6850703358650208,
1.2274013757705688,
0.6595531702041626,
0.8217678070068359,
0.090054951608181,
0.5533318519592285,
0.3700449764728546,
-0.30491843819618225,
-1.2045172452926636,
-0.2920795977115631,
-1.073944330215454,
-2.5588178634643555,
0.41886425018310547,
-0.44255173206329346,
-1.262241005897522,
0.012068988755345345,
-1.0691373348236084,
0.9091392755508423,
-0.6212379932403564,
-1.0643986463546753,
-1.492200493812561,
0.20284833014011383,
-0.1871049553155899,
0.8997068405151367,
-1.6391605138778687,
-0.09313309192657471,
1.2935779094696045,
0.8398440480232239,
-0.6439056992530823,
1.0336116552352905,
0.35093915462493896,
1.1339983940124512,
0.759464681148529,
-0.36748865246772766,
0.47366300225257874,
0.09044341742992401,
-1.5064932107925415,
0.45866355299949646,
1.1211899518966675,
0.2076020985841751,
1.3699290752410889,
-0.49016767740249634,
0.12680090963840485,
0.5031862854957581,
-0.5402138829231262,
-0.4796599745750427,
-0.5317355394363403,
0.8010030388832092,
0.0843072161078453,
-0.9276948571205139,
0.11155823618173599,
-0.1951780617237091,
-0.25643211603164673,
0.24460469186306,
-1.5323950052261353,
-0.3314944803714752,
-0.3466383218765259,
-0.5315605998039246,
-1.2948689460754395,
0.08225607872009277,
1.2494577169418335,
-0.8203378319740295,
-0.24771566689014435,
0.5333864092826843,
0.30337560176849365,
0.5409836173057556,
0.5528751015663147,
-0.7416027784347534,
-0.2576831579208374,
-0.38070032000541687,
-0.28544968366622925,
0.2660629451274872,
1.1649329662322998,
-0.15649469196796417,
-1.0383048057556152,
0.7208390831947327,
-0.47044676542282104,
0.026925301179289818,
2.1010453701019287,
-0.061832211911678314,
-0.8823581337928772,
0.19524717330932617,
-0.5337738394737244,
1.6980409622192383,
1.5605789422988892,
1.3021076917648315,
-0.048555679619312286,
-0.741992175579071,
0.5220121145248413,
-0.1310342401266098,
-0.2449444681406021,
0.9934923052787781,
0.5971041321754456,
-0.22796669602394104,
-1.3691643476486206,
0.4106351137161255,
1.2387135028839111,
-0.9547572135925293,
-0.7630773186683655,
0.09946548193693161,
-0.8272089958190918,
1.0431121587753296,
0.7722167372703552,
0.38555100560188293,
0.1598711907863617,
1.494718074798584,
0.6632800698280334,
-0.5017682313919067,
0.4526897370815277,
0.5030000805854797,
-0.20103991031646729,
-2.0590505599975586,
-0.965779185295105,
0.3262453079223633,
-0.3382178544998169,
-1.6037333011627197,
1.3787617683410645,
-1.199845552444458,
-0.9226913452148438,
0.48099973797798157,
0.14040379226207733,
1.4704493284225464,
0.25312039256095886,
1.651525855064392,
2.0591635704040527,
0.9389026165008545,
0.268634557723999,
1.4167762994766235,
-0.05023982375860214,
-0.36307835578918457,
1.8940907716751099,
-0.5007092952728271,
0.4573532044887543,
0.9463140964508057,
-0.3940873444080353,
-1.0320359468460083,
-0.7560729384422302,
-1.1152430772781372,
-0.5539624691009521,
1.2806520462036133,
0.0882975235581398,
-1.0487393140792847,
0.2705017328262329,
1.4603899717330933,
0.084609754383564,
-0.24885955452919006,
0.6870774030685425,
0.5536800026893616,
-0.6148335933685303,
0.0630994588136673,
-0.9439669251441956,
0.4893794059753418,
-0.08663824200630188,
-0.34063881635665894,
0.34098929166793823,
0.3112502992153168,
1.2864961624145508,
-0.11055584251880646,
0.3035333454608917,
1.2774337530136108,
-1.2603678703308105,
1.5216838121414185,
-0.5232659578323364,
0.23664167523384094,
-2.5164051055908203,
1.4513487815856934,
-0.7729240655899048,
1.8370201587677002,
-2.5883522033691406,
0.4031655192375183,
-0.605901837348938,
-0.4533383548259735,
0.34931743144989014,
-0.5103369355201721,
0.09553016722202301,
-0.2516258955001831,
-1.0469591617584229,
0.019619157537817955,
-0.7481191754341125,
0.5645805597305298,
1.1500746011734009,
1.2763965129852295,
-1.1339718103408813,
-0.31902700662612915,
-1.8303954601287842,
-0.1245909333229065,
-0.7551385760307312,
0.4001215398311615,
-2.1597251892089844,
-0.09452728927135468,
-1.9766696691513062,
-2.364607334136963,
-1.3907136917114258,
-0.8596659302711487,
1.04979407787323,
0.13853740692138672,
-0.9776909947395325,
1.0787776708602905,
-0.32102200388908386,
-1.7791204452514648,
1.0269659757614136,
-2.124006986618042
] |
https://github.com/huggingface/datasets/issues/3310 | Fatal error condition occurred in aws-c-io | Hi ! Are you having this issue only with this specific dataset, or it also happens with other ones like `squad` ? | ## Describe the bug
Fatal error when using the library
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('wikiann', 'en')
```
## Expected results
No fatal errors
## Actual results
```
Fatal error condition occurred in D:\bld\aws-c-io_1633633258269\work\source\event_loop.c:74: aws_thread_launch(&cleanup_thread, s_event_loop_destroy_async_thread_fn, el_group, &thread_options) == AWS_OP_SUCCESS
Exiting Application
```
## Environment info
- `datasets` version: 1.15.2.dev0
- Platform: Windows-10-10.0.22504-SP0
- Python version: 3.8.12
- PyArrow version: 6.0.0
| 1,094 | 22 | Fatal error condition occurred in aws-c-io
## Describe the bug
Fatal error when using the library
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('wikiann', 'en')
```
## Expected results
No fatal errors
## Actual results
```
Fatal error condition occurred in D:\bld\aws-c-io_1633633258269\work\source\event_loop.c:74: aws_thread_launch(&cleanup_thread, s_event_loop_destroy_async_thread_fn, el_group, &thread_options) == AWS_OP_SUCCESS
Exiting Application
```
## Environment info
- `datasets` version: 1.15.2.dev0
- Platform: Windows-10-10.0.22504-SP0
- Python version: 3.8.12
- PyArrow version: 6.0.0
Hi ! Are you having this issue only with this specific dataset, or it also happens with other ones like `squad` ? | [
-1.1630650758743286,
-0.8425655961036682,
-0.6306981444358826,
1.4971243143081665,
-0.08811306953430176,
-1.2801109552383423,
0.1980627179145813,
-1.0572937726974487,
1.7503554821014404,
-0.8002222180366516,
0.2556998133659363,
-1.6572155952453613,
0.08022911846637726,
-0.7152267098426819,
-0.6945664882659912,
-0.9011455774307251,
-0.28446051478385925,
-0.6482386589050293,
1.0544308423995972,
2.5015807151794434,
1.2762171030044556,
-1.242058277130127,
2.7307465076446533,
0.735361635684967,
-0.23444081842899323,
-0.8982046842575073,
0.5559515953063965,
-0.09478171914815903,
-1.2367348670959473,
-0.43708518147468567,
-0.8694024682044983,
-0.17046883702278137,
-0.6403383016586304,
-0.6127511262893677,
-0.021625082939863205,
0.5105462074279785,
-0.3265056908130646,
-0.4053010046482086,
-0.46886909008026123,
-0.8206024169921875,
0.4969538152217865,
-0.37968704104423523,
0.9419142603874207,
-0.3857410252094269,
1.8280508518218994,
-0.6612820029258728,
0.5159929990768433,
0.7337303161621094,
1.2665355205535889,
0.11490622162818909,
-0.17857562005519867,
0.2881122827529907,
0.33150383830070496,
0.04588589072227478,
0.47378623485565186,
1.0248318910598755,
0.6271841526031494,
0.5126872658729553,
0.7170460224151611,
-2.2589914798736572,
1.295026421546936,
-0.9991400241851807,
0.27062028646469116,
1.3346333503723145,
-1.100683331489563,
0.2753698229789734,
-1.6682645082473755,
-0.1265636682510376,
0.49772003293037415,
-2.226243495941162,
0.2840751111507416,
-1.3126031160354614,
-0.5330109596252441,
1.0164718627929688,
0.4565909802913666,
-1.2931238412857056,
-0.04857669770717621,
-0.3366316556930542,
1.0533244609832764,
0.5024505257606506,
0.9759016036987305,
-1.7042616605758667,
0.005645652301609516,
-0.3082069158554077,
0.11885593831539154,
-1.3810539245605469,
-1.471718430519104,
0.6050073504447937,
0.6385006308555603,
0.680263102054596,
-0.06195724382996559,
0.9982712268829346,
-0.9863498210906982,
0.7559704184532166,
-1.030712604522705,
-1.7893508672714233,
-1.3471404314041138,
-2.427640676498413,
-2.34144926071167,
0.6504335403442383,
-0.4724414348602295,
-0.4397708475589752,
2.1077308654785156,
-1.0848753452301025,
-1.7908828258514404,
1.166619896888733,
0.14628495275974274,
-0.10684274137020111,
2.329299211502075,
0.3264427185058594,
-0.8325213193893433,
0.47779223322868347,
-0.9347662329673767,
0.7340359091758728,
-0.33515384793281555,
1.3082574605941772,
0.5387246608734131,
-1.148776650428772,
1.566249966621399,
-0.5044286847114563,
0.6446495652198792,
-0.650750458240509,
-0.4851701557636261,
-0.783163845539093,
0.24008603394031525,
1.9036697149276733,
-0.30221790075302124,
1.572645902633667,
-0.25422579050064087,
-1.4641003608703613,
-1.4950143098831177,
0.8179029822349548,
0.4059258699417114,
-0.766267716884613,
0.2190210372209549,
-0.30901357531547546,
0.11326973885297775,
-0.08355184644460678,
1.1580373048782349,
1.242477536201477,
0.6962636709213257,
-0.39703693985939026,
-0.847874104976654,
0.1681268960237503,
-0.04244200512766838,
-0.7166780829429626,
-1.7645307779312134,
-0.32743892073631287,
-0.01886654645204544,
0.6812682151794434,
-1.1498740911483765,
1.8376548290252686,
0.8659229874610901,
1.8809558153152466,
0.9914485216140747,
-0.2342955619096756,
1.3409152030944824,
0.03274966776371002,
1.8926317691802979,
-0.42527586221694946,
0.8079468607902527,
-0.41398537158966064,
-1.0849019289016724,
0.8694831132888794,
-0.3234201669692993,
-1.9721739292144775,
-0.7552642226219177,
-0.8613495230674744,
-0.11857980489730835,
-0.85198974609375,
0.9651894569396973,
-0.26981478929519653,
-1.389278531074524,
0.3128109276294708,
-0.740595817565918,
0.18007206916809082,
-1.3346275091171265,
0.2941809296607971,
0.7767459750175476,
-0.5553568601608276,
0.08451186120510101,
-0.2434787154197693,
-1.2666205167770386,
-0.4831741154193878,
0.31599149107933044,
1.8368693590164185,
-0.7659292221069336,
0.9253799915313721,
0.9931771755218506,
-0.6303625106811523,
-0.08552785217761993,
0.39572203159332275,
-0.3609362840652466,
0.8380739092826843,
-0.999944269657135,
-0.40828779339790344,
1.2243402004241943,
-0.2833775281906128,
-0.5958264470100403,
1.5816887617111206,
0.7196457386016846,
-1.0621548891067505,
-0.11744016408920288,
-0.17816582322120667,
-0.8489394187927246,
0.033546943217515945,
-1.6168527603149414,
-0.06181346997618675,
0.5030964016914368,
-1.5053738355636597,
-0.4723702073097229,
-0.0951317846775055,
1.4090999364852905,
-0.10317771136760712,
1.3627870082855225,
-0.3410190939903259,
-0.1477460116147995,
-0.3946548402309418,
-0.435637891292572,
0.1515692174434662,
-0.1588299572467804,
-0.603623628616333,
0.20215706527233124,
-0.6885455250740051,
0.27588552236557007,
1.366793155670166,
0.18320120871067047,
0.06645091623067856,
0.4565272927284241,
1.1312897205352783,
0.3055196702480316,
-0.14641085267066956,
-0.8183844089508057,
-1.537055492401123,
2.011110782623291,
-1.430437684059143,
1.9825289249420166,
0.7117108702659607,
-0.041491176933050156,
-1.819057822227478,
-1.867719054222107,
1.4244529008865356,
1.1876332759857178,
2.1686160564422607,
0.511202871799469,
0.37799978256225586,
-0.8314852118492126,
-0.7022554874420166,
0.2649616003036499,
-0.987099826335907,
-0.6842568516731262,
0.11022883653640747,
2.496443271636963,
1.678512454032898,
-0.3628421127796173,
-0.15168391168117523,
-0.9543082118034363,
1.3292843103408813,
-0.15625624358654022,
0.27907925844192505,
1.9896692037582397,
-0.37020453810691833,
-1.1332213878631592,
1.179659366607666,
-2.411437749862671,
0.22408749163150787,
2.098926067352295,
0.25627627968788147,
0.2090691775083542,
-1.3386746644973755,
-0.6992478966712952,
-0.2878631055355072,
-0.3620072901248932,
-1.2156380414962769,
0.6170353293418884,
-0.23559993505477905,
-0.8080137968063354,
-1.33634614944458,
0.26965197920799255,
-1.0380046367645264,
-1.7995734214782715,
0.261608749628067,
1.9055215120315552,
2.082063913345337,
-0.6624142527580261,
1.5923041105270386,
-0.32083964347839355,
0.23925109207630157,
1.2911690473556519,
1.2096948623657227,
3.134803056716919,
1.9550909996032715,
-1.2384165525436401,
0.6747873425483704,
-0.07727938890457153,
-0.46481597423553467,
1.246806263923645,
-1.1038844585418701,
1.2672666311264038,
-0.22995230555534363,
-1.2137211561203003,
-1.319792628288269,
0.8786712288856506,
0.40685054659843445,
-0.005943116266280413,
-0.4678965210914612,
1.3282465934753418,
0.06480737030506134,
1.398228406906128,
0.584277868270874,
-0.2620016038417816,
0.5745670795440674,
-0.4651840031147003,
-0.5322022438049316,
1.4735934734344482,
0.2993432283401489,
-1.420379638671875,
-2.3292837142944336,
-0.23687049746513367,
-0.8437493443489075,
-0.045480385422706604,
-0.6506462097167969,
-1.0260069370269775,
1.5608172416687012,
0.4668898284435272,
-1.195027232170105,
-0.23959729075431824,
-0.2945733666419983,
-0.5397583842277527,
2.812185049057007,
-1.4855087995529175,
-0.27155932784080505,
-1.0391027927398682,
-0.6810142993927002,
1.7065701484680176,
-1.2881454229354858,
-0.2334674894809723,
-1.0973732471466064,
-0.571139395236969,
-1.309603214263916,
-0.5092821717262268,
-0.08099773526191711,
-0.9508040547370911,
0.9046644568443298,
0.1388123333454132,
-1.2526949644088745,
-0.266309529542923,
-0.9855693578720093,
0.8747130632400513,
-0.12453530728816986,
0.24171288311481476,
1.777132511138916,
0.3192032277584076,
-0.4979766607284546,
0.7547450065612793,
1.1731905937194824,
0.6728660464286804,
-0.7351754307746887,
0.24155263602733612,
-0.6306992769241333,
0.39917710423469543,
-1.220402479171753,
0.25763076543807983,
-2.917649507522583,
0.5530180931091309,
-0.08033189177513123,
-0.06942746043205261,
-0.10096970200538635,
-1.4395971298217773,
1.071085810661316,
2.521479845046997,
-1.2701150178909302,
0.5775080919265747,
0.2998063862323761,
1.248008370399475,
-1.5944904088974,
0.2831096649169922,
-0.5089207887649536,
2.1352267265319824,
0.2165331095457077,
1.271571159362793,
-0.3456934988498688,
-2.3112967014312744,
0.6345895528793335,
-1.2981892824172974,
-1.2322297096252441,
0.8068056702613831,
-0.8335680365562439,
0.10227814316749573,
-1.295793056488037,
-0.13884557783603668,
-0.8353366851806641,
-1.3219434022903442,
0.6599766612052917,
0.12984295189380646,
0.5144687294960022,
-0.5943038463592529,
0.3046000599861145,
-2.220956802368164,
-1.3055713176727295,
-0.21302899718284607,
-0.9097285270690918,
0.3949504494667053,
-0.42226383090019226,
0.6595190763473511,
-0.20069469511508942,
0.015876829624176025,
0.3745340406894684,
1.5149363279342651,
3.449397563934326,
0.09941956400871277,
0.31840285658836365,
-0.18664346635341644,
-0.9229569435119629,
1.455517292022705,
0.9342208504676819,
-0.2039204090833664,
-0.5718478560447693,
-0.9453725814819336,
1.2831178903579712,
1.8592875003814697,
0.9275693297386169,
-0.020524077117443085,
-0.8354794383049011,
-0.6733960509300232,
-0.025479989126324654,
0.15115293860435486,
0.4026152193546295,
0.8103670477867126,
0.15153653919696808,
0.031665630638599396,
1.4180824756622314,
1.0977176427841187,
-0.3629700839519501,
0.35192084312438965,
-0.8620304465293884,
-0.3411088287830353,
0.6016682982444763,
0.3249727189540863,
-0.04364989325404167,
0.3068331778049469,
-0.8862388134002686,
-0.21553878486156464,
-0.2897186875343323,
-0.8427037596702576,
-0.7658332586288452,
-0.48970893025398254,
-0.38914042711257935,
1.6818211078643799,
0.043908700346946716,
-0.5001655220985413,
-0.06367909163236618,
-0.716708242893219,
-0.08461852371692657,
-1.0868923664093018,
0.30433008074760437,
-0.2466799020767212,
-0.11278409510850906,
-0.1546104997396469,
1.6943391561508179,
-1.0169812440872192,
-2.037849187850952,
0.29578977823257446,
0.2186019867658615,
-0.2880473732948303,
0.09142883867025375,
1.636841893196106,
0.5990516543388367,
1.386505126953125,
1.3740546703338623,
0.988966166973114,
-0.813701868057251,
-1.3086706399917603,
0.741702139377594,
0.9609190821647644,
-1.5007520914077759,
0.7742263674736023,
-0.010691889561712742,
-0.5297802090644836,
0.6026310324668884,
1.2954267263412476,
0.5355097651481628,
-1.9417129755020142,
0.7459612488746643,
-1.0159872770309448,
0.9335148334503174,
0.782383382320404,
0.7237383723258972,
0.21878311038017273,
0.8043459057807922,
-1.2113529443740845,
-1.0883102416992188,
-0.624289333820343,
-0.6477898359298706,
1.976876139640808,
-0.2824743986129761,
0.539840042591095,
-0.2050073742866516,
-1.3344409465789795,
-0.03276290372014046,
0.698565661907196,
0.3707817494869232,
-0.39427879452705383,
0.7499650120735168,
-0.6331027150154114,
-1.083475947380066,
-1.325418472290039,
-0.4871157109737396,
-1.0344687700271606,
-1.006285548210144,
1.033713698387146,
0.6924532055854797,
0.44130775332450867,
1.8838540315628052,
0.6539669632911682,
0.3187755048274994,
-2.490549087524414,
0.9445253610610962,
0.29829853773117065,
-0.022725000977516174,
0.79245525598526,
0.38448837399482727,
1.1099841594696045,
-0.03354659676551819,
0.5939933657646179,
-2.4270119667053223,
2.311946153640747,
-0.3181079626083374,
0.5728709101676941,
0.03585401922464371,
-0.17342635989189148,
1.0613621473312378,
0.5786283612251282,
0.48440101742744446,
-1.0176528692245483,
0.7826060652732849,
-0.6026171445846558,
1.271561622619629,
0.9048250317573547,
-0.9119998812675476,
0.012447048909962177,
1.2707263231277466,
0.4419192373752594,
-0.5955178737640381,
-0.8915045261383057,
-1.004303216934204,
0.9562200307846069,
1.6728991270065308,
-0.04097607359290123,
-0.007080008275806904,
0.8708059191703796,
0.6586547493934631,
-1.1498287916183472,
0.10159549862146378,
-0.7152965068817139,
-0.6783918738365173,
1.6663826704025269,
2.039113759994507,
-0.13321354985237122,
-0.1566765308380127,
-0.8278711438179016,
-1.2531991004943848,
0.9083311557769775,
0.07428445667028427,
-0.08547008037567139,
0.6241522431373596,
-0.5829282999038696,
1.0269498825073242,
0.9291848540306091,
0.8323861956596375,
0.24854622781276703,
0.24477221071720123,
0.3633994162082672,
-0.24486742913722992,
-1.1357886791229248,
-0.27587980031967163,
-1.070044994354248,
-2.668588876724243,
0.4789610207080841,
-0.3056848645210266,
-1.396974802017212,
0.05112294480204582,
-1.058779001235962,
0.890480101108551,
-0.5688892602920532,
-1.1389168500900269,
-1.5132865905761719,
0.21149757504463196,
-0.08406177908182144,
0.8338881731033325,
-1.5649398565292358,
-0.07299106568098068,
1.2946622371673584,
0.8346057534217834,
-0.7164795398712158,
1.1285400390625,
0.2248346507549286,
1.0039453506469727,
0.7953256368637085,
-0.3676631450653076,
0.6322850584983826,
0.12764739990234375,
-1.396375060081482,
0.5825915932655334,
1.3445521593093872,
0.13045954704284668,
1.5438179969787598,
-0.4656556248664856,
-0.010804959572851658,
0.38917455077171326,
-0.4942389130592346,
-0.5892816781997681,
-0.6479927897453308,
0.7858004570007324,
0.13382120430469513,
-0.855308473110199,
-0.00440564937889576,
-0.037137363106012344,
-0.28156810998916626,
0.17475856840610504,
-1.58566153049469,
-0.11496942490339279,
-0.38445600867271423,
-0.6865189075469971,
-1.327519178390503,
-0.17207901179790497,
1.3162627220153809,
-0.6333903074264526,
-0.2103961855173111,
0.4708206355571747,
0.3395236134529114,
0.48091861605644226,
0.6371563673019409,
-0.6487448811531067,
-0.2794797420501709,
-0.36249542236328125,
-0.2840023934841156,
0.3478167653083801,
1.357447862625122,
-0.061602476984262466,
-1.0329123735427856,
0.6905690431594849,
-0.37036558985710144,
0.12795937061309814,
1.9344329833984375,
0.14859209954738617,
-0.8245646953582764,
0.33070501685142517,
-0.7177612781524658,
2.0205488204956055,
1.6512811183929443,
1.2782474756240845,
-0.013341580517590046,
-0.9787622690200806,
0.6550213098526001,
-0.27972903847694397,
-0.32336556911468506,
0.8756611347198486,
0.41530224680900574,
-0.24316991865634918,
-1.3393157720565796,
0.7390058040618896,
1.1724584102630615,
-0.7879066467285156,
-0.8833957314491272,
0.14305701851844788,
-0.7244755029678345,
1.0937281847000122,
0.6378107070922852,
0.40549972653388977,
0.33028748631477356,
1.6788266897201538,
0.6994491219520569,
-0.5621853470802307,
0.504717230796814,
0.3695576786994934,
-0.1481984406709671,
-2.010972499847412,
-1.1254608631134033,
0.48030415177345276,
-0.604406476020813,
-1.579451084136963,
1.4850733280181885,
-1.0811328887939453,
-0.8747759461402893,
0.5435227751731873,
0.12393879890441895,
1.340688705444336,
0.35707563161849976,
1.581465244293213,
1.9514336585998535,
0.7550261616706848,
0.4761950671672821,
1.2156424522399902,
-0.2975805699825287,
-0.46933281421661377,
1.736193299293518,
-0.4568001329898834,
0.4890834391117096,
1.123948097229004,
-0.34151986241340637,
-1.1499758958816528,
-0.8157619833946228,
-1.2225397825241089,
-0.776753842830658,
1.105347990989685,
0.15637904405593872,
-1.151506781578064,
0.23699133098125458,
1.5615516901016235,
0.023468196392059326,
-0.18679875135421753,
0.6035490036010742,
0.3283890187740326,
-0.7900320291519165,
-0.07037687301635742,
-0.9741895198822021,
0.5880916118621826,
-0.2715208828449249,
-0.35618528723716736,
0.301835298538208,
0.5059418082237244,
1.2707467079162598,
0.0003308244049549103,
0.15874244272708893,
1.2088265419006348,
-1.3608136177062988,
1.4510284662246704,
-0.6814154386520386,
0.28412437438964844,
-2.288308620452881,
1.3260315656661987,
-0.7579262256622314,
1.8666046857833862,
-2.7240986824035645,
0.3436333239078522,
-0.44724732637405396,
-0.4520185589790344,
0.21520550549030304,
-0.2920488119125366,
0.11907413601875305,
-0.1922762393951416,
-1.1850656270980835,
-0.022453997284173965,
-0.7692795395851135,
0.5787051916122437,
1.1050442457199097,
1.3210217952728271,
-1.118008017539978,
-0.2597024440765381,
-1.6481767892837524,
-0.12342395633459091,
-0.6973578333854675,
0.3483525216579437,
-1.980809211730957,
-0.06876920163631439,
-2.0007882118225098,
-2.368983507156372,
-1.2396796941757202,
-0.8034278750419617,
1.1698886156082153,
0.05149521306157112,
-0.8449440598487854,
1.1717785596847534,
-0.30952852964401245,
-1.7600151300430298,
1.0598526000976562,
-2.137800455093384
] |